Defined IMPL in global ipv6 namespace.

* fix LP1014798

Change-Id: Ife2cc064128ee99a7ba1352f10c373812c69dd13
This commit is contained in:
Justin Hammond 2012-08-15 09:05:45 -07:00
parent 2ba710af4f
commit 4becac7cc1
1 changed files with 4 additions and 2 deletions

View File

@ -25,13 +25,14 @@ ipv6_backend_opt = cfg.StrOpt('ipv6_backend',
FLAGS = flags.FLAGS
FLAGS.register_opt(ipv6_backend_opt)
IMPL = None
def reset_backend():
global IMPL
IMPL = utils.LazyPluggable('ipv6_backend',
rfc2462='nova.ipv6.rfc2462',
account_identifier='nova.ipv6.account_identifier')
rfc2462='nova.ipv6.rfc2462',
account_identifier='nova.ipv6.account_identifier')
def to_global(prefix, mac, project_id):
@ -41,4 +42,5 @@ def to_global(prefix, mac, project_id):
def to_mac(ipv6_address):
return IMPL.to_mac(ipv6_address)
reset_backend()