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"?>
<projectDescription>
<name>quantum</name>
<name>quantum-gateway</name>
<comment></comment>
<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_INTERPRETER">Default</pydev_property>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/quantum/hooks</path>
<path>/quantum-gateway/hooks</path>
</pydev_pathproperty>
</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
configuration set to 'Quantum':
nova-compute:
network-manager: Quantum
nova-cloud-controller:
network-manager: Quantum
This decision must be made prior to deploying Openstack with Juju as
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 add-relation nova-compute nova-cloud-controller

View File

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

View File

@ -17,10 +17,12 @@ def do_hooks(hooks):
hook = os.path.basename(sys.argv[0])
try:
hooks[hook]()
hook_func = hooks[hook]
except KeyError:
juju_log('INFO',
"This charm doesn't know how to handle '{}'.".format(hook))
else:
hook_func()
def install(*pkgs):
@ -43,11 +45,9 @@ except ImportError:
try:
import dns.resolver
import dns.ipv4
except ImportError:
install('python-dnspython')
import dns.resolver
import dns.ipv4
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 = {
'folsom': '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')):
try:
# Test to see if already an IPv4 address
dns.ipv4.inet_aton(hostname)
socket.inet_aton(hostname)
return hostname
except dns.exception.SyntaxError:
except socket.error:
pass
try:
answers = dns.resolver.query(hostname, 'A')

View File

@ -1 +1 @@
33
34