These forums are a place for learning, helping and sharing experiences with others about any of our products. Feel free to ask a question and get answers from our community and our most advanced users.
Note that these are public forums - anyone can view the discussions here.
VISIT OUR DIFFERENT FORUMS:
Announcements > | |
CloudShell > | TestShell > |
Developers > | BI (Business Inteligence) > |
This is where you can suggest your ideas to help and improve the product for everyone.
Please make sure to read the following article before posting a new idea, to get more information about the required information and ideas lifecycle.
Feel free to vote and comment on other ideas to promote them.
Thanks for everyone who suggested the ideas and voted for them.
Find, download and share integrations that can extend and enhance the CloudShell experience.
Integrations have several levels:
Certified - Officially tested and supported by Quali.
Preview - Provides a sneak peek to what the Quali team is developing. Officially supported by Quali. Feel free to experiment and comment, but please take into consideration that it is not yet tested and released.
Community - Integrations shared by community users. Feel free to look into what other users have contributed, please take into consideration that these integrations are not tested by Quali.
To learn more about creating Shells and integrating with CloudShell, use the following links:
CloudShell's Dev Guide > | Configuration Management > |
Getting started with Shells > | Extending CloudShell with Cloud Providers > |
Getting started with Orchestration > | API Guide > |
To share your integration, follow the instructions in this guide >.
Hello folks,
Is there an API command I can use to see all of a resources connections? Not the connections in the current sandbox, but the connections assigned to the resource in resource manager.
My use-case is I have a Cloudshell resource representing a shelf of physical devices. Inside resource manager, I have established connections between this shelf resource and the cloudshell resources representing the physical devices on the shelf. I'm trying to see if I can get from a reserved shelf resource back to it's connected physical devices, even if those devices aren't in the current sandbox.
Thank you,
Answer by Kimo Saper · Nov 17, 2017 at 09:36 PM
This is an example of a recursive method I wrote to list all children and their connections - you have to pass in the GetResourseDetails results:
Origin Call:
for item in device_query_list: self.connection_list = [] details = self.cs_session.GetResourceDetails(resourceFullPath=item) self._inner_connections(details)
Method:
def _inner_connections(self, dev_details): temp = [dev_details.Name, ''] for each in dev_details.Connections: temp[1] = each.FullPath self.connection_list.append(temp) for child in dev_details.ChildResources: self._inner_connections(child)
Answer by Yaniv Kalsky · Nov 08, 2017 at 03:07 AM
Hi @babrams
GetResourceDetails should help with that.
It has the connections list in the retired object.
Yaniv
Answer by Song Chen · Nov 08, 2017 at 03:16 AM
As Yaniv has said, you may use GetResourceDetails of TestShellAPI in TestShell Studio or Authoring, and get the connections in Result XML output, e.g.
<Connections FullPath="PatchPanel/p1" Weight="10"></Connections>
Or use GetResourceDetails() from cloudshell_api Python package, which returns ResourceInfo object, e.g.
import cloudshell.helpers.scripts.cloudshell_dev_helpers as dev_helpers Host = 'localhost' Username = 'admin' Password = 'admin' Domain = 'Global' api_session = dev_helpers.helpers.CloudShellAPISession(Host, Username, Password, Domain) resourceInfo = api_session.GetResourceDetails("Router1") for childResource in resourceInfo.ChildResources: for connection in childResource.Connections: print connection.FullPath
Hope it helps.
These forums are a place for learning, helping and sharing experiences with others about any of our products. Feel free to ask a question and get answers from our community and our most advanced users.
Note that these are public forums - anyone can view the discussions here.
Announcements | |
CloudShell | TestShell |
Developers | BI (Business Inteligence) |
This is where you can suggest your ideas to help and improve the product for everyone.
Please make sure to read the following article before posting a new idea, to get more information about the required information and ideas lifecycle.
Feel free to vote and comment on other ideas to promote them.
Thanks for everyone who suggested the ideas and voted for them.
Find, download and share integrations that can extend and enhance the CloudShell experience.
Integrations have several levels:
Certified - Officially tested and supported by Quali.
Preview - Provides a sneak peek to what the Quali team is developing. Officially supported by Quali. Feel free to experiment and comment, but please take into consideration that it is not yet tested and released.
Community - Integrations shared by community users. Feel free to look into what other users have contributed, please take into consideration that these integrations are not tested by Quali.
To learn more about creating Shells and integrating with CloudShell, use the following links:
CloudShell's Dev Guide | Configuration Management |
Getting started with Shells | Extending CloudShell with Cloud Providers |
Getting started with Orchestration | API Guide |
To share your integration, follow the instructions in this guide.