@utils.arg('server', metavar='<server>', help=_('Name or ID of server.'))
@utils.arg('--port-id', metavar='<port_id>', help=_('Port ID.'), dest='port_id')
@utils.arg('--net-id', metavar='<net_id>', help=_('Network ID'), default=None, dest='net_id')
@utils.arg('--fixed-ip', metavar='<fixed_ip>', help=_('Requested fixed IP.'), default=None, dest='fixed_ip')
def do_interface_attach(cs, args):
 server = _find_server(cs, args.server)
 res = server.interface_attach(args.port_id, args.net_id, args.fixed_ip)
 if isinstance(res, dict):
  utils.print_dict(res)

@ utils . arg ( 'server' , metavar = '<server>' , help = _ ( 'Name or ID of server.' ) ) @ utils . arg ( '--port-id' , metavar = '<port_id>' , help = _ ( 'Port ID.' ) , dest = 'port_id' ) @ utils . arg ( '--net-id' , metavar = '<net_id>' , help = _ ( 'Network ID' ) , default = None , dest = 'net_id' ) @ utils . arg ( '--fixed-ip' , metavar = '<fixed_ip>' , help = _ ( 'Requested fixed IP.' ) , default = None , dest = 'fixed_ip' ) def do_interface_attach ( cs , args ) : server = _find_server ( cs , args . server ) res = server . interface_attach ( args . port_id , args . net_id , args . fixed_ip ) if isinstance ( res , dict ) : utils . print_dict ( res )
attach a network interface to a server .