jack99trade commented on issue #6722:
URL: https://github.com/apache/cloudstack/issues/6722#issuecomment-1250068583

   Hi @Pearl1594  with manual data input I am able to create :-  
   
   {
     "nodes": [
       { "name": "DEVICE-A" },
       { "name": "DEVICE-B" },
       { "name": "DEVICE-C" },
       { "name": "NET-A" },
       { "name": "NET-B" },
       { "name": "NET-C" }
     ],
   
     "links": [    
       { "source": "DEVICE-A", "target": "NET-A" },
       { "source": "DEVICE-A", "target": "NET-B" },
       { "source": "DEVICE-B", "target": "NET-A" },
       { "source": "DEVICE-B", "target": "NET-B" },
       { "source": "DEVICE-C", "target": "NET-A" },
       { "source": "DEVICE-C", "target": "NET-B" },
       { "source": "DEVICE-C", "target": "NET-C" }
     ]
   }
   
   
![image](https://user-images.githubusercontent.com/98413115/190858488-850b5e4d-e228-405a-8143-46b310d6ab0b.png)
   
   
   Now the VM list API returns me in this format :-
   
   {
     "listvirtualmachinesmetricsresponse": {
       "count": 3,
       "virtualmachine": [
         {
           "name": "DEVICE-A",
           "state": "Running",
           "nic": [
             {
               "networkname": "NET-A",
               "ipaddress": "172.16.200.14"
             },
             {
               "networkname": "NET-B",
               "ipaddress": "172.16.120.1"
             }
           ],
           "tags": []
         },
         {
           "name": "DEVICE-B",
           "state": "Running",
           "nic": [
             {
               "networkname": "NET-A",
               "ipaddress": "172.16.200.13"
             },
             {
               "networkname": "NET-B",
               "ipaddress": "172.16.110.1"
             }
           ],
           "tags": []
         },
         {
           "name": "DEVICE-C",
           "state": "Running",
           "nic": [
             {
               "networkname": "NET-A",
               "ipaddress": "172.16.200.12"
             },
             {
               "networkname": "NET-B",
               "ipaddress": "10.10.40.2"
             },
             {
               "networkname": "NET-C",
               "ipaddress": "192.168.210.1"
             }
           ],
           "tags": []
         }
       ]
     }
   }
   
   Do you have some suggest how can I convert the API result to the request 
format of nodes and links.. 
   
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to