Package: python-ucp-cli
A CLI for Docker UCPInstallationRun the following to install:$ pip install python-ucp-cliReferences:Reference:https://docs.docker.com/ee/ucp/user-access/cli/Get StartedFor usage and help content, pass in the--helpparameter, for example:$ucp-cli--help

Usage:ucp-cli[OPTIONS]COMMAND[ARGS]...

Options:--helpShowthismesageandexitCommands:envloginorgteamuserShort login one-liner$ucp-clilogin--usernameuser1--password--urlucp-manager.local&&eval$(ucp-clienv)Detailed login example$pipinstallpython-ucp-cli
...
$ucp-clilogin--usernameuser1--passwordpassword--urlucp-manager.local
LoginSucceeded

$ls-R~/.ucp
/home/user/.ucp:
bundlebundle.zipconfig.json

/home/user/.ucp/bundle:
ca.pemcert.pemcert.pubenv.cmdenv.ps1env.shkey.pemkube.yml

$eval$(ucp-clienv)~
Cluster"ucp_ucp-manager.local:6443_user1"set.
User"ucp_ucp-manager.local:6443_user1"set.
Context"ucp_ucp-manager.local:6443_user1"created.
~
$dockernodels
IDHOSTNAMESTATUSAVAILABILITYMANAGERSTATUSENGINEVERSION1nsupdtjmsfsndvm7rsg52choucp-manager.localReadyActive18.09.0

$kubectlgetnode
NAMESTATUSROLESAGEVERSION
ucp-manager.localReadymaster103dv1.11.5-docker-4Manage users, teams and organizations$ucp-cliuser--help

Usage:ucp-cliuser[OPTIONS]COMMAND[ARGS]...

Options:--helpShowthismessageandexit.

Commands:createdeletelistshow$ucp-cliuserlist{"name":"user1","id":"244a07da-1392-4d43-936a-5313ad0d2ff8","fullName":"","isOrg":false,"isAdmin":false,"isActive":true,"isImported":false},{"name":"user2","id":"a7d432be-4bb1-4c6b-b5ff-6bcfab04ebfb","fullName":"","isOrg":false,"isAdmin":false,"isActive":true,"isImported":false},{"name":"user3","id":"b50ebff2-0d54-4dae-b03b-65e0b007a631","fullName":"","isOrg":false,"isAdmin":false,"isActive":true,"isImported":false}],"usersCount":3,"orgsCount":3,"nextPageStart":"","resourceCount":10}Create a user$ucp-cliusercreate--nameuser4--passwordP@ssw0rdShow user details$ucp-cliusershow--nameuser3{"name":"user3","id":"b50ebff2-0d54-4dae-b03b-65e0b007a631","fullName":"","isOrg":false,"isAdmin":false,"isActive":true,"isImported":false}Delete a user$ucp-cliuserdelete--nameuser3Manage organizationsucp-cliorgUsage:ucp-cliorg[OPTIONS]COMMAND[ARGS]...

Options:--helpShowthismessageandexit.

Commands:createdeletelistmembershowList organizations$ucp-cliorglist{"accounts":[{"name":"conoa","id":"a9a34cb4-8b5e-45c4-af3e-6c68c33662d6","fullName":"","isOrg":true,"membersCount":1,"teamsCount":1},{"name":"docker-datacenter","id":"5617e97d-cea6-456c-8adc-d540696529de","fullName":"Docker Datacenter","isOrg":true,"membersCount":5,"teamsCount":0},{"name":"kenneth","id":"2ae7eee8-597b-489c-af9a-ae1722adb5c2","fullName":"","isOrg":true,"membersCount":1,"teamsCount":1}],"usersCount":6,"orgsCount":3,"nextPageStart":"","resourceCount":9}Create organization and view details$ucp-cliorgcreate--nameneworg1$ucp-cliorgshow--nameneworg1{"name":"neworg1","id":"812d6278-d73a-47d4-8320-f395e87cbd79","fullName":"","isOrg":true,"membersCount":0,"teamsCount":0}List organization members$ucp-cliorgmemberlist--orgkenneth{"members":[{"member":{"name":"alex","id":"2a1f2531-7902-4d79-b11c-6dee6242ca18","fullName":"","isOrg":false,"isAdmin":false,"isActive":true,"isImported":false},"isAdmin":false}],"nextPageStart":"","resourceCount":1}Manage teams$ucp-cliteamUsage:ucp-cliteam[OPTIONS]COMMAND[ARGS]...

Options:--helpShowthismessageandexit.

Commands:createdeletelistmembershow$ucp-cliteamlist--orgkenneth{"teams":[{"orgID":"2ae7eee8-597b-489c-af9a-ae1722adb5c2","name":"dev","id":"9cf63dce-6f7c-4144-88d1-bbca2af29737","description":"","membersCount":1}],"nextPageStart":"","resourceCount":1}Create team and add member$ucp-cliteamcreate--orgkenneth--namedevops$ucp-cliteamlist--orgkenneth{"teams":[{"orgID":"2ae7eee8-597b-489c-af9a-ae1722adb5c2","name":"dev","id":"9cf63dce-6f7c-4144-88d1-bbca2af29737","description":"","membersCount":1},{"orgID":"2ae7eee8-597b-489c-af9a-ae1722adb5c2","name":"devops","id":"d00d68e3-3e30-4343-b1f1-3deee1182176","description":"","membersCount":0}],"nextPageStart":"","resourceCount":2}$ucp-cliteammemberlist--orgkenneth--teamdevops{"members":[],"nextPageStart":"","resourceCount":0}$ucp-cliteammemberlist--orgkenneth--teamdevops{"members":[],"nextPageStart":"","resourceCount":0}$ucp-cliteammemberadd--nameuser1--teamdevops--orgkenneth{"member":{"name":"user1","id":"244a07da-1392-4d43-936a-5313ad0d2ff8","fullName":"","isOrg":false,"isAdmin":false,"isActive":true,"isImported":false},"isAdmin":false}CompatibilityThis project is currently tested with Docker EE UCP 3.1.4.https://docs.docker.com/ee/ucp/release-notes/