def args2body(self, parsed_args): _network_id = neutronV20.find_resourceid_by_name_or_id( self.get_client(), 'network', parsed_args.floating_network_id) body = {'floating_network_id': _network_id} neutronV20.update_dict(parsed_args, body, ['port_id', 'tenant_id', 'fixed_ip_address', 'description', 'floating_ip_address', 'subnet_id']) dns.args2body_dns_create(parsed_args, body, 'domain') dns.args2body_dns_create(parsed_args, body, 'name') return {self.resource: body}
def args2body(self, parsed_args): _network_id = neutronV20.find_resourceid_by_name_or_id( self.get_client(), 'network', parsed_args.floating_network_id) body = {'floating_network_id': _network_id} neutronV20.update_dict(parsed_args, body, [ 'port_id', 'tenant_id', 'fixed_ip_address', 'floating_ip_address', 'subnet_id' ]) dns.args2body_dns_create(parsed_args, body, 'domain') dns.args2body_dns_create(parsed_args, body, 'name') return {self.resource: body}
def args2body(self, parsed_args): body = {'admin_state_up': parsed_args.admin_state} args2body_common(body, parsed_args) neutronV20.update_dict(parsed_args, body, [ 'shared', 'tenant_id', 'vlan_transparent', 'provider:network_type', 'provider:physical_network', 'provider:segmentation_id', 'description' ]) self.args2body_qos_policy(parsed_args, body) availability_zone.args2body_az_hint(parsed_args, body) dns.args2body_dns_create(parsed_args, body, 'domain') return {'network': body}
def args2body(self, parsed_args): body = {'admin_state_up': parsed_args.admin_state} args2body_common(body, parsed_args) neutronV20.update_dict(parsed_args, body, ['shared', 'tenant_id', 'vlan_transparent', 'provider:network_type', 'provider:physical_network', 'provider:segmentation_id', 'description']) self.args2body_qos_policy(parsed_args, body) availability_zone.args2body_az_hint(parsed_args, body) dns.args2body_dns_create(parsed_args, body, 'domain') return {'network': body}
def args2body(self, parsed_args): client = self.get_client() _network_id = neutronV20.find_resourceid_by_name_or_id( client, 'network', parsed_args.network_id) body = {'admin_state_up': parsed_args.admin_state, 'network_id': _network_id, } _updatable_args2body(parsed_args, body, client) neutronV20.update_dict(parsed_args, body, ['mac_address', 'tenant_id']) if parsed_args.vnic_type: body['binding:vnic_type'] = parsed_args.vnic_type if parsed_args.binding_profile: body['binding:profile'] = jsonutils.loads( parsed_args.binding_profile) self.args2body_secgroup(parsed_args, body) self.args2body_extradhcpopt(parsed_args, body) self.args2body_qos_policy(parsed_args, body) self.args2body_allowedaddresspairs(parsed_args, body) dns.args2body_dns_create(parsed_args, body, 'name') return {'port': body}