{"id":20237700,"url":"https://github.com/qualisystems/cloudshell-shell-pdu-standard","last_synced_at":"2025-08-20T06:06:59.545Z","repository":{"id":217886031,"uuid":"743967270","full_name":"QualiSystems/cloudshell-shell-pdu-standard","owner":"QualiSystems","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-08T15:49:14.000Z","size":126,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-08T02:07:54.697Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QualiSystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.htm","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-16T11:13:08.000Z","updated_at":"2024-01-18T14:04:39.000Z","dependencies_parsed_at":"2024-11-14T08:39:23.650Z","dependency_job_id":null,"html_url":"https://github.com/QualiSystems/cloudshell-shell-pdu-standard","commit_stats":null,"previous_names":["qualisystems/cloudshell-shell-pdu-standard"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/QualiSystems/cloudshell-shell-pdu-standard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QualiSystems%2Fcloudshell-shell-pdu-standard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QualiSystems%2Fcloudshell-shell-pdu-standard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QualiSystems%2Fcloudshell-shell-pdu-standard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QualiSystems%2Fcloudshell-shell-pdu-standard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QualiSystems","download_url":"https://codeload.github.com/QualiSystems/cloudshell-shell-pdu-standard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QualiSystems%2Fcloudshell-shell-pdu-standard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271273961,"owners_count":24730897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T08:28:23.334Z","updated_at":"2025-08-20T06:06:59.497Z","avatar_url":"https://github.com/QualiSystems.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/QualiSystems/devguide_source/raw/master/logo.png\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n\n\n\n# PDU Shell Standard\n\n[![codecov](https://codecov.io/gh/QualiSystems/cloudshell-shell-pdu-standard/branch/master/graph/badge.svg)](https://codecov.io/gh/QualiSystems/cloudshell-shell-pdu-standard)\n[![PyPI version](https://badge.fury.io/py/cloudshell-shell-pdu-standard.svg)](https://badge.fury.io/py/cloudshell-shell-pdu-standard)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)\n\n\n\n#### Version 2.0.1\n\n\n## Introduction\nThe PDU Shell Standard is a project used to define a standard for all PDU Shells that integrate with CloudShell. The standard defines the Shell’s data model, commands and a set of guidelines that should be followed in the PDU Shells development and customization.\n\n\n\n## Revision History\n\nVersion | Date | Notes\n--- | --- | ---\n2.0.1 | 2017-07-03 | Added a \"Model Name\" attribute on the root resource\n2.0.0 | 2017-01-23 | Changed the type of the following attributes to \"Password\": \"SNMP Read Community\", \"SNMP Write Community\" and \"SNMP V3 Password\". This change is NOT backwards compatible\n1.1.0 | 2016-08-25 | 1. Removed the Power Managed Device family from the standard. For a generic resource with a power port please refer to the Resource standard (generic Shell). 2. Attributes which aren't user-input changed from being read-only to having the rule \"Admin only\" enabled. 3. Behavior of setting the resource live status on poewr on/off/cycle was clarified in the commands notes section.\n1.0.0 | 2016-07-04 | First release of the PDU Shell Standard\n\n\n## Definitions\n### Granularity\nA PDU Shell should support all PDU devices of the same Vendor. For example, a correct shell granularity will be “Raritan PDU” and not “Raritan PDU PX2”.\n\n### Specific Models Certification\nEach release Shell should have a list of certified models. Model certification can be done only by Quali’s engineering, and validates that all the Shell’s capabilities are working for a specific model.\nThe Shell should also work for non-certified models, and in case some gaps are found a new version of the Shell will be released with the gaps addressed and the model certified.\n\n### Generic Data Model\nAll PDU Shells share the same generic data model, except the model of the root level which is different per each Shell. The data model shouldn’t be modified.\nThe attributes associated with those generic models are also shared by all networking Shells and their values are populated by the driver. It is allowed to add custom attributes to any resource level, and it isn’t allowed to remove attributes from any level.\n\n### Versioning\nThe shell version follows Semantic Versioning Guidelines (see details in http://semver.org). In short, the version structure is Major.Minor.Patch, for example “1.0.2”. A Path version is promoted when making backward-compatibility bug fixes, a Minor version is promoted when adding functionality in a backwards-compatible manner and a  Major version is promoted when making a backwards incompatible changes.\n\n### Dependencies\nIn case the  shell is written in Python and has dependencies to Python packages (that follow Semantic Versioning Guidelines) the dependency should be to a range of Patch versions, for example to “cloudshell-pdu-raritan 2.1.X”.\nThe dependency to cloudshell-automation-api will be to the latest Patch version (cloudshell-automation-api package version is of the format “CloudShell_Version.X”, for example 7.0.X”).\n\n\n\n## Data Model Structure\n### Families \u0026 Models\nThe PDU Shell Standard supports PDUs with power sockets.\n\n\n#### PDU Data Model\n- PDU\n  - Power Socket\n\n##### Example:\n\n- Family: PDU, Model: Raritan PDU\n  - Family: Power Socket, Model: Generic Power Socket\n\n\nIn order for the PDU shell to be used correctly within CloudShell both the PDU and devices connected to the PDU should be modeled in CloudShell, and the PDU sockets should be defined as “physically connected” to the devices power ports. Once this configuration is in place the devices connected to the PDU will get the “Power On”, “Power Off” and “Power Cycle” commands and those commands will be applicable on the power ports. The power ports can be defined on any type of device (for example, a networking device). The PDU shell comes with an OOB power managed device model that can be used to model in CloudShell a device connected to the PDU via a power port.\n\n\n\n#### Family Rules\nThe following CloudShell family rules are enabled per family in the data model:\n\nFamily | Rules\n--- | ---\nPDU | Searchable, IsPowerSwitch\nPower Socket | Searchable, Connectable, Locked By Default\n\n#### Resource Name and Address\nFamily | Model | Resource Name | Resource Address\n--- | --- | --- | ---\nPDU | [Vendor] PDU | (user defined) | Searchable\nPower Socket | Generic Power Socket | (name in device) | (name in device)\n\n\n## Attributes\n#### Guidelines\n- Attributes which aren’t relevant to a device won’t be populated by the driver.\n- All attributes which aren't user-input should have the rule \"Admin only\" enabled.\n- The attribute rules are as follows - all attributes which are user input should have the rule \"Configuration\" enabled, all attributes which aren't user input should have the rules \"Settings\" and \"Available For Abstract Resources\" enabled.\n- It is possible to customize the attribute rules selection after importing the Shell to CloudShell.\n- Attributes shouldn’t be removed.\n- Custom attributes can be added to any resource level.\n- All attributes are of type String unless mentioned otherwise\n- Attributes associated with the family level can't be changed in the shelldefinition.yaml of the shell and are commonly used in abstract resources.\n\n##### [Vendor] PDU\n\nAttribute Name | Details | User input? | Family Attribute?\n--- | --- | --- | ---\nUser | User with administrative privileges | Yes | No\nPassword | Attribute of type Password | Yes | No\nFirmware Version | | No | No\nVendor | | No | Yes\nModel | | No | Yes\nSNMP Read Community | Attribute of type Password | Yes | No\nSNMP Write Community | Attribute of type Password | Yes | No\nSNMP V3 User | | Yes | No\nSNMP V3 Password | Attribute of type Password | Yes | No\nSNMP V3 Private Key | | Yes | No\nSNMP Version | Possible values – v1, v2c, v3 | Yes | No\nConsole Server IP Address | | Yes | No\nConsole User | | Yes | No\nConsole Port | Attributes of type Numeric | Yes | No\nConsole Password | Attribute of type Password | Yes | No\nCLI Connection Type | Attribute of type Lookup. Possible values – Auto, Console, SSH, Telnet, TCP | Yes | No\nSessions Concurrency Limit | Numeric, default is 1 (no concurrency) | Yes | No\nModel Name | Attribute of type String. Automatically populated model name that will be presented in the Sandbox diagram | No | Yes\n\n\n#####  Generic Power Socket\n\nNo Attributes\n\n\n## Commands\nThe following chapter describes the list of commands that needs to be supported by the shell. It includes command name, parameters and description of the functionality.\n\n**Interface Implementation** - When creating a new shell according to the standard it is OK not to implement all commands and/or implement additional command, but a command with a functionality that fits one of the predefined list commands should be implemented according to the standard.\n\n**Error Handling**: Command outputs: On failure an exception containing the error will be thrown and the command will be shown as failed. A failure is defined as any scenario in which the command didn’t complete its expected behavior, regardless if the issue originates from the command’s input, device or the command infrastructure itself. On success the command will just return as passed with no output.\n\n\n### Get Inventory (Shell Autoload)\n```python\ndef get_inventory(self, context)\n```  \n###### Description\nThis function queries the device, discovers it's specification and autoloads it into CloudShell. When a new resource is created, CloudShell asks the user to specify some user inputs (i.e user name \u0026 password) and then it calls the get_inventory function.\n\nThe standard recommended way of communicating and discovering the device should be via SNMP protocol.\n\n\n###### Display Name\nSystem command, it has no display name.\n\n\n\n###### Parameters\nInput / Output | Parameter | Data Type | Required | Description\n--- | --- | --- | --- | ---\nInput | context | object | system parameter | object of type AutoLoadCommandContext which includes API connectivity details and the details of the resource including attributes that the user entered during the resource creation.\nOutput | AutoLoadDetails | object | Yes | object of type AutoLoadDetails which the discovered resource structure and attributes.\n\n\n\n\n\n## Power Commands\n  In CloudShell users can trigger a power commands directly from the power managed resource, doing that implicitly triggers the command execution on the PDU.\n\n  To enable this feature, power commands must include the 'power' tag.\n\n  ```xml\n  \u003cDriver Name=\"SamplePowerDriver\" Version=\"1.0.0\" MainClass=\"SamplePowerDriver.SamplePowerDriver\" Description=\"\"\u003e\n    \u003cLayout\u003e\n      \u003cCategory Name=\"Power\"\u003e\n        \u003cCommand Name=\"PowerOn\" Description=\"\" Tags=\"power\"\u003e\u003c/Command\u003e\n        \u003cCommand Name=\"PowerOff\" Description=\"\" Tags=\"power\"\u003e\u003c/Command\u003e\n        \u003cCommand Name=\"PowerCycle\" Description=\"\" Tags=\"power\"\u003e\u003c/Command\u003e\n      \u003c/Category\u003e\n    \u003c/Layout\u003e\n  \u003c/Driver\u003e\n  ```  \n\n\n### Power On\n```python\ndef PowerOn(context, ports):     \n```  \n###### Description\nStarts the power for the selected socket.\n\n###### Notes\nThis command sets the live status of the resource connected to the PDU to \"Online\" with description \"Resource powered on\".\n\n###### Display Name\nPower On  \n\n###### Parameters\nInput / Output | Parameter | Data Type | Required | Description\n--- | --- | --- | --- | ---\nInput | context | object | system parameter  | object of type ResourceRemoteCommandContext the details of the resource that triggered the power command.\nInput | ports | list[string] | system parameter | This parameter includes the power socket ports that the resource is connected to.\n\n\n\n\n### Power Off\n```python\ndef PowerOff(context, ports):     \n```    \n###### Description\nStops the power for the selected socket.\n\n###### Notes\nThis command sets the live status of the resource connected to the PDU to \"Offline\" with description \"Resource powered off\".\n\n###### Display Name\nPower Off  \n\n###### Parameters\nInput / Output | Parameter | Data Type | Required | Description\n--- | --- | --- | --- | ---\nInput | context | object | system parameter  | object of type ResourceRemoteCommandContext the details of the resource that triggered the power command.\nInput | ports | list[string] | system parameter | This parameter includes the power socket ports that the resource is connected to.\n\n\n\n\n### Power Cycle\n```python\ndef PowerCycle(context, ports, delay):     \n```  \n###### Description\nStops and then starts the power for the selected socket.   - CLI based\n\n###### Notes\nThis command sets the live status of the resource connected to the PDU to \"Online\" with description \"Resource powered on\".\n\n###### Display Name\nPower Cycle\n\n###### Parameters\nInput / Output | Parameter | Data Type | Required | Description\n--- | --- | --- | --- | ---\nInput | context | object | system parameter  | object of type ResourceRemoteCommandContext the details of the resource that triggered the power command.\nInput | ports | list[string] | system parameter | This parameter includes the power socket ports that the resource is connected to.\nInput | delay | string | No |  Optional. If kept empty the default from the The value here should be a positive integer and defines the wait time between the power off and power on. If left empty the default from the device will be used.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqualisystems%2Fcloudshell-shell-pdu-standard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqualisystems%2Fcloudshell-shell-pdu-standard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqualisystems%2Fcloudshell-shell-pdu-standard/lists"}