Updates post review including better backwards compatibility with 12.04

This commit is contained in:
James Page 2012-12-06 10:22:24 +00:00
parent 97f19dce59
commit 251f06e24f
6 changed files with 15 additions and 20 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<projectDescription> <projectDescription>
<name>quantum</name> <name>quantum-gateway</name>
<comment></comment> <comment></comment>
<projects> <projects>
</projects> </projects>

View File

@ -5,6 +5,6 @@
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property> <pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property> <pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH"> <pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/quantum/hooks</path> <path>/quantum-gateway/hooks</path>
</pydev_pathproperty> </pydev_pathproperty>
</pydev_project> </pydev_project>

View File

@ -28,15 +28,13 @@ In order to use Quantum with Openstack, you will need to deploy the
nova-compute and nova-cloud-controller charms with the network-manager nova-compute and nova-cloud-controller charms with the network-manager
configuration set to 'Quantum': configuration set to 'Quantum':
nova-compute:
network-manager: Quantum
nova-cloud-controller: nova-cloud-controller:
network-manager: Quantum network-manager: Quantum
This decision must be made prior to deploying Openstack with Juju as This decision must be made prior to deploying Openstack with Juju as
Quantum is deployed baked into these charms from install onwards: Quantum is deployed baked into these charms from install onwards:
juju deploy --config config.yaml nova-compute juju deploy nova-compute
juju deploy --config config.yaml nova-cloud-controller juju deploy --config config.yaml nova-cloud-controller
juju add-relation nova-compute nova-cloud-controller juju add-relation nova-compute nova-cloud-controller

View File

@ -3,9 +3,8 @@ options:
default: ovs default: ovs
type: string type: string
description: | description: |
Network configuration plugin to use to manage Network configuration plugin to use for quantum.
the quantum network across quantum and nova-compute Supported values include:
nodes. Supported values include:
. .
ovs - OpenVSwitch ovs - OpenVSwitch
ext-port: ext-port:
@ -13,11 +12,6 @@ options:
description: | description: |
External port to use for routing of instance External port to use for routing of instance
traffic to the external public network. traffic to the external public network.
region:
type: string
default: RegionOne
description: |
OpenStack region that this quantum service supports.
openstack-origin: openstack-origin:
type: string type: string
description: | description: |

View File

@ -17,10 +17,12 @@ def do_hooks(hooks):
hook = os.path.basename(sys.argv[0]) hook = os.path.basename(sys.argv[0])
try: try:
hooks[hook]() hook_func = hooks[hook]
except KeyError: except KeyError:
juju_log('INFO', juju_log('INFO',
"This charm doesn't know how to handle '{}'.".format(hook)) "This charm doesn't know how to handle '{}'.".format(hook))
else:
hook_func()
def install(*pkgs): def install(*pkgs):
@ -43,11 +45,9 @@ except ImportError:
try: try:
import dns.resolver import dns.resolver
import dns.ipv4
except ImportError: except ImportError:
install('python-dnspython') install('python-dnspython')
import dns.resolver import dns.resolver
import dns.ipv4
def render_template(template_name, context, template_dir=TEMPLATES_DIR): def render_template(template_name, context, template_dir=TEMPLATES_DIR):
@ -65,7 +65,10 @@ deb http://ubuntu-cloud.archive.canonical.com/ubuntu {} main
CLOUD_ARCHIVE_POCKETS = { CLOUD_ARCHIVE_POCKETS = {
'folsom': 'precise-updates/folsom', 'folsom': 'precise-updates/folsom',
'folsom/updates': 'precise-updates/folsom', 'folsom/updates': 'precise-updates/folsom',
'folsom/proposed': 'precise-proposed/folsom' 'folsom/proposed': 'precise-proposed/folsom',
'grizzly': 'precise-updates/grizzly',
'grizzly/updates': 'precise-updates/grizzly',
'grizzly/proposed': 'precise-proposed/grizzly'
} }
@ -206,9 +209,9 @@ def get_unit_hostname():
def get_host_ip(hostname=unit_get('private-address')): def get_host_ip(hostname=unit_get('private-address')):
try: try:
# Test to see if already an IPv4 address # Test to see if already an IPv4 address
dns.ipv4.inet_aton(hostname) socket.inet_aton(hostname)
return hostname return hostname
except dns.exception.SyntaxError: except socket.error:
pass pass
try: try:
answers = dns.resolver.query(hostname, 'A') answers = dns.resolver.query(hostname, 'A')

View File

@ -1 +1 @@
33 34