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 >.
import requests import json import time class Rest_api_client(): def __init__(self): self.login() def login(self): login_url = 'http://localhost:82/api/login' login_data = { "username": "<Cloudshell user name>", "password": "<Cloudshell password>", "domain": "Global" } self.rest_session = requests.session() login_out = self.rest_session.put( url=login_url, json=login_data ) token = login_out.content[1:-1] self.rest_session.headers.update({ "Authorization": "Basic {}".format(token) }) def get_all_sandboxes(self): ''' :param requests.Session rest_session: :return: ''' base_url = 'http://localhost:82/api/v2' get_sandboxes_url = '/sandboxes' get_sandboxes_params = { "show_historic": "true" } all_sandboxes = self.rest_session.get( url = base_url + get_sandboxes_url, params=get_sandboxes_params ) return all_sandboxes def get_sandboxes_from_blueprint(self, sandboxes, blueprint_id): relevant_sandboxes = [] for sandbox in sandboxes: sandbox_blueprint = sandbox.get('blueprint') if sandbox_blueprint: sandbox_blueprint_id = sandbox_blueprint.get('id') if sandbox_blueprint_id == blueprint_id: relevant_sandboxes.append(sandbox) return relevant_sandboxes def get_sandbox_activity_feed(self, sandbox): ''' :param requests.Session rest_session: :param sandbox: :return: ''' base_url = 'http://localhost:82/api/v2' af_url = '/sandboxes/{sandbox_identifier}/activity'.format(sandbox_identifier=sandbox.get('id')) af_params = { "error_only": "true" } sb_af = self.rest_session.get( url=base_url + af_url, params=af_params ) sb_af_json = json.loads(sb_af.content) return sb_af_json def get_af_error_digest(self, sandboxes_from_blueprint): report = '' for sb in sandboxes_from_blueprint: my_af = self.get_sandbox_activity_feed(sb) report += 'Report for Sandbox with ID {} :'.format(sb.get('id')) report += '\n\n' events = my_af.get('events') if events: for event in events: report += event.get('event_text') report += '\n' report += '\n' return report blueprint_id = '<blueprint ID goes here>' rest_session = Rest_api_client() all_sbs = json.loads(rest_session.get_all_sandboxes().content) sandboxes_from_blueprint = rest_session.get_sandboxes_from_blueprint(all_sbs, blueprint_id) report = rest_session.get_af_error_digest(sandboxes_from_blueprint) print report
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.
Script to deploy Vcenter template 1 Answer
How do you delete a sandbox over the REST API v2? 1 Answer
Setup takes too much time and not finished 2 Answers
Taking action when resource is added or removed from blueprint 1 Answer
Is there a way for a driver to obtain a blueprint's "Estimated setup duration" value? 4 Answers