Revision 1cea389e

b/api/emitter.py
24 24
            "server": [ "id", "imageId", "name", "flavorId", "hostId",
25 25
                        "status", "progress", "progress" ],
26 26
            'ip': ['addr'],
27
            'ip6': ['addr'],
27 28
            'meta': ['key'],
28 29
            "flavor": [ "id", "name", "ram", "disk" ],
29 30
            "image": [ "id", "name", "updated", "created", "status",
b/api/handlers.py
95 95

  
96 96
    @paginator
97 97
    def read_all(self, request, detail=False):
98
        virtual_servers = VirtualMachine.objects.all()
99
        virtual_servers = [virtual_server for virtual_server in  virtual_servers if virtual_server.rsapi_state !="DELETED"]
98
        virtual_servers = VirtualMachine.objects.filter(deleted=False) 
100 99
        #get all VM's for now, FIX it to take the user's VMs only yet. also don't get deleted VM's
101 100

  
102 101
        if not detail:
......
109 108
                                     'imageId': server.sourceimage.id, 
110 109
                                     'hostId': server.hostid, 
111 110
                                     #'metadata': {'Server_Label': server.description },
112
                                     'metadata':[{'meta': { 'key': {metadata.meta_key: metadata.meta_value}}} for metadata in server.virtualmachinemetadata_set.all()],                                     
113
                                     'addresses': {'ip_four': { 'ip': {'addr': server.ipfour}},'ip_six': { 'ip': {'addr': server.ipsix}}},            
111
                                     'metadata':[{'meta': { 'key': {metadata.meta_key: metadata.meta_value}}} for metadata in server.virtualmachinemetadata_set.all()],                                    
112
                                     'addresses': {'public': { 'ip': {'addr': server.ipfour}, 'ip6': {'addr': server.ipsix}},'private': ''},      
113

  
114 114
                                    } for server in virtual_servers]
115 115
            #pass some fake data regarding ip, since we don't have any such data            
116 116
            return { "servers":  virtual_servers_list }                
b/ui/templates/machines.html
338 338
                    machine.find("img.list-logo").attr("title",image_tags[server.imageId]);
339 339
                    machine.find("span.imagetag").text(image_tags[server.imageId]);
340 340
    
341
                    machine.find("a.ip span.public").text(String(server.addresses.ip_four.ip.addr).replace(',',' '));            
341
                    machine.find("a.ip span.public").text(String(server.addresses.public.ip.addr).replace(',',' '));            
342 342
    
343 343
                    // TODO: handle SHARE_IP, SHARE_IP_NO_CONFIG, DELETE_IP, REBUILD, QUEUE_RESIZE, PREP_RESIZE, RESIZE, VERIFY_RESIZE, PASSWORD, RESCUE
344 344
                    if (server.status == 'BUILD'){

Also available in: Unified diff