Skip to main content

OpsAny's command-line tool!

Project description

OpsAny’s command-line tool

### model

  • get

  • config

  • api-resource

### 1. 下载

`shell script python3 -m pip install opsanyctl `

### 2. 配置

`shell script # 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. 使用 `shell script # 获取到当前支持的资源类型 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.8.tar.gz (9.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: opsanyctl-0.1.8.tar.gz
  • Upload date:
  • Size: 9.7 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.8.tar.gz
Algorithm Hash digest
SHA256 76f9807865d669aa6e58499dc6a1c9c346e01977ac2fc1441f0ce6bbc0bdac5c
MD5 f96e432157469817b3d30ab8cfccb8bd
BLAKE2b-256 974856276d5f35108ba2fc1ce021ec092751494bbea735f021096b5c3eea8718

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