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 >.
Kimo Saper suggested an idea (#4562) · May 29, 2019 at 06:41 PM · pythonapiattributes
For Resources, attributes are returned as a list of dict. Each Dict contains 3 keys: Name (of the Attribute), Value (the attribute currently holds) and Type (String, Password, Boolean, & 'Numeric')
Should the type be a Boolean or 'Numeric' the value is of a string type.
Asking that the API make the needed conversion prior to passing it along to the user.
A Boolean Type should return just that to the user - not a string.
And as for 'Numeric' yeah, the shell-definition.yaml says we can have: integer or a float, but that designation gets lost once handed back to us by CloudShell.
EDIT: Added image
Muli Wienrib commented · Jun 02, 2019 at 01:03 PM
Hi Kimo,
Thanks for the suggestion, what is your use case for the return value for an API request, is it intedned for use with third-party automation tools?
You mentioned Integer/Float/Boolean, can you please elaborate what are the use cases for these values?
Kimo Saper commented · Jun 03, 2019 at 08:30 PM
I really don't understand why my use case here is relevant to the discussion of this feature request.
But here you go.
I added to my service, that talks to a cloud provider, the ability for the simulated switch which is deployed to the SDI (software defined infrastructure) to be optionally attached to a pre-defined physical network. It gets and attribute value on the resource which is a defined as boolean, to mark it as attached (or not) to a predefined physical network. If marked then it looks up the value stored for which network to use.
If the value is true, I need to alter the set up so the simulated switch attaches to that network, thus allowing the devices attached to that switch network access outside of the SDI.
In my code I had to write a custom bit of logic to handle the return of that value when the service queries and item in side the sandbox. Even though I defined the custom attribute as a Boolean type in the TOSCA modeling file, CloudShell returns everything as a string.
Same issue may come up with number values, and and while we're allowed to specify the input type in the Yaml file, we lose that granularity when it gets returned by CloudShell. CloudShell flags it as a "numeric" type and give us a string. May I remind you that in python 2/3 and 2.0/3.0 are not the same result.
Example of the Boolean request:
vs. being able to say:
if session.GetAttributeValue(each.Name, att1_name).Value: network_h.build_network_link(n_label=session_GetAttributeValue( each.Name, att2_Name).Value, n_type-'physical') <br>
Edit: Clarity
Muli Wienrib commented · Jun 12, 2019 at 09:39 AM
Hi Kimo,
Thank you for the suggestion, your idea seems interesting for enhanced usage of APIs.
However, considering that this can be solved on the client side, coupled with our desire to maintain backward compatibility of the API, we decided that the idea is currently not planned.
We will follow this idea to see if it gains traction and reconsider our decision accordingly.
Cheers
Kimo Saper commented · Jul 02, 2019 at 08:17 PM
Along the same line the, what is the purpose of being able to in the YAML file to assign an input type, especially with numeric values, only to have that level of control removed? To maintain backward compatibility you could add another field in the return that is 'RawValue' or 'TrueValue' or possible add 2 'YAML Type' & 'YAML Value' for items coming from a Gen2 shell.
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.
Help us make things better. Share your great idea or vote for other people's.
API call for creating a copy of an existing blueprint
Read-only property status of attribute returned with GetResourceDetails API call
sandbox api to return information about next available reservation time
Include conflict details in Python API, CreateImmediateTopologyReservation
add sandbox context component to any blueprint script
API call for moving a blueprint to another folder