Skip to content

Commit

Permalink
2025年1月24日 CMDB 部分API录入
Browse files Browse the repository at this point in the history
  • Loading branch information
ss1917 committed Jan 24, 2025
1 parent 415370f commit fbaf0d0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 12 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import sys
from distutils.core import setup

VERSION = '1.0.8'
VERSION = '1.0.9'

if sys.version_info < (2, 7) or (3, 0) <= sys.version_info < (3, 6):
print('This program requires at least Python 2.7 or 3.6 to run.')
Expand Down
47 changes: 36 additions & 11 deletions websdk2/apis/cmdb_apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,44 @@
Contact : [email protected]
Author : shenshuo
Date : 2018年2月5日13:37:54
Desc :记录API
Desc :记录 CMDB API
"""


class CMDBAPIS:
cmdb_prefix = "/api/cmdb"
create_jobs = dict(method='GET',
url=f'{cmdb_prefix}/api/v2/cmdb/tag/list/',
params={
'page_number': '1', ### 分页/第几页
'page_size': '200', ### 分页/每页多少个
"tag_key": None
},
field_help={
},
description='CMDB 获取标签key、value列表')

get_tag_list = dict(
method='GET',
url=f'{cmdb_prefix}/api/v2/cmdb/tag/list/',
params={
'page_number': '1', # 分页/第几页
'page_size': '200', # 分页/每页多少个
"tag_key": None
},
description='CMDB 获取标签key、value列表'
)

get_service_tree = dict(method='GET',
url=f'{cmdb_prefix}/api/v2/cmdb/tree/',
params={"biz_id": "0"},
description='获取当前业务服务树')

get_dynamic_groups = dict(method='GET',
url=f'{cmdb_prefix}/api/v2/cmdb/biz/dynamic_group/list/',
params={
"biz_id": ""
},
description='获取当前业务下动态分组')

get_dynamic_group_details = dict(method='GET',
url=f'{cmdb_prefix}/api/v2/cmdb/biz/dynamic_group/preview/',
params={
},
description='获取动态分组详细数据')

get_tree_asset_server = dict(method='GET',
url=f'{cmdb_prefix}/api/v2/cmdb/tree/asset/server',
params={
},
description='根据业务获取资源信息')

0 comments on commit fbaf0d0

Please sign in to comment.