diff --git a/test.py b/test.py deleted file mode 100644 index 29e7497fd..000000000 --- a/test.py +++ /dev/null @@ -1,26 +0,0 @@ -import os -import django - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") -django.setup() - -from apps.backend.subscription.tools import get_instances_by_scope - -scope = { - "bk_biz_id": None, - "object_type": "HOST", - "node_type": "DYNAMIC_GROUP", - "nodes": [ - { - "bk_biz_id": 5, - "bk_group_id": "544a9026-b2b4-11ef-9ead-fa9249cab81d", - } - ], - "need_register": False, - "instance_selector": None, - "with_info": { - "process": False - } -} - -get_instances_by_scope(scope=scope) diff --git a/test2.py b/test2.py deleted file mode 100644 index 8e79cfd85..000000000 --- a/test2.py +++ /dev/null @@ -1,132 +0,0 @@ -import os -import django - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") -django.setup() - -from apps.backend.subscription.tools import get_instances_by_scope - -scope = { - "bk_biz_id": None, - "object_type": "HOST", - "node_type": "INSTANCE", - "nodes": [ - { - "bk_biz_id": 1, - "bk_host_id": 205, - "ip": None - }, - { - "bk_biz_id": 1, - "bk_host_id": 210, - "ip": None - }, - { - "bk_biz_id": 1, - "bk_host_id": 212, - "ip": None - }, - { - "bk_biz_id": 1, - "bk_host_id": 213, - "ip": None - }, - { - "bk_biz_id": 1, - "bk_host_id": 214, - "ip": None - }, - { - "bk_biz_id": 1, - "bk_host_id": 216, - "ip": None - }, - { - "bk_biz_id": 1, - "bk_host_id": 221, - "ip": None - }, - { - "bk_biz_id": 1, - "bk_host_id": 223, - "ip": None - }, - { - "bk_biz_id": 1, - "bk_host_id": 224, - "ip": None - }, - { - "bk_biz_id": 5, - "bk_host_id": 240, - "ip": None - }, - { - "bk_biz_id": 5, - "bk_host_id": 313, - "ip": None - }, - { - "bk_biz_id": 1, - "bk_host_id": 388, - "ip": None - }, - { - "bk_biz_id": 5, - "bk_host_id": 389, - "ip": None - }, - { - "bk_biz_id": 1, - "bk_host_id": 431, - "ip": None - }, - { - "bk_biz_id": 5, - "bk_host_id": 458, - "ip": None - }, - { - "bk_biz_id": 5, - "bk_host_id": 459, - "ip": None - }, - { - "bk_biz_id": 5, - "bk_host_id": 481, - "ip": None - }, - { - "bk_biz_id": 5, - "bk_host_id": 482, - "ip": None - }, - { - "bk_biz_id": 5, - "bk_host_id": 484, - "ip": None - }, - { - "bk_biz_id": 5, - "bk_host_id": 485, - "ip": None - }, - { - "bk_biz_id": 5, - "bk_host_id": 487, - "ip": None - }, - { - "bk_biz_id": 5, - "bk_host_id": 488, - "ip": None - } - ], - "need_register": False, - "instance_selector": None, - "with_info": { - "process": False - } -} - -get_instances_by_scope(scope=scope) diff --git a/test3.py b/test3.py deleted file mode 100644 index 75e6ee4b1..000000000 --- a/test3.py +++ /dev/null @@ -1,30 +0,0 @@ -import os -import django - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") -django.setup() - -from apps.backend.subscription.tools import get_instances_by_scope - -scope = { - "bk_biz_id": 5, - "object_type": "HOST", - "node_type": "DYNAMIC_GROUP", - "nodes": [ - { - "bk_biz_id": 5, - "bk_group_id": "416454dc-b2db-11ef-9ead-fa9249cab81d", - }, - { - "bk_biz_id": 5, - "bk_group_id": "717017fc-b2b4-11ef-9ead-fa9249cab81d", - } - ], - "need_register": False, - "instance_selector": None, - "with_info": { - "process": False - } -} - -get_instances_by_scope(scope=scope) diff --git a/test4.py b/test4.py deleted file mode 100644 index bd6b3c0f9..000000000 --- a/test4.py +++ /dev/null @@ -1,30 +0,0 @@ -import os -import django - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") -django.setup() - -from apps.backend.subscription.tools import get_instances_by_scope - -scope = { - "bk_biz_id": 5, - "object_type": "HOST", - "node_type": "DYNAMIC_GROUP", - "nodes": [ - { - "bk_biz_id": 5, - "bk_group_id": "416454dc-b2db-11ef-9ead-fa9249cab81d", - }, - { - "bk_biz_id": 5, - "bk_group_id": "544a9026-b2b4-11ef-9ead-fa9249cab81d", - } - ], - "need_register": False, - "instance_selector": None, - "with_info": { - "process": False - } -} - -get_instances_by_scope(scope=scope) diff --git a/test5.py b/test5.py deleted file mode 100644 index d9f109b63..000000000 --- a/test5.py +++ /dev/null @@ -1,27 +0,0 @@ -import os -import django - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") -django.setup() - -from apps.backend.subscription.tools import get_instances_by_scope - -scope = { - "bk_biz_id": 5, - "object_type": "SERVICE", - "node_type": "DYNAMIC_GROUP", - "nodes": [ - { - "bk_biz_id": 5, - "bk_obj_id": "host", - "bk_group_id": "544a9026-b2b4-11ef-9ead-fa9249cab81d", - } - ], - "need_register": False, - "instance_selector": None, - "with_info": { - "process": False - } -} - -get_instances_by_scope(scope=scope) diff --git a/test6.py b/test6.py deleted file mode 100644 index 4fcee8ae6..000000000 --- a/test6.py +++ /dev/null @@ -1,32 +0,0 @@ -import os -import django - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") -django.setup() - -from apps.backend.subscription.tools import get_instances_by_scope - -scope = { - "bk_biz_id": 5, - "object_type": "SERVICE", - "node_type": "DYNAMIC_GROUP", - "nodes": [ - { - "bk_biz_id": 5, - "bk_obj_id": "set", - "bk_group_id": "416454dc-b2db-11ef-9ead-fa9249cab81d", - }, - { - "bk_biz_id": 5, - "bk_obj_id": "set", - "bk_group_id": "717017fc-b2b4-11ef-9ead-fa9249cab81d", - } - ], - "need_register": False, - "instance_selector": None, - "with_info": { - "process": False - } -} - -get_instances_by_scope(scope=scope)