azure-cli-diff-tool 0.0.8__tar.gz → 0.0.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/PKG-INFO +6 -2
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/azure_cli_diff_tool/__init__.py +1 -1
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/azure_cli_diff_tool/_const.py +1 -1
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/azure_cli_diff_tool/data/meta_change_whitelist.txt +4 -3
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/azure_cli_diff_tool/meta_change_detect.py +17 -5
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/azure_cli_diff_tool.egg-info/PKG-INFO +6 -2
- azure_cli_diff_tool-0.0.9/azure_cli_diff_tool.egg-info/requires.txt +2 -0
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/setup.py +1 -1
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/tests/test_break_change.py +10 -1
- azure_cli_diff_tool-0.0.8/azure_cli_diff_tool.egg-info/requires.txt +0 -2
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/README.rst +0 -0
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/azure_cli_diff_tool/data/blob_config.ini +0 -0
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/azure_cli_diff_tool/meta_change.py +0 -0
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/azure_cli_diff_tool/utils.py +0 -0
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/azure_cli_diff_tool.egg-info/SOURCES.txt +0 -0
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/azure_cli_diff_tool.egg-info/dependency_links.txt +0 -0
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/azure_cli_diff_tool.egg-info/top_level.txt +0 -0
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/setup.cfg +0 -0
- {azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/tests/__init__.py +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: azure-cli-diff-tool
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.9
|
|
4
4
|
Summary: A tool for cli metadata management
|
|
5
5
|
Author: Microsoft Corporation
|
|
6
6
|
Author-email: azpycli@microsoft.com
|
|
7
7
|
License: MIT
|
|
8
8
|
Requires-Dist: deepdiff==6.3.0
|
|
9
|
-
Requires-Dist: requests
|
|
9
|
+
Requires-Dist: requests~=2.32.3
|
|
10
10
|
|
|
11
11
|
Microsoft Azure CLI Diff Tools (azure-cli-diff-tool)
|
|
12
12
|
=======================================================
|
|
@@ -98,6 +98,10 @@ License
|
|
|
98
98
|
|
|
99
99
|
Release History
|
|
100
100
|
===============
|
|
101
|
+
0.0.9
|
|
102
|
+
++++++
|
|
103
|
+
* Use dynamic metadata whitelist
|
|
104
|
+
|
|
101
105
|
0.0.8
|
|
102
106
|
++++++
|
|
103
107
|
* Set `deepDiff` un-breaking version
|
|
@@ -18,7 +18,7 @@ from .utils import get_blob_config, load_blob_config_file, get_target_version_mo
|
|
|
18
18
|
extract_module_name_from_meta_file, export_meta_changes_to_csv, export_meta_changes_to_json, \
|
|
19
19
|
export_meta_changes_to_dict, expand_deprecate_obj
|
|
20
20
|
|
|
21
|
-
__VERSION__ = '0.0.
|
|
21
|
+
__VERSION__ = '0.0.9'
|
|
22
22
|
|
|
23
23
|
logger = logging.getLogger(__name__)
|
|
24
24
|
|
|
@@ -11,7 +11,7 @@ CONFIG_FILE_PATH = f"{script_directory}/{BLOB_SETTING_CONFIG_FILE}"
|
|
|
11
11
|
|
|
12
12
|
META_CHANDE_WHITELIST_FILE = "./data/meta_change_whitelist.txt"
|
|
13
13
|
META_CHANDE_WHITELIST_FILE_PATH = f"{script_directory}/{META_CHANDE_WHITELIST_FILE}"
|
|
14
|
-
|
|
14
|
+
META_CHANDE_WHITELIST_FILE_URL = "https://azcmdchangemgmt.blob.core.windows.net/azure-cli-diff-tool-config/meta_change_whitelist.txt"
|
|
15
15
|
DOWNLOAD_THREADS = 30
|
|
16
16
|
|
|
17
17
|
BREAKING_CHANE_RULE_LINK_URL_PREFIX = "https://github.com/Azure/azure-cli/blob/dev/doc/breaking_change_rules/"
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
1010 ams asset get-sas-urls expiry_time default
|
|
2
|
+
1010 mariadb server create administrator_login default
|
|
2
3
|
1010 mysql flexible-server create administrator_login default
|
|
3
4
|
1010 mysql flexible-server restore restore_point_in_time default
|
|
4
5
|
1010 mysql flexible-server import create administrator_login default
|
|
6
|
+
1010 mysql flexible-server maintenance reschedule maintenance_start_time default
|
|
7
|
+
1010 mysql server create administrator_login default
|
|
5
8
|
1010 postgres flexible-server create administrator_login default
|
|
6
9
|
1010 postgres flexible-server restore restore_point_in_time default
|
|
7
|
-
1010
|
|
8
|
-
1010 postgres server create administrator_login default
|
|
9
|
-
1010 mariadb server create administrator_login default
|
|
10
|
+
1010 postgres server create administrator_login default
|
{azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/azure_cli_diff_tool/meta_change_detect.py
RENAMED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
# -----------------------------------------------------------------------------
|
|
6
6
|
|
|
7
7
|
import logging
|
|
8
|
+
import requests
|
|
8
9
|
import os.path
|
|
9
10
|
|
|
10
11
|
from .utils import get_command_tree, ChangeType, extract_cmd_name, extract_subgroup_name, extract_subgroup_property, \
|
|
@@ -22,6 +23,7 @@ from ._const import (SUBGROUP_PROPERTY_ADD_BREAK_LIST, SUBGROUP_PROPERTY_ADD_WAR
|
|
|
22
23
|
PARA_PROPERTY_ADD_BREAK_LIST, PARA_PROPERTY_ADD_WARN_LIST,
|
|
23
24
|
PARA_PROPERTY_UPDATE_BREAK_LIST, PARA_PROPERTY_UPDATE_WARN_LIST,
|
|
24
25
|
CMD_REMOVE_SUFFIX_WARN_LIST,
|
|
26
|
+
META_CHANDE_WHITELIST_FILE_URL,
|
|
25
27
|
META_CHANDE_WHITELIST_FILE_PATH)
|
|
26
28
|
|
|
27
29
|
logger = logging.getLogger(__name__)
|
|
@@ -53,14 +55,24 @@ class MetaChangeDetect:
|
|
|
53
55
|
self.__get_meta_change_whitelist__()
|
|
54
56
|
|
|
55
57
|
def __get_meta_change_whitelist__(self):
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
remote_res = requests.get(META_CHANDE_WHITELIST_FILE_URL)
|
|
59
|
+
if remote_res.status_code != 200:
|
|
60
|
+
logger.warning("remote meta change whitelist fetch error, use local dict")
|
|
61
|
+
if not os.path.exists(META_CHANDE_WHITELIST_FILE_PATH):
|
|
62
|
+
logger.info("meta_change_whitelist.txt not exist, skipped")
|
|
63
|
+
return
|
|
64
|
+
with open(META_CHANDE_WHITELIST_FILE_PATH, "r") as f_in:
|
|
65
|
+
for line in f_in:
|
|
66
|
+
white_key = line.rstrip()
|
|
67
|
+
self.meta_change_whitelist.add(white_key)
|
|
68
|
+
else:
|
|
69
|
+
logger.info("remote meta change whitelist fetch success")
|
|
70
|
+
content = remote_res.text
|
|
71
|
+
for line in content.split("\n"):
|
|
61
72
|
white_key = line.rstrip()
|
|
62
73
|
self.meta_change_whitelist.add(white_key)
|
|
63
74
|
|
|
75
|
+
|
|
64
76
|
@staticmethod
|
|
65
77
|
def __search_cmd_obj(cmd_name, search_meta):
|
|
66
78
|
command_tree = get_command_tree(cmd_name)
|
{azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/azure_cli_diff_tool.egg-info/PKG-INFO
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: azure-cli-diff-tool
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.9
|
|
4
4
|
Summary: A tool for cli metadata management
|
|
5
5
|
Author: Microsoft Corporation
|
|
6
6
|
Author-email: azpycli@microsoft.com
|
|
7
7
|
License: MIT
|
|
8
8
|
Requires-Dist: deepdiff==6.3.0
|
|
9
|
-
Requires-Dist: requests
|
|
9
|
+
Requires-Dist: requests~=2.32.3
|
|
10
10
|
|
|
11
11
|
Microsoft Azure CLI Diff Tools (azure-cli-diff-tool)
|
|
12
12
|
=======================================================
|
|
@@ -98,6 +98,10 @@ License
|
|
|
98
98
|
|
|
99
99
|
Release History
|
|
100
100
|
===============
|
|
101
|
+
0.0.9
|
|
102
|
+
++++++
|
|
103
|
+
* Use dynamic metadata whitelist
|
|
104
|
+
|
|
101
105
|
0.0.8
|
|
102
106
|
++++++
|
|
103
107
|
* Set `deepDiff` un-breaking version
|
|
@@ -30,7 +30,7 @@ setup(name="azure-cli-diff-tool",
|
|
|
30
30
|
author_email='azpycli@microsoft.com',
|
|
31
31
|
packages=find_packages(),
|
|
32
32
|
include_package_data=True,
|
|
33
|
-
install_requires=["deepdiff==6.3.0", "requests"],
|
|
33
|
+
install_requires=["deepdiff==6.3.0", "requests~=2.32.3"],
|
|
34
34
|
package_data={
|
|
35
35
|
"azure_cli_diff_tool": ["data/*"]
|
|
36
36
|
}
|
|
@@ -12,7 +12,7 @@ from azure_cli_diff_tool.utils import get_command_tree, extract_cmd_name, extrac
|
|
|
12
12
|
extract_subgroup_name, extract_subgroup_deprecate_property, expand_deprecate_obj, extract_subgroup_property
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class CLIDiffToolTestCase(unittest.TestCase):
|
|
16
16
|
|
|
17
17
|
def test_parse_cmd_tree(self):
|
|
18
18
|
cmd_name = "monitor log-profiles create"
|
|
@@ -105,6 +105,15 @@ class MyTestCase(unittest.TestCase):
|
|
|
105
105
|
output_type="text")
|
|
106
106
|
self.assertEqual(result, [], "returned change isn't empty")
|
|
107
107
|
|
|
108
|
+
def test_dynamic_diff_meta_whitelist(self):
|
|
109
|
+
if not os.path.exists("./jsons/az_mysql_meta_before.json") \
|
|
110
|
+
or not os.path.exists("./jsons/az_mysql_meta_after.json"):
|
|
111
|
+
return
|
|
112
|
+
result = meta_diff(base_meta_file="./jsons/az_mysql_meta_before.json",
|
|
113
|
+
diff_meta_file="./jsons/az_mysql_meta_after.json",
|
|
114
|
+
output_type="text")
|
|
115
|
+
self.assertEqual(result, [], "returned change isn't empty")
|
|
116
|
+
|
|
108
117
|
def test_expand_deprecate_obj(self):
|
|
109
118
|
example_obj = {
|
|
110
119
|
"module_name": "acr",
|
|
File without changes
|
{azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/azure_cli_diff_tool/data/blob_config.ini
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/azure_cli_diff_tool.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{azure_cli_diff_tool-0.0.8 → azure_cli_diff_tool-0.0.9}/azure_cli_diff_tool.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|