Revision 08b079e2 snf-cyclades-app/synnefo/api/networks.py

b/snf-cyclades-app/synnefo/api/networks.py
84 84
    network_id = str(network.id) if not network.public else 'public'
85 85
    d = {'id': network_id, 'name': network.name}
86 86
    if detail:
87
        d['cidr'] = network.subnet
88
        d['gateway'] = network.gateway
89
        d['dhcp'] = network.dhcp
90
        d['type'] = network.type
87 91
        d['updated'] = util.isoformat(network.updated)
88 92
        d['created'] = util.isoformat(network.created)
89 93
        d['status'] = network.state
90
        servers = [vm.id for vm in network.machines.filter(userid=user_id)]
91
        d['servers'] = {'values': servers}
94

  
95
        attachments = [util.construct_nic_id(nic) for nic in network.nics.filter(machine__userid= user_id)]
96
        d['attachments'] = {'values':attachments}
92 97
    return d
93 98

  
94 99

  

Also available in: Unified diff