~ubuntu-branches/ubuntu/raring/quantum/raring-proposed

« back to all changes in this revision

Viewing changes to quantum/common/config.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Yolanda Robla, James Page, Maru Newby
  • Date: 2013-01-11 09:14:35 UTC
  • mfrom: (2.1.17)
  • Revision ID: package-import@ubuntu.com-20130111091435-vaup7dwmtmajy5oe
Tags: 2013.1~g2-0ubuntu1
[ Chuck Short ]
* New upstream version. 
* debian/patches/fix-quantum-configuration.patch: Refreshed.

[ Yolanda Robla ]
* debian/quantum-l3-agent.quantum-metadata-agent.upstart: Add
  upstart configuration for Metadata Agent.
* debian/quantum-l3-agent.install: Added quantum-ns-metadata-proxy,
  quantum-metadata-agent and metadata_agent.ini.
* debian/patches/fix-quantum-configuration.patch: Update rootwrap
  configuration in metadata_agent.ini file.
* debian/changelog: Updated package version
* d/p/fix-quantum-configuration.patch: refresh patches

[ James Page ]
* d/*.install: Install entry points from bin directory instead
  of easy-install ones generated during the package build process
  (LP: #1085038).
* d/control: Drop BD on python-dev-all; its not required.
* d/rules: Install multiple upstart configurations for quantum-l3-agent.
* d/control: Tidy package descriptions.
* d/*.postrm: Drop as debhelper will generate update-rc.d calls in
  maintainer scripts if required.
* d/quantum-common.postinst: Tweak permissions setting so that /etc/quantum
  is not owned/writable by the quantum user, ensure that /etc/quantum/rootwrap*
  is owned by root:root.
* d/*agent*.postinst: Dropped as permissions now correctly set in
  quantum-common.
* d/patches/fix-quantum-configuration.patch: Re-add dropped fixes rootwrap and
  sqlite defaults for all plugins.
* d/control: Added new BD on alembic (>= 0.4.1~), version python-mock >= 1.0b1.

[ Maru Newby ]
* debian/control: Remove unnecessary openvswitch-vswitch dependency
  from quantum-plugin-openvswitch (LP: #1076747).

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
"""
21
21
 
22
22
import os
23
 
import sys
24
23
 
25
24
from paste import deploy
26
25
 
27
26
from quantum.api.v2 import attributes
 
27
from quantum.common import utils
28
28
from quantum.openstack.common import cfg
29
29
from quantum.openstack.common import log as logging
30
30
from quantum.version import version_info as quantum_version
39
39
    cfg.StrOpt('api_extensions_path', default=""),
40
40
    cfg.StrOpt('policy_file', default="policy.json"),
41
41
    cfg.StrOpt('auth_strategy', default='keystone'),
42
 
    cfg.StrOpt('core_plugin',
43
 
               default='quantum.plugins.sample.SamplePlugin.FakePlugin'),
 
42
    cfg.StrOpt('core_plugin'),
44
43
    cfg.ListOpt('service_plugins',
45
44
                default=[]),
46
45
    cfg.StrOpt('base_mac', default="fa:16:3e:00:00:00"),
48
47
    cfg.BoolOpt('allow_bulk', default=True),
49
48
    cfg.IntOpt('max_dns_nameservers', default=5),
50
49
    cfg.IntOpt('max_subnet_host_routes', default=20),
51
 
    cfg.StrOpt('state_path', default='.'),
 
50
    cfg.StrOpt('state_path', default='/var/lib/quantum'),
52
51
    cfg.IntOpt('dhcp_lease_duration', default=120),
53
52
    cfg.BoolOpt('allow_overlapping_ips', default=False),
54
53
    cfg.StrOpt('control_exchange',
55
54
               default='quantum',
56
 
               help='AMQP exchange to connect to if using RabbitMQ or Qpid')
57
 
 
 
55
               help='AMQP exchange to connect to if using RabbitMQ or Qpid'),
 
56
    cfg.StrOpt('host', default=utils.get_hostname()),
 
57
    cfg.BoolOpt('force_gateway_on_subnet', default=False,
 
58
                help=_("Ensure that configured gateway is on subnet")),
58
59
]
59
60
 
60
61
# Register the configuration options
83
84
    logging.setup(product_name)
84
85
    log_root = logging.getLogger(product_name).logger
85
86
    log_root.propagate = 0
86
 
    LOG.info("Logging enabled!")
 
87
    LOG.info(_("Logging enabled!"))
87
88
 
88
89
 
89
90
def load_paste_app(app_name):
97
98
 
98
99
    config_path = os.path.abspath(cfg.CONF.find_file(
99
100
        cfg.CONF.api_paste_config))
100
 
    LOG.info("Config paste file: %s", config_path)
 
101
    LOG.info(_("Config paste file: %s"), config_path)
101
102
 
102
103
    try:
103
104
        app = deploy.loadapp("config:%s" % config_path, name=app_name)