Skip to main content

OpsAny's command-line tool!

Project description

OpsAny’s command-line tool

### 1. 下载

` python3 -m pip install opsanyctl `

### 2. 配置

` # 1. 获取配置模板 opsctl config # 2. 在家目录创建文件 mkdir /root/.opsanyctl/ # 3. 创建配置文件 修改 url 和 bk_app_secret为OpsAny地址和cmdb的secret_key(开发中心获取https://DOMAIN/saas/cmdb/info/) vim /root/.opsanyctl/config # 4. 可以根据配置修改指定模型的简写 `

### 3. 使用 ` # 获取到当前支持的资源类型 opsctl api-resources # 获取云主机数据 opsctl get CLOUD_SERVER # 获取 云主机 第一页数据 每页5条 opsctl get CLOUD_SERVER -p 1 -l 5 # 获取数据 54586 字段配置文件中可指定 resourceIdDefaultField(为字段后缀 忽略模型code) opsctl get net 54586 `

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opsanyctl-0.1.9.tar.gz (9.6 kB view details)

Uploaded Source

File details

Details for the file opsanyctl-0.1.9.tar.gz.

File metadata

  • Download URL: opsanyctl-0.1.9.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.0

File hashes

Hashes for opsanyctl-0.1.9.tar.gz
Algorithm Hash digest
SHA256 bdd47a67ec997c1b71e7ee2f371e61d47305de60f98dadefd26327a9fb23a8eb
MD5 5a7d9cea94e0e7ca38c94f5db10d8ad2
BLAKE2b-256 d18cfe17261c2f9ff3f9f6d4a74b7d4a7cf5b83dbb9beb001cbfb0b84610ce61

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page