Defined IMPL in global ipv6 namespace.
* fix LP1014798 Change-Id: Ife2cc064128ee99a7ba1352f10c373812c69dd13
This commit is contained in:
parent
2ba710af4f
commit
4becac7cc1
|
@ -25,13 +25,14 @@ ipv6_backend_opt = cfg.StrOpt('ipv6_backend',
|
||||||
|
|
||||||
FLAGS = flags.FLAGS
|
FLAGS = flags.FLAGS
|
||||||
FLAGS.register_opt(ipv6_backend_opt)
|
FLAGS.register_opt(ipv6_backend_opt)
|
||||||
|
IMPL = None
|
||||||
|
|
||||||
|
|
||||||
def reset_backend():
|
def reset_backend():
|
||||||
global IMPL
|
global IMPL
|
||||||
IMPL = utils.LazyPluggable('ipv6_backend',
|
IMPL = utils.LazyPluggable('ipv6_backend',
|
||||||
rfc2462='nova.ipv6.rfc2462',
|
rfc2462='nova.ipv6.rfc2462',
|
||||||
account_identifier='nova.ipv6.account_identifier')
|
account_identifier='nova.ipv6.account_identifier')
|
||||||
|
|
||||||
|
|
||||||
def to_global(prefix, mac, project_id):
|
def to_global(prefix, mac, project_id):
|
||||||
|
@ -41,4 +42,5 @@ def to_global(prefix, mac, project_id):
|
||||||
def to_mac(ipv6_address):
|
def to_mac(ipv6_address):
|
||||||
return IMPL.to_mac(ipv6_address)
|
return IMPL.to_mac(ipv6_address)
|
||||||
|
|
||||||
|
|
||||||
reset_backend()
|
reset_backend()
|
||||||
|
|
Loading…
Reference in New Issue