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 >.
Trying to extract a resources's UniqeIdentifier via the API but not having success. This is what I am attempting:
>>> api = CloudShellAPISession(QUALI_SERVER, QUALI_USERNAME, QUALI_PASSWORD, QUALI_DOMAIN) >>> asset = api.GetResourceDetails('NEX-3172-A') >>> ipAddress = asset.Address >>> print ipAddress 10.255.138.150 >>> id = asset.UniqeIdentifier >>> print id None
Maybe I'm doing something wrong or a setting isn't set correctly within Resource Manager?
Thanks,
Brian
Answer by briantsaunders · Aug 14, 2017 at 03:41 PM
Still having trouble with this.. I was able to track down the unique identifier here within the web UI:
But when I attempt to extract that unique identifier via the API it still does not return any information. I also attempted to perform a FindResources via the unique identifier but that returned None (maybe I'm doing something wrong). Here's how I'm attempting:
>>> print api <cloudshell.api.cloudshell_api.CloudShellAPISession instance at 0x7fe3d9aba248> >>> api.GetResourceDetails('CAT-3650-A') <cloudshell.api.cloudshell_api.ResourceInfo instance at 0x7fe3d900b7a0> >>> asset = api.GetResourceDetails('CAT-3650-A') >>> ui = asset.UniqeIdentifier >>> print ui None >>> asset.FullAddress '10.255.93.140' >>> findResource = api.FindResources(resourceUniqueIdentifier='c89974c6-60c3-438a-9375-3ff2a176faee') >>> for data in findResource.Resources: ... print data.Address ... None >>>
Hi @briantsaunders,
The code above seems correct and works well when I run it.
Try to refresh the search engine (from the CloudShell Monitor tool, select the Quali Server, then on the right side, select the Search tab and click on the Start button).
If you still don't get results after that, please open a ticket and mention anything you already tried.
Yaniv
Answer by Gary Wilson · Aug 04, 2017 at 02:36 PM
Hi Brian,
Is it a documentation typo? Should it be asset.UniqueIdentifier? Or did you use auto completion in your IDE?
Regards
Gary
That's a good point, I didn't even realize it was mis-spelled (that was taken straight from Quali's API documentation). But attempting w/ your suggestion throws an error:
>>> id = asset.UniqueIdentifier
Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: ResourceInfo instance has no attribute 'UniqueIdentifier' >>>
Answer by Yaniv Kalsky · Aug 04, 2017 at 07:02 PM
Seems like it is a typo in the api package - so you need to keep using it with the typo..
This worked for me:
resource = api.GetResourceDetails(resourceFullPath='resource1')
ui = resource.UniqeIdentifier
Seems like yours @briantsaunders, are you seeing a unique id in the resource manager UI for that resource?
Where within the resource manager UI do I location the unique identifier for a device?
I think it is on the configuration page below the Address field. It is not editable within the UI
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.
Why should the Topology Folder matter for api.ActivateTopology(reservation_id,Blueprint_name) 2 Answers
Is there a way for a driver to obtain a blueprint's "Estimated setup duration" value? 4 Answers
API command to get resource connections? 3 Answers
Has anyone created any Python code for adding a new deployment path to an App? 0 Answers
How do I run commands of resources in a sandbox using the API? 1 Answer