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 >.
There are two methods for logging from drivers - cloudshell.networking.devices.driver_helper.get_logger_with_thread_id() and cloudshell.core.logger.qs_logger.get_qs_logger(). The Dev Guide recommends get_qs_logger(), but I see both methods used in Quali’s drivers. Which is the recommended method and why?
Answer by Yaniv Kalsky · Oct 11, 2017 at 08:20 PM
Hi @jim.pfleger.vz,
The qs_logger is a good solution for most cases, it's thread-safe and lock-safe and is using the python's logging package.
In some cases, like with the drivers you saw, we use another wrapper, that basically uses the get_qs_logger and allows adding the thread name to the log information.
This is useful mostly for drivers that support concurrent commands (the option under Resource Manager/Families/Model/Drivers). In such drivers, it will be hard to follow the log file if several commands are executed simultaneously, so we add the thread name to each line in the log.
So instead of seeing such lines in the log:
2017-01-31 16:44:39,947 [INFO]: vCenterShell.VMware_vCenter command_wrapper - get_py_service_connection Creating a new connection.
You'll see this (note the Thread-5):
2017-10-11 12:49:42,325 [INFO]: QS.cisco_ios_router1.Thread-5 driver - get_inventory Autoload started
So, if you're not going to support concurrent commands, it's fine to use the get_qs_logger.
Yaniv
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.
Dynamic List Option on Python Resource Driver 1 Answer
Show active snapshot name in Get Snapshot driver output? 0 Answers
Layer 1 driver (shell) template / example / documentation ? 9 Answers
Authoring Resource driver writing to a text file (or not when in production) 6 Answers
L1 Driver login/map commands not called on Reservation Start 3 Answers