def create_interfaces(self, networks, node, model=settings.INTERFACE_MODEL): if settings.BONDING: for network in networks: Interface.interface_create( network, node=node, model=model, interface_map=settings.BONDING_INTERFACES) else: for network in networks: Interface.interface_create(network, node=node, model=model)
def create_interfaces(self, interfaces, node, model=settings.INTERFACE_MODEL): for interface in interfaces: # TODO(ddmitriev): use l2_network_devices object to get # the network device network_name = interface['l2_network_device'] network = self.get_network(name=network_name) Interface.interface_create( network, node=node, model=model, )
def add_interface(self, label, l2_network_device_name, interface_model): if l2_network_device_name: env = self.group.environment l2_network_device = env.get_env_l2_network_device( name=l2_network_device_name) else: l2_network_device = None Interface.interface_create( node=self, label=label, l2_network_device=l2_network_device, model=interface_model, )
def create_interfaces_from_networks(self, networks, node, model=settings.INTERFACE_MODEL): interface_map = {} if settings.BONDING: interface_map = settings.BONDING_INTERFACES for network in networks: Interface.interface_create( network, node=node, model=model, interface_map=interface_map )