{"id":16139397,"url":"https://github.com/networkop/airctl","last_synced_at":"2025-04-06T17:43:15.338Z","repository":{"id":83589954,"uuid":"373305151","full_name":"networkop/airctl","owner":"networkop","description":null,"archived":false,"fork":false,"pushed_at":"2021-06-23T15:11:42.000Z","size":394,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-12T23:45:05.125Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/networkop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-06-02T21:16:57.000Z","updated_at":"2023-06-03T16:37:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"3fbd16a2-c3df-4d0a-9802-7fc72dcc48ad","html_url":"https://github.com/networkop/airctl","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networkop%2Fairctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networkop%2Fairctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networkop%2Fairctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networkop%2Fairctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/networkop","download_url":"https://codeload.github.com/networkop/airctl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526675,"owners_count":20953141,"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":"2024-10-09T23:48:56.387Z","updated_at":"2025-04-06T17:43:15.312Z","avatar_url":"https://github.com/networkop.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unofficial CLI client for air.nvidia.com\n\n## Installation\n\nTo install the latest stable version run:\n\n```\ncurl -L https://github.com/networkop/airctl/releases/latest/download/airctl_linux_x86_64.tar.gz | tar -zxvf - -C ~/.local/bin\n```\n\n### Build from source \n\nThis comman will install the latest version from the `main` branch:\n```\n$ go install github.com/networkop/airctl@latest\n$ ls ~/go/bin/airctl\n/home/user/go/bin/airctl\n```\n\n\n## Usage\n\n```\n\n### airctl defines a number of top-level verbs allowing interaction with platform resources\n\n$ airctl\nunofficial CLI client for air.nvidia.com\n\nUsage:\n  airctl [command]\n\nAvailable Commands:\n  get         Display one or many resources\n  set         Update existing resources\n  create      Create a resource from a file\n  delete      Delete resources by name or ID\n  login       Authenticate with air.nvidia.com\n  help        Help about any command\n\nFlags:\n  -d, --debug     Enable debug-level logging\n  -h, --help      help for airctl\n  -v, --version   version for airctl\n\nUse \"airctl [command] --help\" for more information about a command.\n\n\n### Let's try to login\n\n$ airctl login bla \nLogin Failed\n\n\n### This time with the correct token\n\n$ airctl login eyJ0eXAiOiJK...\nAuthentication successful\n\n\n### Let's see what trainings we've got available\n\n$ airctl get training \n+---------------------------------+--------------------------------------+--------+\n| NAME                            | SIM ID                               | PUBLIC |\n+---------------------------------+--------------------------------------+--------+\n| Cumulus Linux Test Drive        | 66aa0e94-e9f2-4bc7-af3a-caa9e67390c0 | false  |\n| NVIDIA SONiC Virtual Test Drive | d79b7690-572e-495f-b03e-08027fcc54e0 | false  |\n| SONiC Spines                    | 22be8551-6eff-48cf-8672-8fdac9023dde | true   |\n| SONiC Demo                      | f5fa7bf6-6922-4ebd-a133-68e682f96a0b | true   |\n| Academy ILT                     | 48732f95-43ea-4f42-af42-8c4ef50bf7a3 | false  |\n+---------------------------------+--------------------------------------+--------+\n\n\n### Currently there are no sims running\n\n$ airctl get sim \n+------+----+-------+\n| NAME | ID | STATE |\n+------+----+-------+\n+------+----+-------+\n\n\n### This is how you would create a sim\n\n$ airctl create sim \nError: Either simID or topoID must be provided\nUsage:\n  airctl create sim [flags]\n\nFlags:\n  -c, --citc          Create a citc sim\n  -h, --help          help for sim\n  -s, --sim string    ID of an existing sim to clone\n  -t, --topo string   ID of an existing topo to create\n\nGlobal Flags:\n  -d, --debug   Enable debug-level logging\n\nEither simID or topoID must be provided\n\n\n### Let's create a sim based off the Cumulus Linux Test Drive training\n\n\n$ airctl create sim -s 66aa0e94-e9f2-4bc7-af3a-caa9e67390c0 \n8f1740ac-eeb9-4b88-8e54-70ac2468c314\n$ airctl get sim \n+------+--------------------------------------+---------+\n| NAME | ID                                   | STATE   |\n+------+--------------------------------------+---------+\n|      | 8f1740ac-eeb9-4b88-8e54-70ac2468c314 | LOADING |\n+------+--------------------------------------+---------+\n\n\n### Now let's create a CITC sim\n\n$ airctl create sim -c \n01bed997-9eec-40c8-8f5e-56c6b1f30ab8\n\n\n### Now we have 2 sims\n\n$ airctl get sim \n+------+--------------------------------------+---------+\n| NAME | ID                                   | STATE   |\n+------+--------------------------------------+---------+\n|      | 01bed997-9eec-40c8-8f5e-56c6b1f30ab8 | LOADING |\n|      | 8f1740ac-eeb9-4b88-8e54-70ac2468c314 | LOADED  |\n+------+--------------------------------------+---------+\n\n\n### For each sim we can view more details\n\n$ airctl get sim 8f1740ac-eeb9-4b88-8e54-70ac2468c314 \n{\n        \"name\": \"\",\n        \"id\": \"8f1740ac-eeb9-4b88-8e54-70ac2468c314\",\n        \"url\": \"https://air.nvidia.com/api/v1/simulation/8f1740ac-eeb9-4b88-8e54-70ac2468c314/\",\n        \"state\": \"LOADED\",\n        \"title\": \"NVIDIA Cumulus Linux Test Drive\",\n        \"services\": []\n}\n\n\n### Now let's see how to create a service\n\n$ airctl create sim -h\nCreate simulation from topology or another sim\n\nUsage:\n  airctl create sim [flags]\n\nFlags:\n  -c, --citc          Create a citc sim\n  -h, --help          help for sim\n  -s, --sim string    ID of an existing sim to clone\n  -t, --topo string   ID of an existing topo to create\n\nGlobal Flags:\n  -d, --debug   Enable debug-level logging\n\n\n### Currently only SSH service is supported\n\n$ airctl create svc -n my-ssh -s 8f1740ac-eeb9-4b88-8e54-70ac2468c314 oob-mgmt-server:eth0 \ncbc1bc4c-44fa-418f-b9a8-de46959075ef\n\n\n### Here are the details for all services\n\n$ airctl get svc \n+--------+--------------------------------------+--------------------------------------------------------------------------------+------+---------------------------------------------+\n| NAME   | ID                                   | SIM                                                                            | TYPE | LINK                                        |\n+--------+--------------------------------------+--------------------------------------------------------------------------------+------+---------------------------------------------+\n| my-ssh | cbc1bc4c-44fa-418f-b9a8-de46959075ef | https://air.nvidia.com/api/v1/simulation/8f1740ac-eeb9-4b88-8e54-70ac2468c314/ | ssh  | ssh://cumulus@worker04.air.nvidia.com:27017 |\n+--------+--------------------------------------+--------------------------------------------------------------------------------+------+---------------------------------------------+\n\n\n### The link can be used with the standard ssh client\n\n$ ssh ssh://cumulus@worker04.air.nvidia.com:27017\nThe authenticity of host '[worker04.air.nvidia.com]:27017 ([147.75.49.29]:27017)' can't be established.\nECDSA key fingerprint is SHA256:2gi+bqJHFCZw1IefBtUdXuAIp7XERPuJ4vyom+CsZhg.\nAre you sure you want to continue connecting (yes/no/[fingerprint])? ^C\n\n\n### Each sim can be paused or unpaused\n\n$ airctl set sim -h\nSet the state of a simulation\n\nUsage:\n  airctl set sim ( ID | Name ) up | down [flags]\n\nFlags:\n  -h, --help   help for sim\n\nGlobal Flags:\n  -d, --debug   Enable debug-level logging\n\n\n### Let's pause one of the sims\n\n$ airctl set sim 8f1740ac-eeb9-4b88-8e54-70ac2468c314 down     \n\n\n###  Note the change in the status\n\n$ airctl get sim \n+------+--------------------------------------+---------+\n| NAME | ID                                   | STATE   |\n+------+--------------------------------------+---------+\n|      | 01bed997-9eec-40c8-8f5e-56c6b1f30ab8 | LOADING |\n|      | 8f1740ac-eeb9-4b88-8e54-70ac2468c314 | STORED  |\n+------+--------------------------------------+---------+\n\n\n### We can also delete all of the resources in one go\n\n\n$ airctl del sim $(airctl get sim -q) \n$ airctl get sim \n+------+----+-------+\n| NAME | ID | STATE |\n+------+----+-------+\n+------+----+-------+\n\n\n### However services are not cleaned up\n\n$ airctl get svc \n+--------+--------------------------------------+--------------------------------------------------------------------------------+------+---------------------------+\n| NAME   | ID                                   | SIM                                                                            | TYPE | LINK                      |\n+--------+--------------------------------------+--------------------------------------------------------------------------------+------+---------------------------+\n| my-ssh | cbc1bc4c-44fa-418f-b9a8-de46959075ef | https://air.nvidia.com/api/v1/simulation/8f1740ac-eeb9-4b88-8e54-70ac2468c314/ | ssh  | ssh://cumulus@$host:27017 |\n+--------+--------------------------------------+--------------------------------------------------------------------------------+------+---------------------------+\n\n\n### Most of the get/set/delete operations accept both ID and name\n\n$ airctl del svc my-asd \nCould not find a match for my-asd\n\n\n### If name doesn't match, you'll get an error\n\n$ airctl del svc my-ssh \ncbc1bc4c-44fa-418f-b9a8-de46959075ef\n\n\n### Otherwise the ID of the deleted service is returned and now they're all gone\n\n$ airctl get svc \n+------+----+-----+------+------+\n| NAME | ID | SIM | TYPE | LINK |\n+------+----+-----+------+------+\n+------+----+-----+------+------+\n```\n\n\n## Login Token\n\nAt this point the token can only be extracted from one of the existing web UI API calls and needs to be refreshed ever 24h.\n\n![](token.jpg)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetworkop%2Fairctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetworkop%2Fairctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetworkop%2Fairctl/lists"}