You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/09/09 07:33:02 UTC

[GitHub] [cloudstack] jack99trade opened a new issue, #6722: Topology Viewer (network)

jack99trade opened a new issue, #6722:
URL: https://github.com/apache/cloudstack/issues/6722

   <!--
   Verify first that your issue/request is not already reported on GitHub.
   Also test if the latest release and main branch are affected too.
   Always add information AFTER of these HTML comments, but no need to delete the comments.
   -->
   
   ##### ISSUE TYPE
    * Other
   
   ##### COMPONENT NAME
   UI
   
   ##### CLOUDSTACK VERSION
   4.16
   
   ##### CONFIGURATION
   advanced networking with multiple Zones
   
   
   ##### OS / ENVIRONMENT
   Centos 7 and KVM. 
   
   ##### SUMMARY
   
   Hi , I was trying to look for a feature which could show me the Network Topology. just like they show in Openstack.
   can someone help on this if need to use some plugins ? 
   
   
   


-- 
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: commits-unsubscribe@cloudstack.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] Pearl1594 commented on issue #6722: Topology Viewer (network)

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on issue #6722:
URL: https://github.com/apache/cloudstack/issues/6722#issuecomment-1243625389

   @jack99trade We've also been evaluating various libraries to implement such a network visualizer, some libraries that we are looking at include: d3, goJS, v-network-graph. 


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] jack99trade commented on issue #6722: Topology Viewer (network)

Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] jack99trade closed issue #6722: Topology Viewer (network)

Posted by GitBox <gi...@apache.org>.
jack99trade closed issue #6722: Topology Viewer (network)
URL: https://github.com/apache/cloudstack/issues/6722


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] Pearl1594 commented on issue #6722: Topology Viewer (network)

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on issue #6722:
URL: https://github.com/apache/cloudstack/issues/6722#issuecomment-1247980124

   @jack99trade so the data input structure would depend on the specific d3 library that's being used I believe. For example, if you are using a network graph ( [https://d3-graph-gallery.com/network.html](https://d3-graph-gallery.com/network.html )) then we could structure it as follows:
   ```
   { "nodes": [
     { "id": 1, "name": "Net1" },
     { "id": 2, "name": "VM1" }
   ],
   "links": [
     { "source": 1, "target": 2 } ---> which would connect Net1 to VM1
   ]}
   ```
   
   But if you want to view it in a hierarchical manner then the data is structured differently  something like - https://github.com/bumbeishvili/sample-data/blob/main/sample.json and we need to take care of how the parentId is set in this case


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] jack99trade commented on issue #6722: Topology Viewer (network)

Posted by GitBox <gi...@apache.org>.
jack99trade commented on issue #6722:
URL: https://github.com/apache/cloudstack/issues/6722#issuecomment-1248926600

   > @jack99trade so the data input structure would depend on the specific d3 library that's being used I believe. For example, if you are using a network graph ( https://d3-graph-gallery.com/network.html) then we could structure it as follows:
   > 
   > ```
   > { "nodes": [
   >   { "id": 1, "name": "Net1" },
   >   { "id": 2, "name": "VM1" }
   > ],
   > "links": [
   >   { "source": 1, "target": 2 } ---> which would connect Net1 to VM1
   > ]}
   > ```
   > 
   > But if you want to view it in a hierarchical manner then the data is structured differently something like - https://github.com/bumbeishvili/sample-data/blob/main/sample.json and we need to take care of how the parentId is set in this case
   
   Hi @Pearl1594 , I am unbale to convert my data in format of Nodes and Links,  Programmatically like below:- 
   { "nodes": [
     { "id": 1, "name": "Net1" },
     { "id": 2, "name": "VM1" }
   ],
   "links": [
     { "source": 1, "target": 2 } ---> which would connect Net1 to VM1
   ]}
   
   So this is what i have done so far :-
   
   A. downloaded the JSON using API  =  /client/api/?command=listVirtualMachinesMetrics&response=json
   B.  Able to get list of all VMs and connection to Network from each VM 
   
   # cat data.json | jq '.listvirtualmachinesmetricsresponse.virtualmachine[] .name' | wc -l
   3
   # cat data.json | jq '.listvirtualmachinesmetricsresponse.virtualmachine[] .name'
   "UbuntuMachine"
   "FortinetFW"
   "PaloAltoFW"
   
   # cat data.json | jq '.listvirtualmachinesmetricsresponse.virtualmachine[0] .nic[] .networkname'
   "MGMT_NET"
   "WAN_NET"
   "LAN_NET"
   
   # cat data.json | jq '.listvirtualmachinesmetricsresponse.virtualmachine[1] .nic[] .networkname'
   "LAN_NET"
   
   # cat data.json | jq '.listvirtualmachinesmetricsresponse.virtualmachine[2] .nic[] .networkname'
   "LAN_NET"
   
   now I want to represent this in Nodes and Links format , I am still researching on this. This is tricky for me.
   


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] jack99trade commented on issue #6722: Topology Viewer (network)

Posted by GitBox <gi...@apache.org>.
jack99trade commented on issue #6722:
URL: https://github.com/apache/cloudstack/issues/6722#issuecomment-1243708568

   @rohityadavcloud  yeah it would be really nice to have this.
   @Pearl1594  thanks for input, I am not a programmer but I will try to understand these libraries. if anything is required from my side to help then do let me, I have multiple test network environment setup in my lab like servers, network devices, Firewalls, routers , switches etc. in various Zones and Affinity groups and can test the feature. 


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] jack99trade commented on issue #6722: Topology Viewer (network)

Posted by GitBox <gi...@apache.org>.
jack99trade commented on issue #6722:
URL: https://github.com/apache/cloudstack/issues/6722#issuecomment-1247932861

   @Pearl1594  Hi I am trying to do this via d3.js , can you let me know about right  way for data input source. right now i am trying to parse the json i got using api call but kinda stuck there. 


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] rohityadavcloud commented on issue #6722: Topology Viewer (network)

Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on issue #6722:
URL: https://github.com/apache/cloudstack/issues/6722#issuecomment-1243479151

   Sounds like a good feature idea @jack99trade /cc @Pearl1594


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org