Merge "Allow to use project_name in handler formats"

This commit is contained in:
Jenkins 2016-02-27 12:50:14 +00:00 committed by Gerrit Code Review
commit 328424a7be
3 changed files with 5 additions and 0 deletions

View File

@ -67,6 +67,8 @@ class NeutronFloatingHandler(BaseAddressHandler):
'version': 4,
'address': payload['floatingip']['floating_ip_address']
}
payload['floatingip']['project'] = getattr(
context, 'tenant', None)
self._create(addresses=[address],
extra=payload['floatingip'],
zone_id=zone_id,

View File

@ -62,6 +62,7 @@ class NovaFixedHandler(BaseAddressHandler):
zone_id = cfg.CONF[self.name].zone_id
if event_type == 'compute.instance.create.end':
payload['project'] = getattr(context, 'tenant', None)
self._create(addresses=payload['fixed_ips'],
extra=payload,
zone_id=zone_id,

View File

@ -399,6 +399,7 @@ debug = False
#notification_topics = notifications
#control_exchange = 'nova'
#format = '%(octet0)s-%(octet1)s-%(octet2)s-%(octet3)s.%(domain)s'
#format = '%(hostname)s.%(project)s.%(domain)s'
#format = '%(hostname)s.%(domain)s'
#------------------------
@ -410,6 +411,7 @@ debug = False
#notification_topics = notifications
#control_exchange = 'neutron'
#format = '%(octet0)s-%(octet1)s-%(octet2)s-%(octet3)s.%(domain)s'
#format = '%(hostname)s.%(project)s.%(domain)s'
#format = '%(hostname)s.%(domain)s'
#############################