示例#1
0
 def initialize(self, **kwargs):
     if self.initialized:
         return
     LOG.debug("Initializing linux_net L3 driver")
     linux_net.init_host()
     linux_net.ensure_metadata_ip()
     linux_net.metadata_forward()
     self.initialized = True
 def initialize(self, **kwargs):
     if self.initialized:
         return
     LOG.debug("Initializing linux_net L3 driver")
     linux_net.init_host()
     linux_net.ensure_metadata_ip()
     linux_net.metadata_forward()
     self.initialized = True
示例#3
0
文件: l3.py 项目: aaaaatoz/nova
 def initialize(self, **kwargs):
     if self.initialized:
         return
     LOG.debug("Initializing linux_net L3 driver")
     fixed_range = kwargs.get('fixed_range', False)
     networks = kwargs.get('networks', None)
     if not fixed_range and networks is not None:
         for network in networks:
             if network['enable_dhcp']:
                 self.initialize_network(network['cidr'])
     linux_net.ensure_metadata_ip()
     linux_net.metadata_forward()
     self.initialized = True
示例#4
0
文件: l3.py 项目: bopopescu/nova-26
 def initialize(self, **kwargs):
     if self.initialized:
         return
     LOG.debug("Initializing linux_net L3 driver")
     fixed_range = kwargs.get('fixed_range', False)
     networks = kwargs.get('networks', None)
     if not fixed_range and networks is not None:
         for network in networks:
             self.initialize_network(network['cidr'])
     else:
         linux_net.init_host()
     linux_net.ensure_metadata_ip()
     linux_net.metadata_forward()
     self.initialized = True
 def initialize(self, **kwargs):
     if self.initialized:
         return
     LOG.debug("Initializing linux_net L3 driver")
     fixed_range = kwargs.get('fixed_range', False)
     networks = kwargs.get('networks', None)
     if not fixed_range and networks is not None:
         for network in networks:
             if network['enable_dhcp']:
                 is_ext = (network['dhcp_server'] is not None and
                           network['dhcp_server'] != network['gateway'])
                 self.initialize_network(network['cidr'], is_ext)
     linux_net.ensure_metadata_ip()
     linux_net.metadata_forward()
     self.initialized = True