

def args2body(self, parsed_args):
    _subnet_id = neutronV20.find_resourceid_by_name_or_id(self.get_client(), 'subnet', parsed_args.vip_subnet)
    body = {
        'vip_subnet_id': _subnet_id,
        'admin_state_up': parsed_args.admin_state,
    }
    if parsed_args.flavor:
        _flavor_id = neutronV20.find_resourceid_by_name_or_id(self.get_client(), 'flavor', parsed_args.flavor)
        body['flavor_id'] = _flavor_id
    neutronV20.update_dict(parsed_args, body, ['provider', 'vip_address', 'tenant_id'])
    _parse_common_args(body, parsed_args)
    return {
        self.resource: body,
    }

dataset/ETHPy150Open openstack/python-neutronclient/neutronclient/neutron/v2_0/lb/v2/loadbalancer.py CreateLoadBalancer.args2body/original