{"id":25441207,"url":"https://github.com/workfloworchestrator/orchestrator-shell","last_synced_at":"2026-02-09T08:33:50.596Z","repository":{"id":260426171,"uuid":"880387070","full_name":"workfloworchestrator/orchestrator-shell","owner":"workfloworchestrator","description":"WorkFlow Orchestrator shell to browse database and update subscriptions and subscription instance values","archived":false,"fork":false,"pushed_at":"2025-02-14T20:25:26.000Z","size":142,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-02-14T20:29:39.504Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/workfloworchestrator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-10-29T16:23:14.000Z","updated_at":"2025-02-14T20:19:33.000Z","dependencies_parsed_at":"2024-10-31T09:20:02.860Z","dependency_job_id":"c6bebe09-dfe5-494e-87fc-870f0e287f57","html_url":"https://github.com/workfloworchestrator/orchestrator-shell","commit_stats":null,"previous_names":["workfloworchestrator/wfoshell","workfloworchestrator/orchestrator-shell"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workfloworchestrator%2Forchestrator-shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workfloworchestrator%2Forchestrator-shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workfloworchestrator%2Forchestrator-shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workfloworchestrator%2Forchestrator-shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/workfloworchestrator","download_url":"https://codeload.github.com/workfloworchestrator/orchestrator-shell/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239286457,"owners_count":19613720,"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","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":"2025-02-17T12:20:10.083Z","updated_at":"2026-02-09T08:33:45.575Z","avatar_url":"https://github.com/workfloworchestrator.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# orchestrator_shell\n\nThe orchestrator_shell (WorkFlow Orchestrator Shell) is an interactive shell to navigate\nthrough subscriptions product blocks and resource types, and update\nsubscriptions and resource types directly in the database. The use of the GNU\nReadline interface allows for command completion and history, as wel as command\nline editing and search.\n\nFor various reasons, it sometimes happens that incorrect information ends up in\nthe WFO database. Those who know the database model can of course adjust this\ninformation directly in the database with self-made SQL queries. For those who\nprefer an easy way to navigate through the subscriptions, product blocks and\nresource types to adjust incorrect information, can use the orchestrator_shell.\n\n## Getting started\n\nThe orchestrator_shell is tested with Python version 3.12.\n\nInstall the required Python modules:\n\n```shell\npython -m venv venv\nsource venv/bin/activate\npip install orchestrator-shell\n```\n\nAnd start the shell:\n\n```shell\norchestrator-shell\n```\n\n## Warning\n\nThe shell operates directly on the database, changes made are instantly\ncommitted to the database. While using the shell, try to avoid other write\naccess to the database, or at least limit write access to the information you\nare touching. Also note that none of the information that is updated in the\ndatabase is checked syntactically or in any other way, except for the insync,\nstart_date and end_date subscription fields, these fields will not allow\nsyntactically incorrect values.  Updating information in the database with\nunsupported values may brake things. Use this shell at your own risk.\n\nOnly scalar resource types are supported. All non-scalar resource types are\nshown as `\u003cunset or non-scalar\u003e` while they can have a value in the database.\nOptional yet unset resource types can be assigned a value with the\n`resource_type  update` command, but do not try to update non-scalar resource\ntypes using the orchestrator_shell.\n\n## Usage\n\n### Command overview\n\nThe following commands are supported. Each command has its own help on their\nsubcommands.\n\n```text\n(wfo) help --verbose\n\nDocumented commands (use 'help -v' for verbose/'help \u003ctopic\u003e' for details):\n======================================================================================================\nexit                  Exit the application.\nhelp                  List available commands or provide detailed help for a specific command\nhistory               View, run, edit, save, or clear previously entered commands\nproduct_block         List and select product blocks, show details, or follow depends on and in use by\n                      product blocks.\nquit                  Exit this application\nresource_type         List, select and update resource types, and show details.\nset                   Set a settable parameter or show current settings of parameters\nstate                 Show state summary or details.\nsubscription          List, search or select subscriptions, update fields, and show details.\n```\n\nThe `subscription`, `product_block` and `resource_type` commands are used\nto navigate through the database and update information. All three commands\nhave `list`, `select` and `details` subcommands, and the `subscription`\nand `resource_type` commands have an `update` subcommand. These subcommands\nare used to list the specific type of information, select an item to work with,\nshow more detailed information, and update information in the database. In\naddition, the `subscription` command has a case insensitive `search`\nsubcommand to quickly find a subscription, and the `product_block` command\nhas `depends_on` and `in_use_by` subcommands to navigate through product\nblocks and therewith through subscriptions.\n\n### Configuration\n\nOnly little configuration is needed, and all is done through the shell\nenvironment variables that are shown below together with their defaults:\n\n```text\nDATABASE_URI=postgresql://nwa:nwa@localhost/orchestrator-core\nORCHESTRATOR_SHELL_HISTFILE=~/.orchestrator_shell_history\nORCHESTRATOR_SHELL_HISTFILE_SIZE=1000\n```\n\n### Examples\n\n#### Select subscription to update description\n\nThis example shows how to list and select a subscription, show subscription\ndetails, and update the subscription description. When the description is\ngenerated by a workflow and uses other information like resource types, then\nmake sure to match the description witch the associated information.\n\n```text\n(wfo) subscription list\n0  core link 100G paris-1 ethernet-1/10 \u003c-\u003e ethernet-1/13 amsterdam-1  581a2251-d9cf-4a32-a5d7-1549eb3280e2\n1  node amsterdam-1 (active)                                           bf5dacfa-0e89-4f5e-8b2f-d6e9327b21dc\n2  node paris-1 (active)                                               05b7198c-9d6e-4a97-9a3e-001e337110ee\n3  node rome-1 (active)                                                b19ab933-48d6-4851-9687-41b72c0ab8b6\n4  port 10G paris-1 ethernet-1/5 data center connection                fa6b26ed-fee1-48f6-a6ea-6baf39589be1\n(wfo) subscription select 3\nsubscription  node rome-1 (staged)  b19ab933-48d6-4851-9687-41b72c0ab8b6\n(wfo) subscription details\ndescription       node rome-1 (staged)\nsubscription_id   b19ab933-48d6-4851-9687-41b72c0ab8b6\nstatus            active\nproduct_id        e537723f-6399-4ed3-b7ca-c54db4ff2c2a\ncustomer_id       bcaf232c-2f4c-476c-8c9b-c14542e3607d\ninsync            False\nstart_date        2024-12-03 08:43:40.476615+00:00\nend_date\nnote\nproduct block(s)  0  name            Node\n                     resource types  0  ims_id            3\n                                     1  ipv4_ipam_id      9\n                                     2  ipv6_ipam_id      10\n                                     3  node_description  Rome international exchange\n                                     4  node_name         rome-1\n                                     5  node_status       staged\n                                     6  nrm_id            3555\n                                     7  role_id           2\n                                     8  site_id           5\n                                     9  type_id           7\n(wfo) subscription update insync True\n(wfo)\n```\n\n#### Start with a port to find the node it is on\n\nSearch subscription by description and use the product block command to find\nthe associated node.\n\n```text\n(wfo) subscription search \"port 10g\"\n0  port 10G paris-1 ethernet-1/5 data center connection  fa6b26ed-fee1-48f6-a6ea-6baf39589be1\n(wfo) subscription select 0\nsubscription  port 10G paris-1 ethernet-1/5 data center connection  fa6b26ed-fee1-48f6-a6ea-6baf39589be1\n(wfo) subscription details --product_blocks_only\nproduct block(s)  0  name            Port\n                     resource types  0  auto_negotiation  False\n                                     1  enabled           True\n                                     2  ims_id            12\n                                     3  lldp              False\n                                     4  node              \u003cunset or non-scalar\u003e\n                                     5  nrm_id            33521\n                                     6  port_description  data center connection\n                                     7  port_mode         tagged\n                                     8  port_name         ethernet-1/5\n                                     9  port_type         10gbase-x-xfp\n(wfo) product_block select 0\nsubscription   port 10G paris-1 ethernet-1/5 data center connection  fa6b26ed-fee1-48f6-a6ea-6baf39589be1\nproduct block  Port                                                  2918af3f-7dbb-4408-9fb1-ad71920487bc\n(wfo) product_block details --depends_on_only\ndepends_on  0  name            Node\n               resource types  0  ims_id            2\n                               1  ipv4_ipam_id      5\n                               2  ipv6_ipam_id      6\n                               3  node_description  Paris 1\n                               4  node_name         paris-1\n                               5  node_status       staged\n                               6  nrm_id            47469\n                               7  role_id           2\n                               8  site_id           2\n                               9  type_id           5\n(wfo) product_block depends_on 0\nsubscription   node paris-1 (active)  05b7198c-9d6e-4a97-9a3e-001e337110ee\nproduct block  Node                   d097cf20-9c4c-4ba8-9008-701841933a45\n(wfo)\n```\n\n#### Select a resource type to update its value\n\nSelect a resource types on the currently selected product block to update its\nvalue.  New values are not syntactically checked. Any relation that this\nresource type has with other information in the WFO database or any related\nexternal administration, should eventually match the new value to avoid\nunexpected results using the WFO.\n\n```text\n(wfo) state summary\nsubscription   node paris-1 (active)  05b7198c-9d6e-4a97-9a3e-001e337110ee\nproduct block  Node                   d097cf20-9c4c-4ba8-9008-701841933a45\n(wfo) resource_type list\n0  ims_id            2\n1  ipv4_ipam_id      5\n2  ipv6_ipam_id      6\n3  node_description  Paris 1\n4  node_name         paris-1\n5  node_status       staged\n6  nrm_id            47469\n7  role_id           2\n8  site_id           2\n9  type_id           5\n(wfo) resource_type select 5\nsubscription   node paris-1 (active)  05b7198c-9d6e-4a97-9a3e-001e337110ee\nproduct block  Node                   d097cf20-9c4c-4ba8-9008-701841933a45\nresource_type  node_status            75cc0264-f3f1-49ba-94ad-4bc0b96a5834\n(wfo) resource_type update active\n(wfo) resource_type details\nresource_type                   node_status\nvalue                           active\nsubscription_instance_value_id  75cc0264-f3f1-49ba-94ad-4bc0b96a5834\nsubscription_instance_id        d097cf20-9c4c-4ba8-9008-701841933a45\nresource_type_id                87a1523a-55d7-4431-804e-c70143330083\n(wfo)\n```\n\n## Development\n\nInstall a Python venv as described at the top of this file, then run the following:\n```shell\npip install flit\nflit install --deps develop --symlink --python venv/bin/python\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkfloworchestrator%2Forchestrator-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkfloworchestrator%2Forchestrator-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkfloworchestrator%2Forchestrator-shell/lists"}