~zulcss/nova/nova-precise-g3

« back to all changes in this revision

Viewing changes to nova/network/__init__.py

  • Committer: Chuck Short
  • Date: 2013-02-25 12:48:57 UTC
  • mfrom: (94.1.5 raring-proposed)
  • Revision ID: zulcss@ubuntu.com-20130225124857-iiz7w0zqhjo1sbs3
* New upstream release for the Ubuntu Cloud Archive. 
* New usptream release. 
* debian/patches/debian/patches/fix-ubuntu-tests.patch: Refreshed.
* debian/nova-baremetal.logrotate: Fix logfile path.
* debian/control, debian/nova-spiceproxy.{install, logrotate, upstart}:
  Add spice html5 proxy support.
* debian/nova-novncproxy.upstart: Start on runlevel [2345]
* debian/rules: Call testr directly since run_tests.sh -N gives weird return
  value when tests pass.
* debian/pyddist-overrides: Add websockify.
* debian/nova-common.postinst: Removed config file conversion, since
  the option is no longer available. (LP: #1110567)
* debian/control: Add python-pyasn1 as a dependency.
* debian/control: Add python-oslo-config as a dependency.
* debian/control: Suggest sysfsutils, sg3-utils, multipath-tools for fibre
  channel support.
* debian/control: Fix typo (websocikfy -> websockify).
* SECURITY UPDATE: fix lack of authentication on block device used for
  os-volume_boot
  - debian/patches/CVE-2013-0208.patch: adjust nova/compute/api.py to
    validate we can access the volumes
  - CVE-2013-0208

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#    License for the specific language governing permissions and limitations
17
17
#    under the License.
18
18
 
 
19
import oslo.config.cfg
 
20
 
19
21
# Importing full names to not pollute the namespace and cause possible
20
22
# collisions with use of 'from nova.network import <foo>' elsewhere.
21
 
import nova.openstack.common.cfg
22
23
import nova.openstack.common.importutils
23
24
 
24
25
_network_opts = [
25
 
    nova.openstack.common.cfg.StrOpt('network_api_class',
26
 
                                     default='nova.network.api.API',
27
 
                                     help='The full class name of the '
28
 
                                          'network API class to use'),
 
26
    oslo.config.cfg.StrOpt('network_api_class',
 
27
                           default='nova.network.api.API',
 
28
                           help='The full class name of the '
 
29
                                'network API class to use'),
29
30
]
30
31
 
31
 
nova.openstack.common.cfg.CONF.register_opts(_network_opts)
 
32
oslo.config.cfg.CONF.register_opts(_network_opts)
32
33
 
33
34
 
34
35
def API():
35
36
    importutils = nova.openstack.common.importutils
36
 
    network_api_class = nova.openstack.common.cfg.CONF.network_api_class
 
37
    network_api_class = oslo.config.cfg.CONF.network_api_class
37
38
    cls = importutils.import_class(network_api_class)
38
39
    return cls()