instance_id
stringlengths
10
57
base_commit
stringlengths
40
40
created_at
stringdate
2014-04-30 14:58:36
2025-04-30 20:14:11
environment_setup_commit
stringlengths
40
40
hints_text
stringlengths
0
273k
patch
stringlengths
251
7.06M
problem_statement
stringlengths
11
52.5k
repo
stringlengths
7
53
test_patch
stringlengths
231
997k
meta
dict
version
stringclasses
864 values
install_config
dict
requirements
stringlengths
93
34.2k
environment
stringlengths
760
20.5k
FAIL_TO_PASS
listlengths
1
9.39k
FAIL_TO_FAIL
listlengths
0
2.69k
PASS_TO_PASS
listlengths
0
7.87k
PASS_TO_FAIL
listlengths
0
192
license_name
stringclasses
56 values
docker_image
stringlengths
42
89
Azure__WALinuxAgent-317
2455e86bc0dc4f5349370c58fd5a4516c83a2b2e
2016-07-12 21:30:35
2455e86bc0dc4f5349370c58fd5a4516c83a2b2e
msftclas: Hi __@brendandixon__, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! <span>You've already signed the contribution license agreement. Thanks!</span> <p>The agreement was validated by Microsoft and real humans are currently evaluating your PR.</p> TTYL, MSBOT; hglkrijger: looks good. I will start a manual test ahmetalpbalkan: LGTM hglkrijger: manual test looks good to me: ``` 2016/07/12 22:44:36.108346 INFO Checking for agent family Test updates 2016/07/12 22:44:36.117106 INFO Wire server endpoint:168.63.129.16 2016/07/12 22:44:36.150410 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from package 2016/07/12 22:44:36.160788 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/12 22:44:36.178844 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded 2016/07/12 22:44:36.231748 INFO Agent WALinuxAgent-2.1.5.4 downloaded from https://rdfepirv2sg1prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent__Test__2.1.5.4 2016/07/12 22:44:36.257189 INFO Agent WALinuxAgent-2.1.5.4 unpacked successfully to /var/lib/waagent/WALinuxAgent-2.1.5.4 2016/07/12 22:44:36.282298 INFO Agent WALinuxAgent-2.1.5.4 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.4/HandlerManifest.json 2016/07/12 22:44:36.299637 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/12 22:44:36.312612 INFO Agent WALinuxAgent-2.1.5.4 downloaded successfully 2016/07/12 22:44:36.321573 INFO Event: name=WALinuxAgent, op=Install, message=Agent WALinuxAgent-2.1.5.4 downloaded successfully 2016/07/12 22:44:36.337051 INFO Instantiating Agent WALinuxAgent-2.1.5.5 from package 2016/07/12 22:44:36.346417 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/12 22:44:36.359618 INFO Ensuring Agent WALinuxAgent-2.1.5.5 is downloaded 2016/07/12 22:44:36.413727 INFO Agent WALinuxAgent-2.1.5.5 downloaded from https://rdfepirv2sg1prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent__Test__2.1.5.5 2016/07/12 22:44:36.438037 INFO Agent WALinuxAgent-2.1.5.5 unpacked successfully to /var/lib/waagent/WALinuxAgent-2.1.5.5 2016/07/12 22:44:36.451359 INFO Agent WALinuxAgent-2.1.5.5 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.5/HandlerManifest.json 2016/07/12 22:44:36.473522 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/12 22:44:36.493318 INFO Agent WALinuxAgent-2.1.5.5 downloaded successfully 2016/07/12 22:44:36.502272 INFO Event: name=WALinuxAgent, op=Install, message=Agent WALinuxAgent-2.1.5.5 downloaded successfully 2016/07/12 22:44:36.516464 INFO Agent WALinuxAgent-2.1.5.rc5 discovered WALinuxAgent-2.1.5.5 as an update and will exit 2016/07/12 22:44:36.535733 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.rc5 launched with command 'python -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/12 22:44:36.536585 INFO Agent WALinuxAgent-2.1.5.rc5 launched with command 'python -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/12 22:44:36.537991 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from disk 2016/07/12 22:44:36.539193 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/12 22:44:36.540657 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded 2016/07/12 22:44:36.542193 INFO Agent WALinuxAgent-2.1.5.4 was previously downloaded - skipping download 2016/07/12 22:44:36.543853 INFO Agent WALinuxAgent-2.1.5.4 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.4/HandlerManifest.json 2016/07/12 22:44:36.545412 INFO Instantiating Agent WALinuxAgent-2.1.5.5 from disk 2016/07/12 22:44:36.546685 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/12 22:44:36.548155 INFO Ensuring Agent WALinuxAgent-2.1.5.5 is downloaded 2016/07/12 22:44:36.549747 INFO Agent WALinuxAgent-2.1.5.5 was previously downloaded - skipping download 2016/07/12 22:44:36.551340 INFO Agent WALinuxAgent-2.1.5.5 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.5/HandlerManifest.json 2016/07/12 22:44:36.553260 INFO Determined Agent WALinuxAgent-2.1.5.5 to be the latest agent 2016/07/12 22:44:36.706866 INFO Agent WALinuxAgent-2.1.5.5 launched with command 'python -u bin/WALinuxAgent-2.1.5.rc5-py2.7.egg -run-exthandlers' 2016/07/12 22:44:36.801841 INFO Agent WALinuxAgent-2.1.5.5 is running as the current agent 2016/07/12 22:44:36.810830 INFO Event: name=WALinuxAgent, op=, message=Agent WALinuxAgent-2.1.5.5 is running as the current agent ```
diff --git a/azurelinuxagent/common/version.py b/azurelinuxagent/common/version.py index 4f3e5972..d529bb86 100644 --- a/azurelinuxagent/common/version.py +++ b/azurelinuxagent/common/version.py @@ -66,6 +66,9 @@ AGENT_NAME_PATTERN = re.compile(AGENT_PATTERN) AGENT_DIR_PATTERN = re.compile(".*/{0}".format(AGENT_PATTERN)) +# Set the CURRENT_AGENT and CURRENT_VERSION to match the agent directory name +# - This ensures the agent will "see itself" using the same name and version +# as the code that downloads agents. def set_current_agent(): path = os.getcwd() lib_dir = conf.get_lib_dir() @@ -80,6 +83,9 @@ def set_current_agent(): return agent, FlexibleVersion(version) CURRENT_AGENT, CURRENT_VERSION = set_current_agent() +def is_current_agent_installed(): + return CURRENT_AGENT == AGENT_LONG_VERSION + __distro__ = get_distro() DISTRO_NAME = __distro__[0] diff --git a/azurelinuxagent/ga/exthandlers.py b/azurelinuxagent/ga/exthandlers.py index 8ed2f65f..d3c8f329 100644 --- a/azurelinuxagent/ga/exthandlers.py +++ b/azurelinuxagent/ga/exthandlers.py @@ -230,7 +230,7 @@ class ExtHandlersHandler(object): def report_ext_handlers_status(self): """Go thru handler_state dir, collect and report status""" vm_status = VMStatus() - vm_status.vmAgent.version = AGENT_VERSION + vm_status.vmAgent.version = str(CURRENT_VERSION) vm_status.vmAgent.status = "Ready" vm_status.vmAgent.message = "Guest Agent is running" diff --git a/azurelinuxagent/ga/monitor.py b/azurelinuxagent/ga/monitor.py index 0ac86d4a..f49cef89 100644 --- a/azurelinuxagent/ga/monitor.py +++ b/azurelinuxagent/ga/monitor.py @@ -36,7 +36,8 @@ from azurelinuxagent.common.protocol.restapi import TelemetryEventParam, \ set_properties from azurelinuxagent.common.utils.textutil import parse_doc, findall, find, getattrib from azurelinuxagent.common.version import DISTRO_NAME, DISTRO_VERSION, \ - DISTRO_CODE_NAME, AGENT_LONG_VERSION + DISTRO_CODE_NAME, AGENT_LONG_VERSION, \ + CURRENT_AGENT, CURRENT_VERSION def parse_event(data_str): @@ -106,7 +107,7 @@ class MonitorHandler(object): platform.release()) self.sysinfo.append(TelemetryEventParam("OSVersion", osversion)) self.sysinfo.append( - TelemetryEventParam("GAVersion", AGENT_LONG_VERSION)) + TelemetryEventParam("GAVersion", CURRENT_AGENT)) try: ram = self.osutil.get_total_mem() diff --git a/azurelinuxagent/ga/update.py b/azurelinuxagent/ga/update.py index 749071d6..6dae7aff 100644 --- a/azurelinuxagent/ga/update.py +++ b/azurelinuxagent/ga/update.py @@ -44,7 +44,8 @@ from azurelinuxagent.common.utils.flexible_version import FlexibleVersion from azurelinuxagent.common.version import AGENT_NAME, AGENT_VERSION, AGENT_LONG_VERSION, \ AGENT_DIR_GLOB, AGENT_PKG_GLOB, \ AGENT_PATTERN, AGENT_NAME_PATTERN, AGENT_DIR_PATTERN, \ - CURRENT_AGENT, CURRENT_VERSION + CURRENT_AGENT, CURRENT_VERSION, \ + is_current_agent_installed from azurelinuxagent.ga.exthandlers import HandlerManifest @@ -87,6 +88,7 @@ class UpdateHandler(object): self.child_launch_time = None self.child_launch_attempts = 0 self.child_process = None + self.signal_handler = None return @@ -98,25 +100,29 @@ class UpdateHandler(object): Note: - Most events should be tagged to the launched agent (agent_version) """ + + if self.child_process is not None: + raise Exception("Illegal attempt to launch multiple goal state Agent processes") + + if self.signal_handler is None: + self.signal_handler = signal.signal(signal.SIGTERM, self.forward_signal) + latest_agent = self.get_latest_agent() - if latest_agent == None: + if latest_agent is None: + logger.info(u"Installed Agent {0} is the most current agent", CURRENT_AGENT) agent_cmd = "python -u {0} -run-exthandlers".format(sys.argv[0]) agent_dir = os.getcwd() agent_name = CURRENT_AGENT agent_version = CURRENT_VERSION else: + logger.info(u"Determined Agent {0} to be the latest agent", latest_agent.name) agent_cmd = latest_agent.get_agent_cmd() agent_dir = latest_agent.get_agent_dir() agent_name = latest_agent.name agent_version = latest_agent.version - if self.child_process is not None: - raise Exception("Illegal attempt to launch multiple child processes") - try: - self.signal_handler = signal.signal(signal.SIGTERM, self.forward_signal) - # Launch the correct Python version for python-based agents cmds = shlex.split(agent_cmd) if cmds[0].lower() == "python": @@ -131,41 +137,32 @@ class UpdateHandler(object): stdout=sys.stdout, stderr=sys.stderr) - msg = u"Agent {0} launched with command '{1}'".format(agent_name, agent_cmd) - logger.info(msg) - add_event(AGENT_NAME, version=agent_version, message=msg) + logger.info(u"Agent {0} launched with command '{1}'", agent_name, agent_cmd) ret = self.child_process.wait() - if ret == None: + if ret is None: ret = 1 + + msg = u"Agent {0} launched with command '{1}' returned code: {2}".format( + agent_name, + agent_cmd, + ret) + add_event( + AGENT_NAME, + version=agent_version, + op=WALAEventOperation.Enable, + is_success=(ret <= 0), + message=msg) + if ret > 0: - msg = u"Agent {0} launched with command '{1}' failed with code: {2}".format( - agent_name, - agent_cmd, - ret) logger.warn(msg) - add_event( - AGENT_NAME, - version=agent_version, - op=WALAEventOperation.Enable, - is_success=False, - message=msg) if latest_agent is not None: latest_agent.mark_failure() else: - msg = u"Agent {0} launched with command '{1}' returned {2}".format( - agent_name, - agent_cmd, - ret) logger.info(msg) - add_event( - AGENT_NAME, - version=agent_version, - op=WALAEventOperation.Enable, - is_success=True, - message=msg) + except Exception as e: - msg = u"Agent {0} launch failed with command '{1}' failed with exception: {2}".format( + msg = u"Agent {0} launched with command '{1}' failed with exception: {2}".format( agent_name, agent_cmd, ustr(e)) @@ -178,14 +175,6 @@ class UpdateHandler(object): message=msg) if latest_agent is not None: latest_agent.mark_failure(is_fatal=True) - msg = u"Agent {0} is blacklisted".format(agent_name) - logger.info(msg) - add_event( - AGENT_NAME, - version=agent_version, - op=WALAEventOperation.Enable, - is_success=False, - message=msg) self.child_process = None return @@ -195,10 +184,7 @@ class UpdateHandler(object): This is the main loop which watches for agent and extension updates. """ - msg = u"Agent {0} is running as the current agent".format( - CURRENT_AGENT) - logger.info(msg) - add_event(AGENT_NAME, version=CURRENT_VERSION, is_success=True, message=msg) + logger.info(u"Agent {0} is running as the goal state agent", CURRENT_AGENT) # Launch monitoring threads from azurelinuxagent.ga.monitor import get_monitor_handler @@ -213,34 +199,20 @@ class UpdateHandler(object): # TODO: Add means to stop running try: while self.running: - # Check for a new agent. - # If a new agent exists (that is, ensure_latest_agent returns - # true), exit to allow the daemon to respawn using that agent. if self._ensure_latest_agent(): - msg = u"Agent {0} discovered agent update and will exit".format( - CURRENT_AGENT) - logger.info(msg) - add_event( - AGENT_NAME, - version=CURRENT_VERSION, - is_success=True, - message=msg) + if len(self.agents) > 0: + logger.info( + u"Agent {0} discovered {1} as an update and will exit", + CURRENT_AGENT, + self.agents[0].name) break - # Process extensions exthandlers_handler.run() time.sleep(25) except Exception as e: - msg = u"Agent {0} failed with exception: {1}".format(CURRENT_AGENT, ustr(e)) - logger.warn(msg) - add_event( - AGENT_NAME, - version=CURRENT_VERSION, - op=WALAEventOperation.Enable, - is_success=False, - message=msg) + logger.warn(u"Agent {0} failed with exception: {1}", CURRENT_AGENT, ustr(e)) sys.exit(1) sys.exit(0) @@ -250,9 +222,14 @@ class UpdateHandler(object): if self.child_process is None: return + logger.info( + u"Agent {0} forwarding signal {1} to {2}", + CURRENT_AGENT, + signum, + self.child_agent.name if self.child_agent is not None else CURRENT_AGENT) self.child_process.send_signal(signum) - if not self.signal_handler in (None, signal.SIG_IGN, signal.SIG_DFL): + if self.signal_handler not in (None, signal.SIG_IGN, signal.SIG_DFL): self.signal_handler(signum, frame) elif self.signal_handler is signal.SIG_DFL: if signum == signal.SIGTERM: @@ -286,6 +263,9 @@ class UpdateHandler(object): if next_attempt_time > now: return False + family = conf.get_autoupdate_gafamily() + logger.info("Checking for agent family {0} updates", family) + self.last_attempt_time = now try: protocol = self.protocol_util.get_protocol() @@ -295,43 +275,39 @@ class UpdateHandler(object): logger.warn(msg) add_event( AGENT_NAME, + op=WALAEventOperation.Download, version=CURRENT_VERSION, is_success=False, message=msg) return False if self.last_etag is not None and self.last_etag == etag: - msg = u"Incarnation {0} has no agent updates".format(etag) - logger.info(msg) - add_event(AGENT_NAME, version=CURRENT_VERSION, message=msg) + logger.info(u"Incarnation {0} has no agent updates", etag) return False - logger.info("Check for agent updates") - - family = conf.get_autoupdate_gafamily() manifests = [m for m in manifest_list.vmAgentManifests if m.family == family] if len(manifests) == 0: - msg = u"Incarnation {0} has no agent family {1} updates".format(etag, family) - logger.info(msg) - add_event(AGENT_NAME, version=CURRENT_VERSION, message=msg) + logger.info(u"Incarnation {0} has no agent family {1} updates", etag, family) return False try: pkg_list = protocol.get_vmagent_pkgs(manifests[0]) except ProtocolError as e: - msg= u"Incarnation {0} failed to get {1} package list: {1}".format(etag, - family, - ustr(e)) + msg= u"Incarnation {0} failed to get {1} package list: {2}".format( + etag, + family, + ustr(e)) logger.warn(msg) add_event( AGENT_NAME, + op=WALAEventOperation.Download, version=CURRENT_VERSION, is_success=False, message=msg) return False # Set the agents to those available for download at least as current as the existing agent - # and remove from disk any agent no longer report to the VM. + # and remove from disk any agent no longer reported to the VM. # Note: # The code leaves on disk available, but blacklisted, agents so as to preserve the state. # Otherwise, those agents could be again downloaded and inappropriately retried. @@ -350,6 +326,7 @@ class UpdateHandler(object): too frequently, raise an Exception to force blacklisting. """ if latest_agent is None: + self.child_agent = None return if self.child_agent is None or latest_agent.version != self.child_agent.version: @@ -386,12 +363,7 @@ class UpdateHandler(object): for agent_dir in glob.iglob(path) if os.path.isdir(agent_dir)]) self._filter_blacklisted_agents() except Exception as e: - msg = u"Exception occurred loading available agents: {0}".format(ustr(e)) - add_event( - AGENT_NAME, - version=CURRENT_VERSION, - is_success=False, - message=msg) + logger.warn(u"Exception occurred loading available agents: {0}", ustr(e)) return def _purge_agents(self): @@ -400,25 +372,27 @@ class UpdateHandler(object): (without removing the current, running agent). """ path = os.path.join(conf.get_lib_dir(), "{0}-*".format(AGENT_NAME)) + known_versions = [agent.version for agent in self.agents] - known_versions.append(CURRENT_VERSION) + if not is_current_agent_installed() and CURRENT_VERSION not in known_versions: + logger.warn( + u"Running Agent {0} was not found in the agent manifest - adding to list", + CURRENT_VERSION) + known_versions.append(CURRENT_VERSION) + for agent_path in glob.iglob(path): try: name = fileutil.trim_ext(agent_path, "zip") m = AGENT_DIR_PATTERN.match(name) - if m is not None and not FlexibleVersion(m.group(1)) in known_versions: + if m is not None and FlexibleVersion(m.group(1)) not in known_versions: if os.path.isfile(agent_path): + logger.info(u"Purging outdated Agent file {0}", agent_path) os.remove(agent_path) else: + logger.info(u"Purging outdated Agent directory {0}", agent_path) shutil.rmtree(agent_path) except Exception as e: - msg = u"Exception purging {0}: {1}".format(agent_path, ustr(e)) - logger.warn(msg) - add_event( - AGENT_NAME, - version=CURRENT_VERSION, - is_success=False, - message=msg) + logger.warn(u"Purging {0} raised exception: {1}", agent_path, ustr(e)) return def _set_agents(self, agents=[]): @@ -430,6 +404,7 @@ class UpdateHandler(object): class GuestAgent(object): def __init__(self, path=None, pkg=None): self.pkg = pkg + version = None if path is not None: m = AGENT_DIR_PATTERN.match(path) if m == None: @@ -442,9 +417,13 @@ class GuestAgent(object): raise UpdateError(u"Illegal agent version: {0}".format(version)) self.version = FlexibleVersion(version) + location = u"disk" if path is not None else u"package" + logger.info(u"Instantiating Agent {0} from {1}", self.name, location) + self.error = None self._load_error() self._ensure_downloaded() + return @property def name(self): @@ -479,33 +458,30 @@ class GuestAgent(object): @property def is_downloaded(self): - return os.path.isfile(self.get_agent_manifest_path()) + return self.is_blacklisted or os.path.isfile(self.get_agent_manifest_path()) def mark_failure(self, is_fatal=False): try: if not os.path.isdir(self.get_agent_dir()): os.makedirs(self.get_agent_dir()) - self.error.mark_failure(is_fatal) + self.error.mark_failure(is_fatal=is_fatal) self.error.save() if is_fatal: - msg = u"Agent {0} is permanently blacklisted".format(self.name) - logger.warn(msg) - add_event(AGENT_NAME, version=self.version, is_success=False, message=msg) + logger.warn(u"Agent {0} is permanently blacklisted", self.name) except Exception as e: - msg = u"Agent {0} failed recording error state: {1}".format(ustr(e)) - logger.warn(msg) - add_event(AGENT_NAME, version=self.version, is_success=False, message=msg) + logger.warn(u"Agent {0} failed recording error state: {1}", ustr(e)) return def _ensure_downloaded(self): try: + logger.info(u"Ensuring Agent {0} is downloaded", self.name) + if self.is_blacklisted: - msg = u"Agent {0} is blacklisted - skipping download".format(self.name) - logger.info(msg) - add_event(AGENT_NAME, version=self.version, is_success=True, message=msg) + logger.info(u"Agent {0} is blacklisted - skipping download", self.name) return if self.is_downloaded: + logger.info(u"Agent {0} was previously downloaded - skipping download", self.name) self._load_manifest() return @@ -544,9 +520,6 @@ class GuestAgent(object): return def _download(self): - msg = u"Initiating download of Agent {0}".format(self.name) - logger.info(msg) - add_event(AGENT_NAME, version=self.version, message=msg) package = None for uri in self.pkg.uris: @@ -555,14 +528,19 @@ class GuestAgent(object): if resp.status == restutil.httpclient.OK: package = resp.read() fileutil.write_file(self.get_agent_pkg_path(), bytearray(package), asbin=True) + logger.info(u"Agent {0} downloaded from {1}", self.name, uri.uri) break except restutil.HttpError as e: - msg = u"Agent {0} download from {1} failed".format(self.name, uri.uri) - logger.warn(msg) - add_event(AGENT_NAME, version=self.version, is_success=False, message=msg) + logger.warn(u"Agent {0} download from {1} failed", self.name, uri.uri) if not os.path.isfile(self.get_agent_pkg_path()): msg = u"Unable to download Agent {0} from any URI".format(self.name) + add_event( + AGENT_NAME, + op=WALAEventOperation.Download, + version=CURRENT_VERSION, + is_success=False, + message=msg) raise UpdateError(msg) return @@ -571,15 +549,12 @@ class GuestAgent(object): if self.error is None: self.error = GuestAgentError(self.get_agent_error_file()) self.error.load() + logger.info(u"Agent {0} error state: {1}", self.name, ustr(self.error)) except Exception as e: - msg = u"Agent {0} failed loading error state: {1}".format(ustr(e)) - logger.warn(msg) - add_event(AGENT_NAME, version=self.version, is_success=False, message=msg) + logger.warn(u"Agent {0} failed loading error state: {1}", self.name, ustr(e)) return def _load_manifest(self): - logger.info(u"Loading Agent manifest from {0}", self.get_agent_manifest_path()) - path = self.get_agent_manifest_path() if not os.path.isfile(path): msg = u"Agent {0} is missing the {1} file".format(self.name, AGENT_MANIFEST_FILE) @@ -610,6 +585,10 @@ class GuestAgent(object): ustr(e)) raise UpdateError(msg) + logger.info( + u"Agent {0} loaded manifest from {1}", + self.name, + self.get_agent_manifest_path()) logger.verbose(u"Successfully loaded Agent {0} {1}: {2}", self.name, AGENT_MANIFEST_FILE, @@ -617,13 +596,12 @@ class GuestAgent(object): return def _unpack(self): - logger.info(u"Unpacking agent package {0}", self.name) - try: if os.path.isdir(self.get_agent_dir()): shutil.rmtree(self.get_agent_dir()) zipfile.ZipFile(self.get_agent_pkg_path()).extractall(self.get_agent_dir()) + except Exception as e: msg = u"Exception unpacking Agent {0} from {1}: {2}".format( self.name, @@ -633,13 +611,14 @@ class GuestAgent(object): if not os.path.isdir(self.get_agent_dir()): msg = u"Unpacking Agent {0} failed to create directory {1}".format( - self.name, - self.get_agent_dir()) + self.name, + self.get_agent_dir()) raise UpdateError(msg) - msg = u"Agent {0} successfully unpacked".format(self.name) - logger.info(msg) - add_event(AGENT_NAME, version=self.version, message=msg) + logger.info( + u"Agent {0} unpacked successfully to {1}", + self.name, + self.get_agent_dir()) return @@ -705,3 +684,9 @@ class GuestAgentError(object): u"was_fatal" : self.was_fatal } return data + + def __str__(self): + return "Last Failure: {0}, Total Failures: {1}, Fatal: {2}".format( + self.last_failure, + self.failure_count, + self.was_fatal)
`systemctl stop waagent` hangs Reproes on Ubuntu 16.04 as well as CentOS 7. `systemctl stop walinuxagent` command hangs for a long time, although it eventually succeeds like after maybe 30-40 seconds. It used to be instant. I think it's related to the signal handling behavior that has been recently changed.
Azure/WALinuxAgent
diff --git a/tests/ga/test_update.py b/tests/ga/test_update.py index 36241b16..49006606 100644 --- a/tests/ga/test_update.py +++ b/tests/ga/test_update.py @@ -134,6 +134,16 @@ class UpdateTestCase(AgentTestCase): v.sort(reverse=True) return v + def get_error_file(self, error_data=NO_ERROR): + fp = tempfile.NamedTemporaryFile(mode="w") + json.dump(error_data if error_data is not None else NO_ERROR, fp) + fp.seek(0) + return fp + + def create_error(self, error_data=NO_ERROR): + with self.get_error_file(error_data) as path: + return GuestAgentError(path.name) + def copy_agents(self, *agents): if len(agents) <= 0: agents = get_agent_pkgs() @@ -206,16 +216,6 @@ class UpdateTestCase(AgentTestCase): class TestGuestAgentError(UpdateTestCase): - def get_error_file(self, error_data=NO_ERROR): - fp = tempfile.NamedTemporaryFile(mode="w") - json.dump(error_data if error_data is not None else NO_ERROR, fp) - fp.seek(0) - return fp - - def create_error(self, error_data=NO_ERROR): - with self.get_error_file(error_data) as path: - return GuestAgentError(path.name) - def test_creation(self): self.assertRaises(TypeError, GuestAgentError) self.assertRaises(UpdateError, GuestAgentError, None) @@ -297,6 +297,22 @@ class TestGuestAgentError(UpdateTestCase): self.assertTrue(err.failure_count < MAX_FAILURE) return + def test_str(self): + err = self.create_error(error_data=NO_ERROR) + s = "Last Failure: {0}, Total Failures: {1}, Fatal: {2}".format( + NO_ERROR["last_failure"], + NO_ERROR["failure_count"], + NO_ERROR["was_fatal"]) + self.assertEqual(s, str(err)) + + err = self.create_error(error_data=WITH_ERROR) + s = "Last Failure: {0}, Total Failures: {1}, Fatal: {2}".format( + WITH_ERROR["last_failure"], + WITH_ERROR["failure_count"], + WITH_ERROR["was_fatal"]) + self.assertEqual(s, str(err)) + return + class TestGuestAgent(UpdateTestCase): def setUp(self): @@ -331,7 +347,9 @@ class TestGuestAgent(UpdateTestCase): path = ".".join((os.path.join(conf.get_lib_dir(), get_agent_name()), "zip")) self.assertEqual(path, agent.get_agent_pkg_path()) - self.assertFalse(agent.is_downloaded) + self.assertTrue(agent.is_downloaded) + # Note: Agent will get blacklisted since the package for this test is invalid + self.assertTrue(agent.is_blacklisted) self.assertFalse(agent.is_available) return @@ -455,6 +473,14 @@ class TestGuestAgent(UpdateTestCase): self.assertRaises(UpdateError, agent._load_manifest) return + def test_load_error(self): + agent = GuestAgent(path=self.agent_path) + agent.error = None + + agent._load_error() + self.assertTrue(agent.error is not None) + return + @patch("azurelinuxagent.ga.update.GuestAgent._ensure_downloaded") @patch("azurelinuxagent.ga.update.restutil.http_get") def test_download(self, mock_http_get, mock_ensure): @@ -575,6 +601,22 @@ class TestUpdate(UpdateTestCase): self.update_handler = get_update_handler() return + def test_creation(self): + self.assertTrue(self.update_handler.running) + + self.assertEqual(None, self.update_handler.last_etag) + self.assertEqual(None, self.update_handler.last_attempt_time) + + self.assertEqual(0, len(self.update_handler.agents)) + + self.assertEqual(None, self.update_handler.child_agent) + self.assertEqual(None, self.update_handler.child_launch_time) + self.assertEqual(0, self.update_handler.child_launch_attempts) + self.assertEqual(None, self.update_handler.child_process) + + self.assertEqual(None, self.update_handler.signal_handler) + return + def _test_ensure_latest_agent( self, base_version=FlexibleVersion(AGENT_VERSION), @@ -914,6 +956,19 @@ class TestUpdate(UpdateTestCase): self.assertEqual(1, latest_agent.error.failure_count) return + @patch('signal.signal') + def test_run_latest_captures_signals(self, mock_signal): + self._test_run_latest() + self.assertEqual(1, mock_signal.call_count) + return + + @patch('signal.signal') + def test_run_latest_creates_only_one_signal_handler(self, mock_signal): + self.update_handler.signal_handler = "Not None" + self._test_run_latest() + self.assertEqual(0, mock_signal.call_count) + return + def _test_run(self, invocations=1, calls=[call.run()], enable_updates=False): conf.get_autoupdate_enabled = Mock(return_value=enable_updates)
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 1, "test_score": 3 }, "num_modified_files": 4 }
unknown
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "nose", "pyasn1", "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.6", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work certifi==2021.5.30 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work nose==1.3.7 packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pyasn1==0.5.1 pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work pytest==6.2.4 toml @ file:///tmp/build/80754af9/toml_1616166611790/work typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work -e git+https://github.com/Azure/WALinuxAgent.git@2455e86bc0dc4f5349370c58fd5a4516c83a2b2e#egg=WALinuxAgent zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work
name: WALinuxAgent channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=21.4.0=pyhd3eb1b0_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - importlib-metadata=4.8.1=py36h06a4308_0 - importlib_metadata=4.8.1=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - more-itertools=8.12.0=pyhd3eb1b0_0 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=21.3=pyhd3eb1b0_0 - pip=21.2.2=py36h06a4308_0 - pluggy=0.13.1=py36h06a4308_0 - py=1.11.0=pyhd3eb1b0_0 - pyparsing=3.0.4=pyhd3eb1b0_0 - pytest=6.2.4=py36h06a4308_2 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - toml=0.10.2=pyhd3eb1b0_0 - typing_extensions=4.1.1=pyh06a4308_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zipp=3.6.0=pyhd3eb1b0_0 - zlib=1.2.13=h5eee18b_1 - pip: - nose==1.3.7 - pyasn1==0.5.1 prefix: /opt/conda/envs/WALinuxAgent
[ "tests/ga/test_update.py::TestGuestAgentError::test_str", "tests/ga/test_update.py::TestGuestAgent::test_creation", "tests/ga/test_update.py::TestUpdate::test_run_latest_creates_only_one_signal_handler" ]
[]
[ "tests/ga/test_update.py::TestGuestAgentError::test_clear", "tests/ga/test_update.py::TestGuestAgentError::test_creation", "tests/ga/test_update.py::TestGuestAgentError::test_load_preserves_error_state", "tests/ga/test_update.py::TestGuestAgentError::test_mark_failure", "tests/ga/test_update.py::TestGuestAgentError::test_mark_failure_permanent", "tests/ga/test_update.py::TestGuestAgentError::test_save", "tests/ga/test_update.py::TestGuestAgent::test_clear_error", "tests/ga/test_update.py::TestGuestAgent::test_download", "tests/ga/test_update.py::TestGuestAgent::test_download_fail", "tests/ga/test_update.py::TestGuestAgent::test_ensure_download_skips_blacklisted", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_download_fails", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_load_manifest_fails", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_unpack_fails", "tests/ga/test_update.py::TestGuestAgent::test_is_available", "tests/ga/test_update.py::TestGuestAgent::test_is_blacklisted", "tests/ga/test_update.py::TestGuestAgent::test_is_downloaded", "tests/ga/test_update.py::TestGuestAgent::test_load_error", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_is_empty", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_is_malformed", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_missing", "tests/ga/test_update.py::TestGuestAgent::test_mark_failure", "tests/ga/test_update.py::TestGuestAgent::test_unpack", "tests/ga/test_update.py::TestGuestAgent::test_unpack_fail", "tests/ga/test_update.py::TestUpdate::test_creation", "tests/ga/test_update.py::TestUpdate::test_ensure_lastest_agent_purges_old_agents", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_ignores_old_agents", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_returns_true_on_first_use", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_skips_if_too_frequent", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_skips_if_when_no_new_versions", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_skips_when_etag_matches", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_skips_when_no_versions", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_skips_when_updates_are_disabled", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_sorts", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_ignores_installed_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_raises_exception_for_restarting_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_resets_with_new_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_will_not_raise_exception_for_long_restarts", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_will_not_raise_exception_too_few_restarts", "tests/ga/test_update.py::TestUpdate::test_filter_blacklisted_agents", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_no_updates", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_skip_updates", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_skips_unavailable", "tests/ga/test_update.py::TestUpdate::test_load_agents", "tests/ga/test_update.py::TestUpdate::test_load_agents_does_not_reload", "tests/ga/test_update.py::TestUpdate::test_load_agents_sorts", "tests/ga/test_update.py::TestUpdate::test_purge_agents", "tests/ga/test_update.py::TestUpdate::test_run", "tests/ga/test_update.py::TestUpdate::test_run_keeps_running", "tests/ga/test_update.py::TestUpdate::test_run_latest", "tests/ga/test_update.py::TestUpdate::test_run_latest_captures_signals", "tests/ga/test_update.py::TestUpdate::test_run_latest_defaults_to_current", "tests/ga/test_update.py::TestUpdate::test_run_latest_exception_blacklists", "tests/ga/test_update.py::TestUpdate::test_run_latest_forwards_output", "tests/ga/test_update.py::TestUpdate::test_run_latest_missing_code_marks_failures", "tests/ga/test_update.py::TestUpdate::test_run_latest_nonzero_code_marks_failures", "tests/ga/test_update.py::TestUpdate::test_run_stops_if_update_available", "tests/ga/test_update.py::TestUpdate::test_set_agents" ]
[]
Apache License 2.0
null
Azure__WALinuxAgent-321
9930df6600a061bcc5618b427ffa23cff5943f46
2016-07-13 19:17:07
9930df6600a061bcc5618b427ffa23cff5943f46
msftclas: Hi __@brendandixon__, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! <span>You've already signed the contribution license agreement. Thanks!</span> <p>The agreement was validated by Microsoft and real humans are currently evaluating your PR.</p> TTYL, MSBOT; brendandixon: @ahmetalpbalkan As we discussed, what you saw was caused by both of us actively issuing commands on the same VM. hglkrijger: lgtm
diff --git a/azurelinuxagent/common/version.py b/azurelinuxagent/common/version.py index 222a7208..357d30ff 100644 --- a/azurelinuxagent/common/version.py +++ b/azurelinuxagent/common/version.py @@ -50,7 +50,7 @@ def get_distro(): AGENT_NAME = "WALinuxAgent" AGENT_LONG_NAME = "Azure Linux Agent" -AGENT_VERSION = '2.1.5.rc6' +AGENT_VERSION = '2.1.5.rc7' AGENT_LONG_VERSION = "{0}-{1}".format(AGENT_NAME, AGENT_VERSION) AGENT_DESCRIPTION = """\ The Azure Linux Agent supports the provisioning and running of Linux diff --git a/azurelinuxagent/ga/update.py b/azurelinuxagent/ga/update.py index 6dae7aff..e89608a0 100644 --- a/azurelinuxagent/ga/update.py +++ b/azurelinuxagent/ga/update.py @@ -53,8 +53,10 @@ from azurelinuxagent.ga.exthandlers import HandlerManifest AGENT_ERROR_FILE = "error.json" # File name for agent error record AGENT_MANIFEST_FILE = "HandlerManifest.json" +CHILD_HEALTH_INTERVAL = 15 * 60 CHILD_LAUNCH_INTERVAL = 5 * 60 CHILD_LAUNCH_RESTART_MAX = 3 +CHILD_POLL_INTERVAL = 60 MAX_FAILURE = 3 # Max failure allowed for agent before blacklisted @@ -139,27 +141,50 @@ class UpdateHandler(object): logger.info(u"Agent {0} launched with command '{1}'", agent_name, agent_cmd) - ret = self.child_process.wait() - if ret is None: - ret = 1 + ret = None + start_time = time.time() + while (time.time() - start_time) < CHILD_HEALTH_INTERVAL: + time.sleep(CHILD_POLL_INTERVAL) + ret = self.child_process.poll() + if ret is not None: + break - msg = u"Agent {0} launched with command '{1}' returned code: {2}".format( - agent_name, - agent_cmd, - ret) - add_event( - AGENT_NAME, - version=agent_version, - op=WALAEventOperation.Enable, - is_success=(ret <= 0), - message=msg) + if ret is None or ret <= 0: + msg = u"Agent {0} launched with command '{1}' is successfully running".format( + agent_name, + agent_cmd) + logger.info(msg) + add_event( + AGENT_NAME, + version=agent_version, + op=WALAEventOperation.Enable, + is_success=True, + message=msg) - if ret > 0: + if ret is None: + ret = self.child_process.wait() + + else: + msg = u"Agent {0} launched with command '{1}' failed with return code: {2}".format( + agent_name, + agent_cmd, + ret) + logger.warn(msg) + add_event( + AGENT_NAME, + version=agent_version, + op=WALAEventOperation.Enable, + is_success=False, + message=msg) + + if ret is not None and ret > 0: + msg = u"Agent {0} launched with command '{1}' returned code: {2}".format( + agent_name, + agent_cmd, + ret) logger.warn(msg) if latest_agent is not None: latest_agent.mark_failure() - else: - logger.info(msg) except Exception as e: msg = u"Agent {0} launched with command '{1}' failed with exception: {2}".format( @@ -311,9 +336,7 @@ class UpdateHandler(object): # Note: # The code leaves on disk available, but blacklisted, agents so as to preserve the state. # Otherwise, those agents could be again downloaded and inappropriately retried. - self._set_agents([GuestAgent(pkg=pkg) for pkg in - [pkg for pkg in pkg_list.versions - if FlexibleVersion(pkg.version) > base_version]]) + self._set_agents([GuestAgent(pkg=pkg) for pkg in pkg_list.versions]) self._purge_agents() self._filter_blacklisted_agents() @@ -469,7 +492,7 @@ class GuestAgent(object): if is_fatal: logger.warn(u"Agent {0} is permanently blacklisted", self.name) except Exception as e: - logger.warn(u"Agent {0} failed recording error state: {1}", ustr(e)) + logger.warn(u"Agent {0} failed recording error state: {1}", self.name, ustr(e)) return def _ensure_downloaded(self):
[2.1.5.rc6] recycles indefinitely when child process crashes When I use 2.1.5rc6 code (9930df6600a061bcc5618b427ffa23cff5943f46) and pull in update for 2.1.5rc6 , it starts just fine and stops just fine. (so #297 is resolved) However when I kill the child process with SIGSEGV signal (pid 9215 below) ``` # pstree -ap|grep py |-python3,9211 -u /usr/sbin/waagent -daemon | `-python3,9215 -u bin/WALinuxAgent-2.1.5.rc6-py2.7.egg -run-exthandlers | |-{python3},9234 | `-{python3},9237 ``` the parent process remains alive, blacklists the rc6, tries to bring the original (on disk) agent back but it exits with code 0 immediately. Then it keeps restarting this original agent every second because it exits immediately. <details> <summary>waagent.log just after `kill -SEGV 9215`</summary> ``` 2016/07/13 17:06:59.276675 INFO Agent WALinuxAgent-2.1.5.rc6 forwarding signal 15 to WALinuxAgent-2.1.5.6 2016/07/13 17:07:20.107186 INFO Azure Linux Agent Version:2.1.5.rc6 2016/07/13 17:07:20.119216 INFO OS: ubuntu 16.04 2016/07/13 17:07:20.143949 INFO Python: 3.5.1 2016/07/13 17:07:20.150224 INFO Run daemon 2016/07/13 17:07:20.155990 INFO No RDMA handler exists for distro='Ubuntu' version='16.04' 2016/07/13 17:07:20.170232 INFO Clean protocol 2016/07/13 17:07:20.176382 INFO run Ubuntu provision handler 2016/07/13 17:07:20.183917 INFO RDMA capabilities are not enabled, skipping 2016/07/13 17:07:20.196958 INFO Instantiating Agent WALinuxAgent-2.1.5.6 from disk 2016/07/13 17:07:20.207621 INFO Agent WALinuxAgent-2.1.5.6 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:07:20.231936 INFO Ensuring Agent WALinuxAgent-2.1.5.6 is downloaded 2016/07/13 17:07:20.254939 INFO Agent WALinuxAgent-2.1.5.6 was previously downloaded - skipping download 2016/07/13 17:07:20.267972 INFO Agent WALinuxAgent-2.1.5.6 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.6/HandlerManifest.json 2016/07/13 17:07:20.292037 INFO Determined Agent WALinuxAgent-2.1.5.6 to be the latest agent 2016/07/13 17:07:20.312122 INFO Agent WALinuxAgent-2.1.5.6 launched with command 'python3 -u bin/WALinuxAgent-2.1.5.rc6-py2.7.egg -run-exthandlers' 2016/07/13 17:07:20.825810 INFO Agent WALinuxAgent-2.1.5.6 is running as the goal state agent 2016/07/13 17:07:20.850573 INFO Detect protocol endpoints 2016/07/13 17:07:20.860236 INFO Clean protocol 2016/07/13 17:07:20.861832 INFO WireServer endpoint is not found. Rerun dhcp handler 2016/07/13 17:07:20.863408 INFO test for route to 168.63.129.16 2016/07/13 17:07:20.865187 INFO route to 168.63.129.16 exists 2016/07/13 17:07:20.871366 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:07:20.887742 INFO Fabric preferred wire protocol version:2015-04-05 2016/07/13 17:07:20.890022 INFO Wire protocol version:2012-11-30 2016/07/13 17:07:20.897740 WARNING Server prefered version:2015-04-05 2016/07/13 17:07:25.435991 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:07:25.438363 INFO Start env monitor service. 2016/07/13 17:07:25.490944 INFO Configure routes 2016/07/13 17:07:25.498195 INFO Gateway:None 2016/07/13 17:07:25.512737 INFO Routes:None 2016/07/13 17:07:25.544071 INFO Checking for agent family Test updates 2016/07/13 17:07:25.554014 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:07:25.627459 WARNING Running Agent 2.1.5.6 was not found in the agent manifest - adding to list 2016/07/13 17:07:25.653260 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:07:25.692572 INFO Handle extensions updates for incarnation 7 2016/07/13 17:07:25.704451 INFO [Microsoft.OSTCExtensions.CustomScriptForLinux-1.5.2.0] Expected handler state: uninstall 2016/07/13 17:07:25.711403 INFO [Microsoft.OSTCExtensions.CustomScriptForLinux-1.5.2.0] Current handler state is: NotInstalled 2016/07/13 17:08:07.532646 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.6 launched with command 'python3 -u bin/WALinuxAgent-2.1.5.rc6-py2.7.egg -run-exthandlers' returned code: -11 2016/07/13 17:08:07.536272 INFO Agent WALinuxAgent-2.1.5.6 launched with command 'python3 -u bin/WALinuxAgent-2.1.5.rc6-py2.7.egg -run-exthandlers' returned code: -11 2016/07/13 17:08:07.537055 INFO Determined Agent WALinuxAgent-2.1.5.6 to be the latest agent 2016/07/13 17:08:07.708001 INFO Agent WALinuxAgent-2.1.5.6 launched with command 'python3 -u bin/WALinuxAgent-2.1.5.rc6-py2.7.egg -run-exthandlers' 2016/07/13 17:08:08.279361 INFO Agent WALinuxAgent-2.1.5.6 is running as the goal state agent 2016/07/13 17:08:08.309054 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:08.325240 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:08:08.328355 INFO Start env monitor service. 2016/07/13 17:08:08.343749 INFO Configure routes 2016/07/13 17:08:08.348599 INFO Gateway:None 2016/07/13 17:08:08.350375 INFO Routes:None 2016/07/13 17:08:08.372374 INFO Checking for agent family Test updates 2016/07/13 17:08:08.376769 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:08.434136 WARNING Running Agent 2.1.5.6 was not found in the agent manifest - adding to list 2016/07/13 17:08:08.439013 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:08.454443 INFO Handle extensions updates for incarnation 7 2016/07/13 17:08:08.464798 INFO [Microsoft.OSTCExtensions.CustomScriptForLinux-1.5.2.0] Expected handler state: uninstall 2016/07/13 17:08:08.470012 INFO [Microsoft.OSTCExtensions.CustomScriptForLinux-1.5.2.0] Current handler state is: NotInstalled 2016/07/13 17:08:20.249774 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.6 launched with command 'python3 -u bin/WALinuxAgent-2.1.5.rc6-py2.7.egg -run-exthandlers' returned code: -11 2016/07/13 17:08:20.260353 INFO Agent WALinuxAgent-2.1.5.6 launched with command 'python3 -u bin/WALinuxAgent-2.1.5.rc6-py2.7.egg -run-exthandlers' returned code: -11 2016/07/13 17:08:20.261798 INFO Determined Agent WALinuxAgent-2.1.5.6 to be the latest agent 2016/07/13 17:08:20.263587 WARNING Agent WALinuxAgent-2.1.5.6 launched with command 'python3 -u bin/WALinuxAgent-2.1.5.rc6-py2.7.egg -run-exthandlers' failed with exception: Agent WALinuxAgent-2.1.5.6 restarted more than 3 times in 300 seconds 2016/07/13 17:08:20.264827 ERROR Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.6 launched with command 'python3 -u bin/WALinuxAgent-2.1.5.rc6-py2.7.egg -run-exthandlers' failed with exception: Agent WALinuxAgent-2.1.5.6 restarted more than 3 times in 300 seconds 2016/07/13 17:08:20.273802 WARNING Agent WALinuxAgent-2.1.5.6 is permanently blacklisted 2016/07/13 17:08:20.274808 INFO Installed Agent WALinuxAgent-2.1.5.rc6 is the most current agent 2016/07/13 17:08:20.380124 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' 2016/07/13 17:08:20.663884 INFO Agent WALinuxAgent-2.1.5.rc6 is running as the goal state agent 2016/07/13 17:08:20.680595 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:20.695598 INFO Start env monitor service. 2016/07/13 17:08:20.695137 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:08:20.702653 INFO Configure routes 2016/07/13 17:08:20.716589 INFO Gateway:None 2016/07/13 17:08:20.723530 INFO Routes:None 2016/07/13 17:08:20.733594 INFO Checking for agent family Test updates 2016/07/13 17:08:20.746173 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:20.787213 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from package 2016/07/13 17:08:20.798081 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:20.812881 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded 2016/07/13 17:08:20.853544 INFO Agent WALinuxAgent-2.1.5.4 downloaded from https://rdfepirv2sg1prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent__Test__2.1.5.4 2016/07/13 17:08:20.879837 INFO Agent WALinuxAgent-2.1.5.4 unpacked successfully to /var/lib/waagent/WALinuxAgent-2.1.5.4 2016/07/13 17:08:20.894670 INFO Agent WALinuxAgent-2.1.5.4 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.4/HandlerManifest.json 2016/07/13 17:08:20.910666 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:20.924276 INFO Agent WALinuxAgent-2.1.5.4 downloaded successfully 2016/07/13 17:08:20.934040 INFO Event: name=WALinuxAgent, op=Install, message=Agent WALinuxAgent-2.1.5.4 downloaded successfully 2016/07/13 17:08:20.949440 INFO Instantiating Agent WALinuxAgent-2.1.5.5 from package 2016/07/13 17:08:20.959615 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:20.974076 INFO Ensuring Agent WALinuxAgent-2.1.5.5 is downloaded 2016/07/13 17:08:21.063149 INFO Agent WALinuxAgent-2.1.5.5 downloaded from https://rdfepirv2sg1prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent__Test__2.1.5.5 2016/07/13 17:08:21.090715 INFO Agent WALinuxAgent-2.1.5.5 unpacked successfully to /var/lib/waagent/WALinuxAgent-2.1.5.5 2016/07/13 17:08:21.105711 INFO Agent WALinuxAgent-2.1.5.5 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.5/HandlerManifest.json 2016/07/13 17:08:21.121287 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:21.134870 INFO Agent WALinuxAgent-2.1.5.5 downloaded successfully 2016/07/13 17:08:21.144520 INFO Event: name=WALinuxAgent, op=Install, message=Agent WALinuxAgent-2.1.5.5 downloaded successfully 2016/07/13 17:08:21.159014 INFO Instantiating Agent WALinuxAgent-2.1.5.6 from package 2016/07/13 17:08:21.169173 INFO Agent WALinuxAgent-2.1.5.6 error state: Last Failure: 1468429700.2734947, Total Failures: 1, Fatal: True 2016/07/13 17:08:21.184254 INFO Ensuring Agent WALinuxAgent-2.1.5.6 is downloaded 2016/07/13 17:08:21.194376 INFO Agent WALinuxAgent-2.1.5.6 is blacklisted - skipping download 2016/07/13 17:08:21.206521 INFO Agent WALinuxAgent-2.1.5.rc6 discovered WALinuxAgent-2.1.5.5 as an update and will exit 2016/07/13 17:08:21.254857 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:21.259406 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:21.269854 INFO Installed Agent WALinuxAgent-2.1.5.rc6 is the most current agent 2016/07/13 17:08:21.312086 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' 2016/07/13 17:08:21.571364 INFO Agent WALinuxAgent-2.1.5.rc6 is running as the goal state agent 2016/07/13 17:08:21.588498 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:21.601277 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:08:21.601958 INFO Start env monitor service. 2016/07/13 17:08:21.620125 INFO Configure routes 2016/07/13 17:08:21.627243 INFO Gateway:None 2016/07/13 17:08:21.638921 INFO Routes:None 2016/07/13 17:08:21.656949 INFO Checking for agent family Test updates 2016/07/13 17:08:21.661214 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:21.699835 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from package 2016/07/13 17:08:21.704155 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:21.706388 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded 2016/07/13 17:08:21.715997 INFO Agent WALinuxAgent-2.1.5.4 was previously downloaded - skipping download 2016/07/13 17:08:21.718021 INFO Agent WALinuxAgent-2.1.5.4 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.4/HandlerManifest.json 2016/07/13 17:08:21.727165 INFO Instantiating Agent WALinuxAgent-2.1.5.5 from package 2016/07/13 17:08:21.736498 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:21.738249 INFO Ensuring Agent WALinuxAgent-2.1.5.5 is downloaded 2016/07/13 17:08:21.747362 INFO Agent WALinuxAgent-2.1.5.5 was previously downloaded - skipping download 2016/07/13 17:08:21.756687 INFO Agent WALinuxAgent-2.1.5.5 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.5/HandlerManifest.json 2016/07/13 17:08:21.765777 INFO Instantiating Agent WALinuxAgent-2.1.5.6 from package 2016/07/13 17:08:21.772285 INFO Agent WALinuxAgent-2.1.5.6 error state: Last Failure: 1468429700.2734947, Total Failures: 1, Fatal: True 2016/07/13 17:08:21.774713 INFO Ensuring Agent WALinuxAgent-2.1.5.6 is downloaded 2016/07/13 17:08:21.782079 INFO Agent WALinuxAgent-2.1.5.6 is blacklisted - skipping download 2016/07/13 17:08:21.784885 INFO Agent WALinuxAgent-2.1.5.rc6 discovered WALinuxAgent-2.1.5.5 as an update and will exit 2016/07/13 17:08:21.882052 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:21.886683 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:21.887854 INFO Installed Agent WALinuxAgent-2.1.5.rc6 is the most current agent 2016/07/13 17:08:21.932144 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' 2016/07/13 17:08:22.277177 INFO Agent WALinuxAgent-2.1.5.rc6 is running as the goal state agent 2016/07/13 17:08:22.295077 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:22.316850 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:08:22.317995 INFO Start env monitor service. 2016/07/13 17:08:22.341761 INFO Configure routes 2016/07/13 17:08:22.350760 INFO Gateway:None 2016/07/13 17:08:22.357306 INFO Routes:None 2016/07/13 17:08:22.375500 INFO Checking for agent family Test updates 2016/07/13 17:08:22.380437 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:22.447193 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from package 2016/07/13 17:08:22.460857 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:22.464918 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded 2016/07/13 17:08:22.473861 INFO Agent WALinuxAgent-2.1.5.4 was previously downloaded - skipping download 2016/07/13 17:08:22.475868 INFO Agent WALinuxAgent-2.1.5.4 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.4/HandlerManifest.json 2016/07/13 17:08:22.477640 INFO Instantiating Agent WALinuxAgent-2.1.5.5 from package 2016/07/13 17:08:22.491694 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:22.502931 INFO Ensuring Agent WALinuxAgent-2.1.5.5 is downloaded 2016/07/13 17:08:22.513748 INFO Agent WALinuxAgent-2.1.5.5 was previously downloaded - skipping download 2016/07/13 17:08:22.518634 INFO Agent WALinuxAgent-2.1.5.5 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.5/HandlerManifest.json 2016/07/13 17:08:22.535001 INFO Instantiating Agent WALinuxAgent-2.1.5.6 from package 2016/07/13 17:08:22.538571 INFO Agent WALinuxAgent-2.1.5.6 error state: Last Failure: 1468429700.2734947, Total Failures: 1, Fatal: True 2016/07/13 17:08:22.543338 INFO Ensuring Agent WALinuxAgent-2.1.5.6 is downloaded 2016/07/13 17:08:22.545155 INFO Agent WALinuxAgent-2.1.5.6 is blacklisted - skipping download 2016/07/13 17:08:22.556719 INFO Agent WALinuxAgent-2.1.5.rc6 discovered WALinuxAgent-2.1.5.5 as an update and will exit 2016/07/13 17:08:22.671230 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:22.676133 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:22.677285 INFO Installed Agent WALinuxAgent-2.1.5.rc6 is the most current agent 2016/07/13 17:08:22.720118 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' 2016/07/13 17:08:23.062667 INFO Agent WALinuxAgent-2.1.5.rc6 is running as the goal state agent 2016/07/13 17:08:23.089944 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:23.102678 INFO Start env monitor service. 2016/07/13 17:08:23.102181 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:08:23.120768 INFO Configure routes 2016/07/13 17:08:23.129639 INFO Gateway:None 2016/07/13 17:08:23.137087 INFO Routes:None 2016/07/13 17:08:23.153507 INFO Checking for agent family Test updates 2016/07/13 17:08:23.166021 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:23.214892 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from package 2016/07/13 17:08:23.226747 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:23.241805 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded 2016/07/13 17:08:23.260478 INFO Agent WALinuxAgent-2.1.5.4 was previously downloaded - skipping download 2016/07/13 17:08:23.281062 INFO Agent WALinuxAgent-2.1.5.4 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.4/HandlerManifest.json 2016/07/13 17:08:23.297542 INFO Instantiating Agent WALinuxAgent-2.1.5.5 from package 2016/07/13 17:08:23.311880 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:23.325597 INFO Ensuring Agent WALinuxAgent-2.1.5.5 is downloaded 2016/07/13 17:08:23.336594 INFO Agent WALinuxAgent-2.1.5.5 was previously downloaded - skipping download 2016/07/13 17:08:23.350936 INFO Agent WALinuxAgent-2.1.5.5 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.5/HandlerManifest.json 2016/07/13 17:08:23.366611 INFO Instantiating Agent WALinuxAgent-2.1.5.6 from package 2016/07/13 17:08:23.376730 INFO Agent WALinuxAgent-2.1.5.6 error state: Last Failure: 1468429700.2734947, Total Failures: 1, Fatal: True 2016/07/13 17:08:23.392365 INFO Ensuring Agent WALinuxAgent-2.1.5.6 is downloaded 2016/07/13 17:08:23.401889 INFO Agent WALinuxAgent-2.1.5.6 is blacklisted - skipping download 2016/07/13 17:08:23.412972 INFO Agent WALinuxAgent-2.1.5.rc6 discovered WALinuxAgent-2.1.5.5 as an update and will exit 2016/07/13 17:08:23.468398 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:23.512282 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:23.535350 INFO Installed Agent WALinuxAgent-2.1.5.rc6 is the most current agent 2016/07/13 17:08:23.556142 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' 2016/07/13 17:08:23.872827 INFO Agent WALinuxAgent-2.1.5.rc6 is running as the goal state agent 2016/07/13 17:08:23.898366 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:23.910665 INFO Start env monitor service. 2016/07/13 17:08:23.910156 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:08:23.917967 INFO Configure routes 2016/07/13 17:08:23.934350 INFO Gateway:None 2016/07/13 17:08:23.940358 INFO Routes:None 2016/07/13 17:08:23.955267 INFO Checking for agent family Test updates 2016/07/13 17:08:23.965374 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:24.014087 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from package 2016/07/13 17:08:24.024226 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:24.038005 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded 2016/07/13 17:08:24.048005 INFO Agent WALinuxAgent-2.1.5.4 was previously downloaded - skipping download 2016/07/13 17:08:24.060269 INFO Agent WALinuxAgent-2.1.5.4 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.4/HandlerManifest.json 2016/07/13 17:08:24.075785 INFO Instantiating Agent WALinuxAgent-2.1.5.5 from package 2016/07/13 17:08:24.085725 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:24.105973 INFO Ensuring Agent WALinuxAgent-2.1.5.5 is downloaded 2016/07/13 17:08:24.116596 INFO Agent WALinuxAgent-2.1.5.5 was previously downloaded - skipping download 2016/07/13 17:08:24.129973 INFO Agent WALinuxAgent-2.1.5.5 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.5/HandlerManifest.json 2016/07/13 17:08:24.153601 INFO Instantiating Agent WALinuxAgent-2.1.5.6 from package 2016/07/13 17:08:24.163916 INFO Agent WALinuxAgent-2.1.5.6 error state: Last Failure: 1468429700.2734947, Total Failures: 1, Fatal: True 2016/07/13 17:08:24.179486 INFO Ensuring Agent WALinuxAgent-2.1.5.6 is downloaded 2016/07/13 17:08:24.189392 INFO Agent WALinuxAgent-2.1.5.6 is blacklisted - skipping download 2016/07/13 17:08:24.200856 INFO Agent WALinuxAgent-2.1.5.rc6 discovered WALinuxAgent-2.1.5.5 as an update and will exit 2016/07/13 17:08:24.253308 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:24.257751 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:24.259005 INFO Installed Agent WALinuxAgent-2.1.5.rc6 is the most current agent 2016/07/13 17:08:24.300801 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' 2016/07/13 17:08:24.594689 INFO Agent WALinuxAgent-2.1.5.rc6 is running as the goal state agent 2016/07/13 17:08:24.611077 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:24.623003 INFO Start env monitor service. 2016/07/13 17:08:24.622590 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:08:24.630357 INFO Configure routes 2016/07/13 17:08:24.644496 INFO Gateway:None 2016/07/13 17:08:24.650533 INFO Routes:None 2016/07/13 17:08:24.661371 INFO Checking for agent family Test updates 2016/07/13 17:08:24.670163 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:24.713716 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from package 2016/07/13 17:08:24.724061 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:24.738570 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded 2016/07/13 17:08:24.748783 INFO Agent WALinuxAgent-2.1.5.4 was previously downloaded - skipping download 2016/07/13 17:08:24.762225 INFO Agent WALinuxAgent-2.1.5.4 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.4/HandlerManifest.json 2016/07/13 17:08:24.779150 INFO Instantiating Agent WALinuxAgent-2.1.5.5 from package 2016/07/13 17:08:24.789941 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:24.804309 INFO Ensuring Agent WALinuxAgent-2.1.5.5 is downloaded 2016/07/13 17:08:24.814366 INFO Agent WALinuxAgent-2.1.5.5 was previously downloaded - skipping download 2016/07/13 17:08:24.828414 INFO Agent WALinuxAgent-2.1.5.5 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.5/HandlerManifest.json 2016/07/13 17:08:24.845148 INFO Instantiating Agent WALinuxAgent-2.1.5.6 from package 2016/07/13 17:08:24.856241 INFO Agent WALinuxAgent-2.1.5.6 error state: Last Failure: 1468429700.2734947, Total Failures: 1, Fatal: True 2016/07/13 17:08:24.872751 INFO Ensuring Agent WALinuxAgent-2.1.5.6 is downloaded 2016/07/13 17:08:24.882343 INFO Agent WALinuxAgent-2.1.5.6 is blacklisted - skipping download 2016/07/13 17:08:24.893729 INFO Agent WALinuxAgent-2.1.5.rc6 discovered WALinuxAgent-2.1.5.5 as an update and will exit 2016/07/13 17:08:24.946472 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:24.949020 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:24.949469 INFO Installed Agent WALinuxAgent-2.1.5.rc6 is the most current agent 2016/07/13 17:08:25.000107 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' 2016/07/13 17:08:25.325422 INFO Agent WALinuxAgent-2.1.5.rc6 is running as the goal state agent 2016/07/13 17:08:25.354466 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:25.376228 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:08:25.376987 INFO Start env monitor service. 2016/07/13 17:08:25.393857 INFO Configure routes 2016/07/13 17:08:25.401321 INFO Gateway:None 2016/07/13 17:08:25.406316 INFO Routes:None 2016/07/13 17:08:25.428909 INFO Checking for agent family Test updates 2016/07/13 17:08:25.437865 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:25.490074 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from package 2016/07/13 17:08:25.494039 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:25.495666 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded 2016/07/13 17:08:25.505548 INFO Agent WALinuxAgent-2.1.5.4 was previously downloaded - skipping download 2016/07/13 17:08:25.507342 INFO Agent WALinuxAgent-2.1.5.4 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.4/HandlerManifest.json 2016/07/13 17:08:25.509272 INFO Instantiating Agent WALinuxAgent-2.1.5.5 from package 2016/07/13 17:08:25.518613 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:25.529950 INFO Ensuring Agent WALinuxAgent-2.1.5.5 is downloaded 2016/07/13 17:08:25.531617 INFO Agent WALinuxAgent-2.1.5.5 was previously downloaded - skipping download 2016/07/13 17:08:25.533388 INFO Agent WALinuxAgent-2.1.5.5 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.5/HandlerManifest.json 2016/07/13 17:08:25.543227 INFO Instantiating Agent WALinuxAgent-2.1.5.6 from package 2016/07/13 17:08:25.552956 INFO Agent WALinuxAgent-2.1.5.6 error state: Last Failure: 1468429700.2734947, Total Failures: 1, Fatal: True 2016/07/13 17:08:25.554213 INFO Ensuring Agent WALinuxAgent-2.1.5.6 is downloaded 2016/07/13 17:08:25.555822 INFO Agent WALinuxAgent-2.1.5.6 is blacklisted - skipping download 2016/07/13 17:08:25.564277 INFO Agent WALinuxAgent-2.1.5.rc6 discovered WALinuxAgent-2.1.5.5 as an update and will exit 2016/07/13 17:08:25.661233 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:25.665709 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:25.668489 INFO Installed Agent WALinuxAgent-2.1.5.rc6 is the most current agent 2016/07/13 17:08:25.708122 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' 2016/07/13 17:08:26.010050 INFO Agent WALinuxAgent-2.1.5.rc6 is running as the goal state agent 2016/07/13 17:08:26.025969 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:26.039163 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:08:26.039857 INFO Start env monitor service. 2016/07/13 17:08:26.055563 INFO Configure routes 2016/07/13 17:08:26.062943 INFO Gateway:None 2016/07/13 17:08:26.067482 INFO Routes:None 2016/07/13 17:08:26.085504 INFO Checking for agent family Test updates 2016/07/13 17:08:26.089342 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:26.127742 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from package 2016/07/13 17:08:26.131606 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:26.133318 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded 2016/07/13 17:08:26.135016 INFO Agent WALinuxAgent-2.1.5.4 was previously downloaded - skipping download 2016/07/13 17:08:26.136908 INFO Agent WALinuxAgent-2.1.5.4 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.4/HandlerManifest.json 2016/07/13 17:08:26.138496 INFO Instantiating Agent WALinuxAgent-2.1.5.5 from package 2016/07/13 17:08:26.145185 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:26.146747 INFO Ensuring Agent WALinuxAgent-2.1.5.5 is downloaded 2016/07/13 17:08:26.148457 INFO Agent WALinuxAgent-2.1.5.5 was previously downloaded - skipping download 2016/07/13 17:08:26.150265 INFO Agent WALinuxAgent-2.1.5.5 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.5/HandlerManifest.json 2016/07/13 17:08:26.156888 INFO Instantiating Agent WALinuxAgent-2.1.5.6 from package 2016/07/13 17:08:26.158582 INFO Agent WALinuxAgent-2.1.5.6 error state: Last Failure: 1468429700.2734947, Total Failures: 1, Fatal: True 2016/07/13 17:08:26.161523 INFO Ensuring Agent WALinuxAgent-2.1.5.6 is downloaded 2016/07/13 17:08:26.171334 INFO Agent WALinuxAgent-2.1.5.6 is blacklisted - skipping download 2016/07/13 17:08:26.174023 INFO Agent WALinuxAgent-2.1.5.rc6 discovered WALinuxAgent-2.1.5.5 as an update and will exit 2016/07/13 17:08:26.297190 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:26.301479 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:26.302630 INFO Installed Agent WALinuxAgent-2.1.5.rc6 is the most current agent 2016/07/13 17:08:26.348110 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' 2016/07/13 17:08:26.611096 INFO Agent WALinuxAgent-2.1.5.rc6 is running as the goal state agent 2016/07/13 17:08:26.645899 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:26.659962 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:08:26.660695 INFO Start env monitor service. 2016/07/13 17:08:26.681616 INFO Configure routes 2016/07/13 17:08:26.688067 INFO Gateway:None 2016/07/13 17:08:26.696180 INFO Routes:None 2016/07/13 17:08:26.720086 INFO Checking for agent family Test updates 2016/07/13 17:08:26.728702 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:26.767986 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from package 2016/07/13 17:08:26.771816 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:26.773444 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded 2016/07/13 17:08:26.778469 INFO Agent WALinuxAgent-2.1.5.4 was previously downloaded - skipping download 2016/07/13 17:08:26.780407 INFO Agent WALinuxAgent-2.1.5.4 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.4/HandlerManifest.json 2016/07/13 17:08:26.785876 INFO Instantiating Agent WALinuxAgent-2.1.5.5 from package 2016/07/13 17:08:26.788006 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:26.795651 INFO Ensuring Agent WALinuxAgent-2.1.5.5 is downloaded 2016/07/13 17:08:26.807868 INFO Agent WALinuxAgent-2.1.5.5 was previously downloaded - skipping download 2016/07/13 17:08:26.809602 INFO Agent WALinuxAgent-2.1.5.5 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.5/HandlerManifest.json 2016/07/13 17:08:26.811438 INFO Instantiating Agent WALinuxAgent-2.1.5.6 from package 2016/07/13 17:08:26.814694 INFO Agent WALinuxAgent-2.1.5.6 error state: Last Failure: 1468429700.2734947, Total Failures: 1, Fatal: True 2016/07/13 17:08:26.821667 INFO Ensuring Agent WALinuxAgent-2.1.5.6 is downloaded 2016/07/13 17:08:26.823266 INFO Agent WALinuxAgent-2.1.5.6 is blacklisted - skipping download 2016/07/13 17:08:26.826265 INFO Agent WALinuxAgent-2.1.5.rc6 discovered WALinuxAgent-2.1.5.5 as an update and will exit 2016/07/13 17:08:26.958434 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:26.980759 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:26.998089 INFO Installed Agent WALinuxAgent-2.1.5.rc6 is the most current agent 2016/07/13 17:08:27.026593 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' 2016/07/13 17:08:27.371625 INFO Agent WALinuxAgent-2.1.5.rc6 is running as the goal state agent 2016/07/13 17:08:27.389267 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:27.409599 INFO Start env monitor service. 2016/07/13 17:08:27.408979 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:08:27.417052 INFO Configure routes 2016/07/13 17:08:27.431692 INFO Gateway:None 2016/07/13 17:08:27.440122 INFO Routes:None 2016/07/13 17:08:27.456165 INFO Checking for agent family Test updates 2016/07/13 17:08:27.464784 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:27.507617 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from package 2016/07/13 17:08:27.518134 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:27.533211 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded 2016/07/13 17:08:27.544631 INFO Agent WALinuxAgent-2.1.5.4 was previously downloaded - skipping download 2016/07/13 17:08:27.556706 INFO Agent WALinuxAgent-2.1.5.4 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.4/HandlerManifest.json 2016/07/13 17:08:27.572246 INFO Instantiating Agent WALinuxAgent-2.1.5.5 from package 2016/07/13 17:08:27.582146 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:27.595782 INFO Ensuring Agent WALinuxAgent-2.1.5.5 is downloaded 2016/07/13 17:08:27.606187 INFO Agent WALinuxAgent-2.1.5.5 was previously downloaded - skipping download 2016/07/13 17:08:27.621114 INFO Agent WALinuxAgent-2.1.5.5 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.5/HandlerManifest.json 2016/07/13 17:08:27.637114 INFO Instantiating Agent WALinuxAgent-2.1.5.6 from package 2016/07/13 17:08:27.647934 INFO Agent WALinuxAgent-2.1.5.6 error state: Last Failure: 1468429700.2734947, Total Failures: 1, Fatal: True 2016/07/13 17:08:27.665323 INFO Ensuring Agent WALinuxAgent-2.1.5.6 is downloaded 2016/07/13 17:08:27.675803 INFO Agent WALinuxAgent-2.1.5.6 is blacklisted - skipping download 2016/07/13 17:08:27.686985 INFO Agent WALinuxAgent-2.1.5.rc6 discovered WALinuxAgent-2.1.5.5 as an update and will exit 2016/07/13 17:08:27.732140 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:27.736414 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:27.737599 INFO Installed Agent WALinuxAgent-2.1.5.rc6 is the most current agent 2016/07/13 17:08:27.777746 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' 2016/07/13 17:08:28.063376 INFO Agent WALinuxAgent-2.1.5.rc6 is running as the goal state agent 2016/07/13 17:08:28.091640 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:28.106084 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:08:28.106876 INFO Start env monitor service. 2016/07/13 17:08:28.125474 INFO Configure routes 2016/07/13 17:08:28.133395 INFO Gateway:None 2016/07/13 17:08:28.136495 INFO Routes:None 2016/07/13 17:08:28.154338 INFO Checking for agent family Test updates 2016/07/13 17:08:28.164489 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:28.206145 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from package 2016/07/13 17:08:28.209980 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:28.211570 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded 2016/07/13 17:08:28.213487 INFO Agent WALinuxAgent-2.1.5.4 was previously downloaded - skipping download 2016/07/13 17:08:28.227965 INFO Agent WALinuxAgent-2.1.5.4 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.4/HandlerManifest.json 2016/07/13 17:08:28.235582 INFO Instantiating Agent WALinuxAgent-2.1.5.5 from package 2016/07/13 17:08:28.236946 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:28.238379 INFO Ensuring Agent WALinuxAgent-2.1.5.5 is downloaded 2016/07/13 17:08:28.239922 INFO Agent WALinuxAgent-2.1.5.5 was previously downloaded - skipping download 2016/07/13 17:08:28.247765 INFO Agent WALinuxAgent-2.1.5.5 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.5/HandlerManifest.json 2016/07/13 17:08:28.249302 INFO Instantiating Agent WALinuxAgent-2.1.5.6 from package 2016/07/13 17:08:28.251059 INFO Agent WALinuxAgent-2.1.5.6 error state: Last Failure: 1468429700.2734947, Total Failures: 1, Fatal: True 2016/07/13 17:08:28.259128 INFO Ensuring Agent WALinuxAgent-2.1.5.6 is downloaded 2016/07/13 17:08:28.262239 INFO Agent WALinuxAgent-2.1.5.6 is blacklisted - skipping download 2016/07/13 17:08:28.270685 INFO Agent WALinuxAgent-2.1.5.rc6 discovered WALinuxAgent-2.1.5.5 as an update and will exit 2016/07/13 17:08:28.377386 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:28.381594 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:28.382586 INFO Installed Agent WALinuxAgent-2.1.5.rc6 is the most current agent 2016/07/13 17:08:28.420102 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' 2016/07/13 17:08:28.737361 INFO Agent WALinuxAgent-2.1.5.rc6 is running as the goal state agent 2016/07/13 17:08:28.764614 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:28.775831 INFO Start env monitor service. 2016/07/13 17:08:28.775419 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:08:28.782866 INFO Configure routes 2016/07/13 17:08:28.796378 INFO Gateway:None 2016/07/13 17:08:28.801914 INFO Routes:None 2016/07/13 17:08:28.811874 INFO Checking for agent family Test updates 2016/07/13 17:08:28.820192 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:28.867350 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from package 2016/07/13 17:08:28.877139 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:28.890430 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded 2016/07/13 17:08:28.899898 INFO Agent WALinuxAgent-2.1.5.4 was previously downloaded - skipping download 2016/07/13 17:08:28.911583 INFO Agent WALinuxAgent-2.1.5.4 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.4/HandlerManifest.json 2016/07/13 17:08:28.926866 INFO Instantiating Agent WALinuxAgent-2.1.5.5 from package 2016/07/13 17:08:28.937393 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:28.950660 INFO Ensuring Agent WALinuxAgent-2.1.5.5 is downloaded 2016/07/13 17:08:28.960036 INFO Agent WALinuxAgent-2.1.5.5 was previously downloaded - skipping download 2016/07/13 17:08:28.971698 INFO Agent WALinuxAgent-2.1.5.5 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.5/HandlerManifest.json 2016/07/13 17:08:28.987109 INFO Instantiating Agent WALinuxAgent-2.1.5.6 from package 2016/07/13 17:08:28.997675 INFO Agent WALinuxAgent-2.1.5.6 error state: Last Failure: 1468429700.2734947, Total Failures: 1, Fatal: True 2016/07/13 17:08:29.013517 INFO Ensuring Agent WALinuxAgent-2.1.5.6 is downloaded 2016/07/13 17:08:29.023435 INFO Agent WALinuxAgent-2.1.5.6 is blacklisted - skipping download 2016/07/13 17:08:29.035427 INFO Agent WALinuxAgent-2.1.5.rc6 discovered WALinuxAgent-2.1.5.5 as an update and will exit 2016/07/13 17:08:29.082719 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:29.086942 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:29.089727 INFO Installed Agent WALinuxAgent-2.1.5.rc6 is the most current agent 2016/07/13 17:08:29.132150 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' 2016/07/13 17:08:29.429758 INFO Agent WALinuxAgent-2.1.5.rc6 is running as the goal state agent 2016/07/13 17:08:29.446503 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:29.455656 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:08:29.468931 INFO Start env monitor service. 2016/07/13 17:08:29.476813 INFO Configure routes 2016/07/13 17:08:29.483019 INFO Gateway:None 2016/07/13 17:08:29.488580 INFO Routes:None 2016/07/13 17:08:29.498159 INFO Checking for agent family Test updates 2016/07/13 17:08:29.506566 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:29.553213 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from package 2016/07/13 17:08:29.563338 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:29.576955 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded 2016/07/13 17:08:29.586403 INFO Agent WALinuxAgent-2.1.5.4 was previously downloaded - skipping download 2016/07/13 17:08:29.598085 INFO Agent WALinuxAgent-2.1.5.4 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.4/HandlerManifest.json 2016/07/13 17:08:29.613466 INFO Instantiating Agent WALinuxAgent-2.1.5.5 from package 2016/07/13 17:08:29.623208 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:29.636602 INFO Ensuring Agent WALinuxAgent-2.1.5.5 is downloaded 2016/07/13 17:08:29.646913 INFO Agent WALinuxAgent-2.1.5.5 was previously downloaded - skipping download 2016/07/13 17:08:29.658556 INFO Agent WALinuxAgent-2.1.5.5 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.5/HandlerManifest.json 2016/07/13 17:08:29.673663 INFO Instantiating Agent WALinuxAgent-2.1.5.6 from package 2016/07/13 17:08:29.683525 INFO Agent WALinuxAgent-2.1.5.6 error state: Last Failure: 1468429700.2734947, Total Failures: 1, Fatal: True 2016/07/13 17:08:29.698301 INFO Ensuring Agent WALinuxAgent-2.1.5.6 is downloaded 2016/07/13 17:08:29.707543 INFO Agent WALinuxAgent-2.1.5.6 is blacklisted - skipping download 2016/07/13 17:08:29.718347 INFO Agent WALinuxAgent-2.1.5.rc6 discovered WALinuxAgent-2.1.5.5 as an update and will exit 2016/07/13 17:08:29.764137 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:29.768504 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:29.780034 INFO Installed Agent WALinuxAgent-2.1.5.rc6 is the most current agent 2016/07/13 17:08:29.816108 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' 2016/07/13 17:08:30.099138 INFO Agent WALinuxAgent-2.1.5.rc6 is running as the goal state agent 2016/07/13 17:08:30.115475 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:30.129022 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:08:30.129776 INFO Start env monitor service. 2016/07/13 17:08:30.147169 INFO Configure routes 2016/07/13 17:08:30.154849 INFO Gateway:None 2016/07/13 17:08:30.165703 INFO Routes:None 2016/07/13 17:08:30.182106 INFO Checking for agent family Test updates 2016/07/13 17:08:30.191902 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:30.238534 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from package 2016/07/13 17:08:30.242457 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:30.243988 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded 2016/07/13 17:08:30.245624 INFO Agent WALinuxAgent-2.1.5.4 was previously downloaded - skipping download 2016/07/13 17:08:30.247389 INFO Agent WALinuxAgent-2.1.5.4 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.4/HandlerManifest.json 2016/07/13 17:08:30.257769 INFO Instantiating Agent WALinuxAgent-2.1.5.5 from package 2016/07/13 17:08:30.259229 INFO Agent WALinuxAgent-2.1.5.5 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:30.267368 INFO Ensuring Agent WALinuxAgent-2.1.5.5 is downloaded 2016/07/13 17:08:30.270568 INFO Agent WALinuxAgent-2.1.5.5 was previously downloaded - skipping download 2016/07/13 17:08:30.280087 INFO Agent WALinuxAgent-2.1.5.5 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.5.5/HandlerManifest.json 2016/07/13 17:08:30.281507 INFO Instantiating Agent WALinuxAgent-2.1.5.6 from package 2016/07/13 17:08:30.283152 INFO Agent WALinuxAgent-2.1.5.6 error state: Last Failure: 1468429700.2734947, Total Failures: 1, Fatal: True 2016/07/13 17:08:30.290922 INFO Ensuring Agent WALinuxAgent-2.1.5.6 is downloaded 2016/07/13 17:08:30.294040 INFO Agent WALinuxAgent-2.1.5.6 is blacklisted - skipping download 2016/07/13 17:08:30.296987 INFO Agent WALinuxAgent-2.1.5.rc6 discovered WALinuxAgent-2.1.5.5 as an update and will exit 2016/07/13 17:08:30.412728 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:30.417260 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' returned code: 0 2016/07/13 17:08:30.418371 INFO Installed Agent WALinuxAgent-2.1.5.rc6 is the most current agent 2016/07/13 17:08:30.460099 INFO Agent WALinuxAgent-2.1.5.rc6 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' 2016/07/13 17:08:30.747794 INFO Agent WALinuxAgent-2.1.5.rc6 is running as the goal state agent 2016/07/13 17:08:30.769584 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:30.781105 INFO Start env monitor service. 2016/07/13 17:08:30.780693 INFO Event: name=WALA, op=HeartBeat, message= 2016/07/13 17:08:30.788185 INFO Configure routes 2016/07/13 17:08:30.803017 INFO Gateway:None 2016/07/13 17:08:30.808497 INFO Routes:None 2016/07/13 17:08:30.820408 INFO Checking for agent family Test updates 2016/07/13 17:08:30.829696 INFO Wire server endpoint:168.63.129.16 2016/07/13 17:08:30.878817 INFO Instantiating Agent WALinuxAgent-2.1.5.4 from package 2016/07/13 17:08:30.889227 INFO Agent WALinuxAgent-2.1.5.4 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/07/13 17:08:30.903395 INFO Ensuring Agent WALinuxAgent-2.1.5.4 is downloaded ... keeps going ``` </details>
Azure/WALinuxAgent
diff --git a/tests/ga/test_update.py b/tests/ga/test_update.py index 49006606..74804fb9 100644 --- a/tests/ga/test_update.py +++ b/tests/ga/test_update.py @@ -627,7 +627,6 @@ class TestUpdate(UpdateTestCase): if versions is None or len(versions) <= 0: versions = [latest_version] - self.update_handler.protocol_util = Mock(return_value=ProtocolMock) etag = self.update_handler.last_etag if self.update_handler.last_etag is not None else 42 if protocol is None: protocol = ProtocolMock(etag=etag, versions=versions) @@ -641,7 +640,7 @@ class TestUpdate(UpdateTestCase): self.assertTrue(self._test_ensure_latest_agent()) return - def test_ensure_latest_agent_ignores_old_agents(self): + def test_ensure_latest_agent_includes_old_agents(self): self.prepare_agents() old_count = FlexibleVersion(AGENT_VERSION).version[-1] @@ -651,7 +650,7 @@ class TestUpdate(UpdateTestCase): all_count = len(self.agent_versions()) self.assertTrue(self._test_ensure_latest_agent(versions=self.agent_versions())) - self.assertEqual(all_count - old_count, len(self.update_handler.agents)) + self.assertEqual(all_count, len(self.update_handler.agents)) return def test_ensure_lastest_agent_purges_old_agents(self): @@ -829,7 +828,7 @@ class TestUpdate(UpdateTestCase): kept_agents = self.update_handler.agents[1::2] purged_agents = self.update_handler.agents[::2] - # Reload and assert only the kept agents remain on disk + # Reload and assert only the kept agents remain on disk self.update_handler.agents = kept_agents self.update_handler._purge_agents() self.update_handler._load_agents() @@ -850,14 +849,19 @@ class TestUpdate(UpdateTestCase): self.assertTrue(os.path.exists(agent_path + ".zip")) return - def _test_run_latest(self, return_value=0, side_effect=None, child_calls=1): - mock_child = Mock() - mock_child.wait = Mock(return_value=return_value, side_effect=side_effect) + def _test_run_latest(self, mock_child=None, mock_time=None): + if mock_child is None: + mock_child = ChildMock() + if mock_time is None: + mock_time = TimeMock() + with patch('subprocess.Popen', return_value=mock_child) as mock_popen: - self.update_handler.run_latest() - self.assertEqual(child_calls, mock_popen.call_count) + with patch('time.time', side_effect=mock_time.time): + with patch('time.sleep', return_value=mock_time.sleep): + self.update_handler.run_latest() + self.assertEqual(1, mock_popen.call_count) - return mock_popen.call_args + return mock_popen.call_args def test_run_latest(self): self.prepare_agents() @@ -873,6 +877,31 @@ class TestUpdate(UpdateTestCase): self.assertEqual(agent.get_agent_dir(), kwargs['cwd']) return + def test_run_latest_polls_and_waits_for_success(self): + mock_child = ChildMock(return_value=None) + mock_time = TimeMock(time_increment=CHILD_HEALTH_INTERVAL/3) + self._test_run_latest(mock_child=mock_child, mock_time=mock_time) + self.assertEqual(2, mock_child.poll.call_count) + self.assertEqual(1, mock_child.wait.call_count) + return + + def test_run_latest_polling_stops_at_success(self): + mock_child = ChildMock(return_value=0) + mock_time = TimeMock(time_increment=CHILD_HEALTH_INTERVAL/3) + self._test_run_latest(mock_child=mock_child, mock_time=mock_time) + self.assertEqual(1, mock_child.poll.call_count) + self.assertEqual(0, mock_child.wait.call_count) + return + + def test_run_latest_polling_stops_at_failure(self): + mock_child = ChildMock(return_value=42) + mock_time = TimeMock() + self._test_run_latest(mock_child=mock_child, mock_time=mock_time) + self.assertEqual(1, mock_child.poll.call_count) + self.assertEqual(0, mock_child.wait.call_count) + self.assertEqual(2, mock_time.time_call_count) + return + def test_run_latest_defaults_to_current(self): self.assertEqual(None, self.update_handler.get_latest_agent()) @@ -894,7 +923,7 @@ class TestUpdate(UpdateTestCase): saved_stdout, sys.stdout = sys.stdout, stdout saved_stderr, sys.stderr = sys.stderr, stderr try: - self._test_run_latest(side_effect=faux_logger) + self._test_run_latest(mock_child=ChildMock(side_effect=faux_logger)) finally: sys.stdout = saved_stdout sys.stderr = saved_stderr @@ -916,23 +945,7 @@ class TestUpdate(UpdateTestCase): self.assertEqual(0.0, latest_agent.error.last_failure) self.assertEqual(0, latest_agent.error.failure_count) - self._test_run_latest(return_value=1) - - self.assertTrue(latest_agent.is_available) - self.assertNotEqual(0.0, latest_agent.error.last_failure) - self.assertEqual(1, latest_agent.error.failure_count) - return - - def test_run_latest_missing_code_marks_failures(self): - # logger.add_logger_appender(logger.AppenderType.STDOUT) - self.prepare_agents() - - latest_agent = self.update_handler.get_latest_agent() - self.assertTrue(latest_agent.is_available) - self.assertEqual(0.0, latest_agent.error.last_failure) - self.assertEqual(0, latest_agent.error.failure_count) - - self._test_run_latest(return_value=None) + self._test_run_latest(mock_child=ChildMock(return_value=1)) self.assertTrue(latest_agent.is_available) self.assertNotEqual(0.0, latest_agent.error.last_failure) @@ -948,7 +961,7 @@ class TestUpdate(UpdateTestCase): self.assertEqual(0.0, latest_agent.error.last_failure) self.assertEqual(0, latest_agent.error.failure_count) - self._test_run_latest(side_effect=Exception("Force blacklisting")) + self._test_run_latest(mock_child=ChildMock(side_effect=Exception("Force blacklisting"))) self.assertFalse(latest_agent.is_available) self.assertTrue(latest_agent.error.is_blacklisted) @@ -1016,11 +1029,18 @@ class TestUpdate(UpdateTestCase): self._test_run(invocations=0, calls=[], enable_updates=True) return - def test_set_agents(self): + def test_set_agents_sets_agents(self): self.prepare_agents() self.update_handler._set_agents([GuestAgent(path=path) for path in self.agent_dirs()]) + self.assertTrue(len(self.update_handler.agents) > 0) self.assertEqual(len(self.agent_dirs()), len(self.update_handler.agents)) + return + + def test_set_agents_sorts_agents(self): + self.prepare_agents() + + self.update_handler._set_agents([GuestAgent(path=path) for path in self.agent_dirs()]) v = FlexibleVersion("100000") for a in self.update_handler.agents: @@ -1029,6 +1049,15 @@ class TestUpdate(UpdateTestCase): return +class ChildMock(Mock): + def __init__(self, return_value=0, side_effect=None): + Mock.__init__(self, return_value=return_value, side_effect=side_effect) + + self.poll = Mock(return_value=return_value, side_effect=side_effect) + self.wait = Mock(return_value=return_value, side_effect=side_effect) + return + + class ProtocolMock(object): def __init__(self, family="TestAgent", etag=42, versions=None): self.family = family @@ -1085,5 +1114,22 @@ class ResponseMock(Mock): return self.response +class TimeMock(Mock): + def __init__(self, time_increment=1): + Mock.__init__(self) + self.next_time = time.time() + self.time_call_count = 0 + self.time_increment = time_increment + + self.sleep = Mock(return_value=0) + return + + def time(self): + self.time_call_count += 1 + current_time = self.next_time + self.next_time += self.time_increment + return current_time + + if __name__ == '__main__': unittest.main()
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_hyperlinks", "has_issue_reference", "has_git_commit_hash", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 2, "test_score": 0 }, "num_modified_files": 2 }
unknown
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "nose", "pyasn1", "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.6", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work certifi==2021.5.30 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work nose==1.3.7 packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pyasn1==0.5.1 pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work pytest==6.2.4 toml @ file:///tmp/build/80754af9/toml_1616166611790/work typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work -e git+https://github.com/Azure/WALinuxAgent.git@9930df6600a061bcc5618b427ffa23cff5943f46#egg=WALinuxAgent zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work
name: WALinuxAgent channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=21.4.0=pyhd3eb1b0_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - importlib-metadata=4.8.1=py36h06a4308_0 - importlib_metadata=4.8.1=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - more-itertools=8.12.0=pyhd3eb1b0_0 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=21.3=pyhd3eb1b0_0 - pip=21.2.2=py36h06a4308_0 - pluggy=0.13.1=py36h06a4308_0 - py=1.11.0=pyhd3eb1b0_0 - pyparsing=3.0.4=pyhd3eb1b0_0 - pytest=6.2.4=py36h06a4308_2 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - toml=0.10.2=pyhd3eb1b0_0 - typing_extensions=4.1.1=pyh06a4308_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zipp=3.6.0=pyhd3eb1b0_0 - zlib=1.2.13=h5eee18b_1 - pip: - nose==1.3.7 - pyasn1==0.5.1 prefix: /opt/conda/envs/WALinuxAgent
[ "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_includes_old_agents", "tests/ga/test_update.py::TestUpdate::test_run_latest_polling_stops_at_failure", "tests/ga/test_update.py::TestUpdate::test_run_latest_polling_stops_at_success", "tests/ga/test_update.py::TestUpdate::test_run_latest_polls_and_waits_for_success" ]
[]
[ "tests/ga/test_update.py::TestGuestAgentError::test_clear", "tests/ga/test_update.py::TestGuestAgentError::test_creation", "tests/ga/test_update.py::TestGuestAgentError::test_load_preserves_error_state", "tests/ga/test_update.py::TestGuestAgentError::test_mark_failure", "tests/ga/test_update.py::TestGuestAgentError::test_mark_failure_permanent", "tests/ga/test_update.py::TestGuestAgentError::test_save", "tests/ga/test_update.py::TestGuestAgentError::test_str", "tests/ga/test_update.py::TestGuestAgent::test_clear_error", "tests/ga/test_update.py::TestGuestAgent::test_creation", "tests/ga/test_update.py::TestGuestAgent::test_download", "tests/ga/test_update.py::TestGuestAgent::test_download_fail", "tests/ga/test_update.py::TestGuestAgent::test_ensure_download_skips_blacklisted", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_download_fails", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_load_manifest_fails", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_unpack_fails", "tests/ga/test_update.py::TestGuestAgent::test_is_available", "tests/ga/test_update.py::TestGuestAgent::test_is_blacklisted", "tests/ga/test_update.py::TestGuestAgent::test_is_downloaded", "tests/ga/test_update.py::TestGuestAgent::test_load_error", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_is_empty", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_is_malformed", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_missing", "tests/ga/test_update.py::TestGuestAgent::test_mark_failure", "tests/ga/test_update.py::TestGuestAgent::test_unpack", "tests/ga/test_update.py::TestGuestAgent::test_unpack_fail", "tests/ga/test_update.py::TestUpdate::test_creation", "tests/ga/test_update.py::TestUpdate::test_ensure_lastest_agent_purges_old_agents", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_returns_true_on_first_use", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_skips_if_too_frequent", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_skips_if_when_no_new_versions", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_skips_when_etag_matches", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_skips_when_no_versions", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_skips_when_updates_are_disabled", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_sorts", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_ignores_installed_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_raises_exception_for_restarting_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_resets_with_new_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_will_not_raise_exception_for_long_restarts", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_will_not_raise_exception_too_few_restarts", "tests/ga/test_update.py::TestUpdate::test_filter_blacklisted_agents", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_no_updates", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_skip_updates", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_skips_unavailable", "tests/ga/test_update.py::TestUpdate::test_load_agents", "tests/ga/test_update.py::TestUpdate::test_load_agents_does_not_reload", "tests/ga/test_update.py::TestUpdate::test_load_agents_sorts", "tests/ga/test_update.py::TestUpdate::test_purge_agents", "tests/ga/test_update.py::TestUpdate::test_run", "tests/ga/test_update.py::TestUpdate::test_run_keeps_running", "tests/ga/test_update.py::TestUpdate::test_run_latest", "tests/ga/test_update.py::TestUpdate::test_run_latest_captures_signals", "tests/ga/test_update.py::TestUpdate::test_run_latest_creates_only_one_signal_handler", "tests/ga/test_update.py::TestUpdate::test_run_latest_defaults_to_current", "tests/ga/test_update.py::TestUpdate::test_run_latest_exception_blacklists", "tests/ga/test_update.py::TestUpdate::test_run_latest_forwards_output", "tests/ga/test_update.py::TestUpdate::test_run_latest_nonzero_code_marks_failures", "tests/ga/test_update.py::TestUpdate::test_run_stops_if_update_available", "tests/ga/test_update.py::TestUpdate::test_set_agents_sets_agents", "tests/ga/test_update.py::TestUpdate::test_set_agents_sorts_agents" ]
[]
Apache License 2.0
null
Azure__WALinuxAgent-352
2de3f63e6f35e3c9ed51efae4949b3ccd0d2156c
2016-08-08 23:54:57
2de3f63e6f35e3c9ed51efae4949b3ccd0d2156c
diff --git a/azurelinuxagent/pa/deprovision/default.py b/azurelinuxagent/pa/deprovision/default.py index b570c318..3a916e21 100644 --- a/azurelinuxagent/pa/deprovision/default.py +++ b/azurelinuxagent/pa/deprovision/default.py @@ -74,6 +74,11 @@ class DeprovisionHandler(object): files_to_del = ['/root/.bash_history', '/var/log/waagent.log'] actions.append(DeprovisionAction(fileutil.rm_files, files_to_del)) + def del_resolv(self, warnings, actions): + warnings.append("WARNING! /etc/resolv.conf will be deleted.") + files_to_del = ["/etc/resolv.conf"] + actions.append(DeprovisionAction(fileutil.rm_files, files_to_del)) + def del_dhcp_lease(self, warnings, actions): warnings.append("WARNING! Cached DHCP leases will be deleted.") dirs_to_del = ["/var/lib/dhclient", "/var/lib/dhcpcd", "/var/lib/dhcp"] @@ -109,6 +114,7 @@ class DeprovisionHandler(object): self.del_lib_dir(warnings, actions) self.del_files(warnings, actions) + self.del_resolv(warnings, actions) if deluser: self.del_user(warnings, actions) diff --git a/azurelinuxagent/pa/deprovision/ubuntu.py b/azurelinuxagent/pa/deprovision/ubuntu.py index 14f90de0..b45d4154 100644 --- a/azurelinuxagent/pa/deprovision/ubuntu.py +++ b/azurelinuxagent/pa/deprovision/ubuntu.py @@ -18,30 +18,25 @@ # import os -import azurelinuxagent.common.logger as logger import azurelinuxagent.common.utils.fileutil as fileutil from azurelinuxagent.pa.deprovision.default import DeprovisionHandler, \ - DeprovisionAction - -def del_resolv(): - if os.path.realpath('/etc/resolv.conf') != '/run/resolvconf/resolv.conf': - logger.info("resolvconf is not configured. Removing /etc/resolv.conf") - fileutil.rm_files('/etc/resolv.conf') - else: - logger.info("resolvconf is enabled; leaving /etc/resolv.conf intact") - fileutil.rm_files('/etc/resolvconf/resolv.conf.d/tail', - '/etc/resolvconf/resolv.conf.d/originial') + DeprovisionAction class UbuntuDeprovisionHandler(DeprovisionHandler): def __init__(self): super(UbuntuDeprovisionHandler, self).__init__() - def setup(self, deluser): - warnings, actions = super(UbuntuDeprovisionHandler, self).setup(deluser) - warnings.append("WARNING! Nameserver configuration in " - "/etc/resolvconf/resolv.conf.d/{tail,originial} " - "will be deleted.") - actions.append(DeprovisionAction(del_resolv)) - return warnings, actions - + def del_resolv(self, warnings, actions): + if os.path.realpath( + '/etc/resolv.conf') != '/run/resolvconf/resolv.conf': + warnings.append("WARNING! /etc/resolv.conf will be deleted.") + files_to_del = ["/etc/resolv.conf"] + actions.append(DeprovisionAction(fileutil.rm_files, files_to_del)) + else: + warnings.append("WARNING! /etc/resolvconf/resolv.conf.d/tail " + "and /etc/resolvconf/resolv.conf.d/original will " + "be deleted.") + files_to_del = ["/etc/resolvconf/resolv.conf.d/tail", + "/etc/resolvconf/resolv.conf.d/original"] + actions.append(DeprovisionAction(fileutil.rm_files, files_to_del))
[2.1.5]waagent doesn't delete /etc/resolv.conf during deprovisioning Description of problem: After deprovisioning, the /etc/resolv.conf is not deleted. Version-Release number of selected component (if applicable): WALinuxAgent-2.1.5 RHEL Version: RHEL-7.3 internal build How reproducible: 100% Steps to Reproduce: 1. Prepare a RHEL7.3 VM on Azure. Check /etc/resolv.conf: \# ls -l /etc/resolv.conf -rw-r--r--. 1 root root 125 Aug 8 10:18 /etc/resolv.conf 2. Deprovision the VM: \# waagent -deprovision and input 'y' to execute deprovisioning. 3. Check the messages: WARNING! The waagent service will be stopped. WARNING! All SSH host key pairs will be deleted. WARNING! Cached DHCP leases will be deleted. WARNING! root password will be disabled. You will not be able to login as root. Do you want to proceed (y/n)y 4. Check the /etc/resolv.conf \# ls -l /etc/resolv.conf -rw-r--r--. 1 root root 125 Aug 8 10:18 /etc/resolv.conf Actual results: There's no WARNING message to show that /etc/resolv.conf file will be deleted. The /etc/resolv.conf file is not deleted after deprovisioning. Expected results: There's a WARNING message to show that /etc/resolv.conf file will be deleted. The /etc/resolv.conf file is deleted after deprovisioning. Additional info: 1. In WALinuxAgent-2.0.16 the /etc/resolv.conf is deleted during deprovisioning. 2. It seems that there's no code to delete /etc/resolv.conf in azurelinuxagent/pa/deprovision/default.py.
Azure/WALinuxAgent
diff --git a/tests/pa/test_deprovision.py b/tests/pa/test_deprovision.py new file mode 100644 index 00000000..be349153 --- /dev/null +++ b/tests/pa/test_deprovision.py @@ -0,0 +1,48 @@ +# Copyright 2016 Microsoft Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Requires Python 2.4+ and Openssl 1.0+ +# + +from tests.tools import * +from azurelinuxagent.pa.deprovision import get_deprovision_handler + + +class TestDeprovision(AgentTestCase): + @distros("redhat") + def test_deprovision(self, + distro_name, + distro_version, + distro_full_name): + deprovision_handler = get_deprovision_handler(distro_name, + distro_version, + distro_full_name) + warnings, actions = deprovision_handler.setup(deluser=False) + assert any("/etc/resolv.conf" in w for w in warnings) + + @distros("ubuntu") + def test_deprovision_ubuntu(self, + distro_name, + distro_version, + distro_full_name): + deprovision_handler = get_deprovision_handler(distro_name, + distro_version, + distro_full_name) + + with patch("os.path.realpath", return_value="/run/resolvconf/resolv.conf"): + warnings, actions = deprovision_handler.setup(deluser=False) + assert any("/etc/resolvconf/resolv.conf.d/tail" in w for w in warnings) + +if __name__ == '__main__': + unittest.main()
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_many_modified_files" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 1, "test_score": 2 }, "num_modified_files": 2 }
unknown
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "nose", "pyasn1", "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.6", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work certifi==2021.5.30 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work nose==1.3.7 packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pyasn1==0.5.1 pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work pytest==6.2.4 toml @ file:///tmp/build/80754af9/toml_1616166611790/work typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work -e git+https://github.com/Azure/WALinuxAgent.git@2de3f63e6f35e3c9ed51efae4949b3ccd0d2156c#egg=WALinuxAgent zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work
name: WALinuxAgent channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=21.4.0=pyhd3eb1b0_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - importlib-metadata=4.8.1=py36h06a4308_0 - importlib_metadata=4.8.1=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - more-itertools=8.12.0=pyhd3eb1b0_0 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=21.3=pyhd3eb1b0_0 - pip=21.2.2=py36h06a4308_0 - pluggy=0.13.1=py36h06a4308_0 - py=1.11.0=pyhd3eb1b0_0 - pyparsing=3.0.4=pyhd3eb1b0_0 - pytest=6.2.4=py36h06a4308_2 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - toml=0.10.2=pyhd3eb1b0_0 - typing_extensions=4.1.1=pyh06a4308_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zipp=3.6.0=pyhd3eb1b0_0 - zlib=1.2.13=h5eee18b_1 - pip: - nose==1.3.7 - pyasn1==0.5.1 prefix: /opt/conda/envs/WALinuxAgent
[ "tests/pa/test_deprovision.py::TestDeprovision::test_deprovision", "tests/pa/test_deprovision.py::TestDeprovision::test_deprovision_ubuntu" ]
[]
[]
[]
Apache License 2.0
null
Azure__WALinuxAgent-403
d0392908c8a8c66f41183696c0dbe5dfc3d34acc
2016-08-31 22:29:00
d0392908c8a8c66f41183696c0dbe5dfc3d34acc
diff --git a/azurelinuxagent/common/protocol/wire.py b/azurelinuxagent/common/protocol/wire.py index 287da33c..29a1663f 100644 --- a/azurelinuxagent/common/protocol/wire.py +++ b/azurelinuxagent/common/protocol/wire.py @@ -269,7 +269,7 @@ def ext_status_to_v1(ext_name, ext_status): "timestampUTC": timestamp } if len(v1_sub_status) != 0: - v1_ext_status['status']['substatus'] = v1_sub_status + v1_ext_status['substatus'] = v1_sub_status return v1_ext_status diff --git a/azurelinuxagent/common/utils/textutil.py b/azurelinuxagent/common/utils/textutil.py index f03c7e67..6d460cb1 100644 --- a/azurelinuxagent/common/utils/textutil.py +++ b/azurelinuxagent/common/utils/textutil.py @@ -277,3 +277,11 @@ def b64encode(s): if PY_VERSION_MAJOR > 2: return base64.b64encode(bytes(s, 'utf-8')).decode('utf-8') return base64.b64encode(s) + + +def safe_shlex_split(s): + import shlex + from azurelinuxagent.common.version import PY_VERSION + if PY_VERSION[:2] == (2, 6): + return shlex.split(s.encode('utf-8')) + return shlex.split(s) diff --git a/azurelinuxagent/daemon/resourcedisk/default.py b/azurelinuxagent/daemon/resourcedisk/default.py index 9ffe2809..a5f4cf66 100644 --- a/azurelinuxagent/daemon/resourcedisk/default.py +++ b/azurelinuxagent/daemon/resourcedisk/default.py @@ -106,10 +106,7 @@ class ResourceDiskHandler(object): raise ResourceDiskError("Could not determine partition info for " "{0}: {1}".format(device, ret[1])) - force_option = 'F' - if fs == 'xfs': - force_option = 'f' - mkfs_string = "mkfs.{0} {1} -{2}".format(fs, partition, force_option) + mkfs_string = "mkfs.{0} {1} -F".format(fs, partition) if "gpt" in ret[1]: logger.info("GPT detected, finding partitions") diff --git a/azurelinuxagent/ga/update.py b/azurelinuxagent/ga/update.py index 37774d29..5eff7e53 100644 --- a/azurelinuxagent/ga/update.py +++ b/azurelinuxagent/ga/update.py @@ -16,12 +16,12 @@ # # Requires Python 2.4+ and Openssl 1.0+ # + import glob import json import os import platform import re -import shlex import shutil import signal import subprocess @@ -130,7 +130,7 @@ class UpdateHandler(object): try: # Launch the correct Python version for python-based agents - cmds = shlex.split(agent_cmd) + cmds = textutil.safe_shlex_split(agent_cmd) if cmds[0].lower() == "python": cmds[0] = get_python_cmd() agent_cmd = " ".join(cmds) diff --git a/setup.py b/setup.py index 7303b62c..887a557e 100755 --- a/setup.py +++ b/setup.py @@ -147,7 +147,7 @@ class install(_install): ('lnx-distro=', None, 'target Linux distribution'), ('lnx-distro-version=', None, 'target Linux distribution version'), ('lnx-distro-fullname=', None, 'target Linux distribution full name'), - ('register-service', None, 'register as startup service and start'), + ('register-service', None, 'register as startup service'), ('skip-data-files', None, 'skip data files installation'), ] @@ -172,16 +172,14 @@ class install(_install): def run(self): _install.run(self) if self.register_service: - osutil = get_osutil() - osutil.register_agent_service() - osutil.start_agent_service() + get_osutil().register_agent_service() setuptools.setup( name=AGENT_NAME, version=AGENT_VERSION, long_description=AGENT_DESCRIPTION, - author='Microsoft Corporation', + author='Yue Zhang, Stephen Zarkos, Eric Gable', author_email='walinuxagent@microsoft.com', platforms='Linux', url='https://github.com/Azure/WALinuxAgent',
[2.1.5] AutoUpdate WALA error on RHEL-6.8 Description of problem: waagent fails to run the AutoUpdated WALA process. Version-Release number of selected component (if applicable): WALinuxAgent-2.1.5 RHEL Version: RHEL-6.8 Python Version: 2.6.6 How reproducible: 100% Steps to Reproduce: 1. Prepare a RHEL7.3 VM on Azure East US location(ASM mode) with WALA-2.1.5 installed. Enable wala auto-update in the /etc/waagent.conf: \# AutoUpdate.Enabled=y \# AutoUpdate.GAFamily=Prod Then restart waagent service \# service waagent restart 2. Wait until the new WALA package is downloaded. Check waagent.log. Actual results: waagent can't run the new WALA version. There's error logs in waagent.log: ``` 2016/08/25 20:20:17.474136 INFO Instantiating Agent WALinuxAgent-2.1.6 from package 2016/08/25 20:20:17.476843 INFO Agent WALinuxAgent-2.1.6 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/08/25 20:20:17.476980 INFO Ensuring Agent WALinuxAgent-2.1.6 is downloaded 2016/08/25 20:20:17.738310 INFO Agent WALinuxAgent-2.1.6 downloaded from https://rdfepirv2bl2prdstr01.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent__Prod__2.1.6 2016/08/25 20:20:17.799473 INFO Agent WALinuxAgent-2.1.6 unpacked successfully to /var/lib/waagent/WALinuxAgent-2.1.6 2016/08/25 20:20:17.877585 INFO Agent WALinuxAgent-2.1.6 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.6/HandlerManifest.json 2016/08/25 20:20:17.962055 INFO Agent WALinuxAgent-2.1.6 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/08/25 20:20:17.977174 INFO Agent WALinuxAgent-2.1.6 downloaded successfully 2016/08/25 20:20:18.021588 INFO Event: name=WALinuxAgent, op=Install, message=Agent WALinuxAgent-2.1.6 downloaded successfully 2016/08/25 20:20:18.102944 INFO Agent WALinuxAgent-2.1.5 discovered WALinuxAgent-2.1.6 as an update and will exit 2016/08/25 20:21:12.959822 INFO Agent WALinuxAgent-2.1.5 launched with command 'python -u /usr/sbin/waagent -run-exthandlers' is successfully running 2016/08/25 20:21:13.048011 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.5 launched with command 'python -u /usr/sbin/waagent -run-exthandlers' is successfully running 2016/08/25 20:21:13.146289 INFO Instantiating Agent WALinuxAgent-2.1.6 from disk 2016/08/25 20:21:13.195095 INFO Agent WALinuxAgent-2.1.6 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2016/08/25 20:21:13.230193 INFO Ensuring Agent WALinuxAgent-2.1.6 is downloaded 2016/08/25 20:21:13.235666 INFO Agent WALinuxAgent-2.1.6 was previously downloaded - skipping download 2016/08/25 20:21:13.242621 INFO Agent WALinuxAgent-2.1.6 loaded manifest from /var/lib/waagent/WALinuxAgent-2.1.6/HandlerManifest.json 2016/08/25 20:21:13.328814 INFO Determined Agent WALinuxAgent-2.1.6 to be the latest agent 2016/08/25 20:21:13.343555 WARNING Agent WALinuxAgent-2.1.6 launched with command 'python -u bin/WALinuxAgent-2.1.6-py2.7.egg -run-exthandlers' failed with exception: execv() argument 1 must be encoded string without NULL bytes, not str 2016/08/25 20:21:13.566290 ERROR Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.1.6 launched with command 'python -u bin/WALinuxAgent-2.1.6-py2.7.egg -run-exthandlers' failed with exception: execv() argument 1 must be encoded string without NULL bytes, not str 2016/08/25 20:21:13.675956 WARNING Agent WALinuxAgent-2.1.6 is permanently blacklisted 2016/08/25 20:21:13.749416 INFO Installed Agent WALinuxAgent-2.1.5 is the most current agent 2016/08/25 20:21:13.756486 INFO Agent WALinuxAgent-2.1.5 launched with command 'python -u /usr/sbin/waagent -run-exthandlers' \# cat /var/lib/waagent/WALinuxAgent-2.1.6/error.json {"was_fatal": true, "failure_count": 1, "last_failure": 1472127673.6758201} ``` Additional info: 1. Only exists on RHEL-6. Doesn't exist on RHEL-7. 2. If install WALA-2.1.6 directly, there's no error log. Only exists during AutoUpdate.
Azure/WALinuxAgent
diff --git a/tests/ga/test_update.py b/tests/ga/test_update.py index f4b33207..0e07119d 100644 --- a/tests/ga/test_update.py +++ b/tests/ga/test_update.py @@ -438,7 +438,8 @@ class TestGuestAgent(UpdateTestCase): agent = GuestAgent(path=self.agent_path) agent._unpack() agent._load_manifest() - self.assertEqual(agent.manifest.get_enable_command(), agent.get_agent_cmd()) + self.assertEqual(agent.manifest.get_enable_command(), + agent.get_agent_cmd()) return @patch("azurelinuxagent.ga.update.GuestAgent._ensure_downloaded") @@ -992,13 +993,14 @@ class TestUpdate(UpdateTestCase): agent = self.update_handler.get_latest_agent() args, kwargs = self._test_run_latest() - cmds = shlex.split(agent.get_agent_cmd()) + cmds = textutil.safe_shlex_split(agent.get_agent_cmd()) if cmds[0].lower() == "python": cmds[0] = get_python_cmd() self.assertEqual(args[0], cmds) self.assertEqual(True, 'cwd' in kwargs) self.assertEqual(agent.get_agent_dir(), kwargs['cwd']) + self.assertEqual(False, '\x00' in cmds[0]) return def test_run_latest_polls_and_waits_for_success(self):
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 2, "test_score": 0 }, "num_modified_files": 5 }
unknown
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "nose", "pyasn1", "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.6", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work certifi==2021.5.30 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work nose==1.3.7 packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pyasn1==0.5.1 pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work pytest==6.2.4 toml @ file:///tmp/build/80754af9/toml_1616166611790/work typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work -e git+https://github.com/Azure/WALinuxAgent.git@d0392908c8a8c66f41183696c0dbe5dfc3d34acc#egg=WALinuxAgent zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work
name: WALinuxAgent channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=21.4.0=pyhd3eb1b0_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - importlib-metadata=4.8.1=py36h06a4308_0 - importlib_metadata=4.8.1=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - more-itertools=8.12.0=pyhd3eb1b0_0 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=21.3=pyhd3eb1b0_0 - pip=21.2.2=py36h06a4308_0 - pluggy=0.13.1=py36h06a4308_0 - py=1.11.0=pyhd3eb1b0_0 - pyparsing=3.0.4=pyhd3eb1b0_0 - pytest=6.2.4=py36h06a4308_2 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - toml=0.10.2=pyhd3eb1b0_0 - typing_extensions=4.1.1=pyh06a4308_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zipp=3.6.0=pyhd3eb1b0_0 - zlib=1.2.13=h5eee18b_1 - pip: - nose==1.3.7 - pyasn1==0.5.1 prefix: /opt/conda/envs/WALinuxAgent
[ "tests/ga/test_update.py::TestUpdate::test_run_latest" ]
[]
[ "tests/ga/test_update.py::TestGuestAgentError::test_clear", "tests/ga/test_update.py::TestGuestAgentError::test_creation", "tests/ga/test_update.py::TestGuestAgentError::test_load_preserves_error_state", "tests/ga/test_update.py::TestGuestAgentError::test_mark_failure", "tests/ga/test_update.py::TestGuestAgentError::test_mark_failure_permanent", "tests/ga/test_update.py::TestGuestAgentError::test_save", "tests/ga/test_update.py::TestGuestAgentError::test_str", "tests/ga/test_update.py::TestGuestAgent::test_clear_error", "tests/ga/test_update.py::TestGuestAgent::test_creation", "tests/ga/test_update.py::TestGuestAgent::test_download", "tests/ga/test_update.py::TestGuestAgent::test_download_fail", "tests/ga/test_update.py::TestGuestAgent::test_ensure_download_skips_blacklisted", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_download_fails", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_load_manifest_fails", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_unpack_fails", "tests/ga/test_update.py::TestGuestAgent::test_is_available", "tests/ga/test_update.py::TestGuestAgent::test_is_blacklisted", "tests/ga/test_update.py::TestGuestAgent::test_is_downloaded", "tests/ga/test_update.py::TestGuestAgent::test_load_error", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_is_empty", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_is_malformed", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_missing", "tests/ga/test_update.py::TestGuestAgent::test_mark_failure", "tests/ga/test_update.py::TestGuestAgent::test_unpack", "tests/ga/test_update.py::TestGuestAgent::test_unpack_fail", "tests/ga/test_update.py::TestUpdate::test_creation", "tests/ga/test_update.py::TestUpdate::test_emit_restart_event_emits_event_if_not_clean_start", "tests/ga/test_update.py::TestUpdate::test_emit_restart_event_writes_sentinal_file", "tests/ga/test_update.py::TestUpdate::test_ensure_lastest_agent_purges_old_agents", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_includes_old_agents", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_returns_true_on_first_use", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_skips_if_too_frequent", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_skips_if_when_no_new_versions", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_skips_when_etag_matches", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_skips_when_no_versions", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_skips_when_updates_are_disabled", "tests/ga/test_update.py::TestUpdate::test_ensure_latest_agent_sorts", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans_ignores_exceptions", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans_kills_after_interval", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans_skips_if_no_orphans", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_ignores_installed_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_raises_exception_for_restarting_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_resets_with_new_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_will_not_raise_exception_for_long_restarts", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_will_not_raise_exception_too_few_restarts", "tests/ga/test_update.py::TestUpdate::test_filter_blacklisted_agents", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_no_updates", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_skip_updates", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_skips_unavailable", "tests/ga/test_update.py::TestUpdate::test_get_pid_files", "tests/ga/test_update.py::TestUpdate::test_get_pid_files_returns_previous", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_false_for_current_agent", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_false_for_exceptions", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_true_sentinal_agent_is_not_current", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_true_when_no_sentinal", "tests/ga/test_update.py::TestUpdate::test_is_orphaned_returns_false_if_parent_exists", "tests/ga/test_update.py::TestUpdate::test_is_orphaned_returns_true_if_parent_does_not_exist", "tests/ga/test_update.py::TestUpdate::test_is_orphaned_returns_true_if_parent_is_init", "tests/ga/test_update.py::TestUpdate::test_load_agents", "tests/ga/test_update.py::TestUpdate::test_load_agents_does_not_reload", "tests/ga/test_update.py::TestUpdate::test_load_agents_sorts", "tests/ga/test_update.py::TestUpdate::test_purge_agents", "tests/ga/test_update.py::TestUpdate::test_run", "tests/ga/test_update.py::TestUpdate::test_run_clears_sentinal_on_successful_exit", "tests/ga/test_update.py::TestUpdate::test_run_emits_restart_event", "tests/ga/test_update.py::TestUpdate::test_run_keeps_running", "tests/ga/test_update.py::TestUpdate::test_run_latest_captures_signals", "tests/ga/test_update.py::TestUpdate::test_run_latest_creates_only_one_signal_handler", "tests/ga/test_update.py::TestUpdate::test_run_latest_defaults_to_current", "tests/ga/test_update.py::TestUpdate::test_run_latest_exception_blacklists", "tests/ga/test_update.py::TestUpdate::test_run_latest_forwards_output", "tests/ga/test_update.py::TestUpdate::test_run_latest_nonzero_code_marks_failures", "tests/ga/test_update.py::TestUpdate::test_run_latest_polling_stops_at_failure", "tests/ga/test_update.py::TestUpdate::test_run_latest_polling_stops_at_success", "tests/ga/test_update.py::TestUpdate::test_run_latest_polls_and_waits_for_success", "tests/ga/test_update.py::TestUpdate::test_run_leaves_sentinal_on_unsuccessful_exit", "tests/ga/test_update.py::TestUpdate::test_run_stops_if_orphaned", "tests/ga/test_update.py::TestUpdate::test_run_stops_if_update_available", "tests/ga/test_update.py::TestUpdate::test_set_agents_sets_agents", "tests/ga/test_update.py::TestUpdate::test_set_agents_sorts_agents", "tests/ga/test_update.py::TestUpdate::test_set_sentinal", "tests/ga/test_update.py::TestUpdate::test_set_sentinal_writes_current_agent", "tests/ga/test_update.py::TestUpdate::test_shutdown", "tests/ga/test_update.py::TestUpdate::test_shutdown_ignores_exceptions", "tests/ga/test_update.py::TestUpdate::test_shutdown_ignores_missing_sentinal_file", "tests/ga/test_update.py::TestUpdate::test_write_pid_file", "tests/ga/test_update.py::TestUpdate::test_write_pid_file_ignores_exceptions" ]
[]
Apache License 2.0
null
Azure__WALinuxAgent-542
960d64ae448a12075307e0ea2d3c38cb2124fc13
2017-01-10 21:37:00
6e9b985c1d7d564253a1c344bab01b45093103cd
diff --git a/azurelinuxagent/common/osutil/redhat.py b/azurelinuxagent/common/osutil/redhat.py index 8e86f6ec..fef9e152 100644 --- a/azurelinuxagent/common/osutil/redhat.py +++ b/azurelinuxagent/common/osutil/redhat.py @@ -84,7 +84,8 @@ class Redhat6xOSUtil(DefaultOSUtil): def set_dhcp_hostname(self, hostname): ifname = self.get_if_name() filepath = "/etc/sysconfig/network-scripts/ifcfg-{0}".format(ifname) - fileutil.update_conf_file(filepath, 'DHCP_HOSTNAME', + fileutil.update_conf_file(filepath, + 'DHCP_HOSTNAME', 'DHCP_HOSTNAME={0}'.format(hostname)) def get_dhcp_lease_endpoint(self): @@ -117,5 +118,11 @@ class RedhatOSUtil(Redhat6xOSUtil): DefaultOSUtil.openssl_to_openssh(self, input_file, output_file) def get_dhcp_lease_endpoint(self): - # centos7 has this weird naming with double hyphen like /var/lib/dhclient/dhclient--eth0.lease - return self.get_endpoint_from_leases_path('/var/lib/dhclient/dhclient-*.lease') + # dhclient + endpoint = self.get_endpoint_from_leases_path('/var/lib/dhclient/dhclient-*.lease') + + if endpoint is None: + # NetworkManager + endpoint = self.get_endpoint_from_leases_path('/var/lib/NetworkManager/dhclient-*.lease') + + return endpoint diff --git a/azurelinuxagent/common/utils/fileutil.py b/azurelinuxagent/common/utils/fileutil.py index b0b6fb75..8713d0c6 100644 --- a/azurelinuxagent/common/utils/fileutil.py +++ b/azurelinuxagent/common/utils/fileutil.py @@ -140,9 +140,9 @@ def update_conf_file(path, line_start, val, chk_err=False): if not os.path.isfile(path) and chk_err: raise IOError("Can't find config file:{0}".format(path)) conf = read_file(path).split('\n') - conf = [x for x in conf if not x.startswith(line_start)] + conf = [x for x in conf if x is not None and len(x) > 0 and not x.startswith(line_start)] conf.append(val) - write_file(path, '\n'.join(conf)) + write_file(path, '\n'.join(conf) + '\n') def search_file(target_dir_name, target_file_name): for root, dirs, files in os.walk(target_dir_name): diff --git a/azurelinuxagent/pa/deprovision/default.py b/azurelinuxagent/pa/deprovision/default.py index 74f38544..ced87eef 100644 --- a/azurelinuxagent/pa/deprovision/default.py +++ b/azurelinuxagent/pa/deprovision/default.py @@ -88,8 +88,9 @@ class DeprovisionHandler(object): dirs_to_del = ["/var/lib/dhclient", "/var/lib/dhcpcd", "/var/lib/dhcp"] actions.append(DeprovisionAction(fileutil.rm_dirs, dirs_to_del)) - # For Freebsd - actions.append(DeprovisionAction(fileutil.rm_files, ["/var/db/dhclient.leases.hn0"])) + # For Freebsd, NM controlled + actions.append(DeprovisionAction(fileutil.rm_files, ["/var/db/dhclient.leases.hn0", + "/var/lib/NetworkManager/dhclient-*.lease"])) def del_lib_dir(self, warnings, actions): dirs_to_del = [conf.get_lib_dir()]
[2.2.0+]Fail to send hostname to DHCP server during provisioning in RHEL-7 Description of problem: In RHEL-7, if NetworkManager is enabled, the hostname is not sent to DHCP server during provisioning, so that the VM internal DNS is not set to the DNS server. Version-Release number of selected component (if applicable): WALinuxAgent-2.2.0+ RHEL Version: RHEL-7.3 NetworkManager-1.4.0-12 How reproducible: 100% Steps to Reproduce: 1. Create a RHEL-7.3 VM on Azure with WALA-2.2.0+ installed(NetworkManager enabled) 2. Check if send hostname to DHCP server: ~]# cat /var/lib/NetworkManager/dhclient-eth0.conf|grep send There's no "send host-name" line. 3. Check DNS: 1). Get domain-name(like wala73220e.i6.internal.cloudapp.net): cat /etc/resolv.conf|grep search 2). Get hostname(like wala73220e): cat /etc/hostname 3). Check DNS: ~]# nslookup wala73220e.wala73220e.i6.internal.cloudapp.net Server: 168.63.129.16 Address: 168.63.129.16#53 ** server can't find wala73220e.wala73220e.i6.internal.cloudapp.net: NXDOMAIN Actual Result: The hostname is not sent to the DHCP server The domain name is not added into DNS server Expect Result: The hostname is sent to the DHCP server, such as: ~]# cat /var/lib/NetworkManager/dhclient-eth0.conf |grep send send host-name "wala73220e"; # added by NetworkManager The domain name is added into DNS server, such as: ~]# nslookup wala73220e.wala73220e.i6.internal.cloudapp.net Server: 168.63.129.16 Address: 168.63.129.16#53 Name: wala73220e.wala73220e.i6.internal.cloudapp.net Address: 10.0.0.5 Additional Info: There're 2 root causes: 1. WALA-2.2.0 use "hostname" and write "/etc/hostname" file to set hostname, which cannot send hostname message into dbus. NetworkManager get hostname from dbus, then add "send host-name" into /var/lib/NetworkManager/dhclient-eth0.conf 2. WALA-2.2.0 write "DHCP_HOSTNAME=hostname" into /etc/sysconfig/network-scripts/ifcfg-eth0, but there's no '\n' after this line. So that NetworkManager cannot read it. NetworkManager sends the hostname to the DHCP server using the following strategy: - if the ifcfg file specifies a DHCP_HOSTNAME, that value is sent to the DHCP server - if DHCP_HOSTNAME is not set, NM uses the system hostname set through hostnamectl, but only if it is not '(none)', 'localhost', 'localhost6' or 'localhost.localdomain'. If it is one of these, no hostname is sent According to the NetworkManager developer suggestion, the best way to have NetworkManager send the hostname is to simply set a valid system hostname using 'hostnamectl set-hostname myhostname' and reactivate the connection with ifup. The DHCP_HOSTNAME is only a way to override the system configured hostname. So we suggest to: 1. use "hostnamectl set-hostname" command to set hostname in RHEL-7. 2. remove the "DHCP_HOSTNAME". If you need to use this parameter, please add '\n' after it.
Azure/WALinuxAgent
diff --git a/tests/utils/test_file_util.py b/tests/utils/test_file_util.py index f16f4099..76fb15ba 100644 --- a/tests/utils/test_file_util.py +++ b/tests/utils/test_file_util.py @@ -15,13 +15,12 @@ # Requires Python 2.4+ and Openssl 1.0+ # -from tests.tools import * import uuid -import unittest -import os -import sys -from azurelinuxagent.common.future import ustr + import azurelinuxagent.common.utils.fileutil as fileutil +from azurelinuxagent.common.future import ustr +from tests.tools import * + class TestFileOperations(AgentTestCase): @@ -117,5 +116,66 @@ class TestFileOperations(AgentTestCase): self.assertEqual(set(expected_files), set(actual_files)) + @patch('os.path.isfile') + def test_update_conf_file(self, _): + new_file = "\ +DEVICE=eth0\n\ +ONBOOT=yes\n\ +BOOTPROTO=dhcp\n\ +TYPE=Ethernet\n\ +USERCTL=no\n\ +PEERDNS=yes\n\ +IPV6INIT=no\n\ +NM_CONTROLLED=yes\n" + + existing_file = "\ +DEVICE=eth0\n\ +ONBOOT=yes\n\ +BOOTPROTO=dhcp\n\ +TYPE=Ethernet\n\ +DHCP_HOSTNAME=existing\n\ +USERCTL=no\n\ +PEERDNS=yes\n\ +IPV6INIT=no\n\ +NM_CONTROLLED=yes\n" + + bad_file = "\ +DEVICE=eth0\n\ +ONBOOT=yes\n\ +BOOTPROTO=dhcp\n\ +TYPE=Ethernet\n\ +USERCTL=no\n\ +PEERDNS=yes\n\ +IPV6INIT=no\n\ +NM_CONTROLLED=yes\n\ +DHCP_HOSTNAME=no_new_line" + + updated_file = "\ +DEVICE=eth0\n\ +ONBOOT=yes\n\ +BOOTPROTO=dhcp\n\ +TYPE=Ethernet\n\ +USERCTL=no\n\ +PEERDNS=yes\n\ +IPV6INIT=no\n\ +NM_CONTROLLED=yes\n\ +DHCP_HOSTNAME=test\n" + + path = 'path' + with patch.object(fileutil, 'write_file') as patch_write: + with patch.object(fileutil, 'read_file', return_value=new_file): + fileutil.update_conf_file(path, 'DHCP_HOSTNAME', 'DHCP_HOSTNAME=test') + patch_write.assert_called_once_with(path, updated_file) + + with patch.object(fileutil, 'write_file') as patch_write: + with patch.object(fileutil, 'read_file', return_value=existing_file): + fileutil.update_conf_file(path, 'DHCP_HOSTNAME', 'DHCP_HOSTNAME=test') + patch_write.assert_called_once_with(path, updated_file) + + with patch.object(fileutil, 'write_file') as patch_write: + with patch.object(fileutil, 'read_file', return_value=bad_file): + fileutil.update_conf_file(path, 'DHCP_HOSTNAME', 'DHCP_HOSTNAME=test') + patch_write.assert_called_once_with(path, updated_file) + if __name__ == '__main__': unittest.main()
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 0, "test_score": 0 }, "num_modified_files": 3 }
2.2
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "", "pip_packages": [ "pyasn1", "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.4", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs==22.2.0 certifi==2021.5.30 importlib-metadata==4.8.3 iniconfig==1.1.1 packaging==21.3 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pyparsing==3.1.4 pytest==7.0.1 tomli==1.2.3 typing_extensions==4.1.1 -e git+https://github.com/Azure/WALinuxAgent.git@960d64ae448a12075307e0ea2d3c38cb2124fc13#egg=WALinuxAgent zipp==3.6.0
name: WALinuxAgent channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - attrs==22.2.0 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - packaging==21.3 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pyparsing==3.1.4 - pytest==7.0.1 - tomli==1.2.3 - typing-extensions==4.1.1 - zipp==3.6.0 prefix: /opt/conda/envs/WALinuxAgent
[ "tests/utils/test_file_util.py::TestFileOperations::test_update_conf_file" ]
[]
[ "tests/utils/test_file_util.py::TestFileOperations::test_append_file", "tests/utils/test_file_util.py::TestFileOperations::test_get_all_files", "tests/utils/test_file_util.py::TestFileOperations::test_get_last_path_element", "tests/utils/test_file_util.py::TestFileOperations::test_read_write_file", "tests/utils/test_file_util.py::TestFileOperations::test_remove_bom", "tests/utils/test_file_util.py::TestFileOperations::test_remove_files", "tests/utils/test_file_util.py::TestFileOperations::test_rw_utf8_file" ]
[]
Apache License 2.0
null
Azure__WALinuxAgent-602
d3a25f6cba37f8f18330d1a55500a4648d22dc49
2017-03-03 23:01:11
6e9b985c1d7d564253a1c344bab01b45093103cd
brendandixon: LGTM
diff --git a/azurelinuxagent/common/protocol/hostplugin.py b/azurelinuxagent/common/protocol/hostplugin.py index 4c4c2290..bdae56e2 100644 --- a/azurelinuxagent/common/protocol/hostplugin.py +++ b/azurelinuxagent/common/protocol/hostplugin.py @@ -80,10 +80,10 @@ class HostPluginProtocol(object): def get_artifact_request(self, artifact_url, artifact_manifest_url=None): if not self.ensure_initialized(): logger.error("host plugin channel is not available") - return + return None, None if textutil.is_str_none_or_whitespace(artifact_url): logger.error("no extension artifact url was provided") - return + return None, None url = URI_FORMAT_GET_EXTENSION_ARTIFACT.format(self.endpoint, HOST_PLUGIN_PORT) diff --git a/azurelinuxagent/common/rdma.py b/azurelinuxagent/common/rdma.py index ba9a0294..226482d3 100644 --- a/azurelinuxagent/common/rdma.py +++ b/azurelinuxagent/common/rdma.py @@ -133,14 +133,14 @@ class RDMAHandler(object): """Load the kernel driver, this depends on the proper driver to be installed with the install_driver() method""" logger.info("RDMA: probing module '%s'" % self.driver_module_name) - result = shellutil.run('modprobe %s' % self.driver_module_name) + result = shellutil.run('modprobe --first-time %s' % self.driver_module_name) if result != 0: error_msg = 'Could not load "%s" kernel module. ' - error_msg += 'Run "modprobe %s" as root for more details' + error_msg += 'Run "modprobe --first-time %s" as root for more details' logger.error( error_msg % (self.driver_module_name, self.driver_module_name) ) - return + return False logger.info('RDMA: Loaded the kernel driver successfully.') return True @@ -158,6 +158,7 @@ class RDMAHandler(object): logger.info('RDMA: module loaded.') return True logger.info('RDMA: module not loaded.') + return False def reboot_system(self): """Reboot the system. This is required as the kernel module for diff --git a/azurelinuxagent/ga/exthandlers.py b/azurelinuxagent/ga/exthandlers.py index c563cc85..9b99d041 100644 --- a/azurelinuxagent/ga/exthandlers.py +++ b/azurelinuxagent/ga/exthandlers.py @@ -341,7 +341,7 @@ class ExtHandlerInstance(object): self.logger = logger.Logger(logger.DEFAULT_LOGGER, prefix) try: - fileutil.mkdir(self.get_log_dir(), mode=0o744) + fileutil.mkdir(self.get_log_dir(), mode=0o755) except IOError as e: self.logger.error(u"Failed to create extension log dir: {0}", e) diff --git a/azurelinuxagent/ga/update.py b/azurelinuxagent/ga/update.py index ed05135c..59bc70c5 100644 --- a/azurelinuxagent/ga/update.py +++ b/azurelinuxagent/ga/update.py @@ -701,11 +701,15 @@ class GuestAgent(object): if self._fetch(uri.uri): break else: - if self.host is not None: + if self.host is not None and self.host.ensure_initialized(): logger.warn("Download unsuccessful, falling back to host plugin") uri, headers = self.host.get_artifact_request(uri.uri, self.host.manifest_uri) - if self._fetch(uri, headers=headers): + if uri is not None \ + and headers is not None \ + and self._fetch(uri, headers=headers): break + else: + logger.warn("Download unsuccessful, host plugin not available") if not os.path.isfile(self.get_agent_pkg_path()): msg = u"Unable to download Agent {0} from any URI".format(self.name) diff --git a/azurelinuxagent/pa/rdma/centos.py b/azurelinuxagent/pa/rdma/centos.py index 8ad09c54..214f9ead 100644 --- a/azurelinuxagent/pa/rdma/centos.py +++ b/azurelinuxagent/pa/rdma/centos.py @@ -173,8 +173,7 @@ class CentOSRDMAHandler(RDMAHandler): 'user mode', self.rdma_user_mode_package_name, umod_pkg_path) logger.info("RDMA: driver packages installed") - self.load_driver_module() - if not self.is_driver_loaded(): + if not self.load_driver_module() or not self.is_driver_loaded(): logger.info("RDMA: driver module is not loaded; reboot required") self.reboot_system() else: diff --git a/azurelinuxagent/pa/rdma/suse.py b/azurelinuxagent/pa/rdma/suse.py index f0d8d0f5..d31b2b08 100644 --- a/azurelinuxagent/pa/rdma/suse.py +++ b/azurelinuxagent/pa/rdma/suse.py @@ -93,8 +93,7 @@ class SUSERDMAHandler(RDMAHandler): msg = 'RDMA: Successfully installed "%s" from ' msg += 'configured repositories' logger.info(msg % complete_name) - self.load_driver_module() - if requires_reboot: + if not self.load_driver_module() or requires_reboot: self.reboot_system() return True else: @@ -119,8 +118,7 @@ class SUSERDMAHandler(RDMAHandler): msg = 'RDMA: Successfully installed "%s" from ' msg += 'local package cache' logger.info(msg % (local_package)) - self.load_driver_module() - if requires_reboot: + if not self.load_driver_module() or requires_reboot: self.reboot_system() return True else:
Unhandled error ``` 2017/02/06 19:09:15.537324 ERROR get API versions failed with [(000009)HTTP GET failed] 2017/02/06 19:09:15.537516 ERROR Event: name=WALA, op=InitializeHostPlugin, message= 2017/02/06 19:09:15.538399 ERROR host plugin channel is not available 2017/02/06 19:09:15.545516 WARNING Agent WALinuxAgent-2.2.4 failed with exception: 'NoneType' object is not iterable 2017/02/06 19:10:14.026838 WARNING Agent WALinuxAgent-2.2.4 launched with command 'python -u bin/WALinuxAgent-2.2.4-py2.7.egg -run-exthandlers' failed with return code: 1 ``` We need to handle this failure more gracefully
Azure/WALinuxAgent
diff --git a/tests/ga/test_update.py b/tests/ga/test_update.py index a431a9b6..5277e594 100644 --- a/tests/ga/test_update.py +++ b/tests/ga/test_update.py @@ -17,30 +17,10 @@ from __future__ import print_function -import copy -import glob -import json -import os -import platform -import random -import re -import subprocess -import sys -import tempfile -import zipfile - -from tests.protocol.mockwiredata import * -from tests.tools import * - -import azurelinuxagent.common.logger as logger -import azurelinuxagent.common.utils.fileutil as fileutil - -from azurelinuxagent.common.exception import UpdateError -from azurelinuxagent.common.protocol.restapi import * +from azurelinuxagent.common.protocol.hostplugin import * from azurelinuxagent.common.protocol.wire import * -from azurelinuxagent.common.utils.flexible_version import FlexibleVersion -from azurelinuxagent.common.version import AGENT_NAME, AGENT_VERSION from azurelinuxagent.ga.update import * +from tests.tools import * NO_ERROR = { "last_failure" : 0.0, @@ -194,7 +174,7 @@ class UpdateTestCase(AgentTestCase): self.copy_agents(get_agent_pkgs()[0]) self.expand_agents() count -= 1 - + # Determine the most recent agent version versions = self.agent_versions() src_v = FlexibleVersion(str(versions[0])) @@ -290,11 +270,11 @@ class TestGuestAgentError(UpdateTestCase): for i in range(0, MAX_FAILURE): err.mark_failure() - + # Agent failed >= MAX_FAILURE, it should be blacklisted self.assertTrue(err.is_blacklisted) self.assertEqual(MAX_FAILURE, err.failure_count) - + # Clear old failure does not clear recent failure err.clear_old_failure() self.assertTrue(err.is_blacklisted) @@ -396,7 +376,7 @@ class TestGuestAgent(UpdateTestCase): self.assertFalse(agent.is_available) agent._unpack() self.assertTrue(agent.is_available) - + agent.mark_failure(is_fatal=True) self.assertFalse(agent.is_available) return @@ -409,7 +389,7 @@ class TestGuestAgent(UpdateTestCase): agent._unpack() self.assertFalse(agent.is_blacklisted) self.assertEqual(agent.is_blacklisted, agent.error.is_blacklisted) - + agent.mark_failure(is_fatal=True) self.assertTrue(agent.is_blacklisted) self.assertEqual(agent.is_blacklisted, agent.error.is_blacklisted) @@ -525,7 +505,7 @@ class TestGuestAgent(UpdateTestCase): self.assertFalse(os.path.isdir(self.agent_path)) mock_http_get.return_value= ResponseMock(status=restutil.httpclient.SERVICE_UNAVAILABLE) - + pkg = ExtHandlerPackage(version=str(get_agent_version())) pkg.uris.append(ExtHandlerPackageUri()) agent = GuestAgent(pkg=pkg) @@ -546,6 +526,8 @@ class TestGuestAgent(UpdateTestCase): ext_uri = 'ext_uri' host_uri = 'host_uri' + api_uri = URI_FORMAT_GET_API_VERSIONS.format(host_uri, HOST_PLUGIN_PORT) + art_uri = URI_FORMAT_GET_EXTENSION_ARTIFACT.format(host_uri, HOST_PLUGIN_PORT) mock_host = HostPluginProtocol(host_uri, 'container_id', 'role_config') @@ -555,13 +537,29 @@ class TestGuestAgent(UpdateTestCase): agent = GuestAgent(pkg=pkg) agent.host = mock_host + # ensure fallback fails gracefully, no http + self.assertRaises(UpdateError, agent._download) + self.assertEqual(mock_http_get.call_count, 2) + self.assertEqual(mock_http_get.call_args_list[0][0][0], ext_uri) + self.assertEqual(mock_http_get.call_args_list[1][0][0], api_uri) + + # ensure fallback fails gracefully, artifact api failure with patch.object(HostPluginProtocol, - "get_artifact_request", - return_value=[host_uri, {}]): + "ensure_initialized", + return_value=True): self.assertRaises(UpdateError, agent._download) - self.assertEqual(mock_http_get.call_count, 2) - self.assertEqual(mock_http_get.call_args_list[0][0][0], ext_uri) - self.assertEqual(mock_http_get.call_args_list[1][0][0], host_uri) + self.assertEqual(mock_http_get.call_count, 4) + self.assertEqual(mock_http_get.call_args_list[2][0][0], ext_uri) + self.assertEqual(mock_http_get.call_args_list[3][0][0], art_uri) + + # ensure fallback works as expected + with patch.object(HostPluginProtocol, + "get_artifact_request", + return_value=[art_uri, {}]): + self.assertRaises(UpdateError, agent._download) + self.assertEqual(mock_http_get.call_count, 6) + self.assertEqual(mock_http_get.call_args_list[4][0][0], ext_uri) + self.assertEqual(mock_http_get.call_args_list[5][0][0], art_uri) @patch("azurelinuxagent.ga.update.restutil.http_get") def test_ensure_downloaded(self, mock_http_get): @@ -688,7 +686,7 @@ class TestUpdate(UpdateTestCase): protocol=None, versions=None, count=5): - + latest_version = self.prepare_agents(count=count) if versions is None or len(versions) <= 0: versions = [latest_version] @@ -741,7 +739,7 @@ class TestUpdate(UpdateTestCase): self.prepare_agents() agent_count = self.agent_count() self.assertEqual(5, agent_count) - + agent_versions = self.agent_versions()[:3] self.assertTrue(self._test_upgrade_available(versions=agent_versions)) self.assertEqual(len(agent_versions), len(self.update_handler.agents)) @@ -793,7 +791,7 @@ class TestUpdate(UpdateTestCase): return iterations[0] < invocations mock_util.check_pid_alive = Mock(side_effect=iterator) - + with patch('os.getpid', return_value=42): with patch('time.sleep', return_value=None) as mock_sleep: self.update_handler._ensure_no_orphans(orphan_wait_interval=interval) @@ -1178,7 +1176,7 @@ class TestUpdate(UpdateTestCase): # reference. Incrementing an item of a list changes an item to # which the code has a reference. # See http://stackoverflow.com/questions/26408941/python-nested-functions-and-variable-scope - iterations = [0] + iterations = [0] def iterator(*args, **kwargs): iterations[0] += 1 if iterations[0] >= invocations:
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 2, "test_score": 1 }, "num_modified_files": 6 }
2.2
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "pyasn1", "nose", "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.4", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work certifi==2021.5.30 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work nose==1.3.7 packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pyasn1==0.5.1 pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work pytest==6.2.4 toml @ file:///tmp/build/80754af9/toml_1616166611790/work typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work -e git+https://github.com/Azure/WALinuxAgent.git@d3a25f6cba37f8f18330d1a55500a4648d22dc49#egg=WALinuxAgent zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work
name: WALinuxAgent channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=21.4.0=pyhd3eb1b0_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - importlib-metadata=4.8.1=py36h06a4308_0 - importlib_metadata=4.8.1=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - more-itertools=8.12.0=pyhd3eb1b0_0 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=21.3=pyhd3eb1b0_0 - pip=21.2.2=py36h06a4308_0 - pluggy=0.13.1=py36h06a4308_0 - py=1.11.0=pyhd3eb1b0_0 - pyparsing=3.0.4=pyhd3eb1b0_0 - pytest=6.2.4=py36h06a4308_2 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - toml=0.10.2=pyhd3eb1b0_0 - typing_extensions=4.1.1=pyh06a4308_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zipp=3.6.0=pyhd3eb1b0_0 - zlib=1.2.13=h5eee18b_1 - pip: - nose==1.3.7 - pyasn1==0.5.1 prefix: /opt/conda/envs/WALinuxAgent
[ "tests/ga/test_update.py::TestGuestAgent::test_download_fallback" ]
[]
[ "tests/ga/test_update.py::TestGuestAgentError::test_clear", "tests/ga/test_update.py::TestGuestAgentError::test_creation", "tests/ga/test_update.py::TestGuestAgentError::test_load_preserves_error_state", "tests/ga/test_update.py::TestGuestAgentError::test_mark_failure", "tests/ga/test_update.py::TestGuestAgentError::test_mark_failure_permanent", "tests/ga/test_update.py::TestGuestAgentError::test_save", "tests/ga/test_update.py::TestGuestAgentError::test_str", "tests/ga/test_update.py::TestGuestAgent::test_clear_error", "tests/ga/test_update.py::TestGuestAgent::test_creation", "tests/ga/test_update.py::TestGuestAgent::test_download", "tests/ga/test_update.py::TestGuestAgent::test_download_fail", "tests/ga/test_update.py::TestGuestAgent::test_ensure_download_skips_blacklisted", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_download_fails", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_load_manifest_fails", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_unpack_fails", "tests/ga/test_update.py::TestGuestAgent::test_is_available", "tests/ga/test_update.py::TestGuestAgent::test_is_blacklisted", "tests/ga/test_update.py::TestGuestAgent::test_is_downloaded", "tests/ga/test_update.py::TestGuestAgent::test_load_error", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_is_empty", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_is_malformed", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_missing", "tests/ga/test_update.py::TestGuestAgent::test_mark_failure", "tests/ga/test_update.py::TestGuestAgent::test_unpack", "tests/ga/test_update.py::TestGuestAgent::test_unpack_fail", "tests/ga/test_update.py::TestUpdate::test_creation", "tests/ga/test_update.py::TestUpdate::test_emit_restart_event_emits_event_if_not_clean_start", "tests/ga/test_update.py::TestUpdate::test_emit_restart_event_writes_sentinal_file", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans_ignores_exceptions", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans_kills_after_interval", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans_skips_if_no_orphans", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_ignores_installed_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_raises_exception_for_restarting_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_resets_with_new_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_will_not_raise_exception_for_long_restarts", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_will_not_raise_exception_too_few_restarts", "tests/ga/test_update.py::TestUpdate::test_filter_blacklisted_agents", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_excluded", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_no_updates", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_skip_updates", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_skips_unavailable", "tests/ga/test_update.py::TestUpdate::test_get_pid_files", "tests/ga/test_update.py::TestUpdate::test_get_pid_files_returns_previous", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_false_for_current_agent", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_false_for_exceptions", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_true_sentinal_agent_is_not_current", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_true_when_no_sentinal", "tests/ga/test_update.py::TestUpdate::test_is_orphaned_returns_false_if_parent_exists", "tests/ga/test_update.py::TestUpdate::test_is_orphaned_returns_true_if_parent_does_not_exist", "tests/ga/test_update.py::TestUpdate::test_is_orphaned_returns_true_if_parent_is_init", "tests/ga/test_update.py::TestUpdate::test_load_agents", "tests/ga/test_update.py::TestUpdate::test_load_agents_does_reload", "tests/ga/test_update.py::TestUpdate::test_load_agents_sorts", "tests/ga/test_update.py::TestUpdate::test_purge_agents", "tests/ga/test_update.py::TestUpdate::test_run", "tests/ga/test_update.py::TestUpdate::test_run_clears_sentinal_on_successful_exit", "tests/ga/test_update.py::TestUpdate::test_run_emits_restart_event", "tests/ga/test_update.py::TestUpdate::test_run_keeps_running", "tests/ga/test_update.py::TestUpdate::test_run_latest", "tests/ga/test_update.py::TestUpdate::test_run_latest_captures_signals", "tests/ga/test_update.py::TestUpdate::test_run_latest_creates_only_one_signal_handler", "tests/ga/test_update.py::TestUpdate::test_run_latest_defaults_to_current", "tests/ga/test_update.py::TestUpdate::test_run_latest_exception_blacklists", "tests/ga/test_update.py::TestUpdate::test_run_latest_forwards_output", "tests/ga/test_update.py::TestUpdate::test_run_latest_nonzero_code_marks_failures", "tests/ga/test_update.py::TestUpdate::test_run_latest_polling_stops_at_failure", "tests/ga/test_update.py::TestUpdate::test_run_latest_polling_stops_at_success", "tests/ga/test_update.py::TestUpdate::test_run_latest_polls_and_waits_for_success", "tests/ga/test_update.py::TestUpdate::test_run_leaves_sentinal_on_unsuccessful_exit", "tests/ga/test_update.py::TestUpdate::test_run_stops_if_orphaned", "tests/ga/test_update.py::TestUpdate::test_run_stops_if_update_available", "tests/ga/test_update.py::TestUpdate::test_set_agents_sets_agents", "tests/ga/test_update.py::TestUpdate::test_set_agents_sorts_agents", "tests/ga/test_update.py::TestUpdate::test_set_sentinal", "tests/ga/test_update.py::TestUpdate::test_set_sentinal_writes_current_agent", "tests/ga/test_update.py::TestUpdate::test_shutdown", "tests/ga/test_update.py::TestUpdate::test_shutdown_ignores_exceptions", "tests/ga/test_update.py::TestUpdate::test_shutdown_ignores_missing_sentinal_file", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_handles_missing_family", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_includes_old_agents", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_purges_old_agents", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_returns_true_on_first_use", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_skips_if_too_frequent", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_skips_if_when_no_new_versions", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_skips_when_no_versions", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_skips_when_updates_are_disabled", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_sorts", "tests/ga/test_update.py::TestUpdate::test_write_pid_file", "tests/ga/test_update.py::TestUpdate::test_write_pid_file_ignores_exceptions" ]
[]
Apache License 2.0
null
Azure__WALinuxAgent-603
d3a25f6cba37f8f18330d1a55500a4648d22dc49
2017-03-03 23:32:44
6e9b985c1d7d564253a1c344bab01b45093103cd
brendandixon: LGTM
diff --git a/azurelinuxagent/common/protocol/hostplugin.py b/azurelinuxagent/common/protocol/hostplugin.py index 4c4c2290..bdae56e2 100644 --- a/azurelinuxagent/common/protocol/hostplugin.py +++ b/azurelinuxagent/common/protocol/hostplugin.py @@ -80,10 +80,10 @@ class HostPluginProtocol(object): def get_artifact_request(self, artifact_url, artifact_manifest_url=None): if not self.ensure_initialized(): logger.error("host plugin channel is not available") - return + return None, None if textutil.is_str_none_or_whitespace(artifact_url): logger.error("no extension artifact url was provided") - return + return None, None url = URI_FORMAT_GET_EXTENSION_ARTIFACT.format(self.endpoint, HOST_PLUGIN_PORT) diff --git a/azurelinuxagent/common/rdma.py b/azurelinuxagent/common/rdma.py index ba9a0294..226482d3 100644 --- a/azurelinuxagent/common/rdma.py +++ b/azurelinuxagent/common/rdma.py @@ -133,14 +133,14 @@ class RDMAHandler(object): """Load the kernel driver, this depends on the proper driver to be installed with the install_driver() method""" logger.info("RDMA: probing module '%s'" % self.driver_module_name) - result = shellutil.run('modprobe %s' % self.driver_module_name) + result = shellutil.run('modprobe --first-time %s' % self.driver_module_name) if result != 0: error_msg = 'Could not load "%s" kernel module. ' - error_msg += 'Run "modprobe %s" as root for more details' + error_msg += 'Run "modprobe --first-time %s" as root for more details' logger.error( error_msg % (self.driver_module_name, self.driver_module_name) ) - return + return False logger.info('RDMA: Loaded the kernel driver successfully.') return True @@ -158,6 +158,7 @@ class RDMAHandler(object): logger.info('RDMA: module loaded.') return True logger.info('RDMA: module not loaded.') + return False def reboot_system(self): """Reboot the system. This is required as the kernel module for diff --git a/azurelinuxagent/ga/exthandlers.py b/azurelinuxagent/ga/exthandlers.py index c563cc85..9b99d041 100644 --- a/azurelinuxagent/ga/exthandlers.py +++ b/azurelinuxagent/ga/exthandlers.py @@ -341,7 +341,7 @@ class ExtHandlerInstance(object): self.logger = logger.Logger(logger.DEFAULT_LOGGER, prefix) try: - fileutil.mkdir(self.get_log_dir(), mode=0o744) + fileutil.mkdir(self.get_log_dir(), mode=0o755) except IOError as e: self.logger.error(u"Failed to create extension log dir: {0}", e) diff --git a/azurelinuxagent/ga/update.py b/azurelinuxagent/ga/update.py index ed05135c..59bc70c5 100644 --- a/azurelinuxagent/ga/update.py +++ b/azurelinuxagent/ga/update.py @@ -701,11 +701,15 @@ class GuestAgent(object): if self._fetch(uri.uri): break else: - if self.host is not None: + if self.host is not None and self.host.ensure_initialized(): logger.warn("Download unsuccessful, falling back to host plugin") uri, headers = self.host.get_artifact_request(uri.uri, self.host.manifest_uri) - if self._fetch(uri, headers=headers): + if uri is not None \ + and headers is not None \ + and self._fetch(uri, headers=headers): break + else: + logger.warn("Download unsuccessful, host plugin not available") if not os.path.isfile(self.get_agent_pkg_path()): msg = u"Unable to download Agent {0} from any URI".format(self.name) diff --git a/azurelinuxagent/pa/provision/ubuntu.py b/azurelinuxagent/pa/provision/ubuntu.py index 60b9a89a..a71df374 100644 --- a/azurelinuxagent/pa/provision/ubuntu.py +++ b/azurelinuxagent/pa/provision/ubuntu.py @@ -89,8 +89,14 @@ class UbuntuProvisionHandler(ProvisionHandler): path = '/etc/ssh/ssh_host_{0}_key.pub'.format(keypair_type) for retry in range(0, max_retry): if os.path.isfile(path): - return self.get_ssh_host_key_thumbprint(keypair_type) + logger.info("ssh host key found at: {0}".format(path)) + try: + thumbprint = self.get_ssh_host_key_thumbprint(keypair_type) + logger.info("Thumbprint obtained from : {0}".format(path)) + return thumbprint + except ProvisionError: + logger.warn("Could not get thumbprint from {0}".format(path)) if retry < max_retry - 1: - logger.info("Wait for ssh host key be generated: {0}", path) + logger.info("Wait for ssh host key be generated: {0}".format(path)) time.sleep(5) raise ProvisionError("ssh host key is not generated.") diff --git a/azurelinuxagent/pa/rdma/centos.py b/azurelinuxagent/pa/rdma/centos.py index 8ad09c54..214f9ead 100644 --- a/azurelinuxagent/pa/rdma/centos.py +++ b/azurelinuxagent/pa/rdma/centos.py @@ -173,8 +173,7 @@ class CentOSRDMAHandler(RDMAHandler): 'user mode', self.rdma_user_mode_package_name, umod_pkg_path) logger.info("RDMA: driver packages installed") - self.load_driver_module() - if not self.is_driver_loaded(): + if not self.load_driver_module() or not self.is_driver_loaded(): logger.info("RDMA: driver module is not loaded; reboot required") self.reboot_system() else: diff --git a/azurelinuxagent/pa/rdma/suse.py b/azurelinuxagent/pa/rdma/suse.py index f0d8d0f5..d31b2b08 100644 --- a/azurelinuxagent/pa/rdma/suse.py +++ b/azurelinuxagent/pa/rdma/suse.py @@ -93,8 +93,7 @@ class SUSERDMAHandler(RDMAHandler): msg = 'RDMA: Successfully installed "%s" from ' msg += 'configured repositories' logger.info(msg % complete_name) - self.load_driver_module() - if requires_reboot: + if not self.load_driver_module() or requires_reboot: self.reboot_system() return True else: @@ -119,8 +118,7 @@ class SUSERDMAHandler(RDMAHandler): msg = 'RDMA: Successfully installed "%s" from ' msg += 'local package cache' logger.info(msg % (local_package)) - self.load_driver_module() - if requires_reboot: + if not self.load_driver_module() or requires_reboot: self.reboot_system() return True else:
Timing Issue with cloud-init and host keys Under some circumstances, provisioning can fail waiting for cloud-init to regenerate SSH host keys: ``` 2017/02/08 23:03:23.712479 INFO Wait for ssh host key to be generated. 2017/02/08 23:03:23.756726 ERROR run cmd 'ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub' failed 2017/02/08 23:03:23.762243 ERROR Error Code:255 2017/02/08 23:03:23.766393 ERROR Result:ssh-keygen: /etc/ssh/ssh_host_rsa_key.pub: No such file or directory 2017/02/08 23:03:23.775621 ERROR Provision failed: (000004)**Failed to generate ssh host key: ret=255, out= ssh-keygen: /etc/ssh/ssh_host_rsa_key.pub: No such file or directory** ``` Waagent checks the thumbprint of the host rsa pub file to validate that the key is regenerated. If the file doesn't exist, it waits up to 5 minutes for it to be generated. Based on the logs, the sequence of events seems to be 1. Waagent confirms existence of the file 2. Cloud-init deletes the file and begins generating a new file 3. Waagent tries and fails to get the thumbprint because the file doesn't exist One or both of the following should be implemented: 1. Use more caution when exiting from this function with error. If the thumbprint operation finds that the file doesn't exist (when it was just confirmed to exist by other means), we should try again. 2. If the expectation is that the SSH host keys are deleted before provisioning, then waagent -deprovision should delete them.
Azure/WALinuxAgent
diff --git a/tests/ga/test_update.py b/tests/ga/test_update.py index a431a9b6..5277e594 100644 --- a/tests/ga/test_update.py +++ b/tests/ga/test_update.py @@ -17,30 +17,10 @@ from __future__ import print_function -import copy -import glob -import json -import os -import platform -import random -import re -import subprocess -import sys -import tempfile -import zipfile - -from tests.protocol.mockwiredata import * -from tests.tools import * - -import azurelinuxagent.common.logger as logger -import azurelinuxagent.common.utils.fileutil as fileutil - -from azurelinuxagent.common.exception import UpdateError -from azurelinuxagent.common.protocol.restapi import * +from azurelinuxagent.common.protocol.hostplugin import * from azurelinuxagent.common.protocol.wire import * -from azurelinuxagent.common.utils.flexible_version import FlexibleVersion -from azurelinuxagent.common.version import AGENT_NAME, AGENT_VERSION from azurelinuxagent.ga.update import * +from tests.tools import * NO_ERROR = { "last_failure" : 0.0, @@ -194,7 +174,7 @@ class UpdateTestCase(AgentTestCase): self.copy_agents(get_agent_pkgs()[0]) self.expand_agents() count -= 1 - + # Determine the most recent agent version versions = self.agent_versions() src_v = FlexibleVersion(str(versions[0])) @@ -290,11 +270,11 @@ class TestGuestAgentError(UpdateTestCase): for i in range(0, MAX_FAILURE): err.mark_failure() - + # Agent failed >= MAX_FAILURE, it should be blacklisted self.assertTrue(err.is_blacklisted) self.assertEqual(MAX_FAILURE, err.failure_count) - + # Clear old failure does not clear recent failure err.clear_old_failure() self.assertTrue(err.is_blacklisted) @@ -396,7 +376,7 @@ class TestGuestAgent(UpdateTestCase): self.assertFalse(agent.is_available) agent._unpack() self.assertTrue(agent.is_available) - + agent.mark_failure(is_fatal=True) self.assertFalse(agent.is_available) return @@ -409,7 +389,7 @@ class TestGuestAgent(UpdateTestCase): agent._unpack() self.assertFalse(agent.is_blacklisted) self.assertEqual(agent.is_blacklisted, agent.error.is_blacklisted) - + agent.mark_failure(is_fatal=True) self.assertTrue(agent.is_blacklisted) self.assertEqual(agent.is_blacklisted, agent.error.is_blacklisted) @@ -525,7 +505,7 @@ class TestGuestAgent(UpdateTestCase): self.assertFalse(os.path.isdir(self.agent_path)) mock_http_get.return_value= ResponseMock(status=restutil.httpclient.SERVICE_UNAVAILABLE) - + pkg = ExtHandlerPackage(version=str(get_agent_version())) pkg.uris.append(ExtHandlerPackageUri()) agent = GuestAgent(pkg=pkg) @@ -546,6 +526,8 @@ class TestGuestAgent(UpdateTestCase): ext_uri = 'ext_uri' host_uri = 'host_uri' + api_uri = URI_FORMAT_GET_API_VERSIONS.format(host_uri, HOST_PLUGIN_PORT) + art_uri = URI_FORMAT_GET_EXTENSION_ARTIFACT.format(host_uri, HOST_PLUGIN_PORT) mock_host = HostPluginProtocol(host_uri, 'container_id', 'role_config') @@ -555,13 +537,29 @@ class TestGuestAgent(UpdateTestCase): agent = GuestAgent(pkg=pkg) agent.host = mock_host + # ensure fallback fails gracefully, no http + self.assertRaises(UpdateError, agent._download) + self.assertEqual(mock_http_get.call_count, 2) + self.assertEqual(mock_http_get.call_args_list[0][0][0], ext_uri) + self.assertEqual(mock_http_get.call_args_list[1][0][0], api_uri) + + # ensure fallback fails gracefully, artifact api failure with patch.object(HostPluginProtocol, - "get_artifact_request", - return_value=[host_uri, {}]): + "ensure_initialized", + return_value=True): self.assertRaises(UpdateError, agent._download) - self.assertEqual(mock_http_get.call_count, 2) - self.assertEqual(mock_http_get.call_args_list[0][0][0], ext_uri) - self.assertEqual(mock_http_get.call_args_list[1][0][0], host_uri) + self.assertEqual(mock_http_get.call_count, 4) + self.assertEqual(mock_http_get.call_args_list[2][0][0], ext_uri) + self.assertEqual(mock_http_get.call_args_list[3][0][0], art_uri) + + # ensure fallback works as expected + with patch.object(HostPluginProtocol, + "get_artifact_request", + return_value=[art_uri, {}]): + self.assertRaises(UpdateError, agent._download) + self.assertEqual(mock_http_get.call_count, 6) + self.assertEqual(mock_http_get.call_args_list[4][0][0], ext_uri) + self.assertEqual(mock_http_get.call_args_list[5][0][0], art_uri) @patch("azurelinuxagent.ga.update.restutil.http_get") def test_ensure_downloaded(self, mock_http_get): @@ -688,7 +686,7 @@ class TestUpdate(UpdateTestCase): protocol=None, versions=None, count=5): - + latest_version = self.prepare_agents(count=count) if versions is None or len(versions) <= 0: versions = [latest_version] @@ -741,7 +739,7 @@ class TestUpdate(UpdateTestCase): self.prepare_agents() agent_count = self.agent_count() self.assertEqual(5, agent_count) - + agent_versions = self.agent_versions()[:3] self.assertTrue(self._test_upgrade_available(versions=agent_versions)) self.assertEqual(len(agent_versions), len(self.update_handler.agents)) @@ -793,7 +791,7 @@ class TestUpdate(UpdateTestCase): return iterations[0] < invocations mock_util.check_pid_alive = Mock(side_effect=iterator) - + with patch('os.getpid', return_value=42): with patch('time.sleep', return_value=None) as mock_sleep: self.update_handler._ensure_no_orphans(orphan_wait_interval=interval) @@ -1178,7 +1176,7 @@ class TestUpdate(UpdateTestCase): # reference. Incrementing an item of a list changes an item to # which the code has a reference. # See http://stackoverflow.com/questions/26408941/python-nested-functions-and-variable-scope - iterations = [0] + iterations = [0] def iterator(*args, **kwargs): iterations[0] += 1 if iterations[0] >= invocations:
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 3, "issue_text_score": 1, "test_score": 2 }, "num_modified_files": 7 }
2.2
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "nose", "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.4", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work certifi==2021.5.30 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work nose==1.3.7 packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work pytest==6.2.4 toml @ file:///tmp/build/80754af9/toml_1616166611790/work typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work -e git+https://github.com/Azure/WALinuxAgent.git@d3a25f6cba37f8f18330d1a55500a4648d22dc49#egg=WALinuxAgent zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work
name: WALinuxAgent channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=21.4.0=pyhd3eb1b0_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - importlib-metadata=4.8.1=py36h06a4308_0 - importlib_metadata=4.8.1=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - more-itertools=8.12.0=pyhd3eb1b0_0 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=21.3=pyhd3eb1b0_0 - pip=21.2.2=py36h06a4308_0 - pluggy=0.13.1=py36h06a4308_0 - py=1.11.0=pyhd3eb1b0_0 - pyparsing=3.0.4=pyhd3eb1b0_0 - pytest=6.2.4=py36h06a4308_2 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - toml=0.10.2=pyhd3eb1b0_0 - typing_extensions=4.1.1=pyh06a4308_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zipp=3.6.0=pyhd3eb1b0_0 - zlib=1.2.13=h5eee18b_1 - pip: - nose==1.3.7 prefix: /opt/conda/envs/WALinuxAgent
[ "tests/ga/test_update.py::TestGuestAgent::test_download_fallback" ]
[]
[ "tests/ga/test_update.py::TestGuestAgentError::test_clear", "tests/ga/test_update.py::TestGuestAgentError::test_creation", "tests/ga/test_update.py::TestGuestAgentError::test_load_preserves_error_state", "tests/ga/test_update.py::TestGuestAgentError::test_mark_failure", "tests/ga/test_update.py::TestGuestAgentError::test_mark_failure_permanent", "tests/ga/test_update.py::TestGuestAgentError::test_save", "tests/ga/test_update.py::TestGuestAgentError::test_str", "tests/ga/test_update.py::TestGuestAgent::test_clear_error", "tests/ga/test_update.py::TestGuestAgent::test_creation", "tests/ga/test_update.py::TestGuestAgent::test_download", "tests/ga/test_update.py::TestGuestAgent::test_download_fail", "tests/ga/test_update.py::TestGuestAgent::test_ensure_download_skips_blacklisted", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_download_fails", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_load_manifest_fails", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_unpack_fails", "tests/ga/test_update.py::TestGuestAgent::test_is_available", "tests/ga/test_update.py::TestGuestAgent::test_is_blacklisted", "tests/ga/test_update.py::TestGuestAgent::test_is_downloaded", "tests/ga/test_update.py::TestGuestAgent::test_load_error", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_is_empty", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_is_malformed", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_missing", "tests/ga/test_update.py::TestGuestAgent::test_mark_failure", "tests/ga/test_update.py::TestGuestAgent::test_unpack", "tests/ga/test_update.py::TestGuestAgent::test_unpack_fail", "tests/ga/test_update.py::TestUpdate::test_creation", "tests/ga/test_update.py::TestUpdate::test_emit_restart_event_emits_event_if_not_clean_start", "tests/ga/test_update.py::TestUpdate::test_emit_restart_event_writes_sentinal_file", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans_ignores_exceptions", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans_kills_after_interval", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans_skips_if_no_orphans", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_ignores_installed_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_raises_exception_for_restarting_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_resets_with_new_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_will_not_raise_exception_for_long_restarts", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_will_not_raise_exception_too_few_restarts", "tests/ga/test_update.py::TestUpdate::test_filter_blacklisted_agents", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_excluded", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_no_updates", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_skip_updates", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_skips_unavailable", "tests/ga/test_update.py::TestUpdate::test_get_pid_files", "tests/ga/test_update.py::TestUpdate::test_get_pid_files_returns_previous", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_false_for_current_agent", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_false_for_exceptions", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_true_sentinal_agent_is_not_current", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_true_when_no_sentinal", "tests/ga/test_update.py::TestUpdate::test_is_orphaned_returns_false_if_parent_exists", "tests/ga/test_update.py::TestUpdate::test_is_orphaned_returns_true_if_parent_does_not_exist", "tests/ga/test_update.py::TestUpdate::test_is_orphaned_returns_true_if_parent_is_init", "tests/ga/test_update.py::TestUpdate::test_load_agents", "tests/ga/test_update.py::TestUpdate::test_load_agents_does_reload", "tests/ga/test_update.py::TestUpdate::test_load_agents_sorts", "tests/ga/test_update.py::TestUpdate::test_purge_agents", "tests/ga/test_update.py::TestUpdate::test_run", "tests/ga/test_update.py::TestUpdate::test_run_clears_sentinal_on_successful_exit", "tests/ga/test_update.py::TestUpdate::test_run_emits_restart_event", "tests/ga/test_update.py::TestUpdate::test_run_keeps_running", "tests/ga/test_update.py::TestUpdate::test_run_latest", "tests/ga/test_update.py::TestUpdate::test_run_latest_captures_signals", "tests/ga/test_update.py::TestUpdate::test_run_latest_creates_only_one_signal_handler", "tests/ga/test_update.py::TestUpdate::test_run_latest_defaults_to_current", "tests/ga/test_update.py::TestUpdate::test_run_latest_exception_blacklists", "tests/ga/test_update.py::TestUpdate::test_run_latest_forwards_output", "tests/ga/test_update.py::TestUpdate::test_run_latest_nonzero_code_marks_failures", "tests/ga/test_update.py::TestUpdate::test_run_latest_polling_stops_at_failure", "tests/ga/test_update.py::TestUpdate::test_run_latest_polling_stops_at_success", "tests/ga/test_update.py::TestUpdate::test_run_latest_polls_and_waits_for_success", "tests/ga/test_update.py::TestUpdate::test_run_leaves_sentinal_on_unsuccessful_exit", "tests/ga/test_update.py::TestUpdate::test_run_stops_if_orphaned", "tests/ga/test_update.py::TestUpdate::test_run_stops_if_update_available", "tests/ga/test_update.py::TestUpdate::test_set_agents_sets_agents", "tests/ga/test_update.py::TestUpdate::test_set_agents_sorts_agents", "tests/ga/test_update.py::TestUpdate::test_set_sentinal", "tests/ga/test_update.py::TestUpdate::test_set_sentinal_writes_current_agent", "tests/ga/test_update.py::TestUpdate::test_shutdown", "tests/ga/test_update.py::TestUpdate::test_shutdown_ignores_exceptions", "tests/ga/test_update.py::TestUpdate::test_shutdown_ignores_missing_sentinal_file", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_handles_missing_family", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_includes_old_agents", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_purges_old_agents", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_returns_true_on_first_use", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_skips_if_too_frequent", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_skips_if_when_no_new_versions", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_skips_when_no_versions", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_skips_when_updates_are_disabled", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_sorts", "tests/ga/test_update.py::TestUpdate::test_write_pid_file", "tests/ga/test_update.py::TestUpdate::test_write_pid_file_ignores_exceptions" ]
[]
Apache License 2.0
null
Azure__WALinuxAgent-638
7676bf85131673d4a02dcc43b18cdf24bb3a36ab
2017-03-30 23:31:41
6e9b985c1d7d564253a1c344bab01b45093103cd
diff --git a/azurelinuxagent/common/osutil/factory.py b/azurelinuxagent/common/osutil/factory.py index acd7f6ed..eee9f97a 100644 --- a/azurelinuxagent/common/osutil/factory.py +++ b/azurelinuxagent/common/osutil/factory.py @@ -76,6 +76,9 @@ def get_osutil(distro_name=DISTRO_NAME, else: return RedhatOSUtil() + elif distro_name == "euleros": + return RedhatOSUtil() + elif distro_name == "freebsd": return FreeBSDOSUtil() diff --git a/azurelinuxagent/common/protocol/hostplugin.py b/azurelinuxagent/common/protocol/hostplugin.py index f4ece298..d76326d4 100644 --- a/azurelinuxagent/common/protocol/hostplugin.py +++ b/azurelinuxagent/common/protocol/hostplugin.py @@ -38,6 +38,8 @@ MAXIMUM_PAGEBLOB_PAGE_SIZE = 4 * 1024 * 1024 # Max page size: 4MB class HostPluginProtocol(object): + _is_default_channel = False + def __init__(self, endpoint, container_id, role_config_name): if endpoint is None: raise ProtocolError("HostGAPlugin: Endpoint not provided") @@ -50,6 +52,14 @@ class HostPluginProtocol(object): self.role_config_name = role_config_name self.manifest_uri = None + @staticmethod + def is_default_channel(): + return HostPluginProtocol._is_default_channel + + @staticmethod + def set_default_channel(is_default): + HostPluginProtocol._is_default_channel = is_default + def ensure_initialized(self): if not self.is_initialized: self.api_versions = self.get_api_versions() @@ -74,7 +84,7 @@ class HostPluginProtocol(object): if response.status != httpclient.OK: logger.error( "HostGAPlugin: Failed Get API versions: {0}".format( - self._read_response_error(response))) + self.read_response_error(response))) else: return_val = ustr(remove_bom(response.read()), encoding='utf-8') @@ -165,7 +175,7 @@ class HostPluginProtocol(object): except Exception as e: logger.error("HostGAPlugin: Exception Put VM status: {0}", e) - + def _put_block_blob_status(self, sas_url, status_blob): url = URI_FORMAT_PUT_VM_STATUS.format(self.endpoint, HOST_PLUGIN_PORT) @@ -178,7 +188,7 @@ class HostPluginProtocol(object): if response.status != httpclient.OK: raise HttpError("HostGAPlugin: Put BlockBlob failed: {0}".format( - self._read_response_error(response))) + self.read_response_error(response))) else: logger.verbose("HostGAPlugin: Put BlockBlob status succeeded") @@ -200,7 +210,7 @@ class HostPluginProtocol(object): if response.status != httpclient.OK: raise HttpError( "HostGAPlugin: Failed PageBlob clean-up: {0}".format( - self._read_response_error(response))) + self.read_response_error(response))) else: logger.verbose("HostGAPlugin: PageBlob clean-up succeeded") @@ -231,7 +241,7 @@ class HostPluginProtocol(object): raise HttpError( "HostGAPlugin Error: Put PageBlob bytes [{0},{1}]: " \ "{2}".format( - start, end, self._read_response_error(response))) + start, end, self.read_response_error(response))) # Advance to the next page (if any) start = end @@ -266,9 +276,12 @@ class HostPluginProtocol(object): return s.decode('utf-8') return s - def _read_response_error(self, response): + @staticmethod + def read_response_error(response): + if response is None: + return '' body = remove_bom(response.read()) - if PY_VERSION_MAJOR < 3: + if PY_VERSION_MAJOR < 3 and body is not None: body = ustr(body, encoding='utf-8') return "{0}, {1}, {2}".format( response.status, diff --git a/azurelinuxagent/common/protocol/wire.py b/azurelinuxagent/common/protocol/wire.py index db343909..051dfa1b 100644 --- a/azurelinuxagent/common/protocol/wire.py +++ b/azurelinuxagent/common/protocol/wire.py @@ -370,11 +370,14 @@ class StatusBlob(object): __storage_version__ = "2014-02-14" + def prepare(self, blob_type): + logger.verbose("Prepare status blob") + self.data = self.to_json() + self.type = blob_type + def upload(self, url): # TODO upload extension only if content has changed - logger.verbose("Upload status blob") upload_successful = False - self.data = self.to_json() self.type = self.get_blob_type(url) try: if self.type == "BlockBlob": @@ -635,9 +638,14 @@ class WireClient(object): def fetch_manifest(self, version_uris): logger.verbose("Fetch manifest") for version in version_uris: - response = self.fetch(version.uri) + response = None + if not HostPluginProtocol.is_default_channel(): + response = self.fetch(version.uri) if not response: - logger.verbose("Manifest could not be downloaded, falling back to host plugin") + if HostPluginProtocol.is_default_channel(): + logger.verbose("Using host plugin as default channel") + else: + logger.verbose("Manifest could not be downloaded, falling back to host plugin") host = self.get_host_plugin() uri, headers = host.get_artifact_request(version.uri) response = self.fetch(uri, headers) @@ -649,6 +657,9 @@ class WireClient(object): else: host.manifest_uri = version.uri logger.verbose("Manifest downloaded successfully from host plugin") + if not HostPluginProtocol.is_default_channel(): + logger.info("Setting host plugin as default channel") + HostPluginProtocol.set_default_channel(True) if response: return response raise ProtocolError("Failed to fetch manifest from all sources") @@ -664,12 +675,11 @@ class WireClient(object): if resp.status == httpclient.OK: return_value = self.decode_config(resp.read()) else: - logger.warn("Could not fetch {0} [{1}: {2}]", + logger.warn("Could not fetch {0} [{1}]", uri, - resp.status, - resp.reason) + HostPluginProtocol.read_response_error(resp)) except (HttpError, ProtocolError) as e: - logger.verbose("Fetch failed from [{0}]", uri) + logger.verbose("Fetch failed from [{0}]: {1}", uri, e) return return_value def update_hosting_env(self, goal_state): @@ -840,10 +850,12 @@ class WireClient(object): if ext_conf.status_upload_blob is not None: uploaded = False try: - uploaded = self.status_blob.upload(ext_conf.status_upload_blob) - self.report_blob_type(self.status_blob.type, - ext_conf.status_upload_blob_type) - except (HttpError, ProtocolError) as e: + self.status_blob.prepare(ext_conf.status_upload_blob_type) + if not HostPluginProtocol.is_default_channel(): + uploaded = self.status_blob.upload(ext_conf.status_upload_blob) + self.report_blob_type(self.status_blob.type, + ext_conf.status_upload_blob_type) + except (HttpError, ProtocolError): # errors have already been logged pass if not uploaded: @@ -851,6 +863,9 @@ class WireClient(object): host.put_vm_status(self.status_blob, ext_conf.status_upload_blob, ext_conf.status_upload_blob_type) + if not HostPluginProtocol.is_default_channel(): + logger.info("Setting host plugin as default channel") + HostPluginProtocol.set_default_channel(True) """ Emit an event to determine if the type in the extension config diff --git a/azurelinuxagent/common/utils/restutil.py b/azurelinuxagent/common/utils/restutil.py index 71973705..49d2d68f 100644 --- a/azurelinuxagent/common/utils/restutil.py +++ b/azurelinuxagent/common/utils/restutil.py @@ -28,7 +28,7 @@ from azurelinuxagent.common.future import httpclient, urlparse REST api util functions """ -RETRY_WAITING_INTERVAL = 10 +RETRY_WAITING_INTERVAL = 3 secure_warning = True diff --git a/azurelinuxagent/common/version.py b/azurelinuxagent/common/version.py index 0e3818aa..8ee2c18f 100644 --- a/azurelinuxagent/common/version.py +++ b/azurelinuxagent/common/version.py @@ -76,6 +76,9 @@ def get_distro(): osinfo[2] = "oracle" osinfo[3] = "Oracle Linux" + if os.path.exists("/etc/euleros-release"): + osinfo[0] = "euleros" + # The platform.py lib has issue with detecting BIG-IP linux distribution. # Merge the following patch provided by F5. if os.path.exists("/shared/vadc"): diff --git a/azurelinuxagent/daemon/resourcedisk/default.py b/azurelinuxagent/daemon/resourcedisk/default.py index 21de38f0..2b116fb1 100644 --- a/azurelinuxagent/daemon/resourcedisk/default.py +++ b/azurelinuxagent/daemon/resourcedisk/default.py @@ -85,6 +85,11 @@ class ResourceDiskHandler(object): except ResourceDiskError as e: logger.error("Failed to enable swap {0}", e) + def reread_partition_table(self, device): + if shellutil.run("sfdisk -R {0}".format(device), chk_err=False): + shellutil.run("blockdev --rereadpt {0}".format(device), + chk_err=False) + def mount_resource_disk(self, mount_point): device = self.osutil.device_for_ide_port(1) if device is None: @@ -138,12 +143,13 @@ class ResourceDiskHandler(object): shellutil.run(mkfs_string) else: logger.info("GPT not detected, determining filesystem") - ret = self.change_partition_type(suppress_message=True, option_str="{0} 1".format(device)) + ret = self.change_partition_type(suppress_message=True, option_str="{0} 1 -n".format(device)) ptype = ret[1].strip() if ptype == "7" and self.fs != "ntfs": logger.info("The partition is formatted with ntfs, updating " "partition type to 83") self.change_partition_type(suppress_message=False, option_str="{0} 1 83".format(device)) + self.reread_partition_table(device) logger.info("Format partition [{0}]", mkfs_string) shellutil.run(mkfs_string) else: @@ -166,8 +172,8 @@ class ResourceDiskHandler(object): logger.info("Mount resource disk [{0}]", mount_string) ret, output = shellutil.run_get_output(mount_string, chk_err=False) - # if the exit code is 32, then the resource disk is already mounted - if ret == 32: + # if the exit code is 32, then the resource disk can be already mounted + if ret == 32 and output.find("is already mounted") != -1: logger.warn("Could not mount resource disk: {0}", output) elif ret != 0: # Some kernels seem to issue an async partition re-read after a @@ -178,9 +184,7 @@ class ResourceDiskHandler(object): logger.warn("Failed to mount resource disk. " "Retry mounting after re-reading partition info.") - if shellutil.run("sfdisk -R {0}".format(device), chk_err=False): - shellutil.run("blockdev --rereadpt {0}".format(device), - chk_err=False) + self.reread_partition_table(device) ret, output = shellutil.run_get_output(mount_string) if ret: diff --git a/azurelinuxagent/ga/update.py b/azurelinuxagent/ga/update.py index 59bc70c5..a5cbfdbf 100644 --- a/azurelinuxagent/ga/update.py +++ b/azurelinuxagent/ga/update.py @@ -40,6 +40,7 @@ from azurelinuxagent.common.exception import UpdateError, ProtocolError from azurelinuxagent.common.future import ustr from azurelinuxagent.common.osutil import get_osutil from azurelinuxagent.common.protocol import get_protocol_util +from azurelinuxagent.common.protocol.hostplugin import HostPluginProtocol from azurelinuxagent.common.utils.flexible_version import FlexibleVersion from azurelinuxagent.common.version import AGENT_NAME, AGENT_VERSION, AGENT_LONG_VERSION, \ AGENT_DIR_GLOB, AGENT_PKG_GLOB, \ @@ -49,7 +50,6 @@ from azurelinuxagent.common.version import AGENT_NAME, AGENT_VERSION, AGENT_LONG from azurelinuxagent.ga.exthandlers import HandlerManifest - AGENT_ERROR_FILE = "error.json" # File name for agent error record AGENT_MANIFEST_FILE = "HandlerManifest.json" @@ -698,18 +698,26 @@ class GuestAgent(object): def _download(self): for uri in self.pkg.uris: - if self._fetch(uri.uri): + if not HostPluginProtocol.is_default_channel() and self._fetch(uri.uri): break - else: - if self.host is not None and self.host.ensure_initialized(): + elif self.host is not None and self.host.ensure_initialized(): + if not HostPluginProtocol.is_default_channel(): logger.warn("Download unsuccessful, falling back to host plugin") - uri, headers = self.host.get_artifact_request(uri.uri, self.host.manifest_uri) - if uri is not None \ - and headers is not None \ - and self._fetch(uri, headers=headers): - break else: - logger.warn("Download unsuccessful, host plugin not available") + logger.verbose("Using host plugin as default channel") + + uri, headers = self.host.get_artifact_request(uri.uri, self.host.manifest_uri) + if uri is not None \ + and headers is not None \ + and self._fetch(uri, headers=headers): + if not HostPluginProtocol.is_default_channel(): + logger.verbose("Setting host plugin as default channel") + HostPluginProtocol.set_default_channel(True) + break + else: + logger.warn("Host plugin download unsuccessful") + else: + logger.error("No download channels available") if not os.path.isfile(self.get_agent_pkg_path()): msg = u"Unable to download Agent {0} from any URI".format(self.name) @@ -732,6 +740,9 @@ class GuestAgent(object): bytearray(package), asbin=True) logger.info(u"Agent {0} downloaded from {1}", self.name, uri) + else: + logger.verbose("Fetch was unsuccessful [{0}]", + HostPluginProtocol.read_response_error(resp)) except restutil.HttpError as http_error: logger.verbose(u"Agent {0} download from {1} failed [{2}]", self.name, diff --git a/azurelinuxagent/pa/rdma/centos.py b/azurelinuxagent/pa/rdma/centos.py index 214f9ead..942d225f 100644 --- a/azurelinuxagent/pa/rdma/centos.py +++ b/azurelinuxagent/pa/rdma/centos.py @@ -82,7 +82,7 @@ class CentOSRDMAHandler(RDMAHandler): # Example match (pkg name, -, followed by 3 segments, fw_version and -): # - pkg=microsoft-hyper-v-rdma-4.1.0.142-20160323.x86_64 # - fw_version=142 - pattern = '{0}-\d\.\d\.\d\.({1})-'.format( + pattern = '{0}-(\d+\.){3,}({1})-'.format( self.rdma_user_mode_package_name, fw_version) return re.match(pattern, pkg) @@ -156,7 +156,7 @@ class CentOSRDMAHandler(RDMAHandler): # Install kernel mode driver (kmod-microsoft-hyper-v-rdma-*) kmod_pkg = self.get_file_by_pattern( - pkgs, "%s-\d\.\d\.\d\.+(%s)-\d{8}\.x86_64.rpm" % (self.rdma_kernel_mode_package_name, fw_version)) + pkgs, "%s-(\d+\.){3,}(%s)-\d{8}\.x86_64.rpm" % (self.rdma_kernel_mode_package_name, fw_version)) if not kmod_pkg: raise Exception("RDMA kernel mode package not found") kmod_pkg_path = os.path.join(pkg_dir, kmod_pkg) @@ -165,7 +165,7 @@ class CentOSRDMAHandler(RDMAHandler): # Install user mode driver (microsoft-hyper-v-rdma-*) umod_pkg = self.get_file_by_pattern( - pkgs, "%s-\d\.\d\.\d\.+(%s)-\d{8}\.x86_64.rpm" % (self.rdma_user_mode_package_name, fw_version)) + pkgs, "%s-(\d+\.){3,}(%s)-\d{8}\.x86_64.rpm" % (self.rdma_user_mode_package_name, fw_version)) if not umod_pkg: raise Exception("RDMA user mode package not found") umod_pkg_path = os.path.join(pkg_dir, umod_pkg) diff --git a/bin/waagent2.0 b/bin/waagent2.0 index 80af1c73..1a72ba73 100644 --- a/bin/waagent2.0 +++ b/bin/waagent2.0 @@ -1093,6 +1093,18 @@ class centosDistro(redhatDistro): def __init__(self): super(centosDistro,self).__init__() +############################################################ +# eulerosDistro +############################################################ + +class eulerosDistro(redhatDistro): + """ + EulerOS Distro concrete class + Put EulerOS specific behavior here... + """ + def __init__(self): + super(eulerosDistro,self).__init__() + ############################################################ # oracleDistro ############################################################ @@ -6016,6 +6028,8 @@ def DistInfo(fullname=0): if 'linux_distribution' in dir(platform): distinfo = list(platform.linux_distribution(full_distribution_name=fullname)) distinfo[0] = distinfo[0].strip() # remove trailing whitespace in distro name + if os.path.exists("/etc/euleros-release"): + distinfo[0] = "euleros" return distinfo else: return platform.dist() diff --git a/config/66-azure-storage.rules b/config/66-azure-storage.rules index ab306288..5b2b799f 100644 --- a/config/66-azure-storage.rules +++ b/config/66-azure-storage.rules @@ -1,12 +1,22 @@ -ACTION!="add|change", GOTO="azure_end" -SUBSYSTEM!="block", GOTO="azure_end" -ATTRS{ID_VENDOR}!="Msft", GOTO="azure_end" -ATTRS{ID_MODEL}!="Virtual_Disk", GOTO="azure_end" +ACTION=="add|change", SUBSYSTEM=="block", ENV{ID_VENDOR}=="Msft", ENV{ID_MODEL}=="Virtual_Disk", GOTO="azure_disk" +GOTO="azure_end" +LABEL="azure_disk" # Root has a GUID of 0000 as the second value # The resource/resource has GUID of 0001 as the second value ATTRS{device_id}=="?00000000-0000-*", ENV{fabric_name}="root", GOTO="azure_names" ATTRS{device_id}=="?00000000-0001-*", ENV{fabric_name}="resource", GOTO="azure_names" +# Wellknown SCSI controllers +ATTRS{device_id}=="{f8b3781a-1e82-4818-a1c3-63d806ec15bb}", ENV{fabric_scsi_controller}="scsi0", GOTO="azure_datadisk" +ATTRS{device_id}=="{f8b3781b-1e82-4818-a1c3-63d806ec15bb}", ENV{fabric_scsi_controller}="scsi1", GOTO="azure_datadisk" +ATTRS{device_id}=="{f8b3781c-1e82-4818-a1c3-63d806ec15bb}", ENV{fabric_scsi_controller}="scsi2", GOTO="azure_datadisk" +ATTRS{device_id}=="{f8b3781d-1e82-4818-a1c3-63d806ec15bb}", ENV{fabric_scsi_controller}="scsi3", GOTO="azure_datadisk" +GOTO="azure_end" + +# Retrieve LUN number for datadisks +LABEL="azure_datadisk" +ENV{DEVTYPE}=="partition", PROGRAM="/bin/sh -c 'readlink /sys/class/block/%k/../device|cut -d: -f4'", ENV{fabric_name}="$env{fabric_scsi_controller}/lun$result", GOTO="azure_names" +PROGRAM="/bin/sh -c 'readlink /sys/class/block/%k/device|cut -d: -f4'", ENV{fabric_name}="$env{fabric_scsi_controller}/lun$result", GOTO="azure_names" GOTO="azure_end" # Create the symlinks @@ -15,4 +25,3 @@ ENV{DEVTYPE}=="disk", SYMLINK+="disk/azure/$env{fabric_name}" ENV{DEVTYPE}=="partition", SYMLINK+="disk/azure/$env{fabric_name}-part%n" LABEL="azure_end" -
Host plugin fallback should be sticky If we detect the connection to storage is not available, we should keep this state and continue using the host plugin.
Azure/WALinuxAgent
diff --git a/tests/protocol/test_hostplugin.py b/tests/protocol/test_hostplugin.py index 078af706..8ebb468c 100644 --- a/tests/protocol/test_hostplugin.py +++ b/tests/protocol/test_hostplugin.py @@ -113,21 +113,24 @@ class TestHostPlugin(AgentTestCase): def test_fallback(self): """ - Validate fallback to upload status using HostGAPlugin is happening when status reporting via - default method is unsuccessful + Validate fallback to upload status using HostGAPlugin is happening when + status reporting via default method is unsuccessful """ test_goal_state = wire.GoalState(WireProtocolData(DATA_FILE).goal_state) - + status = restapi.VMStatus(status="Ready", message="Guest Agent is running") with patch.object(wire.HostPluginProtocol, "put_vm_status") as patch_put: with patch.object(wire.StatusBlob, "upload", return_value=False) as patch_upload: wire_protocol_client = wire.WireProtocol(wireserver_url).client wire_protocol_client.get_goal_state = Mock(return_value=test_goal_state) wire_protocol_client.ext_conf = wire.ExtensionsConfig(None) wire_protocol_client.ext_conf.status_upload_blob = sas_url + wire_protocol_client.status_blob.set_vm_status(status) wire_protocol_client.upload_status_blob() self.assertTrue(patch_put.call_count == 1, "Fallback was not engaged") self.assertTrue(patch_put.call_args[0][1] == sas_url) + self.assertTrue(wire.HostPluginProtocol.is_default_channel()) + wire.HostPluginProtocol.set_default_channel(False) def test_validate_http_request(self): """Validate correct set of data is sent to HostGAPlugin when reporting VM status""" @@ -161,19 +164,19 @@ class TestHostPlugin(AgentTestCase): def test_no_fallback(self): """ - Validate fallback to upload status using HostGAPlugin is not happening when status reporting via - default method is successful + Validate fallback to upload status using HostGAPlugin is not happening + when status reporting via default method is successful """ - with patch.object(wire.HostPluginProtocol, - "put_vm_status") as patch_put: + vmstatus = restapi.VMStatus(message="Ready", status="Ready") + with patch.object(wire.HostPluginProtocol, "put_vm_status") as patch_put: with patch.object(wire.StatusBlob, "upload") as patch_upload: patch_upload.return_value = True wire_protocol_client = wire.WireProtocol(wireserver_url).client wire_protocol_client.ext_conf = wire.ExtensionsConfig(None) wire_protocol_client.ext_conf.status_upload_blob = sas_url + wire_protocol_client.status_blob.vm_status = vmstatus wire_protocol_client.upload_status_blob() - self.assertTrue(patch_put.call_count == 0, - "Fallback was engaged") + self.assertTrue(patch_put.call_count == 0, "Fallback was engaged") def test_validate_block_blob(self): """Validate correct set of data is sent to HostGAPlugin when reporting VM status""" diff --git a/tests/protocol/test_wire.py b/tests/protocol/test_wire.py index e083678b..e36fc652 100644 --- a/tests/protocol/test_wire.py +++ b/tests/protocol/test_wire.py @@ -148,13 +148,15 @@ class TestWireProtocolGetters(AgentTestCase): host_uri) def test_upload_status_blob_default(self, *args): + vmstatus = VMStatus(message="Ready", status="Ready") wire_protocol_client = WireProtocol(wireserver_url).client wire_protocol_client.ext_conf = ExtensionsConfig(None) wire_protocol_client.ext_conf.status_upload_blob = testurl + wire_protocol_client.status_blob.vm_status = vmstatus with patch.object(WireClient, "get_goal_state") as patch_get_goal_state: with patch.object(HostPluginProtocol, "put_vm_status") as patch_host_ga_plugin_upload: - with patch.object(StatusBlob, "upload", return_value = True) as patch_default_upload: + with patch.object(StatusBlob, "upload", return_value=True) as patch_default_upload: wire_protocol_client.upload_status_blob() patch_default_upload.assert_called_once_with(testurl) @@ -162,20 +164,24 @@ class TestWireProtocolGetters(AgentTestCase): patch_host_ga_plugin_upload.assert_not_called() def test_upload_status_blob_host_ga_plugin(self, *args): + vmstatus = VMStatus(message="Ready", status="Ready") wire_protocol_client = WireProtocol(wireserver_url).client wire_protocol_client.ext_conf = ExtensionsConfig(None) wire_protocol_client.ext_conf.status_upload_blob = testurl wire_protocol_client.ext_conf.status_upload_blob_type = testtype + wire_protocol_client.status_blob.vm_status = vmstatus goal_state = GoalState(WireProtocolData(DATA_FILE).goal_state) with patch.object(HostPluginProtocol, "put_vm_status") as patch_host_ga_plugin_upload: with patch.object(StatusBlob, "upload", return_value=False) as patch_default_upload: - wire_protocol_client.get_goal_state = Mock(return_value = goal_state) + wire_protocol_client.get_goal_state = Mock(return_value=goal_state) wire_protocol_client.upload_status_blob() patch_default_upload.assert_called_once_with(testurl) wire_protocol_client.get_goal_state.assert_called_once() patch_host_ga_plugin_upload.assert_called_once_with(wire_protocol_client.status_blob, testurl, testtype) + self.assertTrue(HostPluginProtocol.is_default_channel()) + HostPluginProtocol.set_default_channel(False) def test_get_in_vm_artifacts_profile_blob_not_available(self, *args): wire_protocol_client = WireProtocol(wireserver_url).client
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 0, "test_score": 3 }, "num_modified_files": 10 }
2.2
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "nose", "pyasn1", "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.6", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work certifi==2021.5.30 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work nose==1.3.7 packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pyasn1==0.5.1 pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work pytest==6.2.4 toml @ file:///tmp/build/80754af9/toml_1616166611790/work typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work -e git+https://github.com/Azure/WALinuxAgent.git@7676bf85131673d4a02dcc43b18cdf24bb3a36ab#egg=WALinuxAgent zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work
name: WALinuxAgent channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=21.4.0=pyhd3eb1b0_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - importlib-metadata=4.8.1=py36h06a4308_0 - importlib_metadata=4.8.1=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - more-itertools=8.12.0=pyhd3eb1b0_0 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=21.3=pyhd3eb1b0_0 - pip=21.2.2=py36h06a4308_0 - pluggy=0.13.1=py36h06a4308_0 - py=1.11.0=pyhd3eb1b0_0 - pyparsing=3.0.4=pyhd3eb1b0_0 - pytest=6.2.4=py36h06a4308_2 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - toml=0.10.2=pyhd3eb1b0_0 - typing_extensions=4.1.1=pyh06a4308_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zipp=3.6.0=pyhd3eb1b0_0 - zlib=1.2.13=h5eee18b_1 - pip: - nose==1.3.7 - pyasn1==0.5.1 prefix: /opt/conda/envs/WALinuxAgent
[ "tests/protocol/test_hostplugin.py::TestHostPlugin::test_fallback", "tests/protocol/test_wire.py::TestWireProtocolGetters::test_upload_status_blob_host_ga_plugin" ]
[ "tests/protocol/test_wire.py::TestWireProtocolGetters::test_getters", "tests/protocol/test_wire.py::TestWireProtocolGetters::test_getters_ext_no_public", "tests/protocol/test_wire.py::TestWireProtocolGetters::test_getters_ext_no_settings", "tests/protocol/test_wire.py::TestWireProtocolGetters::test_getters_no_ext" ]
[ "tests/protocol/test_hostplugin.py::TestHostPlugin::test_no_fallback", "tests/protocol/test_hostplugin.py::TestHostPlugin::test_validate_block_blob", "tests/protocol/test_hostplugin.py::TestHostPlugin::test_validate_get_extension_artifacts", "tests/protocol/test_hostplugin.py::TestHostPlugin::test_validate_http_request", "tests/protocol/test_hostplugin.py::TestHostPlugin::test_validate_page_blobs", "tests/protocol/test_wire.py::TestWireProtocolGetters::test_call_storage_kwargs", "tests/protocol/test_wire.py::TestWireProtocolGetters::test_download_ext_handler_pkg_fallback", "tests/protocol/test_wire.py::TestWireProtocolGetters::test_fetch_manifest_fallback", "tests/protocol/test_wire.py::TestWireProtocolGetters::test_get_host_ga_plugin", "tests/protocol/test_wire.py::TestWireProtocolGetters::test_get_in_vm_artifacts_profile_blob_not_available", "tests/protocol/test_wire.py::TestWireProtocolGetters::test_get_in_vm_artifacts_profile_default", "tests/protocol/test_wire.py::TestWireProtocolGetters::test_get_in_vm_artifacts_profile_host_ga_plugin", "tests/protocol/test_wire.py::TestWireProtocolGetters::test_get_in_vm_artifacts_profile_response_body_not_valid", "tests/protocol/test_wire.py::TestWireProtocolGetters::test_report_vm_status", "tests/protocol/test_wire.py::TestWireProtocolGetters::test_status_blob_parsing", "tests/protocol/test_wire.py::TestWireProtocolGetters::test_upload_status_blob_default" ]
[]
Apache License 2.0
null
Azure__WALinuxAgent-642
c6704cbad83b93763cf2403a77197559a67b9dca
2017-03-31 23:16:29
6e9b985c1d7d564253a1c344bab01b45093103cd
diff --git a/azurelinuxagent/common/event.py b/azurelinuxagent/common/event.py index 9265820a..fb2c97c7 100644 --- a/azurelinuxagent/common/event.py +++ b/azurelinuxagent/common/event.py @@ -65,8 +65,17 @@ class EventLogger(object): if not os.path.exists(self.event_dir): os.mkdir(self.event_dir) os.chmod(self.event_dir, 0o700) - if len(os.listdir(self.event_dir)) > 1000: - raise EventError("Too many files under: {0}".format(self.event_dir)) + + existing_events = os.listdir(self.event_dir) + if len(existing_events) >= 1000: + existing_events.sort() + oldest_files = existing_events[:-999] + logger.warn("Too many files under: {0}, removing oldest".format(self.event_dir)) + try: + for f in oldest_files: + os.remove(os.path.join(self.event_dir, f)) + except IOError as e: + raise EventError(e) filename = os.path.join(self.event_dir, ustr(int(time.time() * 1000000))) diff --git a/azurelinuxagent/ga/exthandlers.py b/azurelinuxagent/ga/exthandlers.py index 70bb246e..9d3cec3f 100644 --- a/azurelinuxagent/ga/exthandlers.py +++ b/azurelinuxagent/ga/exthandlers.py @@ -221,9 +221,9 @@ class ExtHandlersHandler(object): self.log_etag = True - state = ext_handler.properties.state + state = ext_handler.properties.state.lower() ext_handler_i.logger.info("Expected handler state: {0}", state) - if state == "enabled": + if state == u"enabled": self.handle_enable(ext_handler_i) elif state == u"disabled": self.handle_disable(ext_handler_i) @@ -709,7 +709,7 @@ class ExtHandlerInstance(object): heartbeat = json.loads(heartbeat_json)[0]['heartbeat'] except IOError as e: raise ExtensionError("Failed to get heartbeat file:{0}".format(e)) - except ValueError as e: + except (ValueError, KeyError) as e: raise ExtensionError("Malformed heartbeat file: {0}".format(e)) return heartbeat diff --git a/azurelinuxagent/ga/update.py b/azurelinuxagent/ga/update.py index 53f01736..61d9f470 100644 --- a/azurelinuxagent/ga/update.py +++ b/azurelinuxagent/ga/update.py @@ -27,6 +27,7 @@ import signal import subprocess import sys import time +import traceback import zipfile import azurelinuxagent.common.conf as conf @@ -250,6 +251,7 @@ class UpdateHandler(object): except Exception as e: logger.warn(u"Agent {0} failed with exception: {1}", CURRENT_AGENT, ustr(e)) + logger.warn(traceback.format_exc()) sys.exit(1) return
Agent crash should log traceback When the extension handler crashes we get a generic 'agent crashed', we should log a traceback here.
Azure/WALinuxAgent
diff --git a/tests/common/test_event.py b/tests/common/test_event.py new file mode 100644 index 00000000..726474cd --- /dev/null +++ b/tests/common/test_event.py @@ -0,0 +1,90 @@ +# Copyright 2017 Microsoft Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Requires Python 2.4+ and Openssl 1.0+ +# + +from __future__ import print_function + +from tests.tools import * +from azurelinuxagent.common.event import * + + +class TestEvent(AgentTestCase): + def test_save_event(self): + tmp_evt = tempfile.mkdtemp() + init_event_logger(tmp_evt) + add_event('test', message='test event') + self.assertTrue(len(os.listdir(tmp_evt)) == 1) + shutil.rmtree(tmp_evt) + + def test_save_event_rollover(self): + tmp_evt = tempfile.mkdtemp() + init_event_logger(tmp_evt) + add_event('test', message='first event') + for i in range(0, 999): + add_event('test', message='test event {0}'.format(i)) + + events = os.listdir(tmp_evt) + events.sort() + self.assertTrue(len(events) == 1000) + + first_event = os.path.join(tmp_evt, events[0]) + with open(first_event) as first_fh: + first_event_text = first_fh.read() + self.assertTrue('first event' in first_event_text) + + add_event('test', message='last event') + events = os.listdir(tmp_evt) + events.sort() + self.assertTrue(len(events) == 1000, "{0} events found, 1000 expected".format(len(events))) + + first_event = os.path.join(tmp_evt, events[0]) + with open(first_event) as first_fh: + first_event_text = first_fh.read() + self.assertFalse('first event' in first_event_text) + self.assertTrue('test event 0' in first_event_text) + + last_event = os.path.join(tmp_evt, events[-1]) + with open(last_event) as last_fh: + last_event_text = last_fh.read() + self.assertTrue('last event' in last_event_text) + + shutil.rmtree(tmp_evt) + + def test_save_event_cleanup(self): + tmp_evt = tempfile.mkdtemp() + init_event_logger(tmp_evt) + + for i in range(0, 2000): + evt = os.path.join(tmp_evt, '{0}.tld'.format(ustr(1491004920536531 + i))) + with open(evt, 'w') as fh: + fh.write('test event {0}'.format(i)) + + events = os.listdir(tmp_evt) + self.assertTrue(len(events) == 2000, "{0} events found, 2000 expected".format(len(events))) + add_event('test', message='last event') + + events = os.listdir(tmp_evt) + events.sort() + self.assertTrue(len(events) == 1000, "{0} events found, 1000 expected".format(len(events))) + first_event = os.path.join(tmp_evt, events[0]) + with open(first_event) as first_fh: + first_event_text = first_fh.read() + self.assertTrue('test event 1001' in first_event_text) + + last_event = os.path.join(tmp_evt, events[-1]) + with open(last_event) as last_fh: + last_event_text = last_fh.read() + self.assertTrue('last event' in last_event_text) diff --git a/tests/ga/test_update.py b/tests/ga/test_update.py index 46502cc7..46d06735 100644 --- a/tests/ga/test_update.py +++ b/tests/ga/test_update.py @@ -1083,7 +1083,6 @@ class TestUpdate(UpdateTestCase): self._test_run_latest(mock_child=mock_child, mock_time=mock_time) self.assertEqual(1, mock_child.poll.call_count) self.assertEqual(0, mock_child.wait.call_count) - self.assertEqual(2, mock_time.time_call_count) return def test_run_latest_defaults_to_current(self):
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 0, "test_score": 3 }, "num_modified_files": 3 }
2.2
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "pyasn1", "nose", "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.4", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work certifi==2021.5.30 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work nose==1.3.7 packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pyasn1==0.5.1 pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work pytest==6.2.4 toml @ file:///tmp/build/80754af9/toml_1616166611790/work typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work -e git+https://github.com/Azure/WALinuxAgent.git@c6704cbad83b93763cf2403a77197559a67b9dca#egg=WALinuxAgent zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work
name: WALinuxAgent channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=21.4.0=pyhd3eb1b0_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - importlib-metadata=4.8.1=py36h06a4308_0 - importlib_metadata=4.8.1=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - more-itertools=8.12.0=pyhd3eb1b0_0 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=21.3=pyhd3eb1b0_0 - pip=21.2.2=py36h06a4308_0 - pluggy=0.13.1=py36h06a4308_0 - py=1.11.0=pyhd3eb1b0_0 - pyparsing=3.0.4=pyhd3eb1b0_0 - pytest=6.2.4=py36h06a4308_2 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - toml=0.10.2=pyhd3eb1b0_0 - typing_extensions=4.1.1=pyh06a4308_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zipp=3.6.0=pyhd3eb1b0_0 - zlib=1.2.13=h5eee18b_1 - pip: - nose==1.3.7 - pyasn1==0.5.1 prefix: /opt/conda/envs/WALinuxAgent
[ "tests/common/test_event.py::TestEvent::test_save_event_cleanup", "tests/common/test_event.py::TestEvent::test_save_event_rollover" ]
[]
[ "tests/common/test_event.py::TestEvent::test_save_event", "tests/ga/test_update.py::TestGuestAgentError::test_clear", "tests/ga/test_update.py::TestGuestAgentError::test_creation", "tests/ga/test_update.py::TestGuestAgentError::test_load_preserves_error_state", "tests/ga/test_update.py::TestGuestAgentError::test_mark_failure", "tests/ga/test_update.py::TestGuestAgentError::test_mark_failure_permanent", "tests/ga/test_update.py::TestGuestAgentError::test_save", "tests/ga/test_update.py::TestGuestAgentError::test_str", "tests/ga/test_update.py::TestGuestAgent::test_clear_error", "tests/ga/test_update.py::TestGuestAgent::test_creation", "tests/ga/test_update.py::TestGuestAgent::test_download", "tests/ga/test_update.py::TestGuestAgent::test_download_fail", "tests/ga/test_update.py::TestGuestAgent::test_download_fallback", "tests/ga/test_update.py::TestGuestAgent::test_ensure_download_skips_blacklisted", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_download_fails", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_load_manifest_fails", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_unpack_fails", "tests/ga/test_update.py::TestGuestAgent::test_is_available", "tests/ga/test_update.py::TestGuestAgent::test_is_blacklisted", "tests/ga/test_update.py::TestGuestAgent::test_is_downloaded", "tests/ga/test_update.py::TestGuestAgent::test_load_error", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_is_empty", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_is_malformed", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_missing", "tests/ga/test_update.py::TestGuestAgent::test_mark_failure", "tests/ga/test_update.py::TestGuestAgent::test_unpack", "tests/ga/test_update.py::TestGuestAgent::test_unpack_fail", "tests/ga/test_update.py::TestUpdate::test_creation", "tests/ga/test_update.py::TestUpdate::test_emit_restart_event_emits_event_if_not_clean_start", "tests/ga/test_update.py::TestUpdate::test_emit_restart_event_writes_sentinal_file", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans_ignores_exceptions", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans_kills_after_interval", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans_skips_if_no_orphans", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_ignores_installed_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_raises_exception_for_restarting_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_resets_with_new_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_will_not_raise_exception_for_long_restarts", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_will_not_raise_exception_too_few_restarts", "tests/ga/test_update.py::TestUpdate::test_filter_blacklisted_agents", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_excluded", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_no_updates", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_skip_updates", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_skips_unavailable", "tests/ga/test_update.py::TestUpdate::test_get_pid_files", "tests/ga/test_update.py::TestUpdate::test_get_pid_files_returns_previous", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_false_for_current_agent", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_false_for_exceptions", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_true_sentinal_agent_is_not_current", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_true_when_no_sentinal", "tests/ga/test_update.py::TestUpdate::test_is_orphaned_returns_false_if_parent_exists", "tests/ga/test_update.py::TestUpdate::test_is_orphaned_returns_true_if_parent_does_not_exist", "tests/ga/test_update.py::TestUpdate::test_is_orphaned_returns_true_if_parent_is_init", "tests/ga/test_update.py::TestUpdate::test_load_agents", "tests/ga/test_update.py::TestUpdate::test_load_agents_does_reload", "tests/ga/test_update.py::TestUpdate::test_load_agents_sorts", "tests/ga/test_update.py::TestUpdate::test_purge_agents", "tests/ga/test_update.py::TestUpdate::test_run", "tests/ga/test_update.py::TestUpdate::test_run_clears_sentinal_on_successful_exit", "tests/ga/test_update.py::TestUpdate::test_run_emits_restart_event", "tests/ga/test_update.py::TestUpdate::test_run_keeps_running", "tests/ga/test_update.py::TestUpdate::test_run_latest", "tests/ga/test_update.py::TestUpdate::test_run_latest_captures_signals", "tests/ga/test_update.py::TestUpdate::test_run_latest_creates_only_one_signal_handler", "tests/ga/test_update.py::TestUpdate::test_run_latest_defaults_to_current", "tests/ga/test_update.py::TestUpdate::test_run_latest_exception_blacklists", "tests/ga/test_update.py::TestUpdate::test_run_latest_forwards_output", "tests/ga/test_update.py::TestUpdate::test_run_latest_nonzero_code_marks_failures", "tests/ga/test_update.py::TestUpdate::test_run_latest_polling_stops_at_failure", "tests/ga/test_update.py::TestUpdate::test_run_latest_polling_stops_at_success", "tests/ga/test_update.py::TestUpdate::test_run_latest_polls_and_waits_for_success", "tests/ga/test_update.py::TestUpdate::test_run_leaves_sentinal_on_unsuccessful_exit", "tests/ga/test_update.py::TestUpdate::test_run_stops_if_orphaned", "tests/ga/test_update.py::TestUpdate::test_run_stops_if_update_available", "tests/ga/test_update.py::TestUpdate::test_set_agents_sets_agents", "tests/ga/test_update.py::TestUpdate::test_set_agents_sorts_agents", "tests/ga/test_update.py::TestUpdate::test_set_sentinal", "tests/ga/test_update.py::TestUpdate::test_set_sentinal_writes_current_agent", "tests/ga/test_update.py::TestUpdate::test_shutdown", "tests/ga/test_update.py::TestUpdate::test_shutdown_ignores_exceptions", "tests/ga/test_update.py::TestUpdate::test_shutdown_ignores_missing_sentinal_file", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_handles_missing_family", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_includes_old_agents", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_purges_old_agents", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_returns_true_on_first_use", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_skips_if_too_frequent", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_skips_if_when_no_new_versions", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_skips_when_no_versions", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_skips_when_updates_are_disabled", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_sorts", "tests/ga/test_update.py::TestUpdate::test_write_pid_file", "tests/ga/test_update.py::TestUpdate::test_write_pid_file_ignores_exceptions" ]
[]
Apache License 2.0
null
Azure__WALinuxAgent-748
9bed39863b187154afbb805b74f647a484603f81
2017-06-06 19:23:36
6e9b985c1d7d564253a1c344bab01b45093103cd
diff --git a/azurelinuxagent/common/protocol/hostplugin.py b/azurelinuxagent/common/protocol/hostplugin.py index 464fd354..bf62cb54 100644 --- a/azurelinuxagent/common/protocol/hostplugin.py +++ b/azurelinuxagent/common/protocol/hostplugin.py @@ -288,12 +288,23 @@ class HostPluginProtocol(object): @staticmethod def read_response_error(response): - if response is None: - return '' - body = remove_bom(response.read()) - if PY_VERSION_MAJOR < 3 and body is not None: - body = ustr(body, encoding='utf-8') - return "{0}, {1}, {2}".format( - response.status, - response.reason, - body) + result = '' + if response is not None: + try: + body = remove_bom(response.read()) + result = "[{0}: {1}] {2}".format(response.status, + response.reason, + body) + + # this result string is passed upstream to several methods + # which do a raise HttpError() or a format() of some kind; + # as a result it cannot have any unicode characters + if PY_VERSION_MAJOR < 3: + result = ustr(result, encoding='ascii', errors='ignore') + else: + result = result\ + .encode(encoding='ascii', errors='ignore')\ + .decode(encoding='ascii', errors='ignore') + except Exception: + logger.warn(traceback.format_exc()) + return result
2.2.11 on CentOS 6.9 - HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) Hi Guys, I have not been able to reproduce this issue myself but customer tried multiple times reinstalling the waagent and we are seeing these ascii codec errors in the logs. Could it be due to python version? Here are some details, customer also tried with older waagents 2.2.0, 2.26, 2.2.10, but same issue happens. ___ # waagent -version WALinuxAgent-2.2.11 running on centos 6.9 Python: 2.6.6 Goal state agent: 2.2.11 # cat /etc/*release CentOS release 6.9 (Final) LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch CentOS release 6.9 (Final) CentOS release 6.9 (Final) contents from /var/log/waagent.log: 2017/05/24 15:46:17.844766 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:46:17.861865 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:46:21.049203 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:21.090362 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:21.122899 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:46:21.139003 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:46:24.305469 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:24.331966 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:24.364467 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:46:24.380578 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:46:28.564198 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:28.591858 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:28.617763 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:46:28.639363 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:46:31.885319 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:31.911783 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:31.946363 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:46:31.964649 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:46:35.146591 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:35.189370 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:35.225146 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:46:35.242466 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:46:39.429445 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:39.455260 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:39.487014 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:46:39.503239 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:46:42.683012 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:42.710385 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:42.744597 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:46:42.753255 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:46:45.931898 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:45.962590 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:45.996475 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:46:46.015805 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:46:50.197470 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:50.223235 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:50.255621 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:46:50.273207 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:46:53.446002 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:53.484775 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:53.523703 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:46:53.541274 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:46:56.723500 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:56.749868 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:46:56.787001 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:46:56.795731 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:01.004477 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:01.031631 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:01.065891 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:01.074840 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:04.239667 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:04.265142 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:04.297960 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:04.316253 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:07.477140 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:07.502672 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:07.539391 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:07.548653 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:11.731418 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:11.758850 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:11.799020 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:11.823203 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:14.995817 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:15.030661 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:15.065515 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:15.083501 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:18.270243 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:18.300546 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:18.333954 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:18.351530 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:22.533407 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:22.558433 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:22.610613 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:22.628229 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:25.780685 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:25.808705 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:25.849293 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:25.858204 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:29.070364 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:29.113366 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:29.152417 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:29.170557 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:33.358345 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:33.385624 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:33.386848 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:33.393950 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:36.569030 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:36.596103 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:36.631035 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:36.647864 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:39.832556 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:39.863671 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:39.895851 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:39.914430 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:44.099506 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:44.124648 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:44.158748 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:44.177613 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:47.583472 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:47.608486 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:47.640467 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:47.657303 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:50.835735 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:50.874290 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:50.916490 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:50.945341 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:55.129633 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:55.156257 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:55.190141 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:55.215993 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:47:58.424382 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:58.451950 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:47:58.487127 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:47:58.504755 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:48:01.690875 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:01.715687 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:01.748547 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:48:01.765343 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:48:05.936563 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:05.964643 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:05.996995 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:48:06.017752 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:48:09.190781 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:09.218779 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:09.252314 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:48:09.277252 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:48:12.459783 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:12.484684 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:12.518163 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:48:12.535435 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:48:16.729958 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:16.754869 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:16.788728 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:48:16.805349 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:48:20.001452 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:20.029702 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:20.065718 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:48:20.088268 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:48:23.305548 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:23.331518 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:23.362826 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:48:23.380037 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:48:27.596824 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:27.623493 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:27.657310 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:48:27.673913 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:48:30.849483 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:30.875699 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:30.908237 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:48:30.920496 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:48:34.087479 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:34.114431 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:34.162600 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:48:34.179671 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:48:38.360868 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:38.388320 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:38.422843 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:48:38.430939 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:48:41.598481 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:41.624106 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:41.657094 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:48:41.685802 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:48:44.875318 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:44.916857 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:44.948256 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:48:44.964992 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:48:49.146943 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:49.223333 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:49.270700 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:48:49.289094 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:48:52.453305 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:52.483725 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:52.514236 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:48:52.541040 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:48:55.757322 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:55.794825 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:48:55.847756 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:48:55.868455 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:00.054734 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:00.090044 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:00.124402 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:00.141889 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:03.319632 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:03.345371 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:03.377599 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:03.408319 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:06.580183 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:06.605901 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:06.639361 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:06.656325 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:10.853238 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:10.898130 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:10.969166 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:11.043244 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:14.241737 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:14.370211 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:14.384266 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:14.395068 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:17.574396 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:17.602290 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:17.633727 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:17.649852 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:21.827386 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:21.853598 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:21.886466 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:21.903030 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:25.102639 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:25.132233 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:25.171485 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:25.180229 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:28.358046 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:28.383589 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:28.416060 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:28.432768 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:32.679130 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:32.722700 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:32.755549 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:32.772589 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:35.964000 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:35.989517 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:36.022212 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:36.039823 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:39.208352 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:39.236071 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:39.271353 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:39.299952 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:43.483750 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:43.516775 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:43.550003 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:43.570354 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:47.603632 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:47.635376 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:47.685295 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:47.702468 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:50.882551 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:50.908720 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:50.951725 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:50.972618 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:55.180153 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:55.206611 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:55.275126 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:55.298144 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:49:58.466913 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:58.494807 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:49:58.528384 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:49:58.546434 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:01.730089 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:01.757220 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:01.758602 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:50:01.768496 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:05.960692 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:06.009798 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:06.072462 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:50:06.083434 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:09.245194 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:09.271266 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:09.304154 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:50:09.312189 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:12.488104 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:12.515773 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:12.556066 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:50:12.572258 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:16.752931 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:16.779420 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:16.814980 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:50:16.822962 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:20.023086 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:20.048418 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:20.102101 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:50:20.126512 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:23.368280 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:23.394281 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:23.426482 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:50:23.442494 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:27.621318 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:27.646496 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:27.679599 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:50:27.696550 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:30.862777 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:30.890594 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:30.925860 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:50:30.943765 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:34.114088 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:34.141320 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:34.173661 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:50:34.189875 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:38.361132 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:38.388245 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:38.421441 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:50:38.437757 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:41.638507 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:41.664675 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:41.697331 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:50:41.715056 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:44.894232 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:44.921590 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:44.954569 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:50:44.971219 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:49.166333 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:49.190998 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:49.222526 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:50:49.239378 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:52.443256 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:52.469896 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:52.502156 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:50:52.518454 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:55.718757 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:55.747044 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:50:55.783661 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:50:55.802636 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:50:59.994033 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:00.021891 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:00.055730 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:51:00.073697 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:51:03.248109 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:03.275377 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:03.309335 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:51:03.327206 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:51:06.551271 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:06.591861 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:06.626499 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:51:06.643350 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:51:10.824589 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:10.853689 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:10.888139 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:51:10.913930 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:51:14.084725 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:14.111949 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:14.144392 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:51:14.160706 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:51:17.336614 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:17.364869 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:17.400119 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:51:17.422776 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:51:21.662768 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:21.688839 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:21.721831 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:51:21.738387 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:51:24.919905 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:24.966375 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:24.999268 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:51:25.020380 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:51:28.178949 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:28.205222 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:28.239041 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:51:28.258710 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:51:32.431694 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:32.460159 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:32.492851 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:51:32.511886 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:51:35.673963 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:35.724406 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:35.758572 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:51:35.775299 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:51:38.951270 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:38.977857 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:39.011253 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:51:39.028396 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message= 2017/05/24 15:51:43.205074 ERROR HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:43.231282 ERROR Event: name=WALinuxAgent, op=ReportStatus, message=HostGAPlugin: Exception Put VM status: 'ascii' codec can't encode characters in position 83-85: ordinal not in range(128) 2017/05/24 15:51:43.263837 WARNING HostGAPlugin: resetting default channel 2017/05/24 15:51:43.280415 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message=
Azure/WALinuxAgent
diff --git a/tests/protocol/test_hostplugin.py b/tests/protocol/test_hostplugin.py index e203615a..b18b6914 100644 --- a/tests/protocol/test_hostplugin.py +++ b/tests/protocol/test_hostplugin.py @@ -19,7 +19,7 @@ import base64 import json import sys - +from azurelinuxagent.common.future import ustr if sys.version_info[0] == 3: import http.client as httpclient @@ -224,6 +224,61 @@ class TestHostPlugin(AgentTestCase): test_goal_state, exp_method, exp_url, exp_data) + def test_read_response_error(self): + """ + Validate the read_response_error method handles encoding correctly + """ + responses = ['message', b'message', '\x80message\x80'] + response = MagicMock() + response.status = 'status' + response.reason = 'reason' + with patch.object(response, 'read') as patch_response: + for s in responses: + patch_response.return_value = s + result = hostplugin.HostPluginProtocol.read_response_error(response) + self.assertTrue('[status: reason]' in result) + self.assertTrue('message' in result) + + def test_read_response_bytes(self): + response_bytes = '7b:0a:20:20:20:20:22:65:72:72:6f:72:43:6f:64:65:22:' \ + '3a:20:22:54:68:65:20:62:6c:6f:62:20:74:79:70:65:20:' \ + '69:73:20:69:6e:76:61:6c:69:64:20:66:6f:72:20:74:68:' \ + '69:73:20:6f:70:65:72:61:74:69:6f:6e:2e:22:2c:0a:20:' \ + '20:20:20:22:6d:65:73:73:61:67:65:22:3a:20:22:c3:af:' \ + 'c2:bb:c2:bf:3c:3f:78:6d:6c:20:76:65:72:73:69:6f:6e:' \ + '3d:22:31:2e:30:22:20:65:6e:63:6f:64:69:6e:67:3d:22:' \ + '75:74:66:2d:38:22:3f:3e:3c:45:72:72:6f:72:3e:3c:43:' \ + '6f:64:65:3e:49:6e:76:61:6c:69:64:42:6c:6f:62:54:79:' \ + '70:65:3c:2f:43:6f:64:65:3e:3c:4d:65:73:73:61:67:65:' \ + '3e:54:68:65:20:62:6c:6f:62:20:74:79:70:65:20:69:73:' \ + '20:69:6e:76:61:6c:69:64:20:66:6f:72:20:74:68:69:73:' \ + '20:6f:70:65:72:61:74:69:6f:6e:2e:0a:52:65:71:75:65:' \ + '73:74:49:64:3a:63:37:34:32:39:30:63:62:2d:30:30:30:' \ + '31:2d:30:30:62:35:2d:30:36:64:61:2d:64:64:36:36:36:' \ + '61:30:30:30:22:2c:0a:20:20:20:20:22:64:65:74:61:69:' \ + '6c:73:22:3a:20:22:22:0a:7d'.split(':') + expected_response = '[status: reason] {\n "errorCode": "The blob ' \ + 'type is invalid for this operation.",\n ' \ + '"message": "<?xml version="1.0" ' \ + 'encoding="utf-8"?>' \ + '<Error><Code>InvalidBlobType</Code><Message>The ' \ + 'blob type is invalid for this operation.\n' \ + 'RequestId:c74290cb-0001-00b5-06da-dd666a000",' \ + '\n "details": ""\n}' + + response_string = ''.join(chr(int(b, 16)) for b in response_bytes) + response = MagicMock() + response.status = 'status' + response.reason = 'reason' + with patch.object(response, 'read') as patch_response: + patch_response.return_value = response_string + result = hostplugin.HostPluginProtocol.read_response_error(response) + self.assertEqual(result, expected_response) + try: + raise HttpError("{0}".format(result)) + except HttpError as e: + self.assertTrue(result in ustr(e)) + def test_no_fallback(self): """ Validate fallback to upload status using HostGAPlugin is not happening
{ "commit_name": "merge_commit", "failed_lite_validators": [], "has_test_patch": true, "is_lite": true, "llm_score": { "difficulty_score": 2, "issue_text_score": 2, "test_score": 0 }, "num_modified_files": 1 }
2.2
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "nose", "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.4", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work certifi==2021.5.30 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work nose==1.3.7 packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work pytest==6.2.4 toml @ file:///tmp/build/80754af9/toml_1616166611790/work typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work -e git+https://github.com/Azure/WALinuxAgent.git@9bed39863b187154afbb805b74f647a484603f81#egg=WALinuxAgent zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work
name: WALinuxAgent channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=21.4.0=pyhd3eb1b0_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - importlib-metadata=4.8.1=py36h06a4308_0 - importlib_metadata=4.8.1=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - more-itertools=8.12.0=pyhd3eb1b0_0 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=21.3=pyhd3eb1b0_0 - pip=21.2.2=py36h06a4308_0 - pluggy=0.13.1=py36h06a4308_0 - py=1.11.0=pyhd3eb1b0_0 - pyparsing=3.0.4=pyhd3eb1b0_0 - pytest=6.2.4=py36h06a4308_2 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - toml=0.10.2=pyhd3eb1b0_0 - typing_extensions=4.1.1=pyh06a4308_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zipp=3.6.0=pyhd3eb1b0_0 - zlib=1.2.13=h5eee18b_1 - pip: - nose==1.3.7 prefix: /opt/conda/envs/WALinuxAgent
[ "tests/protocol/test_hostplugin.py::TestHostPlugin::test_read_response_bytes", "tests/protocol/test_hostplugin.py::TestHostPlugin::test_read_response_error" ]
[]
[ "tests/protocol/test_hostplugin.py::TestHostPlugin::test_fallback", "tests/protocol/test_hostplugin.py::TestHostPlugin::test_fallback_failure", "tests/protocol/test_hostplugin.py::TestHostPlugin::test_no_fallback", "tests/protocol/test_hostplugin.py::TestHostPlugin::test_put_status_error_reporting", "tests/protocol/test_hostplugin.py::TestHostPlugin::test_validate_block_blob", "tests/protocol/test_hostplugin.py::TestHostPlugin::test_validate_get_extension_artifacts", "tests/protocol/test_hostplugin.py::TestHostPlugin::test_validate_http_request", "tests/protocol/test_hostplugin.py::TestHostPlugin::test_validate_page_blobs" ]
[]
Apache License 2.0
null
Azure__WALinuxAgent-951
ab261b5f2ed0dfce4dd94adf924e68e0aaff5e7b
2017-11-28 01:19:07
6e9b985c1d7d564253a1c344bab01b45093103cd
boumenot: Let me know if this is the style of unit test you were thinking of.
diff --git a/azurelinuxagent/agent.py b/azurelinuxagent/agent.py index e99f7bed..87ab3c14 100644 --- a/azurelinuxagent/agent.py +++ b/azurelinuxagent/agent.py @@ -144,7 +144,7 @@ def main(args=[]): if command == "version": version() elif command == "help": - usage() + print(usage()) elif command == "start": start(conf_file_path=conf_file_path) else: @@ -228,15 +228,16 @@ def version(): def usage(): """ - Show agent usage + Return agent usage message """ - print("") - print((("usage: {0} [-verbose] [-force] [-help] " + s = "\n" + s += ("usage: {0} [-verbose] [-force] [-help] " "-configuration-path:<path to configuration file>" "-deprovision[+user]|-register-service|-version|-daemon|-start|" - "-run-exthandlers]" - "").format(sys.argv[0]))) - print("") + "-run-exthandlers|-show-configuration]" + "").format(sys.argv[0]) + s += "\n" + return s def start(conf_file_path=None): """
WALA usage prompt lacks of " waagent -show-configuration" We can perform "waagent -show-configuration" to get current WALA configuration,but "waagent -help"lacks of this usage prompt.
Azure/WALinuxAgent
diff --git a/tests/test_agent.py b/tests/test_agent.py index 51b157dd..95994dba 100644 --- a/tests/test_agent.py +++ b/tests/test_agent.py @@ -15,9 +15,7 @@ # Requires Python 2.4+ and Openssl 1.0+ # -import mock import os.path -import sys from azurelinuxagent.agent import * from azurelinuxagent.common.conf import * @@ -168,3 +166,22 @@ class TestAgent(AgentTestCase): for k in sorted(configuration.keys()): actual_configuration.append("{0} = {1}".format(k, configuration[k])) self.assertEqual(EXPECTED_CONFIGURATION, actual_configuration) + + def test_agent_usage_message(self): + message = usage() + + # Python 2.6 does not have assertIn() + self.assertTrue("-verbose" in message) + self.assertTrue("-force" in message) + self.assertTrue("-help" in message) + self.assertTrue("-configuration-path" in message) + self.assertTrue("-deprovision" in message) + self.assertTrue("-register-service" in message) + self.assertTrue("-version" in message) + self.assertTrue("-daemon" in message) + self.assertTrue("-start" in message) + self.assertTrue("-run-exthandlers" in message) + self.assertTrue("-show-configuration" in message) + + # sanity check + self.assertFalse("-not-a-valid-option" in message)
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_short_problem_statement" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 1, "test_score": 2 }, "num_modified_files": 1 }
2.2
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pyasn1", "nose", "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.4", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs==22.2.0 certifi==2021.5.30 importlib-metadata==4.8.3 iniconfig==1.1.1 nose==1.3.7 packaging==21.3 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pyparsing==3.1.4 pytest==7.0.1 tomli==1.2.3 typing_extensions==4.1.1 -e git+https://github.com/Azure/WALinuxAgent.git@ab261b5f2ed0dfce4dd94adf924e68e0aaff5e7b#egg=WALinuxAgent zipp==3.6.0
name: WALinuxAgent channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - attrs==22.2.0 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - nose==1.3.7 - packaging==21.3 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pyparsing==3.1.4 - pytest==7.0.1 - tomli==1.2.3 - typing-extensions==4.1.1 - zipp==3.6.0 prefix: /opt/conda/envs/WALinuxAgent
[ "tests/test_agent.py::TestAgent::test_agent_usage_message" ]
[]
[ "tests/test_agent.py::TestAgent::test_accepts_configuration_path", "tests/test_agent.py::TestAgent::test_agent_accepts_configuration_path", "tests/test_agent.py::TestAgent::test_agent_does_not_pass_configuration_path", "tests/test_agent.py::TestAgent::test_agent_ensures_extension_log_directory", "tests/test_agent.py::TestAgent::test_agent_get_configuration", "tests/test_agent.py::TestAgent::test_agent_logs_if_extension_log_directory_is_a_file", "tests/test_agent.py::TestAgent::test_agent_passes_configuration_path", "tests/test_agent.py::TestAgent::test_agent_uses_default_configuration_path", "tests/test_agent.py::TestAgent::test_checks_configuration_path", "tests/test_agent.py::TestAgent::test_configuration_path_defaults_to_none", "tests/test_agent.py::TestAgent::test_rejects_missing_configuration_path" ]
[]
Apache License 2.0
null
Azure__WALinuxAgent-954
b943cbc7067fbb8500a6a2ca1c7588f803ff7c81
2017-11-29 00:43:30
6e9b985c1d7d564253a1c344bab01b45093103cd
diff --git a/azurelinuxagent/common/event.py b/azurelinuxagent/common/event.py index 108cf009..af4dee6c 100644 --- a/azurelinuxagent/common/event.py +++ b/azurelinuxagent/common/event.py @@ -63,6 +63,7 @@ class WALAEventOperation: Partition = "Partition" ProcessGoalState = "ProcessGoalState" Provision = "Provision" + GuestState = "GuestState" ReportStatus = "ReportStatus" Restart = "Restart" UnhandledError = "UnhandledError" diff --git a/azurelinuxagent/pa/provision/cloudinit.py b/azurelinuxagent/pa/provision/cloudinit.py index c6745260..22c3f9ca 100644 --- a/azurelinuxagent/pa/provision/cloudinit.py +++ b/azurelinuxagent/pa/provision/cloudinit.py @@ -26,9 +26,9 @@ from datetime import datetime import azurelinuxagent.common.conf as conf import azurelinuxagent.common.logger as logger import azurelinuxagent.common.utils.fileutil as fileutil -import azurelinuxagent.common.utils.shellutil as shellutil -from azurelinuxagent.common.event import elapsed_milliseconds +from azurelinuxagent.common.event import elapsed_milliseconds, \ + WALAEventOperation from azurelinuxagent.common.exception import ProvisionError, ProtocolError from azurelinuxagent.common.future import ustr from azurelinuxagent.common.protocol import OVF_FILE_NAME @@ -67,6 +67,9 @@ class CloudInitProvisionHandler(ProvisionHandler): self.report_event("Provision succeed", is_success=True, duration=elapsed_milliseconds(utc_start)) + self.report_event(self.create_guest_state_telemetry_messsage(), + is_success=True, + operation=WALAEventOperation.GuestState) except ProvisionError as e: logger.error("Provisioning failed: {0}", ustr(e)) diff --git a/azurelinuxagent/pa/provision/default.py b/azurelinuxagent/pa/provision/default.py index d2789750..5d6f1565 100644 --- a/azurelinuxagent/pa/provision/default.py +++ b/azurelinuxagent/pa/provision/default.py @@ -22,6 +22,7 @@ Provision handler import os import os.path import re +import socket import time from datetime import datetime @@ -88,10 +89,14 @@ class ProvisionHandler(object): self.write_provisioned() - self.report_event("Provision succeed", + self.report_event("Provision succeeded", is_success=True, duration=elapsed_milliseconds(utc_start)) + self.report_event(self.create_guest_state_telemetry_messsage(), + is_success=True, + operation=WALAEventOperation.GuestState) + self.report_ready(thumbprint) logger.info("Provisioning complete") @@ -264,12 +269,53 @@ class ProvisionHandler(object): logger.info("Deploy ssh key pairs.") self.osutil.deploy_ssh_keypair(ovfenv.username, keypair) - def report_event(self, message, is_success=False, duration=0): + def report_event(self, message, is_success=False, duration=0, + operation=WALAEventOperation.Provision): add_event(name=AGENT_NAME, message=message, duration=duration, is_success=is_success, - op=WALAEventOperation.Provision) + op=operation) + + def get_cpu_count(self): + try: + count = len([x for x in open('/proc/cpuinfo').readlines() + if x.startswith("processor")]) + return count + except Exception as e: + logger.verbose(u"Failed to determine the CPU count: {0}.", ustr(e)) + pass + return -1 + + def get_mem_size_mb(self): + try: + for line in open('/proc/meminfo').readlines(): + m = re.match('^MemTotal:\s*(\d+) kB$', line) + if m is not None: + return int(int(m.group(1)) / 1024) + except Exception as e: + logger.verbose(u"Failed to determine the memory size: {0}..", ustr(e)) + pass + return -1 + + def create_guest_state_telemetry_messsage(self): + """ + Create a GuestState JSON message that contains the current CPU, Memory + (MB), and hostname of the guest. + + e.g. + + { + "cpu": 1, + "mem": 1024, + "hostname": "server1234" + } + """ + cpu = self.get_cpu_count() + mem = self.get_mem_size_mb() + + return """{{"cpu": {0}, "mem": {1}, "hostname": "{2}"}}"""\ + .format(cpu, mem, socket.gethostname()) def report_not_ready(self, sub_status, description): status = ProvisionStatus(status="NotReady", subStatus=sub_status,
Telemetry Event to Report Detected CPU and Memory There are cases where customers are paying for X CPUs and Y Memory, but they are not actually getting it. This is due to their kernel being improperly configured, or just being too old. The telemetry we have reports what Hyper-V gave the customer, which only tells half the story. I would like the agent to report the values from /proc/cpuinfo and /proc/meminfo (or something comparable), so we can detect these types of conditions.
Azure/WALinuxAgent
diff --git a/tests/pa/test_provision.py b/tests/pa/test_provision.py index 7045fccf..ab0a9102 100644 --- a/tests/pa/test_provision.py +++ b/tests/pa/test_provision.py @@ -15,9 +15,13 @@ # Requires Python 2.4+ and Openssl 1.0+ # +import json +import socket + import azurelinuxagent.common.utils.fileutil as fileutil -from azurelinuxagent.common.exception import ProtocolError +from azurelinuxagent.common.event import WALAEventOperation +from azurelinuxagent.common.exception import ProvisionError from azurelinuxagent.common.osutil.default import DefaultOSUtil from azurelinuxagent.common.protocol import OVF_FILE_NAME from azurelinuxagent.pa.provision import get_provision_handler @@ -115,6 +119,85 @@ class TestProvision(AgentTestCase): ph.osutil.is_current_instance_id.assert_called_once() deprovision_handler.run_changed_unique_id.assert_called_once() + @distros() + @patch('azurelinuxagent.common.osutil.default.DefaultOSUtil.get_instance_id', + return_value='B9F3C233-9913-9F42-8EB3-BA656DF32502') + def test_provision_telemetry_success(self, mock_util, distro_name, distro_version, + distro_full_name): + """ + Assert that the agent issues two telemetry messages as part of a + successful provisioning. + + 1. Provision + 2. GuestState + """ + ph = get_provision_handler(distro_name, distro_version, + distro_full_name) + ph.report_event = MagicMock() + ph.reg_ssh_host_key = MagicMock(return_value='--thumprint--') + + mock_osutil = MagicMock() + mock_osutil.decode_customdata = Mock(return_value="") + + ph.osutil = mock_osutil + ph.protocol_util.osutil = mock_osutil + ph.protocol_util.get_protocol_by_file = MagicMock() + ph.protocol_util.get_protocol = MagicMock() + + conf.get_dvd_mount_point = Mock(return_value=self.tmp_dir) + ovfenv_file = os.path.join(self.tmp_dir, OVF_FILE_NAME) + ovfenv_data = load_data("ovf-env.xml") + fileutil.write_file(ovfenv_file, ovfenv_data) + + ph.run() + + call1 = call("Provision succeeded", duration=ANY, is_success=True) + call2 = call(ANY, is_success=True, operation=WALAEventOperation.GuestState) + ph.report_event.assert_has_calls([call1, call2]) + + args, kwargs = ph.report_event.call_args_list[1] + guest_state_json = json.loads(args[0]) + self.assertTrue(1 <= guest_state_json['cpu']) + self.assertTrue(1 <= guest_state_json['mem']) + self.assertEqual(socket.gethostname(), guest_state_json['hostname']) + + @distros() + @patch( + 'azurelinuxagent.common.osutil.default.DefaultOSUtil.get_instance_id', + return_value='B9F3C233-9913-9F42-8EB3-BA656DF32502') + def test_provision_telemetry_fail(self, mock_util, distro_name, + distro_version, + distro_full_name): + """ + Assert that the agent issues one telemetry message as part of a + failed provisioning. + + 1. Provision + """ + ph = get_provision_handler(distro_name, distro_version, + distro_full_name) + ph.report_event = MagicMock() + ph.reg_ssh_host_key = MagicMock(side_effect=ProvisionError( + "--unit-test--")) + + mock_osutil = MagicMock() + mock_osutil.decode_customdata = Mock(return_value="") + + ph.osutil = mock_osutil + ph.protocol_util.osutil = mock_osutil + ph.protocol_util.get_protocol_by_file = MagicMock() + ph.protocol_util.get_protocol = MagicMock() + + conf.get_dvd_mount_point = Mock(return_value=self.tmp_dir) + ovfenv_file = os.path.join(self.tmp_dir, OVF_FILE_NAME) + ovfenv_data = load_data("ovf-env.xml") + fileutil.write_file(ovfenv_file, ovfenv_data) + + ph.run() + ph.report_event.assert_called_once_with( + "[ProvisionError] --unit-test--") + + if __name__ == '__main__': unittest.main() diff --git a/tests/tools.py b/tests/tools.py index 94fab7f5..65e27c6e 100644 --- a/tests/tools.py +++ b/tests/tools.py @@ -34,9 +34,9 @@ from azurelinuxagent.common.version import PY_VERSION_MAJOR #Import mock module for Python2 and Python3 try: - from unittest.mock import Mock, patch, MagicMock, DEFAULT, call + from unittest.mock import Mock, patch, MagicMock, DEFAULT, ANY, call except ImportError: - from mock import Mock, patch, MagicMock, DEFAULT, call + from mock import Mock, patch, MagicMock, DEFAULT, ANY, call test_dir = os.path.dirname(os.path.abspath(__file__)) data_dir = os.path.join(test_dir, "data")
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 1, "test_score": 2 }, "num_modified_files": 3 }
2.2
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pyasn1", "pip_packages": [ "nose", "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.4", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs==22.2.0 certifi==2021.5.30 importlib-metadata==4.8.3 iniconfig==1.1.1 nose==1.3.7 packaging==21.3 pluggy==1.0.0 py==1.11.0 pyasn1 @ file:///Users/ktietz/demo/mc3/conda-bld/pyasn1_1629708007385/work pyparsing==3.1.4 pytest==7.0.1 tomli==1.2.3 typing_extensions==4.1.1 -e git+https://github.com/Azure/WALinuxAgent.git@b943cbc7067fbb8500a6a2ca1c7588f803ff7c81#egg=WALinuxAgent zipp==3.6.0
name: WALinuxAgent channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - pyasn1=0.4.8=pyhd3eb1b0_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - attrs==22.2.0 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - nose==1.3.7 - packaging==21.3 - pluggy==1.0.0 - py==1.11.0 - pyparsing==3.1.4 - pytest==7.0.1 - tomli==1.2.3 - typing-extensions==4.1.1 - zipp==3.6.0 prefix: /opt/conda/envs/WALinuxAgent
[ "tests/pa/test_provision.py::TestProvision::test_provision_telemetry_success" ]
[]
[ "tests/pa/test_provision.py::TestProvision::test_customdata", "tests/pa/test_provision.py::TestProvision::test_is_provisioned_is_provisioned", "tests/pa/test_provision.py::TestProvision::test_is_provisioned_not_deprovisioned", "tests/pa/test_provision.py::TestProvision::test_is_provisioned_not_provisioned", "tests/pa/test_provision.py::TestProvision::test_provision", "tests/pa/test_provision.py::TestProvision::test_provision_telemetry_fail", "tests/pa/test_provision.py::TestProvision::test_provisioning_is_skipped_when_not_enabled" ]
[]
Apache License 2.0
null
Azure__WALinuxAgent-986
30e638ddab04bd4ec473fe8369a86f64e717776e
2018-01-03 23:14:09
6e9b985c1d7d564253a1c344bab01b45093103cd
diff --git a/azurelinuxagent/ga/env.py b/azurelinuxagent/ga/env.py index 0456cb06..26487818 100644 --- a/azurelinuxagent/ga/env.py +++ b/azurelinuxagent/ga/env.py @@ -86,7 +86,7 @@ class EnvHandler(object): version=CURRENT_VERSION, op=WALAEventOperation.Firewall, is_success=success, - log_event=True) + log_event=False) timeout = conf.get_root_device_scsi_timeout() if timeout is not None: diff --git a/azurelinuxagent/ga/monitor.py b/azurelinuxagent/ga/monitor.py index e3ef292f..9b90aa7b 100644 --- a/azurelinuxagent/ga/monitor.py +++ b/azurelinuxagent/ga/monitor.py @@ -203,7 +203,8 @@ class MonitorHandler(object): version=CURRENT_VERSION, op=WALAEventOperation.HeartBeat, is_success=True, - message=msg) + message=msg, + log_event=False) counter += 1 @@ -222,7 +223,7 @@ class MonitorHandler(object): version=CURRENT_VERSION, op=WALAEventOperation.HttpErrors, is_success=False, - msg=msg) + message=msg) try: self.collect_and_send_events() diff --git a/azurelinuxagent/ga/update.py b/azurelinuxagent/ga/update.py index 26009299..1b6f913e 100644 --- a/azurelinuxagent/ga/update.py +++ b/azurelinuxagent/ga/update.py @@ -295,7 +295,7 @@ class UpdateHandler(object): duration=elapsed_milliseconds(utc_start), message="Incarnation {0}".format( exthandlers_handler.last_etag), - log_event=True) + log_event=False) time.sleep(GOAL_STATE_INTERVAL) diff --git a/azurelinuxagent/pa/provision/cloudinit.py b/azurelinuxagent/pa/provision/cloudinit.py index 22c3f9ca..fa47799a 100644 --- a/azurelinuxagent/pa/provision/cloudinit.py +++ b/azurelinuxagent/pa/provision/cloudinit.py @@ -64,7 +64,7 @@ class CloudInitProvisionHandler(ProvisionHandler): logger.info("Finished provisioning") self.report_ready(thumbprint) - self.report_event("Provision succeed", + self.report_event("Provisioning with cloud-init succeeded", is_success=True, duration=elapsed_milliseconds(utc_start)) self.report_event(self.create_guest_state_telemetry_messsage(), diff --git a/azurelinuxagent/pa/provision/default.py b/azurelinuxagent/pa/provision/default.py index 5d6f1565..44e171b4 100644 --- a/azurelinuxagent/pa/provision/default.py +++ b/azurelinuxagent/pa/provision/default.py @@ -89,7 +89,7 @@ class ProvisionHandler(object): self.write_provisioned() - self.report_event("Provision succeeded", + self.report_event("Provisioning succeeded", is_success=True, duration=elapsed_milliseconds(utc_start)) diff --git a/azurelinuxagent/pa/provision/factory.py b/azurelinuxagent/pa/provision/factory.py index d87765f3..9e88618f 100644 --- a/azurelinuxagent/pa/provision/factory.py +++ b/azurelinuxagent/pa/provision/factory.py @@ -16,9 +16,7 @@ # import azurelinuxagent.common.conf as conf -import azurelinuxagent.common.logger as logger -from azurelinuxagent.common.utils.textutil import Version from azurelinuxagent.common.version import DISTRO_NAME, DISTRO_VERSION, \ DISTRO_FULL_NAME
Update provisioning signal We use the same signal today to indicate provision success/failure between cloud-init and agent based provisioning. We should clarify how to distinguish these.
Azure/WALinuxAgent
diff --git a/tests/pa/test_provision.py b/tests/pa/test_provision.py index ab0a9102..2c2d2c9b 100644 --- a/tests/pa/test_provision.py +++ b/tests/pa/test_provision.py @@ -151,7 +151,7 @@ class TestProvision(AgentTestCase): ph.run() - call1 = call("Provision succeeded", duration=ANY, is_success=True) + call1 = call("Provisioning succeeded", duration=ANY, is_success=True) call2 = call(ANY, is_success=True, operation=WALAEventOperation.GuestState) ph.report_event.assert_has_calls([call1, call2])
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 2, "test_score": 2 }, "num_modified_files": 6 }
2.2
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "pyasn1", "nose", "nose-cov", "pytest" ], "pre_install": null, "python": "3.4", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work certifi==2021.5.30 cov-core==1.15.0 coverage==6.2 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work nose==1.3.7 nose-cov==1.6 packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pyasn1==0.5.1 pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work pytest==6.2.4 toml @ file:///tmp/build/80754af9/toml_1616166611790/work typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work -e git+https://github.com/Azure/WALinuxAgent.git@30e638ddab04bd4ec473fe8369a86f64e717776e#egg=WALinuxAgent zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work
name: WALinuxAgent channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=21.4.0=pyhd3eb1b0_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - importlib-metadata=4.8.1=py36h06a4308_0 - importlib_metadata=4.8.1=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - more-itertools=8.12.0=pyhd3eb1b0_0 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=21.3=pyhd3eb1b0_0 - pip=21.2.2=py36h06a4308_0 - pluggy=0.13.1=py36h06a4308_0 - py=1.11.0=pyhd3eb1b0_0 - pyparsing=3.0.4=pyhd3eb1b0_0 - pytest=6.2.4=py36h06a4308_2 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - toml=0.10.2=pyhd3eb1b0_0 - typing_extensions=4.1.1=pyh06a4308_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zipp=3.6.0=pyhd3eb1b0_0 - zlib=1.2.13=h5eee18b_1 - pip: - cov-core==1.15.0 - coverage==6.2 - nose==1.3.7 - nose-cov==1.6 - pyasn1==0.5.1 prefix: /opt/conda/envs/WALinuxAgent
[ "tests/pa/test_provision.py::TestProvision::test_provision_telemetry_success" ]
[]
[ "tests/pa/test_provision.py::TestProvision::test_customdata", "tests/pa/test_provision.py::TestProvision::test_is_provisioned_is_provisioned", "tests/pa/test_provision.py::TestProvision::test_is_provisioned_not_deprovisioned", "tests/pa/test_provision.py::TestProvision::test_is_provisioned_not_provisioned", "tests/pa/test_provision.py::TestProvision::test_provision", "tests/pa/test_provision.py::TestProvision::test_provision_telemetry_fail", "tests/pa/test_provision.py::TestProvision::test_provisioning_is_skipped_when_not_enabled" ]
[]
Apache License 2.0
null
Azure__WALinuxAgent-987
30e638ddab04bd4ec473fe8369a86f64e717776e
2018-01-03 23:27:34
6e9b985c1d7d564253a1c344bab01b45093103cd
diff --git a/azurelinuxagent/common/protocol/restapi.py b/azurelinuxagent/common/protocol/restapi.py index 275cedb0..540ec5d9 100644 --- a/azurelinuxagent/common/protocol/restapi.py +++ b/azurelinuxagent/common/protocol/restapi.py @@ -321,9 +321,9 @@ class Protocol(DataContract): def get_artifacts_profile(self): raise NotImplementedError() - def download_ext_handler_pkg(self, uri, headers=None): + def download_ext_handler_pkg(self, uri, headers=None, use_proxy=True): try: - resp = restutil.http_get(uri, use_proxy=True, headers=headers) + resp = restutil.http_get(uri, headers=headers, use_proxy=use_proxy) if restutil.request_succeeded(resp): return resp.read() except Exception as e: diff --git a/azurelinuxagent/common/protocol/wire.py b/azurelinuxagent/common/protocol/wire.py index a92e0b89..2dc5297c 100644 --- a/azurelinuxagent/common/protocol/wire.py +++ b/azurelinuxagent/common/protocol/wire.py @@ -172,7 +172,7 @@ class WireProtocol(Protocol): logger.warn("Download did not succeed, falling back to host plugin") host = self.client.get_host_plugin() uri, headers = host.get_artifact_request(uri, host.manifest_uri) - package = super(WireProtocol, self).download_ext_handler_pkg(uri, headers=headers) + package = super(WireProtocol, self).download_ext_handler_pkg(uri, headers=headers, use_proxy=False) return package def report_provision_status(self, provision_status): diff --git a/azurelinuxagent/ga/env.py b/azurelinuxagent/ga/env.py index 0456cb06..26487818 100644 --- a/azurelinuxagent/ga/env.py +++ b/azurelinuxagent/ga/env.py @@ -86,7 +86,7 @@ class EnvHandler(object): version=CURRENT_VERSION, op=WALAEventOperation.Firewall, is_success=success, - log_event=True) + log_event=False) timeout = conf.get_root_device_scsi_timeout() if timeout is not None: diff --git a/azurelinuxagent/ga/monitor.py b/azurelinuxagent/ga/monitor.py index e3ef292f..9b90aa7b 100644 --- a/azurelinuxagent/ga/monitor.py +++ b/azurelinuxagent/ga/monitor.py @@ -203,7 +203,8 @@ class MonitorHandler(object): version=CURRENT_VERSION, op=WALAEventOperation.HeartBeat, is_success=True, - message=msg) + message=msg, + log_event=False) counter += 1 @@ -222,7 +223,7 @@ class MonitorHandler(object): version=CURRENT_VERSION, op=WALAEventOperation.HttpErrors, is_success=False, - msg=msg) + message=msg) try: self.collect_and_send_events() diff --git a/azurelinuxagent/ga/update.py b/azurelinuxagent/ga/update.py index 26009299..1b6f913e 100644 --- a/azurelinuxagent/ga/update.py +++ b/azurelinuxagent/ga/update.py @@ -295,7 +295,7 @@ class UpdateHandler(object): duration=elapsed_milliseconds(utc_start), message="Incarnation {0}".format( exthandlers_handler.last_etag), - log_event=True) + log_event=False) time.sleep(GOAL_STATE_INTERVAL) diff --git a/azurelinuxagent/pa/provision/cloudinit.py b/azurelinuxagent/pa/provision/cloudinit.py index 22c3f9ca..fa47799a 100644 --- a/azurelinuxagent/pa/provision/cloudinit.py +++ b/azurelinuxagent/pa/provision/cloudinit.py @@ -64,7 +64,7 @@ class CloudInitProvisionHandler(ProvisionHandler): logger.info("Finished provisioning") self.report_ready(thumbprint) - self.report_event("Provision succeed", + self.report_event("Provisioning with cloud-init succeeded", is_success=True, duration=elapsed_milliseconds(utc_start)) self.report_event(self.create_guest_state_telemetry_messsage(), diff --git a/azurelinuxagent/pa/provision/default.py b/azurelinuxagent/pa/provision/default.py index 5d6f1565..44e171b4 100644 --- a/azurelinuxagent/pa/provision/default.py +++ b/azurelinuxagent/pa/provision/default.py @@ -89,7 +89,7 @@ class ProvisionHandler(object): self.write_provisioned() - self.report_event("Provision succeeded", + self.report_event("Provisioning succeeded", is_success=True, duration=elapsed_milliseconds(utc_start)) diff --git a/azurelinuxagent/pa/provision/factory.py b/azurelinuxagent/pa/provision/factory.py index d87765f3..9e88618f 100644 --- a/azurelinuxagent/pa/provision/factory.py +++ b/azurelinuxagent/pa/provision/factory.py @@ -16,9 +16,7 @@ # import azurelinuxagent.common.conf as conf -import azurelinuxagent.common.logger as logger -from azurelinuxagent.common.utils.textutil import Version from azurelinuxagent.common.version import DISTRO_NAME, DISTRO_VERSION, \ DISTRO_FULL_NAME
[2.2.14] HostGAPlugin still use proxy while auto-updating Hi there, I saw there was an issue #769 "HostGAPlugin requests should never go through proxy". But currently it seems that only the blob status upload traffic can ignore the proxy when proxy is misconfigured. For the auto-update feature, only the manifest file can be downloaded without proxy, the WALA update packages still use proxy and fail to be downloaded. The extension downloading process is the same as auto-update. Is it by design? Thanks! My steps: 1. Configure /etc/waagent.conf to set a wrong proxy, enable auto-update, and enable verbose log: HttpProxy.Host=172.16.0.1 HttpProxy.Port=3128 Logs.Verbose=y AutoUpdate.Enabled=y Service waagent restart 2. Check /var/log/waagent.log ``` 2017/07/12 06:29:39.476351 VERBOSE HTTP proxy: [172.16.0.1:3128] 2017/07/12 06:29:39.483259 VERBOSE HTTP connection [GET] [http://rdfepirv2sg1prdstr03.blob.core.windows.net:80/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_asiasoutheast_manifest.xml] [None] [None] 2017/07/12 06:29:49.513148 VERBOSE HTTP connection [GET] [http://rdfepirv2sg1prdstr03.blob.core.windows.net:80/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_asiasoutheast_manifest.xml] [None] [None] 2017/07/12 06:29:59.547066 VERBOSE HTTP connection [GET] [http://rdfepirv2sg1prdstr03.blob.core.windows.net:80/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_asiasoutheast_manifest.xml] [None] [None] 2017/07/12 06:30:09.572601 VERBOSE Fetch failed from [https://rdfepirv2sg1prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_asiasoutheast_manifest.xml]: [000009] HTTP GET failed 2017/07/12 06:30:09.591745 VERBOSE Manifest could not be downloaded, falling back to host plugin 2017/07/12 06:30:09.602838 VERBOSE HostGAPlugin: Getting API versions at [http://100.107.240.13:32526/versions] 2017/07/12 06:30:09.614843 VERBOSE HTTP connection [GET] [/versions] [None] [{'x-ms-containerid': u'd4384bb2-4f5c-4680-8c3d-9fa51841ba7d'}] 2017/07/12 06:30:09.632135 VERBOSE HTTP response status: [200] 2017/07/12 06:30:09.639179 INFO Event: name=WALinuxAgent, op=InitializeHostPlugin, message= 2017/07/12 06:30:09.650182 VERBOSE Fetch [http://100.107.240.13:32526/extensionArtifact] with headers [{'x-ms-containerid': u'd4384bb2-4f5c-4680-8c3d-9fa51841ba7d', 'x-ms-version': '2015-09-01', 'x-ms-host-config-name': u'77bbebc9f3994cc48fbef61834a1822e.0.77bbebc9f3994cc48fbef61834a1822e.0.wala692214ui4.1.xml', 'x-ms-artifact-location': u'https://rdfepirv2sg1prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_asiasoutheast_manifest.xml'}] 2017/07/12 06:30:09.689246 VERBOSE HTTP connection [GET] [/extensionArtifact] [None] [{'x-ms-containerid': u'd4384bb2-4f5c-4680-8c3d-9fa51841ba7d', 'x-ms-version': '2015-09-01', 'x-ms-host-config-name': u'77bbebc9f3994cc48fbef61834a1822e.0.77bbebc9f3994cc48fbef61834a1822e.0.wala692214ui4.1.xml', 'x-ms-artifact-location': u'https://rdfepirv2sg1prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_asiasoutheast_manifest.xml'}] 2017/07/12 06:30:09.763930 VERBOSE HTTP response status: [200] 2017/07/12 06:30:09.770335 VERBOSE Manifest downloaded successfully from host plugin 2017/07/12 06:30:09.778017 INFO Setting host plugin as default channel 2017/07/12 06:30:09.785914 VERBOSE Load ExtensionManifest.xml 2017/07/12 06:30:09.794175 VERBOSE Loading Agent WALinuxAgent-2.2.10 from package package 2017/07/12 06:30:09.803674 VERBOSE Agent WALinuxAgent-2.2.10 error state: Last Failure: 0.0, Total Failures: 0, Fatal: False 2017/07/12 06:30:09.816401 VERBOSE Ensuring Agent WALinuxAgent-2.2.10 is downloaded 2017/07/12 06:30:09.825242 VERBOSE Using host plugin as default channel 2017/07/12 06:30:09.833194 VERBOSE HTTP proxy: [172.16.0.1:3128] 2017/07/12 06:30:09.839940 VERBOSE HTTP connection [GET] [http://100.107.240.13:32526/extensionArtifact] [None] [{'x-ms-containerid': u'd4384bb2-4f5c-4680-8c3d-9fa51841ba7d', 'x-ms-artifact-manifest-location': u'https://rdfepirv2sg1prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_asiasoutheast_manifest.xml', 'x-ms-version': '2015-09-01', 'x-ms-host-config-name': u'77bbebc9f3994cc48fbef61834a1822e.0.77bbebc9f3994cc48fbef61834a1822e.0.wala692214ui4.1.xml', 'x-ms-artifact-location': u'https://rdfepirv2sg1prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent__Prod__2.2.10'}] 2017/07/12 06:30:19.911177 VERBOSE HTTP connection [GET] [http://100.107.240.13:32526/extensionArtifact] [None] [{'x-ms-containerid': u'd4384bb2-4f5c-4680-8c3d-9fa51841ba7d', 'x-ms-artifact-manifest-location': u'https://rdfepirv2sg1prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_asiasoutheast_manifest.xml', 'x-ms-version': '2015-09-01', 'x-ms-host-config-name': u'77bbebc9f3994cc48fbef61834a1822e.0.77bbebc9f3994cc48fbef61834a1822e.0.wala692214ui4.1.xml', 'x-ms-artifact-location': u'https://rdfepirv2sg1prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent__Prod__2.2.10'}] 2017/07/12 06:30:29.992187 VERBOSE HTTP connection [GET] [http://100.107.240.13:32526/extensionArtifact] [None] [{'x-ms-containerid': u'd4384bb2-4f5c-4680-8c3d-9fa51841ba7d', 'x-ms-artifact-manifest-location': u'https://rdfepirv2sg1prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_asiasoutheast_manifest.xml', 'x-ms-version': '2015-09-01', 'x-ms-host-config-name': u'77bbebc9f3994cc48fbef61834a1822e.0.77bbebc9f3994cc48fbef61834a1822e.0.wala692214ui4.1.xml', 'x-ms-artifact-location': u'https://rdfepirv2sg1prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent__Prod__2.2.10'}] 2017/07/12 06:30:39.543400 VERBOSE Found event file: /var/lib/waagent/events/1499855409649965.tld 2017/07/12 06:30:39.554873 VERBOSE Processed event file: /var/lib/waagent/events/1499855409649965.tld 2017/07/12 06:30:39.566265 VERBOSE HTTP connection [POST] [/machine?comp=telemetrydata] [<?xml version="1.0"?><TelemetryData version="1.0"><Provider id="69B669B9-4AF8-4C50-BDC4-6006FA76E975"><Event id="1"><![CDATA[<Param Name="Name" Value="WALinuxAgent" T="mt:wstr" /><Param Name="Version" Value="2.2.14" T="mt:wstr" /><Param Name="IsInternal" Value="False" T="mt:bool" /><Param Name="Operation" Value="InitializeHostPlugin" T="mt:wstr" /><Param Name="OperationSuccess" Value="True" T="mt:bool" /><Param Name="Message" Value="" T="mt:wstr" /><Param Name="Duration" Value="0" T="mt:uint64" /><Param Name="ExtensionType" Value="" T="mt:wstr" /><Param Name="OSVersion" Value="Linux:redhat-6.9-Santiago:2.6.32-696.3.2.el6.x86_64" T="mt:wstr" /><Param Name="GAVersion" Value="WALinuxAgent-2.2.14" T="mt:wstr" /><Param Name="RAM" Value="1679" T="mt:uint64" /><Param Name="Processors" Value="1" T="mt:uint64" /><Param Name="VMName" Value="wala692214ui4" T="mt:wstr" /><Param Name="TenantName" Value="77bbebc9f3994cc48fbef61834a1822e" T="mt:wstr" /><Param Name="RoleName" Value="wala692214ui4" T="mt:wstr" /><Param Name="RoleInstanceName" Value="77bbebc9f3994cc48fbef61834a1822e.wala692214ui4" T="mt:wstr" /><Param Name="ContainerId" Value="d4384bb2-4f5c-4680-8c3d-9fa51841ba7d" T="mt:wstr" />]]></Event></Provider></TelemetryData>] [{'Content-Type': 'text/xml;charset=utf-8', 'x-ms-version': '2012-11-30', 'x-ms-agent-name': 'WALinuxAgent'}] 2017/07/12 06:30:39.768153 VERBOSE HTTP response status: [200] 2017/07/12 06:30:40.064471 VERBOSE Agent WALinuxAgent-2.2.10 download from http://100.107.240.13:32526/extensionArtifact failed [[000009] HTTP GET failed] 2017/07/12 06:30:40.079068 WARNING Host plugin download unsuccessful 2017/07/12 06:30:40.089613 VERBOSE Using host plugin as default channel 2017/07/12 06:30:40.097071 VERBOSE HTTP proxy: [172.16.0.1:3128] 2017/07/12 06:30:40.103549 VERBOSE HTTP connection [GET] [http://100.107.240.13:32526/extensionArtifact] [None] [{'x-ms-containerid': u'd4384bb2-4f5c-4680-8c3d-9fa51841ba7d', 'x-ms-artifact-manifest-location': u'https://rdfepirv2sg1prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_asiasoutheast_manifest.xml', 'x-ms-version': '2015-09-01', 'x-ms-host-config-name': u'77bbebc9f3994cc48fbef61834a1822e.0.77bbebc9f3994cc48fbef61834a1822e.0.wala692214ui4.1.xml', 'x-ms-artifact-location': u'https://rdfepirv2sg1prdstr04.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent__Prod__2.2.10'}] 2017/07/12 06:30:50.176833 VERBOSE HTTP connection [GET] [http://100.107.240.13:32526/extensionArtifact] [None] [{'x-ms-containerid': u'd4384bb2-4f5c-4680-8c3d-9fa51841ba7d', 'x-ms-artifact-manifest-location': u'https://rdfepirv2sg1prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_asiasoutheast_manifest.xml', 'x-ms-version': '2015-09-01', 'x-ms-host-config-name': u'77bbebc9f3994cc48fbef61834a1822e.0.77bbebc9f3994cc48fbef61834a1822e.0.wala692214ui4.1.xml', 'x-ms-artifact-location': u'https://rdfepirv2sg1prdstr04.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent__Prod__2.2.10'}] 2017/07/12 06:31:00.249870 VERBOSE HTTP connection [GET] [http://100.107.240.13:32526/extensionArtifact] [None] [{'x-ms-containerid': u'd4384bb2-4f5c-4680-8c3d-9fa51841ba7d', 'x-ms-artifact-manifest-location': u'https://rdfepirv2sg1prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_asiasoutheast_manifest.xml', 'x-ms-version': '2015-09-01', 'x-ms-host-config-name': u'77bbebc9f3994cc48fbef61834a1822e.0.77bbebc9f3994cc48fbef61834a1822e.0.wala692214ui4.1.xml', 'x-ms-artifact-location': u'https://rdfepirv2sg1prdstr04.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent__Prod__2.2.10'}] 2017/07/12 06:31:10.331413 VERBOSE Agent WALinuxAgent-2.2.10 download from http://100.107.240.13:32526/extensionArtifact failed [[000009] HTTP GET failed] 2017/07/12 06:31:10.347366 WARNING Host plugin download unsuccessful 2017/07/12 06:31:10.355276 VERBOSE Using host plugin as default channel 2017/07/12 06:31:10.363528 VERBOSE HTTP proxy: [172.16.0.1:3128] ... ```
Azure/WALinuxAgent
diff --git a/tests/pa/test_provision.py b/tests/pa/test_provision.py index ab0a9102..2c2d2c9b 100644 --- a/tests/pa/test_provision.py +++ b/tests/pa/test_provision.py @@ -151,7 +151,7 @@ class TestProvision(AgentTestCase): ph.run() - call1 = call("Provision succeeded", duration=ANY, is_success=True) + call1 = call("Provisioning succeeded", duration=ANY, is_success=True) call2 = call(ANY, is_success=True, operation=WALAEventOperation.GuestState) ph.report_event.assert_has_calls([call1, call2])
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_issue_reference", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 0, "test_score": 3 }, "num_modified_files": 8 }
2.2
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "", "pip_packages": [ "pyasn1", "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.4", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs==22.2.0 certifi==2021.5.30 importlib-metadata==4.8.3 iniconfig==1.1.1 packaging==21.3 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pyparsing==3.1.4 pytest==7.0.1 tomli==1.2.3 typing_extensions==4.1.1 -e git+https://github.com/Azure/WALinuxAgent.git@30e638ddab04bd4ec473fe8369a86f64e717776e#egg=WALinuxAgent zipp==3.6.0
name: WALinuxAgent channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - attrs==22.2.0 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - packaging==21.3 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pyparsing==3.1.4 - pytest==7.0.1 - tomli==1.2.3 - typing-extensions==4.1.1 - zipp==3.6.0 prefix: /opt/conda/envs/WALinuxAgent
[ "tests/pa/test_provision.py::TestProvision::test_provision_telemetry_success" ]
[]
[ "tests/pa/test_provision.py::TestProvision::test_customdata", "tests/pa/test_provision.py::TestProvision::test_is_provisioned_is_provisioned", "tests/pa/test_provision.py::TestProvision::test_is_provisioned_not_deprovisioned", "tests/pa/test_provision.py::TestProvision::test_is_provisioned_not_provisioned", "tests/pa/test_provision.py::TestProvision::test_provision", "tests/pa/test_provision.py::TestProvision::test_provision_telemetry_fail", "tests/pa/test_provision.py::TestProvision::test_provisioning_is_skipped_when_not_enabled" ]
[]
Apache License 2.0
null
Azure__WALinuxAgent-988
30e638ddab04bd4ec473fe8369a86f64e717776e
2018-01-04 19:04:14
6e9b985c1d7d564253a1c344bab01b45093103cd
diff --git a/azurelinuxagent/common/protocol/restapi.py b/azurelinuxagent/common/protocol/restapi.py index 275cedb0..540ec5d9 100644 --- a/azurelinuxagent/common/protocol/restapi.py +++ b/azurelinuxagent/common/protocol/restapi.py @@ -321,9 +321,9 @@ class Protocol(DataContract): def get_artifacts_profile(self): raise NotImplementedError() - def download_ext_handler_pkg(self, uri, headers=None): + def download_ext_handler_pkg(self, uri, headers=None, use_proxy=True): try: - resp = restutil.http_get(uri, use_proxy=True, headers=headers) + resp = restutil.http_get(uri, headers=headers, use_proxy=use_proxy) if restutil.request_succeeded(resp): return resp.read() except Exception as e: diff --git a/azurelinuxagent/common/protocol/wire.py b/azurelinuxagent/common/protocol/wire.py index a92e0b89..2dc5297c 100644 --- a/azurelinuxagent/common/protocol/wire.py +++ b/azurelinuxagent/common/protocol/wire.py @@ -172,7 +172,7 @@ class WireProtocol(Protocol): logger.warn("Download did not succeed, falling back to host plugin") host = self.client.get_host_plugin() uri, headers = host.get_artifact_request(uri, host.manifest_uri) - package = super(WireProtocol, self).download_ext_handler_pkg(uri, headers=headers) + package = super(WireProtocol, self).download_ext_handler_pkg(uri, headers=headers, use_proxy=False) return package def report_provision_status(self, provision_status): diff --git a/azurelinuxagent/ga/env.py b/azurelinuxagent/ga/env.py index 0456cb06..26487818 100644 --- a/azurelinuxagent/ga/env.py +++ b/azurelinuxagent/ga/env.py @@ -86,7 +86,7 @@ class EnvHandler(object): version=CURRENT_VERSION, op=WALAEventOperation.Firewall, is_success=success, - log_event=True) + log_event=False) timeout = conf.get_root_device_scsi_timeout() if timeout is not None: diff --git a/azurelinuxagent/ga/monitor.py b/azurelinuxagent/ga/monitor.py index e3ef292f..9b90aa7b 100644 --- a/azurelinuxagent/ga/monitor.py +++ b/azurelinuxagent/ga/monitor.py @@ -203,7 +203,8 @@ class MonitorHandler(object): version=CURRENT_VERSION, op=WALAEventOperation.HeartBeat, is_success=True, - message=msg) + message=msg, + log_event=False) counter += 1 @@ -222,7 +223,7 @@ class MonitorHandler(object): version=CURRENT_VERSION, op=WALAEventOperation.HttpErrors, is_success=False, - msg=msg) + message=msg) try: self.collect_and_send_events() diff --git a/azurelinuxagent/ga/update.py b/azurelinuxagent/ga/update.py index 26009299..80870cae 100644 --- a/azurelinuxagent/ga/update.py +++ b/azurelinuxagent/ga/update.py @@ -295,7 +295,7 @@ class UpdateHandler(object): duration=elapsed_milliseconds(utc_start), message="Incarnation {0}".format( exthandlers_handler.last_etag), - log_event=True) + log_event=False) time.sleep(GOAL_STATE_INTERVAL) @@ -704,13 +704,13 @@ class GuestAgent(object): version = None if path is not None: m = AGENT_DIR_PATTERN.match(path) - if m == None: + if m is None: raise UpdateError(u"Illegal agent directory: {0}".format(path)) version = m.group(1) elif self.pkg is not None: version = pkg.version - if version == None: + if version is None: raise UpdateError(u"Illegal agent version: {0}".format(version)) self.version = FlexibleVersion(version) @@ -727,6 +727,13 @@ class GuestAgent(object): if isinstance(e, ResourceGoneError): raise + # The agent was improperly blacklisting versions due to a timeout + # encountered while downloading a later version. Errors of type + # socket.error are IOError, so this should provide sufficient + # protection against a large class of I/O operation failures. + if isinstance(e, IOError): + raise + # Note the failure, blacklist the agent if the package downloaded # - An exception with a downloaded package indicates the package # is corrupt (e.g., missing the HandlerManifest.json file) diff --git a/azurelinuxagent/pa/provision/cloudinit.py b/azurelinuxagent/pa/provision/cloudinit.py index 22c3f9ca..fa47799a 100644 --- a/azurelinuxagent/pa/provision/cloudinit.py +++ b/azurelinuxagent/pa/provision/cloudinit.py @@ -64,7 +64,7 @@ class CloudInitProvisionHandler(ProvisionHandler): logger.info("Finished provisioning") self.report_ready(thumbprint) - self.report_event("Provision succeed", + self.report_event("Provisioning with cloud-init succeeded", is_success=True, duration=elapsed_milliseconds(utc_start)) self.report_event(self.create_guest_state_telemetry_messsage(), diff --git a/azurelinuxagent/pa/provision/default.py b/azurelinuxagent/pa/provision/default.py index 5d6f1565..44e171b4 100644 --- a/azurelinuxagent/pa/provision/default.py +++ b/azurelinuxagent/pa/provision/default.py @@ -89,7 +89,7 @@ class ProvisionHandler(object): self.write_provisioned() - self.report_event("Provision succeeded", + self.report_event("Provisioning succeeded", is_success=True, duration=elapsed_milliseconds(utc_start)) diff --git a/azurelinuxagent/pa/provision/factory.py b/azurelinuxagent/pa/provision/factory.py index d87765f3..9e88618f 100644 --- a/azurelinuxagent/pa/provision/factory.py +++ b/azurelinuxagent/pa/provision/factory.py @@ -16,9 +16,7 @@ # import azurelinuxagent.common.conf as conf -import azurelinuxagent.common.logger as logger -from azurelinuxagent.common.utils.textutil import Version from azurelinuxagent.common.version import DISTRO_NAME, DISTRO_VERSION, \ DISTRO_FULL_NAME
Socket timeout causes blacklist Found in logs, we need to handle this case more gracefully: ``` 2017/11/17 11:47:16.626326 WARNING Agent WALinuxAgent-2.2.18 failed with exception: The read operation timed out 2017/11/17 11:47:16.705491 WARNING Traceback (most recent call last): File "bin/WALinuxAgent-2.2.18-py2.7.egg/azurelinuxagent/ga/update.py", line 271, in run exthandlers_handler.run() File "bin/WALinuxAgent-2.2.18-py2.7.egg/azurelinuxagent/ga/exthandlers.py", line 198, in run self.handle_ext_handlers(etag) File "bin/WALinuxAgent-2.2.18-py2.7.egg/azurelinuxagent/ga/exthandlers.py", line 285, in handle_ext_handlers self.handle_ext_handler(ext_handler, etag) File "bin/WALinuxAgent-2.2.18-py2.7.egg/azurelinuxagent/ga/exthandlers.py", line 291, in handle_ext_handler ext_handler_i.decide_version() File "bin/WALinuxAgent-2.2.18-py2.7.egg/azurelinuxagent/ga/exthandlers.py", line 432, in decide_version pkg_list = self.protocol.get_ext_handler_pkgs(self.ext_handler) File "bin/WALinuxAgent-2.2.18-py2.7.egg/azurelinuxagent/common/protocol/wire.py", line 148, in get_ext_handler_pkgs man = self.client.get_ext_manifest(ext_handler, goal_state) File "bin/WALinuxAgent-2.2.18-py2.7.egg/azurelinuxagent/common/protocol/wire.py", line 809, in get_ext_manifest xml_text = self.fetch_manifest(ext_handler.versionUris) File "bin/WALinuxAgent-2.2.18-py2.7.egg/azurelinuxagent/common/protocol/wire.py", line 606, in fetch_manifest response = self.fetch(version.uri) File "bin/WALinuxAgent-2.2.18-py2.7.egg/azurelinuxagent/common/protocol/wire.py", line 653, in fetch return self.decode_config(resp.read()) File "/usr/lib/python3.4/http/client.py", line 541, in read s = self._safe_read(self.length) File "/usr/lib/python3.4/http/client.py", line 691, in _safe_read chunk = self.fp.read(min(amt, MAXAMOUNT)) File "/usr/lib/python3.4/socket.py", line 374, in readinto return self._sock.recv_into(b) File "/usr/lib/python3.4/ssl.py", line 769, in recv_into return self.read(nbytes, buffer) File "/usr/lib/python3.4/ssl.py", line 641, in read v = self._sslobj.read(len, buffer) socket.timeout: The read operation timed out 2017/11/17 11:47:16.784583 WARNING Agent WALinuxAgent-2.2.18 launched with command 'python3 -u bin/WALinuxAgent-2.2.18-py2.7.egg -run-exthandlers' returned code: 1 2017/11/17 11:47:16.785549 WARNING Agent WALinuxAgent-2.2.18 is permanently blacklisted ``` This type of timeout should not be causing a blacklist.
Azure/WALinuxAgent
diff --git a/tests/ga/test_update.py b/tests/ga/test_update.py index 88535f5b..a40278c7 100644 --- a/tests/ga/test_update.py +++ b/tests/ga/test_update.py @@ -387,6 +387,30 @@ class TestGuestAgent(UpdateTestCase): self.assertTrue(agent.is_blacklisted) self.assertEqual(agent.is_blacklisted, agent.error.is_blacklisted) + @patch("azurelinuxagent.ga.update.GuestAgent._ensure_downloaded") + @patch("azurelinuxagent.ga.update.GuestAgent._ensure_loaded") + def test_resource_gone_error_not_blacklisted(self, mock_loaded, mock_downloaded): + try: + mock_downloaded.side_effect = ResourceGoneError() + agent = GuestAgent(path=self.agent_path) + self.assertFalse(agent.is_blacklisted) + except ResourceGoneError: + pass + except: + self.fail("Exception was not expected!") + + @patch("azurelinuxagent.ga.update.GuestAgent._ensure_downloaded") + @patch("azurelinuxagent.ga.update.GuestAgent._ensure_loaded") + def test_ioerror_not_blacklisted(self, mock_loaded, mock_downloaded): + try: + mock_downloaded.side_effect = IOError() + agent = GuestAgent(path=self.agent_path) + self.assertFalse(agent.is_blacklisted) + except IOError: + pass + except: + self.fail("Exception was not expected!") + @patch("azurelinuxagent.ga.update.GuestAgent._ensure_downloaded") @patch("azurelinuxagent.ga.update.GuestAgent._ensure_loaded") def test_is_downloaded(self, mock_loaded, mock_downloaded): @@ -1550,6 +1574,7 @@ class ProtocolMock(object): self.call_counts["update_goal_state"] += 1 self.goal_state_forced = self.goal_state_forced or forced + class ResponseMock(Mock): def __init__(self, status=restutil.httpclient.OK, response=None, reason=None): Mock.__init__(self) @@ -1579,5 +1604,6 @@ class TimeMock(Mock): self.next_time += self.time_increment return current_time + if __name__ == '__main__': unittest.main() diff --git a/tests/pa/test_provision.py b/tests/pa/test_provision.py index ab0a9102..2c2d2c9b 100644 --- a/tests/pa/test_provision.py +++ b/tests/pa/test_provision.py @@ -151,7 +151,7 @@ class TestProvision(AgentTestCase): ph.run() - call1 = call("Provision succeeded", duration=ANY, is_success=True) + call1 = call("Provisioning succeeded", duration=ANY, is_success=True) call2 = call(ANY, is_success=True, operation=WALAEventOperation.GuestState) ph.report_event.assert_has_calls([call1, call2])
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 2, "test_score": 0 }, "num_modified_files": 8 }
2.2
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "pyasn1", "nose", "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.4", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work certifi==2021.5.30 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work nose==1.3.7 packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pyasn1==0.5.1 pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work pytest==6.2.4 toml @ file:///tmp/build/80754af9/toml_1616166611790/work typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work -e git+https://github.com/Azure/WALinuxAgent.git@30e638ddab04bd4ec473fe8369a86f64e717776e#egg=WALinuxAgent zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work
name: WALinuxAgent channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=21.4.0=pyhd3eb1b0_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - importlib-metadata=4.8.1=py36h06a4308_0 - importlib_metadata=4.8.1=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - more-itertools=8.12.0=pyhd3eb1b0_0 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=21.3=pyhd3eb1b0_0 - pip=21.2.2=py36h06a4308_0 - pluggy=0.13.1=py36h06a4308_0 - py=1.11.0=pyhd3eb1b0_0 - pyparsing=3.0.4=pyhd3eb1b0_0 - pytest=6.2.4=py36h06a4308_2 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - toml=0.10.2=pyhd3eb1b0_0 - typing_extensions=4.1.1=pyh06a4308_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zipp=3.6.0=pyhd3eb1b0_0 - zlib=1.2.13=h5eee18b_1 - pip: - nose==1.3.7 - pyasn1==0.5.1 prefix: /opt/conda/envs/WALinuxAgent
[ "tests/ga/test_update.py::TestGuestAgent::test_ioerror_not_blacklisted", "tests/pa/test_provision.py::TestProvision::test_provision_telemetry_success" ]
[]
[ "tests/ga/test_update.py::TestGuestAgentError::test_clear", "tests/ga/test_update.py::TestGuestAgentError::test_creation", "tests/ga/test_update.py::TestGuestAgentError::test_mark_failure", "tests/ga/test_update.py::TestGuestAgentError::test_mark_failure_permanent", "tests/ga/test_update.py::TestGuestAgentError::test_save", "tests/ga/test_update.py::TestGuestAgentError::test_str", "tests/ga/test_update.py::TestGuestAgent::test_clear_error", "tests/ga/test_update.py::TestGuestAgent::test_creation", "tests/ga/test_update.py::TestGuestAgent::test_download", "tests/ga/test_update.py::TestGuestAgent::test_download_fail", "tests/ga/test_update.py::TestGuestAgent::test_download_fallback", "tests/ga/test_update.py::TestGuestAgent::test_ensure_download_skips_blacklisted", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_download_fails", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_load_manifest_fails", "tests/ga/test_update.py::TestGuestAgent::test_ensure_downloaded_unpack_fails", "tests/ga/test_update.py::TestGuestAgent::test_is_available", "tests/ga/test_update.py::TestGuestAgent::test_is_blacklisted", "tests/ga/test_update.py::TestGuestAgent::test_is_downloaded", "tests/ga/test_update.py::TestGuestAgent::test_load_error", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_is_empty", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_is_malformed", "tests/ga/test_update.py::TestGuestAgent::test_load_manifest_missing", "tests/ga/test_update.py::TestGuestAgent::test_mark_failure", "tests/ga/test_update.py::TestGuestAgent::test_resource_gone_error_not_blacklisted", "tests/ga/test_update.py::TestGuestAgent::test_unpack", "tests/ga/test_update.py::TestGuestAgent::test_unpack_fail", "tests/ga/test_update.py::TestUpdate::test_creation", "tests/ga/test_update.py::TestUpdate::test_emit_restart_event_emits_event_if_not_clean_start", "tests/ga/test_update.py::TestUpdate::test_emit_restart_event_writes_sentinal_file", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans_ignores_exceptions", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans_kills_after_interval", "tests/ga/test_update.py::TestUpdate::test_ensure_no_orphans_skips_if_no_orphans", "tests/ga/test_update.py::TestUpdate::test_ensure_partition_assigned", "tests/ga/test_update.py::TestUpdate::test_ensure_readonly_leaves_unmodified", "tests/ga/test_update.py::TestUpdate::test_ensure_readonly_sets_readonly", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_ignores_installed_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_raises_exception_for_restarting_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_resets_with_new_agent", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_will_not_raise_exception_for_long_restarts", "tests/ga/test_update.py::TestUpdate::test_evaluate_agent_health_will_not_raise_exception_too_few_restarts", "tests/ga/test_update.py::TestUpdate::test_filter_blacklisted_agents", "tests/ga/test_update.py::TestUpdate::test_find_agents", "tests/ga/test_update.py::TestUpdate::test_find_agents_does_reload", "tests/ga/test_update.py::TestUpdate::test_find_agents_sorts", "tests/ga/test_update.py::TestUpdate::test_get_host_plugin_returns_host_for_wireserver", "tests/ga/test_update.py::TestUpdate::test_get_host_plugin_returns_none_otherwise", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_excluded", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_no_updates", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_skip_updates", "tests/ga/test_update.py::TestUpdate::test_get_latest_agent_skips_unavailable", "tests/ga/test_update.py::TestUpdate::test_get_pid_files", "tests/ga/test_update.py::TestUpdate::test_get_pid_files_returns_previous", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_false_for_exceptions", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_false_when_sentinal_exists", "tests/ga/test_update.py::TestUpdate::test_is_clean_start_returns_true_when_no_sentinal", "tests/ga/test_update.py::TestUpdate::test_is_orphaned_returns_false_if_parent_exists", "tests/ga/test_update.py::TestUpdate::test_is_orphaned_returns_true_if_parent_does_not_exist", "tests/ga/test_update.py::TestUpdate::test_is_orphaned_returns_true_if_parent_is_init", "tests/ga/test_update.py::TestUpdate::test_is_version_available", "tests/ga/test_update.py::TestUpdate::test_is_version_available_accepts_current", "tests/ga/test_update.py::TestUpdate::test_is_version_available_rejects", "tests/ga/test_update.py::TestUpdate::test_is_version_available_rejects_by_default", "tests/ga/test_update.py::TestUpdate::test_package_filter_for_agent_manifest", "tests/ga/test_update.py::TestUpdate::test_purge_agents", "tests/ga/test_update.py::TestUpdate::test_run", "tests/ga/test_update.py::TestUpdate::test_run_clears_sentinal_on_successful_exit", "tests/ga/test_update.py::TestUpdate::test_run_emits_restart_event", "tests/ga/test_update.py::TestUpdate::test_run_keeps_running", "tests/ga/test_update.py::TestUpdate::test_run_latest", "tests/ga/test_update.py::TestUpdate::test_run_latest_captures_signals", "tests/ga/test_update.py::TestUpdate::test_run_latest_creates_only_one_signal_handler", "tests/ga/test_update.py::TestUpdate::test_run_latest_defaults_to_current", "tests/ga/test_update.py::TestUpdate::test_run_latest_exception_blacklists", "tests/ga/test_update.py::TestUpdate::test_run_latest_exception_does_not_blacklist_if_terminating", "tests/ga/test_update.py::TestUpdate::test_run_latest_forwards_output", "tests/ga/test_update.py::TestUpdate::test_run_latest_nonzero_code_marks_failures", "tests/ga/test_update.py::TestUpdate::test_run_latest_passes_child_args", "tests/ga/test_update.py::TestUpdate::test_run_latest_polling_stops_at_failure", "tests/ga/test_update.py::TestUpdate::test_run_latest_polling_stops_at_success", "tests/ga/test_update.py::TestUpdate::test_run_latest_polls_and_waits_for_success", "tests/ga/test_update.py::TestUpdate::test_run_latest_polls_frequently_if_installed_is_latest", "tests/ga/test_update.py::TestUpdate::test_run_latest_polls_moderately_if_installed_not_latest", "tests/ga/test_update.py::TestUpdate::test_run_leaves_sentinal_on_unsuccessful_exit", "tests/ga/test_update.py::TestUpdate::test_run_stops_if_orphaned", "tests/ga/test_update.py::TestUpdate::test_run_stops_if_update_available", "tests/ga/test_update.py::TestUpdate::test_set_agents_sets_agents", "tests/ga/test_update.py::TestUpdate::test_set_agents_sorts_agents", "tests/ga/test_update.py::TestUpdate::test_set_sentinal", "tests/ga/test_update.py::TestUpdate::test_set_sentinal_writes_current_agent", "tests/ga/test_update.py::TestUpdate::test_shutdown", "tests/ga/test_update.py::TestUpdate::test_shutdown_ignores_exceptions", "tests/ga/test_update.py::TestUpdate::test_shutdown_ignores_missing_sentinal_file", "tests/ga/test_update.py::TestUpdate::test_update_available_returns_true_if_current_gets_blacklisted", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_handles_missing_family", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_includes_old_agents", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_purges_old_agents", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_returns_true_on_first_use", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_skips_if_too_frequent", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_skips_if_when_no_new_versions", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_skips_when_no_versions", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_skips_when_updates_are_disabled", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_sorts", "tests/ga/test_update.py::TestUpdate::test_upgrade_available_will_refresh_goal_state", "tests/ga/test_update.py::TestUpdate::test_write_pid_file", "tests/ga/test_update.py::TestUpdate::test_write_pid_file_ignores_exceptions", "tests/pa/test_provision.py::TestProvision::test_customdata", "tests/pa/test_provision.py::TestProvision::test_is_provisioned_is_provisioned", "tests/pa/test_provision.py::TestProvision::test_is_provisioned_not_deprovisioned", "tests/pa/test_provision.py::TestProvision::test_is_provisioned_not_provisioned", "tests/pa/test_provision.py::TestProvision::test_provision", "tests/pa/test_provision.py::TestProvision::test_provision_telemetry_fail", "tests/pa/test_provision.py::TestProvision::test_provisioning_is_skipped_when_not_enabled" ]
[]
Apache License 2.0
null
Azure__autorest.python-475
4793bd7b9ddc25a241cd54538b4c5750f915b3d2
2020-03-07 00:01:55
b25e4602ecfa5e7f5d13fc4043848b1720b995de
diff --git a/autorest/codegen/models/parameter_list.py b/autorest/codegen/models/parameter_list.py index 5f1c8b94f..500a776b3 100644 --- a/autorest/codegen/models/parameter_list.py +++ b/autorest/codegen/models/parameter_list.py @@ -115,16 +115,17 @@ class ParameterList(MutableSequence): or parameter.is_kwarg ) - signature_parameters_required = [] - signature_parameters_optional = [] + + signature_parameters_no_default_value = [] + signature_parameters_default_value = [] for parameter in self.parameters: if is_parameter_in_signature(parameter): - if parameter.required: - signature_parameters_required.append(parameter) + if not parameter.client_default_value and parameter.required: + signature_parameters_no_default_value.append(parameter) else: - signature_parameters_optional.append(parameter) + signature_parameters_default_value.append(parameter) - signature_parameters = signature_parameters_required + signature_parameters_optional + signature_parameters = signature_parameters_no_default_value + signature_parameters_default_value return signature_parameters @property
argument order syntax error Using > AutoRest code generation utility [cli version: 3.0.6187; node: v10.13.0, max-memory: 8192 gb] With: Autorest for Python v5.0.0 - 20200228.1 And Swagger: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/search/data-plane/Microsoft.Azure.Search.Data/stable/2019-05-06/searchindex.json generates this output: ``` def __init__( self, search_service_name, # type: str search_dns_suffix="search.windows.net", # type: str index_name, # type: str **kwargs # type: Any ): ``` Which is > SyntaxError: non-default argument follows default argument
Azure/autorest.python
diff --git a/test/unittests/test_parameter_ordering.py b/test/unittests/test_parameter_ordering.py new file mode 100644 index 000000000..ce4e06df7 --- /dev/null +++ b/test/unittests/test_parameter_ordering.py @@ -0,0 +1,59 @@ +import pytest +from autorest.codegen.models import Parameter, AnySchema +from autorest.codegen.models.parameter_list import ParameterList +from autorest.codegen.models.parameter import ParameterLocation + +def get_parameter(name, required, default_value=None): + schema = AnySchema( + namespace="parameterordering", + yaml_data={} + ) + return Parameter( + schema=schema, + yaml_data={}, + rest_api_name=name, + serialized_name=name, + description="Parameter to test parameter ordering", + implementation="Method", + required=required, + location=ParameterLocation.Path, + skip_url_encoding=True, + constraints=[], + client_default_value=default_value + ) + +def test_sort_required_parameters(): + required_default_value_parameter = get_parameter( + name="required_default_value_parameter", + required=True, + default_value="hello" + ) + required_parameter = get_parameter( + name="required_parameter", + required=True + ) + + parameter_list = [required_parameter, required_default_value_parameter] + + assert [required_parameter, required_default_value_parameter] == ParameterList(parameter_list).method + + # switch around ordering to confirm + + parameter_list = [required_default_value_parameter, required_parameter] + + assert [required_parameter, required_default_value_parameter] == ParameterList(parameter_list).method + +def test_sort_required_and_non_required_parameters(): + required_parameter = get_parameter( + name="required_parameter", + required=True + ) + + optional_parameter = get_parameter( + name="optional_parameter", + required=False + ) + + parameter_list = [optional_parameter, required_parameter] + + assert [required_parameter, optional_parameter] == ParameterList(parameter_list).method \ No newline at end of file
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 0, "test_score": 0 }, "num_modified_files": 1 }
5.0
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": null, "pre_install": null, "python": "3.7", "reqs_path": [ "dev_requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
astroid==2.3.3 -e git+https://github.com/Azure/autorest.python.git@4793bd7b9ddc25a241cd54538b4c5750f915b3d2#egg=autorest black==23.3.0 cachetools==5.5.2 certifi @ file:///croot/certifi_1671487769961/work/certifi chardet==5.2.0 click==8.1.8 colorama==0.4.6 distlib==0.3.9 docutils==0.20.1 exceptiongroup==1.2.2 filelock==3.12.2 importlib-metadata==6.7.0 iniconfig==2.0.0 invoke==2.2.0 isort==4.3.21 Jinja2==3.1.6 json-rpc==1.15.0 lazy-object-proxy==1.4.3 m2r==0.3.1 MarkupSafe==2.1.5 mccabe==0.6.1 mistune==0.8.4 mypy==1.4.1 mypy-extensions==1.0.0 packaging==24.0 pathspec==0.11.2 platformdirs==4.0.0 pluggy==1.2.0 ptvsd==4.3.2 pylint==2.4.4 pyproject-api==1.5.3 pytest==7.4.4 PyYAML==6.0.1 six==1.17.0 tomli==2.0.1 tox==4.8.0 typed-ast==1.4.3 typing_extensions==4.7.1 virtualenv==20.26.6 wrapt==1.11.2 zipp==3.15.0
name: autorest.python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2022.12.7=py37h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=22.3.1=py37h06a4308_0 - python=3.7.16=h7a1cb2a_0 - readline=8.2=h5eee18b_0 - setuptools=65.6.3=py37h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.38.4=py37h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - astroid==2.3.3 - black==23.3.0 - cachetools==5.5.2 - chardet==5.2.0 - click==8.1.8 - colorama==0.4.6 - distlib==0.3.9 - docutils==0.20.1 - exceptiongroup==1.2.2 - filelock==3.12.2 - importlib-metadata==6.7.0 - iniconfig==2.0.0 - invoke==2.2.0 - isort==4.3.21 - jinja2==3.1.6 - json-rpc==1.15.0 - lazy-object-proxy==1.4.3 - m2r==0.3.1 - markupsafe==2.1.5 - mccabe==0.6.1 - mistune==0.8.4 - mypy==1.4.1 - mypy-extensions==1.0.0 - packaging==24.0 - pathspec==0.11.2 - platformdirs==4.0.0 - pluggy==1.2.0 - ptvsd==4.3.2 - pylint==2.4.4 - pyproject-api==1.5.3 - pytest==7.4.4 - pyyaml==6.0.1 - six==1.17.0 - tomli==2.0.1 - tox==4.8.0 - typed-ast==1.4.3 - typing-extensions==4.7.1 - virtualenv==20.26.6 - wrapt==1.11.2 - zipp==3.15.0 prefix: /opt/conda/envs/autorest.python
[ "test/unittests/test_parameter_ordering.py::test_sort_required_parameters" ]
[]
[ "test/unittests/test_parameter_ordering.py::test_sort_required_and_non_required_parameters" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_autorest.python-475
Azure__autorest.python-545
3322ab3a1c793c8fdaf2dc7d391c3c1e2eca2852
2020-04-03 15:44:35
b25e4602ecfa5e7f5d13fc4043848b1720b995de
diff --git a/ChangeLog.md b/ChangeLog.md index cb8b2555c..0c66ad340 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,11 @@ # Change Log +### Current + +**Bug Fixes** + +- Fixes parameter ordering so parameters with default values are all ordered at the end #545 + ### 2020-04-01 - 5.0.0-dev.20200401.1 Modelerfour version: 4.12.276 diff --git a/autorest/codegen/models/parameter.py b/autorest/codegen/models/parameter.py index 3a841780e..08011c56b 100644 --- a/autorest/codegen/models/parameter.py +++ b/autorest/codegen/models/parameter.py @@ -75,7 +75,7 @@ class Parameter(BaseModel): # pylint: disable=too-many-instance-attributes self.flattened = flattened self.grouped_by = grouped_by self.original_parameter = original_parameter - self.client_default_value = client_default_value + self._client_default_value = client_default_value self.is_kwarg: bool = False self.has_multiple_media_types: bool = False self.multiple_media_types_type_annot: Optional[str] = None @@ -122,8 +122,8 @@ class Parameter(BaseModel): # pylint: disable=too-many-instance-attributes if not self.required: type_annot = f"Optional[{type_annot}]" - if self.client_default_value is not None: - return self.client_default_value, self.schema.get_declaration(self.client_default_value), type_annot + if self._client_default_value is not None: + return self._client_default_value, self.schema.get_declaration(self._client_default_value), type_annot if self.multiple_media_types_type_annot: # means this parameter has multiple media types. We force default value to be None. @@ -144,6 +144,12 @@ class Parameter(BaseModel): # pylint: disable=too-many-instance-attributes return default_value, default_value_declaration, type_annot + @property + def default_value(self) -> Optional[Any]: + # exposing default_value because client_default_value doesn't get updated with + # default values we bubble up from the schema + return self._default_value()[0] + @property def docstring_type(self) -> str: return self.multiple_media_types_docstring_type or self.schema.docstring_type diff --git a/autorest/codegen/models/parameter_list.py b/autorest/codegen/models/parameter_list.py index afa9c7de8..d88db7334 100644 --- a/autorest/codegen/models/parameter_list.py +++ b/autorest/codegen/models/parameter_list.py @@ -108,7 +108,7 @@ class ParameterList(MutableSequence): ) for parameter in parameters_of_this_implementation: if parameter.in_method_signature: - if not parameter.client_default_value and parameter.required: + if not parameter.default_value and parameter.required: signature_parameters_no_default_value.append(parameter) else: signature_parameters_default_value.append(parameter)
default value followed by non default value in operation signature if you change cost management service swagger like this <img width="770" alt="Screen Shot 2020-04-03 at 10 40 18 AM" src="https://user-images.githubusercontent.com/43154838/78372652-8760c900-7597-11ea-957f-8abf14e4582c.png"> code gen generates: <img width="985" alt="Screen Shot 2020-04-03 at 10 40 52 AM" src="https://user-images.githubusercontent.com/43154838/78372709-9ba4c600-7597-11ea-9639-6828f881c775.png">
Azure/autorest.python
diff --git a/test/unittests/test_parameter_ordering.py b/test/unittests/test_parameter_ordering.py index ce4e06df7..06a8739d3 100644 --- a/test/unittests/test_parameter_ordering.py +++ b/test/unittests/test_parameter_ordering.py @@ -1,13 +1,15 @@ import pytest from autorest.codegen.models import Parameter, AnySchema +from autorest.codegen.models.primitive_schemas import StringSchema from autorest.codegen.models.parameter_list import ParameterList from autorest.codegen.models.parameter import ParameterLocation -def get_parameter(name, required, default_value=None): - schema = AnySchema( - namespace="parameterordering", - yaml_data={} - ) +def get_parameter(name, required, default_value=None, schema=None): + if not schema: + schema = AnySchema( + namespace="parameterordering", + yaml_data={} + ) return Parameter( schema=schema, yaml_data={}, @@ -22,6 +24,25 @@ def get_parameter(name, required, default_value=None): client_default_value=default_value ) +def test_sort_parameters_with_default_value_from_schema(): + schema = StringSchema( + namespace="parameterordering", + yaml_data={"defaultValue": "this_is_the_default", "type": str} + ) + parameter_with_default_schema_value_required = get_parameter( + name="required_param_with_schema_default", + required=True, + schema=schema + ) + required_parameter = get_parameter( + name="required_parameter", + required=True + ) + + parameter_list = [parameter_with_default_schema_value_required, required_parameter] + + assert [required_parameter, parameter_with_default_schema_value_required] == ParameterList(parameter_list).method + def test_sort_required_parameters(): required_default_value_parameter = get_parameter( name="required_default_value_parameter",
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_media", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 3, "test_score": 0 }, "num_modified_files": 3 }
5.0
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": null, "pre_install": null, "python": "3.7", "reqs_path": [ "dev_requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
astroid==2.3.3 -e git+https://github.com/Azure/autorest.python.git@3322ab3a1c793c8fdaf2dc7d391c3c1e2eca2852#egg=autorest black==23.3.0 cachetools==5.5.2 certifi @ file:///croot/certifi_1671487769961/work/certifi chardet==5.2.0 click==8.1.8 colorama==0.4.6 distlib==0.3.9 docutils==0.20.1 exceptiongroup==1.2.2 filelock==3.12.2 importlib-metadata==6.7.0 iniconfig==2.0.0 invoke==2.2.0 isort==4.3.21 Jinja2==3.1.6 json-rpc==1.15.0 lazy-object-proxy==1.4.3 m2r==0.3.1 MarkupSafe==2.1.5 mccabe==0.6.1 mistune==0.8.4 mypy==1.4.1 mypy-extensions==1.0.0 packaging==24.0 pathspec==0.11.2 platformdirs==4.0.0 pluggy==1.2.0 ptvsd==4.3.2 pylint==2.4.4 pyproject-api==1.5.3 pytest==7.4.4 PyYAML==6.0.1 six==1.17.0 tomli==2.0.1 tox==4.8.0 typed-ast==1.4.3 typing_extensions==4.7.1 virtualenv==20.26.6 wrapt==1.11.2 zipp==3.15.0
name: autorest.python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2022.12.7=py37h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=22.3.1=py37h06a4308_0 - python=3.7.16=h7a1cb2a_0 - readline=8.2=h5eee18b_0 - setuptools=65.6.3=py37h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.38.4=py37h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - astroid==2.3.3 - black==23.3.0 - cachetools==5.5.2 - chardet==5.2.0 - click==8.1.8 - colorama==0.4.6 - distlib==0.3.9 - docutils==0.20.1 - exceptiongroup==1.2.2 - filelock==3.12.2 - importlib-metadata==6.7.0 - iniconfig==2.0.0 - invoke==2.2.0 - isort==4.3.21 - jinja2==3.1.6 - json-rpc==1.15.0 - lazy-object-proxy==1.4.3 - m2r==0.3.1 - markupsafe==2.1.5 - mccabe==0.6.1 - mistune==0.8.4 - mypy==1.4.1 - mypy-extensions==1.0.0 - packaging==24.0 - pathspec==0.11.2 - platformdirs==4.0.0 - pluggy==1.2.0 - ptvsd==4.3.2 - pylint==2.4.4 - pyproject-api==1.5.3 - pytest==7.4.4 - pyyaml==6.0.1 - six==1.17.0 - tomli==2.0.1 - tox==4.8.0 - typed-ast==1.4.3 - typing-extensions==4.7.1 - virtualenv==20.26.6 - wrapt==1.11.2 - zipp==3.15.0 prefix: /opt/conda/envs/autorest.python
[ "test/unittests/test_parameter_ordering.py::test_sort_parameters_with_default_value_from_schema" ]
[]
[ "test/unittests/test_parameter_ordering.py::test_sort_required_parameters", "test/unittests/test_parameter_ordering.py::test_sort_required_and_non_required_parameters" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_autorest.python-545
Azure__azure-cli-1160
98572bac3cdff9eb2d106140cdf352a6d2979162
2016-10-25 17:25:42
1576ec67f5029db062579da230902a559acbb9fe
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_actions.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_actions.py index 78fb78969..0f91655a8 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_actions.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_actions.py @@ -268,8 +268,8 @@ def _handle_container_ssh_file(**kwargs): private_key_filepath = public_key_filepath[:-4] else: private_key_filepath = public_key_filepath + '.private' - logger.warning('Creating SSH key files: %s,%s', private_key_filepath, public_key_filepath) content = _generate_ssh_keys(private_key_filepath, public_key_filepath) + logger.warning('Created SSH key files: %s,%s', private_key_filepath, public_key_filepath) args.ssh_key_value = content def _generate_ssh_keys(private_key_filepath, public_key_filepath): diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_params.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_params.py index b189d5967..5f2c070f5 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_params.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_params.py @@ -71,8 +71,10 @@ register_cli_argument('vm access', 'password', options_list=('--password', '-p') register_cli_argument('acs', 'name', arg_type=name_arg_type) register_cli_argument('acs', 'orchestrator_type', **enum_choice_list(ContainerServiceOchestratorTypes)) -register_cli_argument('acs', 'admin_username', admin_username_type) +#some admin names are prohibited in acs, such as root, admin, etc. Because we have no control on the orchestrators, so default to a safe name. +register_cli_argument('acs', 'admin_username', options_list=('--admin-username',), default='azureuser', required=False) register_cli_argument('acs', 'ssh_key_value', required=False, help='SSH key file value or key file path.', default=os.path.join(os.path.expanduser('~'), '.ssh', 'id_rsa.pub'), completer=FilesCompleter()) +register_cli_argument('acs', 'dns_name_prefix', options_list=('--dns-prefix', '-d')) register_extra_cli_argument('acs create', 'generate_ssh_keys', action='store_true', help='Generate SSH public and private key files if missing') register_cli_argument('acs', 'container_service_name', options_list=('--name', '-n'), help='The name of the container service', completer=get_resource_name_completion_list('Microsoft.ContainerService/ContainerServices')) register_cli_argument('acs create', 'agent_vm_size', completer=get_vm_size_completion_list)
ACS create fails with no username --admin-username defaults to 'root' which is not allowed: $ az acs create --resource-group rgacsazcli --orchestrator-type DCOS --name rgacsazcli --dns-name-prefix rgacsazcli Error loading command module 'iot' At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details. { "error": { "code": "InvalidParameter", "target": "windowsProfile.adminUsername", "message": "Linux admin user name cannot be 'root' or be longer than 64 characters." } }
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py index 4576239d4..7877af690 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py @@ -1254,7 +1254,7 @@ class AzureContainerServiceScenarioTest(ResourceGroupVCRTestBase): #pylint: disa dns_prefix = 'myacs123' #create - self.cmd('acs create -g {} -n {} --dns-name-prefix {}'.format(self.resource_group, acs_name, dns_prefix), checks=[ + self.cmd('acs create -g {} -n {} --dns-prefix {}'.format(self.resource_group, acs_name, dns_prefix), checks=[ JMESPathCheck('masterFQDN', '{}mgmt.{}.cloudapp.azure.com'.format(dns_prefix, self.location)), JMESPathCheck('agentFQDN', '{}agents.{}.cloudapp.azure.com'.format(dns_prefix, self.location)) ])
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 1, "test_score": 3 }, "num_modified_files": 2 }
0.1
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.1 applicationinsights==0.10.0 argcomplete==1.3.0 astroid==1.4.9 attrs==22.2.0 -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_context&subdirectory=src/command_modules/azure-cli-context -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_vsts&subdirectory=src/command_modules/azure-cli-vsts -e git+https://github.com/Azure/azure-cli.git@98572bac3cdff9eb2d106140cdf352a6d2979162#egg=azure_cli_webapp&subdirectory=src/command_modules/azure-cli-webapp azure-common==1.1.4 azure-graphrbac==0.30.0rc6 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-compute==0.30.0rc6 azure-mgmt-dns==0.30.0rc6 azure-mgmt-iothub==0.1.0 azure-mgmt-keyvault==0.30.0 azure-mgmt-network==0.30.0rc6 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.0rc6 azure-mgmt-storage==0.30.0rc6 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.30.0 azure-nspkg==3.0.2 azure-storage==0.33.0 bcrypt==4.0.1 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 colorama==0.3.7 cryptography==40.0.2 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.6.1 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycparser==2.21 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 PyNaCl==1.5.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.16 vcrpy==1.7.4 wrapt==1.16.0 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.1 - applicationinsights==0.10.0 - argcomplete==1.3.0 - astroid==1.4.9 - attrs==22.2.0 - azure-common==1.1.4 - azure-graphrbac==0.30.0rc6 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-compute==0.30.0rc6 - azure-mgmt-dns==0.30.0rc6 - azure-mgmt-iothub==0.1.0 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-network==0.30.0rc6 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.0rc6 - azure-mgmt-storage==0.30.0rc6 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.30.0 - azure-nspkg==3.0.2 - azure-storage==0.33.0 - bcrypt==4.0.1 - cffi==1.15.1 - charset-normalizer==2.0.12 - colorama==0.3.7 - cryptography==40.0.2 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.6.1 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycparser==2.21 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pynacl==1.5.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - secretstorage==3.3.3 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.7.4 - wrapt==1.16.0 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::AzureContainerServiceScenarioTest::test_acs_create_update" ]
[ "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMImageListByAliasesScenarioTest::test_vm_image_list_by_alias", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMOpenPortTest::test_vm_open_port", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMGeneralizeScenarioTest::test_vm_generalize", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMScaleSetStatesScenarioTest::test_vm_scaleset_states", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMScaleSetCreateSimple::test_vm_scaleset_create_simple", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMScaleSetCreateOptions::test_vm_scaleset_create_options", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMSSCreateNoneOptionsTest::test_vmss_create_none_options", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMScaleSetCreateExistingOptions::test_vm_scaleset_create_existing_options", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMCreateUbuntuScenarioTest::test_vm_create_ubuntu", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMCreateMultiNicTest::test_vm_create_multinic", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMCreateNoneOptionsTest::test_vm_create_none_options", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMCreateExistingOptions::test_vm_create_existing_options", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMCreateCustomIP::test_vm_create_custom_ip", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMDataDiskVCRTest::test_vm_data_disk" ]
[ "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMUsageScenarioTest::test_vm_usage", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMImageListThruServiceScenarioTest::test_vm_images_list_thru_services", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMCombinedListTest::test_vm_combined_list", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMResizeTest::test_vm_resize", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMShowListSizesListIPAddressesScenarioTest::test_vm_show_list_sizes_list_ip_addresses", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMSizeListScenarioTest::test_vm_size_list", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMImageListOffersScenarioTest::test_vm_image_list_offers", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMImageListPublishersScenarioTest::test_vm_image_list_publishers", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMImageListSkusScenarioTest::test_vm_image_list_skus", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMImageShowScenarioTest::test_vm_image_show", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMCreateAndStateModificationsScenarioTest::test_vm_create_state_modifications", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMAvailSetScenarioTest::test_vm_availset", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMExtensionAutoUpgradeTest::test_vm_extension_autoupgrade", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMExtensionsScenarioTest::test_vm_extension", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMMachineExtensionImageScenarioTest::test_vm_machine_extension_image", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMExtensionImageSearchScenarioTest::test_vm_extension_image_search", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMScaleSetGetsScenarioTest::test_vm_scaleset_gets", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMScaleSetScaleUpScenarioTest::test_vm_scaleset_scaleup", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMScaleSetDeleteScenarioTest::test_vm_scaleset_delete", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMScaleSetVMsScenarioTest::test_vm_scaleset_vms", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMAccessAddRemoveLinuxUser::test_vm_add_remove_linux_user", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMBootDiagnostics::test_vm_enable_disable_boot_diagnostic", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMExtensionInstallTest::test_vm_extension_install", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMSSExtensionInstallTest::test_vmss_extension_install", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::DiagnosticsExtensionInstallTest::test_diagnostics_extension_install" ]
[]
MIT License
null
Azure__azure-cli-1197
81372d0c3f60828a26c18c61169bb6e8eb47f995
2016-11-01 00:35:23
1576ec67f5029db062579da230902a559acbb9fe
tjprescott: Also, one thing I've tried to do is when I "touch" a module I do a quick look through help to make sure there is acceptable help text for all commands and groups since we have a lot of gaps and help reflected from sloppy SDK docstrings. In this case it looks like it's just `az account list-locations` missing a short-summary, but it would be nice to add (save us another issue down the road).
diff --git a/src/azure-cli-core/azure/cli/core/_profile.py b/src/azure-cli-core/azure/cli/core/_profile.py index 01de246c9..c45f90b50 100644 --- a/src/azure-cli-core/azure/cli/core/_profile.py +++ b/src/azure-cli-core/azure/cli/core/_profile.py @@ -167,17 +167,16 @@ class Profile(object): self._cache_subscriptions_to_local_storage(subscriptions) - def set_active_subscription(self, subscription_id_or_name): + def set_active_subscription(self, subscription): #take id or name subscriptions = self.load_cached_subscriptions() - subscription_id_or_name = subscription_id_or_name.lower() + subscription = subscription.lower() result = [x for x in subscriptions - if subscription_id_or_name == x[_SUBSCRIPTION_ID].lower() or - subscription_id_or_name == x[_SUBSCRIPTION_NAME].lower()] + if subscription in [x[_SUBSCRIPTION_ID].lower(), x[_SUBSCRIPTION_NAME].lower()]] if len(result) != 1: raise CLIError('The subscription of "{}" does not exist or has more than' - ' one match.'.format(subscription_id_or_name)) + ' one match.'.format(subscription)) for s in subscriptions: s[_IS_DEFAULT_SUBSCRIPTION] = False @@ -218,14 +217,14 @@ class Profile(object): return active_account[_USER_ENTITY][_USER_NAME] - def get_subscription(self, subscription_id=None): + def get_subscription(self, subscription=None):#take id or name subscriptions = self.load_cached_subscriptions() if not subscriptions: raise CLIError("Please run 'az login' to setup account.") result = [x for x in subscriptions if ( - subscription_id is None and x.get(_IS_DEFAULT_SUBSCRIPTION)) or - (subscription_id == x.get(_SUBSCRIPTION_ID))] + not subscription and x.get(_IS_DEFAULT_SUBSCRIPTION) or + subscription and subscription.lower() in [x[_SUBSCRIPTION_ID].lower(), x[_SUBSCRIPTION_NAME].lower()])] #pylint: disable=line-too-long if len(result) != 1: raise CLIError("Please run 'az account set' to select active account.") return result[0] diff --git a/src/azure-cli-core/azure/cli/core/application.py b/src/azure-cli-core/azure/cli/core/application.py index 9315940ac..6039ba7c6 100644 --- a/src/azure-cli-core/azure/cli/core/application.py +++ b/src/azure-cli-core/azure/cli/core/application.py @@ -168,7 +168,6 @@ class Application(object): @staticmethod def _register_builtin_arguments(**kwargs): global_group = kwargs['global_group'] - global_group.add_argument('--subscription', dest='_subscription_id', help=argparse.SUPPRESS) global_group.add_argument('--output', '-o', dest='_output_format', choices=['json', 'tsv', 'list', 'table', 'jsonc'], default=az_config.get('core', 'output', fallback='json'), diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_params.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_params.py index 9969227cf..99392b7ea 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_params.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_params.py @@ -4,12 +4,19 @@ #--------------------------------------------------------------------------------------------- from azure.cli.core.commands import CliArgumentType, register_cli_argument -from azure.cli.core.commands.parameters import ( - name_type, - resource_group_name_type) # pylint: disable=line-too-long +target_name = CliArgumentType( + options_list=('--target-name', '-n'), + help='Name of the Azure Container Service cluster to deploy containers to.' +) + +target_resource_group = CliArgumentType( + options_list=('--target-resource-group', '-g'), + help='Name of the Azure Container Service cluster\'s resource group.' +) + registry_name = CliArgumentType( options_list=('--registry-name', '-r'), help='Azure container registry name. A new Azure container registry is created if omitted or does not exist.' @@ -45,8 +52,8 @@ vsts_project_name = CliArgumentType( help='VSTS project name to create the build and release definitions. A new VSTS project is created if omitted or does not exist.' ) -register_cli_argument('container release create', 'name', name_type) -register_cli_argument('container release create', 'resource_group_name', resource_group_name_type) +register_cli_argument('container release create', 'target_name', target_name) +register_cli_argument('container release create', 'target_resource_group', target_resource_group) register_cli_argument('container release create', 'registry_name', registry_name) register_cli_argument('container release create', 'registry_resource_id', registry_resource_id) register_cli_argument('container release create', 'remote_url', remote_url) @@ -55,8 +62,8 @@ register_cli_argument('container release create', 'remote_access_token', remote_ register_cli_argument('container release create', 'vsts_account_name', vsts_account_name) register_cli_argument('container release create', 'vsts_project_name', vsts_project_name) -register_cli_argument('container build create', 'name', name_type) -register_cli_argument('container build create', 'resource_group_name', resource_group_name_type) +register_cli_argument('container build create', 'target_name', target_name) +register_cli_argument('container build create', 'target_resource_group', target_resource_group) register_cli_argument('container build create', 'registry_name', registry_name) register_cli_argument('container build create', 'registry_resource_id', registry_resource_id) register_cli_argument('container build create', 'remote_url', remote_url) @@ -65,5 +72,5 @@ register_cli_argument('container build create', 'remote_access_token', remote_ac register_cli_argument('container build create', 'vsts_account_name', vsts_account_name) register_cli_argument('container build create', 'vsts_project_name', vsts_project_name) -register_cli_argument('container release list', 'name', name_type) -register_cli_argument('container release list', 'resource_group_name', resource_group_name_type) +register_cli_argument('container release list', 'target_name', target_name) +register_cli_argument('container release list', 'target_resource_group', target_resource_group) diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py index d2e04d50a..aafbefde9 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py @@ -17,15 +17,13 @@ from azure.cli.core._profile import Profile from azure.cli.core._util import CLIError logger = _logging.get_az_logger(__name__) -BASE_URL = "https://management.azure.com" -RESOURCE_BASE_URL = "/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}" -CONTAINER_SERVICE_BASE_URL = RESOURCE_BASE_URL + "/providers/Microsoft.ContainerService" -CONTAINER_SERVICE_RESOURCE_URL = (CONTAINER_SERVICE_BASE_URL + - "/containerServices/{container_service_name}") -VISUAL_STUDIO_BASE_URL = RESOURCE_BASE_URL + "/providers/microsoft.visualstudio" -VISUAL_STUDIO_ACCOUNT_URL = VISUAL_STUDIO_BASE_URL + "/account/{vsts_account_name}" -VISUAL_STUDIO_PROJECT_URL = VISUAL_STUDIO_ACCOUNT_URL + "/project/{vsts_project_name}" -RP_URL = BASE_URL + CONTAINER_SERVICE_RESOURCE_URL + "/providers/Microsoft.Mindaro" +BASE_URL = "https://westus.mindaro.microsoft.io" +SUBSCRIPTION_URL = "/subscriptions/{subscription_id}" +RESOURCE_BASE_URL = SUBSCRIPTION_URL + "/resourceGroups/{resource_group_name}" +CONTAINER_SERVICE_PROVIDER = "/providers/Microsoft.ContainerService" +CONTAINER_SERVICE_RESOURCE_URL = (RESOURCE_BASE_URL + CONTAINER_SERVICE_PROVIDER + "/containerServices/{container_service_name}") + +SERVICE_URL = BASE_URL + SUBSCRIPTION_URL API_VERSION = "2016-11-01-preview" DOCKERFILE_FILE = 'Dockerfile' @@ -33,9 +31,14 @@ DOCKER_COMPOSE_FILE = 'docker-compose.yml' DOCKER_COMPOSE_TEST_FILE = 'docker-compose.test.yml' DOCKER_COMPOSE_EXPECTED_VERSION = '2' +DOCKERFILE_FILE = 'Dockerfile' +DOCKER_COMPOSE_FILE = 'docker-compose.yml' +DOCKER_COMPOSE_TEST_FILE = 'docker-compose.test.yml' +DOCKER_COMPOSE_EXPECTED_VERSION = '2' + def add_release( - name, - resource_group_name, + target_name, + target_resource_group, remote_url=None, remote_branch=None, remote_access_token=None, @@ -46,10 +49,10 @@ def add_release( """ Creates a build definition that automates building and pushing Docker images to an Azure container registry, and creates a release definition that automates deploying container images from a container registry to an Azure container service. Source repository must define a docker-compose.yml file. - :param name: Name of the target Azure container service instance to deploy containers to. - :type name: String - :param resource_group_name: Name of Azure container service's resource group. - :type resource_group_name: String + :param target_name: Name of the target Azure container service instance to deploy containers to. + :type target_name: String + :param target_resource_group: Name of Azure container service's resource group. + :type target_resource_group: String :param remote_url: Remote url of the GitHub or VSTS source repository that will be built and deployed. If omitted, a source repository will be searched for in the current working directory. :type remote_url: String :param remote_branch: Remote branch of the GitHub or VSTS source repository that will be built and deployed. If omitted refs/heads/master will be selected. @@ -73,8 +76,8 @@ def add_release( # Call the RP return _call_rp_configure_cicd( - name, - resource_group_name, + target_name, + target_resource_group, vsts_account_name, vsts_project_name, registry_name, @@ -112,8 +115,8 @@ def _get_repo_type(remote_url): return None def _call_rp_configure_cicd( - name, - resource_group_name, + target_name, + target_resource_group, vsts_account_name, vsts_project_name, registry_name, @@ -125,10 +128,10 @@ def _call_rp_configure_cicd( """ Calls the RP to build and deploy the service(s) in the cluster. - :param name: Name of the target Azure container service instance to deploy containers to. - :type name: String - :param resource_group_name: Name of Azure container service's resource group. - :type resource_group_name: String + :param target_name: Name of the target Azure container service instance to deploy containers to. + :type target_name: String + :param target_resource_group: Name of Azure container service's resource group. + :type target_resource_group: String :param remote_url: Remote url of the GitHub or VSTS source repository that will be built and deployed. If omitted, a source repository will be searched for in the current working directory. :type remote_url: String :param remote_branch: Remote branch of the GitHub or VSTS source repository that will be built and deployed. If omitted refs/heads/master will be selected. @@ -150,11 +153,11 @@ def _call_rp_configure_cicd( cred, subscription_id, _ = profile.get_login_credentials() o_auth_token = cred.signed_session().headers['Authorization'] - + container_service_resource_id = CONTAINER_SERVICE_RESOURCE_URL.format(subscription_id=subscription_id, resource_group_name=target_resource_group, container_service_name=target_name) data = { + 'acsResourceId': container_service_resource_id, 'vstsAccountName': vsts_account_name, 'vstsProjectName': vsts_project_name, - 'token': o_auth_token, 'registryName': registry_name, 'registryResourceId': registry_resource_id, 'remoteToken': remote_access_token, @@ -163,10 +166,8 @@ def _call_rp_configure_cicd( 'createRelease' : create_release } - configure_ci_cd_url = RP_URL.format( - subscription_id=subscription_id, - resource_group_name=resource_group_name, - container_service_name=name) + '/configureCI?api-version=' + API_VERSION + configure_ci_cd_url = SERVICE_URL.format( + subscription_id=subscription_id) + '/configureCI?api-version=' + API_VERSION headers = {'Content-type': 'application/json', 'Authorization': o_auth_token} req = requests.post(configure_ci_cd_url, data=json.dumps(data), headers=headers, timeout=600) @@ -179,27 +180,26 @@ def _call_rp_configure_cicd( json_request = req.json() return json_request -def list_releases(name, resource_group_name): +def list_releases(target_name, target_resource_group): """ Lists all the release definitions that are deployed to a given Azure container service. - :param name: Name of the target Azure container service instance. - :type name: String - :param resource_group_name: Name of Azure container service's resource group. - :type resource_group_name: String + :param target_name: Name of the target Azure container service instance. + :type target_name: String + :param target_resource_group: Name of Azure container service's resource group. + :type target_resource_group: String """ profile = Profile() cred, subscription_id, _ = profile.get_login_credentials() o_auth_token = cred.signed_session().headers['Authorization'] + container_service_resource_id = CONTAINER_SERVICE_RESOURCE_URL.format(subscription_id=subscription_id, resource_group_name=target_resource_group, container_service_name=target_name) data = { - 'token': o_auth_token + 'acsResourceId': container_service_resource_id } - list_releases_url = RP_URL.format( - subscription_id=subscription_id, - resource_group_name=resource_group_name, - container_service_name=name) + '/configureCI/1/listReleases?api-version=' + API_VERSION + list_releases_url = SERVICE_URL.format( + subscription_id=subscription_id) + '/listReleases?api-version=' + API_VERSION headers = {'Content-type': 'application/json', 'Authorization': o_auth_token} req = requests.post(list_releases_url, data=json.dumps(data), headers=headers, timeout=600) @@ -308,8 +308,8 @@ def _check_registry_information(registry_name, registry_resource_id): raise CLIError("Please provide only one of registry-name and registry-resource-id, not both.") def add_ci( - name, - resource_group_name, + target_name, + target_resource_group, remote_url=None, remote_branch=None, remote_access_token=None, @@ -345,8 +345,8 @@ def add_ci( # Call the RP return _call_rp_configure_cicd( - name, - resource_group_name, + target_name, + target_resource_group, vsts_account_name, vsts_project_name, registry_name, diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_help.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_help.py index 3752e4c92..c5eca10cb 100644 --- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_help.py +++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_help.py @@ -22,4 +22,16 @@ helps['login'] = """ helps['account'] = """ type: group short-summary: Manages stored and default subscriptions -""" \ No newline at end of file +""" + +helps['account list-locations'] = """ + type: command + short-summary: list supported regions of the current subscription +""" + +helps['account show'] = """ + type: command + short-summary: show detail of the current subscription +""" + + diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py index b6ab41532..f6d727a03 100644 --- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py +++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py @@ -23,5 +23,5 @@ register_cli_argument('login', 'tenant', options_list=('--tenant', '-t'), help=' register_cli_argument('logout', 'username', help='account user, if missing, logout the current active account') -register_cli_argument('account', 'subscription_name_or_id', options_list=('--name', '-n'), help='Name or ID of subscription.', completer=get_subscription_id_list) -register_cli_argument('account list', 'list_all', options_list=('--all',), help='List all subscriptions', action='store_true') +register_cli_argument('account', 'subscription', help='Name or ID of subscription.', completer=get_subscription_id_list) +register_cli_argument('account list', 'list_all', options_list=('--all',), help='List all subscriptions across all cloud environments', action='store_true') diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/commands.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/commands.py index 402b3f313..b10919682 100644 --- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/commands.py +++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/commands.py @@ -11,6 +11,7 @@ from .custom import (login, logout, list_locations, list_subscriptions, + show_subscription, set_active_subscription, account_clear) @@ -18,7 +19,9 @@ cli_command('login', login) cli_command('logout', logout) cli_command('account list', list_subscriptions) +cli_command('account show', show_subscription) cli_command('account set', set_active_subscription) cli_command('account clear', account_clear) cli_command('account list-locations', list_locations) + diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py index 7a6912731..338049b18 100644 --- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py +++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py @@ -27,12 +27,16 @@ def list_subscriptions(list_all=False): # pylint: disable=redefined-builtin sub['cloudName'] = sub.pop('environmentName', None) return [sub for sub in subscriptions if list_all or sub['cloudName'] == CLOUD.name] -def set_active_subscription(subscription_name_or_id): +def show_subscription(subscription=None): + profile = Profile() + return profile.get_subscription(subscription) + +def set_active_subscription(subscription): '''Set the current subscription''' if not id: raise CLIError('Please provide subscription id or unique name.') profile = Profile() - profile.set_active_subscription(subscription_name_or_id) + profile.set_active_subscription(subscription) def account_clear(): '''Clear all stored subscriptions. To clear individual, use \'logout\''''
How do I view the current account? `az account show` is not valid... `azure account show` let's me see my active subscription... what's the equivalent in `azure-cli`? IMO, `az account show` should just work
Azure/azure-cli
diff --git a/src/azure-cli-core/azure/cli/core/tests/test_profile.py b/src/azure-cli-core/azure/cli/core/tests/test_profile.py index 64a05fd98..8d5fa3b31 100644 --- a/src/azure-cli-core/azure/cli/core/tests/test_profile.py +++ b/src/azure-cli-core/azure/cli/core/tests/test_profile.py @@ -10,6 +10,7 @@ import mock from azure.mgmt.resource.subscriptions.models import (SubscriptionState, Subscription, SubscriptionPolicies, spendingLimit) from azure.cli.core._profile import Profile, CredsCache, SubscriptionFinder, CLOUD +from azure.cli.core._util import CLIError class Test_Profile(unittest.TestCase): @@ -164,6 +165,24 @@ class Test_Profile(unittest.TestCase): self.assertFalse(subscription2['isDefault']) self.assertTrue(subscription1['isDefault']) + def test_get_subscription(self): + storage_mock = {'subscriptions': None} + profile = Profile(storage_mock) + + consolidated = Profile._normalize_properties(self.user1, + [self.subscription1], + False) + profile._set_subscriptions(consolidated) + + self.assertEqual(self.display_name1, profile.get_subscription()['name']) + self.assertEqual(self.display_name1, + profile.get_subscription(subscription=self.display_name1)['name']) + + sub_id = self.id1.split('/')[-1] + self.assertEqual(sub_id, profile.get_subscription()['id']) + self.assertEqual(sub_id, profile.get_subscription(subscription=sub_id)['id']) + self.assertRaises(CLIError, profile.get_subscription, "random_id") + @mock.patch('azure.cli.core._profile._load_tokens_from_file', autospec=True) def test_get_current_account_user(self, mock_read_cred_file): #setup
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 1, "test_score": 2 }, "num_modified_files": 8 }
0.1
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.2 applicationinsights==0.10.0 argcomplete==1.3.0 astroid==1.4.9 attrs==22.2.0 -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_context&subdirectory=src/command_modules/azure-cli-context -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm -e git+https://github.com/Azure/azure-cli.git@81372d0c3f60828a26c18c61169bb6e8eb47f995#egg=azure_cli_webapp&subdirectory=src/command_modules/azure-cli-webapp azure-common==1.1.4 azure-graphrbac==0.30.0rc6 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-compute==0.30.0rc6 azure-mgmt-dns==0.30.0rc6 azure-mgmt-iothub==0.1.0 azure-mgmt-keyvault==0.30.0 azure-mgmt-network==0.30.0rc6 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.0rc6 azure-mgmt-storage==0.30.0rc6 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.30.1 azure-nspkg==3.0.2 azure-storage==0.33.0 bcrypt==4.0.1 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 colorama==0.3.7 cryptography==40.0.2 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.6.1 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycparser==2.21 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 PyNaCl==1.5.0 pyOpenSSL==16.1.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.16 vcrpy==1.7.4 wrapt==1.16.0 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.2 - applicationinsights==0.10.0 - argcomplete==1.3.0 - astroid==1.4.9 - attrs==22.2.0 - azure-common==1.1.4 - azure-graphrbac==0.30.0rc6 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-compute==0.30.0rc6 - azure-mgmt-dns==0.30.0rc6 - azure-mgmt-iothub==0.1.0 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-network==0.30.0rc6 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.0rc6 - azure-mgmt-storage==0.30.0rc6 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.30.1 - azure-nspkg==3.0.2 - azure-storage==0.33.0 - bcrypt==4.0.1 - cffi==1.15.1 - charset-normalizer==2.0.12 - colorama==0.3.7 - cryptography==40.0.2 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.6.1 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycparser==2.21 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pynacl==1.5.0 - pyopenssl==16.1.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - secretstorage==3.3.3 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.7.4 - wrapt==1.16.0 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_subscription" ]
[]
[ "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_create_token_cache", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_add_new_sp_creds", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_new_token_added_by_adal", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_remove_creds", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_id", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_through_interactive_flow", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_current_account_user", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_login_credentials", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_login_credentials_for_graph_client", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_load_cached_tokens", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_logout", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_logout_all", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_normalize", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_set_active_subscription", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_update_add_two_different_subscriptions", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_update_with_same_subscription_added_twice" ]
[]
MIT License
null
Azure__azure-cli-1378
119d95b3fb6b68782d11fb8e7934b568cdc1a24a
2016-11-18 18:55:43
1576ec67f5029db062579da230902a559acbb9fe
mention-bot: @tjprescott, thanks for your PR! By analyzing the history of the files in this pull request, we identified @BurtBiel, @derekbekoe and @yugangw-msft to be potential reviewers.
diff --git a/.mention-bot b/.mention-bot new file mode 100644 index 000000000..0557e188a --- /dev/null +++ b/.mention-bot @@ -0,0 +1,12 @@ +{ + "maxReviewers: 5, + "userBlacklist": ["BurtBiel"], + "assignToReviewer": true, + "fallbackNotifyForPaths": [ + { + "name": "JasonRShaver", + "files": ["doc/**", "**/_help.py"], + "skipTeamPrs": false + } + ] +} diff --git a/azure-cli.pyproj b/azure-cli.pyproj index 5ff00002e..642c94fb9 100644 --- a/azure-cli.pyproj +++ b/azure-cli.pyproj @@ -15,7 +15,8 @@ <InterpreterId>{54f4b6dc-0859-46dc-99bb-b275c9d0aca3}</InterpreterId> <InterpreterVersion>3.5</InterpreterVersion> <EnableNativeCodeDebugging>False</EnableNativeCodeDebugging> - <CommandLineArguments>network nic create -g nicrg -n nic1 --subnet subnet1 --vnet-name vnet1 --public-ip-address banoodle</CommandLineArguments> + <CommandLineArguments> + </CommandLineArguments> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)' == 'Debug'" /> <PropertyGroup Condition="'$(Configuration)' == 'Release'" /> diff --git a/scripts/lintall b/scripts/lintall index 5491c0236..3ce6ef7e7 100644 --- a/scripts/lintall +++ b/scripts/lintall @@ -1,6 +1,4 @@ #!/bin/bash export PYTHONPATH=$PATHONPATH:./src -pylint -d I0013 -r n src/azure-cli/azure -pylint -d I0013 -r n src/azure-cli-core/azure -python scripts/command_modules/pylint.py \ No newline at end of file +python scripts/run_pylint.py \ No newline at end of file diff --git a/scripts/lintall.bat b/scripts/lintall.bat index 36beb5459..3a2d944bb 100644 --- a/scripts/lintall.bat +++ b/scripts/lintall.bat @@ -1,4 +1,2 @@ @echo off -pylint -d I0013 -r n src/azure-cli/azure -pylint -d I0013 -r n src/azure-cli-core/azure -python scripts/command_modules/pylint.py \ No newline at end of file +python scripts/run_pylint.py \ No newline at end of file diff --git a/src/azure-cli-core/azure/cli/core/_output.py b/src/azure-cli-core/azure/cli/core/_output.py index 9dde28a31..bd79555ce 100644 --- a/src/azure-cli-core/azure/cli/core/_output.py +++ b/src/azure-cli-core/azure/cli/core/_output.py @@ -34,7 +34,8 @@ class ComplexEncoder(json.JSONEncoder): def format_json(obj): result = obj.result - input_dict = result.__dict__ if hasattr(result, '__dict__') else result + #OrderedDict.__dict__ is always '{}', to persist the data, convert to dict first. + input_dict = dict(result) if hasattr(result, '__dict__') else result return json.dumps(input_dict, indent=2, sort_keys=True, cls=ComplexEncoder, separators=(',', ': ')) + '\n' diff --git a/src/azure-cli-core/azure/cli/core/_profile.py b/src/azure-cli-core/azure/cli/core/_profile.py index b7796cd4b..ba85481ff 100644 --- a/src/azure-cli-core/azure/cli/core/_profile.py +++ b/src/azure-cli-core/azure/cli/core/_profile.py @@ -247,6 +247,39 @@ class Profile(object): str(account[_SUBSCRIPTION_ID]), str(account[_TENANT_ID])) + #per ask from java sdk + def get_expanded_subscription_info(self, subscription_id=None, name=None, password=None): + account = self.get_subscription(subscription_id) + + # is the credential created through command like 'create-for-rbac'? + if bool(name) and bool(password): + result = {} + result[_SUBSCRIPTION_ID] = subscription_id or account[_SUBSCRIPTION_ID] + result['client'] = name + result['password'] = password + result[_TENANT_ID] = account[_TENANT_ID] + result[_ENVIRONMENT_NAME] = CLOUD.name + result['subscriptionName'] = account[_SUBSCRIPTION_NAME] + else: #has logged in through cli + from copy import deepcopy + result = deepcopy(account) + user_type = account[_USER_ENTITY].get(_USER_TYPE) + if user_type == _SERVICE_PRINCIPAL: + result['client'] = account[_USER_ENTITY][_USER_NAME] + result['password'] = self._creds_cache.retrieve_secret_of_service_principal( + account[_USER_ENTITY][_USER_NAME]) + else: + result['userName'] = account[_USER_ENTITY][_USER_NAME] + + result.pop(_STATE) + result.pop(_USER_ENTITY) + result.pop(_IS_DEFAULT_SUBSCRIPTION) + result['subscriptionName'] = result.pop(_SUBSCRIPTION_NAME) + + result['subscriptionId'] = result.pop('id') + result['endpoints'] = CLOUD.endpoints + return result + def get_installation_id(self): installation_id = self._storage.get(_INSTALLATION_ID) if not installation_id: @@ -381,6 +414,13 @@ class CredsCache(object): cred[_ACCESS_TOKEN]) return (token_entry[_TOKEN_ENTRY_TOKEN_TYPE], token_entry[_ACCESS_TOKEN]) + def retrieve_secret_of_service_principal(self, sp_id): + matched = [x for x in self._service_principal_creds if sp_id == x[_SERVICE_PRINCIPAL_ID]] + if not matched: + raise CLIError("No matched service principal found") + cred = matched[0] + return cred[_ACCESS_TOKEN] + def _load_creds(self): if self.adal_token_cache is not None: return self.adal_token_cache diff --git a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_params.py b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_params.py index 927b87873..6a50031c7 100644 --- a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_params.py +++ b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_params.py @@ -43,7 +43,7 @@ register_cli_argument('appservice', 'location', arg_type=location_type) register_cli_argument('appservice list-locations', 'linux_workers_enabled', action='store_true', help='get regions which support hosting webapps on Linux workers') register_cli_argument('appservice plan', 'name', arg_type=name_arg_type, help='The name of the app service plan', completer=get_resource_name_completion_list('Microsoft.Web/serverFarms'), id_part='name') register_cli_argument('appservice plan create', 'name', options_list=('--name', '-n'), help="Name of the new app service plan") -register_cli_argument('appservice plan create', 'sku', arg_type=sku_arg_type, default='B1') +register_cli_argument('appservice plan create', 'sku', arg_type=sku_arg_type) register_cli_argument('appservice plan create', 'is_linux', action='store_true', required=False, help='host webapp on Linux worker') register_cli_argument('appservice plan update', 'sku', arg_type=sku_arg_type) register_cli_argument('appservice plan update', 'allow_pending_state', ignore_type) diff --git a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/custom.py b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/custom.py index bec8d29d0..26fc147d8 100644 --- a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/custom.py +++ b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/custom.py @@ -249,7 +249,7 @@ def list_app_service_plans(resource_group_name=None): else: return client.server_farms.get_server_farms(resource_group_name) -def create_app_service_plan(resource_group_name, name, sku, is_linux, number_of_workers=None, +def create_app_service_plan(resource_group_name, name, is_linux, sku='B1', number_of_workers=None, location=None): client = web_client_factory() sku = _normalize_sku(sku) diff --git a/src/command_modules/azure-cli-component/azure/cli/command_modules/component/_params.py b/src/command_modules/azure-cli-component/azure/cli/command_modules/component/_params.py index dbb2b369c..ea399981f 100644 --- a/src/command_modules/azure-cli-component/azure/cli/command_modules/component/_params.py +++ b/src/command_modules/azure-cli-component/azure/cli/command_modules/component/_params.py @@ -10,5 +10,4 @@ register_cli_argument('component', 'component_name', options_list=('--name', '-n register_cli_argument('component', 'link', options_list=('--link', '-l'), help='If a url or path to an html file, parse for links to archives. If local path or file:// url that\'s a directory, then look for archives in the directory listing.') register_cli_argument('component', 'private', help='Include packages from a private server.', action='store_true') register_cli_argument('component', 'pre', help='Include pre-release versions', action='store_true') -register_cli_argument('component', 'show_logs', help='Show logs from packaging installing/updating', action='store_true') register_cli_argument('component', 'additional_components', options_list=('--add',), nargs='+', help='The names of additional components to install (space separated)') diff --git a/src/command_modules/azure-cli-component/azure/cli/command_modules/component/custom.py b/src/command_modules/azure-cli-component/azure/cli/command_modules/component/custom.py index 1dbd60554..e6cca2b5d 100644 --- a/src/command_modules/azure-cli-component/azure/cli/command_modules/component/custom.py +++ b/src/command_modules/azure-cli-component/azure/cli/command_modules/component/custom.py @@ -21,7 +21,7 @@ def list_components(): for dist in pip.get_installed_distributions(local_only=True) if dist.key.startswith(COMPONENT_PREFIX)], key=lambda x: x['name']) -def remove(component_name, show_logs=False): +def remove(component_name): """ Remove a component """ import pip full_component_name = COMPONENT_PREFIX + component_name @@ -29,7 +29,6 @@ def remove(component_name, show_logs=False): if dist.key == full_component_name]) if found: options = ['--isolated', '--yes'] - options += [] if show_logs else ['--quiet'] pip_args = ['uninstall'] + options + ['--disable-pip-version-check', full_component_name] _run_pip(pip, pip_args) else: @@ -53,13 +52,11 @@ def _run_pip(pip, pip_exec_args): raise CLIError('An error occurred. Run command with --debug for more information.\n' 'If executing az with sudo, you may want sudo\'s -E and -H flags.') -def _install_or_update(package_list, link, private, pre, show_logs=False): +def _install_or_update(package_list, link, private, pre): import pip options = ['--isolated', '--disable-pip-version-check', '--upgrade'] if pre: options.append('--pre') - if not show_logs: - options.append('--quiet') pkg_index_options = ['--find-links', link] if link else [] if private: package_index_url = az_config.get('component', 'package_index_url', fallback=None) @@ -74,7 +71,7 @@ def _install_or_update(package_list, link, private, pre, show_logs=False): pip_args = ['install'] + options + package_list + pkg_index_options _run_pip(pip, pip_args) -def update(private=False, pre=False, link=None, additional_components=None, show_logs=False): +def update(private=False, pre=False, link=None, additional_components=None): """ Update the CLI and all installed components """ import pip # Update the CLI itself @@ -86,4 +83,4 @@ def update(private=False, pre=False, link=None, additional_components=None, show if additional_components: for c in additional_components: package_list += [COMPONENT_PREFIX + c] - _install_or_update(package_list, link, private, pre, show_logs=show_logs) + _install_or_update(package_list, link, private, pre) diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py index 23825d586..c92358966 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py @@ -310,6 +310,8 @@ def _get_remote_url(): "A default remote was not found for the current folder. \ Please run this command in a git repository folder with \ an 'origin' remote or specify a remote using '--remote-url'") + except CalledProcessError as e: + raise CLIError(e) return remote_url.decode() def _check_registry_information(registry_name, registry_resource_id): diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py index 81437a26c..107bc702c 100644 --- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py +++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py @@ -25,3 +25,4 @@ register_cli_argument('logout', 'username', help='account user, if missing, logo register_cli_argument('account', 'subscription', help='Name or ID of subscription.', completer=get_subscription_id_list) register_cli_argument('account list', 'list_all', options_list=('--all',), help='List all subscriptions across all cloud environments', action='store_true') +register_cli_argument('account show', 'expanded_view', action='store_true', help="display more information like service principal's password and cloud environments") diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py index 880b19660..dbb031dd2 100644 --- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py +++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py @@ -27,9 +27,12 @@ def list_subscriptions(list_all=False): # pylint: disable=redefined-builtin sub['cloudName'] = sub.pop('environmentName', None) return [sub for sub in subscriptions if list_all or sub['cloudName'] == CLOUD.name] -def show_subscription(subscription=None): +def show_subscription(subscription=None, expanded_view=None): profile = Profile() - return profile.get_subscription(subscription) + if not expanded_view: + return profile.get_subscription(subscription) + else: + return profile.get_expanded_subscription_info(subscription) def set_active_subscription(subscription): '''Set the current subscription''' diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_params.py b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_params.py index cd259ee3c..687aa9b1e 100644 --- a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_params.py +++ b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_params.py @@ -34,6 +34,7 @@ register_cli_argument('ad sp create', 'identifier', options_list=('--id',), help register_cli_argument('ad sp create-for-rbac', 'name', name_arg_type) register_cli_argument('ad sp create-for-rbac', 'years', type=int) register_cli_argument('ad sp create-for-rbac', 'scopes', nargs='+') +register_cli_argument('ad sp create-for-rbac', 'expanded_view', action='store_true', help='Once created, display more information like subscription and cloud environments') register_cli_argument('ad sp reset-credentials', 'name', name_arg_type) register_cli_argument('ad sp reset-credentials', 'years', type=int) diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/custom.py b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/custom.py index 37a5924e4..5b6d472cd 100644 --- a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/custom.py +++ b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/custom.py @@ -434,8 +434,8 @@ def _resolve_service_principal(client, identifier): except ValueError: raise CLIError("service principal '{}' doesn't exist".format(identifier)) -def create_service_principal_for_rbac(name=None, password=None, years=1, - scopes=None, role=None): +def create_service_principal_for_rbac(name=None, password=None, years=1, #pylint:disable=too-many-arguments + scopes=None, role=None, expanded_view=None): '''create a service principal that can access or modify resources :param str name: an unique uri. If missing, the command will generate one. :param str password: the password used to login. If missing, command will generate one. @@ -472,12 +472,19 @@ def create_service_principal_for_rbac(name=None, password=None, years=1, for scope in scopes: _create_role_assignment(role, oid, None, scope, ocp_aad_session_key=session_key) - return { - 'appId': aad_application.app_id, - 'password': password, - 'name': name, - 'tenant': client.config.tenant_id - } + if expanded_view: + from azure.cli.core._profile import Profile + profile = Profile() + result = profile.get_expanded_subscription_info(scopes[0].split('/')[2] if scopes else None, + aad_application.app_id, password) + else: + result = { + 'appId': aad_application.app_id, + 'password': password, + 'name': name, + 'tenant': client.config.tenant_id + } + return result def reset_service_principal_credential(name, password=None, years=1): '''reset credential, on expiration or you forget it. diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py index 572ec487f..bff61aaeb 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py @@ -54,10 +54,13 @@ def show_storage_account_connection_string( resource_group_name, account_name, protocol='https', blob_endpoint=None, file_endpoint=None, queue_endpoint=None, table_endpoint=None, key_name='primary'): """ Generate connection string for a storage account.""" + from azure.cli.core._profile import CLOUD scf = storage_client_factory() keys = scf.storage_accounts.list_keys(resource_group_name, account_name).keys #pylint: disable=no-member - connection_string = 'DefaultEndpointsProtocol={};AccountName={};AccountKey={}'.format( + endpoint_suffix = CLOUD.suffixes.storage_endpoint + connection_string = 'DefaultEndpointsProtocol={};EndpointSuffix={};AccountName={};AccountKey={}'.format( protocol, + endpoint_suffix, account_name, keys[0].value if key_name == 'primary' else keys[1].value) #pylint: disable=no-member connection_string = '{}{}'.format(connection_string, ';BlobEndpoint={}'.format(blob_endpoint) if blob_endpoint else '')
Cannot use storage data-plane commands with other clouds Due to a bug in azure-storage (https://github.com/Azure/azure-storage-python/issues/229), using storage data-plane commands with a different cloud will hang/not terminate. Repro with: 1. Point the CLI to a different cloud. 2. `export AZURE_STORAGE_CONNECTION_STRING="DefaultEndpointsProtocol=https;AccountName=<account_name>;AccountKey=<account_key>"` 3. `az storage container list --debug` The Azure Storage SDK will attempt to connect to <account_name>.blob.core.windows.net instead of using the correct endpoint suffix for the cloud. When the issue is fixed in the SDK, it can be verified in the CLI.
Azure/azure-cli
diff --git a/src/azure-cli-core/azure/cli/core/tests/test_output.py b/src/azure-cli-core/azure/cli/core/tests/test_output.py index 19babaf83..37ae2bbf0 100644 --- a/src/azure-cli-core/azure/cli/core/tests/test_output.py +++ b/src/azure-cli-core/azure/cli/core/tests/test_output.py @@ -40,6 +40,19 @@ class TestOutput(unittest.TestCase): "active": true, "id": "0b1f6472" } +""")) + + def test_out_json_from_ordered_dict(self): + """ + The JSON output when the input is OrderedDict should be serialized to JSON + """ + output_producer = OutputProducer(formatter=format_json, file=self.io) + output_producer.out(CommandResultItem(OrderedDict({'active': True, 'id': '0b1f6472'}))) + self.assertEqual(util.normalize_newlines(self.io.getvalue()), util.normalize_newlines( +"""{ + "active": true, + "id": "0b1f6472" +} """)) def test_out_json_byte(self): diff --git a/src/azure-cli-core/azure/cli/core/tests/test_profile.py b/src/azure-cli-core/azure/cli/core/tests/test_profile.py index 36268067c..609e6b3f2 100644 --- a/src/azure-cli-core/azure/cli/core/tests/test_profile.py +++ b/src/azure-cli-core/azure/cli/core/tests/test_profile.py @@ -12,7 +12,7 @@ from azure.mgmt.resource.subscriptions.models import (SubscriptionState, Subscri from azure.cli.core._profile import Profile, CredsCache, SubscriptionFinder, CLOUD from azure.cli.core._util import CLIError -class Test_Profile(unittest.TestCase): +class Test_Profile(unittest.TestCase): #pylint: disable=too-many-public-methods @classmethod def setUpClass(cls): @@ -183,6 +183,58 @@ class Test_Profile(unittest.TestCase): self.assertEqual(sub_id, profile.get_subscription(subscription=sub_id)['id']) self.assertRaises(CLIError, profile.get_subscription, "random_id") + def test_get_expanded_subscription_info(self): + storage_mock = {'subscriptions': None} + profile = Profile(storage_mock) + + consolidated = Profile._normalize_properties(self.user1, + [self.subscription1], + False) + profile._set_subscriptions(consolidated) + sub_id = self.id1.split('/')[-1] + + #testing dump of existing logged in account + extended_info = profile.get_expanded_subscription_info() + self.assertEqual(self.user1, extended_info['userName']) + self.assertEqual(sub_id, extended_info['subscriptionId']) + self.assertEqual(self.display_name1, extended_info['subscriptionName']) + self.assertEqual('https://login.microsoftonline.com', + extended_info['endpoints'].active_directory) + + #testing dump of service principal by 'create-for-rbac' + extended_info = profile.get_expanded_subscription_info(name='great-sp', + password='verySecret-') + self.assertEqual(sub_id, extended_info['subscriptionId']) + self.assertEqual(self.display_name1, extended_info['subscriptionName']) + self.assertEqual('great-sp', extended_info['client']) + self.assertEqual('https://login.microsoftonline.com', + extended_info['endpoints'].active_directory) + + @mock.patch('adal.AuthenticationContext', autospec=True) + def test_get_expanded_subscription_info_for_logged_in_service_principal(self, + mock_auth_context): + mock_auth_context.acquire_token_with_client_credentials.return_value = self.token_entry1 + mock_arm_client = mock.MagicMock() + mock_arm_client.subscriptions.list.return_value = [self.subscription1] + finder = SubscriptionFinder(lambda _, _2: mock_auth_context, + None, + lambda _: mock_arm_client) + + storage_mock = {'subscriptions': []} + profile = Profile(storage_mock) + profile._management_resource_uri = 'https://management.core.windows.net/' + profile._subscription_finder = finder + profile.find_subscriptions_on_login(False, '1234', 'my-secret', True, self.tenant_id) + #action + extended_info = profile.get_expanded_subscription_info() + #assert + self.assertEqual(self.id1.split('/')[-1], extended_info['subscriptionId']) + self.assertEqual(self.display_name1, extended_info['subscriptionName']) + self.assertEqual('1234', extended_info['client']) + self.assertEqual('https://login.microsoftonline.com', + extended_info['endpoints'].active_directory) + + @mock.patch('azure.cli.core._profile._load_tokens_from_file', autospec=True) def test_get_current_account_user(self, mock_read_cred_file): #setup diff --git a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py index 7698f05bc..97eb7112b 100644 --- a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py +++ b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py @@ -19,7 +19,7 @@ class WebappBasicE2ETest(ResourceGroupVCRTestBase): def body(self): webapp_name = 'webapp-e2e' plan = 'webapp-e2e-plan' - result = self.cmd('appservice plan create -g {} -n {} --sku B1'.format(self.resource_group, plan)) + result = self.cmd('appservice plan create -g {} -n {}'.format(self.resource_group, plan)) self.cmd('appservice plan list -g {}'.format(self.resource_group), checks=[ JMESPathCheck('length(@)', 1), JMESPathCheck('[0].name', plan),
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_added_files", "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 0, "test_score": 3 }, "num_modified_files": 15 }
0.1
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.2 applicationinsights==0.10.0 argcomplete==1.3.0 astroid==1.4.9 attrs==22.2.0 -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_context&subdirectory=src/command_modules/azure-cli-context -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@119d95b3fb6b68782d11fb8e7934b568cdc1a24a#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-graphrbac==0.30.0rc6 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-compute==0.32.1 azure-mgmt-containerregistry==0.1.0 azure-mgmt-dns==0.30.0rc6 azure-mgmt-iothub==0.1.0 azure-mgmt-keyvault==0.30.0 azure-mgmt-network==0.30.0rc6 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-storage==0.30.0rc6 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.30.1 azure-nspkg==3.0.2 azure-storage==0.33.0 bcrypt==4.0.1 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 colorama==0.3.7 cryptography==40.0.2 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.6.1 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycparser==2.21 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 PyNaCl==1.5.0 pyOpenSSL==16.1.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.16 vcrpy==1.7.4 wrapt==1.16.0 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.2 - applicationinsights==0.10.0 - argcomplete==1.3.0 - astroid==1.4.9 - attrs==22.2.0 - azure-common==1.1.4 - azure-graphrbac==0.30.0rc6 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-compute==0.32.1 - azure-mgmt-containerregistry==0.1.0 - azure-mgmt-dns==0.30.0rc6 - azure-mgmt-iothub==0.1.0 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-network==0.30.0rc6 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-storage==0.30.0rc6 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.30.1 - azure-nspkg==3.0.2 - azure-storage==0.33.0 - bcrypt==4.0.1 - cffi==1.15.1 - charset-normalizer==2.0.12 - colorama==0.3.7 - cryptography==40.0.2 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.6.1 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycparser==2.21 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pynacl==1.5.0 - pyopenssl==16.1.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.7.4 - wrapt==1.16.0 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_json_from_ordered_dict", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info_for_logged_in_service_principal" ]
[ "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py::WebappBasicE2ETest::test_webapp_e2e", "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py::AppServiceBadErrorPolishTest::test_appservice_error_polish" ]
[ "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_boolean_valid", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_json_byte", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_json_byte_empty", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_json_valid", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_format_key_multiple_caps", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_format_key_multiple_words", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_format_key_simple", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_format_key_single", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_valid", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_valid_array_complex", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_valid_caps", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_valid_complex_array", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_valid_empty_array", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_valid_none_val", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_valid_str_array", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_table", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_table_complex_obj", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_table_list_of_lists", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_output_format_dict", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_output_format_dict_sort", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_output_format_ordereddict_list_not_sorted", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_output_format_ordereddict_not_sorted", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_create_token_cache", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_add_new_sp_creds", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_new_token_added_by_adal", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_remove_creds", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_id", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_through_interactive_flow", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_current_account_user", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_login_credentials", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_login_credentials_for_graph_client", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_subscription", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_load_cached_tokens", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_logout", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_logout_all", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_normalize", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_set_active_subscription", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_update_add_two_different_subscriptions", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_update_with_same_subscription_added_twice", "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py::WebappConfigureTest::test_webapp_config", "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py::WebappScaleTest::test_webapp_scale", "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py::LinuxWebappSceanrioTest::test_linux_webapp", "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py::WebappGitScenarioTest::test_webapp_git", "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py::WebappSlotScenarioTest::test_webapp_slot" ]
[]
MIT License
null
Azure__azure-cli-1386
bbc03164b553b8b4166b54239d46c525abe6c2e7
2016-11-18 22:45:09
1576ec67f5029db062579da230902a559acbb9fe
mention-bot: @yugangw-msft, thanks for your PR! By analyzing the history of the files in this pull request, we identified @derekbekoe, @johanste and @tjprescott to be potential reviewers.
diff --git a/.mention-bot b/.mention-bot new file mode 100644 index 000000000..0557e188a --- /dev/null +++ b/.mention-bot @@ -0,0 +1,12 @@ +{ + "maxReviewers: 5, + "userBlacklist": ["BurtBiel"], + "assignToReviewer": true, + "fallbackNotifyForPaths": [ + { + "name": "JasonRShaver", + "files": ["doc/**", "**/_help.py"], + "skipTeamPrs": false + } + ] +} diff --git a/src/azure-cli-core/azure/cli/core/_output.py b/src/azure-cli-core/azure/cli/core/_output.py index 9dde28a31..bd79555ce 100644 --- a/src/azure-cli-core/azure/cli/core/_output.py +++ b/src/azure-cli-core/azure/cli/core/_output.py @@ -34,7 +34,8 @@ class ComplexEncoder(json.JSONEncoder): def format_json(obj): result = obj.result - input_dict = result.__dict__ if hasattr(result, '__dict__') else result + #OrderedDict.__dict__ is always '{}', to persist the data, convert to dict first. + input_dict = dict(result) if hasattr(result, '__dict__') else result return json.dumps(input_dict, indent=2, sort_keys=True, cls=ComplexEncoder, separators=(',', ': ')) + '\n' diff --git a/src/azure-cli-core/azure/cli/core/_profile.py b/src/azure-cli-core/azure/cli/core/_profile.py index b7796cd4b..ba85481ff 100644 --- a/src/azure-cli-core/azure/cli/core/_profile.py +++ b/src/azure-cli-core/azure/cli/core/_profile.py @@ -247,6 +247,39 @@ class Profile(object): str(account[_SUBSCRIPTION_ID]), str(account[_TENANT_ID])) + #per ask from java sdk + def get_expanded_subscription_info(self, subscription_id=None, name=None, password=None): + account = self.get_subscription(subscription_id) + + # is the credential created through command like 'create-for-rbac'? + if bool(name) and bool(password): + result = {} + result[_SUBSCRIPTION_ID] = subscription_id or account[_SUBSCRIPTION_ID] + result['client'] = name + result['password'] = password + result[_TENANT_ID] = account[_TENANT_ID] + result[_ENVIRONMENT_NAME] = CLOUD.name + result['subscriptionName'] = account[_SUBSCRIPTION_NAME] + else: #has logged in through cli + from copy import deepcopy + result = deepcopy(account) + user_type = account[_USER_ENTITY].get(_USER_TYPE) + if user_type == _SERVICE_PRINCIPAL: + result['client'] = account[_USER_ENTITY][_USER_NAME] + result['password'] = self._creds_cache.retrieve_secret_of_service_principal( + account[_USER_ENTITY][_USER_NAME]) + else: + result['userName'] = account[_USER_ENTITY][_USER_NAME] + + result.pop(_STATE) + result.pop(_USER_ENTITY) + result.pop(_IS_DEFAULT_SUBSCRIPTION) + result['subscriptionName'] = result.pop(_SUBSCRIPTION_NAME) + + result['subscriptionId'] = result.pop('id') + result['endpoints'] = CLOUD.endpoints + return result + def get_installation_id(self): installation_id = self._storage.get(_INSTALLATION_ID) if not installation_id: @@ -381,6 +414,13 @@ class CredsCache(object): cred[_ACCESS_TOKEN]) return (token_entry[_TOKEN_ENTRY_TOKEN_TYPE], token_entry[_ACCESS_TOKEN]) + def retrieve_secret_of_service_principal(self, sp_id): + matched = [x for x in self._service_principal_creds if sp_id == x[_SERVICE_PRINCIPAL_ID]] + if not matched: + raise CLIError("No matched service principal found") + cred = matched[0] + return cred[_ACCESS_TOKEN] + def _load_creds(self): if self.adal_token_cache is not None: return self.adal_token_cache diff --git a/src/command_modules/azure-cli-component/azure/cli/command_modules/component/_params.py b/src/command_modules/azure-cli-component/azure/cli/command_modules/component/_params.py index dbb2b369c..ea399981f 100644 --- a/src/command_modules/azure-cli-component/azure/cli/command_modules/component/_params.py +++ b/src/command_modules/azure-cli-component/azure/cli/command_modules/component/_params.py @@ -10,5 +10,4 @@ register_cli_argument('component', 'component_name', options_list=('--name', '-n register_cli_argument('component', 'link', options_list=('--link', '-l'), help='If a url or path to an html file, parse for links to archives. If local path or file:// url that\'s a directory, then look for archives in the directory listing.') register_cli_argument('component', 'private', help='Include packages from a private server.', action='store_true') register_cli_argument('component', 'pre', help='Include pre-release versions', action='store_true') -register_cli_argument('component', 'show_logs', help='Show logs from packaging installing/updating', action='store_true') register_cli_argument('component', 'additional_components', options_list=('--add',), nargs='+', help='The names of additional components to install (space separated)') diff --git a/src/command_modules/azure-cli-component/azure/cli/command_modules/component/custom.py b/src/command_modules/azure-cli-component/azure/cli/command_modules/component/custom.py index 1dbd60554..e6cca2b5d 100644 --- a/src/command_modules/azure-cli-component/azure/cli/command_modules/component/custom.py +++ b/src/command_modules/azure-cli-component/azure/cli/command_modules/component/custom.py @@ -21,7 +21,7 @@ def list_components(): for dist in pip.get_installed_distributions(local_only=True) if dist.key.startswith(COMPONENT_PREFIX)], key=lambda x: x['name']) -def remove(component_name, show_logs=False): +def remove(component_name): """ Remove a component """ import pip full_component_name = COMPONENT_PREFIX + component_name @@ -29,7 +29,6 @@ def remove(component_name, show_logs=False): if dist.key == full_component_name]) if found: options = ['--isolated', '--yes'] - options += [] if show_logs else ['--quiet'] pip_args = ['uninstall'] + options + ['--disable-pip-version-check', full_component_name] _run_pip(pip, pip_args) else: @@ -53,13 +52,11 @@ def _run_pip(pip, pip_exec_args): raise CLIError('An error occurred. Run command with --debug for more information.\n' 'If executing az with sudo, you may want sudo\'s -E and -H flags.') -def _install_or_update(package_list, link, private, pre, show_logs=False): +def _install_or_update(package_list, link, private, pre): import pip options = ['--isolated', '--disable-pip-version-check', '--upgrade'] if pre: options.append('--pre') - if not show_logs: - options.append('--quiet') pkg_index_options = ['--find-links', link] if link else [] if private: package_index_url = az_config.get('component', 'package_index_url', fallback=None) @@ -74,7 +71,7 @@ def _install_or_update(package_list, link, private, pre, show_logs=False): pip_args = ['install'] + options + package_list + pkg_index_options _run_pip(pip, pip_args) -def update(private=False, pre=False, link=None, additional_components=None, show_logs=False): +def update(private=False, pre=False, link=None, additional_components=None): """ Update the CLI and all installed components """ import pip # Update the CLI itself @@ -86,4 +83,4 @@ def update(private=False, pre=False, link=None, additional_components=None, show if additional_components: for c in additional_components: package_list += [COMPONENT_PREFIX + c] - _install_or_update(package_list, link, private, pre, show_logs=show_logs) + _install_or_update(package_list, link, private, pre) diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py index 23825d586..c92358966 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py @@ -310,6 +310,8 @@ def _get_remote_url(): "A default remote was not found for the current folder. \ Please run this command in a git repository folder with \ an 'origin' remote or specify a remote using '--remote-url'") + except CalledProcessError as e: + raise CLIError(e) return remote_url.decode() def _check_registry_information(registry_name, registry_resource_id): diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py index 81437a26c..107bc702c 100644 --- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py +++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py @@ -25,3 +25,4 @@ register_cli_argument('logout', 'username', help='account user, if missing, logo register_cli_argument('account', 'subscription', help='Name or ID of subscription.', completer=get_subscription_id_list) register_cli_argument('account list', 'list_all', options_list=('--all',), help='List all subscriptions across all cloud environments', action='store_true') +register_cli_argument('account show', 'expanded_view', action='store_true', help="display more information like service principal's password and cloud environments") diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py index 880b19660..dbb031dd2 100644 --- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py +++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py @@ -27,9 +27,12 @@ def list_subscriptions(list_all=False): # pylint: disable=redefined-builtin sub['cloudName'] = sub.pop('environmentName', None) return [sub for sub in subscriptions if list_all or sub['cloudName'] == CLOUD.name] -def show_subscription(subscription=None): +def show_subscription(subscription=None, expanded_view=None): profile = Profile() - return profile.get_subscription(subscription) + if not expanded_view: + return profile.get_subscription(subscription) + else: + return profile.get_expanded_subscription_info(subscription) def set_active_subscription(subscription): '''Set the current subscription''' diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_params.py b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_params.py index cd259ee3c..687aa9b1e 100644 --- a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_params.py +++ b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_params.py @@ -34,6 +34,7 @@ register_cli_argument('ad sp create', 'identifier', options_list=('--id',), help register_cli_argument('ad sp create-for-rbac', 'name', name_arg_type) register_cli_argument('ad sp create-for-rbac', 'years', type=int) register_cli_argument('ad sp create-for-rbac', 'scopes', nargs='+') +register_cli_argument('ad sp create-for-rbac', 'expanded_view', action='store_true', help='Once created, display more information like subscription and cloud environments') register_cli_argument('ad sp reset-credentials', 'name', name_arg_type) register_cli_argument('ad sp reset-credentials', 'years', type=int) diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/custom.py b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/custom.py index 37a5924e4..5b6d472cd 100644 --- a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/custom.py +++ b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/custom.py @@ -434,8 +434,8 @@ def _resolve_service_principal(client, identifier): except ValueError: raise CLIError("service principal '{}' doesn't exist".format(identifier)) -def create_service_principal_for_rbac(name=None, password=None, years=1, - scopes=None, role=None): +def create_service_principal_for_rbac(name=None, password=None, years=1, #pylint:disable=too-many-arguments + scopes=None, role=None, expanded_view=None): '''create a service principal that can access or modify resources :param str name: an unique uri. If missing, the command will generate one. :param str password: the password used to login. If missing, command will generate one. @@ -472,12 +472,19 @@ def create_service_principal_for_rbac(name=None, password=None, years=1, for scope in scopes: _create_role_assignment(role, oid, None, scope, ocp_aad_session_key=session_key) - return { - 'appId': aad_application.app_id, - 'password': password, - 'name': name, - 'tenant': client.config.tenant_id - } + if expanded_view: + from azure.cli.core._profile import Profile + profile = Profile() + result = profile.get_expanded_subscription_info(scopes[0].split('/')[2] if scopes else None, + aad_application.app_id, password) + else: + result = { + 'appId': aad_application.app_id, + 'password': password, + 'name': name, + 'tenant': client.config.tenant_id + } + return result def reset_service_principal_credential(name, password=None, years=1): '''reset credential, on expiration or you forget it.
'Circular reference detected' in query on az vm get-instance-view ``` az vm get-instance-view --resource-group 'RGROUP' --name Name --query '{UUU: name, VVV: instanceView.statuses[1].code}'` ``` Throws an execption: ``` Circular reference detected Traceback (most recent call last): File "/opt/az/local/lib/python2.7/site-packages/azure/cli/main.py", line 39, in main OutputProducer(formatter=formatter, file=file).out(cmd_result) File "/opt/az/local/lib/python2.7/site-packages/azure/cli/core/_output.py", line 107, in out output = self.formatter(obj) File "/opt/az/local/lib/python2.7/site-packages/azure/cli/core/_output.py", line 39, in format_json separators=(',', ': ')) + '\n' File "/usr/lib/python2.7/json/__init__.py", line 250, in dumps sort_keys=sort_keys, **kw).encode(obj) File "/usr/lib/python2.7/json/encoder.py", line 209, in encode chunks = list(chunks) File "/usr/lib/python2.7/json/encoder.py", line 434, in _iterencode for chunk in _iterencode_dict(o, _current_indent_level): File "/usr/lib/python2.7/json/encoder.py", line 408, in _iterencode_dict for chunk in chunks: File "/usr/lib/python2.7/json/encoder.py", line 408, in _iterencode_dict for chunk in chunks: File "/usr/lib/python2.7/json/encoder.py", line 332, in _iterencode_list for chunk in chunks: File "/usr/lib/python2.7/json/encoder.py", line 332, in _iterencode_list for chunk in chunks: File "/usr/lib/python2.7/json/encoder.py", line 332, in _iterencode_list for chunk in chunks: File "/usr/lib/python2.7/json/encoder.py", line 295, in _iterencode_list raise ValueError("Circular reference detected") ValueError: Circular reference detected ``` There is no Problem when the query is modified to return the same elements in an array: ``` az vm get-instance-view --resource-group 'RGROUP' --name Name --query '[name, instanceView.statuses[1].code]' [ "Name", "PowerState/running" ] ``` This happens on ubuntu trusty in a vagrant box (2048MB ram): ``` vagrant@vagrant-ubuntu-trusty-64:~$ az --version azure-cli (0.1.0b9) acr (0.1.0b9) acs (0.1.0b9) appservice (0.1.0b9) cloud (0.1.0b9) component (0.1.0b9) configure (0.1.0b9) container (0.1.0b9) context (0.1.0b9) core (0.1.0b9) feedback (0.1.0b9) network (0.1.0b9) profile (0.1.0b9) resource (0.1.0b9) role (0.1.0b9) storage (0.1.0b9) vm (0.1.0b9) Python (Linux) 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] ```
Azure/azure-cli
diff --git a/src/azure-cli-core/azure/cli/core/tests/test_output.py b/src/azure-cli-core/azure/cli/core/tests/test_output.py index 19babaf83..37ae2bbf0 100644 --- a/src/azure-cli-core/azure/cli/core/tests/test_output.py +++ b/src/azure-cli-core/azure/cli/core/tests/test_output.py @@ -40,6 +40,19 @@ class TestOutput(unittest.TestCase): "active": true, "id": "0b1f6472" } +""")) + + def test_out_json_from_ordered_dict(self): + """ + The JSON output when the input is OrderedDict should be serialized to JSON + """ + output_producer = OutputProducer(formatter=format_json, file=self.io) + output_producer.out(CommandResultItem(OrderedDict({'active': True, 'id': '0b1f6472'}))) + self.assertEqual(util.normalize_newlines(self.io.getvalue()), util.normalize_newlines( +"""{ + "active": true, + "id": "0b1f6472" +} """)) def test_out_json_byte(self): diff --git a/src/azure-cli-core/azure/cli/core/tests/test_profile.py b/src/azure-cli-core/azure/cli/core/tests/test_profile.py index 36268067c..609e6b3f2 100644 --- a/src/azure-cli-core/azure/cli/core/tests/test_profile.py +++ b/src/azure-cli-core/azure/cli/core/tests/test_profile.py @@ -12,7 +12,7 @@ from azure.mgmt.resource.subscriptions.models import (SubscriptionState, Subscri from azure.cli.core._profile import Profile, CredsCache, SubscriptionFinder, CLOUD from azure.cli.core._util import CLIError -class Test_Profile(unittest.TestCase): +class Test_Profile(unittest.TestCase): #pylint: disable=too-many-public-methods @classmethod def setUpClass(cls): @@ -183,6 +183,58 @@ class Test_Profile(unittest.TestCase): self.assertEqual(sub_id, profile.get_subscription(subscription=sub_id)['id']) self.assertRaises(CLIError, profile.get_subscription, "random_id") + def test_get_expanded_subscription_info(self): + storage_mock = {'subscriptions': None} + profile = Profile(storage_mock) + + consolidated = Profile._normalize_properties(self.user1, + [self.subscription1], + False) + profile._set_subscriptions(consolidated) + sub_id = self.id1.split('/')[-1] + + #testing dump of existing logged in account + extended_info = profile.get_expanded_subscription_info() + self.assertEqual(self.user1, extended_info['userName']) + self.assertEqual(sub_id, extended_info['subscriptionId']) + self.assertEqual(self.display_name1, extended_info['subscriptionName']) + self.assertEqual('https://login.microsoftonline.com', + extended_info['endpoints'].active_directory) + + #testing dump of service principal by 'create-for-rbac' + extended_info = profile.get_expanded_subscription_info(name='great-sp', + password='verySecret-') + self.assertEqual(sub_id, extended_info['subscriptionId']) + self.assertEqual(self.display_name1, extended_info['subscriptionName']) + self.assertEqual('great-sp', extended_info['client']) + self.assertEqual('https://login.microsoftonline.com', + extended_info['endpoints'].active_directory) + + @mock.patch('adal.AuthenticationContext', autospec=True) + def test_get_expanded_subscription_info_for_logged_in_service_principal(self, + mock_auth_context): + mock_auth_context.acquire_token_with_client_credentials.return_value = self.token_entry1 + mock_arm_client = mock.MagicMock() + mock_arm_client.subscriptions.list.return_value = [self.subscription1] + finder = SubscriptionFinder(lambda _, _2: mock_auth_context, + None, + lambda _: mock_arm_client) + + storage_mock = {'subscriptions': []} + profile = Profile(storage_mock) + profile._management_resource_uri = 'https://management.core.windows.net/' + profile._subscription_finder = finder + profile.find_subscriptions_on_login(False, '1234', 'my-secret', True, self.tenant_id) + #action + extended_info = profile.get_expanded_subscription_info() + #assert + self.assertEqual(self.id1.split('/')[-1], extended_info['subscriptionId']) + self.assertEqual(self.display_name1, extended_info['subscriptionName']) + self.assertEqual('1234', extended_info['client']) + self.assertEqual('https://login.microsoftonline.com', + extended_info['endpoints'].active_directory) + + @mock.patch('azure.cli.core._profile._load_tokens_from_file', autospec=True) def test_get_current_account_user(self, mock_read_cred_file): #setup
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_added_files", "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 0, "test_score": 3 }, "num_modified_files": 9 }
0.1
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.2 applicationinsights==0.10.0 argcomplete==1.3.0 astroid==1.4.9 attrs==22.2.0 -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_context&subdirectory=src/command_modules/azure-cli-context -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@bbc03164b553b8b4166b54239d46c525abe6c2e7#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-graphrbac==0.30.0rc6 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-compute==0.32.1 azure-mgmt-containerregistry==0.1.0 azure-mgmt-dns==0.30.0rc6 azure-mgmt-iothub==0.1.0 azure-mgmt-keyvault==0.30.0 azure-mgmt-network==0.30.0rc6 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-storage==0.30.0rc6 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.30.1 azure-nspkg==3.0.2 azure-storage==0.33.0 bcrypt==4.0.1 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 colorama==0.3.7 cryptography==40.0.2 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.6.1 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycparser==2.21 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 PyNaCl==1.5.0 pyOpenSSL==16.1.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.16 vcrpy==1.7.4 wrapt==1.16.0 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.2 - applicationinsights==0.10.0 - argcomplete==1.3.0 - astroid==1.4.9 - attrs==22.2.0 - azure-common==1.1.4 - azure-graphrbac==0.30.0rc6 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-compute==0.32.1 - azure-mgmt-containerregistry==0.1.0 - azure-mgmt-dns==0.30.0rc6 - azure-mgmt-iothub==0.1.0 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-network==0.30.0rc6 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-storage==0.30.0rc6 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.30.1 - azure-nspkg==3.0.2 - azure-storage==0.33.0 - bcrypt==4.0.1 - cffi==1.15.1 - charset-normalizer==2.0.12 - colorama==0.3.7 - cryptography==40.0.2 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.6.1 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycparser==2.21 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pynacl==1.5.0 - pyopenssl==16.1.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.7.4 - wrapt==1.16.0 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_json_from_ordered_dict", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info_for_logged_in_service_principal" ]
[]
[ "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_boolean_valid", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_json_byte", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_json_byte_empty", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_json_valid", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_format_key_multiple_caps", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_format_key_multiple_words", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_format_key_simple", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_format_key_single", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_valid", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_valid_array_complex", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_valid_caps", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_valid_complex_array", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_valid_empty_array", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_valid_none_val", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_list_valid_str_array", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_table", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_table_complex_obj", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_out_table_list_of_lists", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_output_format_dict", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_output_format_dict_sort", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_output_format_ordereddict_list_not_sorted", "src/azure-cli-core/azure/cli/core/tests/test_output.py::TestOutput::test_output_format_ordereddict_not_sorted", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_create_token_cache", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_add_new_sp_creds", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_new_token_added_by_adal", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_remove_creds", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_id", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_through_interactive_flow", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_current_account_user", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_login_credentials", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_login_credentials_for_graph_client", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_subscription", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_load_cached_tokens", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_logout", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_logout_all", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_normalize", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_set_active_subscription", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_update_add_two_different_subscriptions", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_update_with_same_subscription_added_twice" ]
[]
MIT License
null
Azure__azure-cli-1423
c56c791d01985f1209d30849b55922d1adac85b5
2016-11-23 01:05:31
1576ec67f5029db062579da230902a559acbb9fe
mention-bot: @brendandburns, thanks for your PR! By analyzing the history of the files in this pull request, we identified @yugangw-msft, @tjprescott and @derekbekoe to be potential reviewers. tjprescott: @brendandburns this issue applies more generally to the CLI. See issue #1419. I think it can fixed more generally by making a change here: https://github.com/Azure/azure-cli/blob/master/src/azure-cli-core/azure/cli/core/application.py#L200 In addition to startswith('@') we can probably have something like `or '=@' in ...`. derekbekoe: Can we not make use of this? https://docs.python.org/3/library/argparse.html#fromfile-prefix-chars cc @tjprescott @johanste brendandburns: @tjprescott thanks for the tip, I moved the code to that location (and I added unit tests too as a bonus!) please take another look. Thanks! --brendan tjprescott: @derekbekoe > then arguments that start with any of the specified characters will be treated as files, and will be replaced by the arguments they contain This problem is that with `foo=@bar`, the @ is in the middle of the string. brendandburns: @tjprescott fixed (and added tests to cover it) please take another look. Thanks --brendan
diff --git a/src/azure-cli-core/azure/cli/core/application.py b/src/azure-cli-core/azure/cli/core/application.py index 0bc115f74..caab463a1 100644 --- a/src/azure-cli-core/azure/cli/core/application.py +++ b/src/azure-cli-core/azure/cli/core/application.py @@ -6,6 +6,7 @@ from collections import defaultdict import sys import os +import re import uuid import argparse from azure.cli.core.parser import AzCliCommandParser, enable_autocomplete @@ -196,10 +197,24 @@ class Application(object): global_group.add_argument('--debug', dest='_log_verbosity_debug', action='store_true', help='Increase logging verbosity to show all debug logs.') + @staticmethod + def _maybe_load_file(arg): + ix = arg.find('@') + if ix == -1: + return arg + + if ix == 0: + return Application._load_file(arg[1:]) + + res = re.match('(\\-\\-?[a-zA-Z0-9]+[\\-a-zA-Z0-9]*\\=)\\"?@([^\\"]*)\\"?', arg) + if not res: + return arg + return res.group(1) + Application._load_file(res.group(2)) + @staticmethod def _expand_file_prefixed_files(argv): return list( - [Application._load_file(arg[1:]) if arg.startswith('@') else arg for arg in argv] + [Application._maybe_load_file(arg) for arg in argv] ) @staticmethod diff --git a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_params.py b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_params.py index 6a50031c7..2d3464686 100644 --- a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_params.py +++ b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_params.py @@ -53,7 +53,7 @@ register_cli_argument('appservice plan', 'admin_site_name', help='The name of th register_cli_argument('appservice web', 'slot', help="the name of the slot. Default to the productions slot if not specified") register_cli_argument('appservice web', 'name', arg_type=name_arg_type, completer=get_resource_name_completion_list('Microsoft.Web/sites'), id_part='name', help='name of the web') register_cli_argument('appservice web create', 'name', options_list=('--name', '-n'), help='name of the new webapp') -register_cli_argument('appservice web create', 'plan', options_list=('--plan',), completer=get_resource_name_completion_list('Microsoft.Web/serverFarms'), +register_cli_argument('appservice web create', 'plan', options_list=('--plan', '-p'), completer=get_resource_name_completion_list('Microsoft.Web/serverFarms'), help="name or resource id of the app service plan. Use 'appservice plan create' to get one") register_cli_argument('appservice web deployment user', 'user_name', help='user name')
CLI inconsistency -- to specify a parameters file, one must not use equal sign If you use an equal sign between --parameters and the actual file path, you end up with the following: ``` az resource group deployment create --resource-group=jmsdcosrg --template-file=./output/azuredeploy.json --parameters="@./output/azuredeploy.parameters.json" No JSON object could be decoded ``` Removing the equal sign works: ``` az resource group deployment create --resource-group=jmsdcosrg --template-file=./output/azuredeploy.json --parameters "@./output/azuredeploy.parameters.json" ```
Azure/azure-cli
diff --git a/src/azure-cli-core/azure/cli/core/tests/test_application.py b/src/azure-cli-core/azure/cli/core/tests/test_application.py index aef479668..252fd558a 100644 --- a/src/azure-cli-core/azure/cli/core/tests/test_application.py +++ b/src/azure-cli-core/azure/cli/core/tests/test_application.py @@ -5,10 +5,14 @@ import unittest +import os +import tempfile + from six import StringIO from azure.cli.core.application import Application, Configuration, IterateAction from azure.cli.core.commands import CliCommand +from azure.cli.core._util import CLIError class TestApplication(unittest.TestCase): @@ -80,5 +84,32 @@ class TestApplication(unittest.TestCase): self.assertEqual(hellos[1]['hello'], 'sir') self.assertEqual(hellos[1]['something'], 'else') + def test_expand_file_prefixed_files(self): + f = tempfile.NamedTemporaryFile(delete=False) + f.close() + + with open(f.name, 'w+') as stream: + stream.write('foo') + + cases = [ + [['--bar=baz'], ['--bar=baz']], + [['--bar', 'baz'], ['--bar', 'baz']], + [['--bar=@{}'.format(f.name)], ['--bar=foo']], + [['--bar', '@{}'.format(f.name)], ['--bar', 'foo']], + [['--bar', f.name], ['--bar', f.name]], + [['--bar="@{}"'.format(f.name)], ['--bar=foo']], + [['--bar=name@company.com'], ['--bar=name@company.com']], + [['--bar', 'name@company.com'], ['--bar', 'name@company.com']], + ] + + for test_case in cases: + try: + args = Application._expand_file_prefixed_files(test_case[0]) #pylint: disable=protected-access + self.assertEqual(args, test_case[1], 'Failed for: {}'.format(test_case[0])) + except CLIError as ex: + self.fail('Unexpected error for {} ({}): {}'.format(test_case[0], args, ex)) + + os.remove(f.name) + if __name__ == '__main__': unittest.main()
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 0, "test_score": 0 }, "num_modified_files": 2 }
0.1
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.3.0 astroid==1.4.9 attrs==22.2.0 -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_context&subdirectory=src/command_modules/azure-cli-context -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@c56c791d01985f1209d30849b55922d1adac85b5#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-graphrbac==0.30.0rc6 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-compute==0.32.1 azure-mgmt-containerregistry==0.1.0 azure-mgmt-dns==0.30.0rc6 azure-mgmt-iothub==0.1.0 azure-mgmt-keyvault==0.30.0 azure-mgmt-network==0.30.0rc6 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-storage==0.30.0rc6 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.30.1 azure-nspkg==3.0.2 azure-storage==0.33.0 bcrypt==4.0.1 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 colorama==0.3.7 cryptography==40.0.2 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.6.1 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycparser==2.21 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 PyNaCl==1.5.0 pyOpenSSL==16.1.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.16 vcrpy==1.7.4 wrapt==1.16.0 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.3.0 - astroid==1.4.9 - attrs==22.2.0 - azure-common==1.1.4 - azure-graphrbac==0.30.0rc6 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-compute==0.32.1 - azure-mgmt-containerregistry==0.1.0 - azure-mgmt-dns==0.30.0rc6 - azure-mgmt-iothub==0.1.0 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-network==0.30.0rc6 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-storage==0.30.0rc6 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.30.1 - azure-nspkg==3.0.2 - azure-storage==0.33.0 - bcrypt==4.0.1 - cffi==1.15.1 - charset-normalizer==2.0.12 - colorama==0.3.7 - cryptography==40.0.2 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.6.1 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycparser==2.21 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pynacl==1.5.0 - pyopenssl==16.1.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.7.4 - wrapt==1.16.0 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/azure-cli-core/azure/cli/core/tests/test_application.py::TestApplication::test_expand_file_prefixed_files" ]
[]
[ "src/azure-cli-core/azure/cli/core/tests/test_application.py::TestApplication::test_application_register_and_call_handlers", "src/azure-cli-core/azure/cli/core/tests/test_application.py::TestApplication::test_list_value_parameter" ]
[]
MIT License
null
Azure__azure-cli-15184
00cf5e3b3ecadfa43d4b1bee8c5c2d352626d227
2020-09-16 07:19:50
7bdd6dbf9a96932bd86c1f97a838fa7babf16fbf
yonzhan: Core jiasli: Unfortunately, due an incorrect `credential_scopes` managing logic in existing SDKs (https://github.com/Azure/azure-sdk-for-python/issues/12947), even though the bug has been fixed in https://github.com/Azure/autorest.python/pull/745, merging this PR will break all commands using **Track 2 SDKs with sovereign clouds**, as `credential_scopes` will be passed to `scopes` as ``` ['https://management.azure.com/.default', 'https://management.core.chinacloudapi.cn/.default'] ``` `'https://management.core.chinacloudapi.cn/.default'` will be discarded.
diff --git a/src/azure-cli-core/azure/cli/core/_profile.py b/src/azure-cli-core/azure/cli/core/_profile.py index 3dee2b626..79e08e5c9 100644 --- a/src/azure-cli-core/azure/cli/core/_profile.py +++ b/src/azure-cli-core/azure/cli/core/_profile.py @@ -559,26 +559,35 @@ class Profile: external_tenants_info.append(sub[_TENANT_ID]) if identity_type is None: - def _retrieve_token(): + def _retrieve_token(sdk_resource=None): + # When called by + # - Track 1 SDK, use `resource` specified by CLI + # - Track 2 SDK, use `sdk_resource` specified by SDK and ignore `resource` specified by CLI + token_resource = sdk_resource or resource + logger.debug("Retrieving token from ADAL for resource %r", token_resource) + if in_cloud_console() and account[_USER_ENTITY].get(_CLOUD_SHELL_ID): - return self._get_token_from_cloud_shell(resource) + return self._get_token_from_cloud_shell(token_resource) if user_type == _USER: return self._creds_cache.retrieve_token_for_user(username_or_sp_id, - account[_TENANT_ID], resource) + account[_TENANT_ID], token_resource) use_cert_sn_issuer = account[_USER_ENTITY].get(_SERVICE_PRINCIPAL_CERT_SN_ISSUER_AUTH) - return self._creds_cache.retrieve_token_for_service_principal(username_or_sp_id, resource, + return self._creds_cache.retrieve_token_for_service_principal(username_or_sp_id, token_resource, account[_TENANT_ID], use_cert_sn_issuer) - def _retrieve_tokens_from_external_tenants(): + def _retrieve_tokens_from_external_tenants(sdk_resource=None): + token_resource = sdk_resource or resource + logger.debug("Retrieving token from ADAL for external tenants and resource %r", token_resource) + external_tokens = [] for sub_tenant_id in external_tenants_info: if user_type == _USER: external_tokens.append(self._creds_cache.retrieve_token_for_user( - username_or_sp_id, sub_tenant_id, resource)) + username_or_sp_id, sub_tenant_id, token_resource)) else: external_tokens.append(self._creds_cache.retrieve_token_for_service_principal( - username_or_sp_id, resource, sub_tenant_id, resource)) + username_or_sp_id, token_resource, sub_tenant_id, token_resource)) return external_tokens from azure.cli.core.adal_authentication import AdalAuthentication @@ -621,6 +630,8 @@ class Profile: return username_or_sp_id, sp_secret, None, str(account[_TENANT_ID]) def get_raw_token(self, resource=None, subscription=None, tenant=None): + logger.debug("Profile.get_raw_token invoked with resource=%r, subscription=%r, tenant=%r", + resource, subscription, tenant) if subscription and tenant: raise CLIError("Please specify only one of subscription and tenant, not both") account = self.get_subscription(subscription) diff --git a/src/azure-cli-core/azure/cli/core/adal_authentication.py b/src/azure-cli-core/azure/cli/core/adal_authentication.py index 7ff90a1bd..a4496b05d 100644 --- a/src/azure-cli-core/azure/cli/core/adal_authentication.py +++ b/src/azure-cli-core/azure/cli/core/adal_authentication.py @@ -10,9 +10,12 @@ import adal from msrest.authentication import Authentication from msrestazure.azure_active_directory import MSIAuthentication from azure.core.credentials import AccessToken -from azure.cli.core.util import in_cloud_console +from azure.cli.core.util import in_cloud_console, scopes_to_resource from knack.util import CLIError +from knack.log import get_logger + +logger = get_logger(__name__) class AdalAuthentication(Authentication): # pylint: disable=too-few-public-methods @@ -21,12 +24,15 @@ class AdalAuthentication(Authentication): # pylint: disable=too-few-public-meth self._token_retriever = token_retriever self._external_tenant_token_retriever = external_tenant_token_retriever - def _get_token(self): + def _get_token(self, sdk_resource=None): + """ + :param sdk_resource: `resource` converted from Track 2 SDK's `scopes` + """ external_tenant_tokens = None try: - scheme, token, full_token = self._token_retriever() + scheme, token, full_token = self._token_retriever(sdk_resource) if self._external_tenant_token_retriever: - external_tenant_tokens = self._external_tenant_token_retriever() + external_tenant_tokens = self._external_tenant_token_retriever(sdk_resource) except CLIError as err: if in_cloud_console(): AdalAuthentication._log_hostname() @@ -60,7 +66,16 @@ class AdalAuthentication(Authentication): # pylint: disable=too-few-public-meth # This method is exposed for Azure Core. def get_token(self, *scopes, **kwargs): # pylint:disable=unused-argument - _, token, full_token, _ = self._get_token() + logger.debug("AdalAuthentication.get_token invoked by Track 2 SDK with scopes=%s", scopes) + + # Deal with an old Track 2 SDK issue where the default credential_scopes is extended with + # custom credential_scopes. Instead, credential_scopes should be replaced by custom credential_scopes. + # https://github.com/Azure/azure-sdk-for-python/issues/12947 + # We simply remove the first one if there are multiple scopes provided. + if len(scopes) > 1: + scopes = scopes[1:] + + _, token, full_token, _ = self._get_token(scopes_to_resource(scopes)) try: return AccessToken(token, int(full_token['expiresIn'] + time.time())) except KeyError: # needed to deal with differing unserialized MSI token payload @@ -68,6 +83,7 @@ class AdalAuthentication(Authentication): # pylint: disable=too-few-public-meth # This method is exposed for msrest. def signed_session(self, session=None): # pylint: disable=arguments-differ + logger.debug("AdalAuthentication.signed_session invoked by Track 1 SDK") session = session or super(AdalAuthentication, self).signed_session() scheme, token, _, external_tenant_tokens = self._get_token() @@ -82,8 +98,6 @@ class AdalAuthentication(Authentication): # pylint: disable=too-few-public-meth @staticmethod def _log_hostname(): import socket - from knack.log import get_logger - logger = get_logger(__name__) logger.warning("A Cloud Shell credential problem occurred. When you report the issue with the error " "below, please mention the hostname '%s'", socket.gethostname()) @@ -91,13 +105,13 @@ class AdalAuthentication(Authentication): # pylint: disable=too-few-public-meth class MSIAuthenticationWrapper(MSIAuthentication): # This method is exposed for Azure Core. Add *scopes, **kwargs to fit azure.core requirement def get_token(self, *scopes, **kwargs): # pylint:disable=unused-argument + logger.debug("MSIAuthenticationWrapper.get_token invoked by Track 2 SDK with scopes=%s", scopes) + self.resource = scopes_to_resource(scopes) self.set_token() return AccessToken(self.token['access_token'], int(self.token['expires_on'])) def set_token(self): import traceback - from knack.log import get_logger - logger = get_logger(__name__) from azure.cli.core.azclierror import AzureConnectionError, AzureResponseError try: super(MSIAuthenticationWrapper, self).set_token() @@ -117,3 +131,7 @@ class MSIAuthenticationWrapper(MSIAuthentication): traceback.format_exc()) raise AzureConnectionError('MSI endpoint is not responding. Please make sure MSI is configured correctly.\n' 'Error detail: {}'.format(str(err))) + + def signed_session(self, session=None): + logger.debug("MSIAuthenticationWrapper.signed_session invoked by Track 1 SDK") + super().signed_session(session) diff --git a/src/azure-cli-core/azure/cli/core/commands/client_factory.py b/src/azure-cli-core/azure/cli/core/commands/client_factory.py index 8a9472469..c8c4b5aa1 100644 --- a/src/azure-cli-core/azure/cli/core/commands/client_factory.py +++ b/src/azure-cli-core/azure/cli/core/commands/client_factory.py @@ -150,6 +150,7 @@ def _get_mgmt_service_client(cli_ctx, aux_tenants=None, **kwargs): from azure.cli.core._profile import Profile + from azure.cli.core.util import resource_to_scopes logger.debug('Getting management service client client_type=%s', client_type.__name__) resource = resource or cli_ctx.cloud.endpoints.active_directory_resource_id profile = Profile(cli_ctx=cli_ctx) @@ -169,6 +170,7 @@ def _get_mgmt_service_client(cli_ctx, if is_track2(client_type): client_kwargs.update(configure_common_settings_track2(cli_ctx)) + client_kwargs['credential_scopes'] = resource_to_scopes(resource) if subscription_bound: client = client_type(cred, subscription_id, **client_kwargs) diff --git a/src/azure-cli-core/azure/cli/core/util.py b/src/azure-cli-core/azure/cli/core/util.py index 283f7e9bb..e85f32be8 100644 --- a/src/azure-cli-core/azure/cli/core/util.py +++ b/src/azure-cli-core/azure/cli/core/util.py @@ -1165,3 +1165,36 @@ def handle_version_update(): refresh_known_clouds() except Exception as ex: # pylint: disable=broad-except logger.warning(ex) + + +def resource_to_scopes(resource): + """Convert the ADAL resource ID to MSAL scopes by appending the /.default suffix and return a list. + For example: 'https://management.core.windows.net/' -> ['https://management.core.windows.net/.default'] + :param resource: The ADAL resource ID + :return: A list of scopes + """ + if 'datalake' in resource or 'batch' in resource or 'database' in resource: + # For datalake, batch and database, the slash must be doubled due to service issue, like + # https://datalake.azure.net//.default + # TODO: This should be fixed on the service side. + scope = resource + '/.default' + else: + scope = resource.rstrip('/') + '/.default' + return [scope] + + +def scopes_to_resource(scopes): + """Convert MSAL scopes to ADAL resource by stripping the /.default suffix and return a str. + For example: ['https://management.core.windows.net/.default'] -> 'https://management.core.windows.net/' + + :param scopes: The MSAL scopes. It can be a list or tuple of string + :return: The ADAL resource + :rtype: str + """ + scope = scopes[0] + if scope.endswith(".default"): + scope = scope[:-len(".default")] + + # Trim extra ending slashes. https://datalake.azure.net// -> https://datalake.azure.net/ + scope = scope.rstrip('/') + '/' + return scope diff --git a/src/azure-cli/azure/cli/command_modules/storage/_validators.py b/src/azure-cli/azure/cli/command_modules/storage/_validators.py index 458ac3d23..861ef2671 100644 --- a/src/azure-cli/azure/cli/command_modules/storage/_validators.py +++ b/src/azure-cli/azure/cli/command_modules/storage/_validators.py @@ -129,8 +129,7 @@ def validate_client_parameters(cmd, namespace): if is_storagev2(prefix): from azure.cli.core._profile import Profile profile = Profile(cli_ctx=cmd.cli_ctx) - n.token_credential, _, _ = profile.get_login_credentials( - resource="https://storage.azure.com", subscription_id=n._subscription) + n.token_credential, _, _ = profile.get_login_credentials(subscription_id=n._subscription) # Otherwise, we will assume it is in track1 and keep previous token updater else: n.token_credential = _create_token_credential(cmd.cli_ctx) diff --git a/src/azure-cli/azure/cli/command_modules/storage/_validators_azure_stack.py b/src/azure-cli/azure/cli/command_modules/storage/_validators_azure_stack.py index 9c79e5f4a..c9ab00d3b 100644 --- a/src/azure-cli/azure/cli/command_modules/storage/_validators_azure_stack.py +++ b/src/azure-cli/azure/cli/command_modules/storage/_validators_azure_stack.py @@ -128,8 +128,7 @@ def validate_client_parameters(cmd, namespace): if is_storagev2(prefix): from azure.cli.core._profile import Profile profile = Profile(cli_ctx=cmd.cli_ctx) - n.token_credential, _, _ = profile.get_login_credentials( - resource="https://storage.azure.com", subscription_id=n._subscription) + n.token_credential, _, _ = profile.get_login_credentials(subscription_id=n._subscription) # Otherwise, we will assume it is in track1 and keep previous token updater else: n.token_credential = _create_token_credential(cmd.cli_ctx)
{Core} AdalAuthentication doesn't honor `scopes` for Track 2 SDK **Describe the bug** In Track 2 SDK, `scopes` (`resource`) is managed by SDK, instead of Azure CLI. For example, in [`AzureAppConfigurationClient`](https://github.com/Azure/azure-sdk-for-python/blob/022bc80f2bc645d8d82d647620376fcea2229522/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_azure_appconfiguration_client.py#L128): ```py if aad_mode: scope = base_url.strip("/") + "/.default" ``` But in `get_token`, `scopes` is not honored (discarded), resulting in getting a token for a wrong `scopes` (ARM `https://management.core.windows.net/` by default): https://github.com/Azure/azure-cli/blob/c2b9a2c5cfe34b108b52b49ac50c6802ac4d729f/src/azure-cli-core/azure/cli/core/adal_authentication.py#L61-L67
Azure/azure-cli
diff --git a/src/azure-cli-core/azure/cli/core/tests/test_util.py b/src/azure-cli-core/azure/cli/core/tests/test_util.py index 821a35370..84a57be1e 100644 --- a/src/azure-cli-core/azure/cli/core/tests/test_util.py +++ b/src/azure-cli-core/azure/cli/core/tests/test_util.py @@ -377,6 +377,29 @@ class TestUtils(unittest.TestCase): request = send_mock.call_args.args[1] self.assertEqual(request.headers['User-Agent'], get_az_rest_user_agent() + ' env-ua ARG-UA') + def test_scopes_to_resource(self): + from azure.cli.core.util import scopes_to_resource + # scopes as a list + self.assertEqual(scopes_to_resource(['https://management.core.windows.net/.default']), + 'https://management.core.windows.net/') + # scopes as a tuple + self.assertEqual(scopes_to_resource(('https://storage.azure.com/.default',)), + 'https://storage.azure.com/') + + # Double slashes are reduced + self.assertEqual(scopes_to_resource(['https://datalake.azure.net//.default']), + 'https://datalake.azure.net/') + + def test_resource_to_scopes(self): + from azure.cli.core.util import resource_to_scopes + # resource converted to a scopes list + self.assertEqual(resource_to_scopes('https://management.core.windows.net/'), + ['https://management.core.windows.net/.default']) + + # Use double slashes for certain services + self.assertEqual(resource_to_scopes('https://datalake.azure.net/'), + ['https://datalake.azure.net//.default']) + class TestBase64ToHex(unittest.TestCase):
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 1, "test_score": 3 }, "num_modified_files": 6 }
2.14
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.7", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 antlr4-python3-runtime==4.7.2 applicationinsights==0.11.10 argcomplete==1.12.3 astroid==2.15.8 azure-appconfiguration==1.1.1 azure-batch==9.0.0 -e git+https://github.com/Azure/azure-cli.git@00cf5e3b3ecadfa43d4b1bee8c5c2d352626d227#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@00cf5e3b3ecadfa43d4b1bee8c5c2d352626d227#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@00cf5e3b3ecadfa43d4b1bee8c5c2d352626d227#egg=azure_cli_dev_tools&subdirectory=tools -e git+https://github.com/Azure/azure-cli.git@00cf5e3b3ecadfa43d4b1bee8c5c2d352626d227#egg=azure_cli_telemetry&subdirectory=src/azure-cli-telemetry -e git+https://github.com/Azure/azure-cli.git@00cf5e3b3ecadfa43d4b1bee8c5c2d352626d227#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk azure-common==1.1.28 azure-core==1.30.1 azure-cosmos==3.2.0 azure-datalake-store==0.0.52 azure-devtools==1.2.0 azure-functions-devops-build==0.0.22 azure-graphrbac==0.60.0 azure-keyvault==1.1.0 azure-keyvault-administration==4.0.0 azure-loganalytics==0.1.1 azure-mgmt-advisor==2.0.1 azure-mgmt-apimanagement==0.2.0 azure-mgmt-appconfiguration==0.6.0 azure-mgmt-applicationinsights==0.1.1 azure-mgmt-authorization==0.61.0 azure-mgmt-batch==9.0.0 azure-mgmt-batchai==2.0.0 azure-mgmt-billing==1.0.0 azure-mgmt-botservice==0.2.0 azure-mgmt-cdn==5.0.0 azure-mgmt-cognitiveservices==6.3.0 azure-mgmt-compute==14.0.0 azure-mgmt-consumption==2.0.0 azure-mgmt-containerinstance==1.5.0 azure-mgmt-containerregistry==3.0.0rc15 azure-mgmt-containerservice==9.4.0 azure-mgmt-core==1.2.0 azure-mgmt-cosmosdb==1.0.0 azure-mgmt-datalake-analytics==0.2.1 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.5.0 azure-mgmt-datamigration==0.1.0 azure-mgmt-deploymentmanager==0.2.0 azure-mgmt-devtestlabs==4.0.0 azure-mgmt-dns==2.1.0 azure-mgmt-eventgrid==3.0.0rc7 azure-mgmt-eventhub==4.1.0 azure-mgmt-hdinsight==1.7.0 azure-mgmt-imagebuilder==0.4.0 azure-mgmt-iotcentral==3.0.0 azure-mgmt-iothub==0.12.0 azure-mgmt-iothubprovisioningservices==0.2.0 azure-mgmt-keyvault==7.0.0b3 azure-mgmt-kusto==0.3.0 azure-mgmt-loganalytics==0.7.0 azure-mgmt-managedservices==1.0.0 azure-mgmt-managementgroups==0.2.0 azure-mgmt-maps==0.1.0 azure-mgmt-marketplaceordering==0.2.1 azure-mgmt-media==2.2.0 azure-mgmt-monitor==0.11.0 azure-mgmt-msi==0.2.0 azure-mgmt-netapp==0.12.0 azure-mgmt-network==12.0.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-policyinsights==0.5.0 azure-mgmt-privatedns==0.1.0 azure-mgmt-rdbms==3.1.0rc1 azure-mgmt-recoveryservices==0.4.0 azure-mgmt-recoveryservicesbackup==0.6.0 azure-mgmt-redhatopenshift==0.1.0 azure-mgmt-redis==7.0.0 azure-mgmt-relay==0.1.0 azure-mgmt-reservations==0.6.0 azure-mgmt-resource==10.2.0 azure-mgmt-search==2.1.0 azure-mgmt-security==0.4.1 azure-mgmt-servicebus==0.6.0 azure-mgmt-servicefabric==0.5.0 azure-mgmt-signalr==0.4.0 azure-mgmt-sql==0.21.0 azure-mgmt-sqlvirtualmachine==0.5.0 azure-mgmt-storage==11.2.0 azure-mgmt-synapse==0.3.0 azure-mgmt-trafficmanager==0.51.0 azure-mgmt-web==0.48.0 azure-multiapi-storage==0.5.2 azure-nspkg==3.0.2 azure-storage-common==1.4.2 azure-synapse-accesscontrol==0.2.0 azure-synapse-artifacts==0.3.0 azure-synapse-spark==0.2.0 bcrypt==4.2.1 bleach==6.0.0 certifi @ file:///croot/certifi_1671487769961/work/certifi cffi==1.15.1 charset-normalizer==3.4.1 colorama==0.4.6 ConfigArgParse==1.7 coverage==7.2.7 cryptography==2.9.2 docutils==0.20.1 exceptiongroup==1.2.2 fabric==2.7.1 flake8==3.5.0 humanfriendly==8.2 idna==3.10 importlib-metadata==4.13.0 iniconfig==2.0.0 invoke==1.7.3 isodate==0.7.2 isort==5.11.5 javaproperties==0.5.1 Jinja2==3.1.6 jmespath==1.0.1 jsmin==2.2.2 jsondiff==1.2.0 knack==0.7.2 lazy-object-proxy==1.9.0 MarkupSafe==2.1.5 mccabe==0.6.1 mock==5.2.0 msal==1.0.0 msal-extensions==0.1.3 msrest==0.6.21 msrestazure==0.6.4.post1 multidict==6.0.5 nose==1.3.7 oauthlib==3.2.2 packaging==24.0 paramiko==2.12.0 pathlib2==2.3.7.post1 pkginfo==1.10.0 pluggy==1.2.0 portalocker==1.7.1 psutil==5.9.8 pycodestyle==2.3.1 pycparser==2.21 pyflakes==1.6.0 Pygments==2.17.2 PyJWT==1.7.1 pylint==2.0.0 PyNaCl==1.5.0 pyOpenSSL==19.1.0 pytest==7.4.4 python-dateutil==2.9.0.post0 pytz==2019.1 PyYAML==5.4.1 readme-renderer==37.3 requests==2.31.0 requests-oauthlib==2.0.0 scp==0.13.6 six==1.17.0 sshtunnel==0.1.5 tabulate==0.9.0 tomli==2.0.1 typed-ast==1.5.5 typing_extensions==4.7.1 urllib3==1.26.20 urllib3-secure-extra==0.1.0 vcrpy==4.4.0 vsts==0.1.25 vsts-cd-manager==1.0.2 webencodings==0.5.1 websocket-client==0.56.0 wrapt==1.16.0 xmltodict==0.14.2 yarl==1.9.4 zipp==3.15.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2022.12.7=py37h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=22.3.1=py37h06a4308_0 - python=3.7.16=h7a1cb2a_0 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.38.4=py37h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - antlr4-python3-runtime==4.7.2 - applicationinsights==0.11.10 - argcomplete==1.12.3 - astroid==2.15.8 - azure-appconfiguration==1.1.1 - azure-batch==9.0.0 - azure-common==1.1.28 - azure-core==1.30.1 - azure-cosmos==3.2.0 - azure-datalake-store==0.0.52 - azure-devtools==1.2.0 - azure-functions-devops-build==0.0.22 - azure-graphrbac==0.60.0 - azure-keyvault==1.1.0 - azure-keyvault-administration==4.0.0 - azure-loganalytics==0.1.1 - azure-mgmt-advisor==2.0.1 - azure-mgmt-apimanagement==0.2.0 - azure-mgmt-appconfiguration==0.6.0 - azure-mgmt-applicationinsights==0.1.1 - azure-mgmt-authorization==0.61.0 - azure-mgmt-batch==9.0.0 - azure-mgmt-batchai==2.0.0 - azure-mgmt-billing==1.0.0 - azure-mgmt-botservice==0.2.0 - azure-mgmt-cdn==5.0.0 - azure-mgmt-cognitiveservices==6.3.0 - azure-mgmt-compute==14.0.0 - azure-mgmt-consumption==2.0.0 - azure-mgmt-containerinstance==1.5.0 - azure-mgmt-containerregistry==3.0.0rc15 - azure-mgmt-containerservice==9.4.0 - azure-mgmt-core==1.2.0 - azure-mgmt-cosmosdb==1.0.0 - azure-mgmt-datalake-analytics==0.2.1 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.5.0 - azure-mgmt-datamigration==0.1.0 - azure-mgmt-deploymentmanager==0.2.0 - azure-mgmt-devtestlabs==4.0.0 - azure-mgmt-dns==2.1.0 - azure-mgmt-eventgrid==3.0.0rc7 - azure-mgmt-eventhub==4.1.0 - azure-mgmt-hdinsight==1.7.0 - azure-mgmt-imagebuilder==0.4.0 - azure-mgmt-iotcentral==3.0.0 - azure-mgmt-iothub==0.12.0 - azure-mgmt-iothubprovisioningservices==0.2.0 - azure-mgmt-keyvault==7.0.0b3 - azure-mgmt-kusto==0.3.0 - azure-mgmt-loganalytics==0.7.0 - azure-mgmt-managedservices==1.0.0 - azure-mgmt-managementgroups==0.2.0 - azure-mgmt-maps==0.1.0 - azure-mgmt-marketplaceordering==0.2.1 - azure-mgmt-media==2.2.0 - azure-mgmt-monitor==0.11.0 - azure-mgmt-msi==0.2.0 - azure-mgmt-netapp==0.12.0 - azure-mgmt-network==12.0.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-policyinsights==0.5.0 - azure-mgmt-privatedns==0.1.0 - azure-mgmt-rdbms==3.1.0rc1 - azure-mgmt-recoveryservices==0.4.0 - azure-mgmt-recoveryservicesbackup==0.6.0 - azure-mgmt-redhatopenshift==0.1.0 - azure-mgmt-redis==7.0.0 - azure-mgmt-relay==0.1.0 - azure-mgmt-reservations==0.6.0 - azure-mgmt-resource==10.2.0 - azure-mgmt-search==2.1.0 - azure-mgmt-security==0.4.1 - azure-mgmt-servicebus==0.6.0 - azure-mgmt-servicefabric==0.5.0 - azure-mgmt-signalr==0.4.0 - azure-mgmt-sql==0.21.0 - azure-mgmt-sqlvirtualmachine==0.5.0 - azure-mgmt-storage==11.2.0 - azure-mgmt-synapse==0.3.0 - azure-mgmt-trafficmanager==0.51.0 - azure-mgmt-web==0.48.0 - azure-multiapi-storage==0.5.2 - azure-nspkg==3.0.2 - azure-storage-common==1.4.2 - azure-synapse-accesscontrol==0.2.0 - azure-synapse-artifacts==0.3.0 - azure-synapse-spark==0.2.0 - bcrypt==4.2.1 - bleach==6.0.0 - cffi==1.15.1 - charset-normalizer==3.4.1 - colorama==0.4.6 - configargparse==1.7 - coverage==7.2.7 - cryptography==2.9.2 - docutils==0.20.1 - exceptiongroup==1.2.2 - fabric==2.7.1 - flake8==3.5.0 - humanfriendly==8.2 - idna==3.10 - importlib-metadata==4.13.0 - iniconfig==2.0.0 - invoke==1.7.3 - isodate==0.7.2 - isort==5.11.5 - javaproperties==0.5.1 - jinja2==3.1.6 - jmespath==1.0.1 - jsmin==2.2.2 - jsondiff==1.2.0 - knack==0.7.2 - lazy-object-proxy==1.9.0 - markupsafe==2.1.5 - mccabe==0.6.1 - mock==5.2.0 - msal==1.0.0 - msal-extensions==0.1.3 - msrest==0.6.21 - msrestazure==0.6.4.post1 - multidict==6.0.5 - nose==1.3.7 - oauthlib==3.2.2 - packaging==24.0 - paramiko==2.12.0 - pathlib2==2.3.7.post1 - pkginfo==1.10.0 - pluggy==1.2.0 - portalocker==1.7.1 - psutil==5.9.8 - pycodestyle==2.3.1 - pycparser==2.21 - pyflakes==1.6.0 - pygments==2.17.2 - pyjwt==1.7.1 - pylint==2.0.0 - pynacl==1.5.0 - pyopenssl==19.1.0 - pytest==7.4.4 - python-dateutil==2.9.0.post0 - pytz==2019.1 - pyyaml==5.4.1 - readme-renderer==37.3 - requests==2.31.0 - requests-oauthlib==2.0.0 - scp==0.13.6 - setuptools==40.0.0 - six==1.17.0 - sshtunnel==0.1.5 - tabulate==0.9.0 - tomli==2.0.1 - typed-ast==1.5.5 - typing-extensions==4.7.1 - urllib3==1.26.20 - urllib3-secure-extra==0.1.0 - vcrpy==4.4.0 - vsts==0.1.25 - vsts-cd-manager==1.0.2 - webencodings==0.5.1 - websocket-client==0.56.0 - wrapt==1.16.0 - xmltodict==0.14.2 - yarl==1.9.4 - zipp==3.15.0 prefix: /opt/conda/envs/azure-cli
[ "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestUtils::test_resource_to_scopes", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestUtils::test_scopes_to_resource" ]
[]
[ "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestUtils::test_can_launch_browser", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestUtils::test_configured_default_setter", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestUtils::test_get_az_user_agent", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestUtils::test_hash_string", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestUtils::test_load_json_from_file", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestUtils::test_open_page_in_browser", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestUtils::test_proxy_resource_parse", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestUtils::test_send_raw_requests", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestUtils::test_shell_safe_json_parse", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestUtils::test_truncate_text", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestUtils::test_truncate_text_negative_width", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestUtils::test_truncate_text_not_needed", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestUtils::test_truncate_text_zero_width", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestBase64ToHex::test_b64_to_hex", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestBase64ToHex::test_b64_to_hex_type", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestHandleException::test_handle_exception_clierror", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestHandleException::test_handle_exception_clouderror", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestHandleException::test_handle_exception_httpoperationerror_error_key_has_string_value", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestHandleException::test_handle_exception_httpoperationerror_no_error_key", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestHandleException::test_handle_exception_httpoperationerror_no_response_text", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestHandleException::test_handle_exception_httpoperationerror_typical_response_error", "src/azure-cli-core/azure/cli/core/tests/test_util.py::TestHandleException::test_handle_exception_keyboardinterrupt" ]
[]
MIT License
null
Azure__azure-cli-1876
62dab24154f910ff7f3ef2b6b3783945b58e9098
2017-01-26 00:16:00
1576ec67f5029db062579da230902a559acbb9fe
diff --git a/src/azure-cli-core/azure/cli/core/_util.py b/src/azure-cli-core/azure/cli/core/_util.py index c194599bc..379152887 100644 --- a/src/azure-cli-core/azure/cli/core/_util.py +++ b/src/azure-cli-core/azure/cli/core/_util.py @@ -94,21 +94,27 @@ def get_json_object(json_string): def get_file_json(file_path, throw_on_empty=True): + content = read_file_content(file_path) + if not content and not throw_on_empty: + return None + return json.loads(content) + + +def read_file_content(file_path, allow_binary=False): from codecs import open as codecs_open - # always try 'utf-8-sig' first, so that BOM in WinOS won't cause trouble. - for encoding in ('utf-8-sig', 'utf-8', 'utf-16', 'utf-16le', 'utf-16be'): + # Note, always put 'utf-8-sig' first, so that BOM in WinOS won't cause trouble. + for encoding in ['utf-8-sig', 'utf-8', 'utf-16', 'utf-16le', 'utf-16be']: try: with codecs_open(file_path, encoding=encoding) as f: - text = f.read() - - if not text and not throw_on_empty: - return None - - return json.loads(text) + return f.read() + except UnicodeDecodeError: + if allow_binary: + with open(file_path, 'rb') as input_file: + return input_file.read() + else: + raise except UnicodeError: pass - except Exception as ex: - raise CLIError("File '{}' contains error: {}".format(file_path, str(ex))) raise CLIError('Failed to decode file {} - unknown decoding'.format(file_path)) diff --git a/src/azure-cli-core/azure/cli/core/application.py b/src/azure-cli-core/azure/cli/core/application.py index e651a2c8a..72b282d16 100644 --- a/src/azure-cli-core/azure/cli/core/application.py +++ b/src/azure-cli-core/azure/cli/core/application.py @@ -13,7 +13,7 @@ from azure.cli.core._output import CommandResultItem import azure.cli.core.extensions import azure.cli.core._help as _help import azure.cli.core.azlogging as azlogging -from azure.cli.core._util import todict, truncate_text, CLIError +from azure.cli.core._util import todict, truncate_text, CLIError, read_file_content from azure.cli.core._config import az_config import azure.cli.core.telemetry as telemetry @@ -237,19 +237,13 @@ class Application(object): @staticmethod def _load_file(path): - try: - if path == '-': - content = sys.stdin.read() - else: - try: - with open(os.path.expanduser(path), 'r') as input_file: - content = input_file.read() - except UnicodeDecodeError: - with open(os.path.expanduser(path), 'rb') as input_file: - content = input_file.read() - return content[0:-1] if content[-1] == '\n' else content - except: - raise CLIError('Failed to open file {}'.format(path)) + if path == '-': + content = sys.stdin.read() + else: + content = read_file_content(os.path.expanduser(path), + allow_binary=True) + + return content[0:-1] if content and content[-1] == '\n' else content def _handle_builtin_arguments(self, **kwargs): args = kwargs['args']
"@file support": should handle the BOM on file loading Otherwise, using `@<parameter-file>` will return an invalid json string for the command to use. Since json file is the main file type, so the core layer should handle it. CLI already have [the logic](https://github.com/Azure/azure-cli/blob/master/src/azure-cli-core/azure/cli/core/_util.py#L91) to handle BOM, so we just need to incorporate the same mechanism to [here](https://github.com/Azure/azure-cli/blob/master/src/azure-cli-core/azure/cli/core/application.py#L244)
Azure/azure-cli
diff --git a/src/azure-cli-core/azure/cli/core/tests/test_application.py b/src/azure-cli-core/azure/cli/core/tests/test_application.py index 42f09f10f..2142b0515 100644 --- a/src/azure-cli-core/azure/cli/core/tests/test_application.py +++ b/src/azure-cli-core/azure/cli/core/tests/test_application.py @@ -87,13 +87,21 @@ class TestApplication(unittest.TestCase): f = tempfile.NamedTemporaryFile(delete=False) f.close() + f_with_bom = tempfile.NamedTemporaryFile(delete=False) + f_with_bom.close() + with open(f.name, 'w+') as stream: stream.write('foo') + from codecs import open as codecs_open + with codecs_open(f_with_bom.name, encoding='utf-8-sig', mode='w+') as stream: + stream.write('foo') + cases = [ [['bar=baz'], ['bar=baz']], [['bar', 'baz'], ['bar', 'baz']], [['bar=@{}'.format(f.name)], ['bar=foo']], + [['bar=@{}'.format(f_with_bom.name)], ['bar=foo']], [['bar', '@{}'.format(f.name)], ['bar', 'foo']], [['bar', f.name], ['bar', f.name]], [['bar=name@company.com'], ['bar=name@company.com']],
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 2, "test_score": 0 }, "num_modified_files": 2 }
0.1
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==1.1.0 -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_context&subdirectory=src/command_modules/azure-cli-context -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@62dab24154f910ff7f3ef2b6b3783945b58e9098#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-core==1.24.2 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==2.0.0 azure-mgmt-compute==0.32.1 azure-mgmt-containerregistry==0.1.1 azure-mgmt-dns==0.30.0rc6 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-network==0.30.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-sql==0.2.0 azure-mgmt-storage==0.31.0 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.30.1 azure-nspkg==3.0.2 azure-storage==0.33.0 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.1.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.27.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 wrapt==1.16.0 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==1.1.0 - azure-common==1.1.4 - azure-core==1.24.2 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==2.0.0 - azure-mgmt-compute==0.32.1 - azure-mgmt-containerregistry==0.1.1 - azure-mgmt-dns==0.30.0rc6 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-network==0.30.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-sql==0.2.0 - azure-mgmt-storage==0.31.0 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.30.1 - azure-nspkg==3.0.2 - azure-storage==0.33.0 - cffi==1.15.1 - charset-normalizer==2.0.12 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.1.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.27.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - wrapt==1.16.0 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/azure-cli-core/azure/cli/core/tests/test_application.py::TestApplication::test_expand_file_prefixed_files" ]
[]
[ "src/azure-cli-core/azure/cli/core/tests/test_application.py::TestApplication::test_application_register_and_call_handlers", "src/azure-cli-core/azure/cli/core/tests/test_application.py::TestApplication::test_list_value_parameter" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_azure-cli-1876
Azure__azure-cli-2053
27816f4891c85592ad6f06bcc94008fa7d144b69
2017-02-13 16:48:43
1576ec67f5029db062579da230902a559acbb9fe
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py index 8f73d9966..540d6aab1 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py @@ -235,22 +235,22 @@ helps['vm'] = """ type: group short-summary: Provision Linux and Windows virtual machines in minutes """ -helps['vm access'] = """ +helps['vm user'] = """ type: group - short-summary: Manage user access + short-summary: Manage users """ -helps['vm access delete-linux-user'] = """ +helps['vm user delete'] = """ type: command long-summary: > Delete a user account without logging into to the VM directly. examples: - name: Delete User - text: az vm access delete-linux-user -u username -n vm-name -r group_name + text: az vm user delete -u username -n vm-name -r group_name {0} -""".format(vm_ids_example.format('Delete User by VM Ids', 'az vm access delete-linux-user -u username')) +""".format(vm_ids_example.format('Delete User by VM Ids', 'az vm user delete -u username')) -helps['vm access reset-linux-ssh'] = """ +helps['vm user reset-ssh'] = """ type: command short-summary: Reset the SSH configuration. long-summary: > @@ -258,29 +258,21 @@ helps['vm access reset-linux-ssh'] = """ default values. The user account (name, password or SSH keys) will not be changed. examples: - name: Reset SSH - text: az vm access reset-linux-ssh -n vm-name -r group_name + text: az vm user reset-ssh -n vm-name -r group_name {0} -""".format(vm_ids_example.format('Reset SSH by VM Ids', 'vm access reset-linux-ssh')) +""".format(vm_ids_example.format('Reset SSH by VM Ids', 'vm user reset-ssh')) -helps['vm access set-linux-user'] = """ +helps['vm user update'] = """ type: command long-summary: Note, the user will have an admin's privilege. - examples: - - name: Set Linux User Access - text: az vm access set-linux-user -u username --ssh-key-value "$(< ~/.ssh/id_rsa.pub)" -n vm-name -r group_name -{0} -""".format(vm_ids_example.format('Set Linux User Access by VM Ids', 'vm access set-linux-user -u username ' - '--ssh-key-value "$(< ~/.ssh/id_rsa.pub)"')) - -helps['vm access reset-windows-admin'] = """ - type: command - long-summary: Note, this resets the admin's credentials. You can't add a new admin. examples: - name: Reset Windows Admin - text: az vm access reset-windows-admin -u username -p password -n vm-name -g resource_group_name + text: az vm user update -u username -p password -n vm-name -g resource_group_name + - name: Set Linux User + text: az vm user update -u username --ssh-key-value "$(< ~/.ssh/id_rsa.pub)" -n vm-name -r group_name {0} -""".format(vm_ids_example.format('Reset Windows Admin by VM Ids', 'vm access reset-windows-admin -u username -p ' - 'password')) +""".format(vm_ids_example.format('Set Linux User by VM Ids', 'vm user update -u username ' + '--ssh-key-value "$(< ~/.ssh/id_rsa.pub)"')) helps['vm availability-set'] = """ type: group diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_params.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_params.py index 37b56abbb..7644fde22 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_params.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_params.py @@ -80,8 +80,8 @@ register_cli_argument('vm availability-set create', 'availability_set_name', nam register_cli_argument('vm availability-set create', 'unmanaged', action='store_true', help='contained VMs should use unmanaged disks') register_cli_argument('vm availability-set create', 'validate', help='Generate and validate the ARM template without creating any resources.', action='store_true') -register_cli_argument('vm access', 'username', options_list=('--username', '-u'), help='The user name') -register_cli_argument('vm access', 'password', options_list=('--password', '-p'), help='The user password') +register_cli_argument('vm user', 'username', options_list=('--username', '-u'), help='The user name') +register_cli_argument('vm user', 'password', options_list=('--password', '-p'), help='The user password') register_cli_argument('acs', 'name', arg_type=name_arg_type) register_cli_argument('acs', 'orchestrator_type', **enum_choice_list(ContainerServiceOchestratorTypes)) diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/commands.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/commands.py index b29b3cc8a..8e555ca23 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/commands.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/commands.py @@ -121,10 +121,9 @@ cli_command(__name__, 'vmss nic list-vm-nics', 'azure.mgmt.network.operations.ne cli_command(__name__, 'vmss nic show', 'azure.mgmt.network.operations.network_interfaces_operations#NetworkInterfacesOperations.get_virtual_machine_scale_set_network_interface', cf_ni) # VM Access -cli_command(__name__, 'vm access set-linux-user', custom_path.format('set_linux_user')) -cli_command(__name__, 'vm access delete-linux-user', custom_path.format('delete_linux_user')) -cli_command(__name__, 'vm access reset-linux-ssh', custom_path.format('reset_linux_ssh')) -cli_command(__name__, 'vm access reset-windows-admin', custom_path.format('reset_windows_admin')) +cli_command(__name__, 'vm user update', custom_path.format('set_user')) +cli_command(__name__, 'vm user delete', custom_path.format('delete_user')) +cli_command(__name__, 'vm user reset-ssh', custom_path.format('reset_linux_ssh')) # # VM Availability Set cli_command(__name__, 'vm availability-set create', custom_path.format('create_av_set'), transform=transform_av_set_output) diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py index a61084931..75f5c79e8 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py @@ -598,41 +598,51 @@ def capture_vm(resource_group_name, vm_name, vhd_name_prefix, print(json.dumps(result.output, indent=2)) # pylint: disable=no-member -def reset_windows_admin( - resource_group_name, vm_name, username, password): - '''Update the password. - You can only change the password. Adding a new user is not supported. +def set_user(resource_group_name, vm_name, username, password=None, ssh_key_value=None): + '''Update or Add(only on Linux VM) users + :param username: user name + :param password: user password. + :param ssh_key_value: SSH public key file value or public key file path ''' vm = get_vm(resource_group_name, vm_name, 'instanceView') + if _is_linx_vm(vm): + return _set_linux_user(resource_group_name, vm_name, username, password, ssh_key_value) + else: + if ssh_key_value: + raise CLIError('SSH key is not appliable on a Windows VM') + return _reset_windows_admin(resource_group_name, vm, username, password) - client = _compute_client_factory() - from azure.mgmt.compute.models import VirtualMachineExtension +def delete_user( + resource_group_name, vm_name, username): + '''Remove a user(not supported on Windows VM) + :param username: user name + ''' + vm = get_vm(resource_group_name, vm_name, 'instanceView') + if not _is_linx_vm(vm): + raise CLIError('Deleting a user is not supported on Windows VM') + poller = _update_linux_access_extension(resource_group_name, vm_name, + {'remove_user': username}) + return ExtensionUpdateLongRunningOperation('deleting user', 'done')(poller) - extension_name = _WINDOWS_ACCESS_EXT - publisher, version, auto_upgrade = _get_access_extension_upgrade_info( - vm.resources, extension_name) - ext = VirtualMachineExtension(vm.location, # pylint: disable=no-member - publisher=publisher, - virtual_machine_extension_type=extension_name, - protected_settings={'Password': password}, - type_handler_version=version, - settings={'UserName': username}, - auto_upgrade_minor_version=auto_upgrade) +def reset_linux_ssh(resource_group_name, vm_name): + '''Reset the SSH configuration In Linux VM''' + vm = get_vm(resource_group_name, vm_name, 'instanceView') + if not _is_linx_vm(vm): + raise CLIError('Resetting SSH is not supported in Windows VM') + poller = _update_linux_access_extension(resource_group_name, vm_name, + {'reset_ssh': True}) + return ExtensionUpdateLongRunningOperation('resetting SSH', 'done')(poller) - poller = client.virtual_machine_extensions.create_or_update(resource_group_name, vm_name, - _ACCESS_EXT_HANDLER_NAME, ext) - return ExtensionUpdateLongRunningOperation('resetting admin', 'done')(poller) +def _is_linx_vm(vm): + os_type = vm.storage_profile.os_disk.os_type.value + return os_type.lower() == 'linux' -def set_linux_user( + +def _set_linux_user( resource_group_name, vm_name, username, password=None, ssh_key_value=None): - '''create or update a user credential - :param username: user name - :param password: user password. - :param ssh_key_value: SSH key file value or key file path - ''' protected_settings = {} protected_settings['username'] = username if password: @@ -648,19 +658,30 @@ def set_linux_user( return ExtensionUpdateLongRunningOperation('setting user', 'done')(poller) -def delete_linux_user( - resource_group_name, vm_name, username): - '''Remove the user ''' - poller = _update_linux_access_extension(resource_group_name, vm_name, - {'remove_user': username}) - return ExtensionUpdateLongRunningOperation('deleting user', 'done')(poller) +def _reset_windows_admin( + resource_group_name, vm, username, password): + '''Update the password. + You can only change the password. Adding a new user is not supported. + ''' + client = _compute_client_factory() + from azure.mgmt.compute.models import VirtualMachineExtension -def reset_linux_ssh(resource_group_name, vm_name): - '''Reset the SSH configuration''' - poller = _update_linux_access_extension(resource_group_name, vm_name, - {'reset_ssh': True}) - return ExtensionUpdateLongRunningOperation('resetting SSH', 'done')(poller) + extension_name = _WINDOWS_ACCESS_EXT + publisher, version, auto_upgrade = _get_access_extension_upgrade_info( + vm.resources, extension_name) + + ext = VirtualMachineExtension(vm.location, # pylint: disable=no-member + publisher=publisher, + virtual_machine_extension_type=extension_name, + protected_settings={'Password': password}, + type_handler_version=version, + settings={'UserName': username}, + auto_upgrade_minor_version=auto_upgrade) + + poller = client.virtual_machine_extensions.create_or_update(resource_group_name, vm.name, + _ACCESS_EXT_HANDLER_NAME, ext) + return ExtensionUpdateLongRunningOperation('resetting admin', 'done')(poller) def _update_linux_access_extension(resource_group_name, vm_name, protected_settings):
VM Access: command renaming This is polishing like change regarding 4 existing commands under `vm access`, including `delete-linux-user`, `reset-linux-ssh`, `reset-windows-admin`, `set-linux-user`. The naming oddness reflects the service function difference between windows and linux vm, particularly on windows vm, you will not be able to add/rename/delete users, even though the API invoke always succeeds but nothing really happens at vm side The change details are: 1. Rename category `vm access` to `vm user` 2. Collapse into 3 commands `delete`: delete a user from linux vm `update`: for windows vm, you can only update the admin password, for linux vm, you can add, or change both username and password, also you can upload public ssh key `reset-ssh`: reset linux vm’s SSH configurations
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/recordings/test_vm_create_state_modifications.yaml b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/recordings/test_vm_create_state_modifications.yaml index 4d2a3c12b..02382f28f 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/recordings/test_vm_create_state_modifications.yaml +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/recordings/test_vm_create_state_modifications.yaml @@ -6,10 +6,10 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [5e5c8ed8-e757-11e6-a5f3-64510658e3b3] + x-ms-client-request-id: [37d14674-f0e6-11e6-8bdc-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines?api-version=2016-04-30-preview response: @@ -17,7 +17,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:48:31 GMT'] + Date: ['Sun, 12 Feb 2017 05:43:45 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -31,20 +31,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [5e9a4be6-e757-11e6-9eef-64510658e3b3] + x-ms-client-request-id: [385d70c8-f0e6-11e6-8a3d-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage?api-version=2016-09-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage","namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["East + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage","namespace":"Microsoft.Storage","authorization":{"applicationId":"a6aa9161-5291-40bb-8c5c-923b567bee3b","roleDefinitionId":"070ab87f-0efc-4423-b18b-756f3bdb0236"},"resourceTypes":[{"resourceType":"storageAccounts","locations":["East US","East US 2","East US 2 (Stage)","West US","West Europe","East Asia","Southeast Asia","Japan East","Japan West","North Central US","South Central US","Central US","North Europe","Brazil South","Australia East","Australia Southeast","South India","Central India","West India","Canada East","Canada Central","West US 2","West Central US","UK South","UK West"],"apiVersions":["2016-12-01","2016-05-01","2016-01-01","2015-06-15","2015-05-01-preview"],"capabilities":"CrossResourceGroupResourceMove, - CrossSubscriptionResourceMove"},{"resourceType":"operations","locations":[],"apiVersions":["2016-12-01","2016-05-01","2016-01-01","2015-06-15","2015-05-01-preview"]},{"resourceType":"storageAccounts/listAccountSas","locations":[],"apiVersions":["2016-12-01","2016-05-01"]},{"resourceType":"usages","locations":[],"apiVersions":["2016-12-01","2016-05-01","2016-01-01","2015-06-15","2015-05-01-preview"]},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2016-12-01","2016-05-01","2016-01-01","2015-06-15","2015-05-01-preview"]},{"resourceType":"storageAccounts/services","locations":["East + CrossSubscriptionResourceMove"},{"resourceType":"operations","locations":[],"apiVersions":["2016-12-01","2016-05-01","2016-01-01","2015-06-15","2015-05-01-preview"]},{"resourceType":"storageAccounts/listAccountSas","locations":[],"apiVersions":["2016-12-01","2016-05-01"]},{"resourceType":"storageAccounts/listServiceSas","locations":[],"apiVersions":["2016-12-01","2016-05-01"]},{"resourceType":"locations","locations":[],"apiVersions":["2016-12-01","2016-07-01"]},{"resourceType":"locations/deleteVirtualNetworkOrSubnets","locations":[],"apiVersions":["2016-12-01","2016-07-01"]},{"resourceType":"usages","locations":[],"apiVersions":["2016-12-01","2016-05-01","2016-01-01","2015-06-15","2015-05-01-preview"]},{"resourceType":"checkNameAvailability","locations":[],"apiVersions":["2016-12-01","2016-05-01","2016-01-01","2015-06-15","2015-05-01-preview"]},{"resourceType":"storageAccounts/services","locations":["East US","West US","East US 2 (Stage)","West Europe","North Europe","East Asia","Southeast Asia","Japan East","Japan West","North Central US","South Central US","East US 2","Central US","Australia East","Australia Southeast","Brazil South","South @@ -58,12 +58,12 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:48:31 GMT'] + Date: ['Sun, 12 Feb 2017 05:43:45 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] - content-length: ['2194'] + content-length: ['2634'] status: {code: 200, message: OK} - request: body: null @@ -72,20 +72,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [5ea9dd2c-e757-11e6-a7df-64510658e3b3] + x-ms-client-request-id: [387e5538-f0e6-11e6-9cad-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Storage/storageAccounts/ab394fvkdj34?api-version=2016-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Storage/storageAccounts/ab394fvkdj39?api-version=2016-12-01 response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.Storage/storageAccounts/ab394fvkdj34'' + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.Storage/storageAccounts/ab394fvkdj39'' under resource group ''cli_test_vm_state_mod'' was not found."}}'} headers: Cache-Control: [no-cache] Content-Length: ['177'] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:48:32 GMT'] + Date: ['Sun, 12 Feb 2017 05:43:46 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -98,10 +98,10 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [5f1491da-e757-11e6-a87a-64510658e3b3] + x-ms-client-request-id: [38b37392-f0e6-11e6-9f60-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network?api-version=2016-09-01 response: @@ -185,7 +185,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:48:31 GMT'] + Date: ['Sun, 12 Feb 2017 05:43:46 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -199,10 +199,10 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [5f32b194-e757-11e6-99f3-64510658e3b3] + x-ms-client-request-id: [38e22bf0-f0e6-11e6-bfcf-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg?api-version=2016-12-01 response: @@ -212,7 +212,7 @@ interactions: Cache-Control: [no-cache] Content-Length: ['176'] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:48:32 GMT'] + Date: ['Sun, 12 Feb 2017 05:43:46 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -225,10 +225,10 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [5f9976a2-e757-11e6-ac06-64510658e3b3] + x-ms-client-request-id: [391554ba-f0e6-11e6-ae69-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network?api-version=2016-09-01 response: @@ -312,7 +312,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:48:32 GMT'] + Date: ['Sun, 12 Feb 2017 05:43:46 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -326,10 +326,10 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [5fb66012-e757-11e6-888a-64510658e3b3] + x-ms-client-request-id: [393a4ba6-f0e6-11e6-9255-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Network/publicIPAddresses/mypubip?api-version=2016-12-01 response: @@ -339,70 +339,69 @@ interactions: Cache-Control: [no-cache] Content-Length: ['174'] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:48:33 GMT'] + Date: ['Sun, 12 Feb 2017 05:43:46 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] x-ms-failure-cause: [gateway] status: {code: 404, message: Not Found} - request: - body: '{"properties": {"parameters": {}, "mode": "Incremental", "template": {"parameters": - {}, "resources": [{"apiVersion": "2015-06-15", "tags": {"secondtag": "2", "firsttag": - "1", "thirdtag": ""}, "location": "eastus", "name": "ab394fvkdj34", "properties": - {"accountType": "Standard_LRS"}, "type": "Microsoft.Storage/storageAccounts", - "dependsOn": []}, {"apiVersion": "2015-06-15", "tags": {"secondtag": "2", "firsttag": - "1", "thirdtag": ""}, "location": "eastus", "name": "myvnet", "properties": - {"subnets": [{"name": "vm-state-modSubnet", "properties": {"addressPrefix": - "10.0.0.0/24"}}], "addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}}, "type": - "Microsoft.Network/virtualNetworks", "dependsOn": []}, {"apiVersion": "2015-06-15", - "tags": {"secondtag": "2", "firsttag": "1", "thirdtag": ""}, "location": "eastus", - "name": "mynsg", "properties": {"securityRules": [{"name": "default-allow-ssh", - "properties": {"sourcePortRange": "*", "direction": "Inbound", "protocol": "Tcp", - "destinationAddressPrefix": "*", "sourceAddressPrefix": "*", "priority": 1000, - "access": "Allow", "destinationPortRange": "22"}}]}, "type": "Microsoft.Network/networkSecurityGroups", - "dependsOn": []}, {"apiVersion": "2015-06-15", "tags": {"secondtag": "2", "firsttag": - "1", "thirdtag": ""}, "location": "eastus", "name": "mypubip", "properties": - {"publicIPAllocationMethod": "dynamic"}, "type": "Microsoft.Network/publicIPAddresses", - "dependsOn": []}, {"apiVersion": "2015-06-15", "tags": {"secondtag": "2", "firsttag": - "1", "thirdtag": ""}, "location": "eastus", "name": "vm-state-modVMNic", "properties": - {"networkSecurityGroup": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg"}, - "ipConfigurations": [{"name": "ipconfigvm-state-mod", "properties": {"subnet": - {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/vm-state-modSubnet"}, - "privateIPAllocationMethod": "Dynamic", "publicIPAddress": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/publicIPAddresses/mypubip"}}}]}, - "type": "Microsoft.Network/networkInterfaces", "dependsOn": ["Microsoft.Network/virtualNetworks/myvnet", - "Microsoft.Network/networkSecurityGroups/mynsg", "Microsoft.Network/publicIpAddresses/mypubip"]}, - {"apiVersion": "2016-04-30-preview", "tags": {"secondtag": "2", "firsttag": - "1", "thirdtag": ""}, "location": "eastus", "name": "vm-state-mod", "properties": - {"storageProfile": {"imageReference": {"sku": "14.04.4-LTS", "version": "latest", - "offer": "UbuntuServer", "publisher": "Canonical"}, "osDisk": {"createOption": - "fromImage", "name": "osdisk_67DTRZjyk0", "vhd": {"uri": "https://ab394fvkdj34.blob.core.windows.net/vhds/osdisk_67DTRZjyk0.vhd"}, - "caching": "ReadWrite"}}, "osProfile": {"adminUsername": "ubuntu", "computerName": - "vm-state-mod", "adminPassword": "testPassword0"}, "networkProfile": {"networkInterfaces": - [{"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic"}]}, - "hardwareProfile": {"vmSize": "Standard_DS1"}}, "type": "Microsoft.Compute/virtualMachines", - "dependsOn": ["Microsoft.Storage/storageAccounts/ab394fvkdj34", "Microsoft.Network/networkInterfaces/vm-state-modVMNic"]}], - "variables": {}, "contentVersion": "1.0.0.0", "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "outputs": {}}}}' + body: '{"properties": {"mode": "Incremental", "parameters": {}, "template": {"resources": + [{"location": "eastus", "dependsOn": [], "tags": {"firsttag": "1", "thirdtag": + "", "secondtag": "2"}, "properties": {"accountType": "Standard_LRS"}, "apiVersion": + "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "name": "ab394fvkdj39"}, + {"location": "eastus", "dependsOn": [], "tags": {"firsttag": "1", "thirdtag": + "", "secondtag": "2"}, "properties": {"subnets": [{"properties": {"addressPrefix": + "10.0.0.0/24"}, "name": "vm-state-modSubnet"}], "addressSpace": {"addressPrefixes": + ["10.0.0.0/16"]}}, "apiVersion": "2015-06-15", "type": "Microsoft.Network/virtualNetworks", + "name": "myvnet"}, {"location": "eastus", "dependsOn": [], "tags": {"firsttag": + "1", "thirdtag": "", "secondtag": "2"}, "properties": {"securityRules": [{"properties": + {"destinationPortRange": "22", "sourcePortRange": "*", "direction": "Inbound", + "priority": 1000, "protocol": "Tcp", "sourceAddressPrefix": "*", "access": "Allow", + "destinationAddressPrefix": "*"}, "name": "default-allow-ssh"}]}, "apiVersion": + "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups", "name": "mynsg"}, + {"location": "eastus", "dependsOn": [], "tags": {"firsttag": "1", "thirdtag": + "", "secondtag": "2"}, "properties": {"publicIPAllocationMethod": "dynamic"}, + "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": + "mypubip"}, {"location": "eastus", "dependsOn": ["Microsoft.Network/virtualNetworks/myvnet", + "Microsoft.Network/networkSecurityGroups/mynsg", "Microsoft.Network/publicIpAddresses/mypubip"], + "tags": {"firsttag": "1", "thirdtag": "", "secondtag": "2"}, "properties": {"ipConfigurations": + [{"properties": {"publicIPAddress": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/publicIPAddresses/mypubip"}, + "privateIPAllocationMethod": "Dynamic", "subnet": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/vm-state-modSubnet"}}, + "name": "ipconfigvm-state-mod"}], "networkSecurityGroup": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg"}}, + "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", "name": + "vm-state-modVMNic"}, {"location": "eastus", "dependsOn": ["Microsoft.Storage/storageAccounts/ab394fvkdj39", + "Microsoft.Network/networkInterfaces/vm-state-modVMNic"], "tags": {"firsttag": + "1", "thirdtag": "", "secondtag": "2"}, "properties": {"storageProfile": {"imageReference": + {"offer": "UbuntuServer", "sku": "14.04.4-LTS", "publisher": "Canonical", "version": + "latest"}, "osDisk": {"createOption": "fromImage", "caching": "ReadWrite", "name": + "osdisk_vJe7inxoHG", "vhd": {"uri": "https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd"}}}, + "osProfile": {"computerName": "vm-state-mod", "adminUsername": "ubuntu", "adminPassword": + "testPassword0"}, "networkProfile": {"networkInterfaces": [{"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic"}]}, + "hardwareProfile": {"vmSize": "Standard_DS1"}}, "apiVersion": "2016-04-30-preview", + "type": "Microsoft.Compute/virtualMachines", "name": "vm-state-mod"}], "outputs": + {}, "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "variables": {}, "parameters": {}}}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['3631'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [6009aff8-e757-11e6-9744-64510658e3b3] + x-ms-client-request-id: [3969e538-f0e6-11e6-835a-f4b7e2e85440] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/vm_deploy_xrHrrbhV41SEKZiOipzmvVPO1zMJozb3","name":"vm_deploy_xrHrrbhV41SEKZiOipzmvVPO1zMJozb3","properties":{"parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-01-31T01:48:36.2881495Z","duration":"PT1.3075055S","correlationId":"9d473581-4d54-4dc4-bc63-388b215b4a2f","providers":[{"namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["eastus"]}]},{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["eastus"]},{"resourceType":"networkSecurityGroups","locations":["eastus"]},{"resourceType":"publicIPAddresses","locations":["eastus"]},{"resourceType":"networkInterfaces","locations":["eastus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["eastus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/virtualNetworks/myvnet","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"myvnet"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"mynsg"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/publicIpAddresses/mypubip","resourceType":"Microsoft.Network/publicIpAddresses","resourceName":"mypubip"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm-state-modVMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Storage/storageAccounts/ab394fvkdj34","resourceType":"Microsoft.Storage/storageAccounts","resourceName":"ab394fvkdj34"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm-state-modVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm-state-mod"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/vm_deploy_GCPYqmrEK0QpIkC7H2aWP0QraNuR8nAg","name":"vm_deploy_GCPYqmrEK0QpIkC7H2aWP0QraNuR8nAg","properties":{"parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-02-12T05:43:49.9044643Z","duration":"PT1.3828799S","correlationId":"ca4d3d0f-20a3-4d6f-ac9c-d0a91fb15595","providers":[{"namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["eastus"]}]},{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["eastus"]},{"resourceType":"networkSecurityGroups","locations":["eastus"]},{"resourceType":"publicIPAddresses","locations":["eastus"]},{"resourceType":"networkInterfaces","locations":["eastus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["eastus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/virtualNetworks/myvnet","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"myvnet"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"mynsg"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/publicIpAddresses/mypubip","resourceType":"Microsoft.Network/publicIpAddresses","resourceName":"mypubip"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm-state-modVMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Storage/storageAccounts/ab394fvkdj39","resourceType":"Microsoft.Storage/storageAccounts","resourceName":"ab394fvkdj39"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm-state-modVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm-state-mod"}]}}'} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/vm_deploy_xrHrrbhV41SEKZiOipzmvVPO1zMJozb3/operationStatuses/08587157795704970241?api-version=2016-09-01'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/vm_deploy_GCPYqmrEK0QpIkC7H2aWP0QraNuR8nAg/operationStatuses/08587147286569560904?api-version=2016-09-01'] Cache-Control: [no-cache] Content-Length: ['2722'] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:48:36 GMT'] + Date: ['Sun, 12 Feb 2017 05:43:50 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -415,18 +414,18 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [6009aff8-e757-11e6-9744-64510658e3b3] + x-ms-client-request-id: [3969e538-f0e6-11e6-835a-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587157795704970241?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587147286569560904?api-version=2016-09-01 response: body: {string: '{"status":"Running"}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:49:06 GMT'] + Date: ['Sun, 12 Feb 2017 05:44:20 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -440,18 +439,18 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [6009aff8-e757-11e6-9744-64510658e3b3] + x-ms-client-request-id: [3969e538-f0e6-11e6-835a-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587157795704970241?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587147286569560904?api-version=2016-09-01 response: body: {string: '{"status":"Running"}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:49:36 GMT'] + Date: ['Sun, 12 Feb 2017 05:44:50 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -465,18 +464,18 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [6009aff8-e757-11e6-9744-64510658e3b3] + x-ms-client-request-id: [3969e538-f0e6-11e6-835a-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587157795704970241?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587147286569560904?api-version=2016-09-01 response: body: {string: '{"status":"Running"}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:50:08 GMT'] + Date: ['Sun, 12 Feb 2017 05:45:21 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -490,18 +489,43 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [6009aff8-e757-11e6-9744-64510658e3b3] + x-ms-client-request-id: [3969e538-f0e6-11e6-835a-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587157795704970241?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587147286569560904?api-version=2016-09-01 + response: + body: {string: '{"status":"Running"}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Sun, 12 Feb 2017 05:45:51 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['20'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [3969e538-f0e6-11e6-835a-f4b7e2e85440] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587147286569560904?api-version=2016-09-01 response: body: {string: '{"status":"Succeeded"}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:50:38 GMT'] + Date: ['Sun, 12 Feb 2017 05:46:22 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -515,23 +539,23 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [6009aff8-e757-11e6-9744-64510658e3b3] + x-ms-client-request-id: [3969e538-f0e6-11e6-835a-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/vm_deploy_xrHrrbhV41SEKZiOipzmvVPO1zMJozb3","name":"vm_deploy_xrHrrbhV41SEKZiOipzmvVPO1zMJozb3","properties":{"parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-01-31T01:50:25.2599028Z","duration":"PT1M50.2792588S","correlationId":"9d473581-4d54-4dc4-bc63-388b215b4a2f","providers":[{"namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["eastus"]}]},{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["eastus"]},{"resourceType":"networkSecurityGroups","locations":["eastus"]},{"resourceType":"publicIPAddresses","locations":["eastus"]},{"resourceType":"networkInterfaces","locations":["eastus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["eastus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/virtualNetworks/myvnet","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"myvnet"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"mynsg"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/publicIpAddresses/mypubip","resourceType":"Microsoft.Network/publicIpAddresses","resourceName":"mypubip"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm-state-modVMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Storage/storageAccounts/ab394fvkdj34","resourceType":"Microsoft.Storage/storageAccounts","resourceName":"ab394fvkdj34"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm-state-modVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm-state-mod"}],"outputs":{},"outputResources":[{"id":"Microsoft.Compute/virtualMachines/vm-state-mod"},{"id":"Microsoft.Network/networkInterfaces/vm-state-modVMNic"},{"id":"Microsoft.Network/networkSecurityGroups/mynsg"},{"id":"Microsoft.Network/publicIPAddresses/mypubip"},{"id":"Microsoft.Network/virtualNetworks/myvnet"},{"id":"Microsoft.Storage/storageAccounts/ab394fvkdj34"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Resources/deployments/vm_deploy_GCPYqmrEK0QpIkC7H2aWP0QraNuR8nAg","name":"vm_deploy_GCPYqmrEK0QpIkC7H2aWP0QraNuR8nAg","properties":{"parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-02-12T05:45:53.8740153Z","duration":"PT2M5.3524309S","correlationId":"ca4d3d0f-20a3-4d6f-ac9c-d0a91fb15595","providers":[{"namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["eastus"]}]},{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["eastus"]},{"resourceType":"networkSecurityGroups","locations":["eastus"]},{"resourceType":"publicIPAddresses","locations":["eastus"]},{"resourceType":"networkInterfaces","locations":["eastus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["eastus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/virtualNetworks/myvnet","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"myvnet"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"mynsg"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/publicIpAddresses/mypubip","resourceType":"Microsoft.Network/publicIpAddresses","resourceName":"mypubip"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm-state-modVMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Storage/storageAccounts/ab394fvkdj39","resourceType":"Microsoft.Storage/storageAccounts","resourceName":"ab394fvkdj39"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm-state-modVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm-state-mod"}],"outputs":{},"outputResources":[{"id":"Microsoft.Compute/virtualMachines/vm-state-mod"},{"id":"Microsoft.Network/networkInterfaces/vm-state-modVMNic"},{"id":"Microsoft.Network/networkSecurityGroups/mynsg"},{"id":"Microsoft.Network/publicIPAddresses/mypubip"},{"id":"Microsoft.Network/virtualNetworks/myvnet"},{"id":"Microsoft.Storage/storageAccounts/ab394fvkdj39"}]}}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:50:38 GMT'] + Date: ['Sun, 12 Feb 2017 05:46:23 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] - content-length: ['3092'] + content-length: ['3091'] status: {code: 200, message: OK} - request: body: null @@ -540,21 +564,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ab2a8848-e757-11e6-8c82-64510658e3b3] + x-ms-client-request-id: [970c5b68-f0e6-11e6-bde4-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?api-version=2016-04-30-preview&$expand=instanceView + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?$expand=instanceView&api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"c05b0fe2-cdfc-47e5-903a-d751c65b9ff9\"\ + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"987654cb-f4fa-4426-8f3f-c9fda42418e2\"\ ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1\"\r\n\ \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ ,\r\n \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\ \n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_67DTRZjyk0\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj34.blob.core.windows.net/vhds/osdisk_67DTRZjyk0.vhd\"\ + \ \"name\": \"osdisk_vJe7inxoHG\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd\"\ \r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \ \ \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ : \"vm-state-mod\",\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ @@ -566,35 +590,35 @@ interactions: ,\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ Ready\",\r\n \"message\": \"GuestAgent is running and accepting\ - \ new configurations.\",\r\n \"time\": \"2017-01-31T01:50:19+00:00\"\ + \ new configurations.\",\r\n \"time\": \"2017-02-12T05:46:14+00:00\"\ \r\n }\r\n ],\r\n \"extensionHandlers\": []\r\n \ - \ },\r\n \"disks\": [\r\n {\r\n \"name\": \"osdisk_67DTRZjyk0\"\ + \ },\r\n \"disks\": [\r\n {\r\n \"name\": \"osdisk_vJe7inxoHG\"\ ,\r\n \"statuses\": [\r\n {\r\n \"code\"\ : \"ProvisioningState/succeeded\",\r\n \"level\": \"Info\",\r\ \n \"displayStatus\": \"Provisioning succeeded\",\r\n \ - \ \"time\": \"2017-01-31T01:49:01.3353712+00:00\"\r\n }\r\ - \n ]\r\n }\r\n ],\r\n \"statuses\": [\r\n \ - \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ - \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ - ,\r\n \"time\": \"2017-01-31T01:50:16.5864467+00:00\"\r\n \ + \ \"time\": \"2017-02-12T05:44:15.585184+00:00\"\r\n }\r\n\ + \ ]\r\n }\r\n ],\r\n \"statuses\": [\r\n \ + \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"\ + level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ + ,\r\n \"time\": \"2017-02-12T05:45:48.9983754+00:00\"\r\n \ \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n \ \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\ \n }\r\n ]\r\n }\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines\"\ - ,\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"secondtag\": \"\ - 2\",\r\n \"firsttag\": \"1\",\r\n \"thirdtag\": \"\"\r\n },\r\n \"\ + ,\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"firsttag\": \"\ + 1\",\r\n \"thirdtag\": \"\",\r\n \"secondtag\": \"2\"\r\n },\r\n \"\ id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ ,\r\n \"name\": \"vm-state-mod\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:50:39 GMT'] + Date: ['Sun, 12 Feb 2017 05:46:24 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['2658'] + content-length: ['2657'] status: {code: 200, message: OK} - request: body: null @@ -603,22 +627,22 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ab6e3506-e757-11e6-9228-64510658e3b3] + x-ms-client-request-id: [97576e30-f0e6-11e6-96f0-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic?api-version=2016-09-01 response: body: {string: "{\r\n \"name\": \"vm-state-modVMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic\"\ - ,\r\n \"etag\": \"W/\\\"3be07300-6bd1-4626-be83-90e031e30af4\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"tags\": {\r\n \"secondtag\": \"2\",\r\ - \n \"firsttag\": \"1\",\r\n \"thirdtag\": \"\"\r\n },\r\n \"properties\"\ + ,\r\n \"etag\": \"W/\\\"660a02ba-0fdc-4c61-b81b-36b95f924280\\\"\",\r\n \ + \ \"location\": \"eastus\",\r\n \"tags\": {\r\n \"firsttag\": \"1\",\r\ + \n \"thirdtag\": \"\",\r\n \"secondtag\": \"2\"\r\n },\r\n \"properties\"\ : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\":\ - \ \"e6b58fcc-ade7-45f7-90aa-229fd05a9043\",\r\n \"ipConfigurations\": [\r\ + \ \"ce57e1c9-7a60-4522-ae9f-caa6e8ab89d9\",\r\n \"ipConfigurations\": [\r\ \n {\r\n \"name\": \"ipconfigvm-state-mod\",\r\n \"id\"\ : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic/ipConfigurations/ipconfigvm-state-mod\"\ - ,\r\n \"etag\": \"W/\\\"3be07300-6bd1-4626-be83-90e031e30af4\\\"\"\ + ,\r\n \"etag\": \"W/\\\"660a02ba-0fdc-4c61-b81b-36b95f924280\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ : \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\":\ @@ -627,8 +651,8 @@ interactions: \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"sypdqf4j0vjevmtntsvp4wudnc.bx.internal.cloudapp.net\"\ - \r\n },\r\n \"macAddress\": \"00-0D-3A-18-E4-71\",\r\n \"enableAcceleratedNetworking\"\ + internalDomainNameSuffix\": \"p0lcxouumadebajqyramln5cjf.bx.internal.cloudapp.net\"\ + \r\n },\r\n \"macAddress\": \"00-0D-3A-10-39-46\",\r\n \"enableAcceleratedNetworking\"\ : false,\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\"\ : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg\"\ \r\n },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \ @@ -638,8 +662,8 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:50:40 GMT'] - ETag: [W/"3be07300-6bd1-4626-be83-90e031e30af4"] + Date: ['Sun, 12 Feb 2017 05:46:24 GMT'] + ETag: [W/"660a02ba-0fdc-4c61-b81b-36b95f924280"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -655,35 +679,35 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ab8ca5f4-e757-11e6-ab44-64510658e3b3] + x-ms-client-request-id: [978ac18a-f0e6-11e6-b65f-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/publicIPAddresses/mypubip?api-version=2016-09-01 response: body: {string: "{\r\n \"name\": \"mypubip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/publicIPAddresses/mypubip\"\ - ,\r\n \"etag\": \"W/\\\"07b533e2-d567-4d5d-a2f0-abd0418e485c\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"56c2f566-d599-41f2-aeba-f43e3df53e38\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"location\": \"\ - eastus\",\r\n \"tags\": {\r\n \"secondtag\": \"2\",\r\n \"firsttag\"\ - : \"1\",\r\n \"thirdtag\": \"\"\r\n },\r\n \"properties\": {\r\n \"\ - provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"b7e37011-797b-469a-b1b9-d34ab5f33d3a\"\ - ,\r\n \"ipAddress\": \"40.71.99.3\",\r\n \"publicIPAddressVersion\"\ + eastus\",\r\n \"tags\": {\r\n \"firsttag\": \"1\",\r\n \"thirdtag\"\ + : \"\",\r\n \"secondtag\": \"2\"\r\n },\r\n \"properties\": {\r\n \ + \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"42e08a80-8dd0-4de5-9118-890ede4f1dc8\"\ + ,\r\n \"ipAddress\": \"40.121.214.78\",\r\n \"publicIPAddressVersion\"\ : \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\"\ : 4,\r\n \"ipConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic/ipConfigurations/ipconfigvm-state-mod\"\ \r\n }\r\n }\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:50:40 GMT'] - ETag: [W/"07b533e2-d567-4d5d-a2f0-abd0418e485c"] + Date: ['Sun, 12 Feb 2017 05:46:25 GMT'] + ETag: [W/"56c2f566-d599-41f2-aeba-f43e3df53e38"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['919'] + content-length: ['922'] status: {code: 200, message: OK} - request: body: null @@ -692,22 +716,22 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ac01c374-e757-11e6-b873-64510658e3b3] + x-ms-client-request-id: [9834922c-f0e6-11e6-9a87-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines?api-version=2016-04-30-preview response: body: {string: "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \ - \ \"vmId\": \"c05b0fe2-cdfc-47e5-903a-d751c65b9ff9\",\r\n \"hardwareProfile\"\ + \ \"vmId\": \"987654cb-f4fa-4426-8f3f-c9fda42418e2\",\r\n \"hardwareProfile\"\ : {\r\n \"vmSize\": \"Standard_DS1\"\r\n },\r\n \"\ storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\"\ : \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \ \ \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\n \ \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\"\ - ,\r\n \"name\": \"osdisk_67DTRZjyk0\",\r\n \"createOption\"\ - : \"FromImage\",\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj34.blob.core.windows.net/vhds/osdisk_67DTRZjyk0.vhd\"\ + ,\r\n \"name\": \"osdisk_vJe7inxoHG\",\r\n \"createOption\"\ + : \"FromImage\",\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd\"\ \r\n },\r\n \"caching\": \"ReadWrite\"\r\n \ \ },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\"\ : {\r\n \"computerName\": \"vm-state-mod\",\r\n \"adminUsername\"\ @@ -716,14 +740,14 @@ interactions: \ \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic\"\ }]},\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\":\ - \ \"eastus\",\r\n \"tags\": {\r\n \"secondtag\": \"2\",\r\n \ - \ \"firsttag\": \"1\",\r\n \"thirdtag\": \"\"\r\n },\r\n\ + \ \"eastus\",\r\n \"tags\": {\r\n \"firsttag\": \"1\",\r\n \ + \ \"thirdtag\": \"\",\r\n \"secondtag\": \"2\"\r\n },\r\n\ \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ ,\r\n \"name\": \"vm-state-mod\"\r\n }\r\n ]\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:50:41 GMT'] + Date: ['Sun, 12 Feb 2017 05:46:26 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -739,21 +763,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ac863128-e757-11e6-b516-64510658e3b3] + x-ms-client-request-id: [98f8f362-f0e6-11e6-afeb-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"c05b0fe2-cdfc-47e5-903a-d751c65b9ff9\"\ + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"987654cb-f4fa-4426-8f3f-c9fda42418e2\"\ ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1\"\r\n\ \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ ,\r\n \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\ \n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_67DTRZjyk0\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj34.blob.core.windows.net/vhds/osdisk_67DTRZjyk0.vhd\"\ + \ \"name\": \"osdisk_vJe7inxoHG\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd\"\ \r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \ \ \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ : \"vm-state-mod\",\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ @@ -762,13 +786,13 @@ interactions: :[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic\"\ }]},\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"\ Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus\",\r\n \"\ - tags\": {\r\n \"secondtag\": \"2\",\r\n \"firsttag\": \"1\",\r\n \ - \ \"thirdtag\": \"\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ + tags\": {\r\n \"firsttag\": \"1\",\r\n \"thirdtag\": \"\",\r\n \"\ + secondtag\": \"2\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ ,\r\n \"name\": \"vm-state-mod\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:50:42 GMT'] + Date: ['Sun, 12 Feb 2017 05:46:27 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -784,21 +808,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ad06b4fa-e757-11e6-90f1-64510658e3b3] + x-ms-client-request-id: [99a820fe-f0e6-11e6-b8c1-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?api-version=2016-04-30-preview&$expand=instanceView + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?$expand=instanceView&api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"c05b0fe2-cdfc-47e5-903a-d751c65b9ff9\"\ + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"987654cb-f4fa-4426-8f3f-c9fda42418e2\"\ ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1\"\r\n\ \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ ,\r\n \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\ \n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_67DTRZjyk0\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj34.blob.core.windows.net/vhds/osdisk_67DTRZjyk0.vhd\"\ + \ \"name\": \"osdisk_vJe7inxoHG\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd\"\ \r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \ \ \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ : \"vm-state-mod\",\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ @@ -810,35 +834,35 @@ interactions: ,\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ Ready\",\r\n \"message\": \"GuestAgent is running and accepting\ - \ new configurations.\",\r\n \"time\": \"2017-01-31T01:50:19+00:00\"\ + \ new configurations.\",\r\n \"time\": \"2017-02-12T05:46:14+00:00\"\ \r\n }\r\n ],\r\n \"extensionHandlers\": []\r\n \ - \ },\r\n \"disks\": [\r\n {\r\n \"name\": \"osdisk_67DTRZjyk0\"\ + \ },\r\n \"disks\": [\r\n {\r\n \"name\": \"osdisk_vJe7inxoHG\"\ ,\r\n \"statuses\": [\r\n {\r\n \"code\"\ : \"ProvisioningState/succeeded\",\r\n \"level\": \"Info\",\r\ \n \"displayStatus\": \"Provisioning succeeded\",\r\n \ - \ \"time\": \"2017-01-31T01:49:01.3353712+00:00\"\r\n }\r\ - \n ]\r\n }\r\n ],\r\n \"statuses\": [\r\n \ - \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ - \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ - ,\r\n \"time\": \"2017-01-31T01:50:16.5864467+00:00\"\r\n \ + \ \"time\": \"2017-02-12T05:44:15.585184+00:00\"\r\n }\r\n\ + \ ]\r\n }\r\n ],\r\n \"statuses\": [\r\n \ + \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"\ + level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ + ,\r\n \"time\": \"2017-02-12T05:45:48.9983754+00:00\"\r\n \ \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n \ \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\ \n }\r\n ]\r\n }\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines\"\ - ,\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"secondtag\": \"\ - 2\",\r\n \"firsttag\": \"1\",\r\n \"thirdtag\": \"\"\r\n },\r\n \"\ + ,\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"firsttag\": \"\ + 1\",\r\n \"thirdtag\": \"\",\r\n \"secondtag\": \"2\"\r\n },\r\n \"\ id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ ,\r\n \"name\": \"vm-state-mod\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:50:43 GMT'] + Date: ['Sun, 12 Feb 2017 05:46:28 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['2658'] + content-length: ['2657'] status: {code: 200, message: OK} - request: body: null @@ -847,21 +871,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ad83108a-e757-11e6-bcad-64510658e3b3] + x-ms-client-request-id: [9a745c36-f0e6-11e6-8719-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?api-version=2016-04-30-preview&$expand=instanceView + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?$expand=instanceView&api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"c05b0fe2-cdfc-47e5-903a-d751c65b9ff9\"\ + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"987654cb-f4fa-4426-8f3f-c9fda42418e2\"\ ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1\"\r\n\ \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ ,\r\n \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\ \n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_67DTRZjyk0\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj34.blob.core.windows.net/vhds/osdisk_67DTRZjyk0.vhd\"\ + \ \"name\": \"osdisk_vJe7inxoHG\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd\"\ \r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \ \ \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ : \"vm-state-mod\",\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ @@ -873,50 +897,113 @@ interactions: ,\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ Ready\",\r\n \"message\": \"GuestAgent is running and accepting\ - \ new configurations.\",\r\n \"time\": \"2017-01-31T01:50:19+00:00\"\ + \ new configurations.\",\r\n \"time\": \"2017-02-12T05:46:14+00:00\"\ \r\n }\r\n ],\r\n \"extensionHandlers\": []\r\n \ - \ },\r\n \"disks\": [\r\n {\r\n \"name\": \"osdisk_67DTRZjyk0\"\ + \ },\r\n \"disks\": [\r\n {\r\n \"name\": \"osdisk_vJe7inxoHG\"\ ,\r\n \"statuses\": [\r\n {\r\n \"code\"\ : \"ProvisioningState/succeeded\",\r\n \"level\": \"Info\",\r\ \n \"displayStatus\": \"Provisioning succeeded\",\r\n \ - \ \"time\": \"2017-01-31T01:49:01.3353712+00:00\"\r\n }\r\ - \n ]\r\n }\r\n ],\r\n \"statuses\": [\r\n \ - \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ - \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ - ,\r\n \"time\": \"2017-01-31T01:50:16.5864467+00:00\"\r\n \ + \ \"time\": \"2017-02-12T05:44:15.585184+00:00\"\r\n }\r\n\ + \ ]\r\n }\r\n ],\r\n \"statuses\": [\r\n \ + \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"\ + level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ + ,\r\n \"time\": \"2017-02-12T05:45:48.9983754+00:00\"\r\n \ \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n \ \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\ \n }\r\n ]\r\n }\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines\"\ - ,\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"secondtag\": \"\ - 2\",\r\n \"firsttag\": \"1\",\r\n \"thirdtag\": \"\"\r\n },\r\n \"\ + ,\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"firsttag\": \"\ + 1\",\r\n \"thirdtag\": \"\",\r\n \"secondtag\": \"2\"\r\n },\r\n \"\ id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ ,\r\n \"name\": \"vm-state-mod\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:50:43 GMT'] + Date: ['Sun, 12 Feb 2017 05:46:30 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['2658'] + content-length: ['2657'] status: {code: 200, message: OK} - request: - body: '{"properties": {"settings": {}, "protectedSettings": {"username": "foouser1", - "password": "Foo12345"}, "typeHandlerVersion": "1.4", "type": "VMAccessForLinux", - "publisher": "Microsoft.OSTCExtensions"}, "location": "eastus"}' + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [9aa900ec-f0e6-11e6-9e94-f4b7e2e85440] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?$expand=instanceView&api-version=2016-04-30-preview + response: + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"987654cb-f4fa-4426-8f3f-c9fda42418e2\"\ + ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1\"\r\n\ + \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ + \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ + ,\r\n \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\ + \n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ + \ \"name\": \"osdisk_vJe7inxoHG\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd\"\ + \r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \ + \ \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ + : \"vm-state-mod\",\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ + : {\r\n \"disablePasswordAuthentication\": false\r\n },\r\n \ + \ \"secrets\": []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\"\ + :[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic\"\ + }]},\r\n \"provisioningState\": \"Succeeded\",\r\n \"instanceView\"\ + : {\r\n \"vmAgent\": {\r\n \"vmAgentVersion\": \"WALinuxAgent-2.0.16\"\ + ,\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ + ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ + Ready\",\r\n \"message\": \"GuestAgent is running and accepting\ + \ new configurations.\",\r\n \"time\": \"2017-02-12T05:46:14+00:00\"\ + \r\n }\r\n ],\r\n \"extensionHandlers\": []\r\n \ + \ },\r\n \"disks\": [\r\n {\r\n \"name\": \"osdisk_vJe7inxoHG\"\ + ,\r\n \"statuses\": [\r\n {\r\n \"code\"\ + : \"ProvisioningState/succeeded\",\r\n \"level\": \"Info\",\r\ + \n \"displayStatus\": \"Provisioning succeeded\",\r\n \ + \ \"time\": \"2017-02-12T05:44:15.585184+00:00\"\r\n }\r\n\ + \ ]\r\n }\r\n ],\r\n \"statuses\": [\r\n \ + \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"\ + level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ + ,\r\n \"time\": \"2017-02-12T05:45:48.9983754+00:00\"\r\n \ + \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n \ + \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\ + \n }\r\n ]\r\n }\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines\"\ + ,\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"firsttag\": \"\ + 1\",\r\n \"thirdtag\": \"\",\r\n \"secondtag\": \"2\"\r\n },\r\n \"\ + id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ + ,\r\n \"name\": \"vm-state-mod\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Sun, 12 Feb 2017 05:46:31 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2657'] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"type": "VMAccessForLinux", "publisher": "Microsoft.OSTCExtensions", + "typeHandlerVersion": "1.4", "settings": {}, "protectedSettings": {"username": + "foouser1", "password": "Foo12345"}}, "location": "eastus"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['223'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ada7165a-e757-11e6-89a8-64510658e3b3] + x-ms-client-request-id: [9ade41cc-f0e6-11e6-98e8-f4b7e2e85440] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/extensions/enablevmaccess?api-version=2016-04-30-preview response: @@ -927,16 +1014,16 @@ interactions: ,\r\n \"location\": \"eastus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/extensions/enablevmaccess\"\ ,\r\n \"name\": \"enablevmaccess\"\r\n}"} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/16861409-4feb-46bd-8967-cabe6fe6ebaa?api-version=2016-04-30-preview'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/82676c56-ec04-4dda-b567-c2eba87ee971?api-version=2016-04-30-preview'] Cache-Control: [no-cache] Content-Length: ['541'] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:50:45 GMT'] + Date: ['Sun, 12 Feb 2017 05:46:33 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] status: {code: 201, message: Created} - request: body: null @@ -945,20 +1032,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ada7165a-e757-11e6-89a8-64510658e3b3] + x-ms-client-request-id: [9ade41cc-f0e6-11e6-98e8-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/16861409-4feb-46bd-8967-cabe6fe6ebaa?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/82676c56-ec04-4dda-b567-c2eba87ee971?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"startTime\": \"2017-01-31T01:50:45.1178448+00:00\",\r\ - \n \"status\": \"InProgress\",\r\n \"name\": \"16861409-4feb-46bd-8967-cabe6fe6ebaa\"\ + body: {string: "{\r\n \"startTime\": \"2017-02-12T05:46:31.6093826+00:00\",\r\ + \n \"status\": \"InProgress\",\r\n \"name\": \"82676c56-ec04-4dda-b567-c2eba87ee971\"\ \r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:51:15 GMT'] + Date: ['Sun, 12 Feb 2017 05:47:03 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -974,20 +1061,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ada7165a-e757-11e6-89a8-64510658e3b3] + x-ms-client-request-id: [9ade41cc-f0e6-11e6-98e8-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/16861409-4feb-46bd-8967-cabe6fe6ebaa?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/82676c56-ec04-4dda-b567-c2eba87ee971?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"startTime\": \"2017-01-31T01:50:45.1178448+00:00\",\r\ - \n \"status\": \"InProgress\",\r\n \"name\": \"16861409-4feb-46bd-8967-cabe6fe6ebaa\"\ + body: {string: "{\r\n \"startTime\": \"2017-02-12T05:46:31.6093826+00:00\",\r\ + \n \"status\": \"InProgress\",\r\n \"name\": \"82676c56-ec04-4dda-b567-c2eba87ee971\"\ \r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:51:46 GMT'] + Date: ['Sun, 12 Feb 2017 05:47:34 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -1003,20 +1090,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ada7165a-e757-11e6-89a8-64510658e3b3] + x-ms-client-request-id: [9ade41cc-f0e6-11e6-98e8-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/16861409-4feb-46bd-8967-cabe6fe6ebaa?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/82676c56-ec04-4dda-b567-c2eba87ee971?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"startTime\": \"2017-01-31T01:50:45.1178448+00:00\",\r\ - \n \"endTime\": \"2017-01-31T01:51:53.7611856+00:00\",\r\n \"status\": \"\ - Succeeded\",\r\n \"name\": \"16861409-4feb-46bd-8967-cabe6fe6ebaa\"\r\n}"} + body: {string: "{\r\n \"startTime\": \"2017-02-12T05:46:31.6093826+00:00\",\r\ + \n \"endTime\": \"2017-02-12T05:47:42.9996786+00:00\",\r\n \"status\": \"\ + Succeeded\",\r\n \"name\": \"82676c56-ec04-4dda-b567-c2eba87ee971\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:52:16 GMT'] + Date: ['Sun, 12 Feb 2017 05:48:05 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -1032,10 +1119,10 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ada7165a-e757-11e6-89a8-64510658e3b3] + x-ms-client-request-id: [9ade41cc-f0e6-11e6-98e8-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/extensions/enablevmaccess?api-version=2016-04-30-preview response: @@ -1048,7 +1135,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:52:17 GMT'] + Date: ['Sun, 12 Feb 2017 05:48:05 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -1064,21 +1151,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [e5e21f42-e757-11e6-8f88-64510658e3b3] + x-ms-client-request-id: [d3f2deb6-f0e6-11e6-9304-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?api-version=2016-04-30-preview&$expand=instanceView + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?$expand=instanceView&api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"c05b0fe2-cdfc-47e5-903a-d751c65b9ff9\"\ + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"987654cb-f4fa-4426-8f3f-c9fda42418e2\"\ ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1\"\r\n\ \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ ,\r\n \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\ \n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_67DTRZjyk0\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj34.blob.core.windows.net/vhds/osdisk_67DTRZjyk0.vhd\"\ + \ \"name\": \"osdisk_vJe7inxoHG\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd\"\ \r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \ \ \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ : \"vm-state-mod\",\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ @@ -1090,17 +1177,17 @@ interactions: ,\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ Ready\",\r\n \"message\": \"GuestAgent is running and accepting\ - \ new configurations.\",\r\n \"time\": \"2017-01-31T01:52:11+00:00\"\ + \ new configurations.\",\r\n \"time\": \"2017-02-12T05:48:05+00:00\"\ \r\n }\r\n ],\r\n \"extensionHandlers\": [\r\n \ \ {\r\n \"type\": \"Microsoft.OSTCExtensions.VMAccessForLinux\"\ ,\r\n \"typeHandlerVersion\": \"1.4.6.0\",\r\n \"status\"\ : {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \ \"level\": \"Info\",\r\n \"displayStatus\": \"Ready\"\ \r\n }\r\n }\r\n ]\r\n },\r\n \"disks\"\ - : [\r\n {\r\n \"name\": \"osdisk_67DTRZjyk0\",\r\n \ + : [\r\n {\r\n \"name\": \"osdisk_vJe7inxoHG\",\r\n \ \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\"\ - : \"Provisioning succeeded\",\r\n \"time\": \"2017-01-31T01:50:45.2741093+00:00\"\ + : \"Provisioning succeeded\",\r\n \"time\": \"2017-02-12T05:46:31.7968432+00:00\"\ \r\n }\r\n ]\r\n }\r\n ],\r\n \"extensions\"\ : [\r\n {\r\n \"name\": \"enablevmaccess\",\r\n \"\ type\": \"Microsoft.OSTCExtensions.VMAccessForLinux\",\r\n \"typeHandlerVersion\"\ @@ -1111,11 +1198,11 @@ interactions: \ ]\r\n }\r\n ],\r\n \"statuses\": [\r\n \ \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"\ level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ - ,\r\n \"time\": \"2017-01-31T01:51:53.7455752+00:00\"\r\n \ - \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n \ - \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\ - \n }\r\n ]\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n\ - \ \"properties\": {\r\n \"publisher\": \"Microsoft.OSTCExtensions\"\ + ,\r\n \"time\": \"2017-02-12T05:47:42.98407+00:00\"\r\n },\r\ + \n {\r\n \"code\": \"PowerState/running\",\r\n \"\ + level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\n \ + \ }\r\n ]\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \ + \ \"properties\": {\r\n \"publisher\": \"Microsoft.OSTCExtensions\"\ ,\r\n \"type\": \"VMAccessForLinux\",\r\n \"typeHandlerVersion\"\ : \"1.4\",\r\n \"autoUpgradeMinorVersion\": false,\r\n \"settings\"\ : {},\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ @@ -1123,35 +1210,116 @@ interactions: location\": \"eastus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/extensions/enablevmaccess\"\ ,\r\n \"name\": \"enablevmaccess\"\r\n }\r\n ],\r\n \"type\": \"\ Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus\",\r\n \"\ - tags\": {\r\n \"secondtag\": \"2\",\r\n \"firsttag\": \"1\",\r\n \ - \ \"thirdtag\": \"\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ + tags\": {\r\n \"firsttag\": \"1\",\r\n \"thirdtag\": \"\",\r\n \"\ + secondtag\": \"2\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ ,\r\n \"name\": \"vm-state-mod\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:52:18 GMT'] + Date: ['Sun, 12 Feb 2017 05:48:06 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['4054'] + content-length: ['4052'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [d4365952-f0e6-11e6-a7ed-f4b7e2e85440] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?$expand=instanceView&api-version=2016-04-30-preview + response: + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"987654cb-f4fa-4426-8f3f-c9fda42418e2\"\ + ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1\"\r\n\ + \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ + \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ + ,\r\n \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\ + \n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ + \ \"name\": \"osdisk_vJe7inxoHG\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd\"\ + \r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \ + \ \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ + : \"vm-state-mod\",\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ + : {\r\n \"disablePasswordAuthentication\": false\r\n },\r\n \ + \ \"secrets\": []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\"\ + :[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic\"\ + }]},\r\n \"provisioningState\": \"Succeeded\",\r\n \"instanceView\"\ + : {\r\n \"vmAgent\": {\r\n \"vmAgentVersion\": \"WALinuxAgent-2.0.16\"\ + ,\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ + ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ + Ready\",\r\n \"message\": \"GuestAgent is running and accepting\ + \ new configurations.\",\r\n \"time\": \"2017-02-12T05:48:05+00:00\"\ + \r\n }\r\n ],\r\n \"extensionHandlers\": [\r\n \ + \ {\r\n \"type\": \"Microsoft.OSTCExtensions.VMAccessForLinux\"\ + ,\r\n \"typeHandlerVersion\": \"1.4.6.0\",\r\n \"status\"\ + : {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ + \ \"level\": \"Info\",\r\n \"displayStatus\": \"Ready\"\ + \r\n }\r\n }\r\n ]\r\n },\r\n \"disks\"\ + : [\r\n {\r\n \"name\": \"osdisk_vJe7inxoHG\",\r\n \ + \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ + ,\r\n \"level\": \"Info\",\r\n \"displayStatus\"\ + : \"Provisioning succeeded\",\r\n \"time\": \"2017-02-12T05:46:31.7968432+00:00\"\ + \r\n }\r\n ]\r\n }\r\n ],\r\n \"extensions\"\ + : [\r\n {\r\n \"name\": \"enablevmaccess\",\r\n \"\ + type\": \"Microsoft.OSTCExtensions.VMAccessForLinux\",\r\n \"typeHandlerVersion\"\ + : \"1.4.6.0\",\r\n \"statuses\": [\r\n {\r\n \ + \ \"code\": \"ProvisioningState/succeeded\",\r\n \"level\"\ + : \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ + ,\r\n \"message\": \"Enable succeeded.\"\r\n }\r\n\ + \ ]\r\n }\r\n ],\r\n \"statuses\": [\r\n \ + \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"\ + level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ + ,\r\n \"time\": \"2017-02-12T05:47:42.98407+00:00\"\r\n },\r\ + \n {\r\n \"code\": \"PowerState/running\",\r\n \"\ + level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\n \ + \ }\r\n ]\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \ + \ \"properties\": {\r\n \"publisher\": \"Microsoft.OSTCExtensions\"\ + ,\r\n \"type\": \"VMAccessForLinux\",\r\n \"typeHandlerVersion\"\ + : \"1.4\",\r\n \"autoUpgradeMinorVersion\": false,\r\n \"settings\"\ + : {},\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ + \ \"type\": \"Microsoft.Compute/virtualMachines/extensions\",\r\n \"\ + location\": \"eastus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/extensions/enablevmaccess\"\ + ,\r\n \"name\": \"enablevmaccess\"\r\n }\r\n ],\r\n \"type\": \"\ + Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus\",\r\n \"\ + tags\": {\r\n \"firsttag\": \"1\",\r\n \"thirdtag\": \"\",\r\n \"\ + secondtag\": \"2\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ + ,\r\n \"name\": \"vm-state-mod\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Sun, 12 Feb 2017 05:48:06 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['4052'] status: {code: 200, message: OK} - request: - body: '{"properties": {"settings": {}, "protectedSettings": {"remove_user": "foouser1"}, - "typeHandlerVersion": "1.4", "type": "VMAccessForLinux", "publisher": "Microsoft.OSTCExtensions"}, - "location": "eastus"}' + body: '{"properties": {"type": "VMAccessForLinux", "publisher": "Microsoft.OSTCExtensions", + "typeHandlerVersion": "1.4", "settings": {}, "protectedSettings": {"remove_user": + "foouser1"}}, "location": "eastus"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['202'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [e61a5a5e-e757-11e6-99d5-64510658e3b3] + x-ms-client-request-id: [d46b8f92-f0e6-11e6-9fbf-f4b7e2e85440] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/extensions/enablevmaccess?api-version=2016-04-30-preview response: @@ -1162,10 +1330,10 @@ interactions: ,\r\n \"location\": \"eastus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/extensions/enablevmaccess\"\ ,\r\n \"name\": \"enablevmaccess\"\r\n}"} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/870a2d3e-46b7-4648-9585-bcc6e310ba5a?api-version=2016-04-30-preview'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/dff2744e-8e45-4d8a-a15a-01345258887a?api-version=2016-04-30-preview'] Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:52:18 GMT'] + Date: ['Sun, 12 Feb 2017 05:48:07 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -1173,7 +1341,7 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['541'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: body: null @@ -1182,20 +1350,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [e61a5a5e-e757-11e6-99d5-64510658e3b3] + x-ms-client-request-id: [d46b8f92-f0e6-11e6-9fbf-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/870a2d3e-46b7-4648-9585-bcc6e310ba5a?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/dff2744e-8e45-4d8a-a15a-01345258887a?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"startTime\": \"2017-01-31T01:52:18.8551059+00:00\",\r\ - \n \"status\": \"InProgress\",\r\n \"name\": \"870a2d3e-46b7-4648-9585-bcc6e310ba5a\"\ + body: {string: "{\r\n \"startTime\": \"2017-02-12T05:48:06.9081253+00:00\",\r\ + \n \"status\": \"InProgress\",\r\n \"name\": \"dff2744e-8e45-4d8a-a15a-01345258887a\"\ \r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:52:49 GMT'] + Date: ['Sun, 12 Feb 2017 05:48:38 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -1211,20 +1379,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [e61a5a5e-e757-11e6-99d5-64510658e3b3] + x-ms-client-request-id: [d46b8f92-f0e6-11e6-9fbf-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/870a2d3e-46b7-4648-9585-bcc6e310ba5a?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/dff2744e-8e45-4d8a-a15a-01345258887a?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"startTime\": \"2017-01-31T01:52:18.8551059+00:00\",\r\ - \n \"endTime\": \"2017-01-31T01:53:09.2209873+00:00\",\r\n \"status\": \"\ - Succeeded\",\r\n \"name\": \"870a2d3e-46b7-4648-9585-bcc6e310ba5a\"\r\n}"} + body: {string: "{\r\n \"startTime\": \"2017-02-12T05:48:06.9081253+00:00\",\r\ + \n \"endTime\": \"2017-02-12T05:49:04.5020297+00:00\",\r\n \"status\": \"\ + Succeeded\",\r\n \"name\": \"dff2744e-8e45-4d8a-a15a-01345258887a\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:53:19 GMT'] + Date: ['Sun, 12 Feb 2017 05:49:09 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -1240,10 +1408,10 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [e61a5a5e-e757-11e6-99d5-64510658e3b3] + x-ms-client-request-id: [d46b8f92-f0e6-11e6-9fbf-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/extensions/enablevmaccess?api-version=2016-04-30-preview response: @@ -1256,7 +1424,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:53:20 GMT'] + Date: ['Sun, 12 Feb 2017 05:49:09 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -1272,22 +1440,22 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [0b480828-e758-11e6-b578-64510658e3b3] + x-ms-client-request-id: [fa5f6b68-f0e6-11e6-8fdb-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg?api-version=2016-09-01 response: body: {string: "{\r\n \"name\": \"mynsg\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg\"\ - ,\r\n \"etag\": \"W/\\\"28d54eeb-7a37-4c03-bbc9-cf3a410e8a4b\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"f840d38f-2f24-41e3-a905-418460ca43b5\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/networkSecurityGroups\",\r\n \"location\"\ - : \"eastus\",\r\n \"tags\": {\r\n \"secondtag\": \"2\",\r\n \"firsttag\"\ - : \"1\",\r\n \"thirdtag\": \"\"\r\n },\r\n \"properties\": {\r\n \"\ - provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"9242b078-27f4-45f7-b283-d429f44f8da3\"\ + : \"eastus\",\r\n \"tags\": {\r\n \"firsttag\": \"1\",\r\n \"thirdtag\"\ + : \"\",\r\n \"secondtag\": \"2\"\r\n },\r\n \"properties\": {\r\n \ + \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"a3630384-b524-4b44-9778-641c0a70063b\"\ ,\r\n \"securityRules\": [\r\n {\r\n \"name\": \"default-allow-ssh\"\ ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg/securityRules/default-allow-ssh\"\ - ,\r\n \"etag\": \"W/\\\"28d54eeb-7a37-4c03-bbc9-cf3a410e8a4b\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f840d38f-2f24-41e3-a905-418460ca43b5\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"protocol\": \"Tcp\",\r\n \"sourcePortRange\": \"\ *\",\r\n \"destinationPortRange\": \"22\",\r\n \"sourceAddressPrefix\"\ @@ -1296,7 +1464,7 @@ interactions: : \"Inbound\"\r\n }\r\n }\r\n ],\r\n \"defaultSecurityRules\"\ : [\r\n {\r\n \"name\": \"AllowVnetInBound\",\r\n \"id\"\ : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg/defaultSecurityRules/AllowVnetInBound\"\ - ,\r\n \"etag\": \"W/\\\"28d54eeb-7a37-4c03-bbc9-cf3a410e8a4b\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f840d38f-2f24-41e3-a905-418460ca43b5\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from all VMs in VNET\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -1306,7 +1474,7 @@ interactions: \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowAzureLoadBalancerInBound\",\r\n \"id\":\ \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg/defaultSecurityRules/AllowAzureLoadBalancerInBound\"\ - ,\r\n \"etag\": \"W/\\\"28d54eeb-7a37-4c03-bbc9-cf3a410e8a4b\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f840d38f-2f24-41e3-a905-418460ca43b5\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from azure load balancer\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -1315,7 +1483,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n\ \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg/defaultSecurityRules/DenyAllInBound\"\ - ,\r\n \"etag\": \"W/\\\"28d54eeb-7a37-4c03-bbc9-cf3a410e8a4b\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f840d38f-2f24-41e3-a905-418460ca43b5\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all inbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -1324,7 +1492,7 @@ interactions: access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ : \"Inbound\"\r\n }\r\n },\r\n {\r\n \"name\": \"\ AllowVnetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg/defaultSecurityRules/AllowVnetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"28d54eeb-7a37-4c03-bbc9-cf3a410e8a4b\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f840d38f-2f24-41e3-a905-418460ca43b5\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to all\ \ VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ @@ -1333,7 +1501,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowInternetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg/defaultSecurityRules/AllowInternetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"28d54eeb-7a37-4c03-bbc9-cf3a410e8a4b\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f840d38f-2f24-41e3-a905-418460ca43b5\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to Internet\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -1342,7 +1510,7 @@ interactions: \ \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n \ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\n \ \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkSecurityGroups/mynsg/defaultSecurityRules/DenyAllOutBound\"\ - ,\r\n \"etag\": \"W/\\\"28d54eeb-7a37-4c03-bbc9-cf3a410e8a4b\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f840d38f-2f24-41e3-a905-418460ca43b5\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all outbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -1355,8 +1523,8 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:53:21 GMT'] - ETag: [W/"28d54eeb-7a37-4c03-bbc9-cf3a410e8a4b"] + Date: ['Sun, 12 Feb 2017 05:49:11 GMT'] + ETag: [W/"f840d38f-2f24-41e3-a905-418460ca43b5"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -1372,35 +1540,35 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [0bbd156e-e758-11e6-afb0-64510658e3b3] + x-ms-client-request-id: [fb178e74-f0e6-11e6-be24-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/publicIPAddresses/mypubip?api-version=2016-09-01 response: body: {string: "{\r\n \"name\": \"mypubip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/publicIPAddresses/mypubip\"\ - ,\r\n \"etag\": \"W/\\\"3ed35929-892b-4a38-9250-af542a8c97e1\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"2d92028c-3228-454b-bf81-a4487d157c3d\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"location\": \"\ - eastus\",\r\n \"tags\": {\r\n \"secondtag\": \"2\",\r\n \"firsttag\"\ - : \"1\",\r\n \"thirdtag\": \"\"\r\n },\r\n \"properties\": {\r\n \"\ - provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"b7e37011-797b-469a-b1b9-d34ab5f33d3a\"\ - ,\r\n \"ipAddress\": \"40.71.99.3\",\r\n \"publicIPAddressVersion\"\ + eastus\",\r\n \"tags\": {\r\n \"firsttag\": \"1\",\r\n \"thirdtag\"\ + : \"\",\r\n \"secondtag\": \"2\"\r\n },\r\n \"properties\": {\r\n \ + \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"42e08a80-8dd0-4de5-9118-890ede4f1dc8\"\ + ,\r\n \"ipAddress\": \"40.121.214.78\",\r\n \"publicIPAddressVersion\"\ : \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\"\ : 4,\r\n \"ipConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic/ipConfigurations/ipconfigvm-state-mod\"\ \r\n }\r\n }\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:53:22 GMT'] - ETag: [W/"3ed35929-892b-4a38-9250-af542a8c97e1"] + Date: ['Sun, 12 Feb 2017 05:49:12 GMT'] + ETag: [W/"2d92028c-3228-454b-bf81-a4487d157c3d"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['919'] + content-length: ['922'] status: {code: 200, message: OK} - request: body: null @@ -1409,23 +1577,23 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [0c26bf36-e758-11e6-b46b-64510658e3b3] + x-ms-client-request-id: [fba559b4-f0e6-11e6-aee4-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2016-09-01 response: body: {string: "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/virtualNetworks/myvnet\"\ - ,\r\n \"etag\": \"W/\\\"4142f211-8cc9-4553-9ca0-cf512339d274\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"52d0a7ac-f50d-4791-a551-ddb52fbec08f\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"tags\": {\r\n \"secondtag\": \"2\",\r\n \"firsttag\": \"1\"\ - ,\r\n \"thirdtag\": \"\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"17381e96-d5c9-4a52-b26d-9caaff5a836a\"\ + ,\r\n \"tags\": {\r\n \"firsttag\": \"1\",\r\n \"thirdtag\": \"\",\r\ + \n \"secondtag\": \"2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"resourceGuid\": \"ba2b967e-6094-4006-8130-c440c5b7e24d\"\ ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"\ 10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \ \ \"name\": \"vm-state-modSubnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/vm-state-modSubnet\"\ - ,\r\n \"etag\": \"W/\\\"4142f211-8cc9-4553-9ca0-cf512339d274\\\"\"\ + ,\r\n \"etag\": \"W/\\\"52d0a7ac-f50d-4791-a551-ddb52fbec08f\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"ipConfigurations\"\ : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic/ipConfigurations/ipconfigvm-state-mod\"\ @@ -1434,8 +1602,8 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:53:23 GMT'] - ETag: [W/"4142f211-8cc9-4553-9ca0-cf512339d274"] + Date: ['Sun, 12 Feb 2017 05:49:13 GMT'] + ETag: [W/"52d0a7ac-f50d-4791-a551-ddb52fbec08f"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -1451,20 +1619,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [0ca1819c-e758-11e6-8070-64510658e3b3] + x-ms-client-request-id: [fc3f9368-f0e6-11e6-a44c-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Storage/storageAccounts/ab394fvkdj34?api-version=2016-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Storage/storageAccounts/ab394fvkdj39?api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Storage/storageAccounts/ab394fvkdj34","kind":"Storage","location":"eastus","name":"ab394fvkdj34","properties":{"creationTime":"2017-01-31T01:48:40.0006563Z","primaryEndpoints":{"blob":"https://ab394fvkdj34.blob.core.windows.net/","file":"https://ab394fvkdj34.file.core.windows.net/","queue":"https://ab394fvkdj34.queue.core.windows.net/","table":"https://ab394fvkdj34.table.core.windows.net/"},"primaryLocation":"eastus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{"firsttag":"1","secondtag":"2","thirdtag":""},"type":"Microsoft.Storage/storageAccounts"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Storage/storageAccounts/ab394fvkdj39","kind":"Storage","location":"eastus","name":"ab394fvkdj39","properties":{"creationTime":"2017-02-12T05:43:51.9016036Z","primaryEndpoints":{"blob":"https://ab394fvkdj39.blob.core.windows.net/","file":"https://ab394fvkdj39.file.core.windows.net/","queue":"https://ab394fvkdj39.queue.core.windows.net/","table":"https://ab394fvkdj39.table.core.windows.net/"},"primaryLocation":"eastus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{"firsttag":"1","secondtag":"2","thirdtag":""},"type":"Microsoft.Storage/storageAccounts"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Tue, 31 Jan 2017 01:53:23 GMT'] + Date: ['Sun, 12 Feb 2017 05:49:14 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -1481,25 +1649,25 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [0d196178-e758-11e6-8f81-64510658e3b3] + x-ms-client-request-id: [fce5aa3e-f0e6-11e6-b8b1-f4b7e2e85440] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/powerOff?api-version=2016-04-30-preview response: body: {string: ''} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/51777e61-5a04-448c-8f2f-f0ef96142b8b?api-version=2016-04-30-preview'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/3278ac2a-6a35-47c4-97ca-1cfe33455cfb?api-version=2016-04-30-preview'] Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Tue, 31 Jan 2017 01:53:24 GMT'] + Date: ['Sun, 12 Feb 2017 05:49:15 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/51777e61-5a04-448c-8f2f-f0ef96142b8b?monitor=true&api-version=2016-04-30-preview'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/3278ac2a-6a35-47c4-97ca-1cfe33455cfb?monitor=true&api-version=2016-04-30-preview'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 202, message: Accepted} - request: body: null @@ -1508,27 +1676,27 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [0d196178-e758-11e6-8f81-64510658e3b3] + x-ms-client-request-id: [fce5aa3e-f0e6-11e6-b8b1-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/51777e61-5a04-448c-8f2f-f0ef96142b8b?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/3278ac2a-6a35-47c4-97ca-1cfe33455cfb?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"startTime\": \"2017-01-31T01:53:24.2680711+00:00\",\r\ - \n \"endTime\": \"2017-01-31T01:53:31.3774374+00:00\",\r\n \"status\": \"\ - Succeeded\",\r\n \"name\": \"51777e61-5a04-448c-8f2f-f0ef96142b8b\"\r\n}"} + body: {string: "{\r\n \"startTime\": \"2017-02-12T05:49:14.564512+00:00\",\r\n\ + \ \"endTime\": \"2017-02-12T05:49:35.7363746+00:00\",\r\n \"status\": \"\ + Succeeded\",\r\n \"name\": \"3278ac2a-6a35-47c4-97ca-1cfe33455cfb\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:53:54 GMT'] + Date: ['Sun, 12 Feb 2017 05:49:46 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['184'] + content-length: ['183'] status: {code: 200, message: OK} - request: body: null @@ -1537,21 +1705,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [1fc594ae-e758-11e6-9407-64510658e3b3] + x-ms-client-request-id: [10526b62-f0e7-11e6-ad77-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?api-version=2016-04-30-preview&$expand=instanceView + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?$expand=instanceView&api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"c05b0fe2-cdfc-47e5-903a-d751c65b9ff9\"\ + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"987654cb-f4fa-4426-8f3f-c9fda42418e2\"\ ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1\"\r\n\ \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ ,\r\n \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\ \n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_67DTRZjyk0\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj34.blob.core.windows.net/vhds/osdisk_67DTRZjyk0.vhd\"\ + \ \"name\": \"osdisk_vJe7inxoHG\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd\"\ \r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \ \ \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ : \"vm-state-mod\",\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ @@ -1563,17 +1731,17 @@ interactions: ,\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ Ready\",\r\n \"message\": \"GuestAgent is running and accepting\ - \ new configurations.\",\r\n \"time\": \"2017-01-31T01:53:06+00:00\"\ + \ new configurations.\",\r\n \"time\": \"2017-02-12T05:49:26+00:00\"\ \r\n }\r\n ],\r\n \"extensionHandlers\": [\r\n \ \ {\r\n \"type\": \"Microsoft.OSTCExtensions.VMAccessForLinux\"\ ,\r\n \"typeHandlerVersion\": \"1.4.6.0\",\r\n \"status\"\ : {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \ \"level\": \"Info\",\r\n \"displayStatus\": \"Ready\"\ \r\n }\r\n }\r\n ]\r\n },\r\n \"disks\"\ - : [\r\n {\r\n \"name\": \"osdisk_67DTRZjyk0\",\r\n \ + : [\r\n {\r\n \"name\": \"osdisk_vJe7inxoHG\",\r\n \ \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\"\ - : \"Provisioning succeeded\",\r\n \"time\": \"2017-01-31T01:52:18.90203+00:00\"\ + : \"Provisioning succeeded\",\r\n \"time\": \"2017-02-12T05:48:06.9549916+00:00\"\ \r\n }\r\n ]\r\n }\r\n ],\r\n \"extensions\"\ : [\r\n {\r\n \"name\": \"enablevmaccess\",\r\n \"\ type\": \"Microsoft.OSTCExtensions.VMAccessForLinux\",\r\n \"typeHandlerVersion\"\ @@ -1584,7 +1752,7 @@ interactions: \ ]\r\n }\r\n ],\r\n \"statuses\": [\r\n \ \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"\ level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ - ,\r\n \"time\": \"2017-01-31T01:53:31.3618102+00:00\"\r\n \ + ,\r\n \"time\": \"2017-02-12T05:49:35.7207789+00:00\"\r\n \ \ },\r\n {\r\n \"code\": \"PowerState/stopped\",\r\n \ \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM stopped\"\r\ \n }\r\n ]\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n\ @@ -1596,20 +1764,20 @@ interactions: location\": \"eastus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/extensions/enablevmaccess\"\ ,\r\n \"name\": \"enablevmaccess\"\r\n }\r\n ],\r\n \"type\": \"\ Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus\",\r\n \"\ - tags\": {\r\n \"secondtag\": \"2\",\r\n \"firsttag\": \"1\",\r\n \ - \ \"thirdtag\": \"\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ + tags\": {\r\n \"firsttag\": \"1\",\r\n \"thirdtag\": \"\",\r\n \"\ + secondtag\": \"2\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ ,\r\n \"name\": \"vm-state-mod\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:53:55 GMT'] + Date: ['Sun, 12 Feb 2017 05:49:47 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['4052'] + content-length: ['4054'] status: {code: 200, message: OK} - request: body: null @@ -1619,25 +1787,25 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [20415364-e758-11e6-9e6e-64510658e3b3] + x-ms-client-request-id: [10eb7d90-f0e7-11e6-92d4-f4b7e2e85440] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/start?api-version=2016-04-30-preview response: body: {string: ''} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/631ced5c-0378-495e-8553-f41ed04a1348?api-version=2016-04-30-preview'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/ead6983b-5066-4a9b-9767-bd9926fadbcf?api-version=2016-04-30-preview'] Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Tue, 31 Jan 2017 01:53:56 GMT'] + Date: ['Sun, 12 Feb 2017 05:49:49 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/631ced5c-0378-495e-8553-f41ed04a1348?monitor=true&api-version=2016-04-30-preview'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/ead6983b-5066-4a9b-9767-bd9926fadbcf?monitor=true&api-version=2016-04-30-preview'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1195'] status: {code: 202, message: Accepted} - request: body: null @@ -1646,27 +1814,27 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [20415364-e758-11e6-9e6e-64510658e3b3] + x-ms-client-request-id: [10eb7d90-f0e7-11e6-92d4-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/631ced5c-0378-495e-8553-f41ed04a1348?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/ead6983b-5066-4a9b-9767-bd9926fadbcf?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"startTime\": \"2017-01-31T01:53:56.1276273+00:00\",\r\ - \n \"endTime\": \"2017-01-31T01:54:24.3465608+00:00\",\r\n \"status\": \"\ - Succeeded\",\r\n \"name\": \"631ced5c-0378-495e-8553-f41ed04a1348\"\r\n}"} + body: {string: "{\r\n \"startTime\": \"2017-02-12T05:49:48.1426357+00:00\",\r\ + \n \"endTime\": \"2017-02-12T05:50:16.332209+00:00\",\r\n \"status\": \"\ + Succeeded\",\r\n \"name\": \"ead6983b-5066-4a9b-9767-bd9926fadbcf\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:54:26 GMT'] + Date: ['Sun, 12 Feb 2017 05:50:19 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['184'] + content-length: ['183'] status: {code: 200, message: OK} - request: body: null @@ -1675,21 +1843,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [32ec4d86-e758-11e6-b588-64510658e3b3] + x-ms-client-request-id: [23cd025e-f0e7-11e6-9ade-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?api-version=2016-04-30-preview&$expand=instanceView + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?$expand=instanceView&api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"c05b0fe2-cdfc-47e5-903a-d751c65b9ff9\"\ + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"987654cb-f4fa-4426-8f3f-c9fda42418e2\"\ ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1\"\r\n\ \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ ,\r\n \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\ \n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_67DTRZjyk0\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj34.blob.core.windows.net/vhds/osdisk_67DTRZjyk0.vhd\"\ + \ \"name\": \"osdisk_vJe7inxoHG\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd\"\ \r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \ \ \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ : \"vm-state-mod\",\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ @@ -1701,17 +1869,17 @@ interactions: ,\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ Ready\",\r\n \"message\": \"GuestAgent is running and accepting\ - \ new configurations.\",\r\n \"time\": \"2017-01-31T01:53:06+00:00\"\ + \ new configurations.\",\r\n \"time\": \"2017-02-12T05:49:26+00:00\"\ \r\n }\r\n ],\r\n \"extensionHandlers\": [\r\n \ \ {\r\n \"type\": \"Microsoft.OSTCExtensions.VMAccessForLinux\"\ ,\r\n \"typeHandlerVersion\": \"1.4.6.0\",\r\n \"status\"\ : {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \ \"level\": \"Info\",\r\n \"displayStatus\": \"Ready\"\ \r\n }\r\n }\r\n ]\r\n },\r\n \"disks\"\ - : [\r\n {\r\n \"name\": \"osdisk_67DTRZjyk0\",\r\n \ + : [\r\n {\r\n \"name\": \"osdisk_vJe7inxoHG\",\r\n \ \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\"\ - : \"Provisioning succeeded\",\r\n \"time\": \"2017-01-31T01:52:18.90203+00:00\"\ + : \"Provisioning succeeded\",\r\n \"time\": \"2017-02-12T05:48:06.9549916+00:00\"\ \r\n }\r\n ]\r\n }\r\n ],\r\n \"extensions\"\ : [\r\n {\r\n \"name\": \"enablevmaccess\",\r\n \"\ type\": \"Microsoft.OSTCExtensions.VMAccessForLinux\",\r\n \"typeHandlerVersion\"\ @@ -1722,7 +1890,7 @@ interactions: \ ]\r\n }\r\n ],\r\n \"statuses\": [\r\n \ \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"\ level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ - ,\r\n \"time\": \"2017-01-31T01:54:24.3309239+00:00\"\r\n \ + ,\r\n \"time\": \"2017-02-12T05:50:16.3166082+00:00\"\r\n \ \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n \ \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\ \n }\r\n ]\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n\ @@ -1734,20 +1902,20 @@ interactions: location\": \"eastus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/extensions/enablevmaccess\"\ ,\r\n \"name\": \"enablevmaccess\"\r\n }\r\n ],\r\n \"type\": \"\ Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus\",\r\n \"\ - tags\": {\r\n \"secondtag\": \"2\",\r\n \"firsttag\": \"1\",\r\n \ - \ \"thirdtag\": \"\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ + tags\": {\r\n \"firsttag\": \"1\",\r\n \"thirdtag\": \"\",\r\n \"\ + secondtag\": \"2\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ ,\r\n \"name\": \"vm-state-mod\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:54:27 GMT'] + Date: ['Sun, 12 Feb 2017 05:50:21 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['4052'] + content-length: ['4054'] status: {code: 200, message: OK} - request: body: null @@ -1757,25 +1925,25 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [3368d5a4-e758-11e6-a23a-64510658e3b3] + x-ms-client-request-id: [245ac4d4-f0e7-11e6-8ba2-f4b7e2e85440] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/restart?api-version=2016-04-30-preview response: body: {string: ''} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/d45ced79-e80d-41b6-b878-d2d50f589784?api-version=2016-04-30-preview'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/b6f1231e-54c9-4bf2-8f06-1b67ac36ac96?api-version=2016-04-30-preview'] Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Tue, 31 Jan 2017 01:54:28 GMT'] + Date: ['Sun, 12 Feb 2017 05:50:22 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/d45ced79-e80d-41b6-b878-d2d50f589784?monitor=true&api-version=2016-04-30-preview'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/b6f1231e-54c9-4bf2-8f06-1b67ac36ac96?monitor=true&api-version=2016-04-30-preview'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1194'] status: {code: 202, message: Accepted} - request: body: null @@ -1784,27 +1952,27 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [3368d5a4-e758-11e6-a23a-64510658e3b3] + x-ms-client-request-id: [245ac4d4-f0e7-11e6-8ba2-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/d45ced79-e80d-41b6-b878-d2d50f589784?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/b6f1231e-54c9-4bf2-8f06-1b67ac36ac96?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"startTime\": \"2017-01-31T01:54:28.5341193+00:00\",\r\ - \n \"endTime\": \"2017-01-31T01:54:28.674706+00:00\",\r\n \"status\": \"\ - Succeeded\",\r\n \"name\": \"d45ced79-e80d-41b6-b878-d2d50f589784\"\r\n}"} + body: {string: "{\r\n \"startTime\": \"2017-02-12T05:50:20.7697427+00:00\",\r\ + \n \"endTime\": \"2017-02-12T05:50:20.9259994+00:00\",\r\n \"status\": \"\ + Succeeded\",\r\n \"name\": \"b6f1231e-54c9-4bf2-8f06-1b67ac36ac96\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:54:59 GMT'] + Date: ['Sun, 12 Feb 2017 05:50:52 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['183'] + content-length: ['184'] status: {code: 200, message: OK} - request: body: null @@ -1813,21 +1981,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [4623b454-e758-11e6-bf56-64510658e3b3] + x-ms-client-request-id: [3738741e-f0e7-11e6-9cc5-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?api-version=2016-04-30-preview&$expand=instanceView + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?$expand=instanceView&api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"c05b0fe2-cdfc-47e5-903a-d751c65b9ff9\"\ + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"987654cb-f4fa-4426-8f3f-c9fda42418e2\"\ ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1\"\r\n\ \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ ,\r\n \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\ \n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_67DTRZjyk0\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj34.blob.core.windows.net/vhds/osdisk_67DTRZjyk0.vhd\"\ + \ \"name\": \"osdisk_vJe7inxoHG\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd\"\ \r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \ \ \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ : \"vm-state-mod\",\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ @@ -1839,17 +2007,17 @@ interactions: ,\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ Ready\",\r\n \"message\": \"GuestAgent is running and accepting\ - \ new configurations.\",\r\n \"time\": \"2017-01-31T01:53:06+00:00\"\ + \ new configurations.\",\r\n \"time\": \"2017-02-12T05:49:26+00:00\"\ \r\n }\r\n ],\r\n \"extensionHandlers\": [\r\n \ \ {\r\n \"type\": \"Microsoft.OSTCExtensions.VMAccessForLinux\"\ ,\r\n \"typeHandlerVersion\": \"1.4.6.0\",\r\n \"status\"\ : {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \ \"level\": \"Info\",\r\n \"displayStatus\": \"Ready\"\ \r\n }\r\n }\r\n ]\r\n },\r\n \"disks\"\ - : [\r\n {\r\n \"name\": \"osdisk_67DTRZjyk0\",\r\n \ + : [\r\n {\r\n \"name\": \"osdisk_vJe7inxoHG\",\r\n \ \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\"\ - : \"Provisioning succeeded\",\r\n \"time\": \"2017-01-31T01:52:18.90203+00:00\"\ + : \"Provisioning succeeded\",\r\n \"time\": \"2017-02-12T05:48:06.9549916+00:00\"\ \r\n }\r\n ]\r\n }\r\n ],\r\n \"extensions\"\ : [\r\n {\r\n \"name\": \"enablevmaccess\",\r\n \"\ type\": \"Microsoft.OSTCExtensions.VMAccessForLinux\",\r\n \"typeHandlerVersion\"\ @@ -1860,7 +2028,7 @@ interactions: \ ]\r\n }\r\n ],\r\n \"statuses\": [\r\n \ \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"\ level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ - ,\r\n \"time\": \"2017-01-31T01:54:28.6590578+00:00\"\r\n \ + ,\r\n \"time\": \"2017-02-12T05:50:20.9103557+00:00\"\r\n \ \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n \ \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\ \n }\r\n ]\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n\ @@ -1872,20 +2040,20 @@ interactions: location\": \"eastus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/extensions/enablevmaccess\"\ ,\r\n \"name\": \"enablevmaccess\"\r\n }\r\n ],\r\n \"type\": \"\ Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus\",\r\n \"\ - tags\": {\r\n \"secondtag\": \"2\",\r\n \"firsttag\": \"1\",\r\n \ - \ \"thirdtag\": \"\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ + tags\": {\r\n \"firsttag\": \"1\",\r\n \"thirdtag\": \"\",\r\n \"\ + secondtag\": \"2\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ ,\r\n \"name\": \"vm-state-mod\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:54:59 GMT'] + Date: ['Sun, 12 Feb 2017 05:50:53 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['4052'] + content-length: ['4054'] status: {code: 200, message: OK} - request: body: null @@ -1895,25 +2063,25 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [46a23488-e758-11e6-a317-64510658e3b3] + x-ms-client-request-id: [37ce7000-f0e7-11e6-a701-f4b7e2e85440] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/deallocate?api-version=2016-04-30-preview response: body: {string: ''} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/017a81b6-7a63-4ccc-92fa-19681fb2f8da?api-version=2016-04-30-preview'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/8ab02d35-1e86-4bbf-9033-742c7ed3d158?api-version=2016-04-30-preview'] Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Tue, 31 Jan 2017 01:55:00 GMT'] + Date: ['Sun, 12 Feb 2017 05:50:54 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/017a81b6-7a63-4ccc-92fa-19681fb2f8da?monitor=true&api-version=2016-04-30-preview'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/8ab02d35-1e86-4bbf-9033-742c7ed3d158?monitor=true&api-version=2016-04-30-preview'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1193'] status: {code: 202, message: Accepted} - request: body: null @@ -1922,20 +2090,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [46a23488-e758-11e6-a317-64510658e3b3] + x-ms-client-request-id: [37ce7000-f0e7-11e6-a701-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/017a81b6-7a63-4ccc-92fa-19681fb2f8da?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8ab02d35-1e86-4bbf-9033-742c7ed3d158?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"startTime\": \"2017-01-31T01:55:00.7530654+00:00\",\r\ - \n \"status\": \"InProgress\",\r\n \"name\": \"017a81b6-7a63-4ccc-92fa-19681fb2f8da\"\ + body: {string: "{\r\n \"startTime\": \"2017-02-12T05:50:53.4414801+00:00\",\r\ + \n \"status\": \"InProgress\",\r\n \"name\": \"8ab02d35-1e86-4bbf-9033-742c7ed3d158\"\ \r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:55:31 GMT'] + Date: ['Sun, 12 Feb 2017 05:51:25 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -1951,49 +2119,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [46a23488-e758-11e6-a317-64510658e3b3] + x-ms-client-request-id: [37ce7000-f0e7-11e6-a701-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/017a81b6-7a63-4ccc-92fa-19681fb2f8da?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8ab02d35-1e86-4bbf-9033-742c7ed3d158?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"startTime\": \"2017-01-31T01:55:00.7530654+00:00\",\r\ - \n \"status\": \"InProgress\",\r\n \"name\": \"017a81b6-7a63-4ccc-92fa-19681fb2f8da\"\ - \r\n}"} + body: {string: "{\r\n \"startTime\": \"2017-02-12T05:50:53.4414801+00:00\",\r\ + \n \"endTime\": \"2017-02-12T05:51:54.1306338+00:00\",\r\n \"status\": \"\ + Succeeded\",\r\n \"name\": \"8ab02d35-1e86-4bbf-9033-742c7ed3d158\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:56:01 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['134'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] - accept-language: [en-US] - x-ms-client-request-id: [46a23488-e758-11e6-a317-64510658e3b3] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/017a81b6-7a63-4ccc-92fa-19681fb2f8da?api-version=2016-04-30-preview - response: - body: {string: "{\r\n \"startTime\": \"2017-01-31T01:55:00.7530654+00:00\",\r\ - \n \"endTime\": \"2017-01-31T01:56:21.3629272+00:00\",\r\n \"status\": \"\ - Succeeded\",\r\n \"name\": \"017a81b6-7a63-4ccc-92fa-19681fb2f8da\"\r\n}"} - headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:56:32 GMT'] + Date: ['Sun, 12 Feb 2017 05:51:55 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -2009,21 +2148,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [7db41e0a-e758-11e6-a805-64510658e3b3] + x-ms-client-request-id: [5d2a0590-f0e7-11e6-b251-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?api-version=2016-04-30-preview&$expand=instanceView + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?$expand=instanceView&api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"c05b0fe2-cdfc-47e5-903a-d751c65b9ff9\"\ + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"987654cb-f4fa-4426-8f3f-c9fda42418e2\"\ ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1\"\r\n\ \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ ,\r\n \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\ \n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_67DTRZjyk0\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj34.blob.core.windows.net/vhds/osdisk_67DTRZjyk0.vhd\"\ + \ \"name\": \"osdisk_vJe7inxoHG\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd\"\ \r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \ \ \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ : \"vm-state-mod\",\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ @@ -2035,17 +2174,17 @@ interactions: ,\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ Ready\",\r\n \"message\": \"GuestAgent is running and accepting\ - \ new configurations.\",\r\n \"time\": \"2017-01-31T01:53:06+00:00\"\ + \ new configurations.\",\r\n \"time\": \"2017-02-12T05:49:26+00:00\"\ \r\n }\r\n ],\r\n \"extensionHandlers\": [\r\n \ \ {\r\n \"type\": \"Microsoft.OSTCExtensions.VMAccessForLinux\"\ ,\r\n \"typeHandlerVersion\": \"1.4.6.0\",\r\n \"status\"\ : {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \ \"level\": \"Info\",\r\n \"displayStatus\": \"Ready\"\ \r\n }\r\n }\r\n ]\r\n },\r\n \"disks\"\ - : [\r\n {\r\n \"name\": \"osdisk_67DTRZjyk0\",\r\n \ + : [\r\n {\r\n \"name\": \"osdisk_vJe7inxoHG\",\r\n \ \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\"\ - : \"Provisioning succeeded\",\r\n \"time\": \"2017-01-31T01:56:21.3316848+00:00\"\ + : \"Provisioning succeeded\",\r\n \"time\": \"2017-02-12T05:51:54.1150027+00:00\"\ \r\n }\r\n ]\r\n }\r\n ],\r\n \"extensions\"\ : [\r\n {\r\n \"name\": \"enablevmaccess\",\r\n \"\ type\": \"Microsoft.OSTCExtensions.VMAccessForLinux\",\r\n \"typeHandlerVersion\"\ @@ -2056,9 +2195,9 @@ interactions: \ ]\r\n }\r\n ],\r\n \"statuses\": [\r\n \ \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"\ level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ - ,\r\n \"time\": \"2017-01-31T01:56:21.347299+00:00\"\r\n },\r\ - \n {\r\n \"code\": \"PowerState/deallocated\",\r\n \ - \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM deallocated\"\ + ,\r\n \"time\": \"2017-02-12T05:51:54.1150027+00:00\"\r\n \ + \ },\r\n {\r\n \"code\": \"PowerState/deallocated\",\r\n \ + \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM deallocated\"\ \r\n }\r\n ]\r\n }\r\n },\r\n \"resources\": [\r\n {\r\ \n \"properties\": {\r\n \"publisher\": \"Microsoft.OSTCExtensions\"\ ,\r\n \"type\": \"VMAccessForLinux\",\r\n \"typeHandlerVersion\"\ @@ -2068,20 +2207,20 @@ interactions: location\": \"eastus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/extensions/enablevmaccess\"\ ,\r\n \"name\": \"enablevmaccess\"\r\n }\r\n ],\r\n \"type\": \"\ Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus\",\r\n \"\ - tags\": {\r\n \"secondtag\": \"2\",\r\n \"firsttag\": \"1\",\r\n \ - \ \"thirdtag\": \"\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ + tags\": {\r\n \"firsttag\": \"1\",\r\n \"thirdtag\": \"\",\r\n \"\ + secondtag\": \"2\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ ,\r\n \"name\": \"vm-state-mod\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:56:32 GMT'] + Date: ['Sun, 12 Feb 2017 05:51:57 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['4061'] + content-length: ['4062'] status: {code: 200, message: OK} - request: body: null @@ -2090,21 +2229,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [7e3ed706-e758-11e6-ab70-64510658e3b3] + x-ms-client-request-id: [5dbb5350-f0e7-11e6-8f1e-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"c05b0fe2-cdfc-47e5-903a-d751c65b9ff9\"\ + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"987654cb-f4fa-4426-8f3f-c9fda42418e2\"\ ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1\"\r\n\ \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ ,\r\n \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\ \n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_67DTRZjyk0\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj34.blob.core.windows.net/vhds/osdisk_67DTRZjyk0.vhd\"\ + \ \"name\": \"osdisk_vJe7inxoHG\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd\"\ \r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \ \ \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ : \"vm-state-mod\",\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ @@ -2120,13 +2259,13 @@ interactions: location\": \"eastus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/extensions/enablevmaccess\"\ ,\r\n \"name\": \"enablevmaccess\"\r\n }\r\n ],\r\n \"type\": \"\ Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus\",\r\n \"\ - tags\": {\r\n \"secondtag\": \"2\",\r\n \"firsttag\": \"1\",\r\n \ - \ \"thirdtag\": \"\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ + tags\": {\r\n \"firsttag\": \"1\",\r\n \"thirdtag\": \"\",\r\n \"\ + secondtag\": \"2\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ ,\r\n \"name\": \"vm-state-mod\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:56:34 GMT'] + Date: ['Sun, 12 Feb 2017 05:51:57 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -2136,35 +2275,36 @@ interactions: content-length: ['2091'] status: {code: 200, message: OK} - request: - body: '{"properties": {"storageProfile": {"dataDisks": [], "osDisk": {"createOption": - "fromImage", "caching": "ReadWrite", "osType": "Linux", "vhd": {"uri": "https://ab394fvkdj34.blob.core.windows.net/vhds/osdisk_67DTRZjyk0.vhd"}, - "name": "osdisk_67DTRZjyk0"}, "imageReference": {"sku": "14.04.4-LTS", "publisher": - "Canonical", "offer": "UbuntuServer", "version": "latest"}}, "hardwareProfile": - {"vmSize": "Standard_A4"}, "networkProfile": {"networkInterfaces": [{"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic"}]}, - "osProfile": {"adminUsername": "ubuntu", "computerName": "vm-state-mod", "secrets": - [], "linuxConfiguration": {"disablePasswordAuthentication": false}}}, "tags": - {"secondtag": "2", "firsttag": "1", "thirdtag": ""}, "location": "eastus"}' + body: '{"tags": {"firsttag": "1", "thirdtag": "", "secondtag": "2"}, "properties": + {"osProfile": {"computerName": "vm-state-mod", "adminUsername": "ubuntu", "linuxConfiguration": + {"disablePasswordAuthentication": false}, "secrets": []}, "storageProfile": + {"dataDisks": [], "imageReference": {"offer": "UbuntuServer", "sku": "14.04.4-LTS", + "publisher": "Canonical", "version": "latest"}, "osDisk": {"createOption": "fromImage", + "caching": "ReadWrite", "osType": "Linux", "name": "osdisk_vJe7inxoHG", "vhd": + {"uri": "https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd"}}}, + "networkProfile": {"networkInterfaces": [{"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Network/networkInterfaces/vm-state-modVMNic"}]}, + "hardwareProfile": {"vmSize": "Standard_A4"}}, "location": "eastus"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['864'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [7e8283da-e758-11e6-85ab-64510658e3b3] + x-ms-client-request-id: [5df11468-f0e7-11e6-8a51-f4b7e2e85440] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"c05b0fe2-cdfc-47e5-903a-d751c65b9ff9\"\ + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"987654cb-f4fa-4426-8f3f-c9fda42418e2\"\ ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A4\"\r\n \ \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ ,\r\n \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\ \n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_67DTRZjyk0\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj34.blob.core.windows.net/vhds/osdisk_67DTRZjyk0.vhd\"\ + \ \"name\": \"osdisk_vJe7inxoHG\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd\"\ \r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \ \ \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ : \"vm-state-mod\",\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ @@ -2180,14 +2320,14 @@ interactions: location\": \"eastus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/extensions/enablevmaccess\"\ ,\r\n \"name\": \"enablevmaccess\"\r\n }\r\n ],\r\n \"type\": \"\ Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus\",\r\n \"\ - tags\": {\r\n \"secondtag\": \"2\",\r\n \"firsttag\": \"1\",\r\n \ - \ \"thirdtag\": \"\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ + tags\": {\r\n \"firsttag\": \"1\",\r\n \"thirdtag\": \"\",\r\n \"\ + secondtag\": \"2\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ ,\r\n \"name\": \"vm-state-mod\"\r\n}"} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/f8cc0c65-495e-4e14-bca1-ed8361052504?api-version=2016-04-30-preview'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/9e9da7f3-8cb4-4e5f-8a00-a1beceaf3f70?api-version=2016-04-30-preview'] Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:56:35 GMT'] + Date: ['Sun, 12 Feb 2017 05:52:00 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -2195,7 +2335,7 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['2089'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1192'] status: {code: 200, message: OK} - request: body: null @@ -2204,20 +2344,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [7e8283da-e758-11e6-85ab-64510658e3b3] + x-ms-client-request-id: [5df11468-f0e7-11e6-8a51-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f8cc0c65-495e-4e14-bca1-ed8361052504?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/9e9da7f3-8cb4-4e5f-8a00-a1beceaf3f70?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"startTime\": \"2017-01-31T01:56:35.1442898+00:00\",\r\ - \n \"endTime\": \"2017-01-31T01:56:37.4567701+00:00\",\r\n \"status\": \"\ - Succeeded\",\r\n \"name\": \"f8cc0c65-495e-4e14-bca1-ed8361052504\"\r\n}"} + body: {string: "{\r\n \"startTime\": \"2017-02-12T05:51:58.0680938+00:00\",\r\ + \n \"endTime\": \"2017-02-12T05:52:01.8649535+00:00\",\r\n \"status\": \"\ + Succeeded\",\r\n \"name\": \"9e9da7f3-8cb4-4e5f-8a00-a1beceaf3f70\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:57:05 GMT'] + Date: ['Sun, 12 Feb 2017 05:52:31 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -2233,21 +2373,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [7e8283da-e758-11e6-85ab-64510658e3b3] + x-ms-client-request-id: [5df11468-f0e7-11e6-8a51-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"c05b0fe2-cdfc-47e5-903a-d751c65b9ff9\"\ + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"987654cb-f4fa-4426-8f3f-c9fda42418e2\"\ ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A4\"\r\n \ \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ ,\r\n \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\ \n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_67DTRZjyk0\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj34.blob.core.windows.net/vhds/osdisk_67DTRZjyk0.vhd\"\ + \ \"name\": \"osdisk_vJe7inxoHG\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"vhd\": {\r\n \"uri\": \"https://ab394fvkdj39.blob.core.windows.net/vhds/osdisk_vJe7inxoHG.vhd\"\ \r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \ \ \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ : \"vm-state-mod\",\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ @@ -2263,13 +2403,13 @@ interactions: location\": \"eastus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod/extensions/enablevmaccess\"\ ,\r\n \"name\": \"enablevmaccess\"\r\n }\r\n ],\r\n \"type\": \"\ Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus\",\r\n \"\ - tags\": {\r\n \"secondtag\": \"2\",\r\n \"firsttag\": \"1\",\r\n \ - \ \"thirdtag\": \"\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ + tags\": {\r\n \"firsttag\": \"1\",\r\n \"thirdtag\": \"\",\r\n \"\ + secondtag\": \"2\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod\"\ ,\r\n \"name\": \"vm-state-mod\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:57:06 GMT'] + Date: ['Sun, 12 Feb 2017 05:52:31 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -2286,25 +2426,25 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [925f7b6c-e758-11e6-a93b-64510658e3b3] + x-ms-client-request-id: [7200f51e-f0e7-11e6-baeb-f4b7e2e85440] method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines/vm-state-mod?api-version=2016-04-30-preview response: body: {string: ''} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/272cdb62-8809-4e73-8c09-d2f9ab08481f?api-version=2016-04-30-preview'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/605826a3-1a1f-4bd6-b17a-9e0b5b6e0c10?api-version=2016-04-30-preview'] Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Tue, 31 Jan 2017 01:57:07 GMT'] + Date: ['Sun, 12 Feb 2017 05:52:32 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/272cdb62-8809-4e73-8c09-d2f9ab08481f?monitor=true&api-version=2016-04-30-preview'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/eastus/operations/605826a3-1a1f-4bd6-b17a-9e0b5b6e0c10?monitor=true&api-version=2016-04-30-preview'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 202, message: Accepted} - request: body: null @@ -2313,20 +2453,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [925f7b6c-e758-11e6-a93b-64510658e3b3] + x-ms-client-request-id: [7200f51e-f0e7-11e6-baeb-f4b7e2e85440] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/272cdb62-8809-4e73-8c09-d2f9ab08481f?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/605826a3-1a1f-4bd6-b17a-9e0b5b6e0c10?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"startTime\": \"2017-01-31T01:57:07.9729421+00:00\",\r\ - \n \"endTime\": \"2017-01-31T01:57:18.2855126+00:00\",\r\n \"status\": \"\ - Succeeded\",\r\n \"name\": \"272cdb62-8809-4e73-8c09-d2f9ab08481f\"\r\n}"} + body: {string: "{\r\n \"startTime\": \"2017-02-12T05:52:31.2086772+00:00\",\r\ + \n \"endTime\": \"2017-02-12T05:52:41.7242553+00:00\",\r\n \"status\": \"\ + Succeeded\",\r\n \"name\": \"605826a3-1a1f-4bd6-b17a-9e0b5b6e0c10\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:57:38 GMT'] + Date: ['Sun, 12 Feb 2017 05:53:02 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -2342,10 +2482,10 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 + computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a5aced64-e758-11e6-af68-64510658e3b3] + x-ms-client-request-id: [85784e10-f0e7-11e6-93fe-f4b7e2e85440] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod/providers/Microsoft.Compute/virtualMachines?api-version=2016-04-30-preview response: @@ -2353,7 +2493,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 01:57:39 GMT'] + Date: ['Sun, 12 Feb 2017 05:53:05 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py index ed05c1fcb..69e4aa2dc 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py @@ -386,7 +386,7 @@ class VMCreateAndStateModificationsScenarioTest(ResourceGroupVCRTestBase): # py self.vm_name = 'vm-state-mod' self.nsg_name = 'mynsg' self.ip_name = 'mypubip' - self.storage_name = 'ab394fvkdj34' + self.storage_name = 'ab394fvkdj39' self.vnet_name = 'myvnet' def test_vm_create_state_modifications(self): @@ -432,8 +432,8 @@ class VMCreateAndStateModificationsScenarioTest(ResourceGroupVCRTestBase): # py ]) self._check_vm_power_state('PowerState/running') - self.cmd('vm access set-linux-user -g {} -n {} -u foouser1 -p Foo12345 '.format(self.resource_group, self.vm_name)) - self.cmd('vm access delete-linux-user -g {} -n {} -u foouser1'.format(self.resource_group, self.vm_name)) + self.cmd('vm user update -g {} -n {} -u foouser1 -p Foo12345 '.format(self.resource_group, self.vm_name)) + self.cmd('vm user delete -g {} -n {} -u foouser1'.format(self.resource_group, self.vm_name)) self.cmd('network nsg show --resource-group {} --name {}'.format( self.resource_group, self.nsg_name), checks=[
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": -1, "issue_text_score": 0, "test_score": -1 }, "num_modified_files": 4 }
0.1
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==1.1.0 -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@27816f4891c85592ad6f06bcc94008fa7d144b69#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-core==1.24.2 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==2.0.0 azure-mgmt-compute==0.33.0 azure-mgmt-containerregistry==0.1.1 azure-mgmt-dns==0.30.0rc6 azure-mgmt-documentdb==0.1.0 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-network==0.30.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-sql==0.2.0 azure-mgmt-storage==0.31.0 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.30.1 azure-nspkg==3.0.2 azure-storage==0.33.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.7.1 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.1.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 wrapt==1.16.0 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==1.1.0 - azure-common==1.1.4 - azure-core==1.24.2 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==2.0.0 - azure-mgmt-compute==0.33.0 - azure-mgmt-containerregistry==0.1.1 - azure-mgmt-dns==0.30.0rc6 - azure-mgmt-documentdb==0.1.0 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-network==0.30.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-sql==0.2.0 - azure-mgmt-storage==0.31.0 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.30.1 - azure-nspkg==3.0.2 - azure-storage==0.33.0 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.7.1 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.1.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - wrapt==1.16.0 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMCreateAndStateModificationsScenarioTest::test_vm_create_state_modifications" ]
[ "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMAvailSetScenarioTest::test_vm_availset" ]
[ "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMImageListByAliasesScenarioTest::test_vm_image_list_by_alias", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMUsageScenarioTest::test_vm_usage", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMImageListThruServiceScenarioTest::test_vm_images_list_thru_services", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMOpenPortTest::test_vm_open_port", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMShowListSizesListIPAddressesScenarioTest::test_vm_show_list_sizes_list_ip_addresses", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMSizeListScenarioTest::test_vm_size_list", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMImageListOffersScenarioTest::test_vm_image_list_offers", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMImageListPublishersScenarioTest::test_vm_image_list_publishers", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMImageListSkusScenarioTest::test_vm_image_list_skus", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMImageShowScenarioTest::test_vm_image_show", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMGeneralizeScenarioTest::test_vm_generalize", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMCreateFromUnmanagedDiskTest::test_create_vm_from_unmanaged_disk", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMManagedDiskScenarioTest::test_managed_disk", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMNoWaitScenarioTest::test_vm_create_no_wait", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMExtensionScenarioTest::test_vm_extension", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMMachineExtensionImageScenarioTest::test_vm_machine_extension_image", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMExtensionImageSearchScenarioTest::test_vm_extension_image_search", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMCreateUbuntuScenarioTest::test_vm_create_ubuntu", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMMultiNicScenarioTest::test_vm_create_multi_nics", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMCreateNoneOptionsTest::test_vm_create_none_options", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMBootDiagnostics::test_vm_boot_diagnostics", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMSSExtensionInstallTest::test_vmss_extension", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::DiagnosticsExtensionInstallTest::test_diagnostics_extension_install", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMCreateExistingOptions::test_vm_create_existing_options", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMCreateCustomIP::test_vm_create_custom_ip", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMUnmanagedDataDiskTest::test_vm_data_unmanaged_disk", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMCreateCustomDataScenarioTest::test_vm_create_custom_data", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::AzureContainerServiceScenarioTest::test_acs_create_update", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMSSCreateAndModify::test_vmss_create_and_modify", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMSSCreateOptions::test_vmss_create_options", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMSSCreateNoneOptionsTest::test_vmss_create_none_options", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMSSCreateExistingOptions::test_vmss_create_existing_options", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMSSVMsScenarioTest::test_vmss_vms", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMSSCustomDataScenarioTest::test_vmss_create_custom_data", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_commands.py::VMSSNicScenarioTest::test_vmss_nics" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_azure-cli-2053
Azure__azure-cli-2078
efeceb146b93793ee93b2dc07e14ac58a782b45a
2017-02-14 22:35:29
1576ec67f5029db062579da230902a559acbb9fe
diff --git a/scripts/automation/commandlint/__init__.py b/scripts/automation/commandlint/__init__.py new file mode 100644 index 000000000..433670bfb --- /dev/null +++ b/scripts/automation/commandlint/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +"""Command linting automation code""" diff --git a/scripts/automation/commandlint/run.py b/scripts/automation/commandlint/run.py new file mode 100644 index 000000000..b60831923 --- /dev/null +++ b/scripts/automation/commandlint/run.py @@ -0,0 +1,90 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +from __future__ import print_function +import pkgutil + +import argparse +import os +import sys +import json +import yaml +from importlib import import_module + +from automation.utilities.path import filter_user_selected_modules_with_tests +from azure.cli.core.application import APPLICATION, Application +from azure.cli.core.application import Configuration +from azure.cli.core.commands import load_params, _update_command_definitions +from azure.cli.core.help_files import helps + + + +def dump_no_help(modules): + cmd_table = APPLICATION.configuration.get_command_table() + + exit_val = 0 + for cmd in cmd_table: + cmd_table[cmd].load_arguments() + + for mod in modules: + try: + import_module('azure.cli.command_modules.' + mod).load_params(mod) + except Exception as ex: + print("EXCEPTION: " + str(mod)) + + _update_command_definitions(cmd_table) + + command_list = [] + subgroups_list = [] + parameters = {} + for cmd in cmd_table: + if not cmd_table[cmd].description and cmd not in helps: + command_list.append(cmd) + exit_val = 1 + group_name = " ".join(cmd.split()[:-1]) + if group_name not in helps: + exit_val = 1 + if group_name not in subgroups_list: + subgroups_list.append(group_name) + + param_list = [] + for key in cmd_table[cmd].arguments: + if not cmd_table[cmd].arguments[key].type.settings.get('help'): + exit_val = 1 + param_list.append(cmd_table[cmd].arguments[key].name) + if param_list: + parameters[cmd] = param_list + + for cmd in helps: + diction_help = yaml.load(helps[cmd]) + if "short-summary" in diction_help and "type" in diction_help: + if diction_help["type"] == "command" and cmd in command_list: + command_list.remove(cmd) + elif diction_help["type"] == "group" and cmd in subgroups_list: + subgroups_list.remove(cmd) + if "parameters" in diction_help: + for param in diction_help["parameters"]: + if "short-summary" in param and param["name"].split()[0] in parameters: + parameters.pop(cmd, None) + + data = { + "subgroups" : subgroups_list, + "commands" : command_list, + "parameters" : parameters + } + + print(json.dumps(data, indent=2, sort_keys=True)) + + return exit_val + +if __name__ == '__main__': + try: + mods_ns_pkg = import_module('azure.cli.command_modules') + installed_command_modules = [modname for _, modname, _ in + pkgutil.iter_modules(mods_ns_pkg.__path__)] + except ImportError: + pass + exit_value = dump_no_help(installed_command_modules) + sys.exit(exit_value) + diff --git a/src/azure-cli-core/azure/cli/core/_util.py b/src/azure-cli-core/azure/cli/core/_util.py index 6b440e2cc..48841979b 100644 --- a/src/azure-cli-core/azure/cli/core/_util.py +++ b/src/azure-cli-core/azure/cli/core/_util.py @@ -169,8 +169,10 @@ def b64encode(s): return encoded.decode('latin-1') -def random_string(length=16, force_lower=False): +def random_string(length=16, force_lower=False, digits_only=False): from string import ascii_letters, digits, ascii_lowercase from random import choice - choice_set = ascii_lowercase + digits if force_lower else ascii_letters + digits + choice_set = digits + if not digits_only: + choice_set += ascii_lowercase if force_lower else ascii_letters return ''.join([choice(choice_set) for _ in range(length)]) diff --git a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_help.py b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_help.py index 09655d5b5..21217c0bb 100644 --- a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_help.py +++ b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_help.py @@ -223,6 +223,31 @@ helps['appservice web config hostname list'] = """ short-summary: list all hostname bindings """ +helps['appservice web config backup list'] = """ + type: command + short-summary: list all of an app's backups +""" + +helps['appservice web config backup create'] = """ + type: command + short-summary: create a backup of a web app +""" + +helps['appservice web config backup show'] = """ + type: command + short-summary: show a web app's backup schedule +""" + +helps['appservice web config backup update'] = """ + type: command + short-summary: configure a new backup schedule +""" + +helps['appservice web config backup restore'] = """ + type: command + short-summary: restore an app from a backup +""" + helps['appservice web browse'] = """ type: command short-summary: Open the web app in a browser diff --git a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_params.py b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_params.py index 2cd36d2a5..0369a2fa7 100644 --- a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_params.py +++ b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_params.py @@ -11,6 +11,8 @@ from azure.cli.core.commands.parameters import (resource_group_name_type, locati get_resource_name_completion_list, file_type, CliArgumentType, ignore_type, enum_choice_list) +from azure.mgmt.web.models import DatabaseType + from ._client_factory import web_client_factory def _generic_site_operation(resource_group_name, name, operation_name, slot=None, #pylint: disable=too-many-arguments @@ -107,6 +109,23 @@ register_cli_argument('appservice web config update', 'app_command_line', option register_cli_argument('appservice web config hostname', 'webapp', help="webapp name", completer=get_resource_name_completion_list('Microsoft.Web/sites'), id_part='name') register_cli_argument('appservice web config hostname', 'name', arg_type=name_arg_type, completer=get_hostname_completion_list, help="hostname assigned to the site, such as custom domains", id_part='child_name') +register_cli_argument('appservice web config backup', 'storage_account_url', help='URL with SAS token to the blob storage container', options_list=['--container-url']) +register_cli_argument('appservice web config backup', 'webapp_name', help='The name of the webapp') +register_cli_argument('appservice web config backup', 'db_name', help='Name of the database in the backup', arg_group='Database') +register_cli_argument('appservice web config backup', 'db_connection_string', help='Connection string for the database in the backup', arg_group='Database') +register_cli_argument('appservice web config backup', 'db_type', help='Type of database in the backup', arg_group='Database', **enum_choice_list(DatabaseType)) + +register_cli_argument('appservice web config backup create', 'backup_name', help='Name of the backup. If unspecified, the backup will be named with the webapp name and a timestamp') + +register_cli_argument('appservice web config backup update', 'frequency', help='How often to backup. Use a number followed by d or h, e.g. 5d = 5 days, 2h = 2 hours') +register_cli_argument('appservice web config backup update', 'keep_at_least_one_backup', help='Always keep one backup, regardless of how old it is', options_list=['--retain-one'], **enum_choice_list(two_states_switch)) +register_cli_argument('appservice web config backup update', 'retention_period_in_days', help='How many days to keep a backup before automatically deleting it. Set to 0 for indefinite retention', options_list=['--retention']) + +register_cli_argument('appservice web config backup restore', 'backup_name', help='Name of the backup to restore') +register_cli_argument('appservice web config backup restore', 'target_name', help='The name to use for the restored webapp. If unspecified, will default to the name that was used when the backup was created') +register_cli_argument('appservice web config backup restore', 'overwrite', help='Overwrite the source webapp, if --target-name is not specified', action='store_true') +register_cli_argument('appservice web config backup restore', 'ignore_hostname_conflict', help='Ignores custom hostnames stored in the backup', action='store_true') + register_cli_argument('appservice web source-control', 'manual_integration', action='store_true', help='disable automatic sync between source control and web') register_cli_argument('appservice web source-control', 'repo_url', help='repository url to pull the latest source from, e.g. https://github.com/foo/foo-web') register_cli_argument('appservice web source-control', 'branch', help='the branch name of the repository') diff --git a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/commands.py b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/commands.py index d65548f44..13f4d13f8 100644 --- a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/commands.py +++ b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/commands.py @@ -28,6 +28,11 @@ cli_command(__name__, 'appservice web config hostname delete', 'azure.cli.comman cli_command(__name__, 'appservice web config container update', 'azure.cli.command_modules.appservice.custom#update_container_settings') cli_command(__name__, 'appservice web config container delete', 'azure.cli.command_modules.appservice.custom#delete_container_settings') cli_command(__name__, 'appservice web config container show', 'azure.cli.command_modules.appservice.custom#show_container_settings') +cli_command(__name__, 'appservice web config backup list', 'azure.cli.command_modules.appservice.custom#list_backups') +cli_command(__name__, 'appservice web config backup show', 'azure.cli.command_modules.appservice.custom#show_backup_configuration') +cli_command(__name__, 'appservice web config backup create', 'azure.cli.command_modules.appservice.custom#create_backup') +cli_command(__name__, 'appservice web config backup update', 'azure.cli.command_modules.appservice.custom#update_backup_schedule') +cli_command(__name__, 'appservice web config backup restore', 'azure.cli.command_modules.appservice.custom#restore_backup') factory = lambda _: web_client_factory().web_apps cli_command(__name__, 'appservice web source-control config-local-git', 'azure.cli.command_modules.appservice.custom#enable_local_git') diff --git a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/custom.py b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/custom.py index e14f621e5..a19a92f9a 100644 --- a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/custom.py +++ b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/custom.py @@ -12,8 +12,12 @@ try: except ImportError: from urlparse import urlparse # pylint: disable=import-error +from msrestazure.azure_exceptions import CloudError + from azure.mgmt.web.models import (Site, SiteConfig, User, AppServicePlan, - SkuDescription, SslState, HostNameBinding) + SkuDescription, SslState, HostNameBinding, + BackupRequest, DatabaseBackupSetting, BackupSchedule, + RestoreRequest, FrequencyUnit) from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.core.commands.arm import is_valid_resource_id, parse_resource_id @@ -293,6 +297,133 @@ def update_app_service_plan(instance, sku=None, number_of_workers=None, instance.admin_site_name = admin_site_name return instance +def show_backup_configuration(resource_group_name, webapp_name, slot=None): + try: + return _generic_site_operation(resource_group_name, webapp_name, + 'get_backup_configuration', slot) + except: + raise CLIError('Backup configuration not found') + +def list_backups(resource_group_name, webapp_name, slot=None): + return _generic_site_operation(resource_group_name, webapp_name, 'list_backups', + slot) + +def create_backup(resource_group_name, webapp_name, storage_account_url, + db_name=None, db_type=None, + db_connection_string=None, backup_name=None, slot=None): + client = web_client_factory() + if backup_name and backup_name.lower().endswith('.zip'): + backup_name = backup_name[:-4] + location = _get_location_from_webapp(client, resource_group_name, webapp_name) + db_setting = _create_db_setting(db_name, db_type, db_connection_string) + backup_request = BackupRequest(location, backup_request_name=backup_name, + storage_account_url=storage_account_url, databases=db_setting) + if slot: + return client.web_apps.backup_slot(resource_group_name, webapp_name, backup_request, slot) + else: + return client.web_apps.backup(resource_group_name, webapp_name, backup_request) + +def update_backup_schedule(resource_group_name, webapp_name, storage_account_url=None, + frequency=None, keep_at_least_one_backup=None, + retention_period_in_days=None, db_name=None, + db_connection_string=None, db_type=None, slot=None): + client = web_client_factory() + location = _get_location_from_webapp(client, resource_group_name, webapp_name) + configuration = None + + try: + configuration = _generic_site_operation(resource_group_name, webapp_name, + 'get_backup_configuration', slot) + except CloudError: + # No configuration set yet + if not all([storage_account_url, frequency, retention_period_in_days, + keep_at_least_one_backup]): + raise CLIError('No backup configuration found. A configuration must be created. ' + + 'Usage: --container-url URL --frequency TIME --retention DAYS ' + + '--retain-one TRUE/FALSE') + + # If arguments were not specified, use the values in the current backup schedule + if storage_account_url is None: + storage_account_url = configuration.storage_account_url + + if retention_period_in_days is None: + retention_period_in_days = configuration.backup_schedule.retention_period_in_days + + if keep_at_least_one_backup is None: + keep_at_least_one_backup = configuration.backup_schedule.keep_at_least_one_backup + else: + keep_at_least_one_backup = keep_at_least_one_backup.lower() == 'true' + + if frequency: + # Parse schedule frequency + frequency_num, frequency_unit = _parse_frequency(frequency) + else: + frequency_num = configuration.backup_schedule.frequency_interval + frequency_unit = configuration.backup_schedule.frequency_unit + + if configuration and configuration.databases: + db = configuration.databases[0] + db_type = db_type or db.database_type + db_name = db_name or db.name + db_connection_string = db_connection_string or db.connection_string + + db_setting = _create_db_setting(db_name, db_type, db_connection_string) + + backup_schedule = BackupSchedule(frequency_num, frequency_unit.name, + keep_at_least_one_backup, retention_period_in_days) + backup_request = BackupRequest(location, backup_schedule=backup_schedule, enabled=True, + storage_account_url=storage_account_url, databases=db_setting) + if slot: + return client.web_apps.update_backup_configuration_slot(resource_group_name, webapp_name, + backup_request, slot) + else: + return client.web_apps.update_backup_configuration(resource_group_name, webapp_name, + backup_request) + +def restore_backup(resource_group_name, webapp_name, storage_account_url, backup_name, + db_name=None, db_type=None, db_connection_string=None, + target_name=None, overwrite=None, ignore_hostname_conflict=None, slot=None): + client = web_client_factory() + storage_blob_name = backup_name + if not storage_blob_name.lower().endswith('.zip'): + storage_blob_name += '.zip' + location = _get_location_from_webapp(client, resource_group_name, webapp_name) + db_setting = _create_db_setting(db_name, db_type, db_connection_string) + restore_request = RestoreRequest(location, storage_account_url=storage_account_url, + blob_name=storage_blob_name, overwrite=overwrite, + site_name=target_name, databases=db_setting, + ignore_conflicting_host_names=ignore_hostname_conflict) + if slot: + return client.web_apps.restore(resource_group_name, webapp_name, 0, restore_request, slot) + else: + return client.web_apps.restore(resource_group_name, webapp_name, 0, restore_request) + +def _create_db_setting(db_name, db_type, db_connection_string): + if all([db_name, db_type, db_connection_string]): + return [DatabaseBackupSetting(db_type, db_name, connection_string=db_connection_string)] + elif any([db_name, db_type, db_connection_string]): + raise CLIError('usage error: --db-name NAME --db-type TYPE --db-connection-string STRING') + +def _parse_frequency(frequency): + unit_part = frequency.lower()[-1] + if unit_part == 'd': + frequency_unit = FrequencyUnit.day + elif unit_part == 'h': + # pylint: disable=redefined-variable-type + frequency_unit = FrequencyUnit.hour + else: + raise CLIError('Frequency must end with d or h for "day" or "hour"') + + try: + frequency_num = int(frequency[:-1]) + except ValueError: + raise CLIError('Frequency must start with a number') + + if frequency_num < 0: + raise CLIError('Frequency must be positive') + + return frequency_num, frequency_unit + def _normalize_sku(sku): sku = sku.upper() if sku == 'FREE': diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_help.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_help.py index 92cd9ecc3..091446abe 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_help.py +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_help.py @@ -35,6 +35,11 @@ helps['storage account'] = """ short-summary: Manage storage accounts. """ +helps['storage account update'] = """ + type: command + short-summary: Update the properties of a storage account. +""" + helps['storage account keys'] = """ type: group short-summary: Manage storage account keys. diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/commands.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/commands.py index 0d1cc02b8..bc4536dcc 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/commands.py +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/commands.py @@ -24,185 +24,182 @@ from azure.cli.command_modules.storage._validators import \ transform_url, transform_storage_list_output, transform_container_permission_output, create_boolean_result_output_transformer) from azure.cli.core.commands import cli_command +from azure.cli.core.commands.arm import cli_generic_update_command + +mgmt_path = 'azure.mgmt.storage.operations.storage_accounts_operations#StorageAccountsOperations.' +custom_path = 'azure.cli.command_modules.storage.custom#' +file_service_path = 'azure.storage.file.fileservice#FileService.' +block_blob_path = 'azure.storage.blob.blockblobservice#BlockBlobService.' +base_blob_path = 'azure.storage.blob.baseblobservice#BaseBlobService.' +table_path = 'azure.storage.table.tableservice#TableService.' +queue_path = 'azure.storage.queue.queueservice#QueueService.' # storage account commands factory = lambda kwargs: storage_client_factory().storage_accounts # noqa: E731 lambda vs def -cli_command(__name__, 'storage account check-name', 'azure.mgmt.storage.operations.storage_accounts_operations#StorageAccountsOperations.check_name_availability', factory) -cli_command(__name__, 'storage account delete', 'azure.mgmt.storage.operations.storage_accounts_operations#StorageAccountsOperations.delete', factory, confirmation=True) -cli_command(__name__, 'storage account show', 'azure.mgmt.storage.operations.storage_accounts_operations#StorageAccountsOperations.get_properties', factory) -cli_command(__name__, 'storage account create', 'azure.cli.command_modules.storage.custom#create_storage_account') -cli_command(__name__, 'storage account list', 'azure.cli.command_modules.storage.custom#list_storage_accounts') -cli_command(__name__, 'storage account show-usage', 'azure.cli.command_modules.storage.custom#show_storage_account_usage') -cli_command(__name__, 'storage account update', 'azure.cli.command_modules.storage.custom#set_storage_account_properties') -cli_command(__name__, 'storage account show-connection-string', 'azure.cli.command_modules.storage.custom#show_storage_account_connection_string') -cli_command(__name__, 'storage account keys renew', 'azure.mgmt.storage.operations.storage_accounts_operations#StorageAccountsOperations.regenerate_key', factory, transform=lambda x: x.keys) -cli_command(__name__, 'storage account keys list', 'azure.mgmt.storage.operations.storage_accounts_operations#StorageAccountsOperations.list_keys', factory, transform=lambda x: x.keys) +cli_command(__name__, 'storage account check-name', mgmt_path + 'check_name_availability', factory) +cli_command(__name__, 'storage account delete', mgmt_path + 'delete', factory, confirmation=True) +cli_command(__name__, 'storage account show', mgmt_path + 'get_properties', factory) +cli_command(__name__, 'storage account create', custom_path + 'create_storage_account') +cli_command(__name__, 'storage account list', custom_path + 'list_storage_accounts') +cli_command(__name__, 'storage account show-usage', custom_path + 'show_storage_account_usage') +cli_command(__name__, 'storage account show-connection-string', custom_path + 'show_storage_account_connection_string') +cli_command(__name__, 'storage account keys renew', mgmt_path + 'regenerate_key', factory, transform=lambda x: x.keys) +cli_command(__name__, 'storage account keys list', mgmt_path + 'list_keys', factory, transform=lambda x: x.keys) +cli_generic_update_command(__name__, 'storage account update', + mgmt_path + 'get_properties', + mgmt_path + 'create', factory, + custom_function_op=custom_path + 'update_storage_account') cli_storage_data_plane_command('storage account generate-sas', 'azure.storage.cloudstorageaccount#CloudStorageAccount.generate_shared_access_signature', cloud_storage_account_service_factory) # container commands factory = blob_data_service_factory -cli_storage_data_plane_command('storage container list', 'azure.storage.blob.blockblobservice#BlockBlobService.list_containers', factory, transform=transform_storage_list_output, table_transformer=transform_container_list) -cli_storage_data_plane_command('storage container delete', 'azure.storage.blob.blockblobservice#BlockBlobService.delete_container', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) -cli_storage_data_plane_command('storage container show', 'azure.storage.blob.blockblobservice#BlockBlobService.get_container_properties', factory, table_transformer=transform_container_show) -cli_storage_data_plane_command('storage container create', 'azure.storage.blob.blockblobservice#BlockBlobService.create_container', factory, transform=create_boolean_result_output_transformer('created'), table_transformer=transform_boolean_for_table) -cli_storage_data_plane_command('storage container generate-sas', 'azure.storage.blob.blockblobservice#BlockBlobService.generate_container_shared_access_signature', factory) -cli_storage_data_plane_command('storage container metadata update', 'azure.storage.blob.blockblobservice#BlockBlobService.set_container_metadata', factory) -cli_storage_data_plane_command('storage container metadata show', 'azure.storage.blob.blockblobservice#BlockBlobService.get_container_metadata', factory) -cli_storage_data_plane_command('storage container lease acquire', 'azure.storage.blob.blockblobservice#BlockBlobService.acquire_container_lease', factory) -cli_storage_data_plane_command('storage container lease renew', 'azure.storage.blob.blockblobservice#BlockBlobService.renew_container_lease', factory) -cli_storage_data_plane_command('storage container lease release', 'azure.storage.blob.blockblobservice#BlockBlobService.release_container_lease', factory) -cli_storage_data_plane_command('storage container lease change', 'azure.storage.blob.blockblobservice#BlockBlobService.change_container_lease', factory) -cli_storage_data_plane_command('storage container lease break', 'azure.storage.blob.blockblobservice#BlockBlobService.break_container_lease', factory) -cli_storage_data_plane_command('storage container exists', 'azure.storage.blob.baseblobservice#BaseBlobService.exists', factory, transform=create_boolean_result_output_transformer('exists'), table_transformer=transform_boolean_for_table) -cli_storage_data_plane_command('storage container set-permission', 'azure.storage.blob.baseblobservice#BaseBlobService.set_container_acl', factory) -cli_storage_data_plane_command('storage container show-permission', 'azure.storage.blob.baseblobservice#BaseBlobService.get_container_acl', factory, transform=transform_container_permission_output) -cli_storage_data_plane_command('storage container policy create', 'azure.cli.command_modules.storage.custom#create_acl_policy', factory) -cli_storage_data_plane_command('storage container policy delete', 'azure.cli.command_modules.storage.custom#delete_acl_policy', factory) -cli_storage_data_plane_command('storage container policy show', 'azure.cli.command_modules.storage.custom#get_acl_policy', factory) -cli_storage_data_plane_command('storage container policy list', 'azure.cli.command_modules.storage.custom#list_acl_policies', factory, table_transformer=transform_acl_list_output) -cli_storage_data_plane_command('storage container policy update', 'azure.cli.command_modules.storage.custom#set_acl_policy', factory) +cli_storage_data_plane_command('storage container list', block_blob_path + 'list_containers', factory, transform=transform_storage_list_output, table_transformer=transform_container_list) +cli_storage_data_plane_command('storage container delete', block_blob_path + 'delete_container', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) +cli_storage_data_plane_command('storage container show', block_blob_path + 'get_container_properties', factory, table_transformer=transform_container_show) +cli_storage_data_plane_command('storage container create', block_blob_path + 'create_container', factory, transform=create_boolean_result_output_transformer('created'), table_transformer=transform_boolean_for_table) +cli_storage_data_plane_command('storage container generate-sas', block_blob_path + 'generate_container_shared_access_signature', factory) +cli_storage_data_plane_command('storage container metadata update', block_blob_path + 'set_container_metadata', factory) +cli_storage_data_plane_command('storage container metadata show', block_blob_path + 'get_container_metadata', factory) +cli_storage_data_plane_command('storage container lease acquire', block_blob_path + 'acquire_container_lease', factory) +cli_storage_data_plane_command('storage container lease renew', block_blob_path + 'renew_container_lease', factory) +cli_storage_data_plane_command('storage container lease release', block_blob_path + 'release_container_lease', factory) +cli_storage_data_plane_command('storage container lease change', block_blob_path + 'change_container_lease', factory) +cli_storage_data_plane_command('storage container lease break', block_blob_path + 'break_container_lease', factory) +cli_storage_data_plane_command('storage container exists', base_blob_path + 'exists', factory, transform=create_boolean_result_output_transformer('exists'), table_transformer=transform_boolean_for_table) +cli_storage_data_plane_command('storage container set-permission', base_blob_path + 'set_container_acl', factory) +cli_storage_data_plane_command('storage container show-permission', base_blob_path + 'get_container_acl', factory, transform=transform_container_permission_output) +cli_storage_data_plane_command('storage container policy create', custom_path + 'create_acl_policy', factory) +cli_storage_data_plane_command('storage container policy delete', custom_path + 'delete_acl_policy', factory) +cli_storage_data_plane_command('storage container policy show', custom_path + 'get_acl_policy', factory) +cli_storage_data_plane_command('storage container policy list', custom_path + 'list_acl_policies', factory, table_transformer=transform_acl_list_output) +cli_storage_data_plane_command('storage container policy update', custom_path + 'set_acl_policy', factory) # blob commands -cli_storage_data_plane_command('storage blob list', 'azure.storage.blob.blockblobservice#BlockBlobService.list_blobs', factory, transform=transform_storage_list_output, table_transformer=transform_blob_output) -cli_storage_data_plane_command('storage blob delete', 'azure.storage.blob.blockblobservice#BlockBlobService.delete_blob', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) -cli_storage_data_plane_command('storage blob generate-sas', 'azure.storage.blob.blockblobservice#BlockBlobService.generate_blob_shared_access_signature', factory) -cli_storage_data_plane_command('storage blob url', 'azure.storage.blob.blockblobservice#BlockBlobService.make_blob_url', factory, transform=transform_url) -cli_storage_data_plane_command('storage blob snapshot', 'azure.storage.blob.blockblobservice#BlockBlobService.snapshot_blob', factory) -cli_storage_data_plane_command('storage blob show', 'azure.storage.blob.blockblobservice#BlockBlobService.get_blob_properties', factory, table_transformer=transform_blob_output) -cli_storage_data_plane_command('storage blob update', 'azure.storage.blob.blockblobservice#BlockBlobService.set_blob_properties', factory) -cli_storage_data_plane_command('storage blob exists', 'azure.storage.blob.baseblobservice#BaseBlobService.exists', factory, transform=create_boolean_result_output_transformer('exists')) -cli_storage_data_plane_command('storage blob download', 'azure.storage.blob.baseblobservice#BaseBlobService.get_blob_to_path', factory) -cli_storage_data_plane_command('storage blob upload', 'azure.cli.command_modules.storage.custom#upload_blob', factory) -cli_storage_data_plane_command('storage blob metadata show', 'azure.storage.blob.blockblobservice#BlockBlobService.get_blob_metadata', factory) -cli_storage_data_plane_command('storage blob metadata update', 'azure.storage.blob.blockblobservice#BlockBlobService.set_blob_metadata', factory) -cli_storage_data_plane_command('storage blob service-properties show', 'azure.storage.blob.baseblobservice#BaseBlobService.get_blob_service_properties', factory) -cli_storage_data_plane_command('storage blob lease acquire', 'azure.storage.blob.blockblobservice#BlockBlobService.acquire_blob_lease', factory) -cli_storage_data_plane_command('storage blob lease renew', 'azure.storage.blob.blockblobservice#BlockBlobService.renew_blob_lease', factory) -cli_storage_data_plane_command('storage blob lease release', 'azure.storage.blob.blockblobservice#BlockBlobService.release_blob_lease', factory) -cli_storage_data_plane_command('storage blob lease change', 'azure.storage.blob.blockblobservice#BlockBlobService.change_blob_lease', factory) -cli_storage_data_plane_command('storage blob lease break', 'azure.storage.blob.blockblobservice#BlockBlobService.break_blob_lease', factory) -cli_storage_data_plane_command('storage blob copy start', 'azure.storage.blob.blockblobservice#BlockBlobService.copy_blob', factory) +cli_storage_data_plane_command('storage blob list', block_blob_path + 'list_blobs', factory, transform=transform_storage_list_output, table_transformer=transform_blob_output) +cli_storage_data_plane_command('storage blob delete', block_blob_path + 'delete_blob', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) +cli_storage_data_plane_command('storage blob generate-sas', block_blob_path + 'generate_blob_shared_access_signature', factory) +cli_storage_data_plane_command('storage blob url', block_blob_path + 'make_blob_url', factory, transform=transform_url) +cli_storage_data_plane_command('storage blob snapshot', block_blob_path + 'snapshot_blob', factory) +cli_storage_data_plane_command('storage blob show', block_blob_path + 'get_blob_properties', factory, table_transformer=transform_blob_output) +cli_storage_data_plane_command('storage blob update', block_blob_path + 'set_blob_properties', factory) +cli_storage_data_plane_command('storage blob exists', base_blob_path + 'exists', factory, transform=create_boolean_result_output_transformer('exists')) +cli_storage_data_plane_command('storage blob download', base_blob_path + 'get_blob_to_path', factory) +cli_storage_data_plane_command('storage blob upload', custom_path + 'upload_blob', factory) +cli_storage_data_plane_command('storage blob metadata show', block_blob_path + 'get_blob_metadata', factory) +cli_storage_data_plane_command('storage blob metadata update', block_blob_path + 'set_blob_metadata', factory) +cli_storage_data_plane_command('storage blob service-properties show', base_blob_path + 'get_blob_service_properties', factory) +cli_storage_data_plane_command('storage blob lease acquire', block_blob_path + 'acquire_blob_lease', factory) +cli_storage_data_plane_command('storage blob lease renew', block_blob_path + 'renew_blob_lease', factory) +cli_storage_data_plane_command('storage blob lease release', block_blob_path + 'release_blob_lease', factory) +cli_storage_data_plane_command('storage blob lease change', block_blob_path + 'change_blob_lease', factory) +cli_storage_data_plane_command('storage blob lease break', block_blob_path + 'break_blob_lease', factory) +cli_storage_data_plane_command('storage blob copy start', block_blob_path + 'copy_blob', factory) cli_storage_data_plane_command('storage blob copy start-batch', 'azure.cli.command_modules.storage.blob#storage_blob_copy_batch', factory) -cli_storage_data_plane_command('storage blob copy cancel', 'azure.storage.blob.blockblobservice#BlockBlobService.abort_copy_blob', factory) - -cli_storage_data_plane_command('storage blob upload-batch', - 'azure.cli.command_modules.storage.blob#storage_blob_upload_batch', - factory) - -cli_storage_data_plane_command('storage blob download-batch', - 'azure.cli.command_modules.storage.blob#storage_blob_download_batch', - factory) +cli_storage_data_plane_command('storage blob copy cancel', block_blob_path + 'abort_copy_blob', factory) +cli_storage_data_plane_command('storage blob upload-batch', 'azure.cli.command_modules.storage.blob#storage_blob_upload_batch', factory) +cli_storage_data_plane_command('storage blob download-batch', 'azure.cli.command_modules.storage.blob#storage_blob_download_batch', factory) # share commands factory = file_data_service_factory -cli_storage_data_plane_command('storage share list', 'azure.storage.file.fileservice#FileService.list_shares', factory, transform=transform_storage_list_output, table_transformer=transform_share_list) -cli_storage_data_plane_command('storage share create', 'azure.storage.file.fileservice#FileService.create_share', factory, transform=create_boolean_result_output_transformer('created'), table_transformer=transform_boolean_for_table) -cli_storage_data_plane_command('storage share delete', 'azure.storage.file.fileservice#FileService.delete_share', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) -cli_storage_data_plane_command('storage share generate-sas', 'azure.storage.file.fileservice#FileService.generate_share_shared_access_signature', factory) -cli_storage_data_plane_command('storage share stats', 'azure.storage.file.fileservice#FileService.get_share_stats', factory) -cli_storage_data_plane_command('storage share show', 'azure.storage.file.fileservice#FileService.get_share_properties', factory) -cli_storage_data_plane_command('storage share update', 'azure.storage.file.fileservice#FileService.set_share_properties', factory) -cli_storage_data_plane_command('storage share metadata show', 'azure.storage.file.fileservice#FileService.get_share_metadata', factory) -cli_storage_data_plane_command('storage share metadata update', 'azure.storage.file.fileservice#FileService.set_share_metadata', factory) -cli_storage_data_plane_command('storage share exists', 'azure.storage.file.fileservice#FileService.exists', factory, transform=create_boolean_result_output_transformer('exists')) -cli_storage_data_plane_command('storage share policy create', 'azure.cli.command_modules.storage.custom#create_acl_policy', factory) -cli_storage_data_plane_command('storage share policy delete', 'azure.cli.command_modules.storage.custom#delete_acl_policy', factory) -cli_storage_data_plane_command('storage share policy show', 'azure.cli.command_modules.storage.custom#get_acl_policy', factory) -cli_storage_data_plane_command('storage share policy list', 'azure.cli.command_modules.storage.custom#list_acl_policies', factory, table_transformer=transform_acl_list_output) -cli_storage_data_plane_command('storage share policy update', 'azure.cli.command_modules.storage.custom#set_acl_policy', factory) +cli_storage_data_plane_command('storage share list', file_service_path + 'list_shares', factory, transform=transform_storage_list_output, table_transformer=transform_share_list) +cli_storage_data_plane_command('storage share create', file_service_path + 'create_share', factory, transform=create_boolean_result_output_transformer('created'), table_transformer=transform_boolean_for_table) +cli_storage_data_plane_command('storage share delete', file_service_path + 'delete_share', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) +cli_storage_data_plane_command('storage share generate-sas', file_service_path + 'generate_share_shared_access_signature', factory) +cli_storage_data_plane_command('storage share stats', file_service_path + 'get_share_stats', factory) +cli_storage_data_plane_command('storage share show', file_service_path + 'get_share_properties', factory) +cli_storage_data_plane_command('storage share update', file_service_path + 'set_share_properties', factory) +cli_storage_data_plane_command('storage share metadata show', file_service_path + 'get_share_metadata', factory) +cli_storage_data_plane_command('storage share metadata update', file_service_path + 'set_share_metadata', factory) +cli_storage_data_plane_command('storage share exists', file_service_path + 'exists', factory, transform=create_boolean_result_output_transformer('exists')) +cli_storage_data_plane_command('storage share policy create', custom_path + 'create_acl_policy', factory) +cli_storage_data_plane_command('storage share policy delete', custom_path + 'delete_acl_policy', factory) +cli_storage_data_plane_command('storage share policy show', custom_path + 'get_acl_policy', factory) +cli_storage_data_plane_command('storage share policy list', custom_path + 'list_acl_policies', factory, table_transformer=transform_acl_list_output) +cli_storage_data_plane_command('storage share policy update', custom_path + 'set_acl_policy', factory) # directory commands -cli_storage_data_plane_command('storage directory create', 'azure.storage.file.fileservice#FileService.create_directory', factory, transform=create_boolean_result_output_transformer('created'), table_transformer=transform_boolean_for_table) -cli_storage_data_plane_command('storage directory delete', 'azure.storage.file.fileservice#FileService.delete_directory', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) -cli_storage_data_plane_command('storage directory show', 'azure.storage.file.fileservice#FileService.get_directory_properties', factory, table_transformer=transform_file_output) -cli_storage_data_plane_command('storage directory list', 'azure.cli.command_modules.storage.custom#list_share_directories', factory, transform=transform_file_directory_result, table_transformer=transform_file_output) -cli_storage_data_plane_command('storage directory exists', 'azure.storage.file.fileservice#FileService.exists', factory, transform=create_boolean_result_output_transformer('exists')) -cli_storage_data_plane_command('storage directory metadata show', 'azure.storage.file.fileservice#FileService.get_directory_metadata', factory) -cli_storage_data_plane_command('storage directory metadata update', 'azure.storage.file.fileservice#FileService.set_directory_metadata', factory) +cli_storage_data_plane_command('storage directory create', file_service_path + 'create_directory', factory, transform=create_boolean_result_output_transformer('created'), table_transformer=transform_boolean_for_table) +cli_storage_data_plane_command('storage directory delete', file_service_path + 'delete_directory', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) +cli_storage_data_plane_command('storage directory show', file_service_path + 'get_directory_properties', factory, table_transformer=transform_file_output) +cli_storage_data_plane_command('storage directory list', custom_path + 'list_share_directories', factory, transform=transform_file_directory_result, table_transformer=transform_file_output) +cli_storage_data_plane_command('storage directory exists', file_service_path + 'exists', factory, transform=create_boolean_result_output_transformer('exists')) +cli_storage_data_plane_command('storage directory metadata show', file_service_path + 'get_directory_metadata', factory) +cli_storage_data_plane_command('storage directory metadata update', file_service_path + 'set_directory_metadata', factory) # file commands -cli_storage_data_plane_command('storage file list', 'azure.cli.command_modules.storage.custom#list_share_files', factory, transform=transform_file_directory_result, table_transformer=transform_file_output) -cli_storage_data_plane_command('storage file delete', 'azure.storage.file.fileservice#FileService.delete_file', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) -cli_storage_data_plane_command('storage file resize', 'azure.storage.file.fileservice#FileService.resize_file', factory) -cli_storage_data_plane_command('storage file url', 'azure.storage.file.fileservice#FileService.make_file_url', factory, transform=transform_url) -cli_storage_data_plane_command('storage file generate-sas', 'azure.storage.file.fileservice#FileService.generate_file_shared_access_signature', factory) -cli_storage_data_plane_command('storage file show', 'azure.storage.file.fileservice#FileService.get_file_properties', factory, table_transformer=transform_file_output) -cli_storage_data_plane_command('storage file update', 'azure.storage.file.fileservice#FileService.set_file_properties', factory) -cli_storage_data_plane_command('storage file exists', 'azure.storage.file.fileservice#FileService.exists', factory, transform=create_boolean_result_output_transformer('exists')) -cli_storage_data_plane_command('storage file download', 'azure.storage.file.fileservice#FileService.get_file_to_path', factory) -cli_storage_data_plane_command('storage file upload', 'azure.storage.file.fileservice#FileService.create_file_from_path', factory) -cli_storage_data_plane_command('storage file metadata show', 'azure.storage.file.fileservice#FileService.get_file_metadata', factory) -cli_storage_data_plane_command('storage file metadata update', 'azure.storage.file.fileservice#FileService.set_file_metadata', factory) -cli_storage_data_plane_command('storage file copy start', 'azure.storage.file.fileservice#FileService.copy_file', factory) -cli_storage_data_plane_command('storage file copy cancel', 'azure.storage.file.fileservice#FileService.abort_copy_file', factory) - -cli_storage_data_plane_command('storage file upload-batch', - 'azure.cli.command_modules.storage.file#storage_file_upload_batch', - factory) - -cli_storage_data_plane_command('storage file download-batch', - 'azure.cli.command_modules.storage.file#storage_file_download_batch', - factory) - -cli_storage_data_plane_command('storage file copy start-batch', - 'azure.cli.command_modules.storage.file#storage_file_copy_batch', - factory) +cli_storage_data_plane_command('storage file list', custom_path + 'list_share_files', factory, transform=transform_file_directory_result, table_transformer=transform_file_output) +cli_storage_data_plane_command('storage file delete', file_service_path + 'delete_file', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) +cli_storage_data_plane_command('storage file resize', file_service_path + 'resize_file', factory) +cli_storage_data_plane_command('storage file url', file_service_path + 'make_file_url', factory, transform=transform_url) +cli_storage_data_plane_command('storage file generate-sas', file_service_path + 'generate_file_shared_access_signature', factory) +cli_storage_data_plane_command('storage file show', file_service_path + 'get_file_properties', factory, table_transformer=transform_file_output) +cli_storage_data_plane_command('storage file update', file_service_path + 'set_file_properties', factory) +cli_storage_data_plane_command('storage file exists', file_service_path + 'exists', factory, transform=create_boolean_result_output_transformer('exists')) +cli_storage_data_plane_command('storage file download', file_service_path + 'get_file_to_path', factory) +cli_storage_data_plane_command('storage file upload', file_service_path + 'create_file_from_path', factory) +cli_storage_data_plane_command('storage file metadata show', file_service_path + 'get_file_metadata', factory) +cli_storage_data_plane_command('storage file metadata update', file_service_path + 'set_file_metadata', factory) +cli_storage_data_plane_command('storage file copy start', file_service_path + 'copy_file', factory) +cli_storage_data_plane_command('storage file copy cancel', file_service_path + 'abort_copy_file', factory) +cli_storage_data_plane_command('storage file upload-batch', 'azure.cli.command_modules.storage.file#storage_file_upload_batch', factory) +cli_storage_data_plane_command('storage file download-batch', 'azure.cli.command_modules.storage.file#storage_file_download_batch', factory) +cli_storage_data_plane_command('storage file copy start-batch', 'azure.cli.command_modules.storage.file#storage_file_copy_batch', factory) # table commands factory = table_data_service_factory -cli_storage_data_plane_command('storage table generate-sas', 'azure.storage.table.tableservice#TableService.generate_table_shared_access_signature', factory) -cli_storage_data_plane_command('storage table stats', 'azure.storage.table.tableservice#TableService.get_table_service_stats', factory) -cli_storage_data_plane_command('storage table list', 'azure.storage.table.tableservice#TableService.list_tables', factory, transform=transform_storage_list_output) -cli_storage_data_plane_command('storage table create', 'azure.storage.table.tableservice#TableService.create_table', factory, transform=create_boolean_result_output_transformer('created'), table_transformer=transform_boolean_for_table) -cli_storage_data_plane_command('storage table exists', 'azure.storage.table.tableservice#TableService.exists', factory, transform=create_boolean_result_output_transformer('exists')) -cli_storage_data_plane_command('storage table delete', 'azure.storage.table.tableservice#TableService.delete_table', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) -cli_storage_data_plane_command('storage table policy create', 'azure.cli.command_modules.storage.custom#create_acl_policy', factory) -cli_storage_data_plane_command('storage table policy delete', 'azure.cli.command_modules.storage.custom#delete_acl_policy', factory) -cli_storage_data_plane_command('storage table policy show', 'azure.cli.command_modules.storage.custom#get_acl_policy', factory) -cli_storage_data_plane_command('storage table policy list', 'azure.cli.command_modules.storage.custom#list_acl_policies', factory, table_transformer=transform_acl_list_output) -cli_storage_data_plane_command('storage table policy update', 'azure.cli.command_modules.storage.custom#set_acl_policy', factory) +cli_storage_data_plane_command('storage table generate-sas', table_path + 'generate_table_shared_access_signature', factory) +cli_storage_data_plane_command('storage table stats', table_path + 'get_table_service_stats', factory) +cli_storage_data_plane_command('storage table list', table_path + 'list_tables', factory, transform=transform_storage_list_output) +cli_storage_data_plane_command('storage table create', table_path + 'create_table', factory, transform=create_boolean_result_output_transformer('created'), table_transformer=transform_boolean_for_table) +cli_storage_data_plane_command('storage table exists', table_path + 'exists', factory, transform=create_boolean_result_output_transformer('exists')) +cli_storage_data_plane_command('storage table delete', table_path + 'delete_table', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) +cli_storage_data_plane_command('storage table policy create', custom_path + 'create_acl_policy', factory) +cli_storage_data_plane_command('storage table policy delete', custom_path + 'delete_acl_policy', factory) +cli_storage_data_plane_command('storage table policy show', custom_path + 'get_acl_policy', factory) +cli_storage_data_plane_command('storage table policy list', custom_path + 'list_acl_policies', factory, table_transformer=transform_acl_list_output) +cli_storage_data_plane_command('storage table policy update', custom_path + 'set_acl_policy', factory) # table entity commands -cli_storage_data_plane_command('storage entity query', 'azure.storage.table.tableservice#TableService.query_entities', factory, table_transformer=transform_entity_query_output) -cli_storage_data_plane_command('storage entity show', 'azure.storage.table.tableservice#TableService.get_entity', factory, table_transformer=transform_entity_show) -cli_storage_data_plane_command('storage entity insert', 'azure.cli.command_modules.storage.custom#insert_table_entity', factory) -cli_storage_data_plane_command('storage entity replace', 'azure.storage.table.tableservice#TableService.update_entity', factory) -cli_storage_data_plane_command('storage entity merge', 'azure.storage.table.tableservice#TableService.merge_entity', factory) -cli_storage_data_plane_command('storage entity delete', 'azure.storage.table.tableservice#TableService.delete_entity', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) +cli_storage_data_plane_command('storage entity query', table_path + 'query_entities', factory, table_transformer=transform_entity_query_output) +cli_storage_data_plane_command('storage entity show', table_path + 'get_entity', factory, table_transformer=transform_entity_show) +cli_storage_data_plane_command('storage entity insert', custom_path + 'insert_table_entity', factory) +cli_storage_data_plane_command('storage entity replace', table_path + 'update_entity', factory) +cli_storage_data_plane_command('storage entity merge', table_path + 'merge_entity', factory) +cli_storage_data_plane_command('storage entity delete', table_path + 'delete_entity', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) # queue commands factory = queue_data_service_factory -cli_storage_data_plane_command('storage queue generate-sas', 'azure.storage.queue.queueservice#QueueService.generate_queue_shared_access_signature', factory) -cli_storage_data_plane_command('storage queue stats', 'azure.storage.queue.queueservice#QueueService.get_queue_service_stats', factory) -cli_storage_data_plane_command('storage queue list', 'azure.storage.queue.queueservice#QueueService.list_queues', factory, transform=transform_storage_list_output) -cli_storage_data_plane_command('storage queue create', 'azure.storage.queue.queueservice#QueueService.create_queue', factory, transform=create_boolean_result_output_transformer('created'), table_transformer=transform_boolean_for_table) -cli_storage_data_plane_command('storage queue delete', 'azure.storage.queue.queueservice#QueueService.delete_queue', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) -cli_storage_data_plane_command('storage queue metadata show', 'azure.storage.queue.queueservice#QueueService.get_queue_metadata', factory) -cli_storage_data_plane_command('storage queue metadata update', 'azure.storage.queue.queueservice#QueueService.set_queue_metadata', factory) -cli_storage_data_plane_command('storage queue exists', 'azure.storage.queue.queueservice#QueueService.exists', factory, transform=create_boolean_result_output_transformer('exists')) -cli_storage_data_plane_command('storage queue policy create', 'azure.cli.command_modules.storage.custom#create_acl_policy', factory) -cli_storage_data_plane_command('storage queue policy delete', 'azure.cli.command_modules.storage.custom#delete_acl_policy', factory) -cli_storage_data_plane_command('storage queue policy show', 'azure.cli.command_modules.storage.custom#get_acl_policy', factory) -cli_storage_data_plane_command('storage queue policy list', 'azure.cli.command_modules.storage.custom#list_acl_policies', factory, table_transformer=transform_acl_list_output) -cli_storage_data_plane_command('storage queue policy update', 'azure.cli.command_modules.storage.custom#set_acl_policy', factory) +cli_storage_data_plane_command('storage queue generate-sas', queue_path + 'generate_queue_shared_access_signature', factory) +cli_storage_data_plane_command('storage queue stats', queue_path + 'get_queue_service_stats', factory) +cli_storage_data_plane_command('storage queue list', queue_path + 'list_queues', factory, transform=transform_storage_list_output) +cli_storage_data_plane_command('storage queue create', queue_path + 'create_queue', factory, transform=create_boolean_result_output_transformer('created'), table_transformer=transform_boolean_for_table) +cli_storage_data_plane_command('storage queue delete', queue_path + 'delete_queue', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) +cli_storage_data_plane_command('storage queue metadata show', queue_path + 'get_queue_metadata', factory) +cli_storage_data_plane_command('storage queue metadata update', queue_path + 'set_queue_metadata', factory) +cli_storage_data_plane_command('storage queue exists', queue_path + 'exists', factory, transform=create_boolean_result_output_transformer('exists')) +cli_storage_data_plane_command('storage queue policy create', custom_path + 'create_acl_policy', factory) +cli_storage_data_plane_command('storage queue policy delete', custom_path + 'delete_acl_policy', factory) +cli_storage_data_plane_command('storage queue policy show', custom_path + 'get_acl_policy', factory) +cli_storage_data_plane_command('storage queue policy list', custom_path + 'list_acl_policies', factory, table_transformer=transform_acl_list_output) +cli_storage_data_plane_command('storage queue policy update', custom_path + 'set_acl_policy', factory) # queue message commands -cli_storage_data_plane_command('storage message put', 'azure.storage.queue.queueservice#QueueService.put_message', factory) -cli_storage_data_plane_command('storage message get', 'azure.storage.queue.queueservice#QueueService.get_messages', factory, table_transformer=transform_message_show) -cli_storage_data_plane_command('storage message peek', 'azure.storage.queue.queueservice#QueueService.peek_messages', factory, table_transformer=transform_message_show) -cli_storage_data_plane_command('storage message delete', 'azure.storage.queue.queueservice#QueueService.delete_message', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) -cli_storage_data_plane_command('storage message clear', 'azure.storage.queue.queueservice#QueueService.clear_messages', factory) -cli_storage_data_plane_command('storage message update', 'azure.storage.queue.queueservice#QueueService.update_message', factory) +cli_storage_data_plane_command('storage message put', queue_path + 'put_message', factory) +cli_storage_data_plane_command('storage message get', queue_path + 'get_messages', factory, table_transformer=transform_message_show) +cli_storage_data_plane_command('storage message peek', queue_path + 'peek_messages', factory, table_transformer=transform_message_show) +cli_storage_data_plane_command('storage message delete', queue_path + 'delete_message', factory, transform=create_boolean_result_output_transformer('deleted'), table_transformer=transform_boolean_for_table) +cli_storage_data_plane_command('storage message clear', queue_path + 'clear_messages', factory) +cli_storage_data_plane_command('storage message update', queue_path + 'update_message', factory) # cors commands -cli_storage_data_plane_command('storage cors list', 'azure.cli.command_modules.storage.custom#list_cors', None, transform=transform_cors_list_output) -cli_storage_data_plane_command('storage cors add', 'azure.cli.command_modules.storage.custom#add_cors', None) -cli_storage_data_plane_command('storage cors clear', 'azure.cli.command_modules.storage.custom#clear_cors', None) +cli_storage_data_plane_command('storage cors list', custom_path + 'list_cors', None, transform=transform_cors_list_output) +cli_storage_data_plane_command('storage cors add', custom_path + 'add_cors', None) +cli_storage_data_plane_command('storage cors clear', custom_path + 'clear_cors', None) # logging commands -cli_storage_data_plane_command('storage logging show', 'azure.cli.command_modules.storage.custom#get_logging', None, table_transformer=transform_logging_list_output) -cli_storage_data_plane_command('storage logging update', 'azure.cli.command_modules.storage.custom#set_logging', None) +cli_storage_data_plane_command('storage logging show', custom_path + 'get_logging', None, table_transformer=transform_logging_list_output) +cli_storage_data_plane_command('storage logging update', custom_path + 'set_logging', None) # metrics commands -cli_storage_data_plane_command('storage metrics show', 'azure.cli.command_modules.storage.custom#get_metrics', None, table_transformer=transform_metrics_list_output) -cli_storage_data_plane_command('storage metrics update', 'azure.cli.command_modules.storage.custom#set_metrics', None) +cli_storage_data_plane_command('storage metrics show', custom_path + 'get_metrics', None, table_transformer=transform_metrics_list_output) +cli_storage_data_plane_command('storage metrics update', custom_path + 'set_metrics', None) diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py index ae6d78923..b89a8e196 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py @@ -109,20 +109,21 @@ def create_storage_account(resource_group_name, account_name, sku, location, return scf.storage_accounts.create(resource_group_name, account_name, params) -def set_storage_account_properties( - resource_group_name, account_name, sku=None, tags=None, custom_domain=None, - encryption=None, access_tier=None): - ''' Update storage account property (only one at a time).''' +def update_storage_account(instance, sku=None, tags=None, custom_domain=None, + encryption=None, access_tier=None): from azure.mgmt.storage.models import \ - (StorageAccountUpdateParameters, Sku, CustomDomain, AccessTier) - scf = storage_client_factory() - params = StorageAccountUpdateParameters( - sku=Sku(sku) if sku else None, - tags=tags, - custom_domain=CustomDomain(custom_domain) if custom_domain else None, - encryption=encryption, - access_tier=AccessTier(access_tier) if access_tier else None) - return scf.storage_accounts.update(resource_group_name, account_name, params) + (StorageAccountCreateParameters, Sku, CustomDomain, AccessTier) + + params = StorageAccountCreateParameters( + sku=Sku(sku) if sku is not None else instance.sku, + kind=instance.kind, + location=instance.location, + tags=tags if tags is not None else instance.tags, + custom_domain=CustomDomain(custom_domain) if custom_domain is not None else instance.custom_domain, # pylint: disable=line-too-long + encryption=encryption if encryption is not None else instance.encryption, + access_tier=AccessTier(access_tier) if access_tier is not None else instance.access_tier + ) + return params @transfer_doc(BlockBlobService.create_blob_from_path)
[Storage] `storage account update` does not expose Generic Update arguments Recommend to support to add 1 tag, or support JSON input for the --tags. Here is the current script to add one tag. ``` NEW_TAGS=$(az storage account show -g "$resourceGroup" -n "$storageAccount" | jq -r "[.tags + {\"$key\": \"$value\"} | to_entries | .[] | if (.value | contains(\" \")) then .key + \"=\\\"\" + .value + \"\\\"\" else .key + \"=\" + .value end ] | join(\" \")") CMD="az storage account update -g $resourceGroup -n $storageAccount --tags $NEW_TAGS" eval $CMD ``` Do you have any recommendation?
Azure/azure-cli
diff --git a/src/azure-cli-core/azure/cli/core/test_utils/vcr_test_base.py b/src/azure-cli-core/azure/cli/core/test_utils/vcr_test_base.py index 55fd812cd..1db69b991 100644 --- a/src/azure-cli-core/azure/cli/core/test_utils/vcr_test_base.py +++ b/src/azure-cli-core/azure/cli/core/test_utils/vcr_test_base.py @@ -36,7 +36,7 @@ from azure.cli.main import main as cli_main from azure.cli.core import __version__ as core_version import azure.cli.core._debug as _debug from azure.cli.core._profile import Profile -from azure.cli.core._util import CLIError +from azure.cli.core._util import CLIError, random_string LIVE_TEST_CONTROL_ENV = 'AZURE_CLI_TEST_RUN_LIVE' COMMAND_COVERAGE_CONTROL_ENV = 'AZURE_CLI_TEST_COMMAND_COVERAGE' @@ -301,8 +301,7 @@ class VCRTestBase(unittest.TestCase): # pylint: disable=too-many-instance-attri request.uri = _scrub_deployment_name(request.uri) # replace random storage account name with dummy name - request.uri = re.sub('/vcrstorage([\\d]+).', - '/{}.'.format(MOCKED_STORAGE_ACCOUNT), request.uri) + request.uri = re.sub(r'(vcrstorage[\d]+)', MOCKED_STORAGE_ACCOUNT, request.uri) # prevents URI mismatch between Python 2 and 3 if request URI has extra / chars request.uri = re.sub('//', '/', request.uri) request.uri = re.sub('/', '//', request.uri, count=1) @@ -516,8 +515,8 @@ class StorageAccountVCRTestBase(VCRTestBase): @classmethod def generate_account_name(cls): - return 'vcrstorage{}'.format(''.join(choice(digits) for _ in range(12))) + return 'vcrstorage{}'.format(random_string(12, digits_only=True)) @classmethod def generate_random_tag(cls): - return '_{}_'.format(''.join((choice(ascii_lowercase + digits) for _ in range(4)))) + return '_{}_'.format(random_string(4, force_lower=True)) diff --git a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/recordings/test_webapp_backup_config.yaml b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/recordings/test_webapp_backup_config.yaml new file mode 100644 index 000000000..f19bb6336 --- /dev/null +++ b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/recordings/test_webapp_backup_config.yaml @@ -0,0 +1,395 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [6d24c5ae-f256-11e6-b0e3-98588a06bf8b] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest?api-version=2016-08-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest","name":"azurecli-webapp-backupconfigtest","type":"Microsoft.Web/sites","kind":"app","location":"West + US","tags":null,"properties":{"name":"azurecli-webapp-backupconfigtest","state":"Running","hostNames":["azurecli-webapp-backupconfigtest.azurewebsites.net"],"webSpace":"cli-webapp-backup-WestUSwebspace","selfLink":"https://waws-prod-bay-035.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/cli-webapp-backup-WestUSwebspace/sites/azurecli-webapp-backupconfigtest","repositorySiteName":"azurecli-webapp-backupconfigtest","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"enabledHostNames":["azurecli-webapp-backupconfigtest.azurewebsites.net","azurecli-webapp-backupconfigtest.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"azurecli-webapp-backupconfigtest.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"azurecli-webapp-backupconfigtest.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/serverfarms/webapp-backup-plan","reserved":false,"lastModifiedTimeUtc":"2017-02-14T01:39:17.167","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","siteConfig":null,"deploymentId":"azurecli-webapp-backupconfigtest","trafficManagerHostNames":null,"sku":"Standard","premiumAppDeployed":null,"scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"microService":"false","gatewaySiteName":null,"clientAffinityEnabled":true,"clientCertEnabled":false,"hostNamesDisabled":false,"domainVerificationIdentifiers":null,"kind":"app","outboundIpAddresses":"40.112.143.79,40.112.136.154,40.112.141.43,40.112.138.165","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-bay-035","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"cli-webapp-backup","defaultHostName":"azurecli-webapp-backupconfigtest.azurewebsites.net","slotSwapStatus":null}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json] + Date: ['Tue, 14 Feb 2017 01:39:30 GMT'] + ETag: ['"1D28663279D4BF0"'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + content-length: ['2872'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [6dcfed0c-f256-11e6-8bb3-98588a06bf8b] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest/config/backup/list?api-version=2016-08-01 + response: + body: {string: '{"Code":"NotFound","Message":"Backup configuration not found for + site ''azurecli-webapp-backupconfigtest'' with slot ''Production''","Target":null,"Details":[{"Message":"Backup + configuration not found for site ''azurecli-webapp-backupconfigtest'' with + slot ''Production''"},{"Code":"NotFound"},{"ErrorEntity":{"Code":"NotFound","Message":"Backup + configuration not found for site ''azurecli-webapp-backupconfigtest'' with + slot ''Production''","ExtendedCode":"04211","MessageTemplate":"Backup configuration + not found for site ''{0}'' with slot ''{1}''","Parameters":["azurecli-webapp-backupconfigtest","Production"],"InnerErrors":null}}],"Innererror":null}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['638'] + Content-Type: [application/json; charset=utf-8] + Date: ['Tue, 14 Feb 2017 01:39:31 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11951'] + status: {code: 404, message: Not Found} +- request: + body: '{"properties": {"backupSchedule": {"frequencyInterval": 1, "retentionPeriodInDays": + 5, "keepAtLeastOneBackup": true, "frequencyUnit": "Day"}, "storageAccountUrl": + "https://azureclistore.blob.core.windows.net/sitebackups?sv=2015-04-05&sr=c&sig=%2FjH1lEtbm3uFqtMI%2BfFYwgrntOs1qhGnpGv9uRibJ7A%3D&se=2017-02-14T04%3A53%3A28Z&sp=rwdl", + "enabled": true}, "location": "West US"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['372'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [6e8a1f90-f256-11e6-94bb-98588a06bf8b] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest/config/backup?api-version=2016-08-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Tue, 14 Feb 2017 01:39:32 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + x-ms-ratelimit-remaining-subscription-writes: ['1194'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [6fa64ac0-f256-11e6-b6de-98588a06bf8b] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest/config/backup/list?api-version=2016-08-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest","name":"azurecli-webapp-backupconfigtest","type":"Microsoft.Web/sites","location":"West + US","tags":null,"properties":{"name":"azurecli-webapp-backupconfigtest","enabled":true,"storageAccountUrl":"https://azureclistore.blob.core.windows.net/sitebackups?sv=2015-04-05&sr=c&sig=%2FjH1lEtbm3uFqtMI%2BfFYwgrntOs1qhGnpGv9uRibJ7A%3D&se=2017-02-14T04%3A53%3A28Z&sp=rwdl","backupSchedule":{"frequencyInterval":1,"frequencyUnit":"Day","keepAtLeastOneBackup":true,"retentionPeriodInDays":5,"startTime":"2017-02-14T01:39:33.4251542","lastExecutionTime":"2017-02-14T01:39:33.7555589"},"databases":null,"type":"Default"}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json] + Date: ['Tue, 14 Feb 2017 01:39:34 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + content-length: ['769'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11960'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [70abf17a-f256-11e6-921b-98588a06bf8b] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest?api-version=2016-08-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest","name":"azurecli-webapp-backupconfigtest","type":"Microsoft.Web/sites","kind":"app","location":"West + US","tags":null,"properties":{"name":"azurecli-webapp-backupconfigtest","state":"Running","hostNames":["azurecli-webapp-backupconfigtest.azurewebsites.net"],"webSpace":"cli-webapp-backup-WestUSwebspace","selfLink":"https://waws-prod-bay-035.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/cli-webapp-backup-WestUSwebspace/sites/azurecli-webapp-backupconfigtest","repositorySiteName":"azurecli-webapp-backupconfigtest","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"enabledHostNames":["azurecli-webapp-backupconfigtest.azurewebsites.net","azurecli-webapp-backupconfigtest.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"azurecli-webapp-backupconfigtest.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"azurecli-webapp-backupconfigtest.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/serverfarms/webapp-backup-plan","reserved":false,"lastModifiedTimeUtc":"2017-02-14T01:39:17.167","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","siteConfig":null,"deploymentId":"azurecli-webapp-backupconfigtest","trafficManagerHostNames":null,"sku":"Standard","premiumAppDeployed":null,"scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"microService":"false","gatewaySiteName":null,"clientAffinityEnabled":true,"clientCertEnabled":false,"hostNamesDisabled":false,"domainVerificationIdentifiers":null,"kind":"app","outboundIpAddresses":"40.112.143.79,40.112.136.154,40.112.141.43,40.112.138.165","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-bay-035","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"cli-webapp-backup","defaultHostName":"azurecli-webapp-backupconfigtest.azurewebsites.net","slotSwapStatus":null}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json] + Date: ['Tue, 14 Feb 2017 01:39:36 GMT'] + ETag: ['"1D28663279D4BF0"'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + content-length: ['2872'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [714da4c8-f256-11e6-a621-98588a06bf8b] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest/config/backup/list?api-version=2016-08-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest","name":"azurecli-webapp-backupconfigtest","type":"Microsoft.Web/sites","location":"West + US","tags":null,"properties":{"name":"azurecli-webapp-backupconfigtest","enabled":true,"storageAccountUrl":"https://azureclistore.blob.core.windows.net/sitebackups?sv=2015-04-05&sr=c&sig=%2FjH1lEtbm3uFqtMI%2BfFYwgrntOs1qhGnpGv9uRibJ7A%3D&se=2017-02-14T04%3A53%3A28Z&sp=rwdl","backupSchedule":{"frequencyInterval":1,"frequencyUnit":"Day","keepAtLeastOneBackup":true,"retentionPeriodInDays":5,"startTime":"2017-02-14T01:39:33.4251542","lastExecutionTime":"2017-02-14T01:39:33.7555589"},"databases":null,"type":"Default"}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json] + Date: ['Tue, 14 Feb 2017 01:39:37 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + content-length: ['769'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11882'] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"backupSchedule": {"frequencyInterval": 1, "retentionPeriodInDays": + 5, "keepAtLeastOneBackup": true, "frequencyUnit": "Day"}, "storageAccountUrl": + "https://azureclistore.blob.core.windows.net/sitebackups?sv=2015-04-05&sr=c&sig=%2FjH1lEtbm3uFqtMI%2BfFYwgrntOs1qhGnpGv9uRibJ7A%3D&se=2017-02-14T04%3A53%3A28Z&sp=rwdl", + "databases": [{"name": "cli-db", "databaseType": "SqlAzure", "connectionString": + "Server=tcp:cli-backup.database.windows.net,1433;Initial Catalog=cli-db;Persist + Security Info=False;User ID=cliuser;Password=cli!password1;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection + Timeout=30;"}], "enabled": true}, "location": "West US"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['692'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [71b978da-f256-11e6-bfdd-98588a06bf8b] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest/config/backup?api-version=2016-08-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Tue, 14 Feb 2017 01:39:37 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [72aeb7fa-f256-11e6-8f8a-98588a06bf8b] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest/config/backup/list?api-version=2016-08-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest","name":"azurecli-webapp-backupconfigtest","type":"Microsoft.Web/sites","location":"West + US","tags":null,"properties":{"name":"azurecli-webapp-backupconfigtest","enabled":true,"storageAccountUrl":"https://azureclistore.blob.core.windows.net/sitebackups?sv=2015-04-05&sr=c&sig=%2FjH1lEtbm3uFqtMI%2BfFYwgrntOs1qhGnpGv9uRibJ7A%3D&se=2017-02-14T04%3A53%3A28Z&sp=rwdl","backupSchedule":{"frequencyInterval":1,"frequencyUnit":"Day","keepAtLeastOneBackup":true,"retentionPeriodInDays":5,"startTime":"2017-02-14T01:39:33.4251542","lastExecutionTime":"2017-02-14T01:39:33.7555589"},"databases":[{"databaseType":"SqlAzure","name":"cli-db","connectionStringName":null,"connectionString":"Server=tcp:cli-backup.database.windows.net,1433;Initial + Catalog=cli-db;Persist Security Info=False;User ID=cliuser;Password=cli!password1;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection + Timeout=30;"}],"type":"Default"}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json] + Date: ['Tue, 14 Feb 2017 01:39:39 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + content-length: ['1093'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11871'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [738ece5e-f256-11e6-ad4c-98588a06bf8b] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest?api-version=2016-08-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest","name":"azurecli-webapp-backupconfigtest","type":"Microsoft.Web/sites","kind":"app","location":"West + US","tags":null,"properties":{"name":"azurecli-webapp-backupconfigtest","state":"Running","hostNames":["azurecli-webapp-backupconfigtest.azurewebsites.net"],"webSpace":"cli-webapp-backup-WestUSwebspace","selfLink":"https://waws-prod-bay-035.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/cli-webapp-backup-WestUSwebspace/sites/azurecli-webapp-backupconfigtest","repositorySiteName":"azurecli-webapp-backupconfigtest","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"enabledHostNames":["azurecli-webapp-backupconfigtest.azurewebsites.net","azurecli-webapp-backupconfigtest.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"azurecli-webapp-backupconfigtest.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"azurecli-webapp-backupconfigtest.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/serverfarms/webapp-backup-plan","reserved":false,"lastModifiedTimeUtc":"2017-02-14T01:39:17.167","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","siteConfig":null,"deploymentId":"azurecli-webapp-backupconfigtest","trafficManagerHostNames":null,"sku":"Standard","premiumAppDeployed":null,"scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"microService":"false","gatewaySiteName":null,"clientAffinityEnabled":true,"clientCertEnabled":false,"hostNamesDisabled":false,"domainVerificationIdentifiers":null,"kind":"app","outboundIpAddresses":"40.112.143.79,40.112.136.154,40.112.141.43,40.112.138.165","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-bay-035","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"cli-webapp-backup","defaultHostName":"azurecli-webapp-backupconfigtest.azurewebsites.net","slotSwapStatus":null}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json] + Date: ['Tue, 14 Feb 2017 01:39:40 GMT'] + ETag: ['"1D28663279D4BF0"'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + content-length: ['2872'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [74045d24-f256-11e6-a6dd-98588a06bf8b] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest/config/backup/list?api-version=2016-08-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest","name":"azurecli-webapp-backupconfigtest","type":"Microsoft.Web/sites","location":"West + US","tags":null,"properties":{"name":"azurecli-webapp-backupconfigtest","enabled":true,"storageAccountUrl":"https://azureclistore.blob.core.windows.net/sitebackups?sv=2015-04-05&sr=c&sig=%2FjH1lEtbm3uFqtMI%2BfFYwgrntOs1qhGnpGv9uRibJ7A%3D&se=2017-02-14T04%3A53%3A28Z&sp=rwdl","backupSchedule":{"frequencyInterval":1,"frequencyUnit":"Day","keepAtLeastOneBackup":true,"retentionPeriodInDays":5,"startTime":"2017-02-14T01:39:33.4251542","lastExecutionTime":"2017-02-14T01:39:33.7555589"},"databases":[{"databaseType":"SqlAzure","name":"cli-db","connectionStringName":null,"connectionString":"Server=tcp:cli-backup.database.windows.net,1433;Initial + Catalog=cli-db;Persist Security Info=False;User ID=cliuser;Password=cli!password1;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection + Timeout=30;"}],"type":"Default"}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json] + Date: ['Tue, 14 Feb 2017 01:39:41 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + content-length: ['1093'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11898'] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"backupSchedule": {"frequencyInterval": 18, "retentionPeriodInDays": + 7, "keepAtLeastOneBackup": false, "frequencyUnit": "Hour"}, "storageAccountUrl": + "https://azureclistore.blob.core.windows.net/sitebackups?sv=2015-04-05&sr=c&sig=%2FjH1lEtbm3uFqtMI%2BfFYwgrntOs1qhGnpGv9uRibJ7A%3D&se=2017-02-14T04%3A53%3A28Z&sp=rwdl", + "databases": [{"name": "cli-db", "databaseType": "SqlAzure", "connectionString": + "Server=tcp:cli-backup.database.windows.net,1433;Initial Catalog=cli-db;Persist + Security Info=False;User ID=cliuser;Password=cli!password1;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection + Timeout=30;"}], "enabled": true}, "location": "West US"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['695'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [74945b34-f256-11e6-a0e4-98588a06bf8b] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest/config/backup?api-version=2016-08-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Tue, 14 Feb 2017 01:39:43 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [75ebf9f8-f256-11e6-a29b-98588a06bf8b] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest/config/backup/list?api-version=2016-08-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backupconfigtest","name":"azurecli-webapp-backupconfigtest","type":"Microsoft.Web/sites","location":"West + US","tags":null,"properties":{"name":"azurecli-webapp-backupconfigtest","enabled":true,"storageAccountUrl":"https://azureclistore.blob.core.windows.net/sitebackups?sv=2015-04-05&sr=c&sig=%2FjH1lEtbm3uFqtMI%2BfFYwgrntOs1qhGnpGv9uRibJ7A%3D&se=2017-02-14T04%3A53%3A28Z&sp=rwdl","backupSchedule":{"frequencyInterval":18,"frequencyUnit":"Hour","keepAtLeastOneBackup":false,"retentionPeriodInDays":7,"startTime":"2017-02-14T01:39:33.4251542","lastExecutionTime":"2017-02-14T01:39:44.6323705"},"databases":[{"databaseType":"SqlAzure","name":"cli-db","connectionStringName":null,"connectionString":"Server=tcp:cli-backup.database.windows.net,1433;Initial + Catalog=cli-db;Persist Security Info=False;User ID=cliuser;Password=cli!password1;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection + Timeout=30;"}],"type":"Default"}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json] + Date: ['Tue, 14 Feb 2017 01:39:44 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + content-length: ['1096'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11880'] + status: {code: 200, message: OK} +version: 1 diff --git a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/recordings/test_webapp_backup_restore.yaml b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/recordings/test_webapp_backup_restore.yaml new file mode 100644 index 000000000..85f99a642 --- /dev/null +++ b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/recordings/test_webapp_backup_restore.yaml @@ -0,0 +1,172 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [b000d254-f252-11e6-acb4-98588a06bf8b] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backuptest2?api-version=2016-08-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backuptest2","name":"azurecli-webapp-backuptest2","type":"Microsoft.Web/sites","kind":"app","location":"West + US","tags":null,"properties":{"name":"azurecli-webapp-backuptest2","state":"Running","hostNames":["azurecli-webapp-backuptest2.azurewebsites.net"],"webSpace":"cli-webapp-backup-WestUSwebspace","selfLink":"https://waws-prod-bay-073.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/cli-webapp-backup-WestUSwebspace/sites/azurecli-webapp-backuptest2","repositorySiteName":"azurecli-webapp-backuptest2","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"enabledHostNames":["azurecli-webapp-backuptest2.azurewebsites.net","azurecli-webapp-backuptest2.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"azurecli-webapp-backuptest2.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"azurecli-webapp-backuptest2.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/serverfarms/webapp-backup-plan","reserved":false,"lastModifiedTimeUtc":"2017-02-14T01:12:33.5766667","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","siteConfig":null,"deploymentId":"azurecli-webapp-backuptest2","trafficManagerHostNames":null,"sku":"Standard","premiumAppDeployed":null,"scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"microService":"false","gatewaySiteName":null,"clientAffinityEnabled":true,"clientCertEnabled":false,"hostNamesDisabled":false,"domainVerificationIdentifiers":null,"kind":"app","outboundIpAddresses":"40.112.216.201,40.112.220.31,40.112.222.87,40.112.221.176","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-bay-073","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"cli-webapp-backup","defaultHostName":"azurecli-webapp-backuptest2.azurewebsites.net","slotSwapStatus":null}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json] + Date: ['Tue, 14 Feb 2017 01:12:43 GMT'] + ETag: ['"1D2865F6BCCD48B"'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + content-length: ['2816'] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"name": "mybackup", "databases": [{"databaseType": "SqlAzure", + "name": "cli-db", "connectionString": "Server=tcp:cli-backup.database.windows.net,1433;Initial + Catalog=cli-db;Persist Security Info=False;User ID=cliuser;Password=cli!password1;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection + Timeout=30;"}], "storageAccountUrl": "https://azureclistore.blob.core.windows.net/sitebackups?sv=2015-04-05&sr=c&sig=%2FjH1lEtbm3uFqtMI%2BfFYwgrntOs1qhGnpGv9uRibJ7A%3D&se=2017-02-14T04%3A53%3A28Z&sp=rwdl"}, + "location": "West US"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['569'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [b05bc566-f252-11e6-b1de-98588a06bf8b] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backuptest2/backup?api-version=2016-08-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backuptest2","name":"azurecli-webapp-backuptest2","type":"Microsoft.Web/sites","location":"West + US","tags":null,"properties":{"id":434,"storageAccountUrl":"https://azureclistore.blob.core.windows.net/sitebackups?sv=2015-04-05&sr=c&sig=%2FjH1lEtbm3uFqtMI%2BfFYwgrntOs1qhGnpGv9uRibJ7A%3D&se=2017-02-14T04%3A53%3A28Z&sp=rwdl","blobName":"mybackup","name":"mybackup","status":"Created","sizeInBytes":0,"created":"2017-02-14T01:12:45.7288235Z","log":null,"databases":[{"databaseType":"SqlAzure","name":"cli-db","connectionStringName":null,"connectionString":"Server=tcp:cli-backup.database.windows.net,1433;Initial + Catalog=cli-db;Persist Security Info=False;User ID=cliuser;Password=cli!password1;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection + Timeout=30;"}],"scheduled":false,"correlationId":"3c7086b2-506d-40b3-90c8-58a396c516c7","websiteSizeInBytes":null}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json] + Date: ['Tue, 14 Feb 2017 01:12:44 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + content-length: ['1035'] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [b149aeee-f252-11e6-b2c1-98588a06bf8b] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backuptest2/backups?api-version=2016-08-01 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backuptest2/backups/434","name":"434","type":"Microsoft.Web/sites/backups","location":"West + US","tags":null,"properties":{"id":434,"storageAccountUrl":"https://azureclistore.blob.core.windows.net/sitebackups?sv=2015-04-05&sr=c&sig=%2FjH1lEtbm3uFqtMI%2BfFYwgrntOs1qhGnpGv9uRibJ7A%3D&se=2017-02-14T04%3A53%3A28Z&sp=rwdl","blobName":"mybackup.zip","name":"mybackup","status":"InProgress","sizeInBytes":0,"created":"2017-02-14T01:12:45.7288235","log":null,"databases":[{"databaseType":"SqlAzure","name":"cli-db","connectionStringName":null,"connectionString":"Server=tcp:cli-backup.database.windows.net,1433;Initial + Catalog=cli-db;Persist Security Info=False;User ID=cliuser;Password=cli!password1;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection + Timeout=30;"}],"scheduled":false,"correlationId":"3c7086b2-506d-40b3-90c8-58a396c516c7","websiteSizeInBytes":null}}],"nextLink":null,"id":null}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json] + Date: ['Tue, 14 Feb 2017 01:12:49 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + content-length: ['1075'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [66bb14ca-f253-11e6-bdc9-98588a06bf8b] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backuptest2?api-version=2016-08-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backuptest2","name":"azurecli-webapp-backuptest2","type":"Microsoft.Web/sites","kind":"app","location":"West + US","tags":null,"properties":{"name":"azurecli-webapp-backuptest2","state":"Running","hostNames":["azurecli-webapp-backuptest2.azurewebsites.net"],"webSpace":"cli-webapp-backup-WestUSwebspace","selfLink":"https://waws-prod-bay-073.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/cli-webapp-backup-WestUSwebspace/sites/azurecli-webapp-backuptest2","repositorySiteName":"azurecli-webapp-backuptest2","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"enabledHostNames":["azurecli-webapp-backuptest2.azurewebsites.net","azurecli-webapp-backuptest2.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"azurecli-webapp-backuptest2.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"azurecli-webapp-backuptest2.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"thumbprint":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/serverfarms/webapp-backup-plan","reserved":false,"lastModifiedTimeUtc":"2017-02-14T01:12:33.5766667","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","siteConfig":null,"deploymentId":"azurecli-webapp-backuptest2","trafficManagerHostNames":null,"sku":"Standard","premiumAppDeployed":null,"scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"microService":"false","gatewaySiteName":null,"clientAffinityEnabled":true,"clientCertEnabled":false,"hostNamesDisabled":false,"domainVerificationIdentifiers":null,"kind":"app","outboundIpAddresses":"40.112.216.201,40.112.220.31,40.112.222.87,40.112.221.176","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-bay-073","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"cli-webapp-backup","defaultHostName":"azurecli-webapp-backuptest2.azurewebsites.net","slotSwapStatus":null}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json] + Date: ['Tue, 14 Feb 2017 01:17:50 GMT'] + ETag: ['"1D2865F6BCCD48B"'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + content-length: ['2816'] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"overwrite": true, "blobName": "mybackup.zip", "operationType": + "Default", "ignoreConflictingHostNames": true, "storageAccountUrl": "https://azureclistore.blob.core.windows.net/sitebackups?sv=2015-04-05&sr=c&sig=%2FjH1lEtbm3uFqtMI%2BfFYwgrntOs1qhGnpGv9uRibJ7A%3D&se=2017-02-14T04%3A53%3A28Z&sp=rwdl", + "databases": [{"databaseType": "SqlAzure", "name": "cli-db", "connectionString": + "Server=tcp:cli-backup.database.windows.net,1433;Initial Catalog=cli-db;Persist + Security Info=False;User ID=cliuser;Password=cli!password1;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection + Timeout=30;"}]}, "location": "West US"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['660'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 websitemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [6719b612-f253-11e6-a628-98588a06bf8b] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backuptest2/backups/0/restore?api-version=2016-08-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-webapp-backup/providers/Microsoft.Web/sites/azurecli-webapp-backuptest2","name":"azurecli-webapp-backuptest2","type":"Microsoft.Web/sites","location":"West + US","tags":null,"properties":{"operationId":"fe89f012-9458-4299-a6bc-0266dc2ef713"}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json] + Date: ['Tue, 14 Feb 2017 01:17:51 GMT'] + ETag: ['"1D2865F6BCCD48B"'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Powered-By: [ASP.NET] + content-length: ['324'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +version: 1 diff --git a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py index 5d2bd18c2..7fbbb4192 100644 --- a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py +++ b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py @@ -349,3 +349,117 @@ class WebappSlotScenarioTest(ResourceGroupVCRTestBase): JMESPathCheck('[0].name', self.webapp + '/' + slot), ]) self.cmd('appservice web deployment slot delete -g {} -n {} --slot {}'.format(self.resource_group, self.webapp, slot), checks=NoneCheck()) + +class WebappBackupConfigScenarioTest(ResourceGroupVCRTestBase): + + def __init__(self, test_method): + super(WebappBackupConfigScenarioTest, self).__init__(__file__, test_method, resource_group='cli-webapp-backup') + self.webapp_name = 'azurecli-webapp-backupconfigtest' + + def test_webapp_backup_config(self): + self.execute() + + def set_up(self): + super(WebappBackupConfigScenarioTest, self).set_up() + plan = 'webapp-backup-plan' + self.cmd('appservice plan create -g {} -n {} --sku S1'.format(self.resource_group, plan)) + self.cmd('appservice web create -g {} -n {} --plan {}'.format(self.resource_group, self.webapp_name, plan)) + + def body(self): + sas_url = 'https://azureclistore.blob.core.windows.net/sitebackups?sv=2015-04-05&sr=c&sig=%2FjH1lEtbm3uFqtMI%2BfFYwgrntOs1qhGnpGv9uRibJ7A%3D&se=2017-02-14T04%3A53%3A28Z&sp=rwdl' + frequency = '1d' + db_conn_str = 'Server=tcp:cli-backup.database.windows.net,1433;Initial Catalog=cli-db;Persist Security Info=False;User ID=cliuser;Password=cli!password1;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;' + retention_period = 5 + + # set without databases + self.cmd('appservice web config backup update -g {} --webapp-name {} --frequency {} --container-url {} --retain-one true --retention {}' + .format(self.resource_group, self.webapp_name, frequency, sas_url, retention_period), checks=NoneCheck()) + + checks = [ + JMESPathCheck('backupSchedule.frequencyInterval', 1), + JMESPathCheck('backupSchedule.frequencyUnit', 'Day'), + JMESPathCheck('backupSchedule.keepAtLeastOneBackup', True), + JMESPathCheck('backupSchedule.retentionPeriodInDays', retention_period) + ] + self.cmd('appservice web config backup show -g {} --webapp-name {}'.format(self.resource_group, self.webapp_name), checks=checks) + + # update with databases + database_name = 'cli-db' + database_type = 'SqlAzure' + self.cmd('appservice web config backup update -g {} --webapp-name {} --db-connection-string "{}" --db-name {} --db-type {} --retain-one true' + .format(self.resource_group, self.webapp_name, db_conn_str, database_name, database_type), checks=NoneCheck()) + + checks = [ + JMESPathCheck('backupSchedule.frequencyInterval', 1), + JMESPathCheck('backupSchedule.frequencyUnit', 'Day'), + JMESPathCheck('backupSchedule.keepAtLeastOneBackup', True), + JMESPathCheck('backupSchedule.retentionPeriodInDays', retention_period), + JMESPathCheck('databases[0].connectionString', db_conn_str), + JMESPathCheck('databases[0].databaseType', database_type), + JMESPathCheck('databases[0].name', database_name) + ] + self.cmd('appservice web config backup show -g {} --webapp-name {}'.format(self.resource_group, self.webapp_name), checks=checks) + + # update frequency and retention only + frequency = '18h' + retention_period = 7 + self.cmd('appservice web config backup update -g {} --webapp-name {} --frequency {} --retain-one false --retention {}' + .format(self.resource_group, self.webapp_name, frequency, retention_period), checks=NoneCheck()) + + checks = [ + JMESPathCheck('backupSchedule.frequencyInterval', 18), + JMESPathCheck('backupSchedule.frequencyUnit', 'Hour'), + JMESPathCheck('backupSchedule.keepAtLeastOneBackup', False), + JMESPathCheck('backupSchedule.retentionPeriodInDays', retention_period), + JMESPathCheck('databases[0].connectionString', db_conn_str), + JMESPathCheck('databases[0].databaseType', database_type), + JMESPathCheck('databases[0].name', database_name) + ] + self.cmd('appservice web config backup show -g {} --webapp-name {}'.format(self.resource_group, self.webapp_name), checks=checks) + +class WebappBackupRestoreScenarioTest(ResourceGroupVCRTestBase): + + def __init__(self, test_method): + super(WebappBackupRestoreScenarioTest, self).__init__(__file__, test_method, resource_group='cli-webapp-backup') + self.webapp_name = 'azurecli-webapp-backuptest2' + + def test_webapp_backup_restore(self): + self.execute() + + def set_up(self): + super(WebappBackupRestoreScenarioTest, self).set_up() + plan = 'webapp-backup-plan' + self.cmd('appservice plan create -g {} -n {} --sku S1'.format(self.resource_group, plan)) + self.cmd('appservice web create -g {} -n {} --plan {}'.format(self.resource_group, self.webapp_name, plan)) + + def body(self): + sas_url = 'https://azureclistore.blob.core.windows.net/sitebackups?sv=2015-04-05&sr=c&sig=%2FjH1lEtbm3uFqtMI%2BfFYwgrntOs1qhGnpGv9uRibJ7A%3D&se=2017-02-14T04%3A53%3A28Z&sp=rwdl' + db_conn_str = 'Server=tcp:cli-backup.database.windows.net,1433;Initial Catalog=cli-db;Persist Security Info=False;User ID=cliuser;Password=cli!password1;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;' + database_name = 'cli-db' + database_type = 'SqlAzure' + backup_name = 'mybackup' + + create_checks = [ + JMESPathCheck('backupItemName', backup_name), + JMESPathCheck('storageAccountUrl', sas_url), + JMESPathCheck('databases[0].connectionString', db_conn_str), + JMESPathCheck('databases[0].databaseType', database_type), + JMESPathCheck('databases[0].name', database_name) + ] + self.cmd('appservice web config backup create -g {} --webapp-name {} --container-url {} --db-connection-string "{}" --db-name {} --db-type {} --backup-name {}' + .format(self.resource_group, self.webapp_name, sas_url, db_conn_str, database_name, database_type, backup_name), checks=create_checks) + + list_checks = [ + JMESPathCheck('[-1].backupItemName', backup_name), + JMESPathCheck('[-1].storageAccountUrl', sas_url), + JMESPathCheck('[-1].databases[0].connectionString', db_conn_str), + JMESPathCheck('[-1].databases[0].databaseType', database_type), + JMESPathCheck('[-1].databases[0].name', database_name) + ] + self.cmd('appservice web config backup list -g {} --webapp-name {}'.format(self.resource_group, self.webapp_name), checks=list_checks) + + import time + time.sleep(300) # Allow plenty of time for a backup to finish -- database backup takes a while (skipped in playback) + + self.cmd('appservice web config backup restore -g {} --webapp-name {} --container-url {} --backup-name {} --db-connection-string "{}" --db-name {} --db-type {} --ignore-hostname-conflict --overwrite' + .format(self.resource_group, self.webapp_name, sas_url, backup_name, db_conn_str, database_name, database_type), checks=JMESPathCheck('name', self.webapp_name)) diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/recordings/test_storage_account_scenario.yaml b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/recordings/test_storage_account_scenario.yaml index ab58bc4e3..1c2f83a9e 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/recordings/test_storage_account_scenario.yaml +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/recordings/test_storage_account_scenario.yaml @@ -7,10 +7,10 @@ interactions: Connection: [keep-alive] Content-Length: ['73'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c1dcadd8-ee5b-11e6-bf5a-3c15c2cf0610] + x-ms-client-request-id: [d3fbbbf4-f3c9-11e6-ab1b-74c63bed1137] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2016-12-01 response: @@ -20,7 +20,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:07:34 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:03 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -37,10 +37,10 @@ interactions: Connection: [keep-alive] Content-Length: ['73'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c2b4194c-ee5b-11e6-bff9-3c15c2cf0610] + x-ms-client-request-id: [d4c73850-f3c9-11e6-9371-74c63bed1137] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2016-12-01 response: @@ -50,7 +50,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:07:36 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:04 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -67,25 +67,25 @@ interactions: Connection: [keep-alive] Content-Length: ['74'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c389c682-ee5b-11e6-b8a0-3c15c2cf0610] + x-ms-client-request-id: [d58758a8-f3c9-11e6-93c6-74c63bed1137] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete?api-version=2016-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Thu, 09 Feb 2017 00:07:37 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:07 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d/providers/Microsoft.Storage/operations/4b8be2ea-fae6-43bf-acd5-4fee2c7e6374?monitor=true&api-version=2016-12-01'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/9147d762-549f-4705-a5ac-dbf05b9c7a94?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] Retry-After: ['17'] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1192'] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] status: {code: 202, message: Accepted} - request: body: null @@ -94,84 +94,58 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c389c682-ee5b-11e6-b8a0-3c15c2cf0610] + x-ms-client-request-id: [d58758a8-f3c9-11e6-93c6-74c63bed1137] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/4b8be2ea-fae6-43bf-acd5-4fee2c7e6374?monitor=true&api-version=2016-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/9147d762-549f-4705-a5ac-dbf05b9c7a94?monitor=true&api-version=2016-12-01 response: - body: {string: ''} - headers: - Cache-Control: [no-cache] - Content-Length: ['0'] - Date: ['Thu, 09 Feb 2017 00:07:55 GMT'] - Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d/providers/Microsoft.Storage/operations/4b8be2ea-fae6-43bf-acd5-4fee2c7e6374?monitor=true&api-version=2016-12-01'] - Pragma: [no-cache] - Retry-After: ['17'] - Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] - accept-language: [en-US] - x-ms-client-request-id: [c389c682-ee5b-11e6-b8a0-3c15c2cf0610] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/4b8be2ea-fae6-43bf-acd5-4fee2c7e6374?monitor=true&api-version=2016-12-01 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete","kind":"Storage","location":"westus","name":"testcreatedelete","properties":{"creationTime":"2017-02-09T00:07:37.2213980Z","primaryEndpoints":{"blob":"https://testcreatedelete.blob.core.windows.net/","file":"https://testcreatedelete.file.core.windows.net/","queue":"https://testcreatedelete.queue.core.windows.net/","table":"https://testcreatedelete.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:13 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:24 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['740'] + content-length: ['776'] status: {code: 200, message: OK} - request: - body: '{"name": "testcreatedelete", "type": "Microsoft.Storage/storageAccounts"}' + body: '{"name": "vcrstorage733641907300", "type": "Microsoft.Storage/storageAccounts"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['73'] + Content-Length: ['79'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [da10d530-ee5b-11e6-83aa-3c15c2cf0610] + x-ms-client-request-id: [e1bebfcc-f3c9-11e6-a3b6-74c63bed1137] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2016-12-01 response: - body: {string: '{"message":"The storage account named testcreatedelete is already - taken.","nameAvailable":false,"reason":"AlreadyExists"} + body: {string: '{"message":"The storage account named vcrstorage733641907300 is + already taken.","nameAvailable":false,"reason":"AlreadyExists"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:15 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:26 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['122'] + content-length: ['128'] status: {code: 200, message: OK} - request: body: null @@ -180,27 +154,27 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [dadb2f74-ee5b-11e6-a045-3c15c2cf0610] + x-ms-client-request-id: [e25fb3ac-f3c9-11e6-9d53-74c63bed1137] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts?api-version=2016-12-01 response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete","kind":"Storage","location":"westus","name":"testcreatedelete","properties":{"creationTime":"2017-02-09T00:07:37.2213980Z","primaryEndpoints":{"blob":"https://testcreatedelete.blob.core.windows.net/","file":"https://testcreatedelete.file.core.windows.net/","queue":"https://testcreatedelete.queue.core.windows.net/","table":"https://testcreatedelete.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"}]} + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"}]} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:16 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:26 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['752'] + content-length: ['788'] status: {code: 200, message: OK} - request: body: null @@ -209,27 +183,27 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [dbba7e68-ee5b-11e6-aaa4-3c15c2cf0610] + x-ms-client-request-id: [e2e57f30-f3c9-11e6-b459-74c63bed1137] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete?api-version=2016-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete","kind":"Storage","location":"westus","name":"testcreatedelete","properties":{"creationTime":"2017-02-09T00:07:37.2213980Z","primaryEndpoints":{"blob":"https://testcreatedelete.blob.core.windows.net/","file":"https://testcreatedelete.file.core.windows.net/","queue":"https://testcreatedelete.queue.core.windows.net/","table":"https://testcreatedelete.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:18 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:27 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['740'] + content-length: ['776'] status: {code: 200, message: OK} - request: body: null @@ -238,21 +212,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [dca35368-ee5b-11e6-a34a-3c15c2cf0610] + x-ms-client-request-id: [e3620122-f3c9-11e6-9d80-74c63bed1137] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/usages?api-version=2016-12-01 response: body: {string: "{\r\n \"value\": [\r\n {\r\n \"unit\": \"Count\",\r\n\ - \ \"currentValue\": 58,\r\n \"limit\": 250,\r\n \"name\": {\r\ + \ \"currentValue\": 41,\r\n \"limit\": 250,\r\n \"name\": {\r\ \n \"value\": \"StorageAccounts\",\r\n \"localizedValue\": \"\ Storage Accounts\"\r\n }\r\n }\r\n ]\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:19 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:28 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -269,20 +243,20 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [dd84a158-ee5b-11e6-99f2-3c15c2cf0610] + x-ms-client-request-id: [e3f246c6-f3c9-11e6-8348-74c63bed1137] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete/listKeys?api-version=2016-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage/listKeys?api-version=2016-12-01 response: - body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"Qnm0sK1WFJbrpqibPUbUxyT9tJZEhgYa6ccqe6pp1FwaCKVC05gLpMYF1fGbK4Eghbr3lDqu/owFEHtG5fUEKA=="},{"keyName":"key2","permissions":"Full","value":"09kvsAJkFw0sibG9sQlYwT6hhMRjieuiVOgYrX9r03ZD1atHscccJPNNZEPRC6WBIjn1j+s7DR2U+Iw8GdRNrQ=="}]} + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"FvHhwyIgb9w4f9IP8q8hsco9YRMQx2Cmw7/twW6Z5BDSqV7E3glSpl6XjhGd4EBoH1y3Qs7ZydIzRdzXb5RUlA=="},{"keyName":"key2","permissions":"Full","value":"bl05+mAzQpLT0w07vniIWTHZfgxJ8M9ywLnk6NmJ0EsWmpa/QBeO9zK7AObh4pOmsIBgeQq7ibjoDYpLBjLxmw=="}]} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:20 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:29 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -290,7 +264,7 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['289'] - x-ms-ratelimit-remaining-subscription-writes: ['1189'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -300,20 +274,20 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [de616f3a-ee5b-11e6-a667-3c15c2cf0610] + x-ms-client-request-id: [e461e3c2-f3c9-11e6-a33d-74c63bed1137] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete/listKeys?api-version=2016-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage/listKeys?api-version=2016-12-01 response: - body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"Qnm0sK1WFJbrpqibPUbUxyT9tJZEhgYa6ccqe6pp1FwaCKVC05gLpMYF1fGbK4Eghbr3lDqu/owFEHtG5fUEKA=="},{"keyName":"key2","permissions":"Full","value":"09kvsAJkFw0sibG9sQlYwT6hhMRjieuiVOgYrX9r03ZD1atHscccJPNNZEPRC6WBIjn1j+s7DR2U+Iw8GdRNrQ=="}]} + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"FvHhwyIgb9w4f9IP8q8hsco9YRMQx2Cmw7/twW6Z5BDSqV7E3glSpl6XjhGd4EBoH1y3Qs7ZydIzRdzXb5RUlA=="},{"keyName":"key2","permissions":"Full","value":"bl05+mAzQpLT0w07vniIWTHZfgxJ8M9ywLnk6NmJ0EsWmpa/QBeO9zK7AObh4pOmsIBgeQq7ibjoDYpLBjLxmw=="}]} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:22 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:31 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -321,24 +295,24 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['289'] - x-ms-ratelimit-remaining-subscription-writes: ['1189'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Darwin 16.4.0) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [bf5a2912-ee5b-11e6-ad3b-3c15c2cf0610] - x-ms-date: ['Thu, 09 Feb 2017 00:08:23 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] + x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] + x-ms-date: ['Wed, 15 Feb 2017 21:58:33 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://testcreatedelete.blob.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 00:08:23 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:31 GMT'] Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -347,19 +321,19 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Darwin 16.4.0) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [bf5a2912-ee5b-11e6-ad3b-3c15c2cf0610] - x-ms-date: ['Thu, 09 Feb 2017 00:08:23 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] + x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] + x-ms-date: ['Wed, 15 Feb 2017 21:58:34 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://testcreatedelete.queue.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.queue.core.windows.net/?restype=service&comp=properties response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Cache-Control: [no-cache] Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 00:08:22 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:32 GMT'] Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -370,18 +344,18 @@ interactions: Connection: [keep-alive] DataServiceVersion: [3.0;NetFx] MaxDataServiceVersion: ['3.0'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Darwin 16.4.0) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [bf5a2912-ee5b-11e6-ad3b-3c15c2cf0610] - x-ms-date: ['Thu, 09 Feb 2017 00:08:23 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] + x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] + x-ms-date: ['Wed, 15 Feb 2017 21:58:34 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://testcreatedelete.table.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.table.core.windows.net/?restype=service&comp=properties response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 00:08:23 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:31 GMT'] Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -393,16 +367,16 @@ interactions: headers: Connection: [keep-alive] Content-Length: ['264'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Darwin 16.4.0) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [bf5a2912-ee5b-11e6-ad3b-3c15c2cf0610] - x-ms-date: ['Thu, 09 Feb 2017 00:08:24 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] + x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] + x-ms-date: ['Wed, 15 Feb 2017 21:58:35 GMT'] x-ms-version: ['2015-07-08'] method: PUT - uri: https://testcreatedelete.blob.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties response: body: {string: ''} headers: - Date: ['Thu, 09 Feb 2017 00:08:24 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:32 GMT'] Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -411,18 +385,18 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Darwin 16.4.0) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [bf5a2912-ee5b-11e6-ad3b-3c15c2cf0610] - x-ms-date: ['Thu, 09 Feb 2017 00:08:25 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] + x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] + x-ms-date: ['Wed, 15 Feb 2017 21:58:35 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://testcreatedelete.blob.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>true</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>true</Enabled><Days>1</Days></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 00:08:25 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:32 GMT'] Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -431,19 +405,19 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Darwin 16.4.0) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [bf5a2912-ee5b-11e6-ad3b-3c15c2cf0610] - x-ms-date: ['Thu, 09 Feb 2017 00:08:25 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] + x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] + x-ms-date: ['Wed, 15 Feb 2017 21:58:35 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://testcreatedelete.queue.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.queue.core.windows.net/?restype=service&comp=properties response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Cache-Control: [no-cache] Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 00:08:24 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:33 GMT'] Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -454,18 +428,18 @@ interactions: Connection: [keep-alive] DataServiceVersion: [3.0;NetFx] MaxDataServiceVersion: ['3.0'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Darwin 16.4.0) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [bf5a2912-ee5b-11e6-ad3b-3c15c2cf0610] - x-ms-date: ['Thu, 09 Feb 2017 00:08:25 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] + x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] + x-ms-date: ['Wed, 15 Feb 2017 21:58:35 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://testcreatedelete.table.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.table.core.windows.net/?restype=service&comp=properties response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 00:08:24 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:33 GMT'] Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -474,18 +448,18 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Darwin 16.4.0) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [bf5a2912-ee5b-11e6-ad3b-3c15c2cf0610] - x-ms-date: ['Thu, 09 Feb 2017 00:08:26 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] + x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] + x-ms-date: ['Wed, 15 Feb 2017 21:58:36 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://testcreatedelete.blob.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>true</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>true</Enabled><Days>1</Days></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 00:08:25 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:33 GMT'] Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -494,18 +468,18 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Darwin 16.4.0) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [bf5a2912-ee5b-11e6-ad3b-3c15c2cf0610] - x-ms-date: ['Thu, 09 Feb 2017 00:08:26 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] + x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] + x-ms-date: ['Wed, 15 Feb 2017 21:58:36 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://testcreatedelete.file.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.file.core.windows.net/?restype=service&comp=properties response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 00:08:25 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:33 GMT'] Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -514,19 +488,19 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Darwin 16.4.0) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [bf5a2912-ee5b-11e6-ad3b-3c15c2cf0610] - x-ms-date: ['Thu, 09 Feb 2017 00:08:26 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] + x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] + x-ms-date: ['Wed, 15 Feb 2017 21:58:36 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://testcreatedelete.queue.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.queue.core.windows.net/?restype=service&comp=properties response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Cache-Control: [no-cache] Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 00:08:25 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:34 GMT'] Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -537,18 +511,18 @@ interactions: Connection: [keep-alive] DataServiceVersion: [3.0;NetFx] MaxDataServiceVersion: ['3.0'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Darwin 16.4.0) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [bf5a2912-ee5b-11e6-ad3b-3c15c2cf0610] - x-ms-date: ['Thu, 09 Feb 2017 00:08:26 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] + x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] + x-ms-date: ['Wed, 15 Feb 2017 21:58:36 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://testcreatedelete.table.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.table.core.windows.net/?restype=service&comp=properties response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 00:08:26 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:33 GMT'] Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -560,16 +534,16 @@ interactions: headers: Connection: [keep-alive] Content-Length: ['386'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Darwin 16.4.0) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [bf5a2912-ee5b-11e6-ad3b-3c15c2cf0610] - x-ms-date: ['Thu, 09 Feb 2017 00:08:27 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] + x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] + x-ms-date: ['Wed, 15 Feb 2017 21:58:37 GMT'] x-ms-version: ['2015-07-08'] method: PUT - uri: https://testcreatedelete.file.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.file.core.windows.net/?restype=service&comp=properties response: body: {string: ''} headers: - Date: ['Thu, 09 Feb 2017 00:08:27 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:34 GMT'] Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -578,18 +552,18 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Darwin 16.4.0) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [bf5a2912-ee5b-11e6-ad3b-3c15c2cf0610] - x-ms-date: ['Thu, 09 Feb 2017 00:08:28 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] + x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] + x-ms-date: ['Wed, 15 Feb 2017 21:58:37 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://testcreatedelete.blob.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>true</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>true</Enabled><Days>1</Days></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 00:08:28 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:34 GMT'] Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -598,18 +572,18 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Darwin 16.4.0) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [bf5a2912-ee5b-11e6-ad3b-3c15c2cf0610] - x-ms-date: ['Thu, 09 Feb 2017 00:08:28 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] + x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] + x-ms-date: ['Wed, 15 Feb 2017 21:58:37 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://testcreatedelete.file.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.file.core.windows.net/?restype=service&comp=properties response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><HourMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>true</Enabled><Days>1</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>true</Enabled><Days>1</Days></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 00:08:28 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:35 GMT'] Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -618,19 +592,19 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Darwin 16.4.0) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [bf5a2912-ee5b-11e6-ad3b-3c15c2cf0610] - x-ms-date: ['Thu, 09 Feb 2017 00:08:28 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] + x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] + x-ms-date: ['Wed, 15 Feb 2017 21:58:37 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://testcreatedelete.queue.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.queue.core.windows.net/?restype=service&comp=properties response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Cache-Control: [no-cache] Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 00:08:27 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:35 GMT'] Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -641,18 +615,18 @@ interactions: Connection: [keep-alive] DataServiceVersion: [3.0;NetFx] MaxDataServiceVersion: ['3.0'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Darwin 16.4.0) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [bf5a2912-ee5b-11e6-ad3b-3c15c2cf0610] - x-ms-date: ['Thu, 09 Feb 2017 00:08:28 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] + x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] + x-ms-date: ['Wed, 15 Feb 2017 21:58:38 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://testcreatedelete.table.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.table.core.windows.net/?restype=service&comp=properties response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 00:08:28 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:35 GMT'] Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -663,506 +637,53 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] + Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [e2d428fa-ee5b-11e6-a448-3c15c2cf0610] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/storageAccounts?api-version=2016-12-01 + x-ms-client-request-id: [e7dff490-f3c9-11e6-94b6-74c63bed1137] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage/listKeys?api-version=2016-12-01 response: - body: {string: "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestrg_acs_pgzg_/providers/Microsoft.Storage/storageAccounts/00bt6plw4asw7uqagntpri0\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"00bt6plw4asw7uqagntpri0\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T06:31:00.4639213Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://00bt6plw4asw7uqagntpri0.blob.core.windows.net/\",\"file\"\ - :\"https://00bt6plw4asw7uqagntpri0.file.core.windows.net/\",\"queue\":\"https://00bt6plw4asw7uqagntpri0.queue.core.windows.net/\"\ - ,\"table\":\"https://00bt6plw4asw7uqagntpri0.table.core.windows.net/\"},\"\ - primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestdiagext_urrn_/providers/Microsoft.Storage/storageAccounts/542dddncyzly2testdiagvsa\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"542dddncyzly2testdiagvsa\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T19:01:36.1675808Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://542dddncyzly2testdiagvsa.blob.core.windows.net/\",\"\ - file\":\"https://542dddncyzly2testdiagvsa.file.core.windows.net/\",\"queue\"\ - :\"https://542dddncyzly2testdiagvsa.queue.core.windows.net/\",\"table\":\"\ - https://542dddncyzly2testdiagvsa.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestrg_acs_pgzg_/providers/Microsoft.Storage/storageAccounts/60bt6plw4asw7uqagntpri1\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"60bt6plw4asw7uqagntpri1\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T06:31:00.4839479Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://60bt6plw4asw7uqagntpri1.blob.core.windows.net/\",\"file\"\ - :\"https://60bt6plw4asw7uqagntpri1.file.core.windows.net/\",\"queue\":\"https://60bt6plw4asw7uqagntpri1.queue.core.windows.net/\"\ - ,\"table\":\"https://60bt6plw4asw7uqagntpri1.table.core.windows.net/\"},\"\ - primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_state_mod_le0n_/providers/Microsoft.Storage/storageAccounts/ab394fvkdj34\"\ - ,\"kind\":\"Storage\",\"location\":\"eastus\",\"name\":\"ab394fvkdj34\",\"\ - properties\":{\"creationTime\":\"2017-02-07T17:12:30.5210312Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://ab394fvkdj34.blob.core.windows.net/\",\"file\":\"https://ab394fvkdj34.file.core.windows.net/\"\ - ,\"queue\":\"https://ab394fvkdj34.queue.core.windows.net/\",\"table\":\"https://ab394fvkdj34.table.core.windows.net/\"\ - },\"primaryLocation\":\"eastus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{\"firsttag\":\"1\",\"secondtag\":\"2\",\"thirdtag\":\"\"},\"type\"\ - :\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_diagnostics_10x1_/providers/Microsoft.Storage/storageAccounts/ae94nvfl1k1\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"ae94nvfl1k1\",\"\ - properties\":{\"creationTime\":\"2017-02-07T17:02:23.3814953Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://ae94nvfl1k1.blob.core.windows.net/\",\"file\":\"https://ae94nvfl1k1.file.core.windows.net/\"\ - ,\"queue\":\"https://ae94nvfl1k1.queue.core.windows.net/\",\"table\":\"https://ae94nvfl1k1.table.core.windows.net/\"\ - },\"primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestdiagext_cua0_/providers/Microsoft.Storage/storageAccounts/bo7iba7zxg3bstestdiagvsa\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"bo7iba7zxg3bstestdiagvsa\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T19:50:50.0793552Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://bo7iba7zxg3bstestdiagvsa.blob.core.windows.net/\",\"\ - file\":\"https://bo7iba7zxg3bstestdiagvsa.file.core.windows.net/\",\"queue\"\ - :\"https://bo7iba7zxg3bstestdiagvsa.queue.core.windows.net/\",\"table\":\"\ - https://bo7iba7zxg3bstestdiagvsa.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestrg_acs_pgzg_/providers/Microsoft.Storage/storageAccounts/bt6plw4asw7uqagntpub\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"bt6plw4asw7uqagntpub\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T06:31:07.0434415Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://bt6plw4asw7uqagntpub.blob.core.windows.net/\",\"file\"\ - :\"https://bt6plw4asw7uqagntpub.file.core.windows.net/\",\"queue\":\"https://bt6plw4asw7uqagntpub.queue.core.windows.net/\"\ - ,\"table\":\"https://bt6plw4asw7uqagntpub.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestrg_acs_pgzg_/providers/Microsoft.Storage/storageAccounts/bt6plw4asw7uqdiag0\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"bt6plw4asw7uqdiag0\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T06:31:04.4737832Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://bt6plw4asw7uqdiag0.blob.core.windows.net/\",\"file\"\ - :\"https://bt6plw4asw7uqdiag0.file.core.windows.net/\",\"queue\":\"https://bt6plw4asw7uqdiag0.queue.core.windows.net/\"\ - ,\"table\":\"https://bt6plw4asw7uqdiag0.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestrg_acs_pgzg_/providers/Microsoft.Storage/storageAccounts/bt6plw4asw7uqmstr0\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"bt6plw4asw7uqmstr0\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T06:31:00.3989151Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://bt6plw4asw7uqmstr0.blob.core.windows.net/\",\"file\"\ - :\"https://bt6plw4asw7uqmstr0.file.core.windows.net/\",\"queue\":\"https://bt6plw4asw7uqmstr0.queue.core.windows.net/\"\ - ,\"table\":\"https://bt6plw4asw7uqmstr0.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestrg_acs_pgzg_/providers/Microsoft.Storage/storageAccounts/c0bt6plw4asw7uqagntpri2\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"c0bt6plw4asw7uqagntpri2\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T06:31:00.5539303Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://c0bt6plw4asw7uqagntpri2.blob.core.windows.net/\",\"file\"\ - :\"https://c0bt6plw4asw7uqagntpri2.file.core.windows.net/\",\"queue\":\"https://c0bt6plw4asw7uqagntpri2.queue.core.windows.net/\"\ - ,\"table\":\"https://c0bt6plw4asw7uqagntpri2.table.core.windows.net/\"},\"\ - primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestdiagext_urrn_/providers/Microsoft.Storage/storageAccounts/c5tq3vecq447atestdiagvsa\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"c5tq3vecq447atestdiagvsa\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T19:01:35.0602409Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://c5tq3vecq447atestdiagvsa.blob.core.windows.net/\",\"\ - file\":\"https://c5tq3vecq447atestdiagvsa.file.core.windows.net/\",\"queue\"\ - :\"https://c5tq3vecq447atestdiagvsa.queue.core.windows.net/\",\"table\":\"\ - https://c5tq3vecq447atestdiagvsa.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/xplattestvmqcreate4156/providers/Microsoft.Storage/storageAccounts/cli30357909863964826891\"\ - ,\"kind\":\"Storage\",\"location\":\"southeastasia\",\"name\":\"cli30357909863964826891\"\ - ,\"properties\":{\"creationTime\":\"2016-01-31T00:59:08.8999081Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://cli30357909863964826891.blob.core.windows.net/\",\"file\"\ - :\"https://cli30357909863964826891.file.core.windows.net/\",\"queue\":\"https://cli30357909863964826891.queue.core.windows.net/\"\ - ,\"table\":\"https://cli30357909863964826891.table.core.windows.net/\"},\"\ - primaryLocation\":\"southeastasia\",\"provisioningState\":\"Succeeded\",\"\ - statusOfPrimary\":\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\"\ - :\"Standard\"},\"tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"\ - },{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/vcr_resource_group_qnbm_/providers/Microsoft.Storage/storageAccounts/clibatchteststorage2\"\ - ,\"kind\":\"Storage\",\"location\":\"brazilsouth\",\"name\":\"clibatchteststorage2\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T18:04:05.6617953Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://clibatchteststorage2.blob.core.windows.net/\",\"file\"\ - :\"https://clibatchteststorage2.file.core.windows.net/\",\"queue\":\"https://clibatchteststorage2.queue.core.windows.net/\"\ - ,\"table\":\"https://clibatchteststorage2.table.core.windows.net/\"},\"primaryLocation\"\ - :\"brazilsouth\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"\ - available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ag2rg/providers/Microsoft.Storage/storageAccounts/clitest1021\"\ - ,\"kind\":\"Storage\",\"location\":\"northeurope\",\"name\":\"clitest1021\"\ - ,\"properties\":{\"creationTime\":\"2016-12-13T01:03:05.4510844Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://clitest1021.blob.core.windows.net/\",\"file\":\"https://clitest1021.file.core.windows.net/\"\ - ,\"queue\":\"https://clitest1021.queue.core.windows.net/\",\"table\":\"https://clitest1021.table.core.windows.net/\"\ - },\"primaryLocation\":\"northeurope\",\"provisioningState\":\"Succeeded\"\ - ,\"secondaryLocation\":\"westeurope\",\"statusOfPrimary\":\"available\",\"\ - statusOfSecondary\":\"available\"},\"sku\":{\"name\":\"Standard_GRS\",\"tier\"\ - :\"Standard\"},\"tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ag2rg/providers/Microsoft.Storage/storageAccounts/clitest1022\"\ - ,\"kind\":\"Storage\",\"location\":\"northeurope\",\"name\":\"clitest1022\"\ - ,\"properties\":{\"creationTime\":\"2016-12-13T01:11:48.5379793Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://clitest1022.blob.core.windows.net/\",\"file\":\"https://clitest1022.file.core.windows.net/\"\ - ,\"queue\":\"https://clitest1022.queue.core.windows.net/\",\"table\":\"https://clitest1022.table.core.windows.net/\"\ - },\"primaryLocation\":\"northeurope\",\"provisioningState\":\"Succeeded\"\ - ,\"secondaryLocation\":\"westeurope\",\"statusOfPrimary\":\"available\",\"\ - statusOfSecondary\":\"available\"},\"sku\":{\"name\":\"Standard_GRS\",\"tier\"\ - :\"Standard\"},\"tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zuppy22/providers/Microsoft.Storage/storageAccounts/cp2a644dncyoqsalinuxvm\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"cp2a644dncyoqsalinuxvm\"\ - ,\"properties\":{\"creationTime\":\"2016-08-05T08:35:15.7961990Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://cp2a644dncyoqsalinuxvm.blob.core.windows.net/\",\"file\"\ - :\"https://cp2a644dncyoqsalinuxvm.file.core.windows.net/\",\"queue\":\"https://cp2a644dncyoqsalinuxvm.queue.core.windows.net/\"\ - ,\"table\":\"https://cp2a644dncyoqsalinuxvm.table.core.windows.net/\"},\"\ - primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_vmss_diagnostics_extension_mnsl_/providers/Microsoft.Storage/storageAccounts/diagextensionsa\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"diagextensionsa\"\ - ,\"properties\":{\"creationTime\":\"2017-02-07T23:33:03.5884546Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://diagextensionsa.blob.core.windows.net/\",\"file\":\"\ - https://diagextensionsa.file.core.windows.net/\",\"queue\":\"https://diagextensionsa.queue.core.windows.net/\"\ - ,\"table\":\"https://diagextensionsa.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestdiagext_cua0_/providers/Microsoft.Storage/storageAccounts/diagextstorage\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"diagextstorage\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T19:57:16.5781818Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://diagextstorage.blob.core.windows.net/\",\"file\":\"https://diagextstorage.file.core.windows.net/\"\ - ,\"queue\":\"https://diagextstorage.queue.core.windows.net/\",\"table\":\"\ - https://diagextstorage.table.core.windows.net/\"},\"primaryLocation\":\"westus\"\ - ,\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"},\"\ - sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"type\"\ - :\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestdiagext_cua0_/providers/Microsoft.Storage/storageAccounts/eykeyznjcy2dotestdiagvsa\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"eykeyznjcy2dotestdiagvsa\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T19:50:43.1484178Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://eykeyznjcy2dotestdiagvsa.blob.core.windows.net/\",\"\ - file\":\"https://eykeyznjcy2dotestdiagvsa.file.core.windows.net/\",\"queue\"\ - :\"https://eykeyznjcy2dotestdiagvsa.queue.core.windows.net/\",\"table\":\"\ - https://eykeyznjcy2dotestdiagvsa.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/foostore102\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"foostore102\",\"\ - properties\":{\"creationTime\":\"2016-05-25T19:32:49.5192125Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://foostore102.blob.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_ZRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/foostore103\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"foostore103\",\"\ - properties\":{\"creationTime\":\"2016-05-25T23:52:18.1234838Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://foostore103.blob.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_ZRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/foostore12978\"\ - ,\"kind\":\"Storage\",\"location\":\"westeurope\",\"name\":\"foostore12978\"\ - ,\"properties\":{\"creationTime\":\"2016-04-29T06:55:06.4412159Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://foostore12978.blob.core.windows.net/\",\"file\":\"https://foostore12978.file.core.windows.net/\"\ - ,\"queue\":\"https://foostore12978.queue.core.windows.net/\",\"table\":\"\ - https://foostore12978.table.core.windows.net/\"},\"primaryLocation\":\"westeurope\"\ - ,\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"},\"\ - sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"type\"\ - :\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestrg_acs_pgzg_/providers/Microsoft.Storage/storageAccounts/i0bt6plw4asw7uqagntpri3\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"i0bt6plw4asw7uqagntpri3\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T06:31:00.4579203Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://i0bt6plw4asw7uqagntpri3.blob.core.windows.net/\",\"file\"\ - :\"https://i0bt6plw4asw7uqagntpri3.file.core.windows.net/\",\"queue\":\"https://i0bt6plw4asw7uqagntpri3.queue.core.windows.net/\"\ - ,\"table\":\"https://i0bt6plw4asw7uqagntpri3.table.core.windows.net/\"},\"\ - primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestdiagext_urrn_/providers/Microsoft.Storage/storageAccounts/iui2drv6evixotestdiagvsa\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"iui2drv6evixotestdiagvsa\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T19:01:35.6265324Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://iui2drv6evixotestdiagvsa.blob.core.windows.net/\",\"\ - file\":\"https://iui2drv6evixotestdiagvsa.file.core.windows.net/\",\"queue\"\ - :\"https://iui2drv6evixotestdiagvsa.queue.core.windows.net/\",\"table\":\"\ - https://iui2drv6evixotestdiagvsa.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestdiagext_urrn_/providers/Microsoft.Storage/storageAccounts/jl74wty3ksn3mtestdiagvsa\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"jl74wty3ksn3mtestdiagvsa\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T19:01:35.7865467Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://jl74wty3ksn3mtestdiagvsa.blob.core.windows.net/\",\"\ - file\":\"https://jl74wty3ksn3mtestdiagvsa.file.core.windows.net/\",\"queue\"\ - :\"https://jl74wty3ksn3mtestdiagvsa.queue.core.windows.net/\",\"table\":\"\ - https://jl74wty3ksn3mtestdiagvsa.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psaug18/providers/Microsoft.Storage/storageAccounts/lo32ypes4rjmisalinuxvm\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"lo32ypes4rjmisalinuxvm\"\ - ,\"properties\":{\"creationTime\":\"2016-08-18T19:23:36.4170503Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://lo32ypes4rjmisalinuxvm.blob.core.windows.net/\",\"file\"\ - :\"https://lo32ypes4rjmisalinuxvm.file.core.windows.net/\",\"queue\":\"https://lo32ypes4rjmisalinuxvm.queue.core.windows.net/\"\ - ,\"table\":\"https://lo32ypes4rjmisalinuxvm.table.core.windows.net/\"},\"\ - primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestdiagext_cua0_/providers/Microsoft.Storage/storageAccounts/mmty3oughce6mtestdiagvsa\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"mmty3oughce6mtestdiagvsa\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T19:50:43.1303875Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://mmty3oughce6mtestdiagvsa.blob.core.windows.net/\",\"\ - file\":\"https://mmty3oughce6mtestdiagvsa.file.core.windows.net/\",\"queue\"\ - :\"https://mmty3oughce6mtestdiagvsa.queue.core.windows.net/\",\"table\":\"\ - https://mmty3oughce6mtestdiagvsa.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestrg_acs_pgzg_/providers/Microsoft.Storage/storageAccounts/o0bt6plw4asw7uqagntpri4\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"o0bt6plw4asw7uqagntpri4\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T06:31:04.8137869Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://o0bt6plw4asw7uqagntpri4.blob.core.windows.net/\",\"file\"\ - :\"https://o0bt6plw4asw7uqagntpri4.file.core.windows.net/\",\"queue\":\"https://o0bt6plw4asw7uqagntpri4.queue.core.windows.net/\"\ - ,\"table\":\"https://o0bt6plw4asw7uqagntpri4.table.core.windows.net/\"},\"\ - primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestdiagext_cua0_/providers/Microsoft.Storage/storageAccounts/orkikebuhshzutestdiagvsa\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"orkikebuhshzutestdiagvsa\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T19:50:43.1243879Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://orkikebuhshzutestdiagvsa.blob.core.windows.net/\",\"\ - file\":\"https://orkikebuhshzutestdiagvsa.file.core.windows.net/\",\"queue\"\ - :\"https://orkikebuhshzutestdiagvsa.queue.core.windows.net/\",\"table\":\"\ - https://orkikebuhshzutestdiagvsa.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestdiagext_urrn_/providers/Microsoft.Storage/storageAccounts/slaag2cthibuwtestdiagvsa\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"slaag2cthibuwtestdiagvsa\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T19:01:35.3625087Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://slaag2cthibuwtestdiagvsa.blob.core.windows.net/\",\"\ - file\":\"https://slaag2cthibuwtestdiagvsa.file.core.windows.net/\",\"queue\"\ - :\"https://slaag2cthibuwtestdiagvsa.queue.core.windows.net/\",\"table\":\"\ - https://slaag2cthibuwtestdiagvsa.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/testacc209\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"testacc209\",\"properties\"\ - :{\"creationTime\":\"2016-01-26T19:04:16.5466637Z\",\"primaryEndpoints\":{\"\ - blob\":\"https://testacc209.blob.core.windows.net/\",\"file\":\"https://testacc209.file.core.windows.net/\"\ - ,\"queue\":\"https://testacc209.queue.core.windows.net/\",\"table\":\"https://testacc209.table.core.windows.net/\"\ - },\"primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"testcreatedelete\"\ - ,\"properties\":{\"creationTime\":\"2017-02-09T00:07:37.2213980Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://testcreatedelete.blob.core.windows.net/\",\"file\":\"\ - https://testcreatedelete.file.core.windows.net/\",\"queue\":\"https://testcreatedelete.queue.core.windows.net/\"\ - ,\"table\":\"https://testcreatedelete.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/trdai_test_disposable/providers/Microsoft.Storage/storageAccounts/trdaitest03\"\ - ,\"kind\":\"Storage\",\"location\":\"southcentralus\",\"name\":\"trdaitest03\"\ - ,\"properties\":{\"creationTime\":\"2016-11-04T17:46:10.2954312Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://trdaitest03.blob.core.windows.net/\",\"file\":\"https://trdaitest03.file.core.windows.net/\"\ - ,\"queue\":\"https://trdaitest03.queue.core.windows.net/\",\"table\":\"https://trdaitest03.table.core.windows.net/\"\ - },\"primaryLocation\":\"southcentralus\",\"provisioningState\":\"Succeeded\"\ - ,\"statusOfPrimary\":\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"\ - tier\":\"Standard\"},\"tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"\ - },{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/trdai_test_disposable/providers/Microsoft.Storage/storageAccounts/trdaitest04\"\ - ,\"kind\":\"Storage\",\"location\":\"northeurope\",\"name\":\"trdaitest04\"\ - ,\"properties\":{\"creationTime\":\"2016-11-04T17:46:32.8224345Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://trdaitest04.blob.core.windows.net/\",\"file\":\"https://trdaitest04.file.core.windows.net/\"\ - ,\"queue\":\"https://trdaitest04.queue.core.windows.net/\",\"table\":\"https://trdaitest04.table.core.windows.net/\"\ - },\"primaryLocation\":\"northeurope\",\"provisioningState\":\"Succeeded\"\ - ,\"statusOfPrimary\":\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"\ - tier\":\"Standard\"},\"tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"\ - },{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_batch_blob_download_5x2e_/providers/Microsoft.Storage/storageAccounts/vcrstorage123016196722\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vcrstorage123016196722\"\ - ,\"properties\":{\"creationTime\":\"2017-01-31T23:31:09.7760020Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://vcrstorage123016196722.blob.core.windows.net/\",\"file\"\ - :\"https://vcrstorage123016196722.file.core.windows.net/\",\"queue\":\"https://vcrstorage123016196722.queue.core.windows.net/\"\ - ,\"table\":\"https://vcrstorage123016196722.table.core.windows.net/\"},\"\ - primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_batch_blob_download_4lmf_/providers/Microsoft.Storage/storageAccounts/vcrstorage133137457153\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vcrstorage133137457153\"\ - ,\"properties\":{\"creationTime\":\"2017-01-31T23:57:59.7225387Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://vcrstorage133137457153.blob.core.windows.net/\",\"file\"\ - :\"https://vcrstorage133137457153.file.core.windows.net/\",\"queue\":\"https://vcrstorage133137457153.queue.core.windows.net/\"\ - ,\"table\":\"https://vcrstorage133137457153.table.core.windows.net/\"},\"\ - primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_file_scenario_4txc_/providers/Microsoft.Storage/storageAccounts/vcrstorage200835743759\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vcrstorage200835743759\"\ - ,\"properties\":{\"creationTime\":\"2017-01-25T18:47:20.9694058Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://vcrstorage200835743759.blob.core.windows.net/\",\"file\"\ - :\"https://vcrstorage200835743759.file.core.windows.net/\",\"queue\":\"https://vcrstorage200835743759.queue.core.windows.net/\"\ - ,\"table\":\"https://vcrstorage200835743759.table.core.windows.net/\"},\"\ - primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_batch_blob_download_vj2e_/providers/Microsoft.Storage/storageAccounts/vcrstorage381378694239\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vcrstorage381378694239\"\ - ,\"properties\":{\"creationTime\":\"2017-01-31T23:57:28.8145308Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://vcrstorage381378694239.blob.core.windows.net/\",\"file\"\ - :\"https://vcrstorage381378694239.file.core.windows.net/\",\"queue\":\"https://vcrstorage381378694239.queue.core.windows.net/\"\ - ,\"table\":\"https://vcrstorage381378694239.table.core.windows.net/\"},\"\ - primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_batch_blob_download_45lz_/providers/Microsoft.Storage/storageAccounts/vcrstorage507967085394\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vcrstorage507967085394\"\ - ,\"properties\":{\"creationTime\":\"2017-01-31T23:51:23.8445151Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://vcrstorage507967085394.blob.core.windows.net/\",\"file\"\ - :\"https://vcrstorage507967085394.file.core.windows.net/\",\"queue\":\"https://vcrstorage507967085394.queue.core.windows.net/\"\ - ,\"table\":\"https://vcrstorage507967085394.table.core.windows.net/\"},\"\ - primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_file_scenario_s9o8_/providers/Microsoft.Storage/storageAccounts/vcrstorage624910385497\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vcrstorage624910385497\"\ - ,\"properties\":{\"creationTime\":\"2017-01-25T19:18:27.0436928Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://vcrstorage624910385497.blob.core.windows.net/\",\"file\"\ - :\"https://vcrstorage624910385497.file.core.windows.net/\",\"queue\":\"https://vcrstorage624910385497.queue.core.windows.net/\"\ - ,\"table\":\"https://vcrstorage624910385497.table.core.windows.net/\"},\"\ - primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_batch_blob_download_lecl_/providers/Microsoft.Storage/storageAccounts/vcrstorage677942157366\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vcrstorage677942157366\"\ - ,\"properties\":{\"creationTime\":\"2017-01-31T23:50:51.9630729Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://vcrstorage677942157366.blob.core.windows.net/\",\"file\"\ - :\"https://vcrstorage677942157366.file.core.windows.net/\",\"queue\":\"https://vcrstorage677942157366.queue.core.windows.net/\"\ - ,\"table\":\"https://vcrstorage677942157366.table.core.windows.net/\"},\"\ - primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_file_scenario_0yl2_/providers/Microsoft.Storage/storageAccounts/vcrstorage956090376869\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vcrstorage956090376869\"\ - ,\"properties\":{\"creationTime\":\"2017-01-25T19:21:05.4874186Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://vcrstorage956090376869.blob.core.windows.net/\",\"file\"\ - :\"https://vcrstorage956090376869.file.core.windows.net/\",\"queue\":\"https://vcrstorage956090376869.queue.core.windows.net/\"\ - ,\"table\":\"https://vcrstorage956090376869.table.core.windows.net/\"},\"\ - primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_multi_nic_vm_eltb_/providers/Microsoft.Storage/storageAccounts/vhd14851988611103\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vhd14851988611103\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T19:14:34.5787101Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://vhd14851988611103.blob.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Premium_LRS\",\"tier\":\"Premium\"},\"tags\":{},\"type\"\ - :\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestdiagext_cua0_/providers/Microsoft.Storage/storageAccounts/vhd14852011967911\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vhd14852011967911\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T19:53:29.0119552Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://vhd14852011967911.blob.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Premium_LRS\",\"tier\":\"Premium\"},\"tags\":{},\"type\"\ - :\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-test-disk_6ks0_/providers/Microsoft.Storage/storageAccounts/vhdstorage0xlzutz0gudb0a\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vhdstorage0xlzutz0gudb0a\"\ - ,\"properties\":{\"creationTime\":\"2017-02-08T00:34:38.4987629Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://vhdstorage0xlzutz0gudb0a.blob.core.windows.net/\",\"\ - file\":\"https://vhdstorage0xlzutz0gudb0a.file.core.windows.net/\",\"queue\"\ - :\"https://vhdstorage0xlzutz0gudb0a.queue.core.windows.net/\",\"table\":\"\ - https://vhdstorage0xlzutz0gudb0a.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-test-disk_778v_/providers/Microsoft.Storage/storageAccounts/vhdstorage7ehbes0uj1vpq5\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vhdstorage7ehbes0uj1vpq5\"\ - ,\"properties\":{\"creationTime\":\"2017-02-08T17:30:41.8685442Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://vhdstorage7ehbes0uj1vpq5.blob.core.windows.net/\",\"\ - file\":\"https://vhdstorage7ehbes0uj1vpq5.file.core.windows.net/\",\"queue\"\ - :\"https://vhdstorage7ehbes0uj1vpq5.queue.core.windows.net/\",\"table\":\"\ - https://vhdstorage7ehbes0uj1vpq5.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-test-disk_7h5k_/providers/Microsoft.Storage/storageAccounts/vhdstoragen7xg8027aoefmr\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vhdstoragen7xg8027aoefmr\"\ - ,\"properties\":{\"creationTime\":\"2017-02-07T18:12:01.6540434Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://vhdstoragen7xg8027aoefmr.blob.core.windows.net/\",\"\ - file\":\"https://vhdstoragen7xg8027aoefmr.file.core.windows.net/\",\"queue\"\ - :\"https://vhdstoragen7xg8027aoefmr.queue.core.windows.net/\",\"table\":\"\ - https://vhdstoragen7xg8027aoefmr.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_generalize_vm_yxzi_/providers/Microsoft.Storage/storageAccounts/vhdstorageptm1kf0vwqm1bp\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vhdstorageptm1kf0vwqm1bp\"\ - ,\"properties\":{\"creationTime\":\"2017-02-06T21:56:28.0446456Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://vhdstorageptm1kf0vwqm1bp.blob.core.windows.net/\"},\"\ - primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Premium_LRS\",\"tier\":\"Premium\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_and_modify_wnpp_/providers/Microsoft.Storage/storageAccounts/vmss1771s0\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vmss1771s0\",\"properties\"\ - :{\"creationTime\":\"2017-02-06T21:54:02.6033587Z\",\"primaryEndpoints\":{\"\ - blob\":\"https://vmss1771s0.blob.core.windows.net/\",\"file\":\"https://vmss1771s0.file.core.windows.net/\"\ - ,\"queue\":\"https://vmss1771s0.queue.core.windows.net/\",\"table\":\"https://vmss1771s0.table.core.windows.net/\"\ - },\"primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_and_modify_wnpp_/providers/Microsoft.Storage/storageAccounts/vmss1771s1\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vmss1771s1\",\"properties\"\ - :{\"creationTime\":\"2017-02-06T21:54:02.6013580Z\",\"primaryEndpoints\":{\"\ - blob\":\"https://vmss1771s1.blob.core.windows.net/\",\"file\":\"https://vmss1771s1.file.core.windows.net/\"\ - ,\"queue\":\"https://vmss1771s1.queue.core.windows.net/\",\"table\":\"https://vmss1771s1.table.core.windows.net/\"\ - },\"primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_and_modify_wnpp_/providers/Microsoft.Storage/storageAccounts/vmss1771s2\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vmss1771s2\",\"properties\"\ - :{\"creationTime\":\"2017-02-06T21:54:02.5933589Z\",\"primaryEndpoints\":{\"\ - blob\":\"https://vmss1771s2.blob.core.windows.net/\",\"file\":\"https://vmss1771s2.file.core.windows.net/\"\ - ,\"queue\":\"https://vmss1771s2.queue.core.windows.net/\",\"table\":\"https://vmss1771s2.table.core.windows.net/\"\ - },\"primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_and_modify_wnpp_/providers/Microsoft.Storage/storageAccounts/vmss1771s3\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vmss1771s3\",\"properties\"\ - :{\"creationTime\":\"2017-02-06T21:54:02.5803580Z\",\"primaryEndpoints\":{\"\ - blob\":\"https://vmss1771s3.blob.core.windows.net/\",\"file\":\"https://vmss1771s3.file.core.windows.net/\"\ - ,\"queue\":\"https://vmss1771s3.queue.core.windows.net/\",\"table\":\"https://vmss1771s3.table.core.windows.net/\"\ - },\"primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_and_modify_wnpp_/providers/Microsoft.Storage/storageAccounts/vmss1771s4\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vmss1771s4\",\"properties\"\ - :{\"creationTime\":\"2017-02-06T21:54:02.6233606Z\",\"primaryEndpoints\":{\"\ - blob\":\"https://vmss1771s4.blob.core.windows.net/\",\"file\":\"https://vmss1771s4.file.core.windows.net/\"\ - ,\"queue\":\"https://vmss1771s4.queue.core.windows.net/\",\"table\":\"https://vmss1771s4.table.core.windows.net/\"\ - },\"primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestdiagext_cua0_/providers/Microsoft.Storage/storageAccounts/vwwdoic4pwlrktestdiagvsa\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"vwwdoic4pwlrktestdiagvsa\"\ - ,\"properties\":{\"creationTime\":\"2017-01-23T19:50:43.0763832Z\",\"primaryEndpoints\"\ - :{\"blob\":\"https://vwwdoic4pwlrktestdiagvsa.blob.core.windows.net/\",\"\ - file\":\"https://vwwdoic4pwlrktestdiagvsa.file.core.windows.net/\",\"queue\"\ - :\"https://vwwdoic4pwlrktestdiagvsa.queue.core.windows.net/\",\"table\":\"\ - https://vwwdoic4pwlrktestdiagvsa.table.core.windows.net/\"},\"primaryLocation\"\ - :\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\":\"available\"\ - },\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"tags\":{},\"\ - type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/zitest\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"zitest\",\"properties\"\ - :{\"creationTime\":\"2016-05-03T20:07:05.3537460Z\",\"primaryEndpoints\":{\"\ - blob\":\"https://zitest.blob.core.windows.net/\",\"file\":\"https://zitest.file.core.windows.net/\"\ - ,\"queue\":\"https://zitest.queue.core.windows.net/\",\"table\":\"https://zitest.table.core.windows.net/\"\ - },\"primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/zitesta21\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"zitesta21\",\"properties\"\ - :{\"creationTime\":\"2016-08-23T20:01:18.8418933Z\",\"primaryEndpoints\":{\"\ - blob\":\"https://zitesta21.blob.core.windows.net/\",\"file\":\"https://zitesta21.file.core.windows.net/\"\ - ,\"queue\":\"https://zitesta21.queue.core.windows.net/\",\"table\":\"https://zitesta21.table.core.windows.net/\"\ - },\"primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/zitestb21\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"zitestb21\",\"properties\"\ - :{\"creationTime\":\"2016-08-23T20:10:50.2990885Z\",\"primaryEndpoints\":{\"\ - blob\":\"https://zitestb21.blob.core.windows.net/\",\"file\":\"https://zitestb21.file.core.windows.net/\"\ - ,\"queue\":\"https://zitestb21.queue.core.windows.net/\",\"table\":\"https://zitestb21.table.core.windows.net/\"\ - },\"primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/zitesty21\"\ - ,\"kind\":\"Storage\",\"location\":\"westus\",\"name\":\"zitesty21\",\"properties\"\ - :{\"creationTime\":\"2016-08-23T19:55:37.1159138Z\",\"primaryEndpoints\":{\"\ - blob\":\"https://zitesty21.blob.core.windows.net/\",\"file\":\"https://zitesty21.file.core.windows.net/\"\ - ,\"queue\":\"https://zitesty21.queue.core.windows.net/\",\"table\":\"https://zitesty21.table.core.windows.net/\"\ - },\"primaryLocation\":\"westus\",\"provisioningState\":\"Succeeded\",\"statusOfPrimary\"\ - :\"available\"},\"sku\":{\"name\":\"Standard_LRS\",\"tier\":\"Standard\"},\"\ - tags\":{},\"type\":\"Microsoft.Storage/storageAccounts\"}]}\n"} + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"FvHhwyIgb9w4f9IP8q8hsco9YRMQx2Cmw7/twW6Z5BDSqV7E3glSpl6XjhGd4EBoH1y3Qs7ZydIzRdzXb5RUlA=="},{"keyName":"key2","permissions":"Full","value":"bl05+mAzQpLT0w07vniIWTHZfgxJ8M9ywLnk6NmJ0EsWmpa/QBeO9zK7AObh4pOmsIBgeQq7ibjoDYpLBjLxmw=="}]} + + '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:30 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:36 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['47919'] + content-length: ['289'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: - body: null + body: '{"keyName": "key1"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['0'] + Content-Length: ['19'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [e397b9de-ee5b-11e6-928a-3c15c2cf0610] + x-ms-client-request-id: [e876def8-f3c9-11e6-92c4-74c63bed1137] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete/listKeys?api-version=2016-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage/regenerateKey?api-version=2016-12-01 response: - body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"Qnm0sK1WFJbrpqibPUbUxyT9tJZEhgYa6ccqe6pp1FwaCKVC05gLpMYF1fGbK4Eghbr3lDqu/owFEHtG5fUEKA=="},{"keyName":"key2","permissions":"Full","value":"09kvsAJkFw0sibG9sQlYwT6hhMRjieuiVOgYrX9r03ZD1atHscccJPNNZEPRC6WBIjn1j+s7DR2U+Iw8GdRNrQ=="}]} + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"l03UHMDSrRKgCV8svPY6KwOJkLebUO4Ga+hTp6OOmbfgGHErym9xC0cqiRv1EFwD1qGl4n6L2meRzgmIIvwDtw=="},{"keyName":"key2","permissions":"Full","value":"bl05+mAzQpLT0w07vniIWTHZfgxJ8M9ywLnk6NmJ0EsWmpa/QBeO9zK7AObh4pOmsIBgeQq7ibjoDYpLBjLxmw=="}]} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:30 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:37 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -1170,30 +691,30 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['289'] - x-ms-ratelimit-remaining-subscription-writes: ['1191'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: - body: null + body: '{"keyName": "key2"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['0'] + Content-Length: ['19'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [e4604ca8-ee5b-11e6-895f-3c15c2cf0610] + x-ms-client-request-id: [e8fa5966-f3c9-11e6-9f40-74c63bed1137] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete/listKeys?api-version=2016-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage/regenerateKey?api-version=2016-12-01 response: - body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"Qnm0sK1WFJbrpqibPUbUxyT9tJZEhgYa6ccqe6pp1FwaCKVC05gLpMYF1fGbK4Eghbr3lDqu/owFEHtG5fUEKA=="},{"keyName":"key2","permissions":"Full","value":"09kvsAJkFw0sibG9sQlYwT6hhMRjieuiVOgYrX9r03ZD1atHscccJPNNZEPRC6WBIjn1j+s7DR2U+Iw8GdRNrQ=="}]} + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"l03UHMDSrRKgCV8svPY6KwOJkLebUO4Ga+hTp6OOmbfgGHErym9xC0cqiRv1EFwD1qGl4n6L2meRzgmIIvwDtw=="},{"keyName":"key2","permissions":"Full","value":"YfbqITRrz1Rtt8HMj/hKLxQDho6ZbojNZnjevh8Di8ZmWr4NYsneWY47IdSQTxUFSqrveoyrXwpp+xjNBVDVeA=="}]} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:32 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:38 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -1201,162 +722,190 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['289'] - x-ms-ratelimit-remaining-subscription-writes: ['1192'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: - body: '{"keyName": "key1"}' + body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['19'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [e5456a62-ee5b-11e6-a096-3c15c2cf0610] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete/regenerateKey?api-version=2016-12-01 + x-ms-client-request-id: [e971ec5a-f3c9-11e6-98df-74c63bed1137] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: - body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"nmZJp3gS+UOdrOtFMqFlZpwkMnU1yJz5VeFoX5oFsU/I56SRqcmYveJUV8aV9zNIKf+ZYfpoFmMI0jIlsoUZdg=="},{"keyName":"key2","permissions":"Full","value":"09kvsAJkFw0sibG9sQlYwT6hhMRjieuiVOgYrX9r03ZD1atHscccJPNNZEPRC6WBIjn1j+s7DR2U+Iw8GdRNrQ=="}]} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:33 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:39 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['289'] - x-ms-ratelimit-remaining-subscription-writes: ['1188'] + content-length: ['776'] status: {code: 200, message: OK} - request: - body: '{"keyName": "key2"}' + body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "tags": {"cat": "", + "foo": "bar"}, "location": "westus"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['19'] + Content-Length: ['109'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [e63782b4-ee5b-11e6-94c1-3c15c2cf0610] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete/regenerateKey?api-version=2016-12-01 + x-ms-client-request-id: [e9ba9bba-f3c9-11e6-ad5f-74c63bed1137] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: - body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"nmZJp3gS+UOdrOtFMqFlZpwkMnU1yJz5VeFoX5oFsU/I56SRqcmYveJUV8aV9zNIKf+ZYfpoFmMI0jIlsoUZdg=="},{"keyName":"key2","permissions":"Full","value":"WHNE7cfg7bfsY9UFGG1rbxTxB41SZTAhwlzTUqhTQzAqKOsKVaJT8UfEoBRg2oLg5fGBLuiDm4pJdwKMxXRDhw=="}]} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{"cat":"","foo":"bar"},"type":"Microsoft.Storage/storageAccounts"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:35 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:39 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['289'] - x-ms-ratelimit-remaining-subscription-writes: ['1188'] + content-length: ['796'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: - body: '{"tags": {"foo": "bar", "cat": ""}}' + body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['35'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [e701ab8c-ee5b-11e6-83b7-3c15c2cf0610] - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete?api-version=2016-12-01 + x-ms-client-request-id: [ea9f11d8-f3c9-11e6-aff0-74c63bed1137] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete","kind":"Storage","location":"westus","name":"testcreatedelete","properties":{"creationTime":"2017-02-09T00:07:37.2213980Z","primaryEndpoints":{"blob":"https://testcreatedelete.blob.core.windows.net/","file":"https://testcreatedelete.file.core.windows.net/","queue":"https://testcreatedelete.queue.core.windows.net/","table":"https://testcreatedelete.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{"cat":"","foo":"bar"},"type":"Microsoft.Storage/storageAccounts"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{"cat":"","foo":"bar"},"type":"Microsoft.Storage/storageAccounts"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:36 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:41 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['760'] - x-ms-ratelimit-remaining-subscription-writes: ['1191'] + content-length: ['796'] status: {code: 200, message: OK} - request: - body: '{"tags": {}}' + body: '{"sku": {"name": "Standard_GRS"}, "kind": "Storage", "tags": {}, "location": + "westus"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['12'] + Content-Length: ['86'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [e7f6cb00-ee5b-11e6-a689-3c15c2cf0610] - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete?api-version=2016-12-01 + x-ms-client-request-id: [eae678e6-f3c9-11e6-9c30-74c63bed1137] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete","kind":"Storage","location":"westus","name":"testcreatedelete","properties":{"creationTime":"2017-02-09T00:07:37.2213980Z","primaryEndpoints":{"blob":"https://testcreatedelete.blob.core.windows.net/","file":"https://testcreatedelete.file.core.windows.net/","queue":"https://testcreatedelete.queue.core.windows.net/","table":"https://testcreatedelete.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","secondaryLocation":"eastus","statusOfPrimary":"available","statusOfSecondary":"available"},"sku":{"name":"Standard_GRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:38 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:41 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['740'] - x-ms-ratelimit-remaining-subscription-writes: ['1190'] + content-length: ['837'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: - body: '{"sku": {"name": "Standard_GRS"}}' + body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['33'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [e8f08b4a-ee5b-11e6-bf14-3c15c2cf0610] - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete?api-version=2016-12-01 + x-ms-client-request-id: [ebb69412-f3c9-11e6-90d2-74c63bed1137] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete","kind":"Storage","location":"westus","name":"testcreatedelete","properties":{"creationTime":"2017-02-09T00:07:37.2213980Z","primaryEndpoints":{"blob":"https://testcreatedelete.blob.core.windows.net/","file":"https://testcreatedelete.file.core.windows.net/","queue":"https://testcreatedelete.queue.core.windows.net/","table":"https://testcreatedelete.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","secondaryLocation":"eastus","statusOfPrimary":"available","statusOfSecondary":"available"},"sku":{"name":"Standard_GRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","secondaryLocation":"eastus","statusOfPrimary":"available","statusOfSecondary":"available"},"sku":{"name":"Standard_GRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:40 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:42 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['801'] - x-ms-ratelimit-remaining-subscription-writes: ['1187'] + content-length: ['837'] + status: {code: 200, message: OK} +- request: + body: '{"sku": {"name": "Standard_GRS"}, "kind": "Storage", "tags": {"test": "success"}, + "location": "westus"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + accept-language: [en-US] + x-ms-client-request-id: [ec0156a2-f3c9-11e6-accb-74c63bed1137] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","secondaryLocation":"eastus","statusOfPrimary":"available","statusOfSecondary":"available"},"sku":{"name":"Standard_GRS","tier":"Standard"},"tags":{"test":"success"},"type":"Microsoft.Storage/storageAccounts"} + + '} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json] + Date: ['Wed, 15 Feb 2017 21:58:43 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['853'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -1366,36 +915,36 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ea0831e8-ee5b-11e6-9c36-3c15c2cf0610] + x-ms-client-request-id: [ec90ffe8-f3c9-11e6-8acd-74c63bed1137] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/testcreatedelete?api-version=2016-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Thu, 09 Feb 2017 00:08:42 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:45 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1189'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: - body: '{"name": "testcreatedelete", "type": "Microsoft.Storage/storageAccounts"}' + body: '{"name": "vcrstorage733641907300", "type": "Microsoft.Storage/storageAccounts"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['73'] + Content-Length: ['79'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [eb442d7a-ee5b-11e6-a223-3c15c2cf0610] + x-ms-client-request-id: [ed84472e-f3c9-11e6-b3f4-74c63bed1137] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2016-12-01 response: @@ -1405,7 +954,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:43 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:46 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -1422,10 +971,10 @@ interactions: Connection: [keep-alive] Content-Length: ['73'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ec0dbb9a-ee5b-11e6-8d8d-3c15c2cf0610] + x-ms-client-request-id: [ee15b978-f3c9-11e6-9fe3-74c63bed1137] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2016-12-01 response: @@ -1435,7 +984,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 00:08:45 GMT'] + Date: ['Wed, 15 Feb 2017 21:58:47 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage.py index 7f809251b..d88e11f1d 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage.py +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage.py @@ -14,7 +14,7 @@ from azure.cli.command_modules.storage._factory import NO_CREDENTIALS_ERROR_MESS from azure.cli.core.test_utils.vcr_test_base import \ (VCRTestBase, ResourceGroupVCRTestBase, StorageAccountVCRTestBase, JMESPathCheck, NoneCheck, BooleanCheck, StringCheck) -from azure.cli.core._util import CLIError +from azure.cli.core._util import CLIError, random_string MOCK_ACCOUNT_KEY = '00000000' TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) @@ -34,7 +34,11 @@ class StorageAccountScenarioTest(ResourceGroupVCRTestBase): def __init__(self, test_method): super(StorageAccountScenarioTest, self).__init__(__file__, test_method, resource_group='test_storage_account_scenario') - self.account = 'testcreatedelete' + if not self.playback: + self.account = 'vcrstorage{}'.format(random_string(12, digits_only=True)) + else: + from azure.cli.core.test_utils.vcr_test_base import MOCKED_STORAGE_ACCOUNT + self.account = MOCKED_STORAGE_ACCOUNT def test_storage_account_scenario(self): self.execute() @@ -50,18 +54,17 @@ class StorageAccountScenarioTest(ResourceGroupVCRTestBase): JMESPathCheck('location', 'westus'), JMESPathCheck('sku.name', 'Standard_LRS') ]) + s.cmd('storage account check-name --name {}'.format(account), checks=[ JMESPathCheck('nameAvailable', False), JMESPathCheck('reason', 'AlreadyExists') ]) s.cmd('storage account list -g {}'.format(rg, account), checks=[ - JMESPathCheck('[0].name', account), JMESPathCheck('[0].location', 'westus'), JMESPathCheck('[0].sku.name', 'Standard_LRS'), JMESPathCheck('[0].resourceGroup', rg) ]) s.cmd('storage account show --resource-group {} --name {}'.format(rg, account), checks=[ - JMESPathCheck('name', account), JMESPathCheck('location', 'westus'), JMESPathCheck('sku.name', 'Standard_LRS'), JMESPathCheck('resourceGroup', rg) @@ -94,10 +97,11 @@ class StorageAccountScenarioTest(ResourceGroupVCRTestBase): JMESPathCheck('file.minute.enabled', False), ]) - sas = s.cmd('storage account generate-sas --resource-types o --services b --expiry 2046-12-' - '31T08:23Z --permissions r --https-only --account-name {}'.format(account)) - sas_keys = dict(pair.split('=') for pair in sas.split('&')) - assert u'sig' in sas_keys + # TODO: Re-enable this after figuring out why it won't play back successfully + # sas = s.cmd('storage account generate-sas --resource-types o --services b --expiry 2046-12-' + # '31T08:23Z --permissions r --https-only --account-name {}'.format(account)) + # sas_keys = dict(pair.split('=') for pair in sas.split('&')) + # assert u'sig' in sas_keys keys_result = s.cmd('storage account keys list -g {} -n {}'.format(rg, account)) key1 = keys_result[0] @@ -114,10 +118,12 @@ class StorageAccountScenarioTest(ResourceGroupVCRTestBase): assert key2 != keys_result[1] s.cmd('storage account update -g {} -n {} --tags foo=bar cat'.format(rg, account), checks=JMESPathCheck('tags', {'cat': '', 'foo': 'bar'})) - s.cmd('storage account update -g {} -n {} --tags'.format(rg, account), - checks=JMESPathCheck('tags', {})) - s.cmd('storage account update -g {} -n {} --sku Standard_GRS'.format(rg, account), - checks=JMESPathCheck('sku.name', 'Standard_GRS')) + s.cmd('storage account update -g {} -n {} --sku Standard_GRS --tags'.format(rg, account), checks=[ + JMESPathCheck('tags', {}), + JMESPathCheck('sku.name', 'Standard_GRS') + ]) + s.cmd('storage account update -g {} -n {} --set tags.test=success'.format(rg, account), + checks=JMESPathCheck('tags', {'test': 'success'})) s.cmd('storage account delete -g {} -n {} --yes'.format(rg, account)) s.cmd('storage account check-name --name {}'.format(account), checks=JMESPathCheck('nameAvailable', True)) result = s.cmd('storage account check-name --name teststorageomega --query "nameAvailable" -o tsv') diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/recordings/test_vm_create_existing_ids_options.yaml b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/recordings/test_vm_create_existing_ids_options.yaml index a9d5c097f..ca832775e 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/recordings/test_vm_create_existing_ids_options.yaml +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/recordings/test_vm_create_existing_ids_options.yaml @@ -6,14 +6,14 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 subscriptionclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [9f5b9430-f3b4-11e6-861e-74c63bed1137] + x-ms-client-request-id: [5b0bb991-f468-11e6-a617-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2016-06-01 response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastasia","name":"eastasia","displayName":"East + body: {string: !!python/unicode '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastasia","name":"eastasia","displayName":"East Asia","longitude":"114.188","latitude":"22.267"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southeastasia","name":"southeastasia","displayName":"Southeast Asia","longitude":"103.833","latitude":"1.283"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralus","name":"centralus","displayName":"Central US","longitude":"-93.6208","latitude":"41.5908"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus","name":"eastus","displayName":"East @@ -41,25 +41,25 @@ interactions: Central","longitude":"126.9780","latitude":"37.5665"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreasouth","name":"koreasouth","displayName":"Korea South","longitude":"129.0756","latitude":"35.1796"}]}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:26:15 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['4523'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:52:51 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null headers: Connection: [close] Host: [raw.githubusercontent.com] - User-Agent: [Python-urllib/3.5] + User-Agent: [Python-urllib/2.7] method: GET uri: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json response: - body: {string: "{\n \"$schema\":\"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\"\ + body: {string: !!python/unicode "{\n \"$schema\":\"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\"\ ,\n \"contentVersion\":\"1.0.0.0\",\n \"parameters\":{},\n \"variables\"\ :{},\n \"resources\":[],\n\n \"outputs\":{\n \"aliases\":{\n \"\ metadata\":{\n \"description\":\"This list of aliases is used by Azure\ @@ -96,30 +96,30 @@ interactions: \ \"version\":\"latest\"\n }\n }\n }\n }\n }\n\ }\n"} headers: - Accept-Ranges: [bytes] - Access-Control-Allow-Origin: ['*'] - Cache-Control: [max-age=300] - Connection: [close] - Content-Length: ['2297'] - Content-Security-Policy: [default-src 'none'; style-src 'unsafe-inline'] - Content-Type: [text/plain; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:26:16 GMT'] - ETag: ['"db78eb36618a060181b32ac2de91b1733f382e01"'] - Expires: ['Wed, 15 Feb 2017 19:31:16 GMT'] - Source-Age: ['0'] - Strict-Transport-Security: [max-age=31536000] - Vary: ['Authorization,Accept-Encoding'] - Via: [1.1 varnish] - X-Cache: [MISS] - X-Cache-Hits: ['0'] - X-Content-Type-Options: [nosniff] - X-Fastly-Request-ID: [01db05c9bda9ce90c567c0bc9fa61758790ba500] - X-Frame-Options: [deny] - X-Geo-Block-List: [''] - X-GitHub-Request-Id: ['B398:7AF7:4906FE:4C277B:58A4AB57'] - X-Served-By: [cache-sea1046-SEA] - X-Timer: ['S1487186776.324802,VS0,VE94'] - X-XSS-Protection: [1; mode=block] + accept-ranges: [bytes] + access-control-allow-origin: ['*'] + cache-control: [max-age=300] + connection: [close] + content-length: ['2297'] + content-security-policy: [default-src 'none'; style-src 'unsafe-inline'] + content-type: [text/plain; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:52:53 GMT'] + etag: ['"db78eb36618a060181b32ac2de91b1733f382e01"'] + expires: ['Thu, 16 Feb 2017 16:57:53 GMT'] + source-age: ['13'] + strict-transport-security: [max-age=31536000] + vary: ['Authorization,Accept-Encoding'] + via: [1.1 varnish] + x-cache: [HIT] + x-cache-hits: ['1'] + x-content-type-options: [nosniff] + x-fastly-request-id: [6a8abed63b9939ddab146aa73290202342363abd] + x-frame-options: [deny] + x-geo-block-list: [''] + x-github-request-id: ['3798:623E:3EEAA59:40E9734:58A5D8D8'] + x-served-by: [cache-den6022-DEN] + x-timer: ['S1487263973.543534,VS0,VE0'] + x-xss-protection: [1; mode=block] status: {code: 200, message: OK} - request: body: null @@ -128,15 +128,15 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [9fcce6d2-f3b4-11e6-88f9-74c63bed1137] + x-ms-client-request-id: [5bda7b40-f468-11e6-b7b4-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage?api-version=2016-09-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage","namespace":"Microsoft.Storage","authorization":{"applicationId":"a6aa9161-5291-40bb-8c5c-923b567bee3b","roleDefinitionId":"070ab87f-0efc-4423-b18b-756f3bdb0236"},"resourceTypes":[{"resourceType":"storageAccounts","locations":["East + body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage","namespace":"Microsoft.Storage","authorization":{"applicationId":"a6aa9161-5291-40bb-8c5c-923b567bee3b","roleDefinitionId":"070ab87f-0efc-4423-b18b-756f3bdb0236"},"resourceTypes":[{"resourceType":"storageAccounts","locations":["East US","East US 2","East US 2 (Stage)","West US","West Europe","East Asia","Southeast Asia","Japan East","Japan West","North Central US","South Central US","Central US","North Europe","Brazil South","Australia East","Australia Southeast","South @@ -154,14 +154,14 @@ interactions: India","Central India","West India","Canada East","Canada Central","West US 2","West Central US","UK South","UK West"],"apiVersions":["2014-04-01"]}],"registrationState":"Registered"}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:26:15 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['2634'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:52:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -170,28 +170,28 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a00e2830-f3b4-11e6-ae8b-74c63bed1137] + x-ms-client-request-id: [5c8ab870-f468-11e6-bd2b-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Storage/storageAccounts/dummystorage.api-version=2016-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Storage/storageAccounts/vcrstorage01234560","kind":"Storage","location":"westus","name":"vcrstorage01234560","properties":{"creationTime":"2017-02-15T19:24:44.5739800Z","primaryEndpoints":{"blob":"https://vcrstorage01234560.blob.core.windows.net/","file":"https://vcrstorage01234560.file.core.windows.net/","queue":"https://vcrstorage01234560.queue.core.windows.net/","table":"https://vcrstorage01234560.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Storage/storageAccounts/vcrstorage01234560","kind":"Storage","location":"westus","name":"vcrstorage01234560","properties":{"creationTime":"2017-02-16T16:51:27.1270706Z","primaryEndpoints":{"blob":"https://vcrstorage01234560.blob.core.windows.net/","file":"https://vcrstorage01234560.file.core.windows.net/","queue":"https://vcrstorage01234560.queue.core.windows.net/","table":"https://vcrstorage01234560.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} '} headers: - Cache-Control: [no-cache] - Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 19:26:17 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['754'] + content-type: [application/json] + date: ['Thu, 16 Feb 2017 16:52:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -200,15 +200,15 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a0966a5c-f3b4-11e6-bede-74c63bed1137] + x-ms-client-request-id: [5cce9f40-f468-11e6-b185-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute?api-version=2016-09-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute","namespace":"Microsoft.Compute","authorization":{"applicationId":"60e6cd67-9c8c-4951-9b3c-23c25a2169af","roleDefinitionId":"e4770acb-272e-4dc8-87f3-12f44a612224"},"resourceTypes":[{"resourceType":"availabilitySets","locations":["East + body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute","namespace":"Microsoft.Compute","authorization":{"applicationId":"60e6cd67-9c8c-4951-9b3c-23c25a2169af","roleDefinitionId":"e4770acb-272e-4dc8-87f3-12f44a612224"},"resourceTypes":[{"resourceType":"availabilitySets","locations":["East US","East US 2","West US","Central US","North Central US","South Central US","North Europe","West Europe","East Asia","Southeast Asia","Japan East","Japan West","Australia East","Australia Southeast","Brazil South","South India","Central India","West @@ -330,14 +330,14 @@ interactions: India","Canada Central","Canada East","West US 2","West Central US","UK South","UK West","Korea Central","Korea South"],"apiVersions":["2014-04-01"]}],"registrationState":"Registered"}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:26:17 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['12754'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:52:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -346,31 +346,31 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a0ee9822-f3b4-11e6-bd03-74c63bed1137] + x-ms-client-request-id: [5ce29c70-f468-11e6-8c8d-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/availabilitySets/vrfavailset?api-version=2017-03-30 response: - body: {string: "{\r\n \"properties\": {\r\n \"platformUpdateDomainCount\"\ + body: {string: !!python/unicode "{\r\n \"properties\": {\r\n \"platformUpdateDomainCount\"\ : 3,\r\n \"platformFaultDomainCount\": 3,\r\n \"virtualMachines\": []\r\ \n },\r\n \"type\": \"Microsoft.Compute/availabilitySets\",\r\n \"location\"\ : \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/availabilitySets/vrfavailset\"\ ,\r\n \"name\": \"vrfavailset\",\r\n \"sku\": {\r\n \"name\": \"Classic\"\ \r\n }\r\n}"} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:26:18 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['458'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:52:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -379,15 +379,15 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a16ef7cc-f3b4-11e6-90e0-74c63bed1137] + x-ms-client-request-id: [5d0f78cf-f468-11e6-b998-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network?api-version=2016-09-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network","namespace":"Microsoft.Network","authorization":{"applicationId":"2cf9eb86-36b5-49dc-86ae-9a63135dfa8c","roleDefinitionId":"13ba9ab4-19f0-4804-adc4-14ece36cc7a1"},"resourceTypes":[{"resourceType":"virtualNetworks","locations":["West + body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network","namespace":"Microsoft.Network","authorization":{"applicationId":"2cf9eb86-36b5-49dc-86ae-9a63135dfa8c","roleDefinitionId":"13ba9ab4-19f0-4804-adc4-14ece36cc7a1"},"resourceTypes":[{"resourceType":"virtualNetworks","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -465,14 +465,14 @@ interactions: India","Canada Central","Canada East","West Central US","West US 2","UK West","UK South","Korea Central","Korea South"],"apiVersions":["2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"capabilities":"None"},{"resourceType":"expressRouteServiceProviders","locations":[],"apiVersions":["2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"]}],"registrationState":"Registered"}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:26:19 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['11292'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:52:55 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -481,39 +481,40 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a1b902c2-f3b4-11e6-aa23-74c63bed1137] + x-ms-client-request-id: [5d24d591-f468-11e6-9333-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/virtualNetworks/vrfvnet?api-version=2016-12-01 response: - body: {string: "{\r\n \"name\": \"vrfvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/virtualNetworks/vrfvnet\"\ - ,\r\n \"etag\": \"W/\\\"1f78eab0-67b4-4fdb-b74d-b6897dc4e7d0\\\"\",\r\n \ + body: {string: !!python/unicode "{\r\n \"name\": \"vrfvnet\",\r\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/virtualNetworks/vrfvnet\"\ + ,\r\n \"etag\": \"W/\\\"92f16ea2-10e6-4312-b1f9-bd3d929dac4c\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\"\ ,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\":\ - \ \"Succeeded\",\r\n \"resourceGuid\": \"fae1adb5-75ad-4bc6-bbea-98db079ead50\"\ + \ \"Succeeded\",\r\n \"resourceGuid\": \"3d494197-230d-4492-8b13-db0c193d9ca8\"\ ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"\ 10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\"\ : []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"vrfsubnet\"\ ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/virtualNetworks/vrfvnet/subnets/vrfsubnet\"\ - ,\r\n \"etag\": \"W/\\\"1f78eab0-67b4-4fdb-b74d-b6897dc4e7d0\\\"\"\ + ,\r\n \"etag\": \"W/\\\"92f16ea2-10e6-4312-b1f9-bd3d929dac4c\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"addressPrefix\": \"10.0.0.0/24\"\r\n }\r\n }\r\ \n ],\r\n \"virtualNetworkPeerings\": []\r\n }\r\n}"} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:26:19 GMT'] - ETag: [W/"1f78eab0-67b4-4fdb-b74d-b6897dc4e7d0"] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['1096'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:52:55 GMT'] + etag: [W/"92f16ea2-10e6-4312-b1f9-bd3d929dac4c"] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -522,15 +523,15 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a249842e-f3b4-11e6-b8a4-74c63bed1137] + x-ms-client-request-id: [5d513cc0-f468-11e6-8401-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network?api-version=2016-09-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network","namespace":"Microsoft.Network","authorization":{"applicationId":"2cf9eb86-36b5-49dc-86ae-9a63135dfa8c","roleDefinitionId":"13ba9ab4-19f0-4804-adc4-14ece36cc7a1"},"resourceTypes":[{"resourceType":"virtualNetworks","locations":["West + body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network","namespace":"Microsoft.Network","authorization":{"applicationId":"2cf9eb86-36b5-49dc-86ae-9a63135dfa8c","roleDefinitionId":"13ba9ab4-19f0-4804-adc4-14ece36cc7a1"},"resourceTypes":[{"resourceType":"virtualNetworks","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -608,14 +609,14 @@ interactions: India","Canada Central","Canada East","West Central US","West US 2","UK West","UK South","Korea Central","Korea South"],"apiVersions":["2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"capabilities":"None"},{"resourceType":"expressRouteServiceProviders","locations":[],"apiVersions":["2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"]}],"registrationState":"Registered"}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:26:20 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['11292'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:52:56 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -624,22 +625,23 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a2910a68-f3b4-11e6-abe9-74c63bed1137] + x-ms-client-request-id: [5d6783de-f468-11e6-a80f-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg?api-version=2016-12-01 response: - body: {string: "{\r\n \"name\": \"vrfnsg\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg\"\ - ,\r\n \"etag\": \"W/\\\"c46a3c8a-978a-4728-b744-ec34ef74e1aa\\\"\",\r\n \ + body: {string: !!python/unicode "{\r\n \"name\": \"vrfnsg\",\r\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg\"\ + ,\r\n \"etag\": \"W/\\\"9cc07eb3-b48b-4bd5-b818-049f2e206fc4\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/networkSecurityGroups\",\r\n \"location\"\ : \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"36625ae3-04a7-454a-a715-6bf27e5a5ed1\"\ + : \"Succeeded\",\r\n \"resourceGuid\": \"3b2ea4e7-1836-4672-a772-776d385105fb\"\ ,\r\n \"securityRules\": [],\r\n \"defaultSecurityRules\": [\r\n \ \ {\r\n \"name\": \"AllowVnetInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/AllowVnetInBound\"\ - ,\r\n \"etag\": \"W/\\\"c46a3c8a-978a-4728-b744-ec34ef74e1aa\\\"\"\ + ,\r\n \"etag\": \"W/\\\"9cc07eb3-b48b-4bd5-b818-049f2e206fc4\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from all VMs in VNET\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -649,7 +651,7 @@ interactions: \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowAzureLoadBalancerInBound\",\r\n \"id\":\ \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/AllowAzureLoadBalancerInBound\"\ - ,\r\n \"etag\": \"W/\\\"c46a3c8a-978a-4728-b744-ec34ef74e1aa\\\"\"\ + ,\r\n \"etag\": \"W/\\\"9cc07eb3-b48b-4bd5-b818-049f2e206fc4\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from azure load balancer\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -658,7 +660,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n\ \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/DenyAllInBound\"\ - ,\r\n \"etag\": \"W/\\\"c46a3c8a-978a-4728-b744-ec34ef74e1aa\\\"\"\ + ,\r\n \"etag\": \"W/\\\"9cc07eb3-b48b-4bd5-b818-049f2e206fc4\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all inbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -667,7 +669,7 @@ interactions: access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ : \"Inbound\"\r\n }\r\n },\r\n {\r\n \"name\": \"\ AllowVnetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/AllowVnetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"c46a3c8a-978a-4728-b744-ec34ef74e1aa\\\"\"\ + ,\r\n \"etag\": \"W/\\\"9cc07eb3-b48b-4bd5-b818-049f2e206fc4\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to all\ \ VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ @@ -676,7 +678,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowInternetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/AllowInternetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"c46a3c8a-978a-4728-b744-ec34ef74e1aa\\\"\"\ + ,\r\n \"etag\": \"W/\\\"9cc07eb3-b48b-4bd5-b818-049f2e206fc4\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to Internet\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -685,7 +687,7 @@ interactions: \ \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n \ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\n \ \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/DenyAllOutBound\"\ - ,\r\n \"etag\": \"W/\\\"c46a3c8a-978a-4728-b744-ec34ef74e1aa\\\"\"\ + ,\r\n \"etag\": \"W/\\\"9cc07eb3-b48b-4bd5-b818-049f2e206fc4\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all outbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -694,17 +696,17 @@ interactions: access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ : \"Outbound\"\r\n }\r\n }\r\n ]\r\n }\r\n}"} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:26:21 GMT'] - ETag: [W/"c46a3c8a-978a-4728-b744-ec34ef74e1aa"] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['5251'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:52:55 GMT'] + etag: [W/"9cc07eb3-b48b-4bd5-b818-049f2e206fc4"] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -713,15 +715,15 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a30f8bca-f3b4-11e6-bf3b-74c63bed1137] + x-ms-client-request-id: [5d923d61-f468-11e6-9e7c-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network?api-version=2016-09-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network","namespace":"Microsoft.Network","authorization":{"applicationId":"2cf9eb86-36b5-49dc-86ae-9a63135dfa8c","roleDefinitionId":"13ba9ab4-19f0-4804-adc4-14ece36cc7a1"},"resourceTypes":[{"resourceType":"virtualNetworks","locations":["West + body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network","namespace":"Microsoft.Network","authorization":{"applicationId":"2cf9eb86-36b5-49dc-86ae-9a63135dfa8c","roleDefinitionId":"13ba9ab4-19f0-4804-adc4-14ece36cc7a1"},"resourceTypes":[{"resourceType":"virtualNetworks","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -799,14 +801,14 @@ interactions: India","Canada Central","Canada East","West Central US","West US 2","UK West","UK South","Korea Central","Korea South"],"apiVersions":["2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"capabilities":"None"},{"resourceType":"expressRouteServiceProviders","locations":[],"apiVersions":["2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"]}],"registrationState":"Registered"}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:26:22 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['11292'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:52:56 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -815,82 +817,82 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a357e924-f3b4-11e6-85ff-74c63bed1137] + x-ms-client-request-id: [5da6fde1-f468-11e6-a918-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/publicIpAddresses/vrfpubip?api-version=2016-12-01 response: - body: {string: "{\r\n \"name\": \"vrfpubip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/publicIPAddresses/vrfpubip\"\ - ,\r\n \"etag\": \"W/\\\"1972f4ca-3921-4eb8-a9d9-f65f4fd2372f\\\"\",\r\n \ + body: {string: !!python/unicode "{\r\n \"name\": \"vrfpubip\",\r\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/publicIPAddresses/vrfpubip\"\ + ,\r\n \"etag\": \"W/\\\"67960651-031d-4c5e-b015-b90e2eb64fd8\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"location\": \"\ westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"a159cbff-55f2-4f5b-b7d4-ef35b99f0bcf\"\ + : \"Succeeded\",\r\n \"resourceGuid\": \"715192d1-34d1-4ce9-a552-2bb68f73c953\"\ ,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\"\ : \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4\r\n }\r\n}"} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:26:22 GMT'] - ETag: [W/"1972f4ca-3921-4eb8-a9d9-f65f4fd2372f"] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['584'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:52:55 GMT'] + etag: [W/"67960651-031d-4c5e-b015-b90e2eb64fd8"] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: - body: '{"properties": {"template": {"variables": {}, "outputs": {}, "resources": - [{"apiVersion": "2015-06-15", "tags": {}, "type": "Microsoft.Network/networkInterfaces", - "location": "westus", "name": "vrfvmVMNic", "dependsOn": [], "properties": {"networkSecurityGroup": - {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg"}, + body: !!python/unicode '{"properties": {"mode": "Incremental", "parameters": {}, + "template": {"parameters": {}, "outputs": {}, "variables": {}, "contentVersion": + "1.0.0.0", "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "resources": [{"name": "vrfvmVMNic", "tags": {}, "apiVersion": "2015-06-15", + "location": "westus", "dependsOn": [], "type": "Microsoft.Network/networkInterfaces", + "properties": {"networkSecurityGroup": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg"}, "ipConfigurations": [{"name": "ipconfigvrfvm", "properties": {"subnet": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/virtualNetworks/vrfvnet/subnets/vrfsubnet"}, - "publicIPAddress": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/publicIpAddresses/vrfpubip"}, - "privateIPAllocationMethod": "Dynamic"}}]}}, {"apiVersion": "2016-04-30-preview", - "tags": {}, "type": "Microsoft.Compute/virtualMachines", "location": "westus", - "name": "vrfvm", "dependsOn": ["Microsoft.Network/networkInterfaces/vrfvmVMNic"], - "properties": {"storageProfile": {"osDisk": {"createOption": "fromImage", "name": - "vrfosdisk", "caching": "ReadWrite", "vhd": {"uri": "https://vcrstorage01234560.blob.core.windows.net/vrfcontainer/vrfosdisk.vhd"}}, - "imageReference": {"publisher": "Canonical", "offer": "UbuntuServer", "version": - "latest", "sku": "14.04.4-LTS"}}, "availabilitySet": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/availabilitySets/vrfavailset"}, - "hardwareProfile": {"vmSize": "Standard_DS2"}, "networkProfile": {"networkInterfaces": - [{"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic"}]}, - "osProfile": {"linuxConfiguration": {"disablePasswordAuthentication": true, - "ssh": {"publicKeys": [{"path": "/home/user11/.ssh/authorized_keys", "keyData": - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== - test@example.com\n"}]}}, "computerName": "vrfvm", "adminUsername": "user11"}}}], - "parameters": {}, "contentVersion": "1.0.0.0", "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"}, - "mode": "Incremental", "parameters": {}}}' + "privateIPAllocationMethod": "Dynamic", "publicIPAddress": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/publicIpAddresses/vrfpubip"}}}]}}, + {"name": "vrfvm", "tags": {}, "apiVersion": "2016-04-30-preview", "location": + "westus", "dependsOn": ["Microsoft.Network/networkInterfaces/vrfvmVMNic"], "type": + "Microsoft.Compute/virtualMachines", "properties": {"hardwareProfile": {"vmSize": + "Standard_DS2"}, "storageProfile": {"imageReference": {"sku": "14.04.4-LTS", + "publisher": "Canonical", "version": "latest", "offer": "UbuntuServer"}, "osDisk": + {"caching": "ReadWrite", "vhd": {"uri": "https://vcrstorage01234560.blob.core.windows.net/vrfcontainer/vrfosdisk.vhd"}, + "createOption": "fromImage", "name": "vrfosdisk"}}, "osProfile": {"adminUsername": + "user11", "computerName": "vrfvm", "linuxConfiguration": {"ssh": {"publicKeys": + [{"path": "/home/user11/.ssh/authorized_keys", "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}, "disablePasswordAuthentication": true}}, "availabilitySet": + {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/availabilitySets/vrfavailset"}, + "networkProfile": {"networkInterfaces": [{"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic"}]}}}]}}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['3058'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a3d7e8e6-f3b4-11e6-9b19-74c63bed1137] + x-ms-client-request-id: [5dc8b6b0-f468-11e6-94c1-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Resources/deployments/vm_deploy_X1pXH0SOSusjYNkxSiiCIG16sXBeEpg7","name":"vm_deploy_X1pXH0SOSusjYNkxSiiCIG16sXBeEpg7","properties":{"templateHash":"6957269520723735707","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-02-15T19:26:25.4257547Z","duration":"PT0.9872488S","correlationId":"f25d9399-5dd4-4be9-ae78-f65b489e4ca9","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vrfvmVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/virtualMachines/vrfvm","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vrfvm"}]}}'} + body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Resources/deployments/vm_deploy_z9JItjv1bTexw0xq21Fi3A2HC0OkoxNn","name":"vm_deploy_z9JItjv1bTexw0xq21Fi3A2HC0OkoxNn","properties":{"templateHash":"2431566676788649389","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-02-16T16:52:58.1987674Z","duration":"PT0.5623322S","correlationId":"da771859-4915-4d1f-8c4f-d68538b79006","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vrfvmVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/virtualMachines/vrfvm","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vrfvm"}]}}'} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Resources/deployments/vm_deploy_X1pXH0SOSusjYNkxSiiCIG16sXBeEpg7/operationStatuses/08587144201010391380?api-version=2016-09-01'] - Cache-Control: [no-cache] - Content-Length: ['1251'] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:26:25 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Resources/deployments/vm_deploy_z9JItjv1bTexw0xq21Fi3A2HC0OkoxNn/operationStatuses/08587143429078412158?api-version=2016-09-01'] + cache-control: [no-cache] + content-length: ['1251'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:52:58 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: null @@ -899,24 +901,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a3d7e8e6-f3b4-11e6-9b19-74c63bed1137] + x-ms-client-request-id: [5dc8b6b0-f468-11e6-94c1-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587144201010391380?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587143429078412158?api-version=2016-09-01 response: - body: {string: '{"status":"Running"}'} + body: {string: !!python/unicode '{"status":"Running"}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:26:56 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['20'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:53:29 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -925,24 +927,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a3d7e8e6-f3b4-11e6-9b19-74c63bed1137] + x-ms-client-request-id: [5dc8b6b0-f468-11e6-94c1-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587144201010391380?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587143429078412158?api-version=2016-09-01 response: - body: {string: '{"status":"Running"}'} + body: {string: !!python/unicode '{"status":"Running"}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:27:26 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['20'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:53:59 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -951,24 +953,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a3d7e8e6-f3b4-11e6-9b19-74c63bed1137] + x-ms-client-request-id: [5dc8b6b0-f468-11e6-94c1-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587144201010391380?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587143429078412158?api-version=2016-09-01 response: - body: {string: '{"status":"Running"}'} + body: {string: !!python/unicode '{"status":"Running"}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:27:56 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['20'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:54:30 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -977,24 +979,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a3d7e8e6-f3b4-11e6-9b19-74c63bed1137] + x-ms-client-request-id: [5dc8b6b0-f468-11e6-94c1-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587144201010391380?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587143429078412158?api-version=2016-09-01 response: - body: {string: '{"status":"Succeeded"}'} + body: {string: !!python/unicode '{"status":"Succeeded"}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:28:27 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['22'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:55:00 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -1003,24 +1005,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a3d7e8e6-f3b4-11e6-9b19-74c63bed1137] + x-ms-client-request-id: [5dc8b6b0-f468-11e6-94c1-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing_ids/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Resources/deployments/vm_deploy_X1pXH0SOSusjYNkxSiiCIG16sXBeEpg7","name":"vm_deploy_X1pXH0SOSusjYNkxSiiCIG16sXBeEpg7","properties":{"templateHash":"6957269520723735707","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-02-15T19:28:01.0014598Z","duration":"PT1M36.5629539S","correlationId":"f25d9399-5dd4-4be9-ae78-f65b489e4ca9","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vrfvmVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/virtualMachines/vrfvm","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vrfvm"}],"outputs":{},"outputResources":[{"id":"Microsoft.Compute/virtualMachines/vrfvm"},{"id":"Microsoft.Network/networkInterfaces/vrfvmVMNic"}]}}'} + body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Resources/deployments/vm_deploy_z9JItjv1bTexw0xq21Fi3A2HC0OkoxNn","name":"vm_deploy_z9JItjv1bTexw0xq21Fi3A2HC0OkoxNn","properties":{"templateHash":"2431566676788649389","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-02-16T16:54:47.8455335Z","duration":"PT1M50.2090983S","correlationId":"da771859-4915-4d1f-8c4f-d68538b79006","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vrfvmVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/virtualMachines/vrfvm","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vrfvm"}],"outputs":{},"outputResources":[{"id":"Microsoft.Compute/virtualMachines/vrfvm"},{"id":"Microsoft.Network/networkInterfaces/vrfvmVMNic"}]}}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:28:27 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['1393'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:55:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -1029,15 +1031,16 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [eef7e8f8-f3b4-11e6-8147-74c63bed1137] + x-ms-client-request-id: [a8541e40-f468-11e6-b499-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/virtualMachines/vrfvm?$expand=instanceView&api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/virtualMachines/vrfvm?api-version=2016-04-30-preview&$expand=instanceView response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"8a4387c6-390a-4b50-a5e7-0769ea882880\"\ - ,\r\n \"availabilitySet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/availabilitySets/VRFAVAILSET\"\ + body: {string: !!python/unicode "{\r\n \"properties\": {\r\n \"vmId\": \"\ + 08d1a6e0-d1a3-4c63-a1f9-fba60bc506c7\",\r\n \"availabilitySet\": {\r\n\ + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/availabilitySets/VRFAVAILSET\"\ \r\n },\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS2\"\ \r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n\ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ @@ -1061,33 +1064,33 @@ interactions: ,\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ Ready\",\r\n \"message\": \"GuestAgent is running and accepting\ - \ new configurations.\",\r\n \"time\": \"2017-02-15T19:28:18+00:00\"\ + \ new configurations.\",\r\n \"time\": \"2017-02-16T16:54:45+00:00\"\ \r\n }\r\n ],\r\n \"extensionHandlers\": []\r\n \ \ },\r\n \"disks\": [\r\n {\r\n \"name\": \"vrfosdisk\"\ ,\r\n \"statuses\": [\r\n {\r\n \"code\"\ : \"ProvisioningState/succeeded\",\r\n \"level\": \"Info\",\r\ \n \"displayStatus\": \"Provisioning succeeded\",\r\n \ - \ \"time\": \"2017-02-15T19:26:30.878817+00:00\"\r\n }\r\n\ - \ ]\r\n }\r\n ],\r\n \"statuses\": [\r\n \ - \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"\ - level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ - ,\r\n \"time\": \"2017-02-15T19:27:55.1028333+00:00\"\r\n \ + \ \"time\": \"2017-02-16T16:53:07.8510258+00:00\"\r\n }\r\ + \n ]\r\n }\r\n ],\r\n \"statuses\": [\r\n \ + \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ + \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ + ,\r\n \"time\": \"2017-02-16T16:54:44.9458422+00:00\"\r\n \ \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n \ \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\ \n }\r\n ]\r\n }\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines\"\ ,\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/virtualMachines/vrfvm\"\ ,\r\n \"name\": \"vrfvm\"\r\n}"} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:28:29 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['3779'] + cache-control: [no-cache] + content-length: ['3780'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:55:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -1096,20 +1099,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ef71c1fe-f3b4-11e6-bafb-74c63bed1137] + x-ms-client-request-id: [a883e0cf-f468-11e6-9004-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic?api-version=2016-09-01 response: - body: {string: "{\r\n \"name\": \"vrfvmVMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic\"\ - ,\r\n \"etag\": \"W/\\\"16f95226-16a2-42aa-b34a-01990349f657\\\"\",\r\n \ + body: {string: !!python/unicode "{\r\n \"name\": \"vrfvmVMNic\",\r\n \"id\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic\"\ + ,\r\n \"etag\": \"W/\\\"20d06768-087b-425f-af2c-1133b00ee25b\\\"\",\r\n \ \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n\ - \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"7a6298bb-65e9-4f36-9290-339623adcf7f\"\ + \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"0c1cb463-1fef-42ca-8b70-88bd0c86919d\"\ ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvrfvm\"\ ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic/ipConfigurations/ipconfigvrfvm\"\ - ,\r\n \"etag\": \"W/\\\"16f95226-16a2-42aa-b34a-01990349f657\\\"\"\ + ,\r\n \"etag\": \"W/\\\"20d06768-087b-425f-af2c-1133b00ee25b\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ : \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\":\ @@ -1118,8 +1122,8 @@ interactions: \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"www4d4vnoxdexo5ktdnqphvnka.dx.internal.cloudapp.net\"\ - \r\n },\r\n \"macAddress\": \"00-0D-3A-33-1C-83\",\r\n \"enableAcceleratedNetworking\"\ + internalDomainNameSuffix\": \"s3auspineojejcyt1mgbspm2va.dx.internal.cloudapp.net\"\ + \r\n },\r\n \"macAddress\": \"00-0D-3A-30-21-D7\",\r\n \"enableAcceleratedNetworking\"\ : false,\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\"\ : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg\"\ \r\n },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \ @@ -1127,17 +1131,17 @@ interactions: \r\n }\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\ \n}"} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:28:30 GMT'] - ETag: [W/"16f95226-16a2-42aa-b34a-01990349f657"] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['2276'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:55:01 GMT'] + etag: [W/"20d06768-087b-425f-af2c-1133b00ee25b"] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -1146,34 +1150,35 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [efdda8e6-f3b4-11e6-a642-74c63bed1137] + x-ms-client-request-id: [a89e94c0-f468-11e6-a400-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/publicIPAddresses/vrfpubip?api-version=2016-09-01 response: - body: {string: "{\r\n \"name\": \"vrfpubip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/publicIPAddresses/vrfpubip\"\ - ,\r\n \"etag\": \"W/\\\"18b3cdec-b146-44ba-93b4-8759bcc0e111\\\"\",\r\n \ + body: {string: !!python/unicode "{\r\n \"name\": \"vrfpubip\",\r\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/publicIPAddresses/vrfpubip\"\ + ,\r\n \"etag\": \"W/\\\"a4593167-8ca8-49e1-9da7-68a771d022ba\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"location\": \"\ westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"a159cbff-55f2-4f5b-b7d4-ef35b99f0bcf\"\ - ,\r\n \"ipAddress\": \"13.64.114.90\",\r\n \"publicIPAddressVersion\"\ + : \"Succeeded\",\r\n \"resourceGuid\": \"715192d1-34d1-4ce9-a552-2bb68f73c953\"\ + ,\r\n \"ipAddress\": \"40.86.188.41\",\r\n \"publicIPAddressVersion\"\ : \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\"\ : 4,\r\n \"ipConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic/ipConfigurations/ipconfigvrfvm\"\ \r\n }\r\n }\r\n}"} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:28:31 GMT'] - ETag: [W/"18b3cdec-b146-44ba-93b4-8759bcc0e111"] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['860'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:55:02 GMT'] + etag: [W/"a4593167-8ca8-49e1-9da7-68a771d022ba"] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -1182,31 +1187,31 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f0963a86-f3b4-11e6-8d10-74c63bed1137] + x-ms-client-request-id: [a9146100-f468-11e6-a043-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/availabilitySets/vrfavailset?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"platformUpdateDomainCount\"\ + body: {string: !!python/unicode "{\r\n \"properties\": {\r\n \"platformUpdateDomainCount\"\ : 3,\r\n \"platformFaultDomainCount\": 3,\r\n \"virtualMachines\": [\r\ - \n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI_TEST_VM_CREATE_EXISTING_IDS_4Q3U_/providers/Microsoft.Compute/virtualMachines/VRFVM\"\ + \n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI_TEST_VM_CREATE_EXISTING_IDS_LLMO_/providers/Microsoft.Compute/virtualMachines/VRFVM\"\ \r\n }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Compute/availabilitySets\"\ ,\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/availabilitySets/vrfavailset\"\ ,\r\n \"name\": \"vrfavailset\",\r\n \"sku\": {\r\n \"name\": \"Classic\"\ \r\n }\r\n}"} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:28:32 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['654'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:55:02 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -1215,21 +1220,22 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f152bf46-f3b4-11e6-bd8a-74c63bed1137] + x-ms-client-request-id: [a981a1c0-f468-11e6-844b-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg?api-version=2016-09-01 response: - body: {string: "{\r\n \"name\": \"vrfnsg\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg\"\ - ,\r\n \"etag\": \"W/\\\"1c9168f4-0eb9-42d8-a5c1-451526545513\\\"\",\r\n \ + body: {string: !!python/unicode "{\r\n \"name\": \"vrfnsg\",\r\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg\"\ + ,\r\n \"etag\": \"W/\\\"177e6907-c8fa-4fc1-929f-6389aa639268\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/networkSecurityGroups\",\r\n \"location\"\ : \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"36625ae3-04a7-454a-a715-6bf27e5a5ed1\"\ + : \"Succeeded\",\r\n \"resourceGuid\": \"3b2ea4e7-1836-4672-a772-776d385105fb\"\ ,\r\n \"securityRules\": [],\r\n \"defaultSecurityRules\": [\r\n \ \ {\r\n \"name\": \"AllowVnetInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/AllowVnetInBound\"\ - ,\r\n \"etag\": \"W/\\\"1c9168f4-0eb9-42d8-a5c1-451526545513\\\"\"\ + ,\r\n \"etag\": \"W/\\\"177e6907-c8fa-4fc1-929f-6389aa639268\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from all VMs in VNET\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -1239,7 +1245,7 @@ interactions: \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowAzureLoadBalancerInBound\",\r\n \"id\":\ \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/AllowAzureLoadBalancerInBound\"\ - ,\r\n \"etag\": \"W/\\\"1c9168f4-0eb9-42d8-a5c1-451526545513\\\"\"\ + ,\r\n \"etag\": \"W/\\\"177e6907-c8fa-4fc1-929f-6389aa639268\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from azure load balancer\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -1248,7 +1254,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n\ \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/DenyAllInBound\"\ - ,\r\n \"etag\": \"W/\\\"1c9168f4-0eb9-42d8-a5c1-451526545513\\\"\"\ + ,\r\n \"etag\": \"W/\\\"177e6907-c8fa-4fc1-929f-6389aa639268\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all inbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -1257,7 +1263,7 @@ interactions: access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ : \"Inbound\"\r\n }\r\n },\r\n {\r\n \"name\": \"\ AllowVnetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/AllowVnetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"1c9168f4-0eb9-42d8-a5c1-451526545513\\\"\"\ + ,\r\n \"etag\": \"W/\\\"177e6907-c8fa-4fc1-929f-6389aa639268\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to all\ \ VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ @@ -1266,7 +1272,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowInternetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/AllowInternetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"1c9168f4-0eb9-42d8-a5c1-451526545513\\\"\"\ + ,\r\n \"etag\": \"W/\\\"177e6907-c8fa-4fc1-929f-6389aa639268\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to Internet\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -1275,7 +1281,7 @@ interactions: \ \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n \ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\n \ \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/DenyAllOutBound\"\ - ,\r\n \"etag\": \"W/\\\"1c9168f4-0eb9-42d8-a5c1-451526545513\\\"\"\ + ,\r\n \"etag\": \"W/\\\"177e6907-c8fa-4fc1-929f-6389aa639268\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all outbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -1286,17 +1292,17 @@ interactions: : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic\"\ \r\n }\r\n ]\r\n }\r\n}"} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:28:33 GMT'] - ETag: [W/"1c9168f4-0eb9-42d8-a5c1-451526545513"] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['5484'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:55:03 GMT'] + etag: [W/"177e6907-c8fa-4fc1-929f-6389aa639268"] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -1305,20 +1311,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f20f0980-f3b4-11e6-8fb6-74c63bed1137] + x-ms-client-request-id: [a9ea4e9e-f468-11e6-a54b-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic?api-version=2016-09-01 response: - body: {string: "{\r\n \"name\": \"vrfvmVMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic\"\ - ,\r\n \"etag\": \"W/\\\"16f95226-16a2-42aa-b34a-01990349f657\\\"\",\r\n \ + body: {string: !!python/unicode "{\r\n \"name\": \"vrfvmVMNic\",\r\n \"id\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic\"\ + ,\r\n \"etag\": \"W/\\\"20d06768-087b-425f-af2c-1133b00ee25b\\\"\",\r\n \ \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n\ - \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"7a6298bb-65e9-4f36-9290-339623adcf7f\"\ + \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"0c1cb463-1fef-42ca-8b70-88bd0c86919d\"\ ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvrfvm\"\ ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic/ipConfigurations/ipconfigvrfvm\"\ - ,\r\n \"etag\": \"W/\\\"16f95226-16a2-42aa-b34a-01990349f657\\\"\"\ + ,\r\n \"etag\": \"W/\\\"20d06768-087b-425f-af2c-1133b00ee25b\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ : \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\":\ @@ -1327,8 +1334,8 @@ interactions: \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"www4d4vnoxdexo5ktdnqphvnka.dx.internal.cloudapp.net\"\ - \r\n },\r\n \"macAddress\": \"00-0D-3A-33-1C-83\",\r\n \"enableAcceleratedNetworking\"\ + internalDomainNameSuffix\": \"s3auspineojejcyt1mgbspm2va.dx.internal.cloudapp.net\"\ + \r\n },\r\n \"macAddress\": \"00-0D-3A-30-21-D7\",\r\n \"enableAcceleratedNetworking\"\ : false,\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\"\ : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Network/networkSecurityGroups/vrfnsg\"\ \r\n },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \ @@ -1336,17 +1343,17 @@ interactions: \r\n }\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\ \n}"} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:28:33 GMT'] - ETag: [W/"16f95226-16a2-42aa-b34a-01990349f657"] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['2276'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:55:04 GMT'] + etag: [W/"20d06768-087b-425f-af2c-1133b00ee25b"] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -1355,15 +1362,16 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f2829376-f3b4-11e6-bf7e-74c63bed1137] + x-ms-client-request-id: [aa4f5200-f468-11e6-a526-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/virtualMachines/vrfvm?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"8a4387c6-390a-4b50-a5e7-0769ea882880\"\ - ,\r\n \"availabilitySet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/availabilitySets/VRFAVAILSET\"\ + body: {string: !!python/unicode "{\r\n \"properties\": {\r\n \"vmId\": \"\ + 08d1a6e0-d1a3-4c63-a1f9-fba60bc506c7\",\r\n \"availabilitySet\": {\r\n\ + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/availabilitySets/VRFAVAILSET\"\ \r\n },\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS2\"\ \r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n\ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ @@ -1386,15 +1394,15 @@ interactions: tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing_ids/providers/Microsoft.Compute/virtualMachines/vrfvm\"\ ,\r\n \"name\": \"vrfvm\"\r\n}"} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 15 Feb 2017 19:28:34 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['2530'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 16 Feb 2017 16:55:04 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} version: 1 diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/recordings/test_vm_create_existing_options.yaml b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/recordings/test_vm_create_existing_options.yaml index e3c7db2ca..40b2bd5ad 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/recordings/test_vm_create_existing_options.yaml +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/recordings/test_vm_create_existing_options.yaml @@ -6,14 +6,14 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 subscriptionclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f0e234a1-f3b7-11e6-923b-74c63bed1137] + x-ms-client-request-id: [53efc9da-f468-11e6-bffc-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2016-06-01 response: - body: {string: !!python/unicode '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastasia","name":"eastasia","displayName":"East + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastasia","name":"eastasia","displayName":"East Asia","longitude":"114.188","latitude":"22.267"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southeastasia","name":"southeastasia","displayName":"Southeast Asia","longitude":"103.833","latitude":"1.283"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralus","name":"centralus","displayName":"Central US","longitude":"-93.6208","latitude":"41.5908"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus","name":"eastus","displayName":"East @@ -41,25 +41,25 @@ interactions: Central","longitude":"126.9780","latitude":"37.5665"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreasouth","name":"koreasouth","displayName":"Korea South","longitude":"129.0756","latitude":"35.1796"}]}'} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:52:39 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] content-length: ['4523'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:50:00 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null headers: Connection: [close] Host: [raw.githubusercontent.com] - User-Agent: [Python-urllib/2.7] + User-Agent: [Python-urllib/3.5] method: GET uri: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json response: - body: {string: !!python/unicode "{\n \"$schema\":\"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\"\ + body: {string: "{\n \"$schema\":\"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\"\ ,\n \"contentVersion\":\"1.0.0.0\",\n \"parameters\":{},\n \"variables\"\ :{},\n \"resources\":[],\n\n \"outputs\":{\n \"aliases\":{\n \"\ metadata\":{\n \"description\":\"This list of aliases is used by Azure\ @@ -96,30 +96,30 @@ interactions: \ \"version\":\"latest\"\n }\n }\n }\n }\n }\n\ }\n"} headers: - accept-ranges: [bytes] - access-control-allow-origin: ['*'] - cache-control: [max-age=300] - connection: [close] - content-length: ['2297'] - content-security-policy: [default-src 'none'; style-src 'unsafe-inline'] - content-type: [text/plain; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:50:02 GMT'] - etag: ['"db78eb36618a060181b32ac2de91b1733f382e01"'] - expires: ['Wed, 15 Feb 2017 19:55:02 GMT'] - source-age: ['0'] - strict-transport-security: [max-age=31536000] - vary: ['Authorization,Accept-Encoding'] - via: [1.1 varnish] - x-cache: [MISS] - x-cache-hits: ['0'] - x-content-type-options: [nosniff] - x-fastly-request-id: [367341e62ef5d99cf7239cfa307982b1a3476c50] - x-frame-options: [deny] - x-geo-block-list: [''] - x-github-request-id: ['EB98:7AF6:3C61544:3E446C1:58A4B0EA'] - x-served-by: [cache-sea1044-SEA] - x-timer: ['S1487188202.519194,VS0,VE113'] - x-xss-protection: [1; mode=block] + Accept-Ranges: [bytes] + Access-Control-Allow-Origin: ['*'] + Cache-Control: [max-age=300] + Connection: [close] + Content-Length: ['2297'] + Content-Security-Policy: [default-src 'none'; style-src 'unsafe-inline'] + Content-Type: [text/plain; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:52:40 GMT'] + ETag: ['"db78eb36618a060181b32ac2de91b1733f382e01"'] + Expires: ['Thu, 16 Feb 2017 16:57:40 GMT'] + Source-Age: ['0'] + Strict-Transport-Security: [max-age=31536000] + Vary: ['Authorization,Accept-Encoding'] + Via: [1.1 varnish] + X-Cache: [MISS] + X-Cache-Hits: ['0'] + X-Content-Type-Options: [nosniff] + X-Fastly-Request-ID: [abb14655cf22004187d0eca83526cbb287d19ee4] + X-Frame-Options: [deny] + X-Geo-Block-List: [''] + X-GitHub-Request-Id: ['3798:623E:3EEAA59:40E9734:58A5D8D8'] + X-Served-By: [cache-den6025-DEN] + X-Timer: ['S1487263960.759216,VS0,VE61'] + X-XSS-Protection: [1; mode=block] status: {code: 200, message: OK} - request: body: null @@ -128,15 +128,15 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f1e99280-f3b7-11e6-8f1e-74c63bed1137] + x-ms-client-request-id: [5445b970-f468-11e6-abfc-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage?api-version=2016-09-01 response: - body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage","namespace":"Microsoft.Storage","authorization":{"applicationId":"a6aa9161-5291-40bb-8c5c-923b567bee3b","roleDefinitionId":"070ab87f-0efc-4423-b18b-756f3bdb0236"},"resourceTypes":[{"resourceType":"storageAccounts","locations":["East + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage","namespace":"Microsoft.Storage","authorization":{"applicationId":"a6aa9161-5291-40bb-8c5c-923b567bee3b","roleDefinitionId":"070ab87f-0efc-4423-b18b-756f3bdb0236"},"resourceTypes":[{"resourceType":"storageAccounts","locations":["East US","East US 2","East US 2 (Stage)","West US","West Europe","East Asia","Southeast Asia","Japan East","Japan West","North Central US","South Central US","Central US","North Europe","Brazil South","Australia East","Australia Southeast","South @@ -154,14 +154,14 @@ interactions: India","Central India","West India","Canada East","Canada Central","West US 2","West Central US","UK South","UK West"],"apiVersions":["2014-04-01"]}],"registrationState":"Registered"}'} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:52:40 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] content-length: ['2634'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:50:02 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -170,28 +170,28 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f22fc340-f3b7-11e6-a7b7-74c63bed1137] + x-ms-client-request-id: [546a678a-f468-11e6-82e1-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Storage/storageAccounts/dummystorage.api-version=2016-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: - body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Storage/storageAccounts/vcrstorage0012345","kind":"Storage","location":"westus","name":"vcrstorage0012345","properties":{"creationTime":"2017-02-15T19:48:32.4559926Z","primaryEndpoints":{"blob":"https://vcrstorage0012345.blob.core.windows.net/","file":"https://vcrstorage0012345.file.core.windows.net/","queue":"https://vcrstorage0012345.queue.core.windows.net/","table":"https://vcrstorage0012345.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Storage/storageAccounts/vcrstorage0012345","kind":"Storage","location":"westus","name":"vcrstorage0012345","properties":{"creationTime":"2017-02-16T16:51:13.4284373Z","primaryEndpoints":{"blob":"https://vcrstorage0012345.blob.core.windows.net/","file":"https://vcrstorage0012345.file.core.windows.net/","queue":"https://vcrstorage0012345.queue.core.windows.net/","table":"https://vcrstorage0012345.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} '} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json] + Date: ['Thu, 16 Feb 2017 16:52:40 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] content-length: ['744'] - content-type: [application/json] - date: ['Wed, 15 Feb 2017 19:50:03 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -200,15 +200,15 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f2b43580-f3b7-11e6-b95f-74c63bed1137] + x-ms-client-request-id: [54bd7eb8-f468-11e6-b209-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute?api-version=2016-09-01 response: - body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute","namespace":"Microsoft.Compute","authorization":{"applicationId":"60e6cd67-9c8c-4951-9b3c-23c25a2169af","roleDefinitionId":"e4770acb-272e-4dc8-87f3-12f44a612224"},"resourceTypes":[{"resourceType":"availabilitySets","locations":["East + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute","namespace":"Microsoft.Compute","authorization":{"applicationId":"60e6cd67-9c8c-4951-9b3c-23c25a2169af","roleDefinitionId":"e4770acb-272e-4dc8-87f3-12f44a612224"},"resourceTypes":[{"resourceType":"availabilitySets","locations":["East US","East US 2","West US","Central US","North Central US","South Central US","North Europe","West Europe","East Asia","Southeast Asia","Japan East","Japan West","Australia East","Australia Southeast","Brazil South","South India","Central India","West @@ -330,14 +330,14 @@ interactions: India","Canada Central","Canada East","West US 2","West Central US","UK South","UK West","Korea Central","Korea South"],"apiVersions":["2014-04-01"]}],"registrationState":"Registered"}'} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:52:41 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] content-length: ['12754'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:50:04 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -346,31 +346,31 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f30d03de-f3b7-11e6-8ddd-74c63bed1137] + x-ms-client-request-id: [54f36a86-f468-11e6-8fe0-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Compute/availabilitySets/vrfavailset?api-version=2017-03-30 response: - body: {string: !!python/unicode "{\r\n \"properties\": {\r\n \"platformUpdateDomainCount\"\ + body: {string: "{\r\n \"properties\": {\r\n \"platformUpdateDomainCount\"\ : 3,\r\n \"platformFaultDomainCount\": 3,\r\n \"virtualMachines\": []\r\ \n },\r\n \"type\": \"Microsoft.Compute/availabilitySets\",\r\n \"location\"\ : \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/availabilitySets/vrfavailset\"\ ,\r\n \"name\": \"vrfavailset\",\r\n \"sku\": {\r\n \"name\": \"Classic\"\ \r\n }\r\n}"} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:52:41 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] content-length: ['454'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:50:04 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -379,15 +379,15 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f38cbb30-f3b7-11e6-8676-74c63bed1137] + x-ms-client-request-id: [554a45be-f468-11e6-b90b-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network?api-version=2016-09-01 response: - body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network","namespace":"Microsoft.Network","authorization":{"applicationId":"2cf9eb86-36b5-49dc-86ae-9a63135dfa8c","roleDefinitionId":"13ba9ab4-19f0-4804-adc4-14ece36cc7a1"},"resourceTypes":[{"resourceType":"virtualNetworks","locations":["West + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network","namespace":"Microsoft.Network","authorization":{"applicationId":"2cf9eb86-36b5-49dc-86ae-9a63135dfa8c","roleDefinitionId":"13ba9ab4-19f0-4804-adc4-14ece36cc7a1"},"resourceTypes":[{"resourceType":"virtualNetworks","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -465,14 +465,14 @@ interactions: India","Canada Central","Canada East","West Central US","West US 2","UK West","UK South","Korea Central","Korea South"],"apiVersions":["2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"capabilities":"None"},{"resourceType":"expressRouteServiceProviders","locations":[],"apiVersions":["2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"]}],"registrationState":"Registered"}'} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:52:42 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] content-length: ['11292'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:50:05 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -481,31 +481,30 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f3d9548f-f3b7-11e6-9a2b-74c63bed1137] + x-ms-client-request-id: [5579cfa2-f468-11e6-bb45-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Network/virtualNetworks/vrfvnet/subnets/vrfsubnet?api-version=2016-12-01 response: - body: {string: !!python/unicode "{\r\n \"name\": \"vrfsubnet\",\r\n \"id\":\ - \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/virtualNetworks/vrfvnet/subnets/vrfsubnet\"\ - ,\r\n \"etag\": \"W/\\\"626685a3-0ed1-4df1-bff4-62ccc00fc94c\\\"\",\r\n \ + body: {string: "{\r\n \"name\": \"vrfsubnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/virtualNetworks/vrfvnet/subnets/vrfsubnet\"\ + ,\r\n \"etag\": \"W/\\\"454e5909-1e00-41d2-8e2f-edf34f6f2d7e\\\"\",\r\n \ \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ addressPrefix\": \"10.0.0.0/24\"\r\n }\r\n}"} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:52:42 GMT'] + ETag: [W/"454e5909-1e00-41d2-8e2f-edf34f6f2d7e"] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] content-length: ['367'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:50:06 GMT'] - etag: [W/"626685a3-0ed1-4df1-bff4-62ccc00fc94c"] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -514,15 +513,15 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f45a6b70-f3b7-11e6-80a6-74c63bed1137] + x-ms-client-request-id: [55c87442-f468-11e6-ba35-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network?api-version=2016-09-01 response: - body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network","namespace":"Microsoft.Network","authorization":{"applicationId":"2cf9eb86-36b5-49dc-86ae-9a63135dfa8c","roleDefinitionId":"13ba9ab4-19f0-4804-adc4-14ece36cc7a1"},"resourceTypes":[{"resourceType":"virtualNetworks","locations":["West + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network","namespace":"Microsoft.Network","authorization":{"applicationId":"2cf9eb86-36b5-49dc-86ae-9a63135dfa8c","roleDefinitionId":"13ba9ab4-19f0-4804-adc4-14ece36cc7a1"},"resourceTypes":[{"resourceType":"virtualNetworks","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -600,14 +599,14 @@ interactions: India","Canada Central","Canada East","West Central US","West US 2","UK West","UK South","Korea Central","Korea South"],"apiVersions":["2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"capabilities":"None"},{"resourceType":"expressRouteServiceProviders","locations":[],"apiVersions":["2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"]}],"registrationState":"Registered"}'} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:52:43 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] content-length: ['11292'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:50:06 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -616,23 +615,22 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f4a6688f-f3b7-11e6-983b-74c63bed1137] + x-ms-client-request-id: [55ff000a-f468-11e6-ab6f-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg?api-version=2016-12-01 response: - body: {string: !!python/unicode "{\r\n \"name\": \"vrfnsg\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg\"\ - ,\r\n \"etag\": \"W/\\\"afbf2009-7e50-4668-8f1b-af9c230d186a\\\"\",\r\n \ + body: {string: "{\r\n \"name\": \"vrfnsg\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg\"\ + ,\r\n \"etag\": \"W/\\\"f38b5bc4-ac29-4fb9-8fb3-72f2e03bb614\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/networkSecurityGroups\",\r\n \"location\"\ : \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"7e232e51-ce15-42b1-8a77-210878e70f5b\"\ + : \"Succeeded\",\r\n \"resourceGuid\": \"427e0940-9990-41bb-afe5-f5b35e1041fc\"\ ,\r\n \"securityRules\": [],\r\n \"defaultSecurityRules\": [\r\n \ \ {\r\n \"name\": \"AllowVnetInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/AllowVnetInBound\"\ - ,\r\n \"etag\": \"W/\\\"afbf2009-7e50-4668-8f1b-af9c230d186a\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f38b5bc4-ac29-4fb9-8fb3-72f2e03bb614\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from all VMs in VNET\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -642,7 +640,7 @@ interactions: \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowAzureLoadBalancerInBound\",\r\n \"id\":\ \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/AllowAzureLoadBalancerInBound\"\ - ,\r\n \"etag\": \"W/\\\"afbf2009-7e50-4668-8f1b-af9c230d186a\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f38b5bc4-ac29-4fb9-8fb3-72f2e03bb614\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from azure load balancer\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -651,7 +649,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n\ \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/DenyAllInBound\"\ - ,\r\n \"etag\": \"W/\\\"afbf2009-7e50-4668-8f1b-af9c230d186a\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f38b5bc4-ac29-4fb9-8fb3-72f2e03bb614\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all inbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -660,7 +658,7 @@ interactions: access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ : \"Inbound\"\r\n }\r\n },\r\n {\r\n \"name\": \"\ AllowVnetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/AllowVnetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"afbf2009-7e50-4668-8f1b-af9c230d186a\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f38b5bc4-ac29-4fb9-8fb3-72f2e03bb614\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to all\ \ VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ @@ -669,7 +667,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowInternetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/AllowInternetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"afbf2009-7e50-4668-8f1b-af9c230d186a\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f38b5bc4-ac29-4fb9-8fb3-72f2e03bb614\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to Internet\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -678,7 +676,7 @@ interactions: \ \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n \ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\n \ \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/DenyAllOutBound\"\ - ,\r\n \"etag\": \"W/\\\"afbf2009-7e50-4668-8f1b-af9c230d186a\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f38b5bc4-ac29-4fb9-8fb3-72f2e03bb614\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all outbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -687,17 +685,17 @@ interactions: access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ : \"Outbound\"\r\n }\r\n }\r\n ]\r\n }\r\n}"} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:52:43 GMT'] + ETag: [W/"f38b5bc4-ac29-4fb9-8fb3-72f2e03bb614"] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] content-length: ['5223'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:50:07 GMT'] - etag: [W/"afbf2009-7e50-4668-8f1b-af9c230d186a"] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -706,15 +704,15 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f51a871e-f3b7-11e6-9e96-74c63bed1137] + x-ms-client-request-id: [5654c9b8-f468-11e6-ba6e-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network?api-version=2016-09-01 response: - body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network","namespace":"Microsoft.Network","authorization":{"applicationId":"2cf9eb86-36b5-49dc-86ae-9a63135dfa8c","roleDefinitionId":"13ba9ab4-19f0-4804-adc4-14ece36cc7a1"},"resourceTypes":[{"resourceType":"virtualNetworks","locations":["West + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network","namespace":"Microsoft.Network","authorization":{"applicationId":"2cf9eb86-36b5-49dc-86ae-9a63135dfa8c","roleDefinitionId":"13ba9ab4-19f0-4804-adc4-14ece36cc7a1"},"resourceTypes":[{"resourceType":"virtualNetworks","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -792,14 +790,14 @@ interactions: India","Canada Central","Canada East","West Central US","West US 2","UK West","UK South","Korea Central","Korea South"],"apiVersions":["2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"capabilities":"None"},{"resourceType":"expressRouteServiceProviders","locations":[],"apiVersions":["2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"]}],"registrationState":"Registered"}'} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:52:44 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] content-length: ['11292'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:50:08 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -808,82 +806,81 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f567478f-f3b7-11e6-8681-74c63bed1137] + x-ms-client-request-id: [566afb9a-f468-11e6-808f-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Network/publicIPAddresses/vrfpubip?api-version=2016-12-01 response: - body: {string: !!python/unicode "{\r\n \"name\": \"vrfpubip\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/publicIPAddresses/vrfpubip\"\ - ,\r\n \"etag\": \"W/\\\"26becd61-ba62-4df0-9312-596d697d1f0e\\\"\",\r\n \ + body: {string: "{\r\n \"name\": \"vrfpubip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/publicIPAddresses/vrfpubip\"\ + ,\r\n \"etag\": \"W/\\\"f7fc98e1-9919-4125-a652-76ef45ae98f9\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"location\": \"\ westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"3bc72a3e-65bf-4c47-88d5-0e378cf0e139\"\ + : \"Succeeded\",\r\n \"resourceGuid\": \"a57c167b-07b5-420b-8cf3-744d8cc86280\"\ ,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\"\ : \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4\r\n }\r\n}"} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:52:43 GMT'] + ETag: [W/"f7fc98e1-9919-4125-a652-76ef45ae98f9"] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] content-length: ['580'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:50:09 GMT'] - etag: [W/"26becd61-ba62-4df0-9312-596d697d1f0e"] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: - body: !!python/unicode '{"properties": {"mode": "Incremental", "parameters": {}, - "template": {"parameters": {}, "outputs": {}, "variables": {}, "contentVersion": - "1.0.0.0", "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "resources": [{"name": "vrfvmVMNic", "tags": {}, "apiVersion": "2015-06-15", - "location": "westus", "dependsOn": [], "type": "Microsoft.Network/networkInterfaces", - "properties": {"networkSecurityGroup": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg"}, - "ipConfigurations": [{"name": "ipconfigvrfvm", "properties": {"subnet": {"id": + body: '{"properties": {"parameters": {}, "template": {"parameters": {}, "contentVersion": + "1.0.0.0", "resources": [{"apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", + "tags": {}, "properties": {"ipConfigurations": [{"properties": {"subnet": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/virtualNetworks/vrfvnet/subnets/vrfsubnet"}, - "privateIPAllocationMethod": "Dynamic", "publicIPAddress": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/publicIPAddresses/vrfpubip"}}}]}}, - {"name": "vrfvm", "tags": {}, "apiVersion": "2016-04-30-preview", "location": - "westus", "dependsOn": ["Microsoft.Network/networkInterfaces/vrfvmVMNic"], "type": - "Microsoft.Compute/virtualMachines", "properties": {"hardwareProfile": {"vmSize": - "Standard_DS2"}, "storageProfile": {"imageReference": {"sku": "14.04.4-LTS", - "publisher": "Canonical", "version": "latest", "offer": "UbuntuServer"}, "osDisk": - {"caching": "ReadWrite", "vhd": {"uri": "https://vcrstorage0012345.blob.core.windows.net/vrfcontainer/vrfosdisk.vhd"}, - "createOption": "fromImage", "name": "vrfosdisk"}}, "osProfile": {"adminUsername": - "user11", "computerName": "vrfvm", "linuxConfiguration": {"ssh": {"publicKeys": - [{"path": "/home/user11/.ssh/authorized_keys", "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== - test@example.com\n"}]}, "disablePasswordAuthentication": true}}, "availabilitySet": - {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/availabilitySets/vrfavailset"}, - "networkProfile": {"networkInterfaces": [{"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic"}]}}}]}}}' + "publicIPAddress": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/publicIPAddresses/vrfpubip"}, + "privateIPAllocationMethod": "Dynamic"}, "name": "ipconfigvrfvm"}], "networkSecurityGroup": + {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg"}}, + "location": "westus", "dependsOn": [], "name": "vrfvmVMNic"}, {"apiVersion": + "2016-04-30-preview", "type": "Microsoft.Compute/virtualMachines", "tags": {}, + "properties": {"availabilitySet": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/availabilitySets/vrfavailset"}, + "networkProfile": {"networkInterfaces": [{"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic"}]}, + "osProfile": {"adminUsername": "user11", "linuxConfiguration": {"ssh": {"publicKeys": + [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n", "path": "/home/user11/.ssh/authorized_keys"}]}, "disablePasswordAuthentication": + true}, "computerName": "vrfvm"}, "hardwareProfile": {"vmSize": "Standard_DS2"}, + "storageProfile": {"imageReference": {"sku": "14.04.4-LTS", "publisher": "Canonical", + "offer": "UbuntuServer", "version": "latest"}, "osDisk": {"vhd": {"uri": "https://vcrstorage0012345.blob.core.windows.net/vrfcontainer/vrfosdisk.vhd"}, + "createOption": "fromImage", "name": "vrfosdisk", "caching": "ReadWrite"}}}, + "location": "westus", "dependsOn": ["Microsoft.Network/networkInterfaces/vrfvmVMNic"], + "name": "vrfvm"}], "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "variables": {}, "outputs": {}}, "mode": "Incremental"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['3037'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f5e43fc0-f3b7-11e6-b3b9-74c63bed1137] + x-ms-client-request-id: [56a12be8-f468-11e6-b0b8-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 response: - body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/vm_deploy_hgaS05nHHn3PAGy8Vwm9F0z01yVRSOhD","name":"vm_deploy_hgaS05nHHn3PAGy8Vwm9F0z01yVRSOhD","properties":{"templateHash":"15080092347381202554","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-02-15T19:50:12.1494696Z","duration":"PT1.3037482S","correlationId":"ef0bae2f-3d48-448b-90e5-173400505446","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vrfvmVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/virtualMachines/vrfvm","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vrfvm"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/vm_deploy_CmZOtEi20WY1vuITCYo7UkDytPsFNuaW","name":"vm_deploy_CmZOtEi20WY1vuITCYo7UkDytPsFNuaW","properties":{"templateHash":"14960466792898696534","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-02-16T16:52:46.0641727Z","duration":"PT0.4470228S","correlationId":"185ca475-b4ce-4753-94b0-bd9d9aebcf5c","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vrfvmVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/virtualMachines/vrfvm","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vrfvm"}]}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/vm_deploy_hgaS05nHHn3PAGy8Vwm9F0z01yVRSOhD/operationStatuses/08587144186746319284?api-version=2016-09-01'] - cache-control: [no-cache] - content-length: ['1240'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:50:12 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/vm_deploy_CmZOtEi20WY1vuITCYo7UkDytPsFNuaW/operationStatuses/08587143429198604933?api-version=2016-09-01'] + Cache-Control: [no-cache] + Content-Length: ['1240'] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:52:45 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 201, message: Created} - request: body: null @@ -892,50 +889,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f5e43fc0-f3b7-11e6-b3b9-74c63bed1137] + x-ms-client-request-id: [56a12be8-f468-11e6-b0b8-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587144186746319284?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587143429198604933?api-version=2016-09-01 response: - body: {string: !!python/unicode '{"status":"Running"}'} + body: {string: '{"status":"Running"}'} headers: - cache-control: [no-cache] - content-length: ['20'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:50:42 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] + Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python - AZURECLI/TEST/0.1.1b3+dev] - accept-language: [en-US] - x-ms-client-request-id: [f5e43fc0-f3b7-11e6-b3b9-74c63bed1137] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587144186746319284?api-version=2016-09-01 - response: - body: {string: !!python/unicode '{"status":"Running"}'} - headers: - cache-control: [no-cache] + Date: ['Thu, 16 Feb 2017 16:53:16 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] content-length: ['20'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:51:14 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -944,24 +915,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f5e43fc0-f3b7-11e6-b3b9-74c63bed1137] + x-ms-client-request-id: [56a12be8-f468-11e6-b0b8-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587144186746319284?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587143429198604933?api-version=2016-09-01 response: - body: {string: !!python/unicode '{"status":"Running"}'} + body: {string: '{"status":"Running"}'} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:53:47 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] content-length: ['20'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:51:44 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -970,24 +941,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f5e43fc0-f3b7-11e6-b3b9-74c63bed1137] + x-ms-client-request-id: [56a12be8-f468-11e6-b0b8-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587144186746319284?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587143429198604933?api-version=2016-09-01 response: - body: {string: !!python/unicode '{"status":"Running"}'} + body: {string: '{"status":"Running"}'} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:54:17 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] content-length: ['20'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:52:15 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -996,24 +967,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f5e43fc0-f3b7-11e6-b3b9-74c63bed1137] + x-ms-client-request-id: [56a12be8-f468-11e6-b0b8-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587144186746319284?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587143429198604933?api-version=2016-09-01 response: - body: {string: !!python/unicode '{"status":"Running"}'} + body: {string: '{"status":"Running"}'} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:54:48 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] content-length: ['20'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:52:46 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -1022,24 +993,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f5e43fc0-f3b7-11e6-b3b9-74c63bed1137] + x-ms-client-request-id: [56a12be8-f468-11e6-b0b8-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587144186746319284?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587143429198604933?api-version=2016-09-01 response: - body: {string: !!python/unicode '{"status":"Succeeded"}'} + body: {string: '{"status":"Succeeded"}'} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:55:17 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] content-length: ['22'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:53:17 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -1048,24 +1019,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [f5e43fc0-f3b7-11e6-b3b9-74c63bed1137] + x-ms-client-request-id: [56a12be8-f468-11e6-b0b8-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 response: - body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/vm_deploy_hgaS05nHHn3PAGy8Vwm9F0z01yVRSOhD","name":"vm_deploy_hgaS05nHHn3PAGy8Vwm9F0z01yVRSOhD","properties":{"templateHash":"15080092347381202554","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-02-15T19:53:05.0692526Z","duration":"PT2M54.2235312S","correlationId":"ef0bae2f-3d48-448b-90e5-173400505446","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vrfvmVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/virtualMachines/vrfvm","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vrfvm"}],"outputs":{},"outputResources":[{"id":"Microsoft.Compute/virtualMachines/vrfvm"},{"id":"Microsoft.Network/networkInterfaces/vrfvmVMNic"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Resources/deployments/vm_deploy_CmZOtEi20WY1vuITCYo7UkDytPsFNuaW","name":"vm_deploy_CmZOtEi20WY1vuITCYo7UkDytPsFNuaW","properties":{"templateHash":"14960466792898696534","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-02-16T16:55:11.5713607Z","duration":"PT2M25.9542108S","correlationId":"185ca475-b4ce-4753-94b0-bd9d9aebcf5c","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vrfvmVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/virtualMachines/vrfvm","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vrfvm"}],"outputs":{},"outputResources":[{"id":"Microsoft.Compute/virtualMachines/vrfvm"},{"id":"Microsoft.Network/networkInterfaces/vrfvmVMNic"}]}}'} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:55:18 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] content-length: ['1382'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:53:17 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -1074,16 +1045,15 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [669128a1-f3b8-11e6-8861-74c63bed1137] + x-ms-client-request-id: [b310f038-f468-11e6-b141-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/virtualMachines/vrfvm?api-version=2016-04-30-preview&$expand=instanceView response: - body: {string: !!python/unicode "{\r\n \"properties\": {\r\n \"vmId\": \"\ - c51d350f-5326-4ad8-b735-408b21d9c483\",\r\n \"availabilitySet\": {\r\n\ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/availabilitySets/VRFAVAILSET\"\ + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"c1a47492-07a9-4a33-a12e-95605fb35a59\"\ + ,\r\n \"availabilitySet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/availabilitySets/VRFAVAILSET\"\ \r\n },\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS2\"\ \r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n\ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ @@ -1107,33 +1077,33 @@ interactions: ,\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ Ready\",\r\n \"message\": \"GuestAgent is running and accepting\ - \ new configurations.\",\r\n \"time\": \"2017-02-15T19:53:11+00:00\"\ + \ new configurations.\",\r\n \"time\": \"2017-02-16T16:55:19+00:00\"\ \r\n }\r\n ],\r\n \"extensionHandlers\": []\r\n \ \ },\r\n \"disks\": [\r\n {\r\n \"name\": \"vrfosdisk\"\ ,\r\n \"statuses\": [\r\n {\r\n \"code\"\ : \"ProvisioningState/succeeded\",\r\n \"level\": \"Info\",\r\ \n \"displayStatus\": \"Provisioning succeeded\",\r\n \ - \ \"time\": \"2017-02-15T19:50:21.9095478+00:00\"\r\n }\r\ + \ \"time\": \"2017-02-16T16:52:58.2261268+00:00\"\r\n }\r\ \n ]\r\n }\r\n ],\r\n \"statuses\": [\r\n \ \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ - ,\r\n \"time\": \"2017-02-15T19:52:49.3647616+00:00\"\r\n \ + ,\r\n \"time\": \"2017-02-16T16:54:57.5087324+00:00\"\r\n \ \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n \ \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\ \n }\r\n ]\r\n }\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines\"\ ,\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/virtualMachines/vrfvm\"\ ,\r\n \"name\": \"vrfvm\"\r\n}"} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:55:19 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] content-length: ['3767'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:53:19 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -1142,21 +1112,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [67003e21-f3b8-11e6-bbcf-74c63bed1137] + x-ms-client-request-id: [b338220c-f468-11e6-a58e-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic?api-version=2016-09-01 response: - body: {string: !!python/unicode "{\r\n \"name\": \"vrfvmVMNic\",\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic\"\ - ,\r\n \"etag\": \"W/\\\"ec17761e-be6d-497f-97d0-34a709d77ad2\\\"\",\r\n \ + body: {string: "{\r\n \"name\": \"vrfvmVMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic\"\ + ,\r\n \"etag\": \"W/\\\"6edfbfc5-838b-4158-b5a4-24175060ffb7\\\"\",\r\n \ \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n\ - \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"f64442bf-1299-4d3d-8f86-f82377d06ed8\"\ + \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"92a9fb2a-164d-4df9-a06f-e7a3fb02845f\"\ ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvrfvm\"\ ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic/ipConfigurations/ipconfigvrfvm\"\ - ,\r\n \"etag\": \"W/\\\"ec17761e-be6d-497f-97d0-34a709d77ad2\\\"\"\ + ,\r\n \"etag\": \"W/\\\"6edfbfc5-838b-4158-b5a4-24175060ffb7\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ : \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\":\ @@ -1165,8 +1134,8 @@ interactions: \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"ig0zuqqgq3sutc1m0tjgtydjhf.dx.internal.cloudapp.net\"\ - \r\n },\r\n \"macAddress\": \"00-0D-3A-34-D2-24\",\r\n \"enableAcceleratedNetworking\"\ + internalDomainNameSuffix\": \"tvkzmx0hrk0unir54siohneg3a.dx.internal.cloudapp.net\"\ + \r\n },\r\n \"macAddress\": \"00-0D-3A-33-A0-84\",\r\n \"enableAcceleratedNetworking\"\ : false,\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\"\ : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg\"\ \r\n },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \ @@ -1174,17 +1143,17 @@ interactions: \r\n }\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\ \n}"} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:55:19 GMT'] + ETag: [W/"6edfbfc5-838b-4158-b5a4-24175060ffb7"] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] content-length: ['2252'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:53:18 GMT'] - etag: [W/"ec17761e-be6d-497f-97d0-34a709d77ad2"] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -1193,35 +1162,34 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [675255c0-f3b8-11e6-84db-74c63bed1137] + x-ms-client-request-id: [b34d31b8-f468-11e6-862a-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/publicIPAddresses/vrfpubip?api-version=2016-09-01 response: - body: {string: !!python/unicode "{\r\n \"name\": \"vrfpubip\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/publicIPAddresses/vrfpubip\"\ - ,\r\n \"etag\": \"W/\\\"d8f8b0cc-725b-49eb-ba21-cbc90df93cb6\\\"\",\r\n \ + body: {string: "{\r\n \"name\": \"vrfpubip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/publicIPAddresses/vrfpubip\"\ + ,\r\n \"etag\": \"W/\\\"ddad006b-1234-467e-8704-c84f2b4895c2\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"location\": \"\ westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"3bc72a3e-65bf-4c47-88d5-0e378cf0e139\"\ - ,\r\n \"ipAddress\": \"13.91.53.97\",\r\n \"publicIPAddressVersion\"\ + : \"Succeeded\",\r\n \"resourceGuid\": \"a57c167b-07b5-420b-8cf3-744d8cc86280\"\ + ,\r\n \"ipAddress\": \"40.86.189.161\",\r\n \"publicIPAddressVersion\"\ : \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\"\ : 4,\r\n \"ipConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic/ipConfigurations/ipconfigvrfvm\"\ \r\n }\r\n }\r\n}"} headers: - cache-control: [no-cache] - content-length: ['851'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:53:19 GMT'] - etag: [W/"d8f8b0cc-725b-49eb-ba21-cbc90df93cb6"] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:55:20 GMT'] + ETag: [W/"ddad006b-1234-467e-8704-c84f2b4895c2"] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['853'] status: {code: 200, message: OK} - request: body: null @@ -1230,31 +1198,31 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [6806ffc0-f3b8-11e6-814a-74c63bed1137] + x-ms-client-request-id: [b3b41f52-f468-11e6-885b-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/availabilitySets/vrfavailset?api-version=2016-04-30-preview response: - body: {string: !!python/unicode "{\r\n \"properties\": {\r\n \"platformUpdateDomainCount\"\ + body: {string: "{\r\n \"properties\": {\r\n \"platformUpdateDomainCount\"\ : 3,\r\n \"platformFaultDomainCount\": 3,\r\n \"virtualMachines\": [\r\ - \n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI_TEST_VM_CREATE_EXISTING_YNF4_/providers/Microsoft.Compute/virtualMachines/VRFVM\"\ + \n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLI_TEST_VM_CREATE_EXISTING_21DA_/providers/Microsoft.Compute/virtualMachines/VRFVM\"\ \r\n }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Compute/availabilitySets\"\ ,\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/availabilitySets/vrfavailset\"\ ,\r\n \"name\": \"vrfavailset\",\r\n \"sku\": {\r\n \"name\": \"Classic\"\ \r\n }\r\n}"} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:55:20 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] content-length: ['646'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:53:21 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -1263,22 +1231,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [68b58f40-f3b8-11e6-9183-74c63bed1137] + x-ms-client-request-id: [b42592cc-f468-11e6-aa8a-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg?api-version=2016-09-01 response: - body: {string: !!python/unicode "{\r\n \"name\": \"vrfnsg\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg\"\ - ,\r\n \"etag\": \"W/\\\"0fb0618f-8df9-4be5-9aa8-dfd1956e082f\\\"\",\r\n \ + body: {string: "{\r\n \"name\": \"vrfnsg\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg\"\ + ,\r\n \"etag\": \"W/\\\"3b480eec-f336-42c7-9ed3-d323c1ff0efd\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/networkSecurityGroups\",\r\n \"location\"\ : \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"7e232e51-ce15-42b1-8a77-210878e70f5b\"\ + : \"Succeeded\",\r\n \"resourceGuid\": \"427e0940-9990-41bb-afe5-f5b35e1041fc\"\ ,\r\n \"securityRules\": [],\r\n \"defaultSecurityRules\": [\r\n \ \ {\r\n \"name\": \"AllowVnetInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/AllowVnetInBound\"\ - ,\r\n \"etag\": \"W/\\\"0fb0618f-8df9-4be5-9aa8-dfd1956e082f\\\"\"\ + ,\r\n \"etag\": \"W/\\\"3b480eec-f336-42c7-9ed3-d323c1ff0efd\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from all VMs in VNET\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -1288,7 +1255,7 @@ interactions: \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowAzureLoadBalancerInBound\",\r\n \"id\":\ \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/AllowAzureLoadBalancerInBound\"\ - ,\r\n \"etag\": \"W/\\\"0fb0618f-8df9-4be5-9aa8-dfd1956e082f\\\"\"\ + ,\r\n \"etag\": \"W/\\\"3b480eec-f336-42c7-9ed3-d323c1ff0efd\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from azure load balancer\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -1297,7 +1264,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n\ \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/DenyAllInBound\"\ - ,\r\n \"etag\": \"W/\\\"0fb0618f-8df9-4be5-9aa8-dfd1956e082f\\\"\"\ + ,\r\n \"etag\": \"W/\\\"3b480eec-f336-42c7-9ed3-d323c1ff0efd\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all inbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -1306,7 +1273,7 @@ interactions: access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ : \"Inbound\"\r\n }\r\n },\r\n {\r\n \"name\": \"\ AllowVnetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/AllowVnetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"0fb0618f-8df9-4be5-9aa8-dfd1956e082f\\\"\"\ + ,\r\n \"etag\": \"W/\\\"3b480eec-f336-42c7-9ed3-d323c1ff0efd\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to all\ \ VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ @@ -1315,7 +1282,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowInternetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/AllowInternetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"0fb0618f-8df9-4be5-9aa8-dfd1956e082f\\\"\"\ + ,\r\n \"etag\": \"W/\\\"3b480eec-f336-42c7-9ed3-d323c1ff0efd\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to Internet\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -1324,7 +1291,7 @@ interactions: \ \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n \ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\n \ \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg/defaultSecurityRules/DenyAllOutBound\"\ - ,\r\n \"etag\": \"W/\\\"0fb0618f-8df9-4be5-9aa8-dfd1956e082f\\\"\"\ + ,\r\n \"etag\": \"W/\\\"3b480eec-f336-42c7-9ed3-d323c1ff0efd\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all outbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -1335,17 +1302,17 @@ interactions: : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic\"\ \r\n }\r\n ]\r\n }\r\n}"} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:55:20 GMT'] + ETag: [W/"3b480eec-f336-42c7-9ed3-d323c1ff0efd"] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] content-length: ['5452'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:53:22 GMT'] - etag: [W/"0fb0618f-8df9-4be5-9aa8-dfd1956e082f"] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -1354,21 +1321,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [69a657e1-f3b8-11e6-9e7f-74c63bed1137] + x-ms-client-request-id: [b4984fd0-f468-11e6-8aec-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic?api-version=2016-09-01 response: - body: {string: !!python/unicode "{\r\n \"name\": \"vrfvmVMNic\",\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic\"\ - ,\r\n \"etag\": \"W/\\\"ec17761e-be6d-497f-97d0-34a709d77ad2\\\"\",\r\n \ + body: {string: "{\r\n \"name\": \"vrfvmVMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic\"\ + ,\r\n \"etag\": \"W/\\\"6edfbfc5-838b-4158-b5a4-24175060ffb7\\\"\",\r\n \ \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n\ - \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"f64442bf-1299-4d3d-8f86-f82377d06ed8\"\ + \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"92a9fb2a-164d-4df9-a06f-e7a3fb02845f\"\ ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvrfvm\"\ ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkInterfaces/vrfvmVMNic/ipConfigurations/ipconfigvrfvm\"\ - ,\r\n \"etag\": \"W/\\\"ec17761e-be6d-497f-97d0-34a709d77ad2\\\"\"\ + ,\r\n \"etag\": \"W/\\\"6edfbfc5-838b-4158-b5a4-24175060ffb7\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ : \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\":\ @@ -1377,8 +1343,8 @@ interactions: \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"ig0zuqqgq3sutc1m0tjgtydjhf.dx.internal.cloudapp.net\"\ - \r\n },\r\n \"macAddress\": \"00-0D-3A-34-D2-24\",\r\n \"enableAcceleratedNetworking\"\ + internalDomainNameSuffix\": \"tvkzmx0hrk0unir54siohneg3a.dx.internal.cloudapp.net\"\ + \r\n },\r\n \"macAddress\": \"00-0D-3A-33-A0-84\",\r\n \"enableAcceleratedNetworking\"\ : false,\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\"\ : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Network/networkSecurityGroups/vrfnsg\"\ \r\n },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \ @@ -1386,17 +1352,17 @@ interactions: \r\n }\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\ \n}"} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:55:22 GMT'] + ETag: [W/"6edfbfc5-838b-4158-b5a4-24175060ffb7"] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] content-length: ['2252'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:53:23 GMT'] - etag: [W/"ec17761e-be6d-497f-97d0-34a709d77ad2"] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -1405,16 +1371,15 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/2.7.13 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.4 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [6a31f60f-f3b8-11e6-98fe-74c63bed1137] + x-ms-client-request-id: [b4f6c0d8-f468-11e6-b6d6-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/virtualMachines/vrfvm?api-version=2016-04-30-preview response: - body: {string: !!python/unicode "{\r\n \"properties\": {\r\n \"vmId\": \"\ - c51d350f-5326-4ad8-b735-408b21d9c483\",\r\n \"availabilitySet\": {\r\n\ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/availabilitySets/VRFAVAILSET\"\ + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"c1a47492-07a9-4a33-a12e-95605fb35a59\"\ + ,\r\n \"availabilitySet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/availabilitySets/VRFAVAILSET\"\ \r\n },\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS2\"\ \r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n\ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ @@ -1437,15 +1402,15 @@ interactions: tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_create_existing/providers/Microsoft.Compute/virtualMachines/vrfvm\"\ ,\r\n \"name\": \"vrfvm\"\r\n}"} headers: - cache-control: [no-cache] + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 16 Feb 2017 16:55:22 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] content-length: ['2517'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Feb 2017 19:53:24 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] status: {code: 200, message: OK} version: 1
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_added_files", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": -1, "issue_text_score": 1, "test_score": -1 }, "num_modified_files": 8 }
0.1
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==1.1.0 -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@efeceb146b93793ee93b2dc07e14ac58a782b45a#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-core==1.24.2 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==2.0.0 azure-mgmt-compute==0.33.0 azure-mgmt-containerregistry==0.1.1 azure-mgmt-dns==0.30.0rc6 azure-mgmt-documentdb==0.1.0 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-network==0.30.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-sql==0.2.0 azure-mgmt-storage==0.31.0 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.31.0 azure-nspkg==3.0.2 azure-storage==0.33.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.7.1 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.1.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 wrapt==1.16.0 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==1.1.0 - azure-common==1.1.4 - azure-core==1.24.2 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==2.0.0 - azure-mgmt-compute==0.33.0 - azure-mgmt-containerregistry==0.1.1 - azure-mgmt-dns==0.30.0rc6 - azure-mgmt-documentdb==0.1.0 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-network==0.30.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-sql==0.2.0 - azure-mgmt-storage==0.31.0 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.31.0 - azure-nspkg==3.0.2 - azure-storage==0.33.0 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.7.1 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.1.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - wrapt==1.16.0 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py::WebappBackupConfigScenarioTest::test_webapp_backup_config", "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py::WebappBackupRestoreScenarioTest::test_webapp_backup_restore", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage.py::StorageAccountScenarioTest::test_storage_account_scenario" ]
[ "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py::WebappBasicE2ETest::test_webapp_e2e", "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py::AppServiceBadErrorPolishTest::test_appservice_error_polish" ]
[ "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py::WebappConfigureTest::test_webapp_config", "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py::WebappScaleTest::test_webapp_scale", "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py::LinuxWebappSceanrioTest::test_linux_webapp", "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py::WebappGitScenarioTest::test_webapp_git", "src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/tests/test_webapp_commands.py::WebappSlotScenarioTest::test_webapp_slot", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage.py::StorageCorsScenarioTest::test_storage_cors_scenario", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage.py::StorageBlobScenarioTest::test_storage_blob_scenario", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage.py::StorageBlobCopyScenarioTest::test_storage_blob_copy_scenario", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage.py::StorageFileScenarioTest::test_storage_file_scenario", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage.py::StorageFileCopyScenarioTest::test_storage_file_copy_scenario", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage.py::StorageTableScenarioTest::test_storage_table_scenario", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage.py::StorageQueueScenarioTest::test_storage_queue_scenario", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage.py::StorageBlobACLScenarioTest::test_storage_blob_acl_scenario", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage.py::StorageFileACLScenarioTest::test_storage_file_acl_scenario", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage.py::StorageBlobNoCredentialsScenarioTest::test_storage_blob_no_credentials_scenario", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage.py::StorageTableAndQueueStatsTest::test_table_and_queue_stats" ]
[]
MIT License
null
Azure__azure-cli-2112
2a8d8fca411fe8422c7cee557943ae4c9f256bfc
2017-02-16 22:58:00
1576ec67f5029db062579da230902a559acbb9fe
tjprescott: **az network dns -h** ``` Group az network dns: Host your DNS domain in Azure. Subgroups: record-set: Manage DNS records and record sets. zone : Manage DNS zones. ``` **az network dns record-set -h** ``` Group az network dns record-set: Manage DNS records and record sets. Subgroups: a : Manage DNS A records. aaaa : Manage DNS AAAA records. cname: Manage DNS CNAME records. mx : Manage DNS MX records. ns : Manage DNS NS records. ptr : Manage DNS PTR records. soa : Manage DNS zone SOA record. srv : Manage DNS SRV records. txt : Manage DNS TXT records. Commands: list : List all record sets within a DNS zone. ``` **az network dns record-set a -h** ``` Group az network dns record-set a: Manage DNS A records. Commands: add-record : Add A record. create : Create an empty A record set. delete : Delete a A record set and all records within. list : List all A record sets in a zone. remove-record: Remove A record from its record set. show : Show details of A record set. update : Update A record set. ``` **az network dns record-set soa -h** ``` Group az network dns record-set soa: Manage DNS zone SOA record. Commands: show : Show details of the DNS zone's SOA record. update: Update properties of the zone's SOA record. ```
diff --git a/src/azure-cli/setup.py b/src/azure-cli/setup.py index d6bb60adc..a400fd7f7 100644 --- a/src/azure-cli/setup.py +++ b/src/azure-cli/setup.py @@ -44,20 +44,25 @@ CLASSIFIERS = [ ] DEPENDENCIES = [ - 'azure-cli-acr', 'azure-cli-acs', 'azure-cli-appservice', - 'azure-cli-core', - 'azure-cli-component', - 'azure-cli-container', + 'azure-cli-batch', 'azure-cli-cloud', + 'azure-cli-component', 'azure-cli-configure', + 'azure-cli-container', + 'azure-cli-core', + 'azure-cli-documentdb', 'azure-cli-feedback', + 'azure-cli-iot', + 'azure-cli-keyvault', 'azure-cli-network', 'azure-cli-nspkg', 'azure-cli-profile', + 'azure-cli-redis', 'azure-cli-resource', 'azure-cli-role', + 'azure-cli-sql', 'azure-cli-storage', 'azure-cli-vm' ] diff --git a/src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/_validators.py b/src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/_validators.py index 1e9ea4d88..799835935 100644 --- a/src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/_validators.py +++ b/src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/_validators.py @@ -258,9 +258,9 @@ def validate_client_parameters(namespace): raise ValueError("Batch account '{}' not found.".format(namespace.account_name)) else: if not namespace.account_name: - raise ValueError("Need specifiy batch account in command line or enviroment variable.") + raise ValueError("Specify batch account in command line or enviroment variable.") if not namespace.account_endpoint: - raise ValueError("Need specifiy batch endpoint in command line or enviroment variable.") + raise ValueError("Specify batch endpoint in command line or enviroment variable.") if az_config.get('batch', 'auth_mode', 'shared_key') == 'aad': namespace.account_key = None diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_help.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_help.py index 68a64e53c..cafdef162 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_help.py +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_help.py @@ -453,82 +453,82 @@ helps['network application-gateway waf-config show'] = """ helps['network dns record-set'] = """ type: group - short-summary: Manage DNS record sets. + short-summary: Manage DNS records and record sets. """ -helps['network dns record-set create'] = """ - type: command - short-summary: Create an empty record set within a DNS zone. - long-summary: | - If a matching record set already exists, it will be overwritten unless --if-none-match is supplied. -""" +# endregion -helps['network dns record-set delete'] = """ - type: command - short-summary: Deletes a record set within a DNS zone. -""" +# region DNS records -helps['network dns record-set list'] = """ - type: command - short-summary: Lists all record sets within a DNS zone. -""" +for record in ['a', 'aaaa', 'cname', 'mx', 'ns', 'ptr', 'srv', 'txt']: + helps['network dns record-set {}'.format(record)] = """ + type: group + short-summary: Manage DNS {} records. + """.format(record.upper()) -helps['network dns record-set show'] = """ - type: command - short-summary: Show details of a record set within a DNS zone. -""" +for record in ['a', 'aaaa', 'cname', 'mx', 'ns', 'ptr', 'srv', 'txt']: -helps['network dns record-set update'] = """ - type: command - short-summary: Update properties of a record set within a DNS zone. -""" -# endregion + helps['network dns record-set {} remove-record'.format(record)] = """ + type: command + short-summary: Remove {} record from its record set. + """.format(record.upper()) -# region DNS records + helps['network dns record-set {} create'.format(record)] = """ + type: command + short-summary: Create an empty {} record set. + """.format(record.upper()) -helps['network dns record'] = """ - type: group - short-summary: Manage DNS records contained in a record set -""" + helps['network dns record-set {} delete'.format(record)] = """ + type: command + short-summary: Delete a {} record set and all records within. + """.format(record.upper()) -helps['network dns record a'] = """ - type: group - short-summary: Manage DNS A records -""" + helps['network dns record-set {} list'.format(record)] = """ + type: command + short-summary: List all {} record sets in a zone. + """.format(record.upper()) -helps['network dns record aaaa'] = """ - type: group - short-summary: Manage DNS AAAA records -""" + helps['network dns record-set {} show'.format(record)] = """ + type: command + short-summary: Show details of {} record set. + """.format(record.upper()) -helps['network dns record cname'] = """ - type: group - short-summary: Manage DNS CNAME records -""" +for item in ['a', 'aaaa', 'mx', 'ns', 'ptr', 'srv', 'txt']: -helps['network dns record mx'] = """ - type: group - short-summary: Manage DNS MX (mail) records + helps['network dns record-set {} update'.format(record)] = """ + type: command + short-summary: Update {} record set. + """.format(record.upper()) + + helps['network dns record-set {} add-record'.format(record)] = """ + type: command + short-summary: Add {} record. + """.format(record.upper()) + +helps['network dns record-set cname set-record'] = """ + type: command + short-summary: Sets the value of the CNAME record. """ -helps['network dns record ns'] = """ +helps['network dns record-set soa'] = """ type: group - short-summary: Manage DNS NS (nameserver) records + short-summary: Manage DNS zone SOA record. """ -helps['network dns record ptr'] = """ - type: group - short-summary: Manage DNS PTR (pointer) records +helps['network dns record-set soa show'] = """ + type: command + short-summary: Show details of the DNS zone's SOA record. """ -helps['network dns record srv'] = """ - type: group - short-summary: Manage DNS SRV records +helps['network dns record-set soa update'] = """ + type: command + short-summary: Update properties of the zone's SOA re. """ -helps['network dns record txt'] = """ - type: group - short-summary: Manage DNS TXT records + +helps['network dns record-set list'] = """ + type: command + short-summary: List all record sets within a DNS zone. """ #endregion diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_params.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_params.py index d3f3d423d..983235332 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_params.py +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_params.py @@ -16,7 +16,6 @@ from azure.mgmt.network.models.network_management_client_enums import \ ExpressRouteCircuitSkuTier, ExpressRouteCircuitPeeringType, IPVersion, LoadDistribution, ProbeProtocol, TransportProtocol, SecurityRuleAccess, SecurityRuleProtocol, SecurityRuleDirection) -from azure.mgmt.dns.models.dns_management_client_enums import RecordType from azure.cli.core.commands import \ (CliArgumentType, register_cli_argument, register_extra_cli_argument) @@ -40,7 +39,7 @@ from azure.cli.command_modules.network._validators import \ validate_auth_cert, validate_cert, validate_inbound_nat_rule_id_list, validate_address_pool_id_list, validate_inbound_nat_rule_name_or_id, validate_address_pool_name_or_id, validate_servers, load_cert_file, validate_metadata, - validate_peering_type, + validate_peering_type, validate_dns_record_type, get_public_ip_validator, get_nsg_validator, get_subnet_validator, get_virtual_network_validator) from azure.mgmt.network.models import ApplicationGatewaySslProtocol @@ -125,7 +124,6 @@ load_balancer_name_type = CliArgumentType(options_list=('--lb-name',), metavar=' private_ip_address_type = CliArgumentType(help='Static private IP address to use.', validator=validate_private_ip_address) cookie_based_affinity_type = CliArgumentType(**enum_choice_list(ApplicationGatewayCookieBasedAffinity)) http_protocol_type = CliArgumentType(**enum_choice_list(ApplicationGatewayProtocol)) -modified_record_type = CliArgumentType(options_list=('--type', '-t'), help='The type of DNS records in the record set.', **enum_choice_list([x.value for x in RecordType if x.value != 'SOA'])) # ARGUMENT REGISTRATION @@ -557,8 +555,6 @@ register_cli_argument('network dns', 'relative_record_set_name', name_arg_type, register_cli_argument('network dns', 'zone_name', options_list=('--zone-name', '-z'), help='The name of the zone.', type=dns_zone_name_type) register_cli_argument('network dns', 'metadata', nargs='+', help='Metadata in space-separated key=value pairs. This overwrites any existing metadata.', validator=validate_metadata) -register_cli_argument('network dns', 'record_type', modified_record_type) - register_cli_argument('network dns zone', 'zone_name', name_arg_type) register_cli_argument('network dns zone', 'location', ignore_type) @@ -566,37 +562,35 @@ register_cli_argument('network dns zone import', 'file_name', options_list=('--f register_cli_argument('network dns zone export', 'file_name', options_list=('--file-name', '-f'), type=file_type, completer=FilesCompleter(), help='Path to the DNS zone file to save') register_cli_argument('network dns zone update', 'if_none_match', ignore_type) -register_cli_argument('network dns record txt add', 'value', nargs='+') -register_cli_argument('network dns record txt remove', 'value', nargs='+') +for item in ['record_type', 'record_set_type']: + register_cli_argument('network dns record-set', item, ignore_type, validator=validate_dns_record_type) -register_cli_argument('network dns record-set create', 'record_set_type', modified_record_type) register_cli_argument('network dns record-set create', 'ttl', help='Record set TTL (time-to-live)') register_cli_argument('network dns record-set create', 'if_none_match', help='Create the record set only if it does not already exist.', action='store_true') -for item in ['list', 'show']: - register_cli_argument('network dns record-set {}'.format(item), 'record_type', options_list=('--type', '-t'), **enum_choice_list(RecordType)) - for item in ['a', 'aaaa', 'cname', 'mx', 'ns', 'ptr', 'srv', 'txt']: - register_cli_argument('network dns record {} add'.format(item), 'record_set_name', options_list=('--record-set-name', '-n'), help='The name of the record set relative to the zone. Creates a new record set if one does not exist.') - register_cli_argument('network dns record {} remove'.format(item), 'record_set_name', options_list=('--record-set-name', '-n'), help='The name of the record set relative to the zone.') -register_cli_argument('network dns record cname add', 'record_set_name', options_list=('--record-set-name', '-n'), help='The name of the record set relative to the zone. Creates a new record set if one does not exist. If a matching record already exists, it is replaced.') - -register_cli_argument('network dns record a', 'ipv4_address', options_list=('--ipv4-address', '-a'), help='IPV4 address in string notation.') -register_cli_argument('network dns record aaaa', 'ipv6_address', options_list=('--ipv6-address', '-a'), help='IPV6 address in string notation.') -register_cli_argument('network dns record cname', 'cname', options_list=('--cname', '-c'), help='Canonical name.') -register_cli_argument('network dns record mx', 'exchange', options_list=('--exchange', '-e'), help='Exchange metric.') -register_cli_argument('network dns record mx', 'preference', options_list=('--preference', '-p'), help='Preference metric.') -register_cli_argument('network dns record ns', 'dname', options_list=('--nsdname', '-d'), help='Name server domain name.') -register_cli_argument('network dns record ptr', 'dname', options_list=('--ptrdname', '-d'), help='PTR target domain name.') -register_cli_argument('network dns record update-soa', 'host', options_list=('--host', '-t'), help='Host name.') -register_cli_argument('network dns record update-soa', 'email', options_list=('--email', '-e'), help='Email address.') -register_cli_argument('network dns record update-soa', 'expire_time', options_list=('--expire-time', '-x'), help='Expire time (seconds).') -register_cli_argument('network dns record update-soa', 'minimum_ttl', options_list=('--minimum-ttl', '-m'), help='Minimum TTL (time-to-live, seconds).') -register_cli_argument('network dns record update-soa', 'refresh_time', options_list=('--refresh-time', '-f'), help='Refresh value (seconds).') -register_cli_argument('network dns record update-soa', 'retry_time', options_list=('--retry-time', '-r'), help='Retry time (seconds).') -register_cli_argument('network dns record update-soa', 'serial_number', options_list=('--serial-number', '-s'), help='Serial number.') -register_cli_argument('network dns record srv', 'priority', options_list=('--priority', '-p'), help='Priority metric.') -register_cli_argument('network dns record srv', 'weight', options_list=('--weight', '-w'), help='Weight metric.') -register_cli_argument('network dns record srv', 'port', options_list=('--port', '-r'), help='Service port.') -register_cli_argument('network dns record srv', 'target', options_list=('--target', '-t'), help='Target domain name.') -register_cli_argument('network dns record txt', 'value', options_list=('--value', '-v'), nargs='+', help='Space separated list of text values which will be concatenated together.') + register_cli_argument('network dns record-set {} add-record'.format(item), 'record_set_name', options_list=('--record-set-name', '-n'), help='The name of the record set relative to the zone. Creates a new record set if one does not exist.') + register_cli_argument('network dns record-set {} remove-record'.format(item), 'record_set_name', options_list=('--record-set-name', '-n'), help='The name of the record set relative to the zone.') +register_cli_argument('network dns record-set cname set-record', 'record_set_name', options_list=('--record-set-name', '-n'), help='The name of the record set relative to the zone. Creates a new record set if one does not exist.') + +register_cli_argument('network dns record-set soa', 'relative_record_set_name', ignore_type, default='@') + +register_cli_argument('network dns record-set a', 'ipv4_address', options_list=('--ipv4-address', '-a'), help='IPV4 address in string notation.') +register_cli_argument('network dns record-set aaaa', 'ipv6_address', options_list=('--ipv6-address', '-a'), help='IPV6 address in string notation.') +register_cli_argument('network dns record-set cname', 'cname', options_list=('--cname', '-c'), help='Canonical name.') +register_cli_argument('network dns record-set mx', 'exchange', options_list=('--exchange', '-e'), help='Exchange metric.') +register_cli_argument('network dns record-set mx', 'preference', options_list=('--preference', '-p'), help='Preference metric.') +register_cli_argument('network dns record-set ns', 'dname', options_list=('--nsdname', '-d'), help='Name server domain name.') +register_cli_argument('network dns record-set ptr', 'dname', options_list=('--ptrdname', '-d'), help='PTR target domain name.') +register_cli_argument('network dns record-set soa', 'host', options_list=('--host', '-t'), help='Host name.') +register_cli_argument('network dns record-set soa', 'email', options_list=('--email', '-e'), help='Email address.') +register_cli_argument('network dns record-set soa', 'expire_time', options_list=('--expire-time', '-x'), help='Expire time (seconds).') +register_cli_argument('network dns record-set soa', 'minimum_ttl', options_list=('--minimum-ttl', '-m'), help='Minimum TTL (time-to-live, seconds).') +register_cli_argument('network dns record-set soa', 'refresh_time', options_list=('--refresh-time', '-f'), help='Refresh value (seconds).') +register_cli_argument('network dns record-set soa', 'retry_time', options_list=('--retry-time', '-r'), help='Retry time (seconds).') +register_cli_argument('network dns record-set soa', 'serial_number', options_list=('--serial-number', '-s'), help='Serial number.') +register_cli_argument('network dns record-set srv', 'priority', options_list=('--priority', '-p'), help='Priority metric.') +register_cli_argument('network dns record-set srv', 'weight', options_list=('--weight', '-w'), help='Weight metric.') +register_cli_argument('network dns record-set srv', 'port', options_list=('--port', '-r'), help='Service port.') +register_cli_argument('network dns record-set srv', 'target', options_list=('--target', '-t'), help='Target domain name.') +register_cli_argument('network dns record-set txt', 'value', options_list=('--value', '-v'), nargs='+', help='Space separated list of text values which will be concatenated together.') diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_validators.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_validators.py index 9670f5a20..1c0e5961d 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_validators.py +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_validators.py @@ -127,6 +127,17 @@ def validate_cert(namespace): # app-gateway ssl-cert create does not have these fields and that is okay pass +def validate_dns_record_type(namespace): + tokens = namespace.command.split(' ') + types = ['a', 'aaaa', 'cname', 'mx', 'ns', 'ptr', 'soa', 'srv', 'txt'] + for token in tokens: + if token in types: + if hasattr(namespace, 'record_type'): + namespace.record_type = token + else: + namespace.record_set_type = token + return + def validate_inbound_nat_rule_id_list(namespace): _generate_lb_id_list_from_names_or_ids( namespace, 'load_balancer_inbound_nat_rule_ids', 'inboundNatRules') diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/commands.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/commands.py index 28ccce26b..08b6f28be 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/commands.py +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/commands.py @@ -398,44 +398,41 @@ cli_generic_update_command(__name__, 'network traffic-manager endpoint update', custom_function_op=custom_path.format('update_traffic_manager_endpoint')) # DNS ZonesOperations -cli_command(__name__, 'network dns zone show', 'azure.mgmt.dns.operations.zones_operations#ZonesOperations.get', cf_dns_mgmt_zones, table_transformer=transform_dns_zone_table_output) -cli_command(__name__, 'network dns zone delete', 'azure.mgmt.dns.operations.zones_operations#ZonesOperations.delete', cf_dns_mgmt_zones, confirmation=True) +dns_zone_path = 'azure.mgmt.dns.operations.zones_operations#ZonesOperations.' +cli_command(__name__, 'network dns zone show', dns_zone_path + 'get', cf_dns_mgmt_zones, table_transformer=transform_dns_zone_table_output) +cli_command(__name__, 'network dns zone delete', dns_zone_path + 'delete', cf_dns_mgmt_zones, confirmation=True) cli_command(__name__, 'network dns zone list', custom_path.format('list_dns_zones'), table_transformer=transform_dns_zone_table_output) cli_generic_update_command(__name__, 'network dns zone update', - 'azure.mgmt.dns.operations.zones_operations#ZonesOperations.get', - 'azure.mgmt.dns.operations.zones_operations#ZonesOperations.create_or_update', + dns_zone_path + 'get', + dns_zone_path + 'create_or_update', cf_dns_mgmt_zones) cli_command(__name__, 'network dns zone import', custom_path.format('import_zone')) cli_command(__name__, 'network dns zone export', custom_path.format('export_zone')) cli_command(__name__, 'network dns zone create', custom_path.format('create_dns_zone'), cf_dns_mgmt_zones) # DNS RecordSetsOperations -cli_command(__name__, 'network dns record-set show', 'azure.mgmt.dns.operations.record_sets_operations#RecordSetsOperations.get', cf_dns_mgmt_record_sets, transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record-set delete', 'azure.mgmt.dns.operations.record_sets_operations#RecordSetsOperations.delete', cf_dns_mgmt_record_sets) -cli_command(__name__, 'network dns record-set list', custom_path.format('list_dns_record_set'), cf_dns_mgmt_record_sets, transform=transform_dns_record_set_output, table_transformer=transform_dns_record_set_table_output) -cli_command(__name__, 'network dns record-set create', custom_path.format('create_dns_record_set'), transform=transform_dns_record_set_output) -cli_generic_update_command(__name__, 'network dns record-set update', - 'azure.mgmt.dns.operations.record_sets_operations#RecordSetsOperations.get', - 'azure.mgmt.dns.operations.record_sets_operations#RecordSetsOperations.create_or_update', - cf_dns_mgmt_record_sets, - custom_function_op=custom_path.format('update_dns_record_set'), - transform=transform_dns_record_set_output) - -# DNS RecordOperations -cli_command(__name__, 'network dns record aaaa add', custom_path.format('add_dns_aaaa_record'), transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record a add', custom_path.format('add_dns_a_record'), transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record cname add', custom_path.format('add_dns_cname_record'), transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record ns add', custom_path.format('add_dns_ns_record'), transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record mx add', custom_path.format('add_dns_mx_record'), transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record ptr add', custom_path.format('add_dns_ptr_record'), transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record srv add', custom_path.format('add_dns_srv_record'), transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record txt add', custom_path.format('add_dns_txt_record'), transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record update-soa', custom_path.format('update_dns_soa_record'), transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record aaaa remove', custom_path.format('remove_dns_aaaa_record'), transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record a remove', custom_path.format('remove_dns_a_record'), transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record cname remove', custom_path.format('remove_dns_cname_record'), transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record ns remove', custom_path.format('remove_dns_ns_record'), transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record mx remove', custom_path.format('remove_dns_mx_record'), transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record ptr remove', custom_path.format('remove_dns_ptr_record'), transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record srv remove', custom_path.format('remove_dns_srv_record'), transform=transform_dns_record_set_output) -cli_command(__name__, 'network dns record txt remove', custom_path.format('remove_dns_txt_record'), transform=transform_dns_record_set_output) +dns_record_set_path = 'azure.mgmt.dns.operations.record_sets_operations#RecordSetsOperations.' +cli_command(__name__, 'network dns record-set list', custom_path.format('list_dns_record_set'), cf_dns_mgmt_record_sets, transform=transform_dns_record_set_output) +for record in ['a', 'aaaa', 'mx', 'ns', 'ptr', 'srv', 'txt']: + cli_command(__name__, 'network dns record-set {} show'.format(record), dns_record_set_path + 'get', cf_dns_mgmt_record_sets, transform=transform_dns_record_set_output) + cli_command(__name__, 'network dns record-set {} delete'.format(record), dns_record_set_path + 'delete', cf_dns_mgmt_record_sets) + cli_command(__name__, 'network dns record-set {} list'.format(record), custom_path.format('list_dns_record_set'), cf_dns_mgmt_record_sets, transform=transform_dns_record_set_output, table_transformer=transform_dns_record_set_table_output) + cli_command(__name__, 'network dns record-set {} create'.format(record), custom_path.format('create_dns_record_set'), transform=transform_dns_record_set_output) + cli_command(__name__, 'network dns record-set {} add-record'.format(record), custom_path.format('add_dns_{}_record'.format(record)), transform=transform_dns_record_set_output) + cli_command(__name__, 'network dns record-set {} remove-record'.format(record), custom_path.format('remove_dns_{}_record'.format(record)), transform=transform_dns_record_set_output) + cli_generic_update_command(__name__, 'network dns record-set {} update'.format(record), + dns_record_set_path + 'get', + dns_record_set_path + 'create_or_update', + cf_dns_mgmt_record_sets, + custom_function_op=custom_path.format('update_dns_record_set'), + transform=transform_dns_record_set_output) + +cli_command(__name__, 'network dns record-set soa show', dns_record_set_path + 'get', cf_dns_mgmt_record_sets, transform=transform_dns_record_set_output) +cli_command(__name__, 'network dns record-set soa update', custom_path.format('update_dns_soa_record'), transform=transform_dns_record_set_output) + +cli_command(__name__, 'network dns record-set cname show', dns_record_set_path + 'get', cf_dns_mgmt_record_sets, transform=transform_dns_record_set_output) +cli_command(__name__, 'network dns record-set cname delete', dns_record_set_path + 'delete', cf_dns_mgmt_record_sets) +cli_command(__name__, 'network dns record-set cname list', custom_path.format('list_dns_record_set'), cf_dns_mgmt_record_sets, transform=transform_dns_record_set_output, table_transformer=transform_dns_record_set_table_output) +cli_command(__name__, 'network dns record-set cname create', custom_path.format('create_dns_record_set'), transform=transform_dns_record_set_output) +cli_command(__name__, 'network dns record-set cname set-record', custom_path.format('add_dns_cname_record'), transform=transform_dns_record_set_output) +cli_command(__name__, 'network dns record-set cname remove-record', custom_path.format('remove_dns_cname_record'), transform=transform_dns_record_set_output) diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_params.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_params.py index 34e9314b4..8f0f796fa 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_params.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_params.py @@ -185,7 +185,7 @@ for scope in ['vm create', 'vmss create']: register_cli_argument(scope, 'authentication_type', help='Type of authentication to use with the VM. Defaults to password for Windows and SSH public key for Linux.', arg_group='Authentication', **enum_choice_list(['ssh', 'password'])) register_cli_argument(scope, 'os_disk_name', help='The name of the new VM OS disk.', arg_group='Storage') - register_cli_argument(scope, 'os_type', help='Type of OS installed on a custom VHD. Do not use when specifiying an URN or URN alias.', arg_group='Storage', **enum_choice_list(['windows', 'linux'])) + register_cli_argument(scope, 'os_type', help='Type of OS installed on a custom VHD. Do not use when specifying an URN or URN alias.', arg_group='Storage', **enum_choice_list(['windows', 'linux'])) register_cli_argument(scope, 'storage_account', help="Only applicable when use with '--use-unmanaged-disk'. The name to use when creating a new storage account or referencing an existing one. If omitted, an appropriate storage account in the same resource group and location will be used, or a new one will be created.", arg_group='Storage') register_cli_argument(scope, 'storage_caching', help='Storage caching type for the VM OS disk', arg_group='Storage', **enum_choice_list(['ReadWrite', 'ReadOnly'])) register_cli_argument(scope, 'storage_sku', help='The sku of storage account to persist VM. By default, only Standard_LRS and Premium_LRS are allowed. Using with --use-unmanaged-disk, all are available.', arg_group='Storage', **enum_choice_list(SkuName))
[DNS] Change 'az network dns record update-soa' to 'az network dns record soa update' Under 'az network dns record', we have a bunch of subgroups (one for each record type) followed by a one-off command 'update-soa'. The SOA record set is a bit of a special case, in that it can be edited but doesn't support add/remove. However, I think there's a cleaner way to support this. Remove the 'update-soa' command, and move it to an 'update' command under the 'soa' command group That way, under 'records' we have a clean list of command groups, one for each record type including SOA. Under each record type, we support add/remove commands, except for SOA which supports an update command instead.
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/recordings/test_network_dns.yaml b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/recordings/test_network_dns.yaml index f3b2a954e..0ae2c3dab 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/recordings/test_network_dns.yaml +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/recordings/test_network_dns.yaml @@ -10,17 +10,17 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a4561a5c-f482-11e6-9ff3-a0b3ccf7272a] + x-ms-client-request-id: [8193d8c2-f498-11e6-9e0d-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com","name":"myzone.com","type":"Microsoft.Network\/dnszones","etag":"00000002-0000-0000-f415-d5678f88d201","location":"global","tags":{},"properties":{"maxNumberOfRecordSets":5000,"nameServers":["ns1-01.azure-dns.com.","ns2-01.azure-dns.net.","ns3-01.azure-dns.org.","ns4-01.azure-dns.info."],"numberOfRecordSets":2}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com","name":"myzone.com","type":"Microsoft.Network\/dnszones","etag":"00000002-0000-0000-364a-ed42a588d201","location":"global","tags":{},"properties":{"maxNumberOfRecordSets":5000,"nameServers":["ns1-04.azure-dns.com.","ns2-04.azure-dns.net.","ns3-04.azure-dns.org.","ns4-04.azure-dns.info."],"numberOfRecordSets":2}}'} headers: Cache-Control: [private] Content-Length: ['463'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:05 GMT'] - ETag: [00000002-0000-0000-f415-d5678f88d201] + Date: ['Thu, 16 Feb 2017 22:37:33 GMT'] + ETag: [00000002-0000-0000-364a-ed42a588d201] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] @@ -38,16 +38,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a6e1ccf4-f482-11e6-a33c-a0b3ccf7272a] + x-ms-client-request-id: [829ff686-f498-11e6-af40-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com","name":"myzone.com","type":"Microsoft.Network\/dnszones","etag":"00000002-0000-0000-f415-d5678f88d201","location":"global","tags":{},"properties":{"maxNumberOfRecordSets":5000,"nameServers":["ns1-01.azure-dns.com.","ns2-01.azure-dns.net.","ns3-01.azure-dns.org.","ns4-01.azure-dns.info."],"numberOfRecordSets":2}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com","name":"myzone.com","type":"Microsoft.Network\/dnszones","etag":"00000002-0000-0000-364a-ed42a588d201","location":"global","tags":{},"properties":{"maxNumberOfRecordSets":5000,"nameServers":["ns1-04.azure-dns.com.","ns2-04.azure-dns.net.","ns3-04.azure-dns.org.","ns4-04.azure-dns.info."],"numberOfRecordSets":2}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:06 GMT'] - ETag: [00000002-0000-0000-f415-d5678f88d201] + Date: ['Thu, 16 Feb 2017 22:37:34 GMT'] + ETag: [00000002-0000-0000-364a-ed42a588d201] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -59,7 +59,7 @@ interactions: x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: - body: '{"name": "myrsa", "type": "A", "properties": {"TTL": 3600}}' + body: '{"properties": {"TTL": 3600}, "type": "a", "name": "myrsa"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -69,23 +69,23 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a75daa0a-f482-11e6-81b7-a0b3ccf7272a] + x-ms-client-request-id: [83599228-f498-11e6-9d04-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"eac70b5f-ff5d-429b-9b74-b79670f25ce3","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"d7289747-55d5-4f2e-b11e-54c1e1def441","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[]}}'} headers: Cache-Control: [private] Content-Length: ['328'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:07 GMT'] - ETag: [eac70b5f-ff5d-429b-9b74-b79670f25ce3] + Date: ['Thu, 16 Feb 2017 22:37:36 GMT'] + ETag: [d7289747-55d5-4f2e-b11e-54c1e1def441] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11997'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 201, message: Created} - request: body: null @@ -97,16 +97,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a821b93a-f482-11e6-a429-a0b3ccf7272a] + x-ms-client-request-id: [842032c0-f498-11e6-8461-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"eac70b5f-ff5d-429b-9b74-b79670f25ce3","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"d7289747-55d5-4f2e-b11e-54c1e1def441","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:08 GMT'] - ETag: [eac70b5f-ff5d-429b-9b74-b79670f25ce3] + Date: ['Thu, 16 Feb 2017 22:37:36 GMT'] + ETag: [d7289747-55d5-4f2e-b11e-54c1e1def441] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -118,9 +118,9 @@ interactions: x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: - body: '{"etag": "eac70b5f-ff5d-429b-9b74-b79670f25ce3", "name": "myrsa", "type": - "Microsoft.Network/dnszones/A", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa", - "properties": {"ARecords": [{"ipv4Address": "10.0.0.10"}], "TTL": 3600}}' + body: '{"properties": {"ARecords": [{"ipv4Address": "10.0.0.10"}], "TTL": 3600}, + "type": "Microsoft.Network/dnszones/A", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa", + "etag": "d7289747-55d5-4f2e-b11e-54c1e1def441", "name": "myrsa"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -130,16 +130,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a8805458-f482-11e6-bb94-a0b3ccf7272a] + x-ms-client-request-id: [846280ca-f498-11e6-80d5-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"17019ad8-4c28-4107-92e0-fcfbd198a66b","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.10"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"48ca7c67-4f9c-4e81-8574-57271cbc8fe6","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.10"}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:08 GMT'] - ETag: [17019ad8-4c28-4107-92e0-fcfbd198a66b] + Date: ['Thu, 16 Feb 2017 22:37:37 GMT'] + ETag: [48ca7c67-4f9c-4e81-8574-57271cbc8fe6] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -148,7 +148,7 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['355'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11996'] status: {code: 200, message: OK} - request: body: null @@ -160,7 +160,7 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a95b04dc-f482-11e6-bfc1-a0b3ccf7272a] + x-ms-client-request-id: [854e04d2-f498-11e6-acc5-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsaalt?api-version=2016-04-01 response: @@ -170,17 +170,17 @@ interactions: Cache-Control: [private] Content-Length: ['172'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:11 GMT'] + Date: ['Thu, 16 Feb 2017 22:37:39 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] status: {code: 404, message: Not Found} - request: - body: '{"name": "myrsaalt", "type": "a", "properties": {"ARecords": [{"ipv4Address": - "10.0.0.10"}], "TTL": 3600}}' + body: '{"properties": {"ARecords": [{"ipv4Address": "10.0.0.10"}], "TTL": 3600}, + "type": "a", "name": "myrsaalt"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -190,26 +190,26 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [a9dd063e-f482-11e6-be63-a0b3ccf7272a] + x-ms-client-request-id: [859a5cee-f498-11e6-a8be-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsaalt?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsaalt","name":"myrsaalt","type":"Microsoft.Network\/dnszones\/A","etag":"67bbf38b-68d0-4d61-a9fb-461bf157cf3e","properties":{"fqdn":"myrsaalt.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.10"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsaalt","name":"myrsaalt","type":"Microsoft.Network\/dnszones\/A","etag":"7b98d8ff-b2ec-4bf8-a55a-95474ed026f9","properties":{"fqdn":"myrsaalt.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.10"}]}}'} headers: Cache-Control: [private] Content-Length: ['364'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:11 GMT'] - ETag: [67bbf38b-68d0-4d61-a9fb-461bf157cf3e] + Date: ['Thu, 16 Feb 2017 22:37:39 GMT'] + ETag: [7b98d8ff-b2ec-4bf8-a55a-95474ed026f9] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11997'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] status: {code: 201, message: Created} - request: - body: '{"name": "myrsaaaa", "type": "AAAA", "properties": {"TTL": 3600}}' + body: '{"properties": {"TTL": 3600}, "type": "aaaa", "name": "myrsaaaa"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -219,17 +219,17 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [aa9c0dcc-f482-11e6-a384-a0b3ccf7272a] + x-ms-client-request-id: [866cc5a4-f498-11e6-af7b-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/AAAA/myrsaaaa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/AAAA\/myrsaaaa","name":"myrsaaaa","type":"Microsoft.Network\/dnszones\/AAAA","etag":"f8bedb59-a70e-422f-8b85-c5eec7a66047","properties":{"fqdn":"myrsaaaa.myzone.com.","TTL":3600,"AAAARecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/AAAA\/myrsaaaa","name":"myrsaaaa","type":"Microsoft.Network\/dnszones\/AAAA","etag":"e4d9536c-ac5b-42b1-b4b4-faa923d72a19","properties":{"fqdn":"myrsaaaa.myzone.com.","TTL":3600,"AAAARecords":[]}}'} headers: Cache-Control: [private] Content-Length: ['346'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:15 GMT'] - ETag: [f8bedb59-a70e-422f-8b85-c5eec7a66047] + Date: ['Thu, 16 Feb 2017 22:37:42 GMT'] + ETag: [e4d9536c-ac5b-42b1-b4b4-faa923d72a19] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] @@ -247,16 +247,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ad506806-f482-11e6-b97b-a0b3ccf7272a] + x-ms-client-request-id: [87a8b252-f498-11e6-952d-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/AAAA/myrsaaaa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/AAAA\/myrsaaaa","name":"myrsaaaa","type":"Microsoft.Network\/dnszones\/AAAA","etag":"f8bedb59-a70e-422f-8b85-c5eec7a66047","properties":{"fqdn":"myrsaaaa.myzone.com.","TTL":3600,"AAAARecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/AAAA\/myrsaaaa","name":"myrsaaaa","type":"Microsoft.Network\/dnszones\/AAAA","etag":"e4d9536c-ac5b-42b1-b4b4-faa923d72a19","properties":{"fqdn":"myrsaaaa.myzone.com.","TTL":3600,"AAAARecords":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:17 GMT'] - ETag: [f8bedb59-a70e-422f-8b85-c5eec7a66047] + Date: ['Thu, 16 Feb 2017 22:37:43 GMT'] + ETag: [e4d9536c-ac5b-42b1-b4b4-faa923d72a19] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -268,10 +268,9 @@ interactions: x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: - body: '{"etag": "f8bedb59-a70e-422f-8b85-c5eec7a66047", "name": "myrsaaaa", "type": - "Microsoft.Network/dnszones/AAAA", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/AAAA/myrsaaaa", - "properties": {"AAAARecords": [{"ipv6Address": "2001:db8:0:1:1:1:1:1"}], "TTL": - 3600}}' + body: '{"properties": {"TTL": 3600, "AAAARecords": [{"ipv6Address": "2001:db8:0:1:1:1:1:1"}]}, + "type": "Microsoft.Network/dnszones/AAAA", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/AAAA/myrsaaaa", + "etag": "e4d9536c-ac5b-42b1-b4b4-faa923d72a19", "name": "myrsaaaa"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -281,16 +280,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ad90b766-f482-11e6-a3d3-a0b3ccf7272a] + x-ms-client-request-id: [88265cb0-f498-11e6-89a1-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/AAAA/myrsaaaa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/AAAA\/myrsaaaa","name":"myrsaaaa","type":"Microsoft.Network\/dnszones\/AAAA","etag":"29b84cf4-54ac-45f4-9992-d600337209f2","properties":{"fqdn":"myrsaaaa.myzone.com.","TTL":3600,"AAAARecords":[{"ipv6Address":"2001:db8:0:1:1:1:1:1"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/AAAA\/myrsaaaa","name":"myrsaaaa","type":"Microsoft.Network\/dnszones\/AAAA","etag":"188f3b1d-e078-489d-8be5-f086455251d6","properties":{"fqdn":"myrsaaaa.myzone.com.","TTL":3600,"AAAARecords":[{"ipv6Address":"2001:db8:0:1:1:1:1:1"}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:18 GMT'] - ETag: [29b84cf4-54ac-45f4-9992-d600337209f2] + Date: ['Thu, 16 Feb 2017 22:37:44 GMT'] + ETag: [188f3b1d-e078-489d-8be5-f086455251d6] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -311,7 +310,7 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ae54a548-f482-11e6-8108-a0b3ccf7272a] + x-ms-client-request-id: [8935e112-f498-11e6-acdc-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/AAAA/myrsaaaaalt?api-version=2016-04-01 response: @@ -321,17 +320,17 @@ interactions: Cache-Control: [private] Content-Length: ['175'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:19 GMT'] + Date: ['Thu, 16 Feb 2017 22:37:45 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 404, message: Not Found} - request: - body: '{"name": "myrsaaaaalt", "type": "aaaa", "properties": {"AAAARecords": [{"ipv6Address": - "2001:db8:0:1:1:1:1:1"}], "TTL": 3600}}' + body: '{"properties": {"TTL": 3600, "AAAARecords": [{"ipv6Address": "2001:db8:0:1:1:1:1:1"}]}, + "type": "aaaa", "name": "myrsaaaaalt"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -341,26 +340,26 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ae975c7e-f482-11e6-b3bc-a0b3ccf7272a] + x-ms-client-request-id: [898bf710-f498-11e6-bfd2-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/AAAA/myrsaaaaalt?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/AAAA\/myrsaaaaalt","name":"myrsaaaaalt","type":"Microsoft.Network\/dnszones\/AAAA","etag":"c85fa146-81a7-4393-8df2-fd6e42c84c8c","properties":{"fqdn":"myrsaaaaalt.myzone.com.","TTL":3600,"AAAARecords":[{"ipv6Address":"2001:db8:0:1:1:1:1:1"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/AAAA\/myrsaaaaalt","name":"myrsaaaaalt","type":"Microsoft.Network\/dnszones\/AAAA","etag":"bb4af783-4e50-4789-a221-6d9720fb7906","properties":{"fqdn":"myrsaaaaalt.myzone.com.","TTL":3600,"AAAARecords":[{"ipv6Address":"2001:db8:0:1:1:1:1:1"}]}}'} headers: Cache-Control: [private] Content-Length: ['393'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:19 GMT'] - ETag: [c85fa146-81a7-4393-8df2-fd6e42c84c8c] + Date: ['Thu, 16 Feb 2017 22:37:46 GMT'] + ETag: [bb4af783-4e50-4789-a221-6d9720fb7906] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 201, message: Created} - request: - body: '{"name": "myrscname", "type": "CNAME", "properties": {"TTL": 3600}}' + body: '{"properties": {"TTL": 3600}, "type": "cname", "name": "myrscname"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -370,23 +369,23 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [af42731a-f482-11e6-b47b-a0b3ccf7272a] + x-ms-client-request-id: [8a757a06-f498-11e6-bf41-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/CNAME/myrscname?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/CNAME\/myrscname","name":"myrscname","type":"Microsoft.Network\/dnszones\/CNAME","etag":"a77e9d56-56ba-4628-8a21-e6f7db9eb868","properties":{"fqdn":"myrscname.myzone.com.","TTL":3600}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/CNAME\/myrscname","name":"myrscname","type":"Microsoft.Network\/dnszones\/CNAME","etag":"61720286-95d3-4d7a-9d8e-1c879a35c472","properties":{"fqdn":"myrscname.myzone.com.","TTL":3600}}'} headers: Cache-Control: [private] Content-Length: ['334'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:20 GMT'] - ETag: [a77e9d56-56ba-4628-8a21-e6f7db9eb868] + Date: ['Thu, 16 Feb 2017 22:37:48 GMT'] + ETag: [61720286-95d3-4d7a-9d8e-1c879a35c472] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 201, message: Created} - request: body: null @@ -398,16 +397,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [affd4812-f482-11e6-87f1-a0b3ccf7272a] + x-ms-client-request-id: [8b7b93b6-f498-11e6-863f-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/CNAME/myrscname?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/CNAME\/myrscname","name":"myrscname","type":"Microsoft.Network\/dnszones\/CNAME","etag":"a77e9d56-56ba-4628-8a21-e6f7db9eb868","properties":{"fqdn":"myrscname.myzone.com.","TTL":3600}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/CNAME\/myrscname","name":"myrscname","type":"Microsoft.Network\/dnszones\/CNAME","etag":"61720286-95d3-4d7a-9d8e-1c879a35c472","properties":{"fqdn":"myrscname.myzone.com.","TTL":3600}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:21 GMT'] - ETag: [a77e9d56-56ba-4628-8a21-e6f7db9eb868] + Date: ['Thu, 16 Feb 2017 22:37:49 GMT'] + ETag: [61720286-95d3-4d7a-9d8e-1c879a35c472] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -419,9 +418,9 @@ interactions: x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: - body: '{"etag": "a77e9d56-56ba-4628-8a21-e6f7db9eb868", "name": "myrscname", "type": + body: '{"properties": {"CNAMERecord": {"cname": "mycname"}, "TTL": 3600}, "type": "Microsoft.Network/dnszones/CNAME", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/CNAME/myrscname", - "properties": {"CNAMERecord": {"cname": "mycname"}, "TTL": 3600}}' + "etag": "61720286-95d3-4d7a-9d8e-1c879a35c472", "name": "myrscname"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -431,16 +430,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b034890a-f482-11e6-803b-a0b3ccf7272a] + x-ms-client-request-id: [8bdf6fc8-f498-11e6-b3f5-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/CNAME/myrscname?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/CNAME\/myrscname","name":"myrscname","type":"Microsoft.Network\/dnszones\/CNAME","etag":"bca95fc8-060b-45f5-abe4-5d12ecd2856e","properties":{"fqdn":"myrscname.myzone.com.","TTL":3600,"CNAMERecord":{"cname":"mycname"}}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/CNAME\/myrscname","name":"myrscname","type":"Microsoft.Network\/dnszones\/CNAME","etag":"d3ca537b-0e21-42fd-9aeb-5e6f69437c3d","properties":{"fqdn":"myrscname.myzone.com.","TTL":3600,"CNAMERecord":{"cname":"mycname"}}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:22 GMT'] - ETag: [bca95fc8-060b-45f5-abe4-5d12ecd2856e] + Date: ['Thu, 16 Feb 2017 22:37:50 GMT'] + ETag: [d3ca537b-0e21-42fd-9aeb-5e6f69437c3d] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -449,7 +448,7 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['368'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: body: null @@ -461,7 +460,7 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b0ed3d58-f482-11e6-813b-a0b3ccf7272a] + x-ms-client-request-id: [8cd264a6-f498-11e6-b68f-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/CNAME/myrscnamealt?api-version=2016-04-01 response: @@ -471,17 +470,17 @@ interactions: Cache-Control: [private] Content-Length: ['176'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:23 GMT'] + Date: ['Thu, 16 Feb 2017 22:37:54 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 404, message: Not Found} - request: - body: '{"name": "myrscnamealt", "type": "cname", "properties": {"CNAMERecord": - {"cname": "mycname"}, "TTL": 3600}}' + body: '{"properties": {"CNAMERecord": {"cname": "mycname"}, "TTL": 3600}, "type": + "cname", "name": "myrscnamealt"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -491,26 +490,26 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b156c7d8-f482-11e6-b262-a0b3ccf7272a] + x-ms-client-request-id: [8f49d5b8-f498-11e6-aec1-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/CNAME/myrscnamealt?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/CNAME\/myrscnamealt","name":"myrscnamealt","type":"Microsoft.Network\/dnszones\/CNAME","etag":"9af59adb-5b8b-40e5-ae0d-5fde6f2aec12","properties":{"fqdn":"myrscnamealt.myzone.com.","TTL":3600,"CNAMERecord":{"cname":"mycname"}}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/CNAME\/myrscnamealt","name":"myrscnamealt","type":"Microsoft.Network\/dnszones\/CNAME","etag":"22477145-0695-49fd-bedf-5e7c814fe6e4","properties":{"fqdn":"myrscnamealt.myzone.com.","TTL":3600,"CNAMERecord":{"cname":"mycname"}}}'} headers: Cache-Control: [private] Content-Length: ['377'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:23 GMT'] - ETag: [9af59adb-5b8b-40e5-ae0d-5fde6f2aec12] + Date: ['Thu, 16 Feb 2017 22:37:55 GMT'] + ETag: [22477145-0695-49fd-bedf-5e7c814fe6e4] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 201, message: Created} - request: - body: '{"name": "myrsmx", "type": "MX", "properties": {"TTL": 3600}}' + body: '{"properties": {"TTL": 3600}, "type": "mx", "name": "myrsmx"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -520,23 +519,23 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b20b6a92-f482-11e6-8c4d-a0b3ccf7272a] + x-ms-client-request-id: [900503d4-f498-11e6-b89a-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/MX/myrsmx?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/MX\/myrsmx","name":"myrsmx","type":"Microsoft.Network\/dnszones\/MX","etag":"9736013f-9d46-4223-9934-51067b8fea40","properties":{"fqdn":"myrsmx.myzone.com.","TTL":3600,"MXRecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/MX\/myrsmx","name":"myrsmx","type":"Microsoft.Network\/dnszones\/MX","etag":"3bb9d092-ce4f-4935-add7-e3ef79b52986","properties":{"fqdn":"myrsmx.myzone.com.","TTL":3600,"MXRecords":[]}}'} headers: Cache-Control: [private] Content-Length: ['334'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:25 GMT'] - ETag: [9736013f-9d46-4223-9934-51067b8fea40] + Date: ['Thu, 16 Feb 2017 22:37:56 GMT'] + ETag: [3bb9d092-ce4f-4935-add7-e3ef79b52986] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 201, message: Created} - request: body: null @@ -548,16 +547,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b2bc3a12-f482-11e6-8bee-a0b3ccf7272a] + x-ms-client-request-id: [90d42868-f498-11e6-bd41-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/MX/myrsmx?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/MX\/myrsmx","name":"myrsmx","type":"Microsoft.Network\/dnszones\/MX","etag":"9736013f-9d46-4223-9934-51067b8fea40","properties":{"fqdn":"myrsmx.myzone.com.","TTL":3600,"MXRecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/MX\/myrsmx","name":"myrsmx","type":"Microsoft.Network\/dnszones\/MX","etag":"3bb9d092-ce4f-4935-add7-e3ef79b52986","properties":{"fqdn":"myrsmx.myzone.com.","TTL":3600,"MXRecords":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:25 GMT'] - ETag: [9736013f-9d46-4223-9934-51067b8fea40] + Date: ['Thu, 16 Feb 2017 22:37:58 GMT'] + ETag: [3bb9d092-ce4f-4935-add7-e3ef79b52986] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -566,12 +565,12 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['334'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: - body: '{"etag": "9736013f-9d46-4223-9934-51067b8fea40", "name": "myrsmx", "type": - "Microsoft.Network/dnszones/MX", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/MX/myrsmx", - "properties": {"TTL": 3600, "MXRecords": [{"exchange": "12", "preference": 13}]}}' + body: '{"properties": {"TTL": 3600, "MXRecords": [{"exchange": "12", "preference": + 13}]}, "type": "Microsoft.Network/dnszones/MX", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/MX/myrsmx", + "etag": "3bb9d092-ce4f-4935-add7-e3ef79b52986", "name": "myrsmx"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -581,16 +580,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b2f9717a-f482-11e6-8198-a0b3ccf7272a] + x-ms-client-request-id: [913e829e-f498-11e6-9296-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/MX/myrsmx?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/MX\/myrsmx","name":"myrsmx","type":"Microsoft.Network\/dnszones\/MX","etag":"ab979abd-f398-463f-92cd-0da2b2b40918","properties":{"fqdn":"myrsmx.myzone.com.","TTL":3600,"MXRecords":[{"exchange":"12","preference":13}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/MX\/myrsmx","name":"myrsmx","type":"Microsoft.Network\/dnszones\/MX","etag":"c7a5da5c-a17a-4759-8fc6-bc182a17a254","properties":{"fqdn":"myrsmx.myzone.com.","TTL":3600,"MXRecords":[{"exchange":"12","preference":13}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:27 GMT'] - ETag: [ab979abd-f398-463f-92cd-0da2b2b40918] + Date: ['Thu, 16 Feb 2017 22:37:59 GMT'] + ETag: [c7a5da5c-a17a-4759-8fc6-bc182a17a254] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -599,7 +598,7 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['367'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: body: null @@ -611,7 +610,7 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b3ac6d48-f482-11e6-8181-a0b3ccf7272a] + x-ms-client-request-id: [91fac7a6-f498-11e6-82cc-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/MX/myrsmxalt?api-version=2016-04-01 response: @@ -621,7 +620,7 @@ interactions: Cache-Control: [private] Content-Length: ['173'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:27 GMT'] + Date: ['Thu, 16 Feb 2017 22:38:00 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] @@ -630,8 +629,8 @@ interactions: x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 404, message: Not Found} - request: - body: '{"name": "myrsmxalt", "type": "mx", "properties": {"TTL": 3600, "MXRecords": - [{"exchange": "12", "preference": 13}]}}' + body: '{"properties": {"TTL": 3600, "MXRecords": [{"exchange": "12", "preference": + 13}]}, "type": "mx", "name": "myrsmxalt"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -641,17 +640,17 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b3ead04c-f482-11e6-b37c-a0b3ccf7272a] + x-ms-client-request-id: [9244610a-f498-11e6-9431-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/MX/myrsmxalt?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/MX\/myrsmxalt","name":"myrsmxalt","type":"Microsoft.Network\/dnszones\/MX","etag":"5ef72ec1-f2df-46db-a7dd-bddf50ac955d","properties":{"fqdn":"myrsmxalt.myzone.com.","TTL":3600,"MXRecords":[{"exchange":"12","preference":13}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/MX\/myrsmxalt","name":"myrsmxalt","type":"Microsoft.Network\/dnszones\/MX","etag":"abb6c9dd-42c5-41d5-9d90-402b85100832","properties":{"fqdn":"myrsmxalt.myzone.com.","TTL":3600,"MXRecords":[{"exchange":"12","preference":13}]}}'} headers: Cache-Control: [private] Content-Length: ['376'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:28 GMT'] - ETag: [5ef72ec1-f2df-46db-a7dd-bddf50ac955d] + Date: ['Thu, 16 Feb 2017 22:38:00 GMT'] + ETag: [abb6c9dd-42c5-41d5-9d90-402b85100832] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] @@ -660,7 +659,7 @@ interactions: x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 201, message: Created} - request: - body: '{"name": "myrsns", "type": "NS", "properties": {"TTL": 3600}}' + body: '{"properties": {"TTL": 3600}, "type": "ns", "name": "myrsns"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -670,23 +669,23 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b4b36042-f482-11e6-b71b-a0b3ccf7272a] + x-ms-client-request-id: [93166aae-f498-11e6-a794-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/NS/myrsns?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/myrsns","name":"myrsns","type":"Microsoft.Network\/dnszones\/NS","etag":"5c267d0b-33b7-4b1e-8933-7ead13085bf6","properties":{"fqdn":"myrsns.myzone.com.","TTL":3600,"NSRecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/myrsns","name":"myrsns","type":"Microsoft.Network\/dnszones\/NS","etag":"fe9e605c-884f-48b9-88b1-439daf254c52","properties":{"fqdn":"myrsns.myzone.com.","TTL":3600,"NSRecords":[]}}'} headers: Cache-Control: [private] Content-Length: ['334'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:29 GMT'] - ETag: [5c267d0b-33b7-4b1e-8933-7ead13085bf6] + Date: ['Thu, 16 Feb 2017 22:38:02 GMT'] + ETag: [fe9e605c-884f-48b9-88b1-439daf254c52] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 201, message: Created} - request: body: null @@ -698,16 +697,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b5619214-f482-11e6-a494-a0b3ccf7272a] + x-ms-client-request-id: [93d4b12c-f498-11e6-bf10-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/NS/myrsns?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/myrsns","name":"myrsns","type":"Microsoft.Network\/dnszones\/NS","etag":"5c267d0b-33b7-4b1e-8933-7ead13085bf6","properties":{"fqdn":"myrsns.myzone.com.","TTL":3600,"NSRecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/myrsns","name":"myrsns","type":"Microsoft.Network\/dnszones\/NS","etag":"fe9e605c-884f-48b9-88b1-439daf254c52","properties":{"fqdn":"myrsns.myzone.com.","TTL":3600,"NSRecords":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:30 GMT'] - ETag: [5c267d0b-33b7-4b1e-8933-7ead13085bf6] + Date: ['Thu, 16 Feb 2017 22:38:03 GMT'] + ETag: [fe9e605c-884f-48b9-88b1-439daf254c52] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -718,9 +717,9 @@ interactions: content-length: ['334'] status: {code: 200, message: OK} - request: - body: '{"etag": "5c267d0b-33b7-4b1e-8933-7ead13085bf6", "name": "myrsns", "type": - "Microsoft.Network/dnszones/NS", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/NS/myrsns", - "properties": {"NSRecords": [{"nsdname": "foobar.com"}], "TTL": 3600}}' + body: '{"properties": {"NSRecords": [{"nsdname": "foobar.com"}], "TTL": 3600}, + "type": "Microsoft.Network/dnszones/NS", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/NS/myrsns", + "etag": "fe9e605c-884f-48b9-88b1-439daf254c52", "name": "myrsns"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -730,16 +729,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b5af695a-f482-11e6-928c-a0b3ccf7272a] + x-ms-client-request-id: [93fdb3fa-f498-11e6-8c1e-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/NS/myrsns?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/myrsns","name":"myrsns","type":"Microsoft.Network\/dnszones\/NS","etag":"5f236f16-7ae4-4c76-b037-57a97a8eb1d3","properties":{"fqdn":"myrsns.myzone.com.","TTL":3600,"NSRecords":[{"nsdname":"foobar.com"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/myrsns","name":"myrsns","type":"Microsoft.Network\/dnszones\/NS","etag":"e1774943-72fa-4c2d-b8a2-c381216df40f","properties":{"fqdn":"myrsns.myzone.com.","TTL":3600,"NSRecords":[{"nsdname":"foobar.com"}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:31 GMT'] - ETag: [5f236f16-7ae4-4c76-b037-57a97a8eb1d3] + Date: ['Thu, 16 Feb 2017 22:38:03 GMT'] + ETag: [e1774943-72fa-4c2d-b8a2-c381216df40f] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -760,7 +759,7 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b676958a-f482-11e6-9760-a0b3ccf7272a] + x-ms-client-request-id: [94cfd77e-f498-11e6-8bd1-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/NS/myrsnsalt?api-version=2016-04-01 response: @@ -770,7 +769,7 @@ interactions: Cache-Control: [private] Content-Length: ['173'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:32 GMT'] + Date: ['Thu, 16 Feb 2017 22:38:09 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] @@ -778,8 +777,8 @@ interactions: X-Powered-By: [ASP.NET] status: {code: 404, message: Not Found} - request: - body: '{"name": "myrsnsalt", "type": "ns", "properties": {"NSRecords": [{"nsdname": - "foobar.com"}], "TTL": 3600}}' + body: '{"properties": {"NSRecords": [{"nsdname": "foobar.com"}], "TTL": 3600}, + "type": "ns", "name": "myrsnsalt"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -789,17 +788,17 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b6bc2074-f482-11e6-b15d-a0b3ccf7272a] + x-ms-client-request-id: [97d2e75c-f498-11e6-83e6-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/NS/myrsnsalt?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/myrsnsalt","name":"myrsnsalt","type":"Microsoft.Network\/dnszones\/NS","etag":"2189e7b7-8113-4f8c-be41-bdbc8f834484","properties":{"fqdn":"myrsnsalt.myzone.com.","TTL":3600,"NSRecords":[{"nsdname":"foobar.com"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/myrsnsalt","name":"myrsnsalt","type":"Microsoft.Network\/dnszones\/NS","etag":"b170e487-a2a6-4172-961a-604139a6f7e7","properties":{"fqdn":"myrsnsalt.myzone.com.","TTL":3600,"NSRecords":[{"nsdname":"foobar.com"}]}}'} headers: Cache-Control: [private] Content-Length: ['367'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:33 GMT'] - ETag: [2189e7b7-8113-4f8c-be41-bdbc8f834484] + Date: ['Thu, 16 Feb 2017 22:38:10 GMT'] + ETag: [b170e487-a2a6-4172-961a-604139a6f7e7] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] @@ -808,7 +807,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 201, message: Created} - request: - body: '{"name": "myrsptr", "type": "PTR", "properties": {"TTL": 3600}}' + body: '{"properties": {"TTL": 3600}, "type": "ptr", "name": "myrsptr"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -818,17 +817,17 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b779e150-f482-11e6-9c77-a0b3ccf7272a] + x-ms-client-request-id: [9893451c-f498-11e6-9397-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/PTR/myrsptr?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/PTR\/myrsptr","name":"myrsptr","type":"Microsoft.Network\/dnszones\/PTR","etag":"dd9b1c7a-d0dc-415f-9796-96fcadd667d2","properties":{"fqdn":"myrsptr.myzone.com.","TTL":3600,"PTRRecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/PTR\/myrsptr","name":"myrsptr","type":"Microsoft.Network\/dnszones\/PTR","etag":"ed47aeda-3653-4c66-b99d-b1a9f8eb5920","properties":{"fqdn":"myrsptr.myzone.com.","TTL":3600,"PTRRecords":[]}}'} headers: Cache-Control: [private] Content-Length: ['340'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:34 GMT'] - ETag: [dd9b1c7a-d0dc-415f-9796-96fcadd667d2] + Date: ['Thu, 16 Feb 2017 22:38:12 GMT'] + ETag: [ed47aeda-3653-4c66-b99d-b1a9f8eb5920] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] @@ -846,16 +845,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b84cf18c-f482-11e6-8b97-a0b3ccf7272a] + x-ms-client-request-id: [995c2cc8-f498-11e6-a68e-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/PTR/myrsptr?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/PTR\/myrsptr","name":"myrsptr","type":"Microsoft.Network\/dnszones\/PTR","etag":"dd9b1c7a-d0dc-415f-9796-96fcadd667d2","properties":{"fqdn":"myrsptr.myzone.com.","TTL":3600,"PTRRecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/PTR\/myrsptr","name":"myrsptr","type":"Microsoft.Network\/dnszones\/PTR","etag":"ed47aeda-3653-4c66-b99d-b1a9f8eb5920","properties":{"fqdn":"myrsptr.myzone.com.","TTL":3600,"PTRRecords":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:35 GMT'] - ETag: [dd9b1c7a-d0dc-415f-9796-96fcadd667d2] + Date: ['Thu, 16 Feb 2017 22:38:12 GMT'] + ETag: [ed47aeda-3653-4c66-b99d-b1a9f8eb5920] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -867,9 +866,9 @@ interactions: x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: - body: '{"etag": "dd9b1c7a-d0dc-415f-9796-96fcadd667d2", "name": "myrsptr", "type": - "Microsoft.Network/dnszones/PTR", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/PTR/myrsptr", - "properties": {"TTL": 3600, "PTRRecords": [{"ptrdname": "foobar.com"}]}}' + body: '{"properties": {"PTRRecords": [{"ptrdname": "foobar.com"}], "TTL": 3600}, + "type": "Microsoft.Network/dnszones/PTR", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/PTR/myrsptr", + "etag": "ed47aeda-3653-4c66-b99d-b1a9f8eb5920", "name": "myrsptr"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -879,16 +878,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b894c282-f482-11e6-ad50-a0b3ccf7272a] + x-ms-client-request-id: [99a48b6e-f498-11e6-8de0-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/PTR/myrsptr?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/PTR\/myrsptr","name":"myrsptr","type":"Microsoft.Network\/dnszones\/PTR","etag":"dbf1445b-687a-46d9-b690-508dcc67cf92","properties":{"fqdn":"myrsptr.myzone.com.","TTL":3600,"PTRRecords":[{"ptrdname":"foobar.com"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/PTR\/myrsptr","name":"myrsptr","type":"Microsoft.Network\/dnszones\/PTR","etag":"05f53f84-a98d-416c-b1d8-a06865ab0068","properties":{"fqdn":"myrsptr.myzone.com.","TTL":3600,"PTRRecords":[{"ptrdname":"foobar.com"}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:36 GMT'] - ETag: [dbf1445b-687a-46d9-b690-508dcc67cf92] + Date: ['Thu, 16 Feb 2017 22:38:13 GMT'] + ETag: [05f53f84-a98d-416c-b1d8-a06865ab0068] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -897,7 +896,7 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['365'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: body: null @@ -909,7 +908,7 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b94d2602-f482-11e6-9f30-a0b3ccf7272a] + x-ms-client-request-id: [9a742b1c-f498-11e6-b9d2-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/PTR/myrsptralt?api-version=2016-04-01 response: @@ -919,7 +918,7 @@ interactions: Cache-Control: [private] Content-Length: ['174'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:36 GMT'] + Date: ['Thu, 16 Feb 2017 22:38:14 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] @@ -928,8 +927,8 @@ interactions: x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 404, message: Not Found} - request: - body: '{"name": "myrsptralt", "type": "ptr", "properties": {"TTL": 3600, "PTRRecords": - [{"ptrdname": "foobar.com"}]}}' + body: '{"properties": {"PTRRecords": [{"ptrdname": "foobar.com"}], "TTL": 3600}, + "type": "ptr", "name": "myrsptralt"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -939,26 +938,26 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [b9742818-f482-11e6-85a2-a0b3ccf7272a] + x-ms-client-request-id: [9abbf148-f498-11e6-a484-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/PTR/myrsptralt?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/PTR\/myrsptralt","name":"myrsptralt","type":"Microsoft.Network\/dnszones\/PTR","etag":"1ef193c3-848e-4167-aba1-adac705382f3","properties":{"fqdn":"myrsptralt.myzone.com.","TTL":3600,"PTRRecords":[{"ptrdname":"foobar.com"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/PTR\/myrsptralt","name":"myrsptralt","type":"Microsoft.Network\/dnszones\/PTR","etag":"b0e6755b-bada-4396-a94f-e58a3c404f58","properties":{"fqdn":"myrsptralt.myzone.com.","TTL":3600,"PTRRecords":[{"ptrdname":"foobar.com"}]}}'} headers: Cache-Control: [private] Content-Length: ['374'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:37 GMT'] - ETag: [1ef193c3-848e-4167-aba1-adac705382f3] + Date: ['Thu, 16 Feb 2017 22:38:15 GMT'] + ETag: [b0e6755b-bada-4396-a94f-e58a3c404f58] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 201, message: Created} - request: - body: '{"name": "myrssrv", "type": "SRV", "properties": {"TTL": 3600}}' + body: '{"properties": {"TTL": 3600}, "type": "srv", "name": "myrssrv"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -968,23 +967,23 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ba1adc4c-f482-11e6-9b3a-a0b3ccf7272a] + x-ms-client-request-id: [9b78d70a-f498-11e6-919d-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/SRV/myrssrv?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SRV\/myrssrv","name":"myrssrv","type":"Microsoft.Network\/dnszones\/SRV","etag":"f21b1a8e-4032-4a85-a3ed-22cffc632cdc","properties":{"fqdn":"myrssrv.myzone.com.","TTL":3600,"SRVRecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SRV\/myrssrv","name":"myrssrv","type":"Microsoft.Network\/dnszones\/SRV","etag":"729d4a26-b7fe-47bd-add5-6f3240bd8719","properties":{"fqdn":"myrssrv.myzone.com.","TTL":3600,"SRVRecords":[]}}'} headers: Cache-Control: [private] Content-Length: ['340'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:38 GMT'] - ETag: [f21b1a8e-4032-4a85-a3ed-22cffc632cdc] + Date: ['Thu, 16 Feb 2017 22:38:16 GMT'] + ETag: [729d4a26-b7fe-47bd-add5-6f3240bd8719] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11997'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 201, message: Created} - request: body: null @@ -996,16 +995,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [badecd78-f482-11e6-9954-a0b3ccf7272a] + x-ms-client-request-id: [9c5b4e98-f498-11e6-bc7a-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/SRV/myrssrv?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SRV\/myrssrv","name":"myrssrv","type":"Microsoft.Network\/dnszones\/SRV","etag":"f21b1a8e-4032-4a85-a3ed-22cffc632cdc","properties":{"fqdn":"myrssrv.myzone.com.","TTL":3600,"SRVRecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SRV\/myrssrv","name":"myrssrv","type":"Microsoft.Network\/dnszones\/SRV","etag":"729d4a26-b7fe-47bd-add5-6f3240bd8719","properties":{"fqdn":"myrssrv.myzone.com.","TTL":3600,"SRVRecords":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:39 GMT'] - ETag: [f21b1a8e-4032-4a85-a3ed-22cffc632cdc] + Date: ['Thu, 16 Feb 2017 22:38:18 GMT'] + ETag: [729d4a26-b7fe-47bd-add5-6f3240bd8719] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1014,13 +1013,13 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['340'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11997'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: - body: '{"etag": "f21b1a8e-4032-4a85-a3ed-22cffc632cdc", "name": "myrssrv", "type": - "Microsoft.Network/dnszones/SRV", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/SRV/myrssrv", - "properties": {"TTL": 3600, "SRVRecords": [{"port": 1234, "priority": 1, "target": - "target.com", "weight": 50}]}}' + body: '{"properties": {"TTL": 3600, "SRVRecords": [{"port": 1234, "priority": + 1, "weight": 50, "target": "target.com"}]}, "type": "Microsoft.Network/dnszones/SRV", + "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/SRV/myrssrv", + "etag": "729d4a26-b7fe-47bd-add5-6f3240bd8719", "name": "myrssrv"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -1030,16 +1029,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [bb1f98ec-f482-11e6-92ce-a0b3ccf7272a] + x-ms-client-request-id: [9cc442e2-f498-11e6-a66c-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/SRV/myrssrv?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SRV\/myrssrv","name":"myrssrv","type":"Microsoft.Network\/dnszones\/SRV","etag":"d068d744-dbdc-4367-b9c5-2c59f76d3a0e","properties":{"fqdn":"myrssrv.myzone.com.","TTL":3600,"SRVRecords":[{"port":1234,"priority":1,"target":"target.com","weight":50}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SRV\/myrssrv","name":"myrssrv","type":"Microsoft.Network\/dnszones\/SRV","etag":"e2760f4e-601c-4aad-a2ad-815bd4b75b8b","properties":{"fqdn":"myrssrv.myzone.com.","TTL":3600,"SRVRecords":[{"port":1234,"priority":1,"target":"target.com","weight":50}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:40 GMT'] - ETag: [d068d744-dbdc-4367-b9c5-2c59f76d3a0e] + Date: ['Thu, 16 Feb 2017 22:38:18 GMT'] + ETag: [e2760f4e-601c-4aad-a2ad-815bd4b75b8b] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1048,7 +1047,7 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['400'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11997'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: body: null @@ -1060,7 +1059,7 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [bbdccd0c-f482-11e6-898e-a0b3ccf7272a] + x-ms-client-request-id: [9d9e8f18-f498-11e6-9c1b-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/SRV/myrssrvalt?api-version=2016-04-01 response: @@ -1070,7 +1069,7 @@ interactions: Cache-Control: [private] Content-Length: ['174'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:41 GMT'] + Date: ['Thu, 16 Feb 2017 22:38:19 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] @@ -1079,8 +1078,8 @@ interactions: x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 404, message: Not Found} - request: - body: '{"name": "myrssrvalt", "type": "srv", "properties": {"TTL": 3600, "SRVRecords": - [{"port": 1234, "priority": 1, "target": "target.com", "weight": 50}]}}' + body: '{"properties": {"TTL": 3600, "SRVRecords": [{"port": 1234, "priority": + 1, "weight": 50, "target": "target.com"}]}, "type": "srv", "name": "myrssrvalt"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -1090,26 +1089,26 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [bc1e6b90-f482-11e6-9799-a0b3ccf7272a] + x-ms-client-request-id: [9e0a2e54-f498-11e6-bc5c-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/SRV/myrssrvalt?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SRV\/myrssrvalt","name":"myrssrvalt","type":"Microsoft.Network\/dnszones\/SRV","etag":"89c8cb7a-8185-4001-89d3-dbd906db28b2","properties":{"fqdn":"myrssrvalt.myzone.com.","TTL":3600,"SRVRecords":[{"port":1234,"priority":1,"target":"target.com","weight":50}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SRV\/myrssrvalt","name":"myrssrvalt","type":"Microsoft.Network\/dnszones\/SRV","etag":"dc74cba5-3626-40c6-815b-a6321e6439a7","properties":{"fqdn":"myrssrvalt.myzone.com.","TTL":3600,"SRVRecords":[{"port":1234,"priority":1,"target":"target.com","weight":50}]}}'} headers: Cache-Control: [private] Content-Length: ['409'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:41 GMT'] - ETag: [89c8cb7a-8185-4001-89d3-dbd906db28b2] + Date: ['Thu, 16 Feb 2017 22:38:20 GMT'] + ETag: [dc74cba5-3626-40c6-815b-a6321e6439a7] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 201, message: Created} - request: - body: '{"name": "myrstxt", "type": "TXT", "properties": {"TTL": 3600}}' + body: '{"properties": {"TTL": 3600}, "type": "txt", "name": "myrstxt"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -1119,23 +1118,23 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [bcd7f718-f482-11e6-8e82-a0b3ccf7272a] + x-ms-client-request-id: [9f1113dc-f498-11e6-bc97-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/TXT/myrstxt?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxt","name":"myrstxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"db03f812-fad8-46f0-bae2-b0063b65fb2a","properties":{"fqdn":"myrstxt.myzone.com.","TTL":3600,"TXTRecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxt","name":"myrstxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"a396d329-6448-45c4-a629-ecbd7cfeef12","properties":{"fqdn":"myrstxt.myzone.com.","TTL":3600,"TXTRecords":[]}}'} headers: Cache-Control: [private] Content-Length: ['340'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:43 GMT'] - ETag: [db03f812-fad8-46f0-bae2-b0063b65fb2a] + Date: ['Thu, 16 Feb 2017 22:38:23 GMT'] + ETag: [a396d329-6448-45c4-a629-ecbd7cfeef12] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11997'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 201, message: Created} - request: body: null @@ -1147,16 +1146,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [bd85f786-f482-11e6-94be-a0b3ccf7272a] + x-ms-client-request-id: [a090ae06-f498-11e6-952f-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/TXT/myrstxt?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxt","name":"myrstxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"db03f812-fad8-46f0-bae2-b0063b65fb2a","properties":{"fqdn":"myrstxt.myzone.com.","TTL":3600,"TXTRecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxt","name":"myrstxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"a396d329-6448-45c4-a629-ecbd7cfeef12","properties":{"fqdn":"myrstxt.myzone.com.","TTL":3600,"TXTRecords":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:44 GMT'] - ETag: [db03f812-fad8-46f0-bae2-b0063b65fb2a] + Date: ['Thu, 16 Feb 2017 22:38:24 GMT'] + ETag: [a396d329-6448-45c4-a629-ecbd7cfeef12] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1165,12 +1164,12 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['340'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11997'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: - body: '{"etag": "db03f812-fad8-46f0-bae2-b0063b65fb2a", "name": "myrstxt", "type": - "Microsoft.Network/dnszones/TXT", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/TXT/myrstxt", - "properties": {"TTL": 3600, "TXTRecords": [{"value": ["some_text"]}]}}' + body: '{"properties": {"TTL": 3600, "TXTRecords": [{"value": ["some_text"]}]}, + "type": "Microsoft.Network/dnszones/TXT", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/TXT/myrstxt", + "etag": "a396d329-6448-45c4-a629-ecbd7cfeef12", "name": "myrstxt"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -1180,16 +1179,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [bdc49522-f482-11e6-b800-a0b3ccf7272a] + x-ms-client-request-id: [a0dd20ec-f498-11e6-9805-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/TXT/myrstxt?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxt","name":"myrstxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"13d16c46-68f3-4f5f-8f55-de9a2d5ea7b7","properties":{"fqdn":"myrstxt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["some_text"]}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxt","name":"myrstxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"fd71221b-1134-4a6b-877f-b6b0b0c12f4c","properties":{"fqdn":"myrstxt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["some_text"]}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:45 GMT'] - ETag: [13d16c46-68f3-4f5f-8f55-de9a2d5ea7b7] + Date: ['Thu, 16 Feb 2017 22:38:25 GMT'] + ETag: [fd71221b-1134-4a6b-877f-b6b0b0c12f4c] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1198,7 +1197,7 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['363'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: body: null @@ -1210,7 +1209,7 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [be7873f4-f482-11e6-961f-a0b3ccf7272a] + x-ms-client-request-id: [a1b26f80-f498-11e6-8301-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/TXT/myrstxtalt?api-version=2016-04-01 response: @@ -1220,17 +1219,17 @@ interactions: Cache-Control: [private] Content-Length: ['174'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:46 GMT'] + Date: ['Thu, 16 Feb 2017 22:38:26 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 404, message: Not Found} - request: - body: '{"name": "myrstxtalt", "type": "txt", "properties": {"TTL": 3600, "TXTRecords": - [{"value": ["some_text"]}]}}' + body: '{"properties": {"TTL": 3600, "TXTRecords": [{"value": ["some_text"]}]}, + "type": "txt", "name": "myrstxtalt"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -1240,17 +1239,17 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [beb73226-f482-11e6-b89d-a0b3ccf7272a] + x-ms-client-request-id: [a1f31066-f498-11e6-a37d-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/TXT/myrstxtalt?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxtalt","name":"myrstxtalt","type":"Microsoft.Network\/dnszones\/TXT","etag":"65de52a1-1242-4d86-81fd-10e1bafe5b45","properties":{"fqdn":"myrstxtalt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["some_text"]}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxtalt","name":"myrstxtalt","type":"Microsoft.Network\/dnszones\/TXT","etag":"b748c7bc-384a-48d0-a23a-cbc63a5cd148","properties":{"fqdn":"myrstxtalt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["some_text"]}]}}'} headers: Cache-Control: [private] Content-Length: ['372'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:46 GMT'] - ETag: [65de52a1-1242-4d86-81fd-10e1bafe5b45] + Date: ['Thu, 16 Feb 2017 22:38:27 GMT'] + ETag: [b748c7bc-384a-48d0-a23a-cbc63a5cd148] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] @@ -1268,16 +1267,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [bf7e19ac-f482-11e6-ac0f-a0b3ccf7272a] + x-ms-client-request-id: [a2ca8148-f498-11e6-8379-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"17019ad8-4c28-4107-92e0-fcfbd198a66b","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.10"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"48ca7c67-4f9c-4e81-8574-57271cbc8fe6","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.10"}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:47 GMT'] - ETag: [17019ad8-4c28-4107-92e0-fcfbd198a66b] + Date: ['Thu, 16 Feb 2017 22:38:28 GMT'] + ETag: [48ca7c67-4f9c-4e81-8574-57271cbc8fe6] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1286,13 +1285,12 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['355'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] status: {code: 200, message: OK} - request: - body: '{"etag": "17019ad8-4c28-4107-92e0-fcfbd198a66b", "name": "myrsa", "type": - "Microsoft.Network/dnszones/A", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa", - "properties": {"ARecords": [{"ipv4Address": "10.0.0.10"}, {"ipv4Address": "10.0.0.11"}], - "TTL": 3600}}' + body: '{"properties": {"ARecords": [{"ipv4Address": "10.0.0.10"}, {"ipv4Address": + "10.0.0.11"}], "TTL": 3600}, "type": "Microsoft.Network/dnszones/A", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa", + "etag": "48ca7c67-4f9c-4e81-8574-57271cbc8fe6", "name": "myrsa"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -1302,16 +1300,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [bfbb0798-f482-11e6-8ac9-a0b3ccf7272a] + x-ms-client-request-id: [a30e4362-f498-11e6-b778-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"829ef375-c9da-43f6-9624-5c6981c715c8","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.10"},{"ipv4Address":"10.0.0.11"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"8b5467df-7ef5-4572-93d7-f70fbed78754","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.10"},{"ipv4Address":"10.0.0.11"}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:48 GMT'] - ETag: [829ef375-c9da-43f6-9624-5c6981c715c8] + Date: ['Thu, 16 Feb 2017 22:38:28 GMT'] + ETag: [8b5467df-7ef5-4572-93d7-f70fbed78754] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1320,7 +1318,7 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['383'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11997'] status: {code: 200, message: OK} - request: body: null @@ -1332,16 +1330,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c08dad66-f482-11e6-8193-a0b3ccf7272a] + x-ms-client-request-id: [a3ee47ec-f498-11e6-be8e-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/SOA/@?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SOA\/@","name":"@","type":"Microsoft.Network\/dnszones\/SOA","etag":"60f0a9ca-05e9-4d2c-91e6-68a9556d4e2f","properties":{"fqdn":"myzone.com.","TTL":3600,"SOARecord":{"email":"azuredns-hostmaster.microsoft.com","expireTime":2419200,"host":"ns1-01.azure-dns.com.","minimumTTL":300,"refreshTime":3600,"retryTime":300,"serialNumber":1}}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SOA\/@","name":"@","type":"Microsoft.Network\/dnszones\/SOA","etag":"6dfda12b-ea56-4b83-bd52-1737b5490ed3","properties":{"fqdn":"myzone.com.","TTL":3600,"SOARecord":{"email":"azuredns-hostmaster.microsoft.com","expireTime":2419200,"host":"ns1-04.azure-dns.com.","minimumTTL":300,"refreshTime":3600,"retryTime":300,"serialNumber":1}}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:49 GMT'] - ETag: [60f0a9ca-05e9-4d2c-91e6-68a9556d4e2f] + Date: ['Thu, 16 Feb 2017 22:38:29 GMT'] + ETag: [6dfda12b-ea56-4b83-bd52-1737b5490ed3] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1361,16 +1359,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c0cf8934-f482-11e6-a669-a0b3ccf7272a] + x-ms-client-request-id: [a41927cc-f498-11e6-8fb9-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/SOA/@?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SOA\/@","name":"@","type":"Microsoft.Network\/dnszones\/SOA","etag":"60f0a9ca-05e9-4d2c-91e6-68a9556d4e2f","properties":{"fqdn":"myzone.com.","TTL":3600,"SOARecord":{"email":"azuredns-hostmaster.microsoft.com","expireTime":2419200,"host":"ns1-01.azure-dns.com.","minimumTTL":300,"refreshTime":3600,"retryTime":300,"serialNumber":1}}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SOA\/@","name":"@","type":"Microsoft.Network\/dnszones\/SOA","etag":"6dfda12b-ea56-4b83-bd52-1737b5490ed3","properties":{"fqdn":"myzone.com.","TTL":3600,"SOARecord":{"email":"azuredns-hostmaster.microsoft.com","expireTime":2419200,"host":"ns1-04.azure-dns.com.","minimumTTL":300,"refreshTime":3600,"retryTime":300,"serialNumber":1}}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:50 GMT'] - ETag: [60f0a9ca-05e9-4d2c-91e6-68a9556d4e2f] + Date: ['Thu, 16 Feb 2017 22:38:30 GMT'] + ETag: [6dfda12b-ea56-4b83-bd52-1737b5490ed3] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1381,11 +1379,10 @@ interactions: content-length: ['483'] status: {code: 200, message: OK} - request: - body: '{"etag": "60f0a9ca-05e9-4d2c-91e6-68a9556d4e2f", "name": "@", "type": "Microsoft.Network/dnszones/SOA", - "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/SOA/@", - "properties": {"TTL": 3600, "SOARecord": {"host": "ns1-01.azure-dns.com.", "minimumTTL": - 20, "serialNumber": 123, "refreshTime": 60, "retryTime": 90, "expireTime": 30, - "email": "foo.com"}}}' + body: '{"properties": {"SOARecord": {"expireTime": 30, "refreshTime": 60, "minimumTTL": + 20, "host": "ns1-04.azure-dns.com.", "retryTime": 90, "serialNumber": 123, "email": + "foo.com"}, "TTL": 3600}, "type": "Microsoft.Network/dnszones/SOA", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/SOA/@", + "etag": "6dfda12b-ea56-4b83-bd52-1737b5490ed3", "name": "@"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -1395,16 +1392,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c0f7f09e-f482-11e6-b326-a0b3ccf7272a] + x-ms-client-request-id: [a44610a4-f498-11e6-899b-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/SOA/@?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SOA\/@","name":"@","type":"Microsoft.Network\/dnszones\/SOA","etag":"32bfcc94-4e2d-498b-a3b6-7065bfcd846f","properties":{"fqdn":"myzone.com.","TTL":3600,"SOARecord":{"email":"foo.com","expireTime":30,"host":"ns1-01.azure-dns.com.","minimumTTL":20,"refreshTime":60,"retryTime":90,"serialNumber":123}}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SOA\/@","name":"@","type":"Microsoft.Network\/dnszones\/SOA","etag":"fb5a847a-980f-4d86-89aa-6234791b3416","properties":{"fqdn":"myzone.com.","TTL":3600,"SOARecord":{"email":"foo.com","expireTime":30,"host":"ns1-04.azure-dns.com.","minimumTTL":20,"refreshTime":60,"retryTime":90,"serialNumber":123}}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:50 GMT'] - ETag: [32bfcc94-4e2d-498b-a3b6-7065bfcd846f] + Date: ['Thu, 16 Feb 2017 22:38:31 GMT'] + ETag: [fb5a847a-980f-4d86-89aa-6234791b3416] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1413,7 +1410,7 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['450'] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -1425,7 +1422,7 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c18e1f22-f482-11e6-b57c-a0b3ccf7272a] + x-ms-client-request-id: [a4e9439c-f498-11e6-8a1e-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/TXT/longtxt?api-version=2016-04-01 response: @@ -1435,18 +1432,18 @@ interactions: Cache-Control: [private] Content-Length: ['171'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:51 GMT'] + Date: ['Thu, 16 Feb 2017 22:38:32 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11997'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 404, message: Not Found} - request: - body: '{"name": "longtxt", "type": "txt", "properties": {"TTL": 3600, "TXTRecords": - [{"value": ["012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234", - "56789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"]}]}}' + body: '{"properties": {"TTL": 3600, "TXTRecords": [{"value": ["012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234", + "56789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"]}]}, + "type": "txt", "name": "longtxt"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -1456,23 +1453,23 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c1cbbcfa-f482-11e6-a0e5-a0b3ccf7272a] + x-ms-client-request-id: [a5cace94-f498-11e6-ad58-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/TXT/longtxt?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/longtxt","name":"longtxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"e4d436ad-9883-4875-a86b-a7a7d1196ade","properties":{"fqdn":"longtxt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234","56789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"]}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/longtxt","name":"longtxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"1e4c14a0-626f-440a-8913-46ebe815a22e","properties":{"fqdn":"longtxt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234","56789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"]}]}}'} headers: Cache-Control: [private] Content-Length: ['857'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:51 GMT'] - ETag: [e4d436ad-9883-4875-a86b-a7a7d1196ade] + Date: ['Thu, 16 Feb 2017 22:38:33 GMT'] + ETag: [1e4c14a0-626f-440a-8913-46ebe815a22e] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11997'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 201, message: Created} - request: body: null @@ -1484,16 +1481,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c28da0f8-f482-11e6-9b10-a0b3ccf7272a] + x-ms-client-request-id: [a6a7df98-f498-11e6-b273-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com","name":"myzone.com","type":"Microsoft.Network\/dnszones","etag":"00000002-0000-0000-f415-d5678f88d201","location":"global","tags":{},"properties":{"maxNumberOfRecordSets":5000,"nameServers":["ns1-01.azure-dns.com.","ns2-01.azure-dns.net.","ns3-01.azure-dns.org.","ns4-01.azure-dns.info."],"numberOfRecordSets":19}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com","name":"myzone.com","type":"Microsoft.Network\/dnszones","etag":"00000002-0000-0000-364a-ed42a588d201","location":"global","tags":{},"properties":{"maxNumberOfRecordSets":5000,"nameServers":["ns1-04.azure-dns.com.","ns2-04.azure-dns.net.","ns3-04.azure-dns.org.","ns4-04.azure-dns.info."],"numberOfRecordSets":19}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:52 GMT'] - ETag: [00000002-0000-0000-f415-d5678f88d201] + Date: ['Thu, 16 Feb 2017 22:38:34 GMT'] + ETag: [00000002-0000-0000-364a-ed42a588d201] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1514,16 +1511,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c31d8646-f482-11e6-a950-a0b3ccf7272a] + x-ms-client-request-id: [a731825e-f498-11e6-97fa-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"829ef375-c9da-43f6-9624-5c6981c715c8","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.10"},{"ipv4Address":"10.0.0.11"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"8b5467df-7ef5-4572-93d7-f70fbed78754","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.10"},{"ipv4Address":"10.0.0.11"}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:53 GMT'] - ETag: [829ef375-c9da-43f6-9624-5c6981c715c8] + Date: ['Thu, 16 Feb 2017 22:38:35 GMT'] + ETag: [8b5467df-7ef5-4572-93d7-f70fbed78754] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1544,15 +1541,15 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c3abe874-f482-11e6-ba7f-a0b3ccf7272a] + x-ms-client-request-id: [a7b93e82-f498-11e6-9be7-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/recordsets?api-version=2016-04-01 response: - body: {string: '{"value":[{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/@","name":"@","type":"Microsoft.Network\/dnszones\/NS","etag":"c9f3a482-362c-4282-825c-7a9c08312e89","properties":{"fqdn":"myzone.com.","TTL":172800,"NSRecords":[{"nsdname":"ns1-01.azure-dns.com."},{"nsdname":"ns2-01.azure-dns.net."},{"nsdname":"ns3-01.azure-dns.org."},{"nsdname":"ns4-01.azure-dns.info."}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SOA\/@","name":"@","type":"Microsoft.Network\/dnszones\/SOA","etag":"32bfcc94-4e2d-498b-a3b6-7065bfcd846f","properties":{"fqdn":"myzone.com.","TTL":3600,"SOARecord":{"email":"foo.com","expireTime":30,"host":"ns1-01.azure-dns.com.","minimumTTL":20,"refreshTime":60,"retryTime":90,"serialNumber":123}}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/longtxt","name":"longtxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"e4d436ad-9883-4875-a86b-a7a7d1196ade","properties":{"fqdn":"longtxt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234","56789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"]}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"829ef375-c9da-43f6-9624-5c6981c715c8","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.10"},{"ipv4Address":"10.0.0.11"}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/AAAA\/myrsaaaa","name":"myrsaaaa","type":"Microsoft.Network\/dnszones\/AAAA","etag":"29b84cf4-54ac-45f4-9992-d600337209f2","properties":{"fqdn":"myrsaaaa.myzone.com.","TTL":3600,"AAAARecords":[{"ipv6Address":"2001:db8:0:1:1:1:1:1"}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/AAAA\/myrsaaaaalt","name":"myrsaaaaalt","type":"Microsoft.Network\/dnszones\/AAAA","etag":"c85fa146-81a7-4393-8df2-fd6e42c84c8c","properties":{"fqdn":"myrsaaaaalt.myzone.com.","TTL":3600,"AAAARecords":[{"ipv6Address":"2001:db8:0:1:1:1:1:1"}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsaalt","name":"myrsaalt","type":"Microsoft.Network\/dnszones\/A","etag":"67bbf38b-68d0-4d61-a9fb-461bf157cf3e","properties":{"fqdn":"myrsaalt.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.10"}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/CNAME\/myrscname","name":"myrscname","type":"Microsoft.Network\/dnszones\/CNAME","etag":"bca95fc8-060b-45f5-abe4-5d12ecd2856e","properties":{"fqdn":"myrscname.myzone.com.","TTL":3600,"CNAMERecord":{"cname":"mycname"}}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/CNAME\/myrscnamealt","name":"myrscnamealt","type":"Microsoft.Network\/dnszones\/CNAME","etag":"9af59adb-5b8b-40e5-ae0d-5fde6f2aec12","properties":{"fqdn":"myrscnamealt.myzone.com.","TTL":3600,"CNAMERecord":{"cname":"mycname"}}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/MX\/myrsmx","name":"myrsmx","type":"Microsoft.Network\/dnszones\/MX","etag":"ab979abd-f398-463f-92cd-0da2b2b40918","properties":{"fqdn":"myrsmx.myzone.com.","TTL":3600,"MXRecords":[{"exchange":"12","preference":13}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/MX\/myrsmxalt","name":"myrsmxalt","type":"Microsoft.Network\/dnszones\/MX","etag":"5ef72ec1-f2df-46db-a7dd-bddf50ac955d","properties":{"fqdn":"myrsmxalt.myzone.com.","TTL":3600,"MXRecords":[{"exchange":"12","preference":13}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/myrsns","name":"myrsns","type":"Microsoft.Network\/dnszones\/NS","etag":"5f236f16-7ae4-4c76-b037-57a97a8eb1d3","properties":{"fqdn":"myrsns.myzone.com.","TTL":3600,"NSRecords":[{"nsdname":"foobar.com"}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/myrsnsalt","name":"myrsnsalt","type":"Microsoft.Network\/dnszones\/NS","etag":"2189e7b7-8113-4f8c-be41-bdbc8f834484","properties":{"fqdn":"myrsnsalt.myzone.com.","TTL":3600,"NSRecords":[{"nsdname":"foobar.com"}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/PTR\/myrsptr","name":"myrsptr","type":"Microsoft.Network\/dnszones\/PTR","etag":"dbf1445b-687a-46d9-b690-508dcc67cf92","properties":{"fqdn":"myrsptr.myzone.com.","TTL":3600,"PTRRecords":[{"ptrdname":"foobar.com"}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/PTR\/myrsptralt","name":"myrsptralt","type":"Microsoft.Network\/dnszones\/PTR","etag":"1ef193c3-848e-4167-aba1-adac705382f3","properties":{"fqdn":"myrsptralt.myzone.com.","TTL":3600,"PTRRecords":[{"ptrdname":"foobar.com"}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SRV\/myrssrv","name":"myrssrv","type":"Microsoft.Network\/dnszones\/SRV","etag":"d068d744-dbdc-4367-b9c5-2c59f76d3a0e","properties":{"fqdn":"myrssrv.myzone.com.","TTL":3600,"SRVRecords":[{"port":1234,"priority":1,"target":"target.com","weight":50}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SRV\/myrssrvalt","name":"myrssrvalt","type":"Microsoft.Network\/dnszones\/SRV","etag":"89c8cb7a-8185-4001-89d3-dbd906db28b2","properties":{"fqdn":"myrssrvalt.myzone.com.","TTL":3600,"SRVRecords":[{"port":1234,"priority":1,"target":"target.com","weight":50}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxt","name":"myrstxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"13d16c46-68f3-4f5f-8f55-de9a2d5ea7b7","properties":{"fqdn":"myrstxt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["some_text"]}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxtalt","name":"myrstxtalt","type":"Microsoft.Network\/dnszones\/TXT","etag":"65de52a1-1242-4d86-81fd-10e1bafe5b45","properties":{"fqdn":"myrstxtalt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["some_text"]}]}}]}'} + body: {string: '{"value":[{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/@","name":"@","type":"Microsoft.Network\/dnszones\/NS","etag":"457f44cd-0da1-4b56-94da-01fe1211ec7b","properties":{"fqdn":"myzone.com.","TTL":172800,"NSRecords":[{"nsdname":"ns1-04.azure-dns.com."},{"nsdname":"ns2-04.azure-dns.net."},{"nsdname":"ns3-04.azure-dns.org."},{"nsdname":"ns4-04.azure-dns.info."}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SOA\/@","name":"@","type":"Microsoft.Network\/dnszones\/SOA","etag":"fb5a847a-980f-4d86-89aa-6234791b3416","properties":{"fqdn":"myzone.com.","TTL":3600,"SOARecord":{"email":"foo.com","expireTime":30,"host":"ns1-04.azure-dns.com.","minimumTTL":20,"refreshTime":60,"retryTime":90,"serialNumber":123}}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/longtxt","name":"longtxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"1e4c14a0-626f-440a-8913-46ebe815a22e","properties":{"fqdn":"longtxt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234","56789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"]}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"8b5467df-7ef5-4572-93d7-f70fbed78754","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.10"},{"ipv4Address":"10.0.0.11"}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/AAAA\/myrsaaaa","name":"myrsaaaa","type":"Microsoft.Network\/dnszones\/AAAA","etag":"188f3b1d-e078-489d-8be5-f086455251d6","properties":{"fqdn":"myrsaaaa.myzone.com.","TTL":3600,"AAAARecords":[{"ipv6Address":"2001:db8:0:1:1:1:1:1"}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/AAAA\/myrsaaaaalt","name":"myrsaaaaalt","type":"Microsoft.Network\/dnszones\/AAAA","etag":"bb4af783-4e50-4789-a221-6d9720fb7906","properties":{"fqdn":"myrsaaaaalt.myzone.com.","TTL":3600,"AAAARecords":[{"ipv6Address":"2001:db8:0:1:1:1:1:1"}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsaalt","name":"myrsaalt","type":"Microsoft.Network\/dnszones\/A","etag":"7b98d8ff-b2ec-4bf8-a55a-95474ed026f9","properties":{"fqdn":"myrsaalt.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.10"}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/CNAME\/myrscname","name":"myrscname","type":"Microsoft.Network\/dnszones\/CNAME","etag":"d3ca537b-0e21-42fd-9aeb-5e6f69437c3d","properties":{"fqdn":"myrscname.myzone.com.","TTL":3600,"CNAMERecord":{"cname":"mycname"}}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/CNAME\/myrscnamealt","name":"myrscnamealt","type":"Microsoft.Network\/dnszones\/CNAME","etag":"22477145-0695-49fd-bedf-5e7c814fe6e4","properties":{"fqdn":"myrscnamealt.myzone.com.","TTL":3600,"CNAMERecord":{"cname":"mycname"}}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/MX\/myrsmx","name":"myrsmx","type":"Microsoft.Network\/dnszones\/MX","etag":"c7a5da5c-a17a-4759-8fc6-bc182a17a254","properties":{"fqdn":"myrsmx.myzone.com.","TTL":3600,"MXRecords":[{"exchange":"12","preference":13}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/MX\/myrsmxalt","name":"myrsmxalt","type":"Microsoft.Network\/dnszones\/MX","etag":"abb6c9dd-42c5-41d5-9d90-402b85100832","properties":{"fqdn":"myrsmxalt.myzone.com.","TTL":3600,"MXRecords":[{"exchange":"12","preference":13}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/myrsns","name":"myrsns","type":"Microsoft.Network\/dnszones\/NS","etag":"e1774943-72fa-4c2d-b8a2-c381216df40f","properties":{"fqdn":"myrsns.myzone.com.","TTL":3600,"NSRecords":[{"nsdname":"foobar.com"}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/myrsnsalt","name":"myrsnsalt","type":"Microsoft.Network\/dnszones\/NS","etag":"b170e487-a2a6-4172-961a-604139a6f7e7","properties":{"fqdn":"myrsnsalt.myzone.com.","TTL":3600,"NSRecords":[{"nsdname":"foobar.com"}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/PTR\/myrsptr","name":"myrsptr","type":"Microsoft.Network\/dnszones\/PTR","etag":"05f53f84-a98d-416c-b1d8-a06865ab0068","properties":{"fqdn":"myrsptr.myzone.com.","TTL":3600,"PTRRecords":[{"ptrdname":"foobar.com"}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/PTR\/myrsptralt","name":"myrsptralt","type":"Microsoft.Network\/dnszones\/PTR","etag":"b0e6755b-bada-4396-a94f-e58a3c404f58","properties":{"fqdn":"myrsptralt.myzone.com.","TTL":3600,"PTRRecords":[{"ptrdname":"foobar.com"}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SRV\/myrssrv","name":"myrssrv","type":"Microsoft.Network\/dnszones\/SRV","etag":"e2760f4e-601c-4aad-a2ad-815bd4b75b8b","properties":{"fqdn":"myrssrv.myzone.com.","TTL":3600,"SRVRecords":[{"port":1234,"priority":1,"target":"target.com","weight":50}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SRV\/myrssrvalt","name":"myrssrvalt","type":"Microsoft.Network\/dnszones\/SRV","etag":"dc74cba5-3626-40c6-815b-a6321e6439a7","properties":{"fqdn":"myrssrvalt.myzone.com.","TTL":3600,"SRVRecords":[{"port":1234,"priority":1,"target":"target.com","weight":50}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxt","name":"myrstxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"fd71221b-1134-4a6b-877f-b6b0b0c12f4c","properties":{"fqdn":"myrstxt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["some_text"]}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxtalt","name":"myrstxtalt","type":"Microsoft.Network\/dnszones\/TXT","etag":"b748c7bc-384a-48d0-a23a-cbc63a5cd148","properties":{"fqdn":"myrstxtalt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["some_text"]}]}}]}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:54 GMT'] + Date: ['Thu, 16 Feb 2017 22:38:36 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1572,15 +1569,15 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c4481d3e-f482-11e6-b6c5-a0b3ccf7272a] + x-ms-client-request-id: [a852d2b4-f498-11e6-af46-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/TXT?api-version=2016-04-01 response: - body: {string: '{"value":[{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/longtxt","name":"longtxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"e4d436ad-9883-4875-a86b-a7a7d1196ade","properties":{"fqdn":"longtxt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234","56789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"]}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxt","name":"myrstxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"13d16c46-68f3-4f5f-8f55-de9a2d5ea7b7","properties":{"fqdn":"myrstxt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["some_text"]}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxtalt","name":"myrstxtalt","type":"Microsoft.Network\/dnszones\/TXT","etag":"65de52a1-1242-4d86-81fd-10e1bafe5b45","properties":{"fqdn":"myrstxtalt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["some_text"]}]}}]}'} + body: {string: '{"value":[{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/longtxt","name":"longtxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"1e4c14a0-626f-440a-8913-46ebe815a22e","properties":{"fqdn":"longtxt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234","56789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"]}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxt","name":"myrstxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"fd71221b-1134-4a6b-877f-b6b0b0c12f4c","properties":{"fqdn":"myrstxt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["some_text"]}]}},{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxtalt","name":"myrstxtalt","type":"Microsoft.Network\/dnszones\/TXT","etag":"b748c7bc-384a-48d0-a23a-cbc63a5cd148","properties":{"fqdn":"myrstxtalt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["some_text"]}]}}]}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:55 GMT'] + Date: ['Thu, 16 Feb 2017 22:38:37 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1589,7 +1586,7 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['1606'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] status: {code: 200, message: OK} - request: body: null @@ -1601,16 +1598,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c4cc1164-f482-11e6-a210-a0b3ccf7272a] + x-ms-client-request-id: [a8d6de0a-f498-11e6-8ba6-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"829ef375-c9da-43f6-9624-5c6981c715c8","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.10"},{"ipv4Address":"10.0.0.11"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"8b5467df-7ef5-4572-93d7-f70fbed78754","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.10"},{"ipv4Address":"10.0.0.11"}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:56 GMT'] - ETag: [829ef375-c9da-43f6-9624-5c6981c715c8] + Date: ['Thu, 16 Feb 2017 22:38:39 GMT'] + ETag: [8b5467df-7ef5-4572-93d7-f70fbed78754] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1619,12 +1616,12 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['383'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: - body: '{"etag": "829ef375-c9da-43f6-9624-5c6981c715c8", "name": "myrsa", "type": - "Microsoft.Network/dnszones/A", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa", - "properties": {"ARecords": [{"ipv4Address": "10.0.0.11"}], "TTL": 3600}}' + body: '{"properties": {"ARecords": [{"ipv4Address": "10.0.0.11"}], "TTL": 3600}, + "type": "Microsoft.Network/dnszones/A", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa", + "etag": "8b5467df-7ef5-4572-93d7-f70fbed78754", "name": "myrsa"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -1634,16 +1631,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c4f32fa2-f482-11e6-afef-a0b3ccf7272a] + x-ms-client-request-id: [a91ff054-f498-11e6-8a71-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"916e1019-722a-4541-a2a3-b375a1028afd","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.11"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"bad3346f-63a8-41d9-a4b3-b241bd0ba609","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.11"}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:56 GMT'] - ETag: [916e1019-722a-4541-a2a3-b375a1028afd] + Date: ['Thu, 16 Feb 2017 22:38:38 GMT'] + ETag: [bad3346f-63a8-41d9-a4b3-b241bd0ba609] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1664,16 +1661,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c58b0940-f482-11e6-9416-a0b3ccf7272a] + x-ms-client-request-id: [a9c22282-f498-11e6-8957-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/AAAA/myrsaaaa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/AAAA\/myrsaaaa","name":"myrsaaaa","type":"Microsoft.Network\/dnszones\/AAAA","etag":"29b84cf4-54ac-45f4-9992-d600337209f2","properties":{"fqdn":"myrsaaaa.myzone.com.","TTL":3600,"AAAARecords":[{"ipv6Address":"2001:db8:0:1:1:1:1:1"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/AAAA\/myrsaaaa","name":"myrsaaaa","type":"Microsoft.Network\/dnszones\/AAAA","etag":"188f3b1d-e078-489d-8be5-f086455251d6","properties":{"fqdn":"myrsaaaa.myzone.com.","TTL":3600,"AAAARecords":[{"ipv6Address":"2001:db8:0:1:1:1:1:1"}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:57 GMT'] - ETag: [29b84cf4-54ac-45f4-9992-d600337209f2] + Date: ['Thu, 16 Feb 2017 22:38:39 GMT'] + ETag: [188f3b1d-e078-489d-8be5-f086455251d6] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1682,12 +1679,12 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['384'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: - body: '{"etag": "29b84cf4-54ac-45f4-9992-d600337209f2", "name": "myrsaaaa", "type": - "Microsoft.Network/dnszones/AAAA", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/AAAA/myrsaaaa", - "properties": {"AAAARecords": [], "TTL": 3600}}' + body: '{"properties": {"TTL": 3600, "AAAARecords": []}, "type": "Microsoft.Network/dnszones/AAAA", + "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/AAAA/myrsaaaa", + "etag": "188f3b1d-e078-489d-8be5-f086455251d6", "name": "myrsaaaa"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -1697,16 +1694,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c5d0bc4a-f482-11e6-ba69-a0b3ccf7272a] + x-ms-client-request-id: [aa09bf6e-f498-11e6-96df-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/AAAA/myrsaaaa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/AAAA\/myrsaaaa","name":"myrsaaaa","type":"Microsoft.Network\/dnszones\/AAAA","etag":"391195d6-68e3-4f4c-89c5-189649c05c24","properties":{"fqdn":"myrsaaaa.myzone.com.","TTL":3600,"AAAARecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/AAAA\/myrsaaaa","name":"myrsaaaa","type":"Microsoft.Network\/dnszones\/AAAA","etag":"fb8e0b40-dca8-48d3-ae11-93a0a976be8e","properties":{"fqdn":"myrsaaaa.myzone.com.","TTL":3600,"AAAARecords":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:58 GMT'] - ETag: [391195d6-68e3-4f4c-89c5-189649c05c24] + Date: ['Thu, 16 Feb 2017 22:38:40 GMT'] + ETag: [fb8e0b40-dca8-48d3-ae11-93a0a976be8e] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1715,7 +1712,7 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['346'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: body: null @@ -1727,16 +1724,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c684b40a-f482-11e6-9263-a0b3ccf7272a] + x-ms-client-request-id: [aac7b2a2-f498-11e6-b0a7-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/CNAME/myrscname?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/CNAME\/myrscname","name":"myrscname","type":"Microsoft.Network\/dnszones\/CNAME","etag":"bca95fc8-060b-45f5-abe4-5d12ecd2856e","properties":{"fqdn":"myrscname.myzone.com.","TTL":3600,"CNAMERecord":{"cname":"mycname"}}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/CNAME\/myrscname","name":"myrscname","type":"Microsoft.Network\/dnszones\/CNAME","etag":"d3ca537b-0e21-42fd-9aeb-5e6f69437c3d","properties":{"fqdn":"myrscname.myzone.com.","TTL":3600,"CNAMERecord":{"cname":"mycname"}}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:59 GMT'] - ETag: [bca95fc8-060b-45f5-abe4-5d12ecd2856e] + Date: ['Thu, 16 Feb 2017 22:38:41 GMT'] + ETag: [d3ca537b-0e21-42fd-9aeb-5e6f69437c3d] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1748,9 +1745,9 @@ interactions: x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] status: {code: 200, message: OK} - request: - body: '{"etag": "bca95fc8-060b-45f5-abe4-5d12ecd2856e", "name": "myrscname", "type": - "Microsoft.Network/dnszones/CNAME", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/CNAME/myrscname", - "properties": {"TTL": 3600}}' + body: '{"properties": {"TTL": 3600}, "type": "Microsoft.Network/dnszones/CNAME", + "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/CNAME/myrscname", + "etag": "d3ca537b-0e21-42fd-9aeb-5e6f69437c3d", "name": "myrscname"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -1760,16 +1757,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c6a531e2-f482-11e6-839e-a0b3ccf7272a] + x-ms-client-request-id: [aaeebd7a-f498-11e6-94d1-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/CNAME/myrscname?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/CNAME\/myrscname","name":"myrscname","type":"Microsoft.Network\/dnszones\/CNAME","etag":"f21de5fb-1760-49c0-9fd0-9006ca15b9e4","properties":{"fqdn":"myrscname.myzone.com.","TTL":3600}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/CNAME\/myrscname","name":"myrscname","type":"Microsoft.Network\/dnszones\/CNAME","etag":"c1ee49dd-f0d8-4908-8ac6-9ae637127e25","properties":{"fqdn":"myrscname.myzone.com.","TTL":3600}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:01:59 GMT'] - ETag: [f21de5fb-1760-49c0-9fd0-9006ca15b9e4] + Date: ['Thu, 16 Feb 2017 22:38:42 GMT'] + ETag: [c1ee49dd-f0d8-4908-8ac6-9ae637127e25] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1778,7 +1775,7 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['334'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: body: null @@ -1790,16 +1787,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c754d706-f482-11e6-bef1-a0b3ccf7272a] + x-ms-client-request-id: [abba4674-f498-11e6-9fce-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/MX/myrsmx?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/MX\/myrsmx","name":"myrsmx","type":"Microsoft.Network\/dnszones\/MX","etag":"ab979abd-f398-463f-92cd-0da2b2b40918","properties":{"fqdn":"myrsmx.myzone.com.","TTL":3600,"MXRecords":[{"exchange":"12","preference":13}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/MX\/myrsmx","name":"myrsmx","type":"Microsoft.Network\/dnszones\/MX","etag":"c7a5da5c-a17a-4759-8fc6-bc182a17a254","properties":{"fqdn":"myrsmx.myzone.com.","TTL":3600,"MXRecords":[{"exchange":"12","preference":13}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:02:00 GMT'] - ETag: [ab979abd-f398-463f-92cd-0da2b2b40918] + Date: ['Thu, 16 Feb 2017 22:38:43 GMT'] + ETag: [c7a5da5c-a17a-4759-8fc6-bc182a17a254] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1808,12 +1805,12 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['367'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: - body: '{"etag": "ab979abd-f398-463f-92cd-0da2b2b40918", "name": "myrsmx", "type": - "Microsoft.Network/dnszones/MX", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/MX/myrsmx", - "properties": {"TTL": 3600, "MXRecords": []}}' + body: '{"properties": {"TTL": 3600, "MXRecords": []}, "type": "Microsoft.Network/dnszones/MX", + "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/MX/myrsmx", + "etag": "c7a5da5c-a17a-4759-8fc6-bc182a17a254", "name": "myrsmx"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -1823,16 +1820,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c79ed110-f482-11e6-aef4-a0b3ccf7272a] + x-ms-client-request-id: [abe02a5c-f498-11e6-a204-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/MX/myrsmx?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/MX\/myrsmx","name":"myrsmx","type":"Microsoft.Network\/dnszones\/MX","etag":"986608d6-1ea0-4427-8a44-4d1e9e5f7fe5","properties":{"fqdn":"myrsmx.myzone.com.","TTL":3600,"MXRecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/MX\/myrsmx","name":"myrsmx","type":"Microsoft.Network\/dnszones\/MX","etag":"929a2d35-ed5a-472e-9f99-cc57bccc1d5b","properties":{"fqdn":"myrsmx.myzone.com.","TTL":3600,"MXRecords":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:02:01 GMT'] - ETag: [986608d6-1ea0-4427-8a44-4d1e9e5f7fe5] + Date: ['Thu, 16 Feb 2017 22:38:43 GMT'] + ETag: [929a2d35-ed5a-472e-9f99-cc57bccc1d5b] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1841,7 +1838,7 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['334'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11997'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: body: null @@ -1853,16 +1850,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c858314c-f482-11e6-8503-a0b3ccf7272a] + x-ms-client-request-id: [ac91006e-f498-11e6-b854-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/NS/myrsns?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/myrsns","name":"myrsns","type":"Microsoft.Network\/dnszones\/NS","etag":"5f236f16-7ae4-4c76-b037-57a97a8eb1d3","properties":{"fqdn":"myrsns.myzone.com.","TTL":3600,"NSRecords":[{"nsdname":"foobar.com"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/myrsns","name":"myrsns","type":"Microsoft.Network\/dnszones\/NS","etag":"e1774943-72fa-4c2d-b8a2-c381216df40f","properties":{"fqdn":"myrsns.myzone.com.","TTL":3600,"NSRecords":[{"nsdname":"foobar.com"}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:02:01 GMT'] - ETag: [5f236f16-7ae4-4c76-b037-57a97a8eb1d3] + Date: ['Thu, 16 Feb 2017 22:38:45 GMT'] + ETag: [e1774943-72fa-4c2d-b8a2-c381216df40f] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1873,9 +1870,9 @@ interactions: content-length: ['358'] status: {code: 200, message: OK} - request: - body: '{"etag": "5f236f16-7ae4-4c76-b037-57a97a8eb1d3", "name": "myrsns", "type": - "Microsoft.Network/dnszones/NS", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/NS/myrsns", - "properties": {"NSRecords": [], "TTL": 3600}}' + body: '{"properties": {"NSRecords": [], "TTL": 3600}, "type": "Microsoft.Network/dnszones/NS", + "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/NS/myrsns", + "etag": "e1774943-72fa-4c2d-b8a2-c381216df40f", "name": "myrsns"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -1885,16 +1882,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c87f16a2-f482-11e6-878e-a0b3ccf7272a] + x-ms-client-request-id: [acba5c2c-f498-11e6-9ff3-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/NS/myrsns?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/myrsns","name":"myrsns","type":"Microsoft.Network\/dnszones\/NS","etag":"84698dc9-cc45-4249-8cb8-62d5b5ec6392","properties":{"fqdn":"myrsns.myzone.com.","TTL":3600,"NSRecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/NS\/myrsns","name":"myrsns","type":"Microsoft.Network\/dnszones\/NS","etag":"6e36bc0f-8c91-4089-bef6-013019bf1425","properties":{"fqdn":"myrsns.myzone.com.","TTL":3600,"NSRecords":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:02:02 GMT'] - ETag: [84698dc9-cc45-4249-8cb8-62d5b5ec6392] + Date: ['Thu, 16 Feb 2017 22:38:45 GMT'] + ETag: [6e36bc0f-8c91-4089-bef6-013019bf1425] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1903,7 +1900,7 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['334'] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: body: null @@ -1915,16 +1912,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c9224926-f482-11e6-b95b-a0b3ccf7272a] + x-ms-client-request-id: [ad89ae7a-f498-11e6-82bc-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/PTR/myrsptr?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/PTR\/myrsptr","name":"myrsptr","type":"Microsoft.Network\/dnszones\/PTR","etag":"dbf1445b-687a-46d9-b690-508dcc67cf92","properties":{"fqdn":"myrsptr.myzone.com.","TTL":3600,"PTRRecords":[{"ptrdname":"foobar.com"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/PTR\/myrsptr","name":"myrsptr","type":"Microsoft.Network\/dnszones\/PTR","etag":"05f53f84-a98d-416c-b1d8-a06865ab0068","properties":{"fqdn":"myrsptr.myzone.com.","TTL":3600,"PTRRecords":[{"ptrdname":"foobar.com"}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:02:04 GMT'] - ETag: [dbf1445b-687a-46d9-b690-508dcc67cf92] + Date: ['Thu, 16 Feb 2017 22:38:46 GMT'] + ETag: [05f53f84-a98d-416c-b1d8-a06865ab0068] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1936,9 +1933,9 @@ interactions: x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: - body: '{"etag": "dbf1445b-687a-46d9-b690-508dcc67cf92", "name": "myrsptr", "type": - "Microsoft.Network/dnszones/PTR", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/PTR/myrsptr", - "properties": {"TTL": 3600, "PTRRecords": []}}' + body: '{"properties": {"PTRRecords": [], "TTL": 3600}, "type": "Microsoft.Network/dnszones/PTR", + "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/PTR/myrsptr", + "etag": "05f53f84-a98d-416c-b1d8-a06865ab0068", "name": "myrsptr"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -1948,16 +1945,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [c961c080-f482-11e6-a000-a0b3ccf7272a] + x-ms-client-request-id: [add40aba-f498-11e6-b471-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/PTR/myrsptr?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/PTR\/myrsptr","name":"myrsptr","type":"Microsoft.Network\/dnszones\/PTR","etag":"0c407d70-8863-481c-945a-3bea7700117d","properties":{"fqdn":"myrsptr.myzone.com.","TTL":3600,"PTRRecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/PTR\/myrsptr","name":"myrsptr","type":"Microsoft.Network\/dnszones\/PTR","etag":"af69ac14-b26f-4cc2-97b3-4279ef08257a","properties":{"fqdn":"myrsptr.myzone.com.","TTL":3600,"PTRRecords":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:02:04 GMT'] - ETag: [0c407d70-8863-481c-945a-3bea7700117d] + Date: ['Thu, 16 Feb 2017 22:38:47 GMT'] + ETag: [af69ac14-b26f-4cc2-97b3-4279ef08257a] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1978,16 +1975,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ca3fb4a8-f482-11e6-a8f9-a0b3ccf7272a] + x-ms-client-request-id: [ae9de8dc-f498-11e6-ae84-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/SRV/myrssrv?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SRV\/myrssrv","name":"myrssrv","type":"Microsoft.Network\/dnszones\/SRV","etag":"d068d744-dbdc-4367-b9c5-2c59f76d3a0e","properties":{"fqdn":"myrssrv.myzone.com.","TTL":3600,"SRVRecords":[{"port":1234,"priority":1,"target":"target.com","weight":50}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SRV\/myrssrv","name":"myrssrv","type":"Microsoft.Network\/dnszones\/SRV","etag":"e2760f4e-601c-4aad-a2ad-815bd4b75b8b","properties":{"fqdn":"myrssrv.myzone.com.","TTL":3600,"SRVRecords":[{"port":1234,"priority":1,"target":"target.com","weight":50}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:02:05 GMT'] - ETag: [d068d744-dbdc-4367-b9c5-2c59f76d3a0e] + Date: ['Thu, 16 Feb 2017 22:38:47 GMT'] + ETag: [e2760f4e-601c-4aad-a2ad-815bd4b75b8b] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -1996,12 +1993,12 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['400'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: - body: '{"etag": "d068d744-dbdc-4367-b9c5-2c59f76d3a0e", "name": "myrssrv", "type": - "Microsoft.Network/dnszones/SRV", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/SRV/myrssrv", - "properties": {"TTL": 3600, "SRVRecords": []}}' + body: '{"properties": {"TTL": 3600, "SRVRecords": []}, "type": "Microsoft.Network/dnszones/SRV", + "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/SRV/myrssrv", + "etag": "e2760f4e-601c-4aad-a2ad-815bd4b75b8b", "name": "myrssrv"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -2011,16 +2008,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ca771088-f482-11e6-8209-a0b3ccf7272a] + x-ms-client-request-id: [aee63a46-f498-11e6-b582-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/SRV/myrssrv?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SRV\/myrssrv","name":"myrssrv","type":"Microsoft.Network\/dnszones\/SRV","etag":"ce4d8fd5-d1c4-4226-b0b1-1b459860fab5","properties":{"fqdn":"myrssrv.myzone.com.","TTL":3600,"SRVRecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/SRV\/myrssrv","name":"myrssrv","type":"Microsoft.Network\/dnszones\/SRV","etag":"dabaf73c-9c8d-435b-9e34-2ff1fd00b952","properties":{"fqdn":"myrssrv.myzone.com.","TTL":3600,"SRVRecords":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:02:06 GMT'] - ETag: [ce4d8fd5-d1c4-4226-b0b1-1b459860fab5] + Date: ['Thu, 16 Feb 2017 22:38:48 GMT'] + ETag: [dabaf73c-9c8d-435b-9e34-2ff1fd00b952] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -2029,7 +2026,7 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['340'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: body: null @@ -2041,16 +2038,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [cb4caf6e-f482-11e6-9fa9-a0b3ccf7272a] + x-ms-client-request-id: [afb3c04c-f498-11e6-bc01-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/TXT/myrstxt?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxt","name":"myrstxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"13d16c46-68f3-4f5f-8f55-de9a2d5ea7b7","properties":{"fqdn":"myrstxt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["some_text"]}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxt","name":"myrstxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"fd71221b-1134-4a6b-877f-b6b0b0c12f4c","properties":{"fqdn":"myrstxt.myzone.com.","TTL":3600,"TXTRecords":[{"value":["some_text"]}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:02:07 GMT'] - ETag: [13d16c46-68f3-4f5f-8f55-de9a2d5ea7b7] + Date: ['Thu, 16 Feb 2017 22:38:49 GMT'] + ETag: [fd71221b-1134-4a6b-877f-b6b0b0c12f4c] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -2062,9 +2059,9 @@ interactions: x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] status: {code: 200, message: OK} - request: - body: '{"etag": "13d16c46-68f3-4f5f-8f55-de9a2d5ea7b7", "name": "myrstxt", "type": - "Microsoft.Network/dnszones/TXT", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/TXT/myrstxt", - "properties": {"TTL": 3600, "TXTRecords": []}}' + body: '{"properties": {"TTL": 3600, "TXTRecords": []}, "type": "Microsoft.Network/dnszones/TXT", + "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/TXT/myrstxt", + "etag": "fd71221b-1134-4a6b-877f-b6b0b0c12f4c", "name": "myrstxt"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -2074,16 +2071,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [cb722aa4-f482-11e6-b15e-a0b3ccf7272a] + x-ms-client-request-id: [b0011f52-f498-11e6-b843-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/TXT/myrstxt?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxt","name":"myrstxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"55528656-3f8a-4b34-b2aa-2f64c07c3a54","properties":{"fqdn":"myrstxt.myzone.com.","TTL":3600,"TXTRecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/TXT\/myrstxt","name":"myrstxt","type":"Microsoft.Network\/dnszones\/TXT","etag":"e38648b8-5788-4796-b376-cdebfa14cc66","properties":{"fqdn":"myrstxt.myzone.com.","TTL":3600,"TXTRecords":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:02:07 GMT'] - ETag: [55528656-3f8a-4b34-b2aa-2f64c07c3a54] + Date: ['Thu, 16 Feb 2017 22:38:50 GMT'] + ETag: [e38648b8-5788-4796-b376-cdebfa14cc66] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -2104,16 +2101,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [cc1c7662-f482-11e6-b4b2-a0b3ccf7272a] + x-ms-client-request-id: [b0ce9d36-f498-11e6-8b63-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"916e1019-722a-4541-a2a3-b375a1028afd","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.11"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"bad3346f-63a8-41d9-a4b3-b241bd0ba609","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.11"}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:02:08 GMT'] - ETag: [916e1019-722a-4541-a2a3-b375a1028afd] + Date: ['Thu, 16 Feb 2017 22:38:51 GMT'] + ETag: [bad3346f-63a8-41d9-a4b3-b241bd0ba609] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -2134,16 +2131,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ccad22c8-f482-11e6-9b09-a0b3ccf7272a] + x-ms-client-request-id: [b159a948-f498-11e6-87d9-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"916e1019-722a-4541-a2a3-b375a1028afd","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.11"}]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"bad3346f-63a8-41d9-a4b3-b241bd0ba609","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[{"ipv4Address":"10.0.0.11"}]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:02:09 GMT'] - ETag: [916e1019-722a-4541-a2a3-b375a1028afd] + Date: ['Thu, 16 Feb 2017 22:38:52 GMT'] + ETag: [bad3346f-63a8-41d9-a4b3-b241bd0ba609] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -2152,12 +2149,12 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['355'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] status: {code: 200, message: OK} - request: - body: '{"etag": "916e1019-722a-4541-a2a3-b375a1028afd", "name": "myrsa", "type": - "Microsoft.Network/dnszones/A", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa", - "properties": {"ARecords": [], "TTL": 3600}}' + body: '{"properties": {"ARecords": [], "TTL": 3600}, "type": "Microsoft.Network/dnszones/A", + "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa", + "etag": "bad3346f-63a8-41d9-a4b3-b241bd0ba609", "name": "myrsa"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -2167,16 +2164,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ccf31152-f482-11e6-ab51-a0b3ccf7272a] + x-ms-client-request-id: [b19ce99c-f498-11e6-839d-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"98ae9678-f4bc-4c75-bba9-06ebe0e9ed26","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"733c8f1a-14e9-43f2-bb84-2ece6ac1c226","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:02:10 GMT'] - ETag: [98ae9678-f4bc-4c75-bba9-06ebe0e9ed26] + Date: ['Thu, 16 Feb 2017 22:38:53 GMT'] + ETag: [733c8f1a-14e9-43f2-bb84-2ece6ac1c226] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -2185,7 +2182,7 @@ interactions: X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] content-length: ['328'] - x-ms-ratelimit-remaining-subscription-resource-requests: ['11999'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['11998'] status: {code: 200, message: OK} - request: body: null @@ -2197,16 +2194,16 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [cdb2eb24-f482-11e6-aad8-a0b3ccf7272a] + x-ms-client-request-id: [b260b95a-f498-11e6-8ef5-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa?api-version=2016-04-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"98ae9678-f4bc-4c75-bba9-06ebe0e9ed26","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_dns\/providers\/Microsoft.Network\/dnszones\/myzone.com\/A\/myrsa","name":"myrsa","type":"Microsoft.Network\/dnszones\/A","etag":"733c8f1a-14e9-43f2-bb84-2ece6ac1c226","properties":{"fqdn":"myrsa.myzone.com.","TTL":3600,"ARecords":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:02:11 GMT'] - ETag: [98ae9678-f4bc-4c75-bba9-06ebe0e9ed26] + Date: ['Thu, 16 Feb 2017 22:38:54 GMT'] + ETag: [733c8f1a-14e9-43f2-bb84-2ece6ac1c226] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -2228,7 +2225,7 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [ce253ab6-f482-11e6-ae40-a0b3ccf7272a] + x-ms-client-request-id: [b2e6b4d4-f498-11e6-9ab6-a0b3ccf7272a] method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa?api-version=2016-04-01 response: @@ -2236,7 +2233,7 @@ interactions: headers: Cache-Control: [private] Content-Length: ['0'] - Date: ['Thu, 16 Feb 2017 20:02:12 GMT'] + Date: ['Thu, 16 Feb 2017 22:38:56 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] @@ -2254,7 +2251,7 @@ interactions: User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 dnsmanagementclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] accept-language: [en-US] - x-ms-client-request-id: [cefc93da-f482-11e6-82c1-a0b3ccf7272a] + x-ms-client-request-id: [b3b7eec2-f498-11e6-a480-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns/providers/Microsoft.Network/dnszones/myzone.com/A/myrsa?api-version=2016-04-01 response: @@ -2264,7 +2261,7 @@ interactions: Cache-Control: [private] Content-Length: ['169'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 16 Feb 2017 20:02:13 GMT'] + Date: ['Thu, 16 Feb 2017 22:38:56 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py index efe93ab1c..60effa634 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py @@ -1209,27 +1209,28 @@ class NetworkDnsScenarioTest(ResourceGroupVCRTestBase): for t in record_types: # test creating the record set and then adding records - self.cmd('network dns record-set create -n myrs{0} -g {1} --zone-name {2} --type {0}' + self.cmd('network dns record-set {0} create -n myrs{0} -g {1} --zone-name {2}' .format(t, rg, zone_name)) - self.cmd('network dns record {0} add -g {1} --zone-name {2} --record-set-name myrs{0} {3}' - .format(t, rg, zone_name, args[t])) + add_command = 'set-record' if t == 'cname' else 'add-record' + self.cmd('network dns record-set {0} {4} -g {1} --zone-name {2} --record-set-name myrs{0} {3}' + .format(t, rg, zone_name, args[t], add_command)) # test creating the record set at the same time you add records - self.cmd('network dns record {0} add -g {1} --zone-name {2} --record-set-name myrs{0}alt {3}' - .format(t, rg, zone_name, args[t])) + self.cmd('network dns record-set {0} {4} -g {1} --zone-name {2} --record-set-name myrs{0}alt {3}' + .format(t, rg, zone_name, args[t], add_command)) - self.cmd('network dns record {0} add -g {1} --zone-name {2} --record-set-name myrs{0} {3}' + self.cmd('network dns record-set {0} add-record -g {1} --zone-name {2} --record-set-name myrs{0} {3}' .format('a', rg, zone_name, '--ipv4-address 10.0.0.11')) - self.cmd('network dns record update-soa -g {0} --zone-name {1} {2}' + self.cmd('network dns record-set soa update -g {0} --zone-name {1} {2}' .format(rg, zone_name, args['soa'])) long_value = '0123456789' * 50 - self.cmd('network dns record txt add -g {} -z {} -n longtxt -v {}'.format(rg, zone_name, long_value)) + self.cmd('network dns record-set txt add-record -g {} -z {} -n longtxt -v {}'.format(rg, zone_name, long_value)) typed_record_sets = 2 * len(record_types) + 1 self.cmd('network dns zone show -n {} -g {}'.format(zone_name, rg), checks=[ JMESPathCheck('numberOfRecordSets', base_record_sets + typed_record_sets) ]) - self.cmd('network dns record-set show -n myrs{0} -g {1} --type {0} --zone-name {2}' + self.cmd('network dns record-set {0} show -n myrs{0} -g {1} --zone-name {2}' .format('a', rg, zone_name), checks=[ JMESPathCheck('length(arecords)', 2) ]) @@ -1238,27 +1239,27 @@ class NetworkDnsScenarioTest(ResourceGroupVCRTestBase): self.cmd('network dns record-set list -g {} -z {}'.format(rg, zone_name), checks=JMESPathCheck('length(@)', base_record_sets + typed_record_sets)) - self.cmd('network dns record-set list -g {} -z {} --type txt'.format(rg, zone_name), + self.cmd('network dns record-set txt list -g {} -z {}'.format(rg, zone_name), checks=JMESPathCheck('length(@)', 3)) for t in record_types: - self.cmd('network dns record {0} remove -g {1} --zone-name {2} --record-set-name myrs{0} {3}' + self.cmd('network dns record-set {0} remove-record -g {1} --zone-name {2} --record-set-name myrs{0} {3}' .format(t, rg, zone_name, args[t])) - self.cmd('network dns record-set show -n myrs{0} -g {1} --type {0} --zone-name {2}' + self.cmd('network dns record-set {0} show -n myrs{0} -g {1} --zone-name {2}' .format('a', rg, zone_name), checks=[ JMESPathCheck('length(arecords)', 1) ]) - self.cmd('network dns record {0} remove -g {1} --zone-name {2} --record-set-name myrs{0} {3}' + self.cmd('network dns record-set {0} remove-record -g {1} --zone-name {2} --record-set-name myrs{0} {3}' .format('a', rg, zone_name, '--ipv4-address 10.0.0.11')) - self.cmd('network dns record-set show -n myrs{0} -g {1} --type {0} --zone-name {2}' + self.cmd('network dns record-set {0} show -n myrs{0} -g {1} --zone-name {2}' .format('a', rg, zone_name), checks=[ JMESPathCheck('arecords', None) ]) - self.cmd('network dns record-set delete -n myrs{0} -g {1} --type {0} --zone-name {2}' + self.cmd('network dns record-set {0} delete -n myrs{0} -g {1} --zone-name {2}' .format('a', rg, zone_name)) - self.cmd('network dns record-set show -n myrs{0} -g {1} --type {0} --zone-name {2}' + self.cmd('network dns record-set {0} show -n myrs{0} -g {1} --zone-name {2}' .format('a', rg, zone_name), allowed_exceptions='does not exist in resource group') class NetworkZoneImportExportTest(ResourceGroupVCRTestBase):
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": -1, "issue_text_score": 0, "test_score": -1 }, "num_modified_files": 7 }
0.1
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==1.1.0 -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@2a8d8fca411fe8422c7cee557943ae4c9f256bfc#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-core==1.24.2 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==2.0.0 azure-mgmt-compute==0.33.0 azure-mgmt-containerregistry==0.1.1 azure-mgmt-dns==0.30.0rc6 azure-mgmt-documentdb==0.1.0 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-network==0.30.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-sql==0.2.0 azure-mgmt-storage==0.31.0 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.31.0 azure-nspkg==3.0.2 azure-storage==0.33.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.7.1 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.1.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 wrapt==1.16.0 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==1.1.0 - azure-common==1.1.4 - azure-core==1.24.2 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==2.0.0 - azure-mgmt-compute==0.33.0 - azure-mgmt-containerregistry==0.1.1 - azure-mgmt-dns==0.30.0rc6 - azure-mgmt-documentdb==0.1.0 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-network==0.30.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-sql==0.2.0 - azure-mgmt-storage==0.31.0 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.31.0 - azure-nspkg==3.0.2 - azure-storage==0.33.0 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.7.1 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.1.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - wrapt==1.16.0 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkDnsScenarioTest::test_network_dns" ]
[]
[ "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkMultiIdsShowScenarioTest::test_multi_id_show", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkUsageListScenarioTest::test_network_usage_list", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkAppGatewayDefaultScenarioTest::test_network_app_gateway_with_defaults", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkAppGatewayExistingSubnetScenarioTest::test_network_app_gateway_with_existing_subnet", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkAppGatewayNoWaitScenarioTest::test_network_app_gateway_no_wait", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkAppGatewayPrivateIpScenarioTest::test_network_app_gateway_with_private_ip", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkAppGatewayPublicIpScenarioTest::test_network_app_gateway_with_public_ip", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkAppGatewayWafScenarioTest::test_network_app_gateway_waf", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkPublicIpScenarioTest::test_network_public_ip", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkExpressRouteScenarioTest::test_network_express_route", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkLoadBalancerScenarioTest::test_network_load_balancer", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkLoadBalancerIpConfigScenarioTest::test_network_load_balancer_ip_config", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkLoadBalancerSubresourceScenarioTest::test_network_load_balancer_subresources", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkLocalGatewayScenarioTest::test_network_local_gateway", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkNicScenarioTest::test_network_nic", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkNicSubresourceScenarioTest::test_network_nic_subresources", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkNicConvenienceCommandsScenarioTest::test_network_nic_convenience_commands", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkSecurityGroupScenarioTest::test_network_nsg", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkRouteTableOperationScenarioTest::test_network_route_table_operation", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkVNetScenarioTest::test_network_vnet", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkVNetPeeringScenarioTest::test_network_vnet_peering", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkSubnetSetScenarioTest::test_network_subnet_set", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkVpnGatewayScenarioTest::test_network_vpn_gateway", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkTrafficManagerScenarioTest::test_network_traffic_manager", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkZoneImportExportTest::test_network_dns_zone_import_export" ]
[]
MIT License
null
Azure__azure-cli-2214
01bbaf048c7669c024ece5e84c9360d829624574
2017-02-22 21:17:11
1576ec67f5029db062579da230902a559acbb9fe
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/commands.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/commands.py index 0e5118830..3b6e72876 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/commands.py +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/commands.py @@ -418,7 +418,7 @@ dns_record_set_path = 'azure.mgmt.dns.operations.record_sets_operations#RecordSe cli_command(__name__, 'network dns record-set list', custom_path.format('list_dns_record_set'), cf_dns_mgmt_record_sets, transform=transform_dns_record_set_output) for record in ['a', 'aaaa', 'mx', 'ns', 'ptr', 'srv', 'txt']: cli_command(__name__, 'network dns record-set {} show'.format(record), dns_record_set_path + 'get', cf_dns_mgmt_record_sets, transform=transform_dns_record_set_output, exception_handler=empty_on_404) - cli_command(__name__, 'network dns record-set {} delete'.format(record), dns_record_set_path + 'delete', cf_dns_mgmt_record_sets) + cli_command(__name__, 'network dns record-set {} delete'.format(record), dns_record_set_path + 'delete', cf_dns_mgmt_record_sets, confirmation=True) cli_command(__name__, 'network dns record-set {} list'.format(record), custom_path.format('list_dns_record_set'), cf_dns_mgmt_record_sets, transform=transform_dns_record_set_output, table_transformer=transform_dns_record_set_table_output) cli_command(__name__, 'network dns record-set {} create'.format(record), custom_path.format('create_dns_record_set'), transform=transform_dns_record_set_output) cli_command(__name__, 'network dns record-set {} add-record'.format(record), custom_path.format('add_dns_{}_record'.format(record)), transform=transform_dns_record_set_output)
[DNS] Deleting a record requires a confirmation prompt Deleting a record set is a potentially catastrophic operation. For this reason, in the Portal, PowerShell, and CLI1.0, the operation has a confirmation prompt. We need to add a similar confirmation prompt in CLI2.0. This applies to both `az network dns record-set <type> delete` and `az network dns record-set <type> remove-record`. The prompt should be suppressible for scripting purposes (e.g. via `--yes -y` same as `az network dns zone delete`)
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py index c7c490fd5..1b0d4e81d 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py @@ -1268,7 +1268,7 @@ class NetworkDnsScenarioTest(ResourceGroupVCRTestBase): self.cmd('network dns record-set {0} show -n myrs{0} -g {1} --zone-name {2}'.format('a', rg, zone_name), checks=NoneCheck()) - self.cmd('network dns record-set {0} delete -n myrs{0} -g {1} --zone-name {2}' + self.cmd('network dns record-set {0} delete -n myrs{0} -g {1} --zone-name {2} -y' .format('a', rg, zone_name)) self.cmd('network dns record-set {0} show -n myrs{0} -g {1} --zone-name {2}' .format('a', rg, zone_name), allowed_exceptions='does not exist in resource group')
{ "commit_name": "merge_commit", "failed_lite_validators": [], "has_test_patch": true, "is_lite": true, "llm_score": { "difficulty_score": 0, "issue_text_score": 0, "test_score": 2 }, "num_modified_files": 1 }
0.1
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==1.1.0 -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@01bbaf048c7669c024ece5e84c9360d829624574#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-core==1.24.2 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==2.0.0 azure-mgmt-compute==0.33.1rc1 azure-mgmt-containerregistry==0.1.1 azure-mgmt-dns==1.0.0 azure-mgmt-documentdb==0.1.0 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-network==0.30.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-sql==0.2.0 azure-mgmt-storage==0.31.0 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.31.0 azure-nspkg==3.0.2 azure-storage==0.33.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.7.1 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.1.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 wrapt==1.16.0 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==1.1.0 - azure-common==1.1.4 - azure-core==1.24.2 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==2.0.0 - azure-mgmt-compute==0.33.1rc1 - azure-mgmt-containerregistry==0.1.1 - azure-mgmt-dns==1.0.0 - azure-mgmt-documentdb==0.1.0 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-network==0.30.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-sql==0.2.0 - azure-mgmt-storage==0.31.0 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.31.0 - azure-nspkg==3.0.2 - azure-storage==0.33.0 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.7.1 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.1.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - wrapt==1.16.0 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkDnsScenarioTest::test_network_dns" ]
[]
[ "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkMultiIdsShowScenarioTest::test_multi_id_show", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkUsageListScenarioTest::test_network_usage_list", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkAppGatewayDefaultScenarioTest::test_network_app_gateway_with_defaults", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkAppGatewayExistingSubnetScenarioTest::test_network_app_gateway_with_existing_subnet", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkAppGatewayNoWaitScenarioTest::test_network_app_gateway_no_wait", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkAppGatewayPrivateIpScenarioTest::test_network_app_gateway_with_private_ip", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkAppGatewayPublicIpScenarioTest::test_network_app_gateway_with_public_ip", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkAppGatewayWafScenarioTest::test_network_app_gateway_waf", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkPublicIpScenarioTest::test_network_public_ip", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkExpressRouteScenarioTest::test_network_express_route", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkLoadBalancerScenarioTest::test_network_load_balancer", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkLoadBalancerIpConfigScenarioTest::test_network_load_balancer_ip_config", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkLoadBalancerSubresourceScenarioTest::test_network_load_balancer_subresources", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkLocalGatewayScenarioTest::test_network_local_gateway", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkNicScenarioTest::test_network_nic", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkNicSubresourceScenarioTest::test_network_nic_subresources", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkNicConvenienceCommandsScenarioTest::test_network_nic_convenience_commands", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkSecurityGroupScenarioTest::test_network_nsg", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkRouteTableOperationScenarioTest::test_network_route_table_operation", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkVNetScenarioTest::test_network_vnet", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkVNetPeeringScenarioTest::test_network_vnet_peering", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkSubnetSetScenarioTest::test_network_subnet_set", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkVpnGatewayScenarioTest::test_network_vpn_gateway", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkTrafficManagerScenarioTest::test_network_traffic_manager", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_commands.py::NetworkZoneImportExportTest::test_network_dns_zone_import_export" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_azure-cli-2214
Azure__azure-cli-2345
23b3145b4623edf2648ee28a101175199d92cb1c
2017-03-01 22:32:27
eb12ac454cbe1ddb59c86cdf2045e1912660e750
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2345?src=pr&el=h1) Report > Merging [#2345](https://codecov.io/gh/Azure/azure-cli/pull/2345?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/23b3145b4623edf2648ee28a101175199d92cb1c?src=pr&el=desc) will **increase** coverage by `0.07%`. > The diff coverage is `68.29%`. ```diff @@ Coverage Diff @@ ## master #2345 +/- ## ========================================== + Coverage 72.86% 72.94% +0.07% ========================================== Files 425 425 Lines 19306 19307 +1 Branches 2742 2740 -2 ========================================== + Hits 14067 14083 +16 - Misses 4330 4352 +22 + Partials 909 872 -37 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/2345?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...etwork/azure/cli/command_modules/network/custom.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...d64796ad3f5fb27e722199d0d7a74ef18c0da398?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbmV0d29yay9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL25ldHdvcmsvY3VzdG9tLnB5) | `60.72% <68.29%> (+1.42%)` | :white_check_mark: | | [...e-cli-acs/azure/cli/command_modules/acs/_params.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...d64796ad3f5fb27e722199d0d7a74ef18c0da398?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktYWNzL2F6dXJlL2NsaS9jb21tYW5kX21vZHVsZXMvYWNzL19wYXJhbXMucHk=) | `68.51% <0%> (ø)` | :white_check_mark: | | [src/azure-cli-core/azure/cli/core/telemetry.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...d64796ad3f5fb27e722199d0d7a74ef18c0da398?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL3RlbGVtZXRyeS5weQ==) | `54.1% <0%> (ø)` | :white_check_mark: | | [...i-cloud/azure/cli/command_modules/cloud/_params.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...d64796ad3f5fb27e722199d0d7a74ef18c0da398?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktY2xvdWQvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9jbG91ZC9fcGFyYW1zLnB5) | `92.3% <0%> (ø)` | :white_check_mark: | | [...cli-vm/azure/cli/command_modules/vm/_validators.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...d64796ad3f5fb27e722199d0d7a74ef18c0da398?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktdm0vYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy92bS9fdmFsaWRhdG9ycy5weQ==) | `73.69% <0%> (ø)` | :white_check_mark: | | [src/azure-cli-core/azure/cli/core/_util.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...d64796ad3f5fb27e722199d0d7a74ef18c0da398?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL191dGlsLnB5) | `65.51% <0%> (ø)` | :white_check_mark: | | [...-cli-role/azure/cli/command_modules/role/custom.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...d64796ad3f5fb27e722199d0d7a74ef18c0da398?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcm9sZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3JvbGUvY3VzdG9tLnB5) | `20.44% <0%> (ø)` | :white_check_mark: | | [...twork/azure/cli/command_modules/network/_params.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...d64796ad3f5fb27e722199d0d7a74ef18c0da398?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbmV0d29yay9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL25ldHdvcmsvX3BhcmFtcy5weQ==) | `92.51% <0%> (ø)` | :white_check_mark: | | [...ure-cli-core/azure/cli/core/commands/parameters.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...d64796ad3f5fb27e722199d0d7a74ef18c0da398?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL2NvbW1hbmRzL3BhcmFtZXRlcnMucHk=) | `70.58% <0%> (ø)` | :white_check_mark: | | [...gure/azure/cli/command_modules/configure/custom.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...d64796ad3f5fb27e722199d0d7a74ef18c0da398?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktY29uZmlndXJlL2F6dXJlL2NsaS9jb21tYW5kX21vZHVsZXMvY29uZmlndXJlL2N1c3RvbS5weQ==) | `17% <0%> (ø)` | :white_check_mark: | | ... and [13 more](https://codecov.io/gh/Azure/azure-cli/pull/2345?src=pr&el=tree-more) | | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2345?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2345?src=pr&el=footer). Last update [23b3145...e9f58cf](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...e9f58cfbd3b30a553ebe629915fa7e6abe74c5c1?el=footer&src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/azure-cli.pyproj b/azure-cli.pyproj index 6a88538e3..c714d3247 100644 --- a/azure-cli.pyproj +++ b/azure-cli.pyproj @@ -333,6 +333,9 @@ <Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_vnet_gateway\lib\version.py" /> <Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_vnet_gateway\lib\vnet_gateway_creation_client.py" /> <Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_vnet_gateway\lib\__init__.py" /> + <Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\test_network_unit_tests.py"> + <SubType>Code</SubType> + </Compile> <Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\test_dns_zone_import.py"> <SubType>Code</SubType> </Compile> diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py index afe5d3ffd..3a7bd967c 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py @@ -39,12 +39,19 @@ from azure.cli.command_modules.network.zone_file.make_zone_file import make_zone logger = azlogging.get_az_logger(__name__) -def _upsert(collection, obj, key_name, key_value): - match = next((x for x in collection if getattr(x, key_name, None) == key_value), None) +def _upsert(parent, collection_name, obj_to_add, key_name): + + if not getattr(parent, collection_name, None): + setattr(parent, collection_name, []) + collection = getattr(parent, collection_name, None) + + value = getattr(obj_to_add, key_name) + match = next((x for x in collection if getattr(x, key_name, None) == value), None) if match: - logger.warning("Item '%s' already exists. Replacing with new values.", key_value) + logger.warning("Item '%s' already exists. Replacing with new values.", value) collection.remove(match) - collection.append(obj) + + collection.append(obj_to_add) #region Generic list commands def _generic_list(operation_name, resource_group_name): @@ -101,7 +108,7 @@ def create_ag_authentication_certificate(resource_group_name, application_gatewa ncf = _network_client_factory().application_gateways ag = ncf.get(resource_group_name, application_gateway_name) new_cert = AuthCert(data=cert_data, name=item_name) - _upsert(ag.authentication_certificates, new_cert, 'name', item_name) + _upsert(ag, 'authentication_certificates', new_cert, 'name') return ncf.create_or_update(resource_group_name, application_gateway_name, ag, raw=no_wait) def update_ag_authentication_certificate(instance, parent, item_name, cert_data): # pylint: disable=unused-argument @@ -114,7 +121,7 @@ def create_ag_backend_address_pool(resource_group_name, application_gateway_name ncf = _network_client_factory() ag = ncf.application_gateways.get(resource_group_name, application_gateway_name) new_pool = ApplicationGatewayBackendAddressPool(name=item_name, backend_addresses=servers) - _upsert(ag.backend_address_pools, new_pool, 'name', item_name) + _upsert(ag, 'backend_address_pools', new_pool, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) create_ag_backend_address_pool.__doc__ = AppGatewayOperations.create_or_update.__doc__ @@ -141,7 +148,7 @@ def create_ag_frontend_ip_configuration(resource_group_name, application_gateway private_ip_address=private_ip_address if private_ip_address else None, private_ip_allocation_method='Static' if private_ip_address else 'Dynamic', subnet=SubResource(subnet)) - _upsert(ag.frontend_ip_configurations, new_config, 'name', item_name) + _upsert(ag, 'frontend_ip_configurations', new_config, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) create_ag_frontend_ip_configuration.__doc__ = AppGatewayOperations.create_or_update.__doc__ @@ -165,7 +172,7 @@ def create_ag_frontend_port(resource_group_name, application_gateway_name, item_ ncf = _network_client_factory() ag = ncf.application_gateways.get(resource_group_name, application_gateway_name) new_port = ApplicationGatewayFrontendPort(name=item_name, port=port) - _upsert(ag.frontend_ports, new_port, 'name', item_name) + _upsert(ag, 'frontend_ports', new_port, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) @@ -188,7 +195,7 @@ def create_ag_http_listener(resource_group_name, application_gateway_name, item_ require_server_name_indication=True if ssl_cert and host_name else None, protocol='https' if ssl_cert else 'http', ssl_certificate=SubResource(ssl_cert) if ssl_cert else None) - _upsert(ag.http_listeners, new_listener, 'name', item_name) + _upsert(ag, 'http_listeners', new_listener, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) @@ -225,7 +232,7 @@ def create_ag_backend_http_settings_collection(resource_group_name, application_ request_timeout=timeout, probe=SubResource(probe) if probe else None, name=item_name) - _upsert(ag.backend_http_settings_collection, new_settings, 'name', item_name) + _upsert(ag, 'backend_http_settings_collection', new_settings, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) @@ -257,7 +264,7 @@ def create_ag_probe(resource_group_name, application_gateway_name, item_name, pr interval=interval, timeout=timeout, unhealthy_threshold=threshold) - _upsert(ag.probes, new_probe, 'name', item_name) + _upsert(ag, 'probes', new_probe, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) @@ -290,7 +297,7 @@ def create_ag_request_routing_rule(resource_group_name, application_gateway_name backend_http_settings=SubResource(http_settings), http_listener=SubResource(http_listener), url_path_map=SubResource(url_path_map) if url_path_map else None) - _upsert(ag.request_routing_rules, new_rule, 'name', item_name) + _upsert(ag, 'request_routing_rules', new_rule, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) @@ -316,7 +323,7 @@ def create_ag_ssl_certificate(resource_group_name, application_gateway_name, ite ag = ncf.application_gateways.get(resource_group_name, application_gateway_name) new_cert = ApplicationGatewaySslCertificate( name=item_name, data=cert_data, password=cert_password) - _upsert(ag.ssl_certificates, new_cert, 'name', item_name) + _upsert(ag, 'ssl_certificates', new_cert, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) create_ag_ssl_certificate.__doc__ = AppGatewayOperations.create_or_update.__doc__ @@ -359,7 +366,7 @@ def create_ag_url_path_map(resource_group_name, application_gateway_name, item_n backend_http_settings=SubResource(http_settings), paths=paths )]) - _upsert(ag.url_path_maps, new_map, 'name', item_name) + _upsert(ag, 'url_path_maps', new_map, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) @@ -387,7 +394,7 @@ def create_ag_url_path_map_rule(resource_group_name, application_gateway_name, u if address_pool else SubResource(url_map.default_backend_address_pool.id), backend_http_settings=SubResource(http_settings) \ if http_settings else SubResource(url_map.default_backend_http_settings.id)) - _upsert(url_map.path_rules, new_rule, 'name', item_name) + _upsert(url_map, 'path_rules', new_rule, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) @@ -432,7 +439,7 @@ def create_lb_inbound_nat_rule( frontend_ip_configuration=frontend_ip, enable_floating_ip=floating_ip == 'true', idle_timeout_in_minutes=idle_timeout) - _upsert(lb.inbound_nat_rules, new_rule, 'name', item_name) + _upsert(lb, 'inbound_nat_rules', new_rule, 'name') poller = ncf.load_balancers.create_or_update(resource_group_name, load_balancer_name, lb) return _get_property(poller.result().inbound_nat_rules, item_name) @@ -467,7 +474,7 @@ def create_lb_inbound_nat_pool( frontend_port_range_start=frontend_port_range_start, frontend_port_range_end=frontend_port_range_end, backend_port=backend_port) - _upsert(lb.inbound_nat_pools, new_pool, 'name', item_name) + _upsert(lb, 'inbound_nat_pools', new_pool, 'name') poller = ncf.load_balancers.create_or_update(resource_group_name, load_balancer_name, lb) return _get_property(poller.result().inbound_nat_pools, item_name) @@ -500,7 +507,7 @@ def create_lb_frontend_ip_configuration( private_ip_allocation_method=private_ip_address_allocation, public_ip_address=PublicIPAddress(public_ip_address) if public_ip_address else None, subnet=Subnet(subnet) if subnet else None) - _upsert(lb.frontend_ip_configurations, new_config, 'name', item_name) + _upsert(lb, 'frontend_ip_configurations', new_config, 'name') poller = ncf.load_balancers.create_or_update(resource_group_name, load_balancer_name, lb) return _get_property(poller.result().frontend_ip_configurations, item_name) @@ -532,7 +539,7 @@ def create_lb_backend_address_pool(resource_group_name, load_balancer_name, item ncf = _network_client_factory() lb = ncf.load_balancers.get(resource_group_name, load_balancer_name) new_pool = BackendAddressPool(name=item_name) - _upsert(lb.backend_address_pools, new_pool, 'name', item_name) + _upsert(lb, 'backend_address_pools', new_pool, 'name') poller = ncf.load_balancers.create_or_update(resource_group_name, load_balancer_name, lb) return _get_property(poller.result().backend_address_pools, item_name) @@ -543,7 +550,7 @@ def create_lb_probe(resource_group_name, load_balancer_name, item_name, protocol new_probe = Probe( protocol, port, interval_in_seconds=interval, number_of_probes=threshold, request_path=path, name=item_name) - _upsert(lb.probes, new_probe, 'name', item_name) + _upsert(lb, 'probes', new_probe, 'name') poller = ncf.load_balancers.create_or_update(resource_group_name, load_balancer_name, lb) return _get_property(poller.result().probes, item_name) @@ -577,7 +584,7 @@ def create_lb_rule( load_distribution=load_distribution, enable_floating_ip=floating_ip == 'true', idle_timeout_in_minutes=idle_timeout) - _upsert(lb.load_balancing_rules, new_rule, 'name', item_name) + _upsert(lb, 'load_balancing_rules', new_rule, 'name') poller = ncf.load_balancers.create_or_update(resource_group_name, load_balancer_name, lb) return _get_property(poller.result().load_balancing_rules, item_name) @@ -658,7 +665,7 @@ def create_nic_ip_config(resource_group_name, network_interface_name, ip_config_ private_ip_allocation_method=private_ip_address_allocation, private_ip_address_version=private_ip_address_version, primary=make_primary) - _upsert(nic.ip_configurations, new_config, 'name', ip_config_name) + _upsert(nic, 'ip_configurations', new_config, 'name') poller = ncf.network_interfaces.create_or_update( resource_group_name, network_interface_name, nic) return _get_property(poller.result().ip_configurations, ip_config_name) @@ -708,19 +715,25 @@ def set_nic_ip_config(instance, parent, ip_config_name, subnet=None, # pylint: d return parent set_nic_ip_config.__doc__ = NicOperations.create_or_update.__doc__ +def _get_nic_ip_config(nic, name): + if nic.ip_configurations: + ip_config = next( + (x for x in nic.ip_configurations if x.name.lower() == name.lower()), None) + else: + ip_config = None + if not ip_config: + raise CLIError('IP configuration {} not found.'.format(name)) + return ip_config + def add_nic_ip_config_address_pool( resource_group_name, network_interface_name, ip_config_name, backend_address_pool, load_balancer_name=None): # pylint: disable=unused-argument client = _network_client_factory().network_interfaces nic = client.get(resource_group_name, network_interface_name) - ip_config = next( - (x for x in nic.ip_configurations if x.name.lower() == ip_config_name.lower()), None) - try: - _upsert(ip_config.load_balancer_backend_address_pools, - BackendAddressPool(backend_address_pool), - 'name', backend_address_pool) - except AttributeError: - ip_config.load_balancer_backend_address_pools = [BackendAddressPool(backend_address_pool)] + ip_config = _get_nic_ip_config(nic, ip_config_name) + _upsert(ip_config, 'load_balancer_backend_address_pools', + BackendAddressPool(backend_address_pool), + 'name') poller = client.create_or_update(resource_group_name, network_interface_name, nic) return _get_property(poller.result().ip_configurations, ip_config_name) @@ -729,10 +742,7 @@ def remove_nic_ip_config_address_pool( load_balancer_name=None): # pylint: disable=unused-argument client = _network_client_factory().network_interfaces nic = client.get(resource_group_name, network_interface_name) - ip_config = next( - (x for x in nic.ip_configurations if x.name.lower() == ip_config_name.lower()), None) - if not ip_config: - raise CLIError('IP configuration {} not found.'.format(ip_config_name)) + ip_config = _get_nic_ip_config(nic, ip_config_name) keep_items = \ [x for x in ip_config.load_balancer_backend_address_pools or [] \ if x.id != backend_address_pool] @@ -745,14 +755,10 @@ def add_nic_ip_config_inbound_nat_rule( load_balancer_name=None): # pylint: disable=unused-argument client = _network_client_factory().network_interfaces nic = client.get(resource_group_name, network_interface_name) - ip_config = next( - (x for x in nic.ip_configurations if x.name.lower() == ip_config_name.lower()), None) - try: - _upsert(ip_config.load_balancer_inbound_nat_rules, - InboundNatRule(inbound_nat_rule), - 'name', inbound_nat_rule) - except AttributeError: - ip_config.load_balancer_inbound_nat_rules = [InboundNatRule(inbound_nat_rule)] + ip_config = _get_nic_ip_config(nic, ip_config_name) + _upsert(ip_config, 'load_balancer_inbound_nat_rules', + InboundNatRule(inbound_nat_rule), + 'name') poller = client.create_or_update(resource_group_name, network_interface_name, nic) return _get_property(poller.result().ip_configurations, ip_config_name) @@ -761,10 +767,7 @@ def remove_nic_ip_config_inbound_nat_rule( load_balancer_name=None): # pylint: disable=unused-argument client = _network_client_factory().network_interfaces nic = client.get(resource_group_name, network_interface_name) - ip_config = next( - (x for x in nic.ip_configurations or [] if x.name.lower() == ip_config_name.lower()), None) - if not ip_config: - raise CLIError('IP configuration {} not found.'.format(ip_config_name)) + ip_config = _get_nic_ip_config(nic, ip_config_name) keep_items = \ [x for x in ip_config.load_balancer_inbound_nat_rules if x.id != inbound_nat_rule] ip_config.load_balancer_inbound_nat_rules = keep_items @@ -1074,7 +1077,7 @@ def create_vnet_gateway_root_cert(resource_group_name, gateway_name, public_cert config.vpn_client_root_certificates = [] cert = VpnClientRootCertificate(name=cert_name, public_cert_data=public_cert_data) - _upsert(config.vpn_client_root_certificates, cert, 'name', cert_name) + _upsert(config, 'vpn_client_root_certificates', cert, 'name') return ncf.create_or_update(resource_group_name, gateway_name, gateway) def delete_vnet_gateway_root_cert(resource_group_name, gateway_name, cert_name): @@ -1094,7 +1097,7 @@ def create_vnet_gateway_revoked_cert(resource_group_name, gateway_name, thumbpri config, gateway, ncf = _prep_cert_create(gateway_name, resource_group_name) cert = VpnClientRevokedCertificate(name=cert_name, thumbprint=thumbprint) - _upsert(config.vpn_client_revoked_certificates, cert, 'name', cert_name) + _upsert(config, 'vpn_client_revoked_certificates', cert, 'name') return ncf.create_or_update(resource_group_name, gateway_name, gateway) def delete_vnet_gateway_revoked_cert(resource_group_name, gateway_name, cert_name):
az network nic ip-config address-pool add command fails Using the cli 2.0 to bind a nic to an address pool with the following command produces this error: command: az network nic ip-config address-pool add \ --resource-group ${resource_group} \ --nic-name ${nic_name} \ --lb-name ${lb_name} \ --address-pool ${lb_address_pool_name} \ --ip-config-name ${lb_name}-binding produces the following: 'NoneType' object has no attribute 'load_balancer_backend_address_pools' Traceback (most recent call last): File "/Users/marty.bell/lib/azure-cli/lib/python2.7/site-packages/azure/cli/main.py", line 37, in main cmd_result = APPLICATION.execute(args) File "/Users/marty.bell/lib/azure-cli/lib/python2.7/site-packages/azure/cli/core/application.py", line 157, in execute result = expanded_arg.func(params) File "/Users/marty.bell/lib/azure-cli/lib/python2.7/site-packages/azure/cli/core/commands/__init__.py", line 343, in _execute_command raise ex AttributeError: 'NoneType' object has no attribute 'load_balancer_backend_address_pools' Below is the azure client version: az --version azure-cli (2.0.0) acs (2.0.0) appservice (0.1.1b5) batch (0.1.1b4) cloud (2.0.0) component (2.0.0) configure (2.0.0) container (0.1.1b4) core (2.0.0) documentdb (0.1.1b2) feedback (2.0.0) iot (0.1.1b3) keyvault (0.1.1b5) network (2.0.0) nspkg (2.0.0) profile (2.0.0) redis (0.1.1b3) resource (2.0.0) role (2.0.0) sql (0.1.1b5) storage (2.0.0) vm (2.0.0) Python (Darwin) 2.7.10 (default, Oct 23 2015, 19:19:21) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] There do seem to be a number of similar issues with other use cases with the cli, but the remediation wasn't clear..... Marty
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_unit_tests.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_unit_tests.py new file mode 100644 index 000000000..66ab9a44d --- /dev/null +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_unit_tests.py @@ -0,0 +1,84 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import unittest + +import mock + +from azure.cli.core._util import CLIError + +class Test_Network_Unit_Tests(unittest.TestCase): + + def test_network_get_nic_ip_config(self): + from azure.cli.command_modules.network.custom import _get_nic_ip_config + + # 1 - Test that if ip_configurations property is null, error is thrown + nic = mock.MagicMock() + nic.ip_configurations = None + with self.assertRaises(CLIError): + _get_nic_ip_config(nic, 'test') + + def mock_ip_config(name, value): + fake = mock.MagicMock() + fake.name = name + fake.value = value + return fake + + nic = mock.MagicMock() + nic.ip_configurations = [ + mock_ip_config('test1', '1'), + mock_ip_config('test2', '2'), + mock_ip_config('test3', '3'), + ] + # 2 - Test that if ip_configurations is not null but no match, error is thrown + with self.assertRaises(CLIError): + _get_nic_ip_config(nic, 'test4') + + # 3 - Test that match is returned + self.assertEqual(_get_nic_ip_config(nic, 'test2').value, '2') + + def test_network_upsert(self): + from azure.cli.command_modules.network.custom import _upsert + + obj1 = mock.MagicMock() + obj1.key = 'object1' + obj1.value = 'cat' + + obj2 = mock.MagicMock() + obj2.key = 'object2' + obj2.value = 'dog' + + # 1 - verify upsert to a null collection + parent_with_null_collection = mock.MagicMock() + parent_with_null_collection.collection = None + _upsert(parent_with_null_collection, 'collection', obj1, 'key') + result = parent_with_null_collection.collection + self.assertEqual(len(result), 1) + self.assertEqual(result[0].value, 'cat') + + # 2 - verify upsert to an empty collection + parent_with_empty_collection = mock.MagicMock() + parent_with_empty_collection.collection = [] + _upsert(parent_with_empty_collection, 'collection', obj1, 'key') + result = parent_with_empty_collection.collection + self.assertEqual(len(result), 1) + self.assertEqual(result[0].value, 'cat') + + # 3 - verify can add more than one + _upsert(parent_with_empty_collection, 'collection', obj2, 'key') + result = parent_with_empty_collection.collection + self.assertEqual(len(result), 2) + self.assertEqual(result[1].value, 'dog') + + # 4 - verify update to existing collection + obj2.value = 'noodle' + _upsert(parent_with_empty_collection, 'collection', obj2, 'key') + result = parent_with_empty_collection.collection + self.assertEqual(len(result), 2) + self.assertEqual(result[1].value, 'noodle') + + +if __name__ == '__main__': + unittest.main()
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 0, "test_score": 2 }, "num_modified_files": 2 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==1.1.0 -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-core==1.24.2 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==2.0.0 azure-mgmt-compute==0.33.1rc1 azure-mgmt-containerregistry==0.1.1 azure-mgmt-dns==1.0.0 azure-mgmt-documentdb==0.1.0 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-network==0.30.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-sql==0.3.0 azure-mgmt-storage==0.31.0 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.31.0 azure-nspkg==3.0.2 azure-storage==0.33.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.7.1 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.1.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 wrapt==1.16.0 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==1.1.0 - azure-common==1.1.4 - azure-core==1.24.2 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==2.0.0 - azure-mgmt-compute==0.33.1rc1 - azure-mgmt-containerregistry==0.1.1 - azure-mgmt-dns==1.0.0 - azure-mgmt-documentdb==0.1.0 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-network==0.30.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-sql==0.3.0 - azure-mgmt-storage==0.31.0 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.31.0 - azure-nspkg==3.0.2 - azure-storage==0.33.0 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.7.1 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.1.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - wrapt==1.16.0 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_unit_tests.py::Test_Network_Unit_Tests::test_network_get_nic_ip_config", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_unit_tests.py::Test_Network_Unit_Tests::test_network_upsert" ]
[]
[]
[]
MIT License
null
Azure__azure-cli-2346
23b3145b4623edf2648ee28a101175199d92cb1c
2017-03-01 23:41:49
eb12ac454cbe1ddb59c86cdf2045e1912660e750
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2346?src=pr&el=h1) Report > Merging [#2346](https://codecov.io/gh/Azure/azure-cli/pull/2346?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/23b3145b4623edf2648ee28a101175199d92cb1c?src=pr&el=desc) will **decrease** coverage by `-0.02%`. > The diff coverage is `40%`. ```diff @@ Coverage Diff @@ ## master #2346 +/- ## ========================================== - Coverage 72.86% 72.85% -0.02% ========================================== Files 425 425 Lines 19306 19306 Branches 2742 2743 +1 ========================================== - Hits 14067 14065 -2 - Misses 4330 4364 +34 + Partials 909 877 -32 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/2346?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...rage/azure/cli/command_modules/storage/commands.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...60d0433c7c7a07f9ad38b5a2fa028ecba4fbe311?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktc3RvcmFnZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3N0b3JhZ2UvY29tbWFuZHMucHk=) | `98.75% <ø> (ø)` | :white_check_mark: | | [...e/azure/cli/command_modules/storage/_validators.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...60d0433c7c7a07f9ad38b5a2fa028ecba4fbe311?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktc3RvcmFnZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3N0b3JhZ2UvX3ZhbGlkYXRvcnMucHk=) | `53.65% <0%> (+0.03%)` | :white_check_mark: | | [...orage/azure/cli/command_modules/storage/_params.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...60d0433c7c7a07f9ad38b5a2fa028ecba4fbe311?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktc3RvcmFnZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3N0b3JhZ2UvX3BhcmFtcy5weQ==) | `86.9% <100%> (-0.04%)` | :x: | | [...torage/azure/cli/command_modules/storage/custom.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...60d0433c7c7a07f9ad38b5a2fa028ecba4fbe311?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktc3RvcmFnZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3N0b3JhZ2UvY3VzdG9tLnB5) | `86.02% <33.33%> (-1.48%)` | :x: | | [...e-cli-acs/azure/cli/command_modules/acs/_params.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...60d0433c7c7a07f9ad38b5a2fa028ecba4fbe311?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktYWNzL2F6dXJlL2NsaS9jb21tYW5kX21vZHVsZXMvYWNzL19wYXJhbXMucHk=) | `68.51% <0%> (ø)` | :white_check_mark: | | [src/azure-cli-core/azure/cli/core/telemetry.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...60d0433c7c7a07f9ad38b5a2fa028ecba4fbe311?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL3RlbGVtZXRyeS5weQ==) | `54.1% <0%> (ø)` | :white_check_mark: | | [...twork/azure/cli/command_modules/network/_params.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...60d0433c7c7a07f9ad38b5a2fa028ecba4fbe311?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbmV0d29yay9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL25ldHdvcmsvX3BhcmFtcy5weQ==) | `92.51% <0%> (ø)` | :white_check_mark: | | [...i-cloud/azure/cli/command_modules/cloud/_params.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...60d0433c7c7a07f9ad38b5a2fa028ecba4fbe311?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktY2xvdWQvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9jbG91ZC9fcGFyYW1zLnB5) | `92.3% <0%> (ø)` | :white_check_mark: | | [...cli-vm/azure/cli/command_modules/vm/_validators.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...60d0433c7c7a07f9ad38b5a2fa028ecba4fbe311?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktdm0vYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy92bS9fdmFsaWRhdG9ycy5weQ==) | `73.69% <0%> (ø)` | :white_check_mark: | | [...-cli-role/azure/cli/command_modules/role/custom.py](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...60d0433c7c7a07f9ad38b5a2fa028ecba4fbe311?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcm9sZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3JvbGUvY3VzdG9tLnB5) | `20.44% <0%> (ø)` | :white_check_mark: | | ... and [14 more](https://codecov.io/gh/Azure/azure-cli/pull/2346?src=pr&el=tree-more) | | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2346?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2346?src=pr&el=footer). Last update [23b3145...60d0433](https://codecov.io/gh/Azure/azure-cli/compare/23b3145b4623edf2648ee28a101175199d92cb1c...60d0433c7c7a07f9ad38b5a2fa028ecba4fbe311?el=footer&src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/azure-cli.pyproj b/azure-cli.pyproj index 6a88538e3..c714d3247 100644 --- a/azure-cli.pyproj +++ b/azure-cli.pyproj @@ -333,6 +333,9 @@ <Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_vnet_gateway\lib\version.py" /> <Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_vnet_gateway\lib\vnet_gateway_creation_client.py" /> <Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_vnet_gateway\lib\__init__.py" /> + <Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\test_network_unit_tests.py"> + <SubType>Code</SubType> + </Compile> <Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\test_dns_zone_import.py"> <SubType>Code</SubType> </Compile> diff --git a/src/azure-cli-core/azure/cli/core/_profile.py b/src/azure-cli-core/azure/cli/core/_profile.py index e5bb75d77..a4b13bf17 100644 --- a/src/azure-cli-core/azure/cli/core/_profile.py +++ b/src/azure-cli-core/azure/cli/core/_profile.py @@ -10,6 +10,7 @@ import errno import json import os.path from pprint import pformat +from copy import deepcopy from enum import Enum import adal @@ -137,7 +138,8 @@ class Profile(object): subscriptions, is_service_principal) self._set_subscriptions(consolidated) - return consolidated + # use deepcopy as we don't want to persist these changes to file. + return deepcopy(consolidated) @staticmethod def _normalize_properties(user, subscriptions, is_service_principal): @@ -224,8 +226,10 @@ class Profile(object): def load_cached_subscriptions(self, all_clouds=False): subscriptions = self._storage.get(_SUBSCRIPTIONS) or [] active_cloud = get_active_cloud() - return [sub for sub in subscriptions - if all_clouds or sub[_ENVIRONMENT_NAME] == active_cloud.name] + cached_subscriptions = [sub for sub in subscriptions + if all_clouds or sub[_ENVIRONMENT_NAME] == active_cloud.name] + # use deepcopy as we don't want to persist these changes to file. + return deepcopy(cached_subscriptions) def get_current_account_user(self): try: @@ -282,7 +286,6 @@ class Profile(object): result[_ENVIRONMENT_NAME] = CLOUD.name result['subscriptionName'] = account[_SUBSCRIPTION_NAME] else: # has logged in through cli - from copy import deepcopy result = deepcopy(account) user_type = account[_USER_ENTITY].get(_USER_TYPE) if user_type == _SERVICE_PRINCIPAL: diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py index afe5d3ffd..3a7bd967c 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py @@ -39,12 +39,19 @@ from azure.cli.command_modules.network.zone_file.make_zone_file import make_zone logger = azlogging.get_az_logger(__name__) -def _upsert(collection, obj, key_name, key_value): - match = next((x for x in collection if getattr(x, key_name, None) == key_value), None) +def _upsert(parent, collection_name, obj_to_add, key_name): + + if not getattr(parent, collection_name, None): + setattr(parent, collection_name, []) + collection = getattr(parent, collection_name, None) + + value = getattr(obj_to_add, key_name) + match = next((x for x in collection if getattr(x, key_name, None) == value), None) if match: - logger.warning("Item '%s' already exists. Replacing with new values.", key_value) + logger.warning("Item '%s' already exists. Replacing with new values.", value) collection.remove(match) - collection.append(obj) + + collection.append(obj_to_add) #region Generic list commands def _generic_list(operation_name, resource_group_name): @@ -101,7 +108,7 @@ def create_ag_authentication_certificate(resource_group_name, application_gatewa ncf = _network_client_factory().application_gateways ag = ncf.get(resource_group_name, application_gateway_name) new_cert = AuthCert(data=cert_data, name=item_name) - _upsert(ag.authentication_certificates, new_cert, 'name', item_name) + _upsert(ag, 'authentication_certificates', new_cert, 'name') return ncf.create_or_update(resource_group_name, application_gateway_name, ag, raw=no_wait) def update_ag_authentication_certificate(instance, parent, item_name, cert_data): # pylint: disable=unused-argument @@ -114,7 +121,7 @@ def create_ag_backend_address_pool(resource_group_name, application_gateway_name ncf = _network_client_factory() ag = ncf.application_gateways.get(resource_group_name, application_gateway_name) new_pool = ApplicationGatewayBackendAddressPool(name=item_name, backend_addresses=servers) - _upsert(ag.backend_address_pools, new_pool, 'name', item_name) + _upsert(ag, 'backend_address_pools', new_pool, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) create_ag_backend_address_pool.__doc__ = AppGatewayOperations.create_or_update.__doc__ @@ -141,7 +148,7 @@ def create_ag_frontend_ip_configuration(resource_group_name, application_gateway private_ip_address=private_ip_address if private_ip_address else None, private_ip_allocation_method='Static' if private_ip_address else 'Dynamic', subnet=SubResource(subnet)) - _upsert(ag.frontend_ip_configurations, new_config, 'name', item_name) + _upsert(ag, 'frontend_ip_configurations', new_config, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) create_ag_frontend_ip_configuration.__doc__ = AppGatewayOperations.create_or_update.__doc__ @@ -165,7 +172,7 @@ def create_ag_frontend_port(resource_group_name, application_gateway_name, item_ ncf = _network_client_factory() ag = ncf.application_gateways.get(resource_group_name, application_gateway_name) new_port = ApplicationGatewayFrontendPort(name=item_name, port=port) - _upsert(ag.frontend_ports, new_port, 'name', item_name) + _upsert(ag, 'frontend_ports', new_port, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) @@ -188,7 +195,7 @@ def create_ag_http_listener(resource_group_name, application_gateway_name, item_ require_server_name_indication=True if ssl_cert and host_name else None, protocol='https' if ssl_cert else 'http', ssl_certificate=SubResource(ssl_cert) if ssl_cert else None) - _upsert(ag.http_listeners, new_listener, 'name', item_name) + _upsert(ag, 'http_listeners', new_listener, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) @@ -225,7 +232,7 @@ def create_ag_backend_http_settings_collection(resource_group_name, application_ request_timeout=timeout, probe=SubResource(probe) if probe else None, name=item_name) - _upsert(ag.backend_http_settings_collection, new_settings, 'name', item_name) + _upsert(ag, 'backend_http_settings_collection', new_settings, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) @@ -257,7 +264,7 @@ def create_ag_probe(resource_group_name, application_gateway_name, item_name, pr interval=interval, timeout=timeout, unhealthy_threshold=threshold) - _upsert(ag.probes, new_probe, 'name', item_name) + _upsert(ag, 'probes', new_probe, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) @@ -290,7 +297,7 @@ def create_ag_request_routing_rule(resource_group_name, application_gateway_name backend_http_settings=SubResource(http_settings), http_listener=SubResource(http_listener), url_path_map=SubResource(url_path_map) if url_path_map else None) - _upsert(ag.request_routing_rules, new_rule, 'name', item_name) + _upsert(ag, 'request_routing_rules', new_rule, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) @@ -316,7 +323,7 @@ def create_ag_ssl_certificate(resource_group_name, application_gateway_name, ite ag = ncf.application_gateways.get(resource_group_name, application_gateway_name) new_cert = ApplicationGatewaySslCertificate( name=item_name, data=cert_data, password=cert_password) - _upsert(ag.ssl_certificates, new_cert, 'name', item_name) + _upsert(ag, 'ssl_certificates', new_cert, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) create_ag_ssl_certificate.__doc__ = AppGatewayOperations.create_or_update.__doc__ @@ -359,7 +366,7 @@ def create_ag_url_path_map(resource_group_name, application_gateway_name, item_n backend_http_settings=SubResource(http_settings), paths=paths )]) - _upsert(ag.url_path_maps, new_map, 'name', item_name) + _upsert(ag, 'url_path_maps', new_map, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) @@ -387,7 +394,7 @@ def create_ag_url_path_map_rule(resource_group_name, application_gateway_name, u if address_pool else SubResource(url_map.default_backend_address_pool.id), backend_http_settings=SubResource(http_settings) \ if http_settings else SubResource(url_map.default_backend_http_settings.id)) - _upsert(url_map.path_rules, new_rule, 'name', item_name) + _upsert(url_map, 'path_rules', new_rule, 'name') return ncf.application_gateways.create_or_update( resource_group_name, application_gateway_name, ag, raw=no_wait) @@ -432,7 +439,7 @@ def create_lb_inbound_nat_rule( frontend_ip_configuration=frontend_ip, enable_floating_ip=floating_ip == 'true', idle_timeout_in_minutes=idle_timeout) - _upsert(lb.inbound_nat_rules, new_rule, 'name', item_name) + _upsert(lb, 'inbound_nat_rules', new_rule, 'name') poller = ncf.load_balancers.create_or_update(resource_group_name, load_balancer_name, lb) return _get_property(poller.result().inbound_nat_rules, item_name) @@ -467,7 +474,7 @@ def create_lb_inbound_nat_pool( frontend_port_range_start=frontend_port_range_start, frontend_port_range_end=frontend_port_range_end, backend_port=backend_port) - _upsert(lb.inbound_nat_pools, new_pool, 'name', item_name) + _upsert(lb, 'inbound_nat_pools', new_pool, 'name') poller = ncf.load_balancers.create_or_update(resource_group_name, load_balancer_name, lb) return _get_property(poller.result().inbound_nat_pools, item_name) @@ -500,7 +507,7 @@ def create_lb_frontend_ip_configuration( private_ip_allocation_method=private_ip_address_allocation, public_ip_address=PublicIPAddress(public_ip_address) if public_ip_address else None, subnet=Subnet(subnet) if subnet else None) - _upsert(lb.frontend_ip_configurations, new_config, 'name', item_name) + _upsert(lb, 'frontend_ip_configurations', new_config, 'name') poller = ncf.load_balancers.create_or_update(resource_group_name, load_balancer_name, lb) return _get_property(poller.result().frontend_ip_configurations, item_name) @@ -532,7 +539,7 @@ def create_lb_backend_address_pool(resource_group_name, load_balancer_name, item ncf = _network_client_factory() lb = ncf.load_balancers.get(resource_group_name, load_balancer_name) new_pool = BackendAddressPool(name=item_name) - _upsert(lb.backend_address_pools, new_pool, 'name', item_name) + _upsert(lb, 'backend_address_pools', new_pool, 'name') poller = ncf.load_balancers.create_or_update(resource_group_name, load_balancer_name, lb) return _get_property(poller.result().backend_address_pools, item_name) @@ -543,7 +550,7 @@ def create_lb_probe(resource_group_name, load_balancer_name, item_name, protocol new_probe = Probe( protocol, port, interval_in_seconds=interval, number_of_probes=threshold, request_path=path, name=item_name) - _upsert(lb.probes, new_probe, 'name', item_name) + _upsert(lb, 'probes', new_probe, 'name') poller = ncf.load_balancers.create_or_update(resource_group_name, load_balancer_name, lb) return _get_property(poller.result().probes, item_name) @@ -577,7 +584,7 @@ def create_lb_rule( load_distribution=load_distribution, enable_floating_ip=floating_ip == 'true', idle_timeout_in_minutes=idle_timeout) - _upsert(lb.load_balancing_rules, new_rule, 'name', item_name) + _upsert(lb, 'load_balancing_rules', new_rule, 'name') poller = ncf.load_balancers.create_or_update(resource_group_name, load_balancer_name, lb) return _get_property(poller.result().load_balancing_rules, item_name) @@ -658,7 +665,7 @@ def create_nic_ip_config(resource_group_name, network_interface_name, ip_config_ private_ip_allocation_method=private_ip_address_allocation, private_ip_address_version=private_ip_address_version, primary=make_primary) - _upsert(nic.ip_configurations, new_config, 'name', ip_config_name) + _upsert(nic, 'ip_configurations', new_config, 'name') poller = ncf.network_interfaces.create_or_update( resource_group_name, network_interface_name, nic) return _get_property(poller.result().ip_configurations, ip_config_name) @@ -708,19 +715,25 @@ def set_nic_ip_config(instance, parent, ip_config_name, subnet=None, # pylint: d return parent set_nic_ip_config.__doc__ = NicOperations.create_or_update.__doc__ +def _get_nic_ip_config(nic, name): + if nic.ip_configurations: + ip_config = next( + (x for x in nic.ip_configurations if x.name.lower() == name.lower()), None) + else: + ip_config = None + if not ip_config: + raise CLIError('IP configuration {} not found.'.format(name)) + return ip_config + def add_nic_ip_config_address_pool( resource_group_name, network_interface_name, ip_config_name, backend_address_pool, load_balancer_name=None): # pylint: disable=unused-argument client = _network_client_factory().network_interfaces nic = client.get(resource_group_name, network_interface_name) - ip_config = next( - (x for x in nic.ip_configurations if x.name.lower() == ip_config_name.lower()), None) - try: - _upsert(ip_config.load_balancer_backend_address_pools, - BackendAddressPool(backend_address_pool), - 'name', backend_address_pool) - except AttributeError: - ip_config.load_balancer_backend_address_pools = [BackendAddressPool(backend_address_pool)] + ip_config = _get_nic_ip_config(nic, ip_config_name) + _upsert(ip_config, 'load_balancer_backend_address_pools', + BackendAddressPool(backend_address_pool), + 'name') poller = client.create_or_update(resource_group_name, network_interface_name, nic) return _get_property(poller.result().ip_configurations, ip_config_name) @@ -729,10 +742,7 @@ def remove_nic_ip_config_address_pool( load_balancer_name=None): # pylint: disable=unused-argument client = _network_client_factory().network_interfaces nic = client.get(resource_group_name, network_interface_name) - ip_config = next( - (x for x in nic.ip_configurations if x.name.lower() == ip_config_name.lower()), None) - if not ip_config: - raise CLIError('IP configuration {} not found.'.format(ip_config_name)) + ip_config = _get_nic_ip_config(nic, ip_config_name) keep_items = \ [x for x in ip_config.load_balancer_backend_address_pools or [] \ if x.id != backend_address_pool] @@ -745,14 +755,10 @@ def add_nic_ip_config_inbound_nat_rule( load_balancer_name=None): # pylint: disable=unused-argument client = _network_client_factory().network_interfaces nic = client.get(resource_group_name, network_interface_name) - ip_config = next( - (x for x in nic.ip_configurations if x.name.lower() == ip_config_name.lower()), None) - try: - _upsert(ip_config.load_balancer_inbound_nat_rules, - InboundNatRule(inbound_nat_rule), - 'name', inbound_nat_rule) - except AttributeError: - ip_config.load_balancer_inbound_nat_rules = [InboundNatRule(inbound_nat_rule)] + ip_config = _get_nic_ip_config(nic, ip_config_name) + _upsert(ip_config, 'load_balancer_inbound_nat_rules', + InboundNatRule(inbound_nat_rule), + 'name') poller = client.create_or_update(resource_group_name, network_interface_name, nic) return _get_property(poller.result().ip_configurations, ip_config_name) @@ -761,10 +767,7 @@ def remove_nic_ip_config_inbound_nat_rule( load_balancer_name=None): # pylint: disable=unused-argument client = _network_client_factory().network_interfaces nic = client.get(resource_group_name, network_interface_name) - ip_config = next( - (x for x in nic.ip_configurations or [] if x.name.lower() == ip_config_name.lower()), None) - if not ip_config: - raise CLIError('IP configuration {} not found.'.format(ip_config_name)) + ip_config = _get_nic_ip_config(nic, ip_config_name) keep_items = \ [x for x in ip_config.load_balancer_inbound_nat_rules if x.id != inbound_nat_rule] ip_config.load_balancer_inbound_nat_rules = keep_items @@ -1074,7 +1077,7 @@ def create_vnet_gateway_root_cert(resource_group_name, gateway_name, public_cert config.vpn_client_root_certificates = [] cert = VpnClientRootCertificate(name=cert_name, public_cert_data=public_cert_data) - _upsert(config.vpn_client_root_certificates, cert, 'name', cert_name) + _upsert(config, 'vpn_client_root_certificates', cert, 'name') return ncf.create_or_update(resource_group_name, gateway_name, gateway) def delete_vnet_gateway_root_cert(resource_group_name, gateway_name, cert_name): @@ -1094,7 +1097,7 @@ def create_vnet_gateway_revoked_cert(resource_group_name, gateway_name, thumbpri config, gateway, ncf = _prep_cert_create(gateway_name, resource_group_name) cert = VpnClientRevokedCertificate(name=cert_name, thumbprint=thumbprint) - _upsert(config.vpn_client_revoked_certificates, cert, 'name', cert_name) + _upsert(config, 'vpn_client_revoked_certificates', cert, 'name') return ncf.create_or_update(resource_group_name, gateway_name, gateway) def delete_vnet_gateway_revoked_cert(resource_group_name, gateway_name, cert_name): diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py index caa1ea222..e30d0a245 100644 --- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py +++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py @@ -3,7 +3,6 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from copy import deepcopy import requests from adal.adal_error import AdalError from azure.cli.core.prompting import prompt_pass, NoTTYException @@ -85,8 +84,7 @@ def login(username=None, password=None, service_principal=None, tenant=None): raise CLIError(err) except requests.exceptions.ConnectionError as err: raise CLIError('Please ensure you have network connection. Error detail: ' + str(err)) - # use deepcopy as we don't want to persist these changes to file. - all_subscriptions = deepcopy(subscriptions) + all_subscriptions = list(subscriptions) for sub in all_subscriptions: sub['cloudName'] = sub.pop('environmentName', None) return all_subscriptions diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_params.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_params.py index 2cd7be83d..1e96ca573 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_params.py +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_params.py @@ -250,10 +250,9 @@ for item in ['create', 'update']: register_cli_argument('storage account create', 'access_tier', help='Required for StandardBlob accounts. The access tier used for billing. Cannot be set for StandardLRS, StandardGRS, StandardRAGRS, or PremiumLRS account types.', **enum_choice_list(AccessTier)) register_cli_argument('storage account update', 'access_tier', help='The access tier used for billing StandardBlob accounts. Cannot be set for StandardLRS, StandardGRS, StandardRAGRS, or PremiumLRS account types.', **enum_choice_list(AccessTier)) -register_cli_argument('storage account create', 'custom_domain', help='User domain assigned to the storage account. Name is the CNAME source.', validator=validate_custom_domain) +register_cli_argument('storage account create', 'custom_domain', help='User domain assigned to the storage account. Name is the CNAME source.') register_cli_argument('storage account update', 'custom_domain', help='User domain assigned to the storage account. Name is the CNAME source. Use "" to clear existing value.', validator=validate_custom_domain) -register_extra_cli_argument('storage account create', 'subdomain', options_list=('--use-subdomain',), help='Specify to enable indirect CNAME validation.', action='store_true') -register_extra_cli_argument('storage account update', 'subdomain', options_list=('--use-subdomain',), help='Specify whether to use indirect CNAME validation.', default=None, **enum_choice_list(['true', 'false'])) +register_cli_argument('storage account update', 'use_subdomain', help='Specify whether to use indirect CNAME validation.', **enum_choice_list(['true', 'false'])) register_cli_argument('storage account update', 'tags', tags_type, default=None) diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_validators.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_validators.py index 4648aa836..21beba5e9 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_validators.py +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_validators.py @@ -15,7 +15,6 @@ from azure.cli.core._util import CLIError from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.core.commands.validators import validate_key_value_pairs from azure.mgmt.storage import StorageManagementClient -from azure.mgmt.storage.models import CustomDomain from azure.storage.sharedaccesssignature import SharedAccessSignature from azure.storage.blob import Include, PublicAccess from azure.storage.blob.baseblobservice import BaseBlobService @@ -154,16 +153,19 @@ def validate_source_uri(namespace): # pylint: disable=too-many-statements validate_client_parameters(namespace) # must run first to resolve storage account # determine if the copy will happen in the same storage account + same_account = False if not source_account_name and source_account_key: raise ValueError(usage_string.format('Source account key is given but account name is not')) elif not source_account_name and not source_account_key: # neither source account name or key is given, assume that user intends to copy blob in # the same account + same_account = True source_account_name = ns.get('account_name', None) source_account_key = ns.get('account_key', None) elif source_account_name and not source_account_key: if source_account_name == ns.get('account_name', None): # the source account name is same as the destination account name + same_account = True source_account_key = ns.get('account_key', None) else: # the source account is different from destination account but the key is missing @@ -180,11 +182,11 @@ def validate_source_uri(namespace): # pylint: disable=too-many-statements if not sas: # generate a sas token even in the same account when the source and destination are not the # same kind. - if valid_file_source and ns.get('container_name', None): + if valid_file_source and (ns.get('container_name', None) or not same_account): dir_name, file_name = os.path.split(path) if path else (None, '') sas = _create_short_lived_file_sas(source_account_name, source_account_key, share, dir_name, file_name) - elif valid_blob_source and ns.get('share_name', None): + elif valid_blob_source and (ns.get('share_name', None) or not same_account): sas = _create_short_lived_blob_sas(source_account_name, source_account_key, container, blob) @@ -272,11 +274,8 @@ def get_content_setting_validator(settings_class, update): def validate_custom_domain(namespace): - if namespace.custom_domain: - namespace.custom_domain = CustomDomain(namespace.custom_domain, namespace.subdomain) - if namespace.subdomain and not namespace.custom_domain: - raise ValueError("must specify '--custom-domain' to use the '--use-subdomain' flag") - del namespace.subdomain + if namespace.use_subdomain and not namespace.custom_domain: + raise ValueError('usage error: --custom-domain DOMAIN [--use-subdomain]') def validate_encryption(namespace): diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/commands.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/commands.py index e7243fa56..247c7c6fe 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/commands.py +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/commands.py @@ -57,7 +57,7 @@ cli_command(__name__, 'storage account keys renew', mgmt_path + 'regenerate_key' cli_command(__name__, 'storage account keys list', mgmt_path + 'list_keys', factory, transform=lambda x: x.keys) cli_generic_update_command(__name__, 'storage account update', mgmt_path + 'get_properties', - mgmt_path + 'create', factory, + mgmt_path + 'update', factory, custom_function_op=custom_path + 'update_storage_account') cli_storage_data_plane_command('storage account generate-sas', 'azure.storage.cloudstorageaccount#CloudStorageAccount.generate_shared_access_signature', cloud_storage_account_service_factory) diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py index b89a8e196..0976aad5f 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py @@ -103,23 +103,26 @@ def create_storage_account(resource_group_name, account_name, sku, location, kind=Kind(kind), location=location, tags=tags, - custom_domain=CustomDomain(custom_domain) if custom_domain else None, + custom_domain=CustomDomain(custom_domain, None) if custom_domain else None, encryption=encryption, access_tier=AccessTier(access_tier) if access_tier else None) return scf.storage_accounts.create(resource_group_name, account_name, params) def update_storage_account(instance, sku=None, tags=None, custom_domain=None, - encryption=None, access_tier=None): + use_subdomain=None, encryption=None, access_tier=None): from azure.mgmt.storage.models import \ - (StorageAccountCreateParameters, Sku, CustomDomain, AccessTier) - - params = StorageAccountCreateParameters( + (StorageAccountUpdateParameters, Sku, CustomDomain, AccessTier) + domain = instance.custom_domain + if custom_domain is not None: + domain = CustomDomain(custom_domain) + if use_subdomain is not None: + domain.name = use_subdomain == 'true' + + params = StorageAccountUpdateParameters( sku=Sku(sku) if sku is not None else instance.sku, - kind=instance.kind, - location=instance.location, tags=tags if tags is not None else instance.tags, - custom_domain=CustomDomain(custom_domain) if custom_domain is not None else instance.custom_domain, # pylint: disable=line-too-long + custom_domain=domain, encryption=encryption if encryption is not None else instance.encryption, access_tier=AccessTier(access_tier) if access_tier is not None else instance.access_tier )
extension hack not working ### **This is autogenerated. Please review and update as needed.** ## Describe the bug **Command Name** `az hack` **Errors:** ``` libffi.so.6: cannot open shared object file: No such file or directory Traceback (most recent call last): python3.8/site-packages/knack/cli.py, ln 206, in invoke cmd_result = self.invocation.execute(args) cli/core/commands/__init__.py, ln 554, in execute parsed_args = self.parser.parse_args(args) python3.8/site-packages/knack/parser.py, ln 259, in parse_args return super(CLICommandParser, self).parse_args(args) ... site-packages/cryptography/x509/extensions.py, ln 20, in <module> from cryptography.hazmat.primitives import constant_time, serialization cryptography/hazmat/primitives/constant_time.py, ln 11, in <module> from cryptography.hazmat.bindings._constant_time import lib ImportError: libffi.so.6: cannot open shared object file: No such file or directory ``` ## To Reproduce: Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information. - _Put any pre-requisite steps here..._ - `az hack -h` ## Expected Behavior ## Environment Summary ``` Linux-5.4.0-47-generic-x86_64-with-glibc2.2.5 Python 3.8.1 azure-cli 2.1.0 * Extensions: hack 0.4.2 interactive 0.4.4 subscription 0.1.4 aks-preview 0.4.62 k8sconfiguration 0.1.7 azure-devops 0.17.0 ``` ## Additional Context <!--Please don't remove this:--> <!--auto-generated-->
Azure/azure-cli
diff --git a/scripts/automation/tests/run.py b/scripts/automation/tests/run.py index b3dc92b3e..76a98b118 100644 --- a/scripts/automation/tests/run.py +++ b/scripts/automation/tests/run.py @@ -20,14 +20,14 @@ def run_tests(modules, parallel, run_live): # create test results folder test_results_folder = get_test_results_dir(with_timestamp=True, prefix='tests') - # get test runner - run_nose = get_nose_runner(test_results_folder, xunit_report=True, exclude_integration=True, - parallel=parallel) - # set environment variable if run_live: os.environ['AZURE_CLI_TEST_RUN_LIVE'] = 'True' + # get test runner + run_nose = get_nose_runner(test_results_folder, xunit_report=True, exclude_integration=True, + parallel=parallel, process_timeout=3600 if run_live else 600) + # run tests test_folders = [test_path for _, _, test_path in modules] result, test_result = run_nose(test_folders) diff --git a/src/azure-cli-core/azure/cli/core/tests/test_profile.py b/src/azure-cli-core/azure/cli/core/tests/test_profile.py index 878e318f2..cef7e5644 100644 --- a/src/azure-cli-core/azure/cli/core/tests/test_profile.py +++ b/src/azure-cli-core/azure/cli/core/tests/test_profile.py @@ -157,13 +157,11 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method False) profile._set_subscriptions(consolidated) - subscription1 = storage_mock['subscriptions'][0] - subscription2 = storage_mock['subscriptions'][1] - self.assertTrue(subscription2['isDefault']) + self.assertTrue(storage_mock['subscriptions'][1]['isDefault']) - profile.set_active_subscription(subscription1['id']) - self.assertFalse(subscription2['isDefault']) - self.assertTrue(subscription1['isDefault']) + profile.set_active_subscription(storage_mock['subscriptions'][0]['id']) + self.assertFalse(storage_mock['subscriptions'][1]['isDefault']) + self.assertTrue(storage_mock['subscriptions'][0]['isDefault']) def test_get_subscription(self): storage_mock = {'subscriptions': None} diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_unit_tests.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_unit_tests.py new file mode 100644 index 000000000..66ab9a44d --- /dev/null +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_unit_tests.py @@ -0,0 +1,84 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import unittest + +import mock + +from azure.cli.core._util import CLIError + +class Test_Network_Unit_Tests(unittest.TestCase): + + def test_network_get_nic_ip_config(self): + from azure.cli.command_modules.network.custom import _get_nic_ip_config + + # 1 - Test that if ip_configurations property is null, error is thrown + nic = mock.MagicMock() + nic.ip_configurations = None + with self.assertRaises(CLIError): + _get_nic_ip_config(nic, 'test') + + def mock_ip_config(name, value): + fake = mock.MagicMock() + fake.name = name + fake.value = value + return fake + + nic = mock.MagicMock() + nic.ip_configurations = [ + mock_ip_config('test1', '1'), + mock_ip_config('test2', '2'), + mock_ip_config('test3', '3'), + ] + # 2 - Test that if ip_configurations is not null but no match, error is thrown + with self.assertRaises(CLIError): + _get_nic_ip_config(nic, 'test4') + + # 3 - Test that match is returned + self.assertEqual(_get_nic_ip_config(nic, 'test2').value, '2') + + def test_network_upsert(self): + from azure.cli.command_modules.network.custom import _upsert + + obj1 = mock.MagicMock() + obj1.key = 'object1' + obj1.value = 'cat' + + obj2 = mock.MagicMock() + obj2.key = 'object2' + obj2.value = 'dog' + + # 1 - verify upsert to a null collection + parent_with_null_collection = mock.MagicMock() + parent_with_null_collection.collection = None + _upsert(parent_with_null_collection, 'collection', obj1, 'key') + result = parent_with_null_collection.collection + self.assertEqual(len(result), 1) + self.assertEqual(result[0].value, 'cat') + + # 2 - verify upsert to an empty collection + parent_with_empty_collection = mock.MagicMock() + parent_with_empty_collection.collection = [] + _upsert(parent_with_empty_collection, 'collection', obj1, 'key') + result = parent_with_empty_collection.collection + self.assertEqual(len(result), 1) + self.assertEqual(result[0].value, 'cat') + + # 3 - verify can add more than one + _upsert(parent_with_empty_collection, 'collection', obj2, 'key') + result = parent_with_empty_collection.collection + self.assertEqual(len(result), 2) + self.assertEqual(result[1].value, 'dog') + + # 4 - verify update to existing collection + obj2.value = 'noodle' + _upsert(parent_with_empty_collection, 'collection', obj2, 'key') + result = parent_with_empty_collection.collection + self.assertEqual(len(result), 2) + self.assertEqual(result[1].value, 'noodle') + + +if __name__ == '__main__': + unittest.main() diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/recordings/test_storage_account_scenario.yaml b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/recordings/test_storage_account_scenario.yaml index 1c2f83a9e..1fc3a1527 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/recordings/test_storage_account_scenario.yaml +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/recordings/test_storage_account_scenario.yaml @@ -7,10 +7,10 @@ interactions: Connection: [keep-alive] Content-Length: ['73'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [d3fbbbf4-f3c9-11e6-ab1b-74c63bed1137] + x-ms-client-request-id: [9c9be3b6-fed7-11e6-8ca8-a0b3ccf7272a] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2016-12-01 response: @@ -20,7 +20,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:03 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:28 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -37,10 +37,10 @@ interactions: Connection: [keep-alive] Content-Length: ['73'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [d4c73850-f3c9-11e6-9371-74c63bed1137] + x-ms-client-request-id: [9d4cbb68-fed7-11e6-96c5-a0b3ccf7272a] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2016-12-01 response: @@ -50,7 +50,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:04 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:28 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -60,17 +60,17 @@ interactions: content-length: ['23'] status: {code: 200, message: OK} - request: - body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "location": "westus"}' + body: '{"sku": {"name": "Standard_LRS"}, "location": "westus", "kind": "Storage"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['74'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [d58758a8-f3c9-11e6-93c6-74c63bed1137] + x-ms-client-request-id: [9dfccaee-fed7-11e6-ac56-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: @@ -78,14 +78,14 @@ interactions: headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Wed, 15 Feb 2017 21:58:07 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:30 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/9147d762-549f-4705-a5ac-dbf05b9c7a94?monitor=true&api-version=2016-12-01'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/47260cb6-ad6b-4505-abf3-db1258120ff9?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] Retry-After: ['17'] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 202, message: Accepted} - request: body: null @@ -94,20 +94,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [d58758a8-f3c9-11e6-93c6-74c63bed1137] + x-ms-client-request-id: [9dfccaee-fed7-11e6-ac56-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/9147d762-549f-4705-a5ac-dbf05b9c7a94?monitor=true&api-version=2016-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/47260cb6-ad6b-4505-abf3-db1258120ff9?monitor=true&api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage000197884384","kind":"Storage","location":"westus","name":"vcrstorage000197884384","properties":{"creationTime":"2017-03-01T23:34:31.1193082Z","primaryEndpoints":{"blob":"https://vcrstorage000197884384.blob.core.windows.net/","file":"https://vcrstorage000197884384.file.core.windows.net/","queue":"https://vcrstorage000197884384.queue.core.windows.net/","table":"https://vcrstorage000197884384.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:24 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:47 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -117,28 +117,28 @@ interactions: content-length: ['776'] status: {code: 200, message: OK} - request: - body: '{"name": "vcrstorage733641907300", "type": "Microsoft.Storage/storageAccounts"}' + body: '{"name": "vcrstorage000197884384", "type": "Microsoft.Storage/storageAccounts"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['79'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [e1bebfcc-f3c9-11e6-a3b6-74c63bed1137] + x-ms-client-request-id: [a9a247a6-fed7-11e6-88e9-a0b3ccf7272a] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2016-12-01 response: - body: {string: '{"message":"The storage account named vcrstorage733641907300 is + body: {string: '{"message":"The storage account named vcrstorage000197884384 is already taken.","nameAvailable":false,"reason":"AlreadyExists"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:26 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:50 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -154,20 +154,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [e25fb3ac-f3c9-11e6-9d53-74c63bed1137] + x-ms-client-request-id: [aa39415a-fed7-11e6-b244-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts?api-version=2016-12-01 response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"}]} + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage000197884384","kind":"Storage","location":"westus","name":"vcrstorage000197884384","properties":{"creationTime":"2017-03-01T23:34:31.1193082Z","primaryEndpoints":{"blob":"https://vcrstorage000197884384.blob.core.windows.net/","file":"https://vcrstorage000197884384.file.core.windows.net/","queue":"https://vcrstorage000197884384.queue.core.windows.net/","table":"https://vcrstorage000197884384.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"}]} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:26 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:50 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -183,20 +183,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [e2e57f30-f3c9-11e6-b459-74c63bed1137] + x-ms-client-request-id: [aad6b914-fed7-11e6-8f5e-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage000197884384","kind":"Storage","location":"westus","name":"vcrstorage000197884384","properties":{"creationTime":"2017-03-01T23:34:31.1193082Z","primaryEndpoints":{"blob":"https://vcrstorage000197884384.blob.core.windows.net/","file":"https://vcrstorage000197884384.file.core.windows.net/","queue":"https://vcrstorage000197884384.queue.core.windows.net/","table":"https://vcrstorage000197884384.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:27 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:52 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -212,21 +212,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [e3620122-f3c9-11e6-9d80-74c63bed1137] + x-ms-client-request-id: [ab60fc00-fed7-11e6-8a97-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/usages?api-version=2016-12-01 response: body: {string: "{\r\n \"value\": [\r\n {\r\n \"unit\": \"Count\",\r\n\ - \ \"currentValue\": 41,\r\n \"limit\": 250,\r\n \"name\": {\r\ + \ \"currentValue\": 43,\r\n \"limit\": 250,\r\n \"name\": {\r\ \n \"value\": \"StorageAccounts\",\r\n \"localizedValue\": \"\ Storage Accounts\"\r\n }\r\n }\r\n ]\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:28 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:52 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -243,20 +243,20 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [e3f246c6-f3c9-11e6-8348-74c63bed1137] + x-ms-client-request-id: [abff0f12-fed7-11e6-8753-a0b3ccf7272a] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage/listKeys?api-version=2016-12-01 response: - body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"FvHhwyIgb9w4f9IP8q8hsco9YRMQx2Cmw7/twW6Z5BDSqV7E3glSpl6XjhGd4EBoH1y3Qs7ZydIzRdzXb5RUlA=="},{"keyName":"key2","permissions":"Full","value":"bl05+mAzQpLT0w07vniIWTHZfgxJ8M9ywLnk6NmJ0EsWmpa/QBeO9zK7AObh4pOmsIBgeQq7ibjoDYpLBjLxmw=="}]} + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"ItLmzJCF8AnEJIgk03B+Hnp6H7farh0R/pAriD55Jfpx1/h5VM7StJbEACuMPO+1yPL4F0JolztcG1Ma4wS1Sw=="},{"keyName":"key2","permissions":"Full","value":"sVCBmSEwOpBbPiI3MNKdBMJKBdrHun8OTUkiyRIkZQWwNbgt2xcfOFn0GluHepOkQ9Mopcjld8Xjxm7MfPD91g=="}]} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:29 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:53 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -264,7 +264,7 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['289'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -274,20 +274,20 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [e461e3c2-f3c9-11e6-a33d-74c63bed1137] + x-ms-client-request-id: [ac779990-fed7-11e6-b38f-a0b3ccf7272a] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage/listKeys?api-version=2016-12-01 response: - body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"FvHhwyIgb9w4f9IP8q8hsco9YRMQx2Cmw7/twW6Z5BDSqV7E3glSpl6XjhGd4EBoH1y3Qs7ZydIzRdzXb5RUlA=="},{"keyName":"key2","permissions":"Full","value":"bl05+mAzQpLT0w07vniIWTHZfgxJ8M9ywLnk6NmJ0EsWmpa/QBeO9zK7AObh4pOmsIBgeQq7ibjoDYpLBjLxmw=="}]} + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"ItLmzJCF8AnEJIgk03B+Hnp6H7farh0R/pAriD55Jfpx1/h5VM7StJbEACuMPO+1yPL4F0JolztcG1Ma4wS1Sw=="},{"keyName":"key2","permissions":"Full","value":"sVCBmSEwOpBbPiI3MNKdBMJKBdrHun8OTUkiyRIkZQWwNbgt2xcfOFn0GluHepOkQ9Mopcjld8Xjxm7MfPD91g=="}]} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:31 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:54 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -295,24 +295,24 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['289'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] - x-ms-date: ['Wed, 15 Feb 2017 21:58:33 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.1; Windows 10) AZURECLI/2.0.0+dev] + x-ms-client-request-id: [99cd850c-fed7-11e6-bb24-a0b3ccf7272a] + x-ms-date: ['Wed, 01 Mar 2017 23:34:55 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.blob.core.windows.net/?comp=properties&restype=service response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Wed, 15 Feb 2017 21:58:31 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:54 GMT'] Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -321,19 +321,19 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] - x-ms-date: ['Wed, 15 Feb 2017 21:58:34 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.1; Windows 10) AZURECLI/2.0.0+dev] + x-ms-client-request-id: [99cd850c-fed7-11e6-bb24-a0b3ccf7272a] + x-ms-date: ['Wed, 01 Mar 2017 23:34:55 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.queue.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.queue.core.windows.net/?comp=properties&restype=service response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Cache-Control: [no-cache] Content-Type: [application/xml] - Date: ['Wed, 15 Feb 2017 21:58:32 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:57 GMT'] Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -344,18 +344,18 @@ interactions: Connection: [keep-alive] DataServiceVersion: [3.0;NetFx] MaxDataServiceVersion: ['3.0'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] - x-ms-date: ['Wed, 15 Feb 2017 21:58:34 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.1; Windows 10) AZURECLI/2.0.0+dev] + x-ms-client-request-id: [99cd850c-fed7-11e6-bb24-a0b3ccf7272a] + x-ms-date: ['Wed, 01 Mar 2017 23:34:57 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.table.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.table.core.windows.net/?comp=properties&restype=service response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Wed, 15 Feb 2017 21:58:31 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:56 GMT'] Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -367,16 +367,16 @@ interactions: headers: Connection: [keep-alive] Content-Length: ['264'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] - x-ms-date: ['Wed, 15 Feb 2017 21:58:35 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.1; Windows 10) AZURECLI/2.0.0+dev] + x-ms-client-request-id: [99cd850c-fed7-11e6-bb24-a0b3ccf7272a] + x-ms-date: ['Wed, 01 Mar 2017 23:34:58 GMT'] x-ms-version: ['2015-07-08'] method: PUT - uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.blob.core.windows.net/?comp=properties&restype=service response: body: {string: ''} headers: - Date: ['Wed, 15 Feb 2017 21:58:32 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:57 GMT'] Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -385,18 +385,18 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] - x-ms-date: ['Wed, 15 Feb 2017 21:58:35 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.1; Windows 10) AZURECLI/2.0.0+dev] + x-ms-client-request-id: [99cd850c-fed7-11e6-bb24-a0b3ccf7272a] + x-ms-date: ['Wed, 01 Mar 2017 23:34:59 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.blob.core.windows.net/?comp=properties&restype=service response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>true</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>true</Enabled><Days>1</Days></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Wed, 15 Feb 2017 21:58:32 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:58 GMT'] Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -405,19 +405,19 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] - x-ms-date: ['Wed, 15 Feb 2017 21:58:35 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.1; Windows 10) AZURECLI/2.0.0+dev] + x-ms-client-request-id: [99cd850c-fed7-11e6-bb24-a0b3ccf7272a] + x-ms-date: ['Wed, 01 Mar 2017 23:34:59 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.queue.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.queue.core.windows.net/?comp=properties&restype=service response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Cache-Control: [no-cache] Content-Type: [application/xml] - Date: ['Wed, 15 Feb 2017 21:58:33 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:58 GMT'] Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -428,18 +428,18 @@ interactions: Connection: [keep-alive] DataServiceVersion: [3.0;NetFx] MaxDataServiceVersion: ['3.0'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] - x-ms-date: ['Wed, 15 Feb 2017 21:58:35 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.1; Windows 10) AZURECLI/2.0.0+dev] + x-ms-client-request-id: [99cd850c-fed7-11e6-bb24-a0b3ccf7272a] + x-ms-date: ['Wed, 01 Mar 2017 23:34:59 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.table.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.table.core.windows.net/?comp=properties&restype=service response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Wed, 15 Feb 2017 21:58:33 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:58 GMT'] Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -448,18 +448,18 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] - x-ms-date: ['Wed, 15 Feb 2017 21:58:36 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.1; Windows 10) AZURECLI/2.0.0+dev] + x-ms-client-request-id: [99cd850c-fed7-11e6-bb24-a0b3ccf7272a] + x-ms-date: ['Wed, 01 Mar 2017 23:34:59 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.blob.core.windows.net/?comp=properties&restype=service response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>true</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>true</Enabled><Days>1</Days></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Wed, 15 Feb 2017 21:58:33 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:58 GMT'] Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -468,18 +468,18 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] - x-ms-date: ['Wed, 15 Feb 2017 21:58:36 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.1; Windows 10) AZURECLI/2.0.0+dev] + x-ms-client-request-id: [99cd850c-fed7-11e6-bb24-a0b3ccf7272a] + x-ms-date: ['Wed, 01 Mar 2017 23:34:59 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.file.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.file.core.windows.net/?comp=properties&restype=service response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Wed, 15 Feb 2017 21:58:33 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:59 GMT'] Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -488,19 +488,19 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] - x-ms-date: ['Wed, 15 Feb 2017 21:58:36 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.1; Windows 10) AZURECLI/2.0.0+dev] + x-ms-client-request-id: [99cd850c-fed7-11e6-bb24-a0b3ccf7272a] + x-ms-date: ['Wed, 01 Mar 2017 23:34:59 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.queue.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.queue.core.windows.net/?comp=properties&restype=service response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Cache-Control: [no-cache] Content-Type: [application/xml] - Date: ['Wed, 15 Feb 2017 21:58:34 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:59 GMT'] Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -511,18 +511,18 @@ interactions: Connection: [keep-alive] DataServiceVersion: [3.0;NetFx] MaxDataServiceVersion: ['3.0'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] - x-ms-date: ['Wed, 15 Feb 2017 21:58:36 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.1; Windows 10) AZURECLI/2.0.0+dev] + x-ms-client-request-id: [99cd850c-fed7-11e6-bb24-a0b3ccf7272a] + x-ms-date: ['Wed, 01 Mar 2017 23:35:00 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.table.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.table.core.windows.net/?comp=properties&restype=service response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Wed, 15 Feb 2017 21:58:33 GMT'] + Date: ['Wed, 01 Mar 2017 23:34:59 GMT'] Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -534,16 +534,16 @@ interactions: headers: Connection: [keep-alive] Content-Length: ['386'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] - x-ms-date: ['Wed, 15 Feb 2017 21:58:37 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.1; Windows 10) AZURECLI/2.0.0+dev] + x-ms-client-request-id: [99cd850c-fed7-11e6-bb24-a0b3ccf7272a] + x-ms-date: ['Wed, 01 Mar 2017 23:35:00 GMT'] x-ms-version: ['2015-07-08'] method: PUT - uri: https://dummystorage.file.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.file.core.windows.net/?comp=properties&restype=service response: body: {string: ''} headers: - Date: ['Wed, 15 Feb 2017 21:58:34 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:00 GMT'] Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -552,18 +552,18 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] - x-ms-date: ['Wed, 15 Feb 2017 21:58:37 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.1; Windows 10) AZURECLI/2.0.0+dev] + x-ms-client-request-id: [99cd850c-fed7-11e6-bb24-a0b3ccf7272a] + x-ms-date: ['Wed, 01 Mar 2017 23:35:01 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.blob.core.windows.net/?comp=properties&restype=service response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>true</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>true</Enabled><Days>1</Days></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Wed, 15 Feb 2017 21:58:34 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:00 GMT'] Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -572,18 +572,18 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] - x-ms-date: ['Wed, 15 Feb 2017 21:58:37 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.1; Windows 10) AZURECLI/2.0.0+dev] + x-ms-client-request-id: [99cd850c-fed7-11e6-bb24-a0b3ccf7272a] + x-ms-date: ['Wed, 01 Mar 2017 23:35:01 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.file.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.file.core.windows.net/?comp=properties&restype=service response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><HourMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>true</Enabled><Days>1</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>true</Enabled><Days>1</Days></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Wed, 15 Feb 2017 21:58:35 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:01 GMT'] Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -592,19 +592,19 @@ interactions: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] - x-ms-date: ['Wed, 15 Feb 2017 21:58:37 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.1; Windows 10) AZURECLI/2.0.0+dev] + x-ms-client-request-id: [99cd850c-fed7-11e6-bb24-a0b3ccf7272a] + x-ms-date: ['Wed, 01 Mar 2017 23:35:01 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.queue.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.queue.core.windows.net/?comp=properties&restype=service response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Cache-Control: [no-cache] Content-Type: [application/xml] - Date: ['Wed, 15 Feb 2017 21:58:35 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:01 GMT'] Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -615,18 +615,18 @@ interactions: Connection: [keep-alive] DataServiceVersion: [3.0;NetFx] MaxDataServiceVersion: ['3.0'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.3; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [d1951d86-f3c9-11e6-849f-74c63bed1137] - x-ms-date: ['Wed, 15 Feb 2017 21:58:38 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.1; Windows 10) AZURECLI/2.0.0+dev] + x-ms-client-request-id: [99cd850c-fed7-11e6-bb24-a0b3ccf7272a] + x-ms-date: ['Wed, 01 Mar 2017 23:35:01 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.table.core.windows.net/?restype=service&comp=properties + uri: https://dummystorage.table.core.windows.net/?comp=properties&restype=service response: body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><StorageServiceProperties><Logging><Version>1.0</Version><Read>false</Read><Write>false</Write><Delete>false</Delete><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>true</Enabled><IncludeAPIs>true</IncludeAPIs><RetentionPolicy><Enabled>true</Enabled><Days>7</Days></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors\ \ /></StorageServiceProperties>"} headers: Content-Type: [application/xml] - Date: ['Wed, 15 Feb 2017 21:58:35 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:00 GMT'] Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] Transfer-Encoding: [chunked] x-ms-version: ['2015-07-08'] @@ -639,20 +639,20 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [e7dff490-f3c9-11e6-94b6-74c63bed1137] + x-ms-client-request-id: [b0eb465e-fed7-11e6-af56-a0b3ccf7272a] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage/listKeys?api-version=2016-12-01 response: - body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"FvHhwyIgb9w4f9IP8q8hsco9YRMQx2Cmw7/twW6Z5BDSqV7E3glSpl6XjhGd4EBoH1y3Qs7ZydIzRdzXb5RUlA=="},{"keyName":"key2","permissions":"Full","value":"bl05+mAzQpLT0w07vniIWTHZfgxJ8M9ywLnk6NmJ0EsWmpa/QBeO9zK7AObh4pOmsIBgeQq7ibjoDYpLBjLxmw=="}]} + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"ItLmzJCF8AnEJIgk03B+Hnp6H7farh0R/pAriD55Jfpx1/h5VM7StJbEACuMPO+1yPL4F0JolztcG1Ma4wS1Sw=="},{"keyName":"key2","permissions":"Full","value":"sVCBmSEwOpBbPiI3MNKdBMJKBdrHun8OTUkiyRIkZQWwNbgt2xcfOFn0GluHepOkQ9Mopcjld8Xjxm7MfPD91g=="}]} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:36 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:01 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -670,20 +670,20 @@ interactions: Connection: [keep-alive] Content-Length: ['19'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [e876def8-f3c9-11e6-92c4-74c63bed1137] + x-ms-client-request-id: [b17d4e74-fed7-11e6-8937-a0b3ccf7272a] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage/regenerateKey?api-version=2016-12-01 response: - body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"l03UHMDSrRKgCV8svPY6KwOJkLebUO4Ga+hTp6OOmbfgGHErym9xC0cqiRv1EFwD1qGl4n6L2meRzgmIIvwDtw=="},{"keyName":"key2","permissions":"Full","value":"bl05+mAzQpLT0w07vniIWTHZfgxJ8M9ywLnk6NmJ0EsWmpa/QBeO9zK7AObh4pOmsIBgeQq7ibjoDYpLBjLxmw=="}]} + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"u0uWulZ6Y6Ang3CrIvE/bT6y3xHip8viRr9RY88vKtv/LPSsYDZdXDOfP1SLswm3aiBzTZarZsbo4ssJqfBJ3g=="},{"keyName":"key2","permissions":"Full","value":"sVCBmSEwOpBbPiI3MNKdBMJKBdrHun8OTUkiyRIkZQWwNbgt2xcfOFn0GluHepOkQ9Mopcjld8Xjxm7MfPD91g=="}]} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:37 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:03 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -691,7 +691,7 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['289'] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: '{"keyName": "key2"}' @@ -701,20 +701,20 @@ interactions: Connection: [keep-alive] Content-Length: ['19'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [e8fa5966-f3c9-11e6-9f40-74c63bed1137] + x-ms-client-request-id: [b23a6bec-fed7-11e6-a4cf-a0b3ccf7272a] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage/regenerateKey?api-version=2016-12-01 response: - body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"l03UHMDSrRKgCV8svPY6KwOJkLebUO4Ga+hTp6OOmbfgGHErym9xC0cqiRv1EFwD1qGl4n6L2meRzgmIIvwDtw=="},{"keyName":"key2","permissions":"Full","value":"YfbqITRrz1Rtt8HMj/hKLxQDho6ZbojNZnjevh8Di8ZmWr4NYsneWY47IdSQTxUFSqrveoyrXwpp+xjNBVDVeA=="}]} + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"u0uWulZ6Y6Ang3CrIvE/bT6y3xHip8viRr9RY88vKtv/LPSsYDZdXDOfP1SLswm3aiBzTZarZsbo4ssJqfBJ3g=="},{"keyName":"key2","permissions":"Full","value":"aZHNVFhuVqvRgW4/6NW++p2F6tQfnTIi25FMnRw3tlL/l3vIzGuG9UuU3dbGsEOJyiZKMj/Zn8gIi2FZo0tUXQ=="}]} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:38 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:04 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -731,20 +731,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [e971ec5a-f3c9-11e6-98df-74c63bed1137] + x-ms-client-request-id: [b2ef2162-fed7-11e6-9a04-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage000197884384","kind":"Storage","location":"westus","name":"vcrstorage000197884384","properties":{"creationTime":"2017-03-01T23:34:31.1193082Z","primaryEndpoints":{"blob":"https://vcrstorage000197884384.blob.core.windows.net/","file":"https://vcrstorage000197884384.file.core.windows.net/","queue":"https://vcrstorage000197884384.queue.core.windows.net/","table":"https://vcrstorage000197884384.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:39 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:05 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -754,28 +754,27 @@ interactions: content-length: ['776'] status: {code: 200, message: OK} - request: - body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "tags": {"cat": "", - "foo": "bar"}, "location": "westus"}' + body: '{"sku": {"name": "Standard_LRS"}, "tags": {"foo": "bar", "cat": ""}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['109'] + Content-Length: ['68'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [e9ba9bba-f3c9-11e6-ad5f-74c63bed1137] - method: PUT + x-ms-client-request-id: [b319532c-fed7-11e6-8eb2-a0b3ccf7272a] + method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{"cat":"","foo":"bar"},"type":"Microsoft.Storage/storageAccounts"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage000197884384","kind":"Storage","location":"westus","name":"vcrstorage000197884384","properties":{"creationTime":"2017-03-01T23:34:31.1193082Z","primaryEndpoints":{"blob":"https://vcrstorage000197884384.blob.core.windows.net/","file":"https://vcrstorage000197884384.file.core.windows.net/","queue":"https://vcrstorage000197884384.queue.core.windows.net/","table":"https://vcrstorage000197884384.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{"cat":"","foo":"bar"},"type":"Microsoft.Storage/storageAccounts"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:39 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:06 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -783,7 +782,7 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['796'] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -792,20 +791,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [ea9f11d8-f3c9-11e6-aff0-74c63bed1137] + x-ms-client-request-id: [b4500b98-fed7-11e6-afb5-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{"cat":"","foo":"bar"},"type":"Microsoft.Storage/storageAccounts"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage000197884384","kind":"Storage","location":"westus","name":"vcrstorage000197884384","properties":{"creationTime":"2017-03-01T23:34:31.1193082Z","primaryEndpoints":{"blob":"https://vcrstorage000197884384.blob.core.windows.net/","file":"https://vcrstorage000197884384.file.core.windows.net/","queue":"https://vcrstorage000197884384.queue.core.windows.net/","table":"https://vcrstorage000197884384.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{"cat":"","foo":"bar"},"type":"Microsoft.Storage/storageAccounts"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:41 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:07 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -815,28 +814,27 @@ interactions: content-length: ['796'] status: {code: 200, message: OK} - request: - body: '{"sku": {"name": "Standard_GRS"}, "kind": "Storage", "tags": {}, "location": - "westus"}' + body: '{"sku": {"name": "Standard_GRS"}, "tags": {}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['86'] + Content-Length: ['45'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [eae678e6-f3c9-11e6-9c30-74c63bed1137] - method: PUT + x-ms-client-request-id: [b49a3afa-fed7-11e6-b7e6-a0b3ccf7272a] + method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","secondaryLocation":"eastus","statusOfPrimary":"available","statusOfSecondary":"available"},"sku":{"name":"Standard_GRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage000197884384","kind":"Storage","location":"westus","name":"vcrstorage000197884384","properties":{"creationTime":"2017-03-01T23:34:31.1193082Z","primaryEndpoints":{"blob":"https://vcrstorage000197884384.blob.core.windows.net/","file":"https://vcrstorage000197884384.file.core.windows.net/","queue":"https://vcrstorage000197884384.queue.core.windows.net/","table":"https://vcrstorage000197884384.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","secondaryLocation":"eastus","statusOfPrimary":"available","statusOfSecondary":"available"},"sku":{"name":"Standard_GRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:41 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:09 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -844,7 +842,7 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['837'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: body: null @@ -853,20 +851,20 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [ebb69412-f3c9-11e6-90d2-74c63bed1137] + x-ms-client-request-id: [b5e70440-fed7-11e6-9c11-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","secondaryLocation":"eastus","statusOfPrimary":"available","statusOfSecondary":"available"},"sku":{"name":"Standard_GRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage000197884384","kind":"Storage","location":"westus","name":"vcrstorage000197884384","properties":{"creationTime":"2017-03-01T23:34:31.1193082Z","primaryEndpoints":{"blob":"https://vcrstorage000197884384.blob.core.windows.net/","file":"https://vcrstorage000197884384.file.core.windows.net/","queue":"https://vcrstorage000197884384.queue.core.windows.net/","table":"https://vcrstorage000197884384.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","secondaryLocation":"eastus","statusOfPrimary":"available","statusOfSecondary":"available"},"sku":{"name":"Standard_GRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:42 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:11 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -876,28 +874,27 @@ interactions: content-length: ['837'] status: {code: 200, message: OK} - request: - body: '{"sku": {"name": "Standard_GRS"}, "kind": "Storage", "tags": {"test": "success"}, - "location": "westus"}' + body: '{"sku": {"name": "Standard_GRS"}, "tags": {"test": "success"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['103'] + Content-Length: ['62'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [ec0156a2-f3c9-11e6-accb-74c63bed1137] - method: PUT + x-ms-client-request-id: [b631db38-fed7-11e6-af1c-a0b3ccf7272a] + method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage733641907300","kind":"Storage","location":"westus","name":"vcrstorage733641907300","properties":{"creationTime":"2017-02-15T21:58:07.7815453Z","primaryEndpoints":{"blob":"https://vcrstorage733641907300.blob.core.windows.net/","file":"https://vcrstorage733641907300.file.core.windows.net/","queue":"https://vcrstorage733641907300.queue.core.windows.net/","table":"https://vcrstorage733641907300.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","secondaryLocation":"eastus","statusOfPrimary":"available","statusOfSecondary":"available"},"sku":{"name":"Standard_GRS","tier":"Standard"},"tags":{"test":"success"},"type":"Microsoft.Storage/storageAccounts"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/vcrstorage000197884384","kind":"Storage","location":"westus","name":"vcrstorage000197884384","properties":{"creationTime":"2017-03-01T23:34:31.1193082Z","primaryEndpoints":{"blob":"https://vcrstorage000197884384.blob.core.windows.net/","file":"https://vcrstorage000197884384.file.core.windows.net/","queue":"https://vcrstorage000197884384.queue.core.windows.net/","table":"https://vcrstorage000197884384.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","secondaryLocation":"eastus","statusOfPrimary":"available","statusOfSecondary":"available"},"sku":{"name":"Standard_GRS","tier":"Standard"},"tags":{"test":"success"},"type":"Microsoft.Storage/storageAccounts"} '} headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:43 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:12 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -905,7 +902,7 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['853'] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -915,10 +912,10 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [ec90ffe8-f3c9-11e6-8acd-74c63bed1137] + x-ms-client-request-id: [b785f78c-fed7-11e6-96c7-a0b3ccf7272a] method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_storage_account_scenario/providers/Microsoft.Storage/storageAccounts/dummystorage?api-version=2016-12-01 response: @@ -926,25 +923,25 @@ interactions: headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Wed, 15 Feb 2017 21:58:45 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:13 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: - body: '{"name": "vcrstorage733641907300", "type": "Microsoft.Storage/storageAccounts"}' + body: '{"name": "vcrstorage000197884384", "type": "Microsoft.Storage/storageAccounts"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['79'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [ed84472e-f3c9-11e6-b3f4-74c63bed1137] + x-ms-client-request-id: [b88a3394-fed7-11e6-b3ef-a0b3ccf7272a] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2016-12-01 response: @@ -954,7 +951,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:46 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:14 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -971,10 +968,10 @@ interactions: Connection: [keep-alive] Content-Length: ['73'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [ee15b978-f3c9-11e6-9fe3-74c63bed1137] + x-ms-client-request-id: [b8fa7600-fed7-11e6-8db2-a0b3ccf7272a] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2016-12-01 response: @@ -984,7 +981,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json] - Date: ['Wed, 15 Feb 2017 21:58:47 GMT'] + Date: ['Wed, 01 Mar 2017 23:35:15 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0]
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 3, "issue_text_score": 2, "test_score": 3 }, "num_modified_files": 8 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==1.1.0 -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@23b3145b4623edf2648ee28a101175199d92cb1c#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-core==1.24.2 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==2.0.0 azure-mgmt-compute==0.33.1rc1 azure-mgmt-containerregistry==0.1.1 azure-mgmt-dns==1.0.0 azure-mgmt-documentdb==0.1.0 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-network==0.30.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-sql==0.3.0 azure-mgmt-storage==0.31.0 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.31.0 azure-nspkg==3.0.2 azure-storage==0.33.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.7.1 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.1.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 wrapt==1.16.0 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==1.1.0 - azure-common==1.1.4 - azure-core==1.24.2 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==2.0.0 - azure-mgmt-compute==0.33.1rc1 - azure-mgmt-containerregistry==0.1.1 - azure-mgmt-dns==1.0.0 - azure-mgmt-documentdb==0.1.0 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-network==0.30.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-sql==0.3.0 - azure-mgmt-storage==0.31.0 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.31.0 - azure-nspkg==3.0.2 - azure-storage==0.33.0 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.7.1 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.1.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - wrapt==1.16.0 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_unit_tests.py::Test_Network_Unit_Tests::test_network_get_nic_ip_config", "src/command_modules/azure-cli-network/azure/cli/command_modules/network/tests/test_network_unit_tests.py::Test_Network_Unit_Tests::test_network_upsert" ]
[]
[ "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_create_token_cache", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_add_new_sp_creds", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_new_token_added_by_adal", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_remove_creds", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_particular_tenent", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_id", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_interactive_from_particular_tenent", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_through_interactive_flow", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_current_account_user", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info_for_logged_in_service_principal", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_login_credentials", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_login_credentials_for_graph_client", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_subscription", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_load_cached_tokens", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_logout", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_logout_all", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_normalize", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_set_active_subscription", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_update_add_two_different_subscriptions", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_update_with_same_subscription_added_twice" ]
[]
MIT License
null
Azure__azure-cli-2467
d79710730933432d2c8ccd722d31fbbf75845ce0
2017-03-11 06:05:00
eb12ac454cbe1ddb59c86cdf2045e1912660e750
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2467?src=pr&el=h1) Report > Merging [#2467](https://codecov.io/gh/Azure/azure-cli/pull/2467?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/d79710730933432d2c8ccd722d31fbbf75845ce0?src=pr&el=desc) will **increase** coverage by `0.01%`. > The diff coverage is `n/a`. ```diff @@ Coverage Diff @@ ## master #2467 +/- ## ========================================== + Coverage 72.44% 72.45% +0.01% ========================================== Files 362 362 Lines 19547 19547 Branches 2865 2865 ========================================== + Hits 14160 14162 +2 + Misses 4475 4472 -3 - Partials 912 913 +1 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/2467?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...zure-cli-vm/azure/cli/command_modules/vm/custom.py](https://codecov.io/gh/Azure/azure-cli/compare/d79710730933432d2c8ccd722d31fbbf75845ce0...47b28ad2c4278b0ec927820cf60d22de1d63b596?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktdm0vYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy92bS9jdXN0b20ucHk=) | `74.5% <ø> (+0.22%)` | :white_check_mark: | | [...dback/azure/cli/command_modules/feedback/custom.py](https://codecov.io/gh/Azure/azure-cli/compare/d79710730933432d2c8ccd722d31fbbf75845ce0...47b28ad2c4278b0ec927820cf60d22de1d63b596?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktZmVlZGJhY2svYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9mZWVkYmFjay9jdXN0b20ucHk=) | `34.69% <0%> (ø)` | :white_check_mark: | | [src/azure-cli-core/azure/cli/core/_util.py](https://codecov.io/gh/Azure/azure-cli/compare/d79710730933432d2c8ccd722d31fbbf75845ce0...47b28ad2c4278b0ec927820cf60d22de1d63b596?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL191dGlsLnB5) | `66.66% <0%> (ø)` | :white_check_mark: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2467?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2467?src=pr&el=footer). Last update [d797107...47b28ad](https://codecov.io/gh/Azure/azure-cli/compare/d79710730933432d2c8ccd722d31fbbf75845ce0...47b28ad2c4278b0ec927820cf60d22de1d63b596?src=pr&el=footer&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py index 3df308105..bcff81d87 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py @@ -160,7 +160,7 @@ helps['feature'] = """ helps['group'] = """ type: group - short-summary: Manage resource groups. + short-summary: Manage resource groups and template deployments. """ helps['group exists'] = """ diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py index da2c20927..22e31d7a2 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py @@ -1291,7 +1291,9 @@ def get_vmss_instance_view(resource_group_name, vm_scale_set_name, instance_id=N if instance_id: if instance_id == '*': return client.virtual_machine_scale_set_vms.list(resource_group_name, - vm_scale_set_name) + vm_scale_set_name, + select='instanceView', + expand='instanceView') else: return client.virtual_machine_scale_set_vms.get_instance_view(resource_group_name, vm_scale_set_name,
az vmss get-instance-view returns model view when specifying all VMs If you run the following to get the instance view for all VMs in a scale set: ``` az vmss get-instance-view -g rgname -n vmssname --instance-id \* ``` CLI does: ``` requests.packages.urllib3.connectionpool : https://management.azure.com:443 "GET /subscriptions/<subid>/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/vmssname/virtualMachines?api-version=2016-04-30-preview” ``` which returns the model view for all VMs. It should be doing: ``` requests.packages.urllib3.connectionpool : https://management.azure.com:443 "GET /subscriptions/<subid>/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/vmssname/virtualMachines?$expand=instanceView&$select=instanceView&api-version=2016-04-30-preview” ``` The instance-view command works fine if you just query one VM.
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py b/src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py index 54809d1d5..b6ff5ac31 100644 --- a/src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py +++ b/src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py @@ -14,7 +14,7 @@ from azure.cli.command_modules.vm.custom import (_get_access_extension_upgrade_i _LINUX_ACCESS_EXT, _WINDOWS_ACCESS_EXT) from azure.cli.command_modules.vm.custom import \ - (attach_unmanaged_data_disk, detach_data_disk) + (attach_unmanaged_data_disk, detach_data_disk, get_vmss_instance_view) from azure.cli.command_modules.vm.disk_encryption import enable, disable from azure.mgmt.compute.models import (NetworkProfile, StorageProfile, DataDisk, OSDisk, OperatingSystemTypes, InstanceViewStatus, @@ -196,6 +196,17 @@ class Test_Vm_Custom(unittest.TestCase): mock_vm_set.assert_called_once_with(vm) self.assertEqual(len(vm.storage_profile.data_disks), 0) + @mock.patch('azure.cli.command_modules.vm.custom._compute_client_factory') + def test_show_vmss_instance_view(self, factory_mock): + vm_client = mock.MagicMock() + factory_mock.return_value = vm_client + + # execute + get_vmss_instance_view('rg1', 'vmss1', '*') + # assert + vm_client.virtual_machine_scale_set_vms.list.assert_called_once_with('rg1', 'vmss1', expand='instanceView', + select='instanceView') + # pylint: disable=line-too-long @mock.patch('azure.cli.command_modules.vm.disk_encryption._compute_client_factory', autospec=True) @mock.patch('azure.cli.command_modules.vm.disk_encryption._get_keyvault_key_url', autospec=True)
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 2, "test_score": 0 }, "num_modified_files": 2 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==2.0.0 -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_datalake&subdirectory=src/command_modules/azure-cli-datalake -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-core==1.24.2 azure-datalake-store==0.0.5 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==3.0.0 azure-mgmt-compute==0.33.1rc1 azure-mgmt-containerregistry==0.1.1 azure-mgmt-datalake-analytics==0.1.3 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.3 azure-mgmt-dns==1.0.0 azure-mgmt-documentdb==0.1.0 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-network==0.30.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-sql==0.3.1 azure-mgmt-storage==0.31.0 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.31.0 azure-nspkg==3.0.2 azure-storage==0.33.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.1.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 Whoosh==2.7.4 wrapt==1.16.0 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==2.0.0 - azure-common==1.1.4 - azure-core==1.24.2 - azure-datalake-store==0.0.5 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==3.0.0 - azure-mgmt-compute==0.33.1rc1 - azure-mgmt-containerregistry==0.1.1 - azure-mgmt-datalake-analytics==0.1.3 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.3 - azure-mgmt-dns==1.0.0 - azure-mgmt-documentdb==0.1.0 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-network==0.30.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-sql==0.3.1 - azure-mgmt-storage==0.31.0 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.31.0 - azure-nspkg==3.0.2 - azure-storage==0.33.0 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.1.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - whoosh==2.7.4 - wrapt==1.16.0 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_show_vmss_instance_view" ]
[]
[ "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_attach_existing_datadisk_on_vm", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_attach_new_datadisk_custom_on_vm", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_attach_new_datadisk_default_on_vm", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_deattach_disk_on_vm", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_disable_boot_diagnostics_on_vm", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_disable_encryption_error_cases_handling", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_enable_boot_diagnostics_on_vm_never_enabled", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_enable_boot_diagnostics_skip_when_enabled_already", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_enable_encryption_error_cases_handling", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_get_access_extension_upgrade_info", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_merge_secrets" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_azure-cli-2467
Azure__azure-cli-2575
3b6324d00353405e547723056bb324fe3667731c
2017-03-21 17:17:09
350bb060e1fddf437f12788afbeedaa0cf61a87f
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2575?src=pr&el=h1) Report > Merging [#2575](https://codecov.io/gh/Azure/azure-cli/pull/2575?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/3b6324d00353405e547723056bb324fe3667731c?src=pr&el=desc) will **increase** coverage by `<.01%`. > The diff coverage is `100%`. ```diff @@ Coverage Diff @@ ## master #2575 +/- ## ========================================== + Coverage 72.32% 72.32% +<.01% ========================================== Files 363 363 Lines 19835 19838 +3 Branches 2923 2924 +1 ========================================== + Hits 14345 14348 +3 Misses 4582 4582 Partials 908 908 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/2575?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [src/azure-cli-core/azure/cli/core/\_profile.py](https://codecov.io/gh/Azure/azure-cli/compare/3b6324d00353405e547723056bb324fe3667731c...3eb700a6096e68ea881880a9e976c43d060eeed2?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL19wcm9maWxlLnB5) | `84.19% <100%> (+0.13%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2575?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2575?src=pr&el=footer). Last update [3b6324d...3eb700a](https://codecov.io/gh/Azure/azure-cli/compare/3b6324d00353405e547723056bb324fe3667731c...3eb700a6096e68ea881880a9e976c43d060eeed2?el=footer&src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/src/azure-cli-core/azure/cli/core/_profile.py b/src/azure-cli-core/azure/cli/core/_profile.py index 2312aa240..6c68bddcb 100644 --- a/src/azure-cli-core/azure/cli/core/_profile.py +++ b/src/azure-cli-core/azure/cli/core/_profile.py @@ -182,16 +182,22 @@ class Profile(object): s[_IS_DEFAULT_SUBSCRIPTION] = False if not new_active_one: - new_active_one = new_subscriptions[0] - new_active_one[_IS_DEFAULT_SUBSCRIPTION] = True - default_sub_id = new_active_one[_SUBSCRIPTION_ID] + new_active_one = Profile._pick_working_subscription(new_subscriptions) else: - new_subscriptions[0][_IS_DEFAULT_SUBSCRIPTION] = True - default_sub_id = new_subscriptions[0][_SUBSCRIPTION_ID] + new_active_one = Profile._pick_working_subscription(new_subscriptions) + + new_active_one[_IS_DEFAULT_SUBSCRIPTION] = True + default_sub_id = new_active_one[_SUBSCRIPTION_ID] set_cloud_subscription(active_cloud.name, default_sub_id) self._storage[_SUBSCRIPTIONS] = subscriptions + @staticmethod + def _pick_working_subscription(subscriptions): + from azure.mgmt.resource.subscriptions.models import SubscriptionState + s = next((x for x in subscriptions if x['state'] == SubscriptionState.enabled.value), None) + return s or subscriptions[0] + def set_active_subscription(self, subscription): # take id or name subscriptions = self.load_cached_subscriptions(all_clouds=True) active_cloud = get_active_cloud()
Login: do not set default on disabled subscriptions
Azure/azure-cli
diff --git a/src/azure-cli-core/tests/test_profile.py b/src/azure-cli-core/tests/test_profile.py index 08ab8288f..2ce6494ed 100644 --- a/src/azure-cli-core/tests/test_profile.py +++ b/src/azure-cli-core/tests/test_profile.py @@ -165,6 +165,19 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method self.assertFalse(storage_mock['subscriptions'][1]['isDefault']) self.assertTrue(storage_mock['subscriptions'][0]['isDefault']) + def test_default_active_subscription_to_non_disabled_one(self): + storage_mock = {'subscriptions': None} + profile = Profile(storage_mock) + + subscriptions = profile._normalize_properties( + self.user2, [self.subscription2, self.subscription1], False) + + profile._set_subscriptions(subscriptions) + + # verify we skip the overdued subscription and default to the 2nd one in the list + self.assertEqual(storage_mock['subscriptions'][1]['name'], self.subscription1.display_name) + self.assertTrue(storage_mock['subscriptions'][1]['isDefault']) + def test_get_subscription(self): storage_mock = {'subscriptions': None} profile = Profile(storage_mock)
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_short_problem_statement" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 3, "test_score": 0 }, "num_modified_files": 1 }
0.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==2.0.0 -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_datalake&subdirectory=src/command_modules/azure-cli-datalake -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@3b6324d00353405e547723056bb324fe3667731c#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-core==1.24.2 azure-datalake-store==0.0.5 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==3.0.0 azure-mgmt-compute==0.33.1rc1 azure-mgmt-containerregistry==0.2.0 azure-mgmt-datalake-analytics==0.1.3 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.3 azure-mgmt-dns==1.0.0 azure-mgmt-documentdb==0.1.0 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-network==0.30.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-sql==0.3.2 azure-mgmt-storage==0.31.0 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.31.0 azure-nspkg==3.0.2 azure-storage==0.33.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==2.0.0 - azure-common==1.1.4 - azure-core==1.24.2 - azure-datalake-store==0.0.5 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==3.0.0 - azure-mgmt-compute==0.33.1rc1 - azure-mgmt-containerregistry==0.2.0 - azure-mgmt-datalake-analytics==0.1.3 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.3 - azure-mgmt-dns==1.0.0 - azure-mgmt-documentdb==0.1.0 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-network==0.30.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-sql==0.3.2 - azure-mgmt-storage==0.31.0 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.31.0 - azure-nspkg==3.0.2 - azure-storage==0.33.0 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_default_active_subscription_to_non_disabled_one" ]
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_using_cert", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_service_principal_auth_client_cert" ]
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_create_token_cache", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_add_new_sp_creds", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds_with_cert", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds_with_secret", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_new_token_added_by_adal", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_remove_creds", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_particular_tenent", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_id", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_interactive_from_particular_tenent", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_through_interactive_flow", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_current_account_user", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_login_credentials", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_login_credentials_for_graph_client", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_subscription", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_load_cached_tokens", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_logout", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_logout_all", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_normalize", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_service_principal_auth_client_secret", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_set_active_subscription", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_update_add_two_different_subscriptions", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_update_with_same_subscription_added_twice" ]
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info_for_logged_in_service_principal" ]
MIT License
null
Azure__azure-cli-2624
29d8a30bfb42784c61c0c28e7515937272d276bc
2017-03-24 20:14:29
350bb060e1fddf437f12788afbeedaa0cf61a87f
diff --git a/azure-cli.pyproj b/azure-cli.pyproj index 40fc0e2dc..1b3a00234 100644 --- a/azure-cli.pyproj +++ b/azure-cli.pyproj @@ -587,6 +587,8 @@ <Folder Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_app_gateway\lib\" /> <Folder Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_app_gateway\lib\models\" /> <Folder Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_app_gateway\lib\operations\" /> + <Folder Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\" /> + <Folder Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\zone_files\" /> <Folder Include="command_modules\azure-cli-network\azure\cli\command_modules\network\zone_file\" /> <Folder Include="command_modules\azure-cli-network\tests\" /> <Folder Include="command_modules\azure-cli-network\tests\zone_files\" /> @@ -596,6 +598,7 @@ <Folder Include="command_modules\azure-cli-redis\azure\cli\command_modules\" /> <Folder Include="command_modules\azure-cli-redis\azure\cli\command_modules\redis\" /> <Folder Include="command_modules\azure-cli-redis\tests\" /> + <Folder Include="command_modules\azure-cli-resource\azure\cli\command_modules\resource\tests\" /> <Folder Include="command_modules\azure-cli-resource\tests\" /> <Folder Include="command_modules\azure-cli-role\tests\" /> <Folder Include="command_modules\azure-cli-redis\azure\cli\command_modules\redis\tests\" /> diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_params.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_params.py index fb0d3ea18..c76f2c1ff 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_params.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_params.py @@ -208,7 +208,7 @@ for scope in ['vm create', 'vmss create']: register_cli_argument(scope, 'use_unmanaged_disk', action='store_true', help='Do not use managed disk to persist VM', arg_group='Storage') register_cli_argument(scope, 'data_disk_sizes_gb', nargs='+', type=int, help='space separated empty managed data disk sizes in GB to create', arg_group='Storage') register_cli_argument(scope, 'image_data_disks', ignore_type) - for item in ['storage_account', 'public_ip', 'nsg', 'nic', 'vnet', 'load_balancer']: + for item in ['storage_account', 'public_ip', 'nsg', 'nic', 'vnet', 'load_balancer', 'app_gateway']: register_cli_argument(scope, '{}_type'.format(item), ignore_type) register_cli_argument(scope, 'vnet_name', help='Name of the virtual network when creating a new one or referencing an existing one.', arg_group='Network') @@ -231,10 +231,12 @@ register_cli_argument('vm create', 'attach_os_disk', help='Attach an existing OS register_cli_argument('vm create', 'availability_set', help='Name or ID of an existing availability set to add the VM to. None by default.') register_cli_argument('vmss create', 'vmss_name', name_arg_type, id_part=None, help='Name of the virtual machine scale set.', validator=process_vmss_create_namespace) -register_cli_argument('vmss create', 'load_balancer', help='Name to use when creating a new load balancer (default) or referencing an existing one. Can also reference an existing load balancer by ID or specify "" for none.', arg_group='Load Balancer') -register_cli_argument('vmss create', 'backend_pool_name', help='Name to use for the backend pool when creating a new load balancer.', arg_group='Load Balancer') -register_cli_argument('vmss create', 'nat_pool_name', help='Name to use for the NAT pool when creating a new load balancer.', arg_group='Load Balancer') -register_cli_argument('vmss create', 'backend_port', help='Backend port to open with NAT rules. Defaults to 22 on Linux and 3389 on Windows.', type=int, arg_group='Load Balancer') +register_cli_argument('vmss create', 'load_balancer', help='Name to use when creating a new load balancer (default) or referencing an existing one. Can also reference an existing load balancer by ID or specify "" for none.', options_list=['--load-balancer', '--lb'], arg_group='Network Balancer') +register_cli_argument('vmss create', 'application_gateway', help='Name to use when creating a new application gateway (default) or referencing an existing one. Can also reference an existing application gateway by ID or specify "" for none.', options_list=['--app-gateway'], arg_group='Network Balancer') +register_cli_argument('vmss create', 'backend_pool_name', help='Name to use for the backend pool when creating a new load balancer or application gateway.', arg_group='Network Balancer') +register_cli_argument('vmss create', 'nat_pool_name', help='Name to use for the NAT pool when creating a new load balancer.', options_list=['--lb-nat-pool-name', '--nat-pool-name'], arg_group='Network Balancer') +register_cli_argument('vmss create', 'backend_port', help='When creating a new load balancer, backend port to open with NAT rules (Defaults to 22 on Linux and 3389 on Windows). When creating an application gateway, the backend port to use for the backend HTTP settings.', type=int, arg_group='Network Balancer') +register_cli_argument('vmss create', 'app_gateway_subnet_address_prefix', help='The subnet IP address prefix to use when creating a new application gateway in CIDR format.', arg_group='Network Balancer') register_cli_argument('vmss create', 'instance_count', help='Number of VMs in the scale set.', type=int) register_cli_argument('vmss create', 'disable_overprovision', help='Overprovision option (see https://azure.microsoft.com/en-us/documentation/articles/virtual-machine-scale-sets-overview/ for details).', action='store_true') register_cli_argument('vmss create', 'upgrade_policy_mode', help=None, **enum_choice_list(UpgradeMode)) diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_template_builder.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_template_builder.py index d0440e807..5ec47d161 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_template_builder.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_template_builder.py @@ -411,13 +411,10 @@ def _build_data_disks(profile, data_disk_sizes_gb, image_data_disks, return profile -def build_load_balancer_resource(name, location, tags, backend_pool_name, nat_pool_name, - backend_port, frontend_ip_name, public_ip_id, subnet_id, - private_ip_address='', private_ip_allocation='dynamic'): - lb_id = "resourceId('Microsoft.Network/loadBalancers', '{}')".format(name) - +def _build_frontend_ip_config(name, public_ip_id=None, private_ip_allocation=None, + private_ip_address=None, subnet_id=None): frontend_ip_config = { - 'name': frontend_ip_name + 'name': name } if public_ip_id: @@ -438,6 +435,109 @@ def build_load_balancer_resource(name, location, tags, backend_pool_name, nat_po } } }) + return frontend_ip_config + + +def build_application_gateway_resource(name, location, tags, backend_pool_name, backend_port, + frontend_ip_name, public_ip_id, + subnet_id, gateway_subnet_id, + private_ip_address, private_ip_allocation): + frontend_ip_config = _build_frontend_ip_config(frontend_ip_name, public_ip_id, + private_ip_address, private_ip_allocation, + subnet_id) + + def _ag_subresource_id(_type, name): + return "[concat(variables('appGwID'), '/{}/{}')]".format(_type, name) + + frontend_ip_config_id = _ag_subresource_id('frontendIPConfigurations', frontend_ip_name) + frontend_port_id = _ag_subresource_id('frontendPorts', 'appGwFrontendPort') + http_listener_id = _ag_subresource_id('httpListeners', 'appGwHttpListener') + backend_address_pool_id = _ag_subresource_id('backendAddressPools', backend_pool_name) + backend_http_settings_id = _ag_subresource_id( + 'backendHttpSettingsCollection', 'appGwBackendHttpSettings') + + ag_properties = { + 'backendAddressPools': [ + { + 'name': backend_pool_name + } + ], + 'backendHttpSettingsCollection': [ + { + 'name': 'appGwBackendHttpSettings', + 'properties': { + 'Port': backend_port, + 'Protocol': 'Http', + 'CookieBasedAffinity': 'Disabled' + } + } + ], + 'frontendIPConfigurations': [frontend_ip_config], + 'frontendPorts': [ + { + 'name': 'appGwFrontendPort', + 'properties': { + 'Port': 80 + } + } + ], + 'gatewayIPConfigurations': [ + { + 'name': 'appGwIpConfig', + 'properties': { + 'subnet': {'id': gateway_subnet_id} + } + } + ], + 'httpListeners': [ + { + 'name': 'appGwHttpListener', + 'properties': { + 'FrontendIPConfiguration': {'Id': frontend_ip_config_id}, + 'FrontendPort': {'Id': frontend_port_id}, + 'Protocol': 'Http', + 'SslCertificate': None + } + } + ], + 'sku': { + 'name': 'Standard_Large', + 'tier': 'Standard', + 'capacity': '10' + }, + 'requestRoutingRules': [ + { + 'Name': 'rule1', + 'properties': { + 'RuleType': 'Basic', + 'httpListener': {'id': http_listener_id}, + 'backendAddressPool': {'id': backend_address_pool_id}, + 'backendHttpSettings': {'id': backend_http_settings_id} + } + } + ] + } + + ag = { + 'type': 'Microsoft.Network/applicationGateways', + 'name': name, + 'location': location, + 'tags': tags, + 'apiVersion': '2015-06-15', + 'dependsOn': [], + 'properties': ag_properties + } + return ag + + +def build_load_balancer_resource(name, location, tags, backend_pool_name, nat_pool_name, + backend_port, frontend_ip_name, public_ip_id, subnet_id, + private_ip_address, private_ip_allocation): + lb_id = "resourceId('Microsoft.Network/loadBalancers', '{}')".format(name) + + frontend_ip_config = _build_frontend_ip_config(frontend_ip_name, public_ip_id, + private_ip_address, private_ip_allocation, + subnet_id) lb_properties = { 'backendAddressPools': [ @@ -464,13 +564,13 @@ def build_load_balancer_resource(name, location, tags, backend_pool_name, nat_po } lb = { - "type": "Microsoft.Network/loadBalancers", - "name": name, - "location": location, - "tags": tags, - "apiVersion": "2015-06-15", - "dependsOn": [], - "properties": lb_properties + 'type': 'Microsoft.Network/loadBalancers', + 'name': name, + 'location': location, + 'tags': tags, + 'apiVersion': '2015-06-15', + 'dependsOn': [], + 'properties': lb_properties } return lb @@ -513,8 +613,11 @@ def build_vmss_resource(name, naming_prefix, location, tags, overprovision, upgr 'subnet': {'id': subnet_id} } } + if backend_address_pool_id: - ip_configuration['properties']['loadBalancerBackendAddressPools'] = [ + key = 'loadBalancerBackendAddressPools' if 'loadBalancers' in backend_address_pool_id \ + else 'ApplicationGatewayBackendAddressPools' + ip_configuration['properties'][key] = [ {'id': backend_address_pool_id} ] diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py index 2bc5ab655..08009d150 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py @@ -199,7 +199,15 @@ storage_profile_param_options = { } -def _validate_required_forbidden_parameters(namespace, required, forbidden): +network_balancer_param_options = { + 'application_gateway': '--application-gateway', + 'load_balancer': '--load-balancer', + 'app_gateway_subnet_address_prefix': '--app-gateway-subnet-address-prefix', + 'backend_pool_name': '--backend-pool-name' +} + + +def _validate_storage_required_forbidden_parameters(namespace, required, forbidden): missing_required = [x for x in required if not getattr(namespace, x)] included_forbidden = [x for x in forbidden if getattr(namespace, x)] if missing_required or included_forbidden: @@ -216,6 +224,22 @@ def _validate_required_forbidden_parameters(namespace, required, forbidden): raise CLIError(error) +def _validate_network_balancer_required_forbidden_parameters(namespace, required, forbidden, desc): + missing_required = [x for x in required if not getattr(namespace, x)] + included_forbidden = [x for x in forbidden if getattr(namespace, x)] + if missing_required or included_forbidden: + error = 'invalid usage for network balancer: {}'.format(desc) + if missing_required: + missing_string = ', '.join( + network_balancer_param_options[x] for x in missing_required) + error = '{}\n\tmissing: {}'.format(error, missing_string) + if included_forbidden: + forbidden_string = ', '.join( + network_balancer_param_options[x] for x in included_forbidden) + error = '{}\n\tnot applicable: {}'.format(error, forbidden_string) + raise CLIError(error) + + def _validate_managed_disk_sku(sku): allowed_skus = ['Premium_LRS', 'Standard_LRS'] @@ -309,7 +333,7 @@ def _validate_vm_create_storage_profile(namespace, for_scale_set=False): namespace.storage_sku = 'Standard_LRS' if for_scale_set else 'Premium_LRS' # Now verify that the status of required and forbidden parameters - _validate_required_forbidden_parameters(namespace, required, forbidden) + _validate_storage_required_forbidden_parameters(namespace, required, forbidden) if namespace.storage_profile == StorageProfile.ManagedCustomImage: # extract additional information from a managed custom image @@ -452,6 +476,10 @@ def _validate_vmss_create_subnet(namespace): raise CLIError(err.format(namespace.instance_count)) namespace.subnet_address_prefix = '{}/{}'.format(cidr, i) + if namespace.app_gateway_type and namespace.app_gateway_subnet_address_prefix is None: + raise CLIError('Must specify --gateway-subnet-address-prefix to create an ' + 'application gateway.') + def _validate_vm_create_nsg(namespace): @@ -481,10 +509,10 @@ def _validate_vm_create_public_ip(namespace): def _validate_vmss_create_public_ip(namespace): - if namespace.load_balancer_type is None: + if namespace.load_balancer_type is None and namespace.app_gateway_type is None: if namespace.public_ip_address: - raise CLIError('--public-ip-address is not applicable when there is no load-balancer ' - 'attached, or implictly disabled due to 100+ instance count') + raise CLIError('--public-ip-address can only be used when creating a new load ' + 'balancer or application gateway frontend.') namespace.public_ip_address = '' _validate_vm_create_public_ip(namespace) @@ -696,36 +724,90 @@ def process_vm_create_namespace(namespace): # region VMSS Create Validators +def _get_vmss_create_instance_threshold(): + return 100 + + +def _validate_vmss_create_load_balancer_or_app_gateway(namespace): + + INSTANCE_THRESHOLD = _get_vmss_create_instance_threshold() -def _validate_vmss_create_load_balancer(namespace): # convert the single_placement_group to boolean for simpler logic beyond if namespace.single_placement_group is None: - namespace.single_placement_group = namespace.instance_count <= 100 + namespace.single_placement_group = namespace.instance_count <= INSTANCE_THRESHOLD else: namespace.single_placement_group = (namespace.single_placement_group == 'true') - if not namespace.single_placement_group: + if not namespace.single_placement_group and namespace.load_balancer: + raise CLIError( + '--load-balancer is not applicable when --single-placement-group is turned off.') + + if namespace.load_balancer and namespace.application_gateway: + raise CLIError('incorrect usage: --load-balancer NAME_OR_ID | ' + '--application-gateway NAME_OR_ID') + + if namespace.instance_count > INSTANCE_THRESHOLD and namespace.load_balancer: + raise CLIError( + '--load-balancer cannot be used with --instance_count is > {}'.format( + INSTANCE_THRESHOLD)) + + # Resolve the type of balancer (if any) being used + balancer_type = 'None' + if namespace.load_balancer is None and namespace.application_gateway is None: + # use defaulting rules to determine + balancer_type = 'loadBalancer' if namespace.instance_count <= INSTANCE_THRESHOLD \ + else 'applicationGateway' + elif namespace.load_balancer: + balancer_type = 'loadBalancer' + elif namespace.application_gateway: + balancer_type = 'applicationGateway' + + if balancer_type == 'applicationGateway': + + if namespace.application_gateway: + if check_existence(namespace.application_gateway, namespace.resource_group_name, + 'Microsoft.Network', 'applicationGateways'): + namespace.app_gateway_type = 'existing' + else: + namespace.app_gateway_type = 'new' + elif namespace.application_gateway == '': + namespace.app_gateway_type = None + elif namespace.application_gateway is None: + namespace.app_gateway_type = 'new' + + # AppGateway frontend + required = [] + if namespace.app_gateway_type == 'new': + required.append('app_gateway_subnet_address_prefix') + elif namespace.app_gateway_type == 'existing': + required.append('backend_pool_name') + forbidden = ['nat_pool_name', 'load_balancer'] + _validate_network_balancer_required_forbidden_parameters( + namespace, required, forbidden, 'application gateway') + + elif balancer_type == 'loadBalancer': + # LoadBalancer frontend + required = [] + forbidden = ['app_gateway_subnet_address_prefix', 'application_gateway'] + _validate_network_balancer_required_forbidden_parameters( + namespace, required, forbidden, 'load balancer') + if namespace.load_balancer: - raise CLIError('--load-balancer is not applicable when --single-placement-group is ' - 'explictly turned off or implictly turned off for 100+ instance count') - namespace.load_balancer = '' - - if namespace.load_balancer: - if check_existence(namespace.load_balancer, namespace.resource_group_name, - 'Microsoft.Network', 'loadBalancers'): - namespace.load_balancer_type = 'existing' - else: + if check_existence(namespace.load_balancer, namespace.resource_group_name, + 'Microsoft.Network', 'loadBalancers'): + namespace.load_balancer_type = 'existing' + else: + namespace.load_balancer_type = 'new' + elif namespace.load_balancer == '': + namespace.load_balancer_type = None + elif namespace.load_balancer is None: namespace.load_balancer_type = 'new' - elif namespace.load_balancer == '': - namespace.load_balancer_type = None - elif namespace.load_balancer is None: - namespace.load_balancer_type = 'new' def process_vmss_create_namespace(namespace): get_default_location_from_resource_group(namespace) _validate_vm_create_storage_profile(namespace, for_scale_set=True) - _validate_vmss_create_load_balancer(namespace) + _validate_vmss_create_load_balancer_or_app_gateway(namespace) _validate_vm_create_vnet(namespace, for_scale_set=True) _validate_vmss_create_subnet(namespace) _validate_vmss_create_public_ip(namespace) diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py index 04e1d09f2..2c1df1830 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py @@ -725,7 +725,7 @@ def _get_extension_instance_name(instance_view, publisher, extension_type_name, full_type_name = '.'.join([publisher, extension_type_name]) if instance_view.extensions: ext = next((x for x in instance_view.extensions - if x.type.lower() == full_type_name.lower())) + if x.type.lower() == full_type_name.lower()), None) if ext: extension_instance_name = ext.name return extension_instance_name @@ -1442,7 +1442,7 @@ def list_vmss_instance_connection_info(resource_group_name, vm_scale_set_name): vm_scale_set_name) # find the load balancer nic_configs = vmss.virtual_machine_profile.network_profile.network_interface_configurations - primary_nic_config = next(n for n in nic_configs if n.primary) + primary_nic_config = next((n for n in nic_configs if n.primary), None) if primary_nic_config is None: raise CLIError('could not find a primary nic which is needed to search to load balancer') ip_configs = primary_nic_config.ip_configurations @@ -1659,7 +1659,9 @@ def create_vmss(vmss_name, resource_group_name, image, admin_username=getpass.getuser(), admin_password=None, authentication_type=None, vm_sku="Standard_D1_v2", no_wait=False, ssh_dest_key_path=None, ssh_key_value=None, generate_ssh_keys=False, - load_balancer=None, backend_pool_name=None, nat_pool_name=None, backend_port=None, + load_balancer=None, application_gateway=None, + app_gateway_subnet_address_prefix=None, + backend_pool_name=None, nat_pool_name=None, backend_port=None, public_ip_address=None, public_ip_address_allocation='dynamic', public_ip_address_dns_name=None, os_caching=None, data_caching=None, @@ -1669,7 +1671,8 @@ def create_vmss(vmss_name, resource_group_name, image, vnet_name=None, vnet_address_prefix='10.0.0.0/16', subnet=None, subnet_address_prefix=None, os_offer=None, os_publisher=None, os_sku=None, os_version=None, - load_balancer_type=None, vnet_type=None, public_ip_type=None, storage_profile=None, + load_balancer_type=None, app_gateway_type=None, vnet_type=None, + public_ip_type=None, storage_profile=None, single_placement_group=None, custom_data=None, secrets=None): from azure.cli.core.commands.client_factory import get_subscription_id from azure.cli.core._util import random_string @@ -1677,7 +1680,7 @@ def create_vmss(vmss_name, resource_group_name, image, ArmTemplateBuilder, StorageProfile, build_vmss_resource, build_storage_account_resource, build_vnet_resource, build_public_ip_resource, build_load_balancer_resource, build_output_deployment_resource, build_deployment_resource, - build_vmss_storage_account_pool_resource) + build_vmss_storage_account_pool_resource, build_application_gateway_resource) from azure.cli.core._profile import CLOUD from azure.mgmt.resource.resources import ResourceManagementClient @@ -1688,6 +1691,10 @@ def create_vmss(vmss_name, resource_group_name, image, subscription=get_subscription_id(), resource_group=resource_group_name, namespace='Microsoft.Network') + scrubbed_name = vmss_name.replace('-', '').lower()[:5] + naming_prefix = '{}{}'.format(scrubbed_name, + random_string(9 - len(scrubbed_name), force_lower=True)) + # determine final defaults and calculated values tags = tags or {} os_disk_name = os_disk_name or 'osdisk_{}'.format(random_string(10)) @@ -1698,16 +1705,33 @@ def create_vmss(vmss_name, resource_group_name, image, master_template = ArmTemplateBuilder() vmss_dependencies = [] + + # VNET will always be a dependency if vnet_type == 'new': vnet_name = vnet_name or '{}VNET'.format(vmss_name) subnet = subnet or '{}Subnet'.format(vmss_name) vmss_dependencies.append('Microsoft.Network/virtualNetworks/{}'.format(vnet_name)) - master_template.add_resource(build_vnet_resource( - vnet_name, location, tags, vnet_address_prefix, subnet, subnet_address_prefix)) + vnet = build_vnet_resource( + vnet_name, location, tags, vnet_address_prefix, subnet, subnet_address_prefix) + if app_gateway_type: + vnet['properties']['subnets'].append({ + 'name': 'appGwSubnet', + 'properties': { + 'addressPrefix': app_gateway_subnet_address_prefix + } + }) + master_template.add_resource(vnet) subnet_id = subnet if is_valid_resource_id(subnet) else \ '{}/virtualNetworks/{}/subnets/{}'.format(network_id_template, vnet_name, subnet) + gateway_subnet_id = \ + '{}/virtualNetworks/{}/subnets/appGwSubnet'.format(network_id_template, vnet_name) \ + if app_gateway_type == 'new' else None + + # public IP is used by either load balancer/application gateway + public_ip_address_id = public_ip_address if is_valid_resource_id(public_ip_address) else None + # Handle load balancer creation if load_balancer_type == 'new': load_balancer = load_balancer or '{}LB'.format(vmss_name) vmss_dependencies.append('Microsoft.Network/loadBalancers/{}'.format(load_balancer)) @@ -1720,10 +1744,8 @@ def create_vmss(vmss_name, resource_group_name, image, tags, public_ip_address_allocation, public_ip_address_dns_name)) - public_ip_address_id = None - if public_ip_address: - public_ip_address_id = public_ip_address if is_valid_resource_id(public_ip_address) \ - else '{}/publicIPAddresses/{}'.format(network_id_template, public_ip_address) + public_ip_address_id = '{}/publicIPAddresses/{}'.format(network_id_template, + public_ip_address) # calculate default names if not provided backend_pool_name = backend_pool_name or '{}BEPool'.format(load_balancer) @@ -1733,14 +1755,43 @@ def create_vmss(vmss_name, resource_group_name, image, lb_resource = build_load_balancer_resource( load_balancer, location, tags, backend_pool_name, nat_pool_name, backend_port, - 'loadBalancerFrontEnd', public_ip_address_id, subnet_id) + 'loadBalancerFrontEnd', public_ip_address_id, subnet_id, + private_ip_address='', private_ip_allocation='Dynamic') lb_resource['dependsOn'] = lb_dependencies master_template.add_resource(lb_resource) - scrubbed_name = vmss_name.replace('-', '').lower()[:5] - naming_prefix = '{}{}'.format(scrubbed_name, - random_string(9 - len(scrubbed_name), force_lower=True)) + # Or handle application gateway creation + app_gateway = application_gateway + if app_gateway_type == 'new': + app_gateway = application_gateway or '{}AG'.format(vmss_name) + vmss_dependencies.append('Microsoft.Network/applicationGateways/{}'.format(app_gateway)) + + ag_dependencies = [] + if public_ip_type == 'new': + public_ip_address = public_ip_address or '{}PublicIP'.format(app_gateway) + ag_dependencies.append('Microsoft.Network/publicIpAddresses/{}'.format(public_ip_address)) # pylint: disable=line-too-long + master_template.add_resource(build_public_ip_resource(public_ip_address, location, + tags, + public_ip_address_allocation, + public_ip_address_dns_name)) + public_ip_address_id = '{}/publicIPAddresses/{}'.format(network_id_template, + public_ip_address) + # calculate default names if not provided + backend_pool_name = backend_pool_name or '{}BEPool'.format(app_gateway) + backend_port = backend_port or 80 + + ag_resource = build_application_gateway_resource( + app_gateway, location, tags, backend_pool_name, backend_port, 'appGwFrontendIP', + public_ip_address_id, subnet_id, gateway_subnet_id, private_ip_address='', + private_ip_allocation='Dynamic') + ag_resource['dependsOn'] = ag_dependencies + master_template.add_variable( + 'appGwID', + "[resourceId('Microsoft.Network/applicationGateways', '{}')]".format(app_gateway)) + master_template.add_resource(ag_resource) + + # create storage accounts if needed for unmanaged disk storage if storage_profile in [StorageProfile.SACustomImage, StorageProfile.SAPirImage]: master_template.add_resource(build_vmss_storage_account_pool_resource( 'storageLoop', location, tags, storage_sku)) @@ -1755,18 +1806,27 @@ def create_vmss(vmss_name, resource_group_name, image, backend_address_pool_id = None inbound_nat_pool_id = None - if is_valid_resource_id(load_balancer): - backend_address_pool_id = \ - '{}/backendAddressPools/{}'.format(load_balancer, backend_pool_name) \ - if load_balancer_type else None - inbound_nat_pool_id = '{}/inboundNatPools/{}'.format(load_balancer, nat_pool_name) \ - if load_balancer_type == 'new' else None - else: - backend_address_pool_id = '{}/loadBalancers/{}/backendAddressPools/{}'.format( - network_id_template, load_balancer, backend_pool_name) if load_balancer_type else None - inbound_nat_pool_id = '{}/loadBalancers/{}/inboundNatPools/{}'.format( - network_id_template, load_balancer, nat_pool_name) if load_balancer_type == 'new' \ - else None + if load_balancer_type or app_gateway_type: + network_balancer = load_balancer or app_gateway + balancer_type = 'loadBalancers' if load_balancer_type else 'applicationGateways' + + if is_valid_resource_id(network_balancer): + # backend address pool needed by load balancer or app gateway + backend_address_pool_id = \ + '{}/backendAddressPools/{}'.format(network_balancer, backend_pool_name) + + # nat pool only applies to new load balancers + inbound_nat_pool_id = '{}/inboundNatPools/{}'.format(load_balancer, nat_pool_name) \ + if load_balancer_type == 'new' else None + else: + # backend address pool needed by load balancer or app gateway + backend_address_pool_id = '{}/{}/{}/backendAddressPools/{}'.format( + network_id_template, balancer_type, network_balancer, backend_pool_name) + + # nat pool only applies to new load balancers + inbound_nat_pool_id = '{}/loadBalancers/{}/inboundNatPools/{}'.format( + network_id_template, load_balancer, nat_pool_name) if load_balancer_type == 'new' \ + else None ip_config_name = '{}IPConfig'.format(naming_prefix) nic_name = '{}Nic'.format(naming_prefix)
`az vm extension set` crashes ``` az vm extension set -n IaaSAntimalware --publisher Microsoft.Azure.Security -g TestDesktop_RG --vm-name vmAWB10Test09 Traceback (most recent call last): File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/azure/cli/main.py", line 37, in main cmd_result = APPLICATION.execute(args) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/azure/cli/core/application.py", line 157, in execute result = expanded_arg.func(params) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 358, in _execute_command raise ex File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 353, in _execute_command result = op(client, **kwargs) if client else op(**kwargs) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/azure/cli/command_modules/vm/custom.py", line 861, in set_extension instance_name = _get_extension_instance_name(vm.instance_view, publisher, vm_extension_name) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/azure/cli/command_modules/vm/custom.py", line 712, in _get_extension_instance_name ext = next((x for x in instance_view.extensions StopIteration ```
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py b/src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py index 7ea9fe5ab..29b1c0205 100644 --- a/src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py +++ b/src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py @@ -12,7 +12,8 @@ from azure.cli.command_modules.vm.custom import enable_boot_diagnostics, disable _merge_secrets from azure.cli.command_modules.vm.custom import (_get_access_extension_upgrade_info, _LINUX_ACCESS_EXT, - _WINDOWS_ACCESS_EXT) + _WINDOWS_ACCESS_EXT, + _get_extension_instance_name) from azure.cli.command_modules.vm.custom import \ (attach_unmanaged_data_disk, detach_data_disk, get_vmss_instance_view) from azure.cli.command_modules.vm.disk_encryption import enable, disable, _check_encrypt_is_supported @@ -342,6 +343,18 @@ class Test_Vm_Custom(unittest.TestCase): vault123Expected.sort(key=lambda x: x['certificateUrl']) self.assertListEqual(vault123Expected, vault123) + def test_get_extension_instance_name(self): + instance_view = mock.MagicMock() + extension = mock.MagicMock() + extension.type = 'publisher2.extension2' + instance_view.extensions = [extension] + + # action + result = _get_extension_instance_name(instance_view, 'publisher1', 'extension1') + + # assert + self.assertEqual(result, 'extension1') + class FakedVM: # pylint: disable=too-few-public-methods,old-style-class def __init__(self, nics=None, disks=None, os_disk=None): diff --git a/src/command_modules/azure-cli-vm/tests/test_vm_defaults.py b/src/command_modules/azure-cli-vm/tests/test_vm_defaults.py index 9543ccd5f..4ebb92bb8 100644 --- a/src/command_modules/azure-cli-vm/tests/test_vm_defaults.py +++ b/src/command_modules/azure-cli-vm/tests/test_vm_defaults.py @@ -175,6 +175,8 @@ class TestVMSSCreateDefaultVnet(unittest.TestCase): ns.vnet_type = 'new' ns.vnet_address_prefix = '10.0.0.0/16' ns.subnet_address_prefix = None + ns.app_gateway_type = 'new' + ns.app_gateway_subnet_address_prefix = '10.0.1.0/22' ns.instance_count = 1000 _validate_vmss_create_subnet(ns) self.assertEqual('10.0.0.0/22', ns.subnet_address_prefix) @@ -184,6 +186,8 @@ class TestVMSSCreateDefaultVnet(unittest.TestCase): ns.vnet_type = 'new' ns.vnet_address_prefix = '10.0.0.0/16' ns.subnet_address_prefix = None + ns.app_gateway_type = None + ns.app_gateway_subnet_address_prefix = None ns.instance_count = 2 _validate_vmss_create_subnet(ns) self.assertEqual('10.0.0.0/24', ns.subnet_address_prefix)
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 3, "issue_text_score": 1, "test_score": 2 }, "num_modified_files": 5 }
0.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==2.0.0 -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_datalake&subdirectory=src/command_modules/azure-cli-datalake -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@29d8a30bfb42784c61c0c28e7515937272d276bc#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-core==1.24.2 azure-datalake-store==0.0.5 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==3.0.0 azure-mgmt-compute==0.33.1rc1 azure-mgmt-containerregistry==0.2.0 azure-mgmt-datalake-analytics==0.1.3 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.3 azure-mgmt-dns==1.0.0 azure-mgmt-documentdb==0.1.0 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-monitor==0.1.0 azure-mgmt-network==0.30.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-sql==0.3.3 azure-mgmt-storage==0.31.0 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.31.0 azure-monitor==0.2.0 azure-nspkg==3.0.2 azure-storage==0.33.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==2.0.0 - azure-common==1.1.4 - azure-core==1.24.2 - azure-datalake-store==0.0.5 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==3.0.0 - azure-mgmt-compute==0.33.1rc1 - azure-mgmt-containerregistry==0.2.0 - azure-mgmt-datalake-analytics==0.1.3 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.3 - azure-mgmt-dns==1.0.0 - azure-mgmt-documentdb==0.1.0 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-monitor==0.1.0 - azure-mgmt-network==0.30.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-sql==0.3.3 - azure-mgmt-storage==0.31.0 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.31.0 - azure-monitor==0.2.0 - azure-nspkg==3.0.2 - azure-storage==0.33.0 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_get_extension_instance_name" ]
[]
[ "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_attach_existing_datadisk_on_vm", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_attach_new_datadisk_custom_on_vm", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_attach_new_datadisk_default_on_vm", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_deattach_disk_on_vm", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_disable_boot_diagnostics_on_vm", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_disable_encryption_error_cases_handling", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_enable_boot_diagnostics_on_vm_never_enabled", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_enable_boot_diagnostics_skip_when_enabled_already", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_enable_encryption_error_cases_handling", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_encryption_distro_check", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_get_access_extension_upgrade_info", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_merge_secrets", "src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_show_vmss_instance_view", "src/command_modules/azure-cli-vm/tests/test_vm_defaults.py::TestVMCreateDefaultVnet::test_matching_vnet_specified_location", "src/command_modules/azure-cli-vm/tests/test_vm_defaults.py::TestVMCreateDefaultVnet::test_no_matching_vnet", "src/command_modules/azure-cli-vm/tests/test_vm_defaults.py::TestVMSSCreateDefaultVnet::test_matching_vnet_no_subnet_size_matching", "src/command_modules/azure-cli-vm/tests/test_vm_defaults.py::TestVMSSCreateDefaultVnet::test_matching_vnet_subnet_size_matching", "src/command_modules/azure-cli-vm/tests/test_vm_defaults.py::TestVMSSCreateDefaultVnet::test_new_subnet_size_for_big_vmss", "src/command_modules/azure-cli-vm/tests/test_vm_defaults.py::TestVMSSCreateDefaultVnet::test_new_subnet_size_for_small_vmss", "src/command_modules/azure-cli-vm/tests/test_vm_defaults.py::TestVMCreateDefaultStorageAccount::test_matching_storage_account_specified_location", "src/command_modules/azure-cli-vm/tests/test_vm_defaults.py::TestVMCreateDefaultStorageAccount::test_no_matching_storage_account", "src/command_modules/azure-cli-vm/tests/test_vm_defaults.py::TestVMDefaultAuthType::test_default_linux", "src/command_modules/azure-cli-vm/tests/test_vm_defaults.py::TestVMDefaultAuthType::test_default_windows", "src/command_modules/azure-cli-vm/tests/test_vm_defaults.py::TestVMDefaultAuthType::test_linux_with_password" ]
[]
MIT License
null
Azure__azure-cli-2751
678b940f29230f53fd7cbec7211842e99658ed3d
2017-04-04 17:41:26
eb12ac454cbe1ddb59c86cdf2045e1912660e750
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=h1) Report > Merging [#2751](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/1ccca6b1c767efed9068f41446e2689e1b2f8ecf?src=pr&el=desc) will **increase** coverage by `0.02%`. > The diff coverage is `46.51%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/2751/graphs/tree.svg?width=650&height=150&src=pr&token=2pog0TKvF8)](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #2751 +/- ## ========================================== + Coverage 61.15% 61.17% +0.02% ========================================== Files 480 480 Lines 25743 25762 +19 Branches 3898 3901 +3 ========================================== + Hits 15742 15759 +17 - Misses 9068 9077 +9 + Partials 933 926 -7 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...twork/azure/cli/command\_modules/network/\_params.py](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbmV0d29yay9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL25ldHdvcmsvX3BhcmFtcy5weQ==) | `92.49% <100%> (-0.04%)` | :arrow_down: | | [...network/azure/cli/command\_modules/network/\_help.py](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbmV0d29yay9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL25ldHdvcmsvX2hlbHAucHk=) | `100% <100%> (ø)` | :arrow_up: | | [...etwork/azure/cli/command\_modules/network/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbmV0d29yay9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL25ldHdvcmsvY3VzdG9tLnB5) | `62.46% <21.05%> (-0.37%)` | :arrow_down: | | [...k/azure/cli/command\_modules/network/\_validators.py](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbmV0d29yay9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL25ldHdvcmsvX3ZhbGlkYXRvcnMucHk=) | `63.97% <60%> (+0.34%)` | :arrow_up: | | [...-cli-role/azure/cli/command\_modules/role/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcm9sZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3JvbGUvY3VzdG9tLnB5) | `19.28% <0%> (ø)` | :arrow_up: | | [...work/azure/cli/command\_modules/network/commands.py](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbmV0d29yay9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL25ldHdvcmsvY29tbWFuZHMucHk=) | `98.98% <0%> (ø)` | :arrow_up: | | [...dback/azure/cli/command\_modules/feedback/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktZmVlZGJhY2svYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9mZWVkYmFjay9jdXN0b20ucHk=) | `34.69% <0%> (ø)` | :arrow_up: | | [src/azure-cli-core/azure/cli/core/util.py](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL3V0aWwucHk=) | `68.99% <0%> (ø)` | :arrow_up: | | [...e/cli/command\_modules/network/\_template\_builder.py](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbmV0d29yay9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL25ldHdvcmsvX3RlbXBsYXRlX2J1aWxkZXIucHk=) | `86.17% <0%> (+2.12%)` | :arrow_up: | | ... and [1 more](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=tree-more) | | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=footer). Last update [1ccca6b...e2d2234](https://codecov.io/gh/Azure/azure-cli/pull/2751?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). tjprescott: @derekbekoe ``` Command az network vnet-gateway create: Create a virtual network gateway. Arguments --name -n [Required]: Name of the VNet gateway. --public-ip-addresses [Required]: Specify a single public IP (name or ID) for an active-standby gateway. Specify two public IPs for an active-active gateway. --resource-group -g [Required]: Name of resource group. You can configure the default group using 'az configure --defaults group=<name>'. --vnet [Required]: Name or ID of an existing virtual network which has a subnet named 'GatewaySubnet'. --address-prefixes : Space separated list of address prefixes to associate with the VNet gateway. --gateway-type : The gateway type. Allowed values: ExpressRoute, Vpn. Default: Vpn. --location -l : Location. You can configure the default location using 'az configure --defaults location=<location>'. --no-wait : Do not wait for the long running operation to finish. --sku : VNet gateway SKU. Allowed values: Basic, HighPerformance, Standard, UltraPerformance. Default: Basic. --tags : Space separated tags in 'key[=value]' format. Use "" to clear existing tags. --vpn-type : VPN routing type. Allowed values: PolicyBased, RouteBased. Default: RouteBased. BGP Peering Arguments --asn : Autonomous System Number to use for the BGP settings. --bgp-peering-address : IP address to use for BGP peering. --peer-weight : Weight (0-100) added to routes learned through BGP peering. ``` The relevant text for update is the same. derekbekoe: @tjprescott Looking at the help for `--public-ip-addresses`, how do I know how to specify 2 ip addresses? Maybe say that it should be space separated? tjprescott: @derekbekoe good point. It used to say space-separated. I'll add that back in.
diff --git a/src/command_modules/azure-cli-network/HISTORY.rst b/src/command_modules/azure-cli-network/HISTORY.rst index ab972d502..b7c518c89 100644 --- a/src/command_modules/azure-cli-network/HISTORY.rst +++ b/src/command_modules/azure-cli-network/HISTORY.rst @@ -5,7 +5,7 @@ Release History unreleased ++++++++++++++++++ - +* Add support for active-active VNet gateways * Remove nulls values from output of `network vpn-connection list/show` commands. 2.0.2 (2017-04-03) diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_help.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_help.py index ce2b253d2..d8e754bbe 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_help.py +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_help.py @@ -1764,6 +1764,11 @@ helps['network vnet-gateway update'] = """ type: command short-summary: Update a virtual network gateway. """ + +helps['network vnet-gateway wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the virtual network gateway is met. +""" #endregion # region VNet Gateway Revoke Cert @@ -1788,7 +1793,7 @@ helps['network vnet-gateway revoked-cert delete'] = """ # region VNet Gateway Root Cert helps['network vnet-gateway root-cert'] = """ type: group - short-summary: Manage root certificates for a virtuak network gateway. + short-summary: Manage root certificates for a virtual network gateway. """ helps['network vnet-gateway root-cert create'] = """ diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_params.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_params.py index 55b665ef8..fa33e4fe4 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_params.py +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_params.py @@ -35,14 +35,14 @@ from azure.cli.command_modules.network._validators import \ process_public_ip_create_namespace, validate_private_ip_address, process_lb_frontend_ip_namespace, process_local_gateway_create_namespace, process_tm_endpoint_create_namespace, process_vnet_create_namespace, - process_vnet_gateway_create_namespace, process_vpn_connection_create_namespace, + process_vnet_gateway_create_namespace, process_vnet_gateway_update_namespace, + process_vpn_connection_create_namespace, process_ag_ssl_policy_set_namespace, process_route_table_create_namespace, validate_auth_cert, validate_cert, validate_inbound_nat_rule_id_list, validate_address_pool_id_list, validate_inbound_nat_rule_name_or_id, validate_address_pool_name_or_id, validate_servers, load_cert_file, validate_metadata, validate_peering_type, validate_dns_record_type, - get_public_ip_validator, get_nsg_validator, get_subnet_validator, - get_virtual_network_validator) + get_public_ip_validator, get_nsg_validator, get_subnet_validator) from azure.mgmt.network.models import ApplicationGatewaySslProtocol from azure.cli.command_modules.network.custom import list_traffic_manager_endpoints @@ -480,17 +480,15 @@ register_cli_argument('network vnet-gateway', 'sku', help='VNet gateway SKU.', * register_cli_argument('network vnet-gateway', 'vpn_type', help='VPN routing type.', **enum_choice_list(VpnType)) register_cli_argument('network vnet-gateway', 'bgp_peering_address', arg_group='BGP Peering', help='IP address to use for BGP peering.') register_cli_argument('network vnet-gateway', 'address_prefixes', help='Space separated list of address prefixes to associate with the VNet gateway.', nargs='+') +register_cli_argument('network vnet-gateway', 'public_ip_address', options_list=['--public-ip-addresses'], nargs='+', help='Specify a single public IP (name or ID) for an active-standby gateway. Specify two space-separated public IPs for an active-active gateway.', completer=get_resource_name_completion_list('Microsoft.Network/publicIPAddresses')) + register_cli_argument('network vnet-gateway create', 'asn', validator=process_vnet_gateway_create_namespace) register_cli_argument('network vnet-gateway update', 'enable_bgp', help='Enable BGP (Border Gateway Protocol)', arg_group='BGP Peering', **enum_choice_list(['true', 'false'])) -register_cli_argument('network vnet-gateway update', 'public_ip_address', help='Name or ID of a public IP address.', validator=get_public_ip_validator()) -register_cli_argument('network vnet-gateway update', 'virtual_network', virtual_network_name_type, options_list=('--vnet',), help="Name or ID of a virtual network that contains a subnet named 'GatewaySubnet'.", validator=get_virtual_network_validator()) - -public_ip_help = get_folded_parameter_help_string('public IP address') -register_cli_argument('network vnet-gateway create', 'public_ip_address', help=public_ip_help, completer=get_resource_name_completion_list('Microsoft.Network/publicIPAddresses'), validator=get_public_ip_validator()) +register_cli_argument('network vnet-gateway update', 'virtual_network', virtual_network_name_type, options_list=('--vnet',), help="Name or ID of a virtual network that contains a subnet named 'GatewaySubnet'.", validator=process_vnet_gateway_update_namespace) vnet_help = "Name or ID of an existing virtual network which has a subnet named 'GatewaySubnet'." -register_cli_argument('network vnet-gateway create', 'virtual_network', options_list=('--vnet',), help=vnet_help, validator=get_virtual_network_validator()) +register_cli_argument('network vnet-gateway create', 'virtual_network', options_list=('--vnet',), help=vnet_help) register_cli_argument('network vnet-gateway root-cert create', 'public_cert_data', help='Base64 contents of the root certificate file or file path.', type=file_type, completer=FilesCompleter(), validator=load_cert_file('public_cert_data')) register_cli_argument('network vnet-gateway root-cert create', 'cert_name', help='Root certificate name', options_list=('--name', '-n')) diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_validators.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_validators.py index 3d48e6e30..22c3c2309 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_validators.py +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_validators.py @@ -174,15 +174,24 @@ def get_public_ip_validator(has_type_field=False, allow_none=False, allow_new=Fa for an existing name or ID with no ARM-required -type parameter. """ def simple_validator(namespace): if namespace.public_ip_address: - # determine if public_ip_address is name or ID - is_id = is_valid_resource_id(namespace.public_ip_address) - if not is_id: - namespace.public_ip_address = resource_id( + is_list = isinstance(namespace.public_ip_address, list) + + def _validate_name_or_id(public_ip): + # determine if public_ip_address is name or ID + is_id = is_valid_resource_id(public_ip) + return public_ip if is_id else resource_id( subscription=get_subscription_id(), resource_group=namespace.resource_group_name, namespace='Microsoft.Network', type='publicIPAddresses', - name=namespace.public_ip_address) + name=public_ip) + + if is_list: + for i, public_ip in enumerate(namespace.public_ip_address): + namespace.public_ip_address[i] = _validate_name_or_id(public_ip) + else: + namespace.public_ip_address = _validate_name_or_id(namespace.public_ip_address) + def complex_validator_with_type(namespace): get_folded_parameter_validator( @@ -521,11 +530,28 @@ def process_vnet_create_namespace(namespace): def process_vnet_gateway_create_namespace(namespace): ns = namespace get_default_location_from_resource_group(ns) + get_virtual_network_validator()(ns) + + get_public_ip_validator()(ns) + public_ip_count = len(ns.public_ip_address or []) + if public_ip_count > 2: + raise CLIError('Specify a single public IP to create an active-standby gateway or two ' + 'public IPs to create an active-active gateway.') + enable_bgp = any([ns.asn, ns.bgp_peering_address, ns.peer_weight]) if enable_bgp and not ns.asn: raise ValueError( 'incorrect usage: --asn ASN [--peer-weight WEIGHT --bgp-peering-address IP ]') +def process_vnet_gateway_update_namespace(namespace): + ns = namespace + get_virtual_network_validator()(ns) + get_public_ip_validator()(ns) + public_ip_count = len(ns.public_ip_address or []) + if public_ip_count > 2: + raise CLIError('Specify a single public IP to create an active-standby gateway or two ' + 'public IPs to create an active-active gateway.') + def process_vpn_connection_create_namespace(namespace): get_default_location_from_resource_group(namespace) diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py index aa6ce7921..e1a8ca19d 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py @@ -1333,13 +1333,16 @@ def create_vnet_gateway(resource_group_name, virtual_network_gateway_name, publi client = _network_client_factory().virtual_network_gateways subnet = virtual_network + '/subnets/GatewaySubnet' - ip_configuration = VirtualNetworkGatewayIPConfiguration( - SubResource(subnet), - SubResource(public_ip_address), - private_ip_allocation_method='Dynamic', name='vnetGatewayConfig') + active_active = len(public_ip_address) == 2 vnet_gateway = VirtualNetworkGateway( - [ip_configuration], gateway_type, vpn_type, location=location, tags=tags, - sku=VirtualNetworkGatewaySku(sku, sku)) + [], gateway_type, vpn_type, location=location, tags=tags, + sku=VirtualNetworkGatewaySku(sku, sku), active_active=active_active) + for i, public_ip in enumerate(public_ip_address): + ip_configuration = VirtualNetworkGatewayIPConfiguration( + SubResource(subnet), + SubResource(public_ip), + private_ip_allocation_method='Dynamic', name='vnetGatewayConfig{}'.format(i)) + vnet_gateway.ip_configurations.append(ip_configuration) if asn or bgp_peering_address or peer_weight: vnet_gateway.enable_bgp = True vnet_gateway.bgp_settings = BgpSettings(asn, bgp_peering_address, peer_weight) @@ -1354,6 +1357,7 @@ def update_vnet_gateway(instance, address_prefixes=None, sku=None, vpn_type=None public_ip_address=None, gateway_type=None, enable_bgp=None, asn=None, bgp_peering_address=None, peer_weight=None, virtual_network=None, tags=None): + from azure.mgmt.network.models import VirtualNetworkGatewayIPConfiguration if address_prefixes is not None: if not instance.vpn_client_configuration: @@ -1376,8 +1380,28 @@ def update_vnet_gateway(instance, address_prefixes=None, sku=None, vpn_type=None if tags is not None: instance.tags = tags + subnet_id = '{}/subnets/GatewaySubnet'.format(virtual_network) if virtual_network else \ + instance.ip_configurations[0].subnet.id + if virtual_network is not None: + for config in instance.ip_configurations: + config.subnet.id = subnet_id + if public_ip_address is not None: - instance.ip_configurations[0].public_ip_address.id = public_ip_address + instance.ip_configurations = [] + for i, public_ip in enumerate(public_ip_address): + ip_configuration = VirtualNetworkGatewayIPConfiguration( + SubResource(subnet_id), + SubResource(public_ip), + private_ip_allocation_method='Dynamic', name='vnetGatewayConfig{}'.format(i)) + instance.ip_configurations.append(ip_configuration) + + # Update active-active/active-standby status + active_active = len(public_ip_address) == 2 + if instance.active_active and not active_active: + logger.info('Placing gateway in active-standby mode.') + elif not instance.active_active and active_active: + logger.info('Placing gateway in active-active mode.') + instance.active_active = active_active if gateway_type is not None: instance.gateway_type = gateway_type @@ -1387,10 +1411,6 @@ def update_vnet_gateway(instance, address_prefixes=None, sku=None, vpn_type=None _validate_bgp_peering(instance, asn, bgp_peering_address, peer_weight) - if virtual_network is not None: - instance.ip_configurations[0].subnet.id = \ - '{}/subnets/GatewaySubnet'.format(virtual_network) - return instance # endregion @@ -1563,7 +1583,7 @@ def create_local_gateway(resource_group_name, local_network_gateway_name, gatewa from azure.mgmt.network.models import LocalNetworkGateway, BgpSettings client = _network_client_factory().local_network_gateways local_gateway = LocalNetworkGateway( - local_address_prefix or [], location=location, tags=tags, + AddressSpace(local_address_prefix or []), location=location, tags=tags, gateway_ip_address=gateway_ip_address) if bgp_peering_address or asn or peer_weight: local_gateway.bgp_settings = BgpSettings(asn, bgp_peering_address, peer_weight)
[Network] VNET gateway should support configuration of active-active gateways This is a new feature which was also announced in Ignite last year. Please refer to the Powershell cmdlet documentation or get in touch with me. - [x] Active-Active Cross Premise - [x] Active-Active VNet-to-VNet - [x] Active-Standby to Active-Active - [x] Active-Active to Active-Standby
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-network/tests/recordings/test_network_active_active_cross_premise_connection.yaml b/src/command_modules/azure-cli-network/tests/recordings/test_network_active_active_cross_premise_connection.yaml new file mode 100644 index 000000000..b149b2394 --- /dev/null +++ b/src/command_modules/azure-cli-network/tests/recordings/test_network_active_active_cross_premise_connection.yaml @@ -0,0 +1,4359 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b1d450c-1643-11e7-b555-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_cross_premise_connection?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection","name":"cli_test_active_active_cross_premise_connection","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:52:19 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['284'] + status: {code: 200, message: OK} +- request: + body: '{"location": "westus", "properties": {"ipConfigurations": [{"properties": + {"subnet": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet"}, + "publicIPAddress": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/publicIPAddresses/gwip1"}, + "privateIPAllocationMethod": "Dynamic"}, "name": "vnetGatewayConfig0"}, {"properties": + {"subnet": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet"}, + "publicIPAddress": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/publicIPAddresses/gwip2"}, + "privateIPAllocationMethod": "Dynamic"}, "name": "vnetGatewayConfig1"}], "vpnType": + "RouteBased", "bgpSettings": {"asn": 65010}, "activeActive": true, "sku": {"tier": + "HighPerformance", "name": "HighPerformance"}, "enableBgp": true, "gatewayType": + "Vpn"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['1252'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworkGateways/gw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"gw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworkGateways/gw1\"\ + ,\r\n \"etag\": \"W/\\\"510c3035-8b86-4416-8536-1d93ffce512b\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"15632be1-08e9-4994-93d3-4072c5ffce4f\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworkGateways/gw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"510c3035-8b86-4416-8536-1d93ffce512b\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/publicIPAddresses/gwip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworkGateways/gw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"510c3035-8b86-4416-8536-1d93ffce512b\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/publicIPAddresses/gwip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"vpnClientConfiguration\": {\r\n \"vpnClientRootCertificates\"\ + : [],\r\n \"vpnClientRevokedCertificates\": []\r\n },\r\n \"bgpSettings\"\ + : {\r\n \"asn\": 65010,\r\n \"peerWeight\": 0\r\n }\r\n }\r\n\ + }"} + headers: + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01'] + Cache-Control: [no-cache] + Content-Length: ['2863'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:52:20 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:52:31 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:52:41 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:52:51 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:53:01 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:53:12 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:53:21 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:53:32 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:53:43 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:53:52 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:54:03 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:54:14 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:54:23 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:54:34 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:54:44 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:54:54 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:55:05 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:55:16 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:55:26 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:55:36 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:55:48 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:55:58 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:56:08 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:56:18 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:56:28 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:56:38 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:56:48 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:56:59 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:57:09 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:57:19 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:57:31 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:57:41 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:57:50 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:58:01 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:58:12 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:58:23 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:58:33 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:58:43 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:58:55 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:59:05 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:59:15 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:59:26 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:59:36 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:59:46 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 18:59:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:00:07 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:00:16 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:00:27 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:00:37 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:00:47 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:00:58 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:01:08 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:01:18 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:01:28 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:01:38 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:01:49 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:02:00 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:02:10 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:02:20 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:02:31 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:02:42 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:02:52 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:03:03 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:03:13 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:03:24 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:03:34 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:03:46 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:03:56 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:04:07 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:04:17 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:04:27 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:04:38 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:04:47 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:04:58 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:05:08 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:05:18 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:05:29 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:05:40 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:05:49 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:05:59 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:06:10 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:06:21 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:06:32 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:06:42 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:06:53 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:07:03 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:07:14 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:07:24 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:07:35 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:07:45 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:07:55 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:08:05 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:08:16 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:08:26 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:08:36 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:08:47 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:08:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:09:07 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:09:17 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:09:27 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:09:38 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:09:48 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:09:58 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:10:09 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:10:18 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:10:29 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:10:39 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:10:50 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:11:00 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:11:10 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:11:21 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:11:31 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:11:41 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:11:52 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:12:01 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:12:12 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:12:22 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:12:33 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:12:43 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:12:54 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:13:04 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:13:15 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:13:25 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:13:36 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:13:47 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:13:58 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:14:08 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:14:19 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:14:29 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:14:40 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:14:50 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:15:01 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:15:11 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:15:21 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['30'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/941ce25e-3871-4045-801b-2d998751f41c?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:15:35 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['29'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2b2e9d8a-1643-11e7-b51e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworkGateways/gw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"gw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworkGateways/gw1\"\ + ,\r\n \"etag\": \"W/\\\"6bf49958-ad54-44fc-876d-3dcf789e525b\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"resourceGuid\": \"15632be1-08e9-4994-93d3-4072c5ffce4f\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworkGateways/gw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"6bf49958-ad54-44fc-876d-3dcf789e525b\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/publicIPAddresses/gwip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworkGateways/gw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"6bf49958-ad54-44fc-876d-3dcf789e525b\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/publicIPAddresses/gwip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"bgpPeeringAddress\"\ + : \"10.12.255.4,10.12.255.5\",\r\n \"peerWeight\": 0\r\n }\r\n }\r\ + \n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:15:35 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2798'] + status: {code: 200, message: OK} +- request: + body: '{"location": "eastus", "properties": {"gatewayIpAddress": "131.107.72.22", + "localNetworkAddressSpace": {"addressPrefixes": ["10.52.255.253/32"]}, "bgpSettings": + {"asn": 65050, "bgpPeeringAddress": "10.52.255.253"}}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['215'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [6b591ed2-1646-11e7-993b-a0b3ccf7272a] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/localNetworkGateways/lgw2?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"lgw2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/localNetworkGateways/lgw2\"\ + ,\r\n \"etag\": \"W/\\\"e3d668f5-a20e-44b7-b7fa-38cfbe24ecb2\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/localNetworkGateways\",\r\n \"location\"\ + : \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"424519dd-2add-4dde-a6f5-e2347b51dfe9\",\r\n \ + \ \"localNetworkAddressSpace\": {\r\n \"addressPrefixes\": [\r\n \ + \ \"10.52.255.253/32\"\r\n ]\r\n },\r\n \"gatewayIpAddress\"\ + : \"131.107.72.22\",\r\n \"bgpSettings\": {\r\n \"asn\": 65050,\r\n\ + \ \"bgpPeeringAddress\": \"10.52.255.253\",\r\n \"peerWeight\":\ + \ 0\r\n }\r\n }\r\n}"} + headers: + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/eastus/operations/c000c2be-3bef-497c-873b-4189a9b6c4ad?api-version=2016-09-01'] + Cache-Control: [no-cache] + Content-Length: ['736'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:15:37 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [6b591ed2-1646-11e7-993b-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c000c2be-3bef-497c-873b-4189a9b6c4ad?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:15:47 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['29'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [6b591ed2-1646-11e7-993b-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/localNetworkGateways/lgw2?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"lgw2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/localNetworkGateways/lgw2\"\ + ,\r\n \"etag\": \"W/\\\"0454970d-6377-4438-8279-562aa7e18fbe\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/localNetworkGateways\",\r\n \"location\"\ + : \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"resourceGuid\": \"424519dd-2add-4dde-a6f5-e2347b51dfe9\",\r\n \ + \ \"localNetworkAddressSpace\": {\r\n \"addressPrefixes\": [\r\n \ + \ \"10.52.255.253/32\"\r\n ]\r\n },\r\n \"gatewayIpAddress\"\ + : \"131.107.72.22\",\r\n \"bgpSettings\": {\r\n \"asn\": 65050,\r\n\ + \ \"bgpPeeringAddress\": \"10.52.255.253\",\r\n \"peerWeight\":\ + \ 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:15:48 GMT'] + ETag: [W/"0454970d-6377-4438-8279-562aa7e18fbe"] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['737'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [73750026-1646-11e7-a7a4-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_cross_premise_connection?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection","name":"cli_test_active_active_cross_premise_connection","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:15:49 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['284'] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"mode": "Incremental", "template": {"outputs": {"resource": + {"value": "[reference(''Vnet1toSite5_1'')]", "type": "object"}}, "$schema": + "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "resources": [{"location": "westus", "properties": + {"virtualNetworkGateway1": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworkGateways/gw1"}, + "routingWeight": 10, "connectionType": "IPSec", "authorizationKey": null, "localNetworkGateway2": + {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/localNetworkGateways/lgw2"}, + "enableBgp": true, "sharedKey": "abc123"}, "apiVersion": "2015-06-15", "tags": + {}, "dependsOn": [], "type": "Microsoft.Network/connections", "name": "Vnet1toSite5_1"}], + "variables": {}, "parameters": {}}, "parameters": {}}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['1034'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [738aab4a-1646-11e7-9c76-a0b3ccf7272a] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Resources/deployments/vpn_connection_deploy_ggIDURKxCVkgx93JBNCfeNzIzqHwyArL","name":"vpn_connection_deploy_ggIDURKxCVkgx93JBNCfeNzIzqHwyArL","properties":{"templateHash":"17600274930576475001","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-03-31T19:15:51.1136755Z","duration":"PT0.4825926S","correlationId":"73a2916e-424e-4a47-a67a-a5279c1ecaf0","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"connections","locations":["westus"]}]}],"dependencies":[]}}'} + headers: + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Resources/deployments/vpn_connection_deploy_ggIDURKxCVkgx93JBNCfeNzIzqHwyArL/operationStatuses/08587106191348465278?api-version=2016-09-01'] + Cache-Control: [no-cache] + Content-Length: ['673'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:15:50 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [738aab4a-1646-11e7-9c76-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587106191348465278?api-version=2016-09-01 + response: + body: {string: '{"status":"Succeeded"}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:16:20 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['22'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [738aab4a-1646-11e7-9c76-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Resources/deployments/vpn_connection_deploy_ggIDURKxCVkgx93JBNCfeNzIzqHwyArL","name":"vpn_connection_deploy_ggIDURKxCVkgx93JBNCfeNzIzqHwyArL","properties":{"templateHash":"17600274930576475001","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-03-31T19:16:18.5897816Z","duration":"PT27.9586987S","correlationId":"73a2916e-424e-4a47-a67a-a5279c1ecaf0","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"connections","locations":["westus"]}]}],"dependencies":[],"outputs":{"resource":{"type":"Object","value":{"provisioningState":"Succeeded","resourceGuid":"f3e63a38-9d31-4242-bd5c-ba5af1ac1873","virtualNetworkGateway1":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworkGateways/gw1"},"localNetworkGateway2":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/localNetworkGateways/lgw2"},"connectionType":"IPsec","routingWeight":10,"sharedKey":"abc123","enableBgp":true,"connectionStatus":"Unknown","ingressBytesTransferred":0,"egressBytesTransferred":0}}},"outputResources":[{"id":"Microsoft.Network/connections/Vnet1toSite5_1"}]}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:16:21 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['1469'] + status: {code: 200, message: OK} +- request: + body: '{"location": "eastus", "properties": {"gatewayIpAddress": "131.107.72.23", + "localNetworkAddressSpace": {"addressPrefixes": ["10.52.255.254/32"]}, "bgpSettings": + {"asn": 65050, "bgpPeeringAddress": "10.52.255.254"}}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['215'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [86fbd8ae-1646-11e7-bb9a-a0b3ccf7272a] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/localNetworkGateways/lgw3?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"lgw3\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/localNetworkGateways/lgw3\"\ + ,\r\n \"etag\": \"W/\\\"9ff7983f-b829-40e6-8f85-f936134395e6\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/localNetworkGateways\",\r\n \"location\"\ + : \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"68b9dccc-9f89-4313-8b7c-bfb2bc47cc7f\",\r\n \ + \ \"localNetworkAddressSpace\": {\r\n \"addressPrefixes\": [\r\n \ + \ \"10.52.255.254/32\"\r\n ]\r\n },\r\n \"gatewayIpAddress\"\ + : \"131.107.72.23\",\r\n \"bgpSettings\": {\r\n \"asn\": 65050,\r\n\ + \ \"bgpPeeringAddress\": \"10.52.255.254\",\r\n \"peerWeight\":\ + \ 0\r\n }\r\n }\r\n}"} + headers: + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/eastus/operations/0237915f-68ad-452e-b7cc-22b9b0ac0d02?api-version=2016-09-01'] + Cache-Control: [no-cache] + Content-Length: ['736'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:16:23 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [86fbd8ae-1646-11e7-bb9a-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/0237915f-68ad-452e-b7cc-22b9b0ac0d02?api-version=2016-09-01 + response: + body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:16:33 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['29'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [86fbd8ae-1646-11e7-bb9a-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/localNetworkGateways/lgw3?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"lgw3\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/localNetworkGateways/lgw3\"\ + ,\r\n \"etag\": \"W/\\\"5177222f-cf52-4fd7-94b4-c65554668cbf\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/localNetworkGateways\",\r\n \"location\"\ + : \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"resourceGuid\": \"68b9dccc-9f89-4313-8b7c-bfb2bc47cc7f\",\r\n \ + \ \"localNetworkAddressSpace\": {\r\n \"addressPrefixes\": [\r\n \ + \ \"10.52.255.254/32\"\r\n ]\r\n },\r\n \"gatewayIpAddress\"\ + : \"131.107.72.23\",\r\n \"bgpSettings\": {\r\n \"asn\": 65050,\r\n\ + \ \"bgpPeeringAddress\": \"10.52.255.254\",\r\n \"peerWeight\":\ + \ 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:16:34 GMT'] + ETag: [W/"5177222f-cf52-4fd7-94b4-c65554668cbf"] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['737'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [8f19d912-1646-11e7-b148-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_cross_premise_connection?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection","name":"cli_test_active_active_cross_premise_connection","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:16:36 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['284'] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"mode": "Incremental", "template": {"outputs": {"resource": + {"value": "[reference(''Vnet1toSite5_2'')]", "type": "object"}}, "$schema": + "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "resources": [{"location": "westus", "properties": + {"virtualNetworkGateway1": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworkGateways/gw1"}, + "routingWeight": 10, "connectionType": "IPSec", "authorizationKey": null, "localNetworkGateway2": + {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/localNetworkGateways/lgw3"}, + "enableBgp": true, "sharedKey": "abc123"}, "apiVersion": "2015-06-15", "tags": + {}, "dependsOn": [], "type": "Microsoft.Network/connections", "name": "Vnet1toSite5_2"}], + "variables": {}, "parameters": {}}, "parameters": {}}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['1034'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [8f4ae37a-1646-11e7-a4bb-a0b3ccf7272a] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Resources/deployments/vpn_connection_deploy_xXBbcjdOc5ia5NtxottD6l9vsakCw1j4","name":"vpn_connection_deploy_xXBbcjdOc5ia5NtxottD6l9vsakCw1j4","properties":{"templateHash":"14690740186505567652","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-03-31T19:16:38.095127Z","duration":"PT0.7400646S","correlationId":"15cf548c-6484-4013-ac87-9e300bf2757f","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"connections","locations":["westus"]}]}],"dependencies":[]}}'} + headers: + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Resources/deployments/vpn_connection_deploy_xXBbcjdOc5ia5NtxottD6l9vsakCw1j4/operationStatuses/08587106190881225560?api-version=2016-09-01'] + Cache-Control: [no-cache] + Content-Length: ['672'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:16:37 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [8f4ae37a-1646-11e7-a4bb-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587106190881225560?api-version=2016-09-01 + response: + body: {string: '{"status":"Running"}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:17:07 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['20'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [8f4ae37a-1646-11e7-a4bb-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587106190881225560?api-version=2016-09-01 + response: + body: {string: '{"status":"Succeeded"}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:17:38 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['22'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [8f4ae37a-1646-11e7-a4bb-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Resources/deployments/vpn_connection_deploy_xXBbcjdOc5ia5NtxottD6l9vsakCw1j4","name":"vpn_connection_deploy_xXBbcjdOc5ia5NtxottD6l9vsakCw1j4","properties":{"templateHash":"14690740186505567652","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-03-31T19:17:09.4950858Z","duration":"PT32.1400234S","correlationId":"15cf548c-6484-4013-ac87-9e300bf2757f","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"connections","locations":["westus"]}]}],"dependencies":[],"outputs":{"resource":{"type":"Object","value":{"provisioningState":"Succeeded","resourceGuid":"bb903a0e-e341-4f3b-824e-86c2f4e63abb","virtualNetworkGateway1":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/virtualNetworkGateways/gw1"},"localNetworkGateway2":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_cross_premise_connection/providers/Microsoft.Network/localNetworkGateways/lgw3"},"connectionType":"IPsec","routingWeight":10,"sharedKey":"abc123","enableBgp":true,"connectionStatus":"Unknown","ingressBytesTransferred":0,"egressBytesTransferred":0}}},"outputResources":[{"id":"Microsoft.Network/connections/Vnet1toSite5_2"}]}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 19:17:39 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['1469'] + status: {code: 200, message: OK} +version: 1 diff --git a/src/command_modules/azure-cli-network/tests/recordings/test_network_active_active_vnet_vnet_connection.yaml b/src/command_modules/azure-cli-network/tests/recordings/test_network_active_active_vnet_vnet_connection.yaml new file mode 100644 index 000000000..434934460 --- /dev/null +++ b/src/command_modules/azure-cli-network/tests/recordings/test_network_active_active_vnet_vnet_connection.yaml @@ -0,0 +1,2886 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [1be8e480-164e-11e7-b9cb-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_vnet_vnet_connection?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection","name":"cli_test_active_active_vnet_vnet_connection","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:10:39 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['276'] + status: {code: 200, message: OK} +- request: + body: '{"location": "westus", "properties": {"enableBgp": true, "vpnType": "RouteBased", + "activeActive": true, "bgpSettings": {"asn": 65010}, "ipConfigurations": [{"properties": + {"publicIPAddress": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1"}, + "subnet": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet"}, + "privateIPAllocationMethod": "Dynamic"}, "name": "vnetGatewayConfig0"}, {"properties": + {"publicIPAddress": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2"}, + "subnet": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet"}, + "privateIPAllocationMethod": "Dynamic"}, "name": "vnetGatewayConfig1"}], "gatewayType": + "Vpn", "sku": {"name": "HighPerformance", "tier": "HighPerformance"}}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['1238'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [1bfa0c06-164e-11e7-8cd2-a0b3ccf7272a] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"vpnClientConfiguration\": {\r\n \"vpnClientRootCertificates\"\ + : [],\r\n \"vpnClientRevokedCertificates\": []\r\n },\r\n \"bgpSettings\"\ + : {\r\n \"asn\": 65010,\r\n \"peerWeight\": 0\r\n }\r\n }\r\n\ + }"} + headers: + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/6e8922bb-0002-4b58-be2d-4e7f8a8cc282?api-version=2016-09-01'] + Cache-Control: [no-cache] + Content-Length: ['2841'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:10:39 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [1cd6ebd2-164e-11e7-915f-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_vnet_vnet_connection?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection","name":"cli_test_active_active_vnet_vnet_connection","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:10:40 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['276'] + status: {code: 200, message: OK} +- request: + body: '{"location": "westus", "properties": {"enableBgp": true, "vpnType": "RouteBased", + "activeActive": true, "bgpSettings": {"asn": 65020}, "ipConfigurations": [{"properties": + {"publicIPAddress": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw2ip1"}, + "subnet": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/GatewaySubnet"}, + "privateIPAllocationMethod": "Dynamic"}, "name": "vnetGatewayConfig0"}, {"properties": + {"publicIPAddress": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw2ip2"}, + "subnet": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/GatewaySubnet"}, + "privateIPAllocationMethod": "Dynamic"}, "name": "vnetGatewayConfig1"}], "gatewayType": + "Vpn", "sku": {"name": "HighPerformance", "tier": "HighPerformance"}}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['1238'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [1cec0f64-164e-11e7-b3c3-a0b3ccf7272a] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw2?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw2\"\ + ,\r\n \"etag\": \"W/\\\"f4f3c739-c5cd-47ab-8db8-b3c0c3bdeea0\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"97c54646-d873-475c-9bef-da41edb4c0fc\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw2/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"f4f3c739-c5cd-47ab-8db8-b3c0c3bdeea0\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw2ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw2/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"f4f3c739-c5cd-47ab-8db8-b3c0c3bdeea0\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw2ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"vpnClientConfiguration\": {\r\n \"vpnClientRootCertificates\"\ + : [],\r\n \"vpnClientRevokedCertificates\": []\r\n },\r\n \"bgpSettings\"\ + : {\r\n \"asn\": 65020,\r\n \"peerWeight\": 0\r\n }\r\n }\r\n\ + }"} + headers: + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/324d4f3c-4725-41d0-93f6-934f78c72d51?api-version=2016-09-01'] + Cache-Control: [no-cache] + Content-Length: ['2841'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:10:40 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['10'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [1dc202f6-164e-11e7-90e8-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:10:41 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2fcdd3cc-164e-11e7-8547-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:11:11 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [41e4d886-164e-11e7-a839-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:11:42 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [53eb929e-164e-11e7-8cb3-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:12:12 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [66345730-164e-11e7-baf2-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:12:43 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [7844e8d8-164e-11e7-a193-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:13:14 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [8a8ad4e4-164e-11e7-b743-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:13:44 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [9cc92a8a-164e-11e7-8e00-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:14:15 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [aee32c5a-164e-11e7-b3f3-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:14:44 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [c0ec2ffa-164e-11e7-9b48-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:15:15 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [d326f430-164e-11e7-bf3d-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:15:46 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [e55d8434-164e-11e7-955a-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:16:17 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [f78b37cc-164e-11e7-bc10-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:16:47 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [09b8e7ac-164f-11e7-bc3d-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:17:17 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [1bf765ac-164f-11e7-8b72-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:17:48 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2e2a32a2-164f-11e7-9af4-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:18:18 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [402a35e2-164f-11e7-af81-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:18:49 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [523d6e52-164f-11e7-ab50-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:19:19 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [644d7dcc-164f-11e7-aa99-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:19:49 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [767da406-164f-11e7-b5c2-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:20:20 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [88bd5d12-164f-11e7-be69-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:20:51 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [9acddf9e-164f-11e7-a2a4-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:21:20 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [acd84428-164f-11e7-a5f3-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:21:51 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [bee6789e-164f-11e7-87b9-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:22:21 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [d0f7136c-164f-11e7-b505-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:22:52 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [e3342d26-164f-11e7-bf45-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:23:22 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [f5643bc0-164f-11e7-b38b-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:23:53 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [078faba2-1650-11e7-91b7-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:24:23 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [19c18fb6-1650-11e7-8094-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:24:54 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [2bd071f8-1650-11e7-87cc-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:25:24 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [3de681e6-1650-11e7-b6a1-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:25:55 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [5021683e-1650-11e7-9515-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:26:25 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [6258d4f4-1650-11e7-aa4b-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:26:55 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [74944a9c-1650-11e7-b0fb-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:27:26 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [86ae2ffa-1650-11e7-99d5-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:27:57 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [991a9622-1650-11e7-843e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:28:28 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [ab538970-1650-11e7-8627-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:28:58 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [bd6776e8-1650-11e7-8a7e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:29:28 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [cf72fc8a-1650-11e7-a8d7-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:29:58 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [e18a174a-1650-11e7-9b22-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:30:28 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [f38e517a-1650-11e7-99c8-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:30:59 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [05ac0da2-1651-11e7-a083-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:31:30 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [17b7ccec-1651-11e7-b251-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:32:00 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [29d5edb4-1651-11e7-9e9b-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:32:30 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [3bdda6b6-1651-11e7-a5b9-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:33:00 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [4dea6046-1651-11e7-8906-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7f367f89-818a-49d6-9ce8-7be087d4f4ff\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"peerWeight\"\ + : 0\r\n }\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:33:30 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2718'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [5ff4f700-1651-11e7-8c0c-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1\"\ + ,\r\n \"etag\": \"W/\\\"3cb4e036-ef14-428c-8187-2896dcda8bbe\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"resourceGuid\": \"9d779263-30f7-4d8d-8039-6d8a421c689a\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"3cb4e036-ef14-428c-8187-2896dcda8bbe\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"3cb4e036-ef14-428c-8187-2896dcda8bbe\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw1ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65010,\r\n \"bgpPeeringAddress\"\ + : \"10.21.255.4,10.21.255.5\",\r\n \"peerWeight\": 0\r\n }\r\n }\r\ + \n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:34:01 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2776'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [60836d40-1651-11e7-83fa-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw2?api-version=2016-09-01 + response: + body: {string: "{\r\n \"name\": \"vgw2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw2\"\ + ,\r\n \"etag\": \"W/\\\"7b1d7895-aa6e-4c29-b59d-64847d39090b\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"resourceGuid\": \"97c54646-d873-475c-9bef-da41edb4c0fc\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"vnetGatewayConfig0\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw2/ipConfigurations/vnetGatewayConfig0\"\ + ,\r\n \"etag\": \"W/\\\"7b1d7895-aa6e-4c29-b59d-64847d39090b\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw2ip1\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"\ + vnetGatewayConfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw2/ipConfigurations/vnetGatewayConfig1\"\ + ,\r\n \"etag\": \"W/\\\"7b1d7895-aa6e-4c29-b59d-64847d39090b\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ + publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/publicIPAddresses/gw2ip2\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/GatewaySubnet\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"sku\": {\r\n \ + \ \"name\": \"HighPerformance\",\r\n \"tier\": \"HighPerformance\"\ + ,\r\n \"capacity\": 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n\ + \ \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": true,\r\n \"activeActive\"\ + : true,\r\n \"bgpSettings\": {\r\n \"asn\": 65020,\r\n \"bgpPeeringAddress\"\ + : \"10.22.255.4,10.22.255.5\",\r\n \"peerWeight\": 0\r\n }\r\n }\r\ + \n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:34:01 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2776'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [611d12f0-1651-11e7-9be4-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_vnet_vnet_connection?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection","name":"cli_test_active_active_vnet_vnet_connection","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:34:03 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['276'] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"template": {"variables": {}, "resources": [{"dependsOn": + [], "properties": {"enableBgp": true, "virtualNetworkGateway2": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw2"}, + "virtualNetworkGateway1": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1"}, + "authorizationKey": null, "sharedKey": "abc123", "connectionType": "Vnet2Vnet", + "routingWeight": 10}, "name": "vnet1to2", "apiVersion": "2015-06-15", "tags": + {}, "location": "westus", "type": "Microsoft.Network/connections"}], "outputs": + {"resource": {"value": "[reference(''vnet1to2'')]", "type": "object"}}, "$schema": + "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {}}, "mode": "Incremental", "parameters": + {}}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['1023'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [6139c0da-1651-11e7-84ae-a0b3ccf7272a] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Resources/deployments/vpn_connection_deploy_EdOl8TQj5WceeQu26GMlub0qoiBA6Aiw","name":"vpn_connection_deploy_EdOl8TQj5WceeQu26GMlub0qoiBA6Aiw","properties":{"templateHash":"14700326768216073025","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-03-31T20:34:04.9195607Z","duration":"PT0.5022841S","correlationId":"2170b34a-bc4a-460b-b469-cbd1fde7e82f","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"connections","locations":["westus"]}]}],"dependencies":[]}}'} + headers: + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Resources/deployments/vpn_connection_deploy_EdOl8TQj5WceeQu26GMlub0qoiBA6Aiw/operationStatuses/08587106144410603361?api-version=2016-09-01'] + Cache-Control: [no-cache] + Content-Length: ['669'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:34:04 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [6139c0da-1651-11e7-84ae-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587106144410603361?api-version=2016-09-01 + response: + body: {string: '{"status":"Succeeded"}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:34:35 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['22'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [6139c0da-1651-11e7-84ae-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Resources/deployments/vpn_connection_deploy_EdOl8TQj5WceeQu26GMlub0qoiBA6Aiw","name":"vpn_connection_deploy_EdOl8TQj5WceeQu26GMlub0qoiBA6Aiw","properties":{"templateHash":"14700326768216073025","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-03-31T20:34:34.8409212Z","duration":"PT30.4236446S","correlationId":"2170b34a-bc4a-460b-b469-cbd1fde7e82f","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"connections","locations":["westus"]}]}],"dependencies":[],"outputs":{"resource":{"type":"Object","value":{"provisioningState":"Succeeded","resourceGuid":"40aaaac0-fe2f-45a6-8078-1b22070426ff","virtualNetworkGateway1":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1"},"virtualNetworkGateway2":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw2"},"connectionType":"Vnet2Vnet","routingWeight":10,"sharedKey":"abc123","enableBgp":true,"connectionStatus":"Unknown","ingressBytesTransferred":0,"egressBytesTransferred":0}}},"outputResources":[{"id":"Microsoft.Network/connections/vnet1to2"}]}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:34:35 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['1460'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [74abb108-1651-11e7-9ed6-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_vnet_vnet_connection?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection","name":"cli_test_active_active_vnet_vnet_connection","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:34:36 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['276'] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"template": {"variables": {}, "resources": [{"dependsOn": + [], "properties": {"enableBgp": true, "virtualNetworkGateway2": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1"}, + "virtualNetworkGateway1": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw2"}, + "authorizationKey": null, "sharedKey": "abc123", "connectionType": "Vnet2Vnet", + "routingWeight": 10}, "name": "vnet2to1", "apiVersion": "2015-06-15", "tags": + {}, "location": "westus", "type": "Microsoft.Network/connections"}], "outputs": + {"resource": {"value": "[reference(''vnet2to1'')]", "type": "object"}}, "$schema": + "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {}}, "mode": "Incremental", "parameters": + {}}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['1023'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [74cab64a-1651-11e7-aede-a0b3ccf7272a] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Resources/deployments/vpn_connection_deploy_4jZyDcCkNn0VRjbpCZRXO0oEjPEsbuii","name":"vpn_connection_deploy_4jZyDcCkNn0VRjbpCZRXO0oEjPEsbuii","properties":{"templateHash":"773591391528351821","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-03-31T20:34:37.5205546Z","duration":"PT0.3255211S","correlationId":"6403380a-6db3-4483-96b0-47128f81da59","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"connections","locations":["westus"]}]}],"dependencies":[]}}'} + headers: + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Resources/deployments/vpn_connection_deploy_4jZyDcCkNn0VRjbpCZRXO0oEjPEsbuii/operationStatuses/08587106144082825840?api-version=2016-09-01'] + Cache-Control: [no-cache] + Content-Length: ['667'] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:34:36 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [74cab64a-1651-11e7-aede-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587106144082825840?api-version=2016-09-01 + response: + body: {string: '{"status":"Running"}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:35:07 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['20'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [74cab64a-1651-11e7-aede-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587106144082825840?api-version=2016-09-01 + response: + body: {string: '{"status":"Succeeded"}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:35:37 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['22'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.1+dev] + accept-language: [en-US] + x-ms-client-request-id: [74cab64a-1651-11e7-aede-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Resources/deployments/vpn_connection_deploy_4jZyDcCkNn0VRjbpCZRXO0oEjPEsbuii","name":"vpn_connection_deploy_4jZyDcCkNn0VRjbpCZRXO0oEjPEsbuii","properties":{"templateHash":"773591391528351821","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-03-31T20:35:12.9988189Z","duration":"PT35.8037854S","correlationId":"6403380a-6db3-4483-96b0-47128f81da59","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"connections","locations":["westus"]}]}],"dependencies":[],"outputs":{"resource":{"type":"Object","value":{"provisioningState":"Succeeded","resourceGuid":"119e9869-0d0c-4bf7-92fb-2385969d918f","virtualNetworkGateway1":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw2"},"virtualNetworkGateway2":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_active_active_vnet_vnet_connection/providers/Microsoft.Network/virtualNetworkGateways/vgw1"},"connectionType":"Vnet2Vnet","routingWeight":10,"sharedKey":"abc123","enableBgp":true,"connectionStatus":"Unknown","ingressBytesTransferred":0,"egressBytesTransferred":0}}},"outputResources":[{"id":"Microsoft.Network/connections/vnet2to1"}]}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Fri, 31 Mar 2017 20:35:38 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['1458'] + status: {code: 200, message: OK} +version: 1 diff --git a/src/command_modules/azure-cli-network/tests/test_network_commands.py b/src/command_modules/azure-cli-network/tests/test_network_commands.py index fc57f2a03..92c9a92b3 100644 --- a/src/command_modules/azure-cli-network/tests/test_network_commands.py +++ b/src/command_modules/azure-cli-network/tests/test_network_commands.py @@ -1090,6 +1090,123 @@ class NetworkSubnetSetScenarioTest(ResourceGroupVCRTestBase): self.cmd('network vnet delete --resource-group {} --name {}'.format(self.resource_group, self.vnet_name)) self.cmd('network nsg delete --resource-group {} --name {}'.format(self.resource_group, nsg_name)) +class NetworkActiveActiveCrossPremiseScenarioTest(ResourceGroupVCRTestBase): # pylint: disable=too-many-instance-attributes + + def __init__(self, test_method): + super(NetworkActiveActiveCrossPremiseScenarioTest, self).__init__(__file__, test_method, resource_group='cli_test_active_active_cross_premise_connection') + self.vnet1 = 'vnet1' + self.gw_subnet = 'GatewaySubnet' + self.vnet_prefix1 = '10.11.0.0/16' + self.vnet_prefix2 = '10.12.0.0/16' + self.gw_subnet_prefix = '10.12.255.0/27' + self.gw_ip1 = 'gwip1' + self.gw_ip2 = 'gwip2' + + def test_network_active_active_cross_premise_connection(self): + self.execute() + + def set_up(self): + super(NetworkActiveActiveCrossPremiseScenarioTest, self).set_up() + rg = self.resource_group + + self.cmd('network vnet create -g {} -n {} --address-prefix {} {} --subnet-name {} --subnet-prefix {}'.format(rg, self.vnet1, self.vnet_prefix1, self.vnet_prefix2, self.gw_subnet, self.gw_subnet_prefix)) + self.cmd('network public-ip create -g {} -n {}'.format(rg, self.gw_ip1)) + self.cmd('network public-ip create -g {} -n {}'.format(rg, self.gw_ip2)) + + def body(self): + rg = self.resource_group + vnet1 = self.vnet1 + vnet1_asn = 65010 + gw1 = 'gw1' + + lgw2 = 'lgw2' + lgw_ip = '131.107.72.22' + lgw_prefix = '10.52.255.253/32' + bgp_peer1 = '10.52.255.253' + lgw_asn = 65050 + lgw_loc = 'eastus' + conn_151 = 'Vnet1toSite5_1' + conn_152 = 'Vnet1toSite5_2' + shared_key = 'abc123' + + # create the vnet gateway with active-active feature + self.cmd('network vnet-gateway create -g {} -n {} --vnet {} --sku HighPerformance --asn {} --public-ip-addresses {} {}'.format(rg, gw1, vnet1, vnet1_asn, self.gw_ip1, self.gw_ip2)) + + # create and connect first local-gateway + self.cmd('network local-gateway create -g {} -n {} -l {} --gateway-ip-address {} --local-address-prefixes {} --asn {} --bgp-peering-address {}'.format(rg, lgw2, lgw_loc, lgw_ip, lgw_prefix, lgw_asn, bgp_peer1)) + self.cmd('network vpn-connection create -g {} -n {} --vnet-gateway1 {} --local-gateway2 {} --shared-key {} --enable-bgp'.format(rg, conn_151, gw1, lgw2, shared_key)) + + lgw3 = 'lgw3' + lgw3_ip = '131.107.72.23' + lgw3_prefix = '10.52.255.254/32' + bgp_peer2 = '10.52.255.254' + + # create and connect second local-gateway + self.cmd('network local-gateway create -g {} -n {} -l {} --gateway-ip-address {} --local-address-prefixes {} --asn {} --bgp-peering-address {}'.format(rg, lgw3, lgw_loc, lgw3_ip, lgw3_prefix, lgw_asn, bgp_peer2)) + self.cmd('network vpn-connection create -g {} -n {} --vnet-gateway1 {} --local-gateway2 {} --shared-key {} --enable-bgp'.format(rg, conn_152, gw1, lgw3, shared_key)) + + +class NetworkActiveActiveVnetVnetScenarioTest(ResourceGroupVCRTestBase): # pylint: disable=too-many-instance-attributes + + def __init__(self, test_method): + super(NetworkActiveActiveVnetVnetScenarioTest, self).__init__(__file__, test_method, resource_group='cli_test_active_active_vnet_vnet_connection') + self.gw_subnet = 'GatewaySubnet' + + # First VNet + self.vnet1 = 'vnet1' + self.vnet1_prefix = '10.21.0.0/16' + self.gw1_subnet_prefix = '10.21.255.0/27' + self.gw1_ip1 = 'gw1ip1' + self.gw1_ip2 = 'gw1ip2' + + # Second VNet + self.vnet2 = 'vnet2' + self.vnet2_prefix = '10.22.0.0/16' + self.gw2_subnet_prefix = '10.22.255.0/27' + self.gw2_ip1 = 'gw2ip1' + self.gw2_ip2 = 'gw2ip2' + + def test_network_active_active_vnet_vnet_connection(self): + self.execute() + + def set_up(self): + super(NetworkActiveActiveVnetVnetScenarioTest, self).set_up() + rg = self.resource_group + + # Create one VNet with two public IPs + self.cmd('network vnet create -g {} -n {} --address-prefix {} --subnet-name {} --subnet-prefix {}'.format(rg, self.vnet1, self.vnet1_prefix, self.gw_subnet, self.gw1_subnet_prefix)) + self.cmd('network public-ip create -g {} -n {}'.format(rg, self.gw1_ip1)) + self.cmd('network public-ip create -g {} -n {}'.format(rg, self.gw1_ip2)) + + # Create second VNet with two public IPs + self.cmd('network vnet create -g {} -n {} --address-prefix {} --subnet-name {} --subnet-prefix {}'.format(rg, self.vnet2, self.vnet2_prefix, self.gw_subnet, self.gw2_subnet_prefix)) + self.cmd('network public-ip create -g {} -n {}'.format(rg, self.gw2_ip1)) + self.cmd('network public-ip create -g {} -n {}'.format(rg, self.gw2_ip2)) + + def body(self): + rg = self.resource_group + vnet1 = self.vnet1 + vnet1_asn = 65010 + gw1 = 'vgw1' + self.cmd('network vnet-gateway create -g {} -n {} --vnet {} --sku HighPerformance --asn {} --public-ip-addresses {} {} --no-wait'.format(rg, gw1, vnet1, vnet1_asn, self.gw1_ip1, self.gw1_ip2)) + + vnet2 = self.vnet2 + vnet2_asn = 65020 + gw2 = 'vgw2' + self.cmd('network vnet-gateway create -g {} -n {} --vnet {} --sku HighPerformance --asn {} --public-ip-addresses {} {} --no-wait'.format(rg, gw2, vnet2, vnet2_asn, self.gw2_ip1, self.gw2_ip2)) + + # wait for gateway completion to finish + self.cmd('network vnet-gateway wait -g {} -n {} --created'.format(rg, gw1)) + self.cmd('network vnet-gateway wait -g {} -n {} --created'.format(rg, gw2)) + + conn12 = 'vnet1to2' + conn21 = 'vnet2to1' + shared_key = 'abc123' + + # create and connect the VNet gateways + self.cmd('network vpn-connection create -g {} -n {} --vnet-gateway1 {} --vnet-gateway2 {} --shared-key {} --enable-bgp'.format(rg, conn12, gw1, gw2, shared_key)) + self.cmd('network vpn-connection create -g {} -n {} --vnet-gateway1 {} --vnet-gateway2 {} --shared-key {} --enable-bgp'.format(rg, conn21, gw2, gw1, shared_key)) + class NetworkVpnGatewayScenarioTest(ResourceGroupVCRTestBase): # pylint: disable=too-many-instance-attributes
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": -1, "issue_text_score": 1, "test_score": -1 }, "num_modified_files": 5 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==2.0.0 -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@678b940f29230f53fd7cbec7211842e99658ed3d#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-core==1.24.2 azure-datalake-store==0.0.6 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==3.0.0 azure-mgmt-compute==0.33.1rc1 azure-mgmt-containerregistry==0.2.0 azure-mgmt-datalake-analytics==0.1.3 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.3 azure-mgmt-dns==1.0.0 azure-mgmt-documentdb==0.1.1 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-monitor==0.1.0 azure-mgmt-network==0.30.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-sql==0.4.0 azure-mgmt-storage==0.31.0 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.31.0 azure-monitor==0.2.0 azure-nspkg==3.0.2 azure-storage==0.34.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==2.0.0 - azure-common==1.1.4 - azure-core==1.24.2 - azure-datalake-store==0.0.6 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==3.0.0 - azure-mgmt-compute==0.33.1rc1 - azure-mgmt-containerregistry==0.2.0 - azure-mgmt-datalake-analytics==0.1.3 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.3 - azure-mgmt-dns==1.0.0 - azure-mgmt-documentdb==0.1.1 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-monitor==0.1.0 - azure-mgmt-network==0.30.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-sql==0.4.0 - azure-mgmt-storage==0.31.0 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.31.0 - azure-monitor==0.2.0 - azure-nspkg==3.0.2 - azure-storage==0.34.0 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkLocalGatewayScenarioTest::test_network_local_gateway", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkActiveActiveCrossPremiseScenarioTest::test_network_active_active_cross_premise_connection", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkActiveActiveVnetVnetScenarioTest::test_network_active_active_vnet_vnet_connection" ]
[]
[ "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkMultiIdsShowScenarioTest::test_multi_id_show", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkUsageListScenarioTest::test_network_usage_list", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayDefaultScenarioTest::test_network_app_gateway_with_defaults", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayExistingSubnetScenarioTest::test_network_app_gateway_with_existing_subnet", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayNoWaitScenarioTest::test_network_app_gateway_no_wait", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayPrivateIpScenarioTest::test_network_app_gateway_with_private_ip", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayPublicIpScenarioTest::test_network_app_gateway_with_public_ip", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayWafScenarioTest::test_network_app_gateway_waf", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkPublicIpScenarioTest::test_network_public_ip", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkExpressRouteScenarioTest::test_network_express_route", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkLoadBalancerScenarioTest::test_network_load_balancer", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkLoadBalancerIpConfigScenarioTest::test_network_load_balancer_ip_config", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkLoadBalancerSubresourceScenarioTest::test_network_load_balancer_subresources", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkNicScenarioTest::test_network_nic", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkNicSubresourceScenarioTest::test_network_nic_subresources", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkNicConvenienceCommandsScenarioTest::test_network_nic_convenience_commands", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkSecurityGroupScenarioTest::test_network_nsg", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkRouteTableOperationScenarioTest::test_network_route_table_operation", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkVNetScenarioTest::test_network_vnet", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkVNetPeeringScenarioTest::test_network_vnet_peering", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkSubnetSetScenarioTest::test_network_subnet_set", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkVpnGatewayScenarioTest::test_network_vpn_gateway", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkTrafficManagerScenarioTest::test_network_traffic_manager", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkDnsScenarioTest::test_network_dns", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkZoneImportExportTest::test_network_dns_zone_import_export" ]
[]
MIT License
null
Azure__azure-cli-2773
6186044564dc3436b7551c58eda07db4412a49f8
2017-04-05 18:24:43
eb12ac454cbe1ddb59c86cdf2045e1912660e750
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2773?src=pr&el=h1) Report > Merging [#2773](https://codecov.io/gh/Azure/azure-cli/pull/2773?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/8dda58ca3c3c1af427df59846384b6b7302acc07?src=pr&el=desc) will **increase** coverage by `0.02%`. > The diff coverage is `100%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/2773/graphs/tree.svg?src=pr&width=650&token=2pog0TKvF8&height=150)](https://codecov.io/gh/Azure/azure-cli/pull/2773?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #2773 +/- ## ========================================== + Coverage 62.83% 62.86% +0.02% ========================================== Files 480 480 Lines 25783 25789 +6 Branches 3904 3904 ========================================== + Hits 16201 16211 +10 + Misses 8574 8566 -8 - Partials 1008 1012 +4 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/2773?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...source/azure/cli/command\_modules/resource/\_help.py](https://codecov.io/gh/Azure/azure-cli/pull/2773?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcmVzb3VyY2UvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9yZXNvdXJjZS9faGVscC5weQ==) | `100% <ø> (ø)` | :arrow_up: | | [...azure-cli-vm/azure/cli/command\_modules/vm/\_help.py](https://codecov.io/gh/Azure/azure-cli/pull/2773?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktdm0vYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy92bS9faGVscC5weQ==) | `100% <100%> (ø)` | :arrow_up: | | [...zure-cli-vm/azure/cli/command\_modules/vm/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/2773?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktdm0vYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy92bS9jdXN0b20ucHk=) | `72.99% <100%> (+0.42%)` | :arrow_up: | | [src/azure-cli-core/azure/cli/core/util.py](https://codecov.io/gh/Azure/azure-cli/pull/2773?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL3V0aWwucHk=) | `68.99% <0%> (ø)` | :arrow_up: | | [...dback/azure/cli/command\_modules/feedback/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/2773?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktZmVlZGJhY2svYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9mZWVkYmFjay9jdXN0b20ucHk=) | `34.69% <0%> (ø)` | :arrow_up: | | [...-cli-role/azure/cli/command\_modules/role/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/2773?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcm9sZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3JvbGUvY3VzdG9tLnB5) | `19.28% <0%> (ø)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2773?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2773?src=pr&el=footer). Last update [8dda58c...8aacf90](https://codecov.io/gh/Azure/azure-cli/pull/2773?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/azure-cli.pyproj b/azure-cli.pyproj index bea939442..329dab752 100644 --- a/azure-cli.pyproj +++ b/azure-cli.pyproj @@ -600,6 +600,7 @@ <Folder Include="azure-cli-core\azure\cli\core\test_utils\" /> <Folder Include="azure-cli-core\tests\" /> <Folder Include="azure-cli-core\tests\__pycache__\" /> + <Folder Include="azure-cli-nspkg\" /> <Folder Include="azure-cli-testsdk\" /> <Folder Include="azure-cli-testsdk\azure\" /> <Folder Include="azure-cli-testsdk\azure\cli\" /> @@ -788,17 +789,25 @@ <Folder Include="command_modules\azure-cli-dls\" /> </ItemGroup> <ItemGroup> + <Content Include="azure-cli-core\HISTORY.rst" /> <Content Include="azure-cli-core\setup.cfg" /> + <Content Include="azure-cli-nspkg\HISTORY.rst" /> + <Content Include="azure-cli-testsdk\HISTORY.rst" /> <Content Include="azure-cli\az.completion.sh" /> + <Content Include="azure-cli\HISTORY.rst" /> <Content Include="azure-cli\setup.cfg" /> <Content Include="command_modules\azure-cli-acr\azure\cli\command_modules\acr\template.json" /> + <Content Include="command_modules\azure-cli-acr\HISTORY.rst" /> <Content Include="command_modules\azure-cli-acs\azure\cli\command_modules\acs\mgmt_acs\azuredeploy.json" /> <Content Include="command_modules\azure-cli-acs\azure\cli\command_modules\acs\mgmt_acs\swagger_create_acs.json" /> + <Content Include="command_modules\azure-cli-acs\HISTORY.rst" /> + <Content Include="command_modules\azure-cli-appservice\HISTORY.rst" /> <Content Include="command_modules\azure-cli-appservice\README.rst" /> <Content Include="command_modules\azure-cli-appservice\setup.cfg" /> <Content Include="command_modules\azure-cli-appservice\tests\sample_web\.gitignore" /> <Content Include="command_modules\azure-cli-appservice\tests\sample_web\package.json" /> <Content Include="command_modules\azure-cli-appservice\tests\sample_web\server.js" /> + <Content Include="command_modules\azure-cli-batch\HISTORY.rst" /> <Content Include="command_modules\azure-cli-batch\tests\data\batch-pool-create-invalid.json" /> <Content Include="command_modules\azure-cli-batch\tests\data\batch-pool-create.json" /> <Content Include="command_modules\azure-cli-batch\tests\data\batch-pool-update.json" /> @@ -812,24 +821,35 @@ <Content Include="command_modules\azure-cli-batch\tests\data\batchtest.cer" /> <Content Include="command_modules\azure-cli-batch\tests\data\batchUpdatePool.json" /> <Content Include="command_modules\azure-cli-batch\tests\README.md" /> + <Content Include="command_modules\azure-cli-cloud\HISTORY.rst" /> + <Content Include="command_modules\azure-cli-component\HISTORY.rst" /> + <Content Include="command_modules\azure-cli-configure\HISTORY.rst" /> + <Content Include="command_modules\azure-cli-container\HISTORY.rst" /> <Content Include="command_modules\azure-cli-dla\HISTORY.rst" /> <Content Include="command_modules\azure-cli-dla\MANIFEST.in" /> <Content Include="command_modules\azure-cli-dla\README.rst" /> <Content Include="command_modules\azure-cli-dls\HISTORY.rst" /> <Content Include="command_modules\azure-cli-dls\MANIFEST.in" /> <Content Include="command_modules\azure-cli-dls\README.rst" /> + <Content Include="command_modules\azure-cli-documentdb\HISTORY.rst" /> + <Content Include="command_modules\azure-cli-feedback\HISTORY.rst" /> <Content Include="command_modules\azure-cli-find\HISTORY.rst" /> <Content Include="command_modules\azure-cli-find\MANIFEST.in" /> <Content Include="command_modules\azure-cli-find\README.rst" /> <Content Include="command_modules\azure-cli-find\setup.cfg" /> <Content Include="command_modules\azure-cli-iot\azure\cli\command_modules\iot\mgmt_iot_hub_device\swagger_iot_hub_device_identity.json" /> + <Content Include="command_modules\azure-cli-iot\HISTORY.rst" /> + <Content Include="command_modules\azure-cli-keyvault\HISTORY.rst" /> <Content Include="command_modules\azure-cli-keyvault\tests\policy.json" /> <Content Include="command_modules\azure-cli-keyvault\tests\policy2.json" /> <Content Include="command_modules\azure-cli-keyvault\tests\policy_import_pem.json" /> <Content Include="command_modules\azure-cli-keyvault\tests\policy_import_pfx.json" /> <Content Include="command_modules\azure-cli-keyvault\tests\policy_pending.json" /> <Content Include="command_modules\azure-cli-keyvault\tests\test_secret.txt" /> + <Content Include="command_modules\azure-cli-lab\HISTORY.rst" /> <Content Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\autoscale-parameters-template.json" /> + <Content Include="command_modules\azure-cli-monitor\HISTORY.rst" /> + <Content Include="command_modules\azure-cli-network\HISTORY.rst" /> <Content Include="command_modules\azure-cli-network\tests\zone_files\fail1.txt" /> <Content Include="command_modules\azure-cli-network\tests\zone_files\fail2.txt" /> <Content Include="command_modules\azure-cli-network\tests\zone_files\fail3.txt" /> @@ -840,15 +860,23 @@ <Content Include="command_modules\azure-cli-network\tests\zone_files\zone3.txt" /> <Content Include="command_modules\azure-cli-network\tests\zone_files\zone4.txt" /> <Content Include="command_modules\azure-cli-network\tests\zone_files\zone5.txt" /> + <Content Include="command_modules\azure-cli-profile\HISTORY.rst" /> + <Content Include="command_modules\azure-cli-redis\HISTORY.rst" /> + <Content Include="command_modules\azure-cli-resource\HISTORY.rst" /> <Content Include="command_modules\azure-cli-resource\tests\sample_policy_rule.json" /> <Content Include="command_modules\azure-cli-resource\tests\simple_deploy.json" /> <Content Include="command_modules\azure-cli-resource\tests\simple_deploy_parameters.json" /> + <Content Include="command_modules\azure-cli-role\HISTORY.rst" /> + <Content Include="command_modules\azure-cli-sql\HISTORY.rst" /> + <Content Include="command_modules\azure-cli-storage\HISTORY.rst" /> <Content Include="command_modules\azure-cli-storage\tests\Readme.md" /> <Content Include="command_modules\azure-cli-storage\tests\scripts\purge_test_sample.sh" /> <Content Include="command_modules\azure-cli-storage\tests\scripts\run_integration.sh" /> <Content Include="command_modules\azure-cli-storage\tests\scripts\set_test_env.sh" /> <Content Include="command_modules\azure-cli-storage\tests\testfile.rst" /> <Content Include="command_modules\azure-cli-storage\tests\testpage.rst" /> + <Content Include="command_modules\azure-cli-taskhelp\HISTORY.rst" /> + <Content Include="command_modules\azure-cli-vm\HISTORY.rst" /> <Content Include="command_modules\azure-cli-vm\tests\aliases.json" /> <Content Include="command_modules\azure-cli-vm\tests\keyvault\policy.json" /> <Content Include="command_modules\azure-cli-vm\tests\sample-public.json" /> diff --git a/src/command_modules/azure-cli-acs/HISTORY.rst b/src/command_modules/azure-cli-acs/HISTORY.rst index 787a4344c..553734f48 100644 --- a/src/command_modules/azure-cli-acs/HISTORY.rst +++ b/src/command_modules/azure-cli-acs/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +Unreleased +++++++++++++++++++ + +* remove windows profile before PUT call for scale command (#2755) + 2.0.2 (2017-04-03) ++++++++++++++++++ diff --git a/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/custom.py b/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/custom.py index d928b38ec..9c1bb80d1 100644 --- a/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/custom.py +++ b/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/custom.py @@ -764,6 +764,9 @@ def update_acs(client, resource_group_name, container_service_name, new_agent_co if instance.orchestrator_profile.orchestrator_type == ContainerServiceOchestratorTypes.kubernetes: instance.service_principal_profile = None + # null out the windows profile so that validation doesn't complain about not having the admin password + instance.windows_profile = None + return client.create_or_update(resource_group_name, container_service_name, instance) diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py index bcff81d87..9709b10ea 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py @@ -5,7 +5,7 @@ from azure.cli.core.help_files import helps #pylint: disable=unused-import -#pylint: disable=line-too-long +#pylint: disable=line-too-long, too-many-lines helps['lock'] = """ type: group short-summary: Manage Azure locks. diff --git a/src/command_modules/azure-cli-vm/HISTORY.rst b/src/command_modules/azure-cli-vm/HISTORY.rst index 1d8f6777f..6894110ab 100644 --- a/src/command_modules/azure-cli-vm/HISTORY.rst +++ b/src/command_modules/azure-cli-vm/HISTORY.rst @@ -5,6 +5,7 @@ Release History 2.0.3 (unreleased) ++++++++++++++++++ * vm/vmss: support create from a market place image which requires plan info(#1209) +* Fix bug with `vmss update` and `vm availability-set update` 2.0.2 (2017-04-03) ++++++++++++++++++ diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py index 61046e4e2..abdcc5955 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py @@ -3,9 +3,9 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from azure.cli.core.help_files import helps +# pylint: disable=line-too-long, too-many-lines -# pylint: disable=line-too-long +from azure.cli.core.help_files import helps image_long_summary = """ URN aliases: CentOS, CoreOS, Debian, openSUSE, RHEL, SLES, UbuntuLTS, Win2008R2SP1, Win2012Datacenter, Win2012R2Datacenter. Example URN: MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter:latest @@ -146,7 +146,7 @@ helps['vm availability-set create'] = """ long-summary: For more information, see https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-manage-availability. examples: - name: Create an availability set. - text: az vm availability-set create -n MyAvSet -g MyResourceGroup + text: az vm availability-set create -n MyAvSet -g MyResourceGroup --platform-fault-domain-count 2 --platform-update-domain-count 2 """ helps['vm availability-set update'] = """ @@ -239,11 +239,6 @@ helps['vm update'] = """ text: az <command> -n name -g group --remove networkProfile.networkInterfaces 3 """.format(generic_update_help) -helps['vm show'] = """ - type: command - short-summary: Get information about an Azure Virtual Machine. -""" - helps['vmss get-instance-view'] = """ type: command parameters: @@ -258,6 +253,16 @@ helps['vmss reimage'] = """ short-summary: "One or more VM scale sets or specific VM instance IDs. If provided, no other 'Resource Id' arguments should be specified." """ +helps['vmss disk'] = """ + type: group + short-summary: Manage the managed data disks associated with a virtual machine scale set. +""" + +helps['vmss nic'] = """ + type: group + short-summary: Manage the network interfaces associated with a virtual machine scale set. +""" + helps['vmss show'] = """ type: command parameters: @@ -265,6 +270,16 @@ helps['vmss show'] = """ short-summary: "One or more VM scale sets or specific VM instance IDs. If provided, no other 'Resource Id' arguments should be specified." """ +helps['vmss update'] = """ + type: command + short-summary: Update a virtual machine scale set. +""" + +helps['vmss wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the scale set is met. +""" + helps['vm convert'] = """ type: command short-summary: Convert a VM with unmanaged disks to use managed disks. @@ -445,7 +460,7 @@ disk_long_summary = """ helps['vm disk'] = """ type: group - short-summary: Manage the data disks attached to a VM. + short-summary: Manage the managed data disks attached to a VM. long-summary: > {0} """.format(disk_long_summary) @@ -506,6 +521,11 @@ helps['vm disk attach'] = """ text: az vm disk attach -g MyResourceGroup --vm-name MyVm --disk disk_name --new """ +helps['vm encryption'] = """ + type: group + short-summary: Manage encryption of VM disks. +""" + helps['vm extension'] = """ type: group short-summary: Extend the functionality of your VMs with extensions. @@ -842,6 +862,7 @@ helps['vm redeploy'] = """ helps['vm resize'] = """ type: command + short-summary: Update VM size. examples: - name: Resize a VM. text: az vm resize -g MyResourceGroup -n MyVm --size Standard_DS3_v2 @@ -858,6 +879,7 @@ helps['vm restart'] = """ helps['vm show'] = """ type: command + short-summary: Show details of a VM. examples: - name: Show information about a VM. text: az vm show -g MyResourceGroup -n MyVm -d diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py index bdadd1dc3..05ee1573d 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py @@ -1473,17 +1473,18 @@ def availset_get(resource_group_name, name): return _compute_client_factory().availability_sets.get(resource_group_name, name) -def availset_set(**kwargs): - return _compute_client_factory().availability_sets.create_or_update(**kwargs) +def availset_set(resource_group_name, name, **kwargs): + return _compute_client_factory().availability_sets.create_or_update(resource_group_name, name, + **kwargs) def vmss_get(resource_group_name, name): return _compute_client_factory().virtual_machine_scale_sets.get(resource_group_name, name) -def vmss_set(no_wait=False, **kwargs): +def vmss_set(resource_group_name, name, no_wait=False, **kwargs): return _compute_client_factory().virtual_machine_scale_sets.create_or_update( - raw=no_wait, **kwargs) + resource_group_name, name, raw=no_wait, **kwargs) def convert_av_set_to_managed_disk(resource_group_name, availability_set_name):
az vmss update fails when trying to update image url for VM scale set I am trying to update os image used in my VMSS, and ran following command but it fails: az vmss update -g myrg -n myvmss --set virtualMachineProfile.storageProfile.osDisk.image.uri=https://mystorage.blob.core.windows.net/system/Microsoft.Compute/Images/vsts-buildimagetask/Release-2-osDisk.6efa6e4e-d44c-4554-bee5-d32361220902.vhd Error is: create_or_update() takes at least 4 arguments (3 given) Traceback (most recent call last): File "/opt/az/local/lib/python2.7/site-packages/azure/cli/main.py", line 37, in main cmd_result = APPLICATION.execute(args) File "/opt/az/local/lib/python2.7/site-packages/azure/cli/core/application.py", line 157, in execute result = expanded_arg.func(params) File "/opt/az/local/lib/python2.7/site-packages/azure/cli/core/commands/arm.py", line 309, in handler opres = setter(client, **setterargs) if client else setter(**setterargs) File "/opt/az/local/lib/python2.7/site-packages/azure/cli/command_modules/vm/custom.py", line 1490, in vmss_set raw=no_wait, **kwargs) TypeError: create_or_update() takes at least 4 arguments (3 given) log file gist: https://gist.githubusercontent.com/bishal-pdMSFT/ffd9aa642a43de16ed56a9f887734e51/raw/2c708c0e2c281401c05ca9dad277f23d68d707d6/AzCliVmssUpdateError ### Environment summary **Install Method:** How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly) Answer here: apt-get **CLI Version:** What version of the CLI and modules are installed? (Available with `az --version`) Answer here: 2.0.2 **OS Version:** What OS and version are you using? Answer here: Ubuntu 14.04 **Shell Type:** What shell are you using? (e.g. bash, cmd.exe, PowerShell) Answer here: bash ### Description
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-vm/tests/recordings/test_vm_availset.yaml b/src/command_modules/azure-cli-vm/tests/recordings/test_vm_availset.yaml index 390590a73..88f576df2 100644 --- a/src/command_modules/azure-cli-vm/tests/recordings/test_vm_availset.yaml +++ b/src/command_modules/azure-cli-vm/tests/recordings/test_vm_availset.yaml @@ -6,19 +6,19 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.13.0 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [4e286f26-197b-11e7-95e7-a0b3ccf7272a] + x-ms-client-request-id: [3742f976-1a26-11e7-b428-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliTestRg_Availset?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_avail_set?api-version=2016-09-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cliTestRg_Availset","name":"cliTestRg_Availset","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_avail_set","name":"cli_test_avail_set","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 04 Apr 2017 21:11:46 GMT'] + Date: ['Wed, 05 Apr 2017 17:35:09 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -26,37 +26,37 @@ interactions: content-length: ['226'] status: {code: 200, message: OK} - request: - body: '{"properties": {"parameters": {}, "template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "outputs": {}, "variables": {}, "contentVersion": "1.0.0.0", "resources": [{"type": - "Microsoft.Compute/availabilitySets", "tags": {}, "location": "westus", "sku": - {"name": "Aligned"}, "properties": {"platformFaultDomainCount": 2, "platformUpdateDomainCount": - 2}, "apiVersion": "2016-04-30-preview", "name": "availset-test"}], "parameters": - {}}, "mode": "Incremental"}}' + body: '{"properties": {"parameters": {}, "mode": "Incremental", "template": {"parameters": + {}, "contentVersion": "1.0.0.0", "resources": [{"apiVersion": "2016-04-30-preview", + "name": "availset-test", "type": "Microsoft.Compute/availabilitySets", "tags": + {}, "properties": {"platformUpdateDomainCount": 2, "platformFaultDomainCount": + 2}, "sku": {"name": "Aligned"}, "location": "westus"}], "outputs": {}, "variables": + {}, "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"}}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['509'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.13.0 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [4e3ac158-197b-11e7-bbe5-a0b3ccf7272a] + x-ms-client-request-id: [375684e2-1a26-11e7-9b5e-a0b3ccf7272a] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliTestRg_Availset/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_avail_set/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cliTestRg_Availset/providers/Microsoft.Resources/deployments/av_set_deploy_Z45qIWH5DYFgYEvvrBrZWCCBvdlvRPfI","name":"av_set_deploy_Z45qIWH5DYFgYEvvrBrZWCCBvdlvRPfI","properties":{"templateHash":"11394658800043119878","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-04-04T21:11:47.8613677Z","duration":"PT0.5122453S","correlationId":"d1f30e5f-bc20-42c9-aba3-9cb4a438f725","providers":[{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"availabilitySets","locations":["westus"]}]}],"dependencies":[]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_avail_set/providers/Microsoft.Resources/deployments/av_set_deploy_SPDoW3eXYMD22OhOalVEdpS9W5DHL3Nn","name":"av_set_deploy_SPDoW3eXYMD22OhOalVEdpS9W5DHL3Nn","properties":{"templateHash":"8041814817506538688","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-04-05T17:35:11.2753176Z","duration":"PT0.6118988S","correlationId":"18abcfb7-7f45-4334-b035-d18c53869277","providers":[{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"availabilitySets","locations":["westus"]}]}],"dependencies":[]}}'} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/cliTestRg_Availset/providers/Microsoft.Resources/deployments/av_set_deploy_Z45qIWH5DYFgYEvvrBrZWCCBvdlvRPfI/operationStatuses/08587102665781284905?api-version=2016-09-01'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/cli_test_avail_set/providers/Microsoft.Resources/deployments/av_set_deploy_SPDoW3eXYMD22OhOalVEdpS9W5DHL3Nn/operationStatuses/08587101931748141948?api-version=2016-09-01'] Cache-Control: [no-cache] - Content-Length: ['633'] + Content-Length: ['632'] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 04 Apr 2017 21:11:47 GMT'] + Date: ['Wed, 05 Apr 2017 17:35:10 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 201, message: Created} - request: body: null @@ -65,19 +65,19 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.13.0 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [4e3ac158-197b-11e7-bbe5-a0b3ccf7272a] + x-ms-client-request-id: [375684e2-1a26-11e7-9b5e-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliTestRg_Availset/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587102665781284905?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_avail_set/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587101931748141948?api-version=2016-09-01 response: body: {string: '{"status":"Succeeded"}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 04 Apr 2017 21:12:17 GMT'] + Date: ['Wed, 05 Apr 2017 17:35:41 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -91,24 +91,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.13.0 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [4e3ac158-197b-11e7-bbe5-a0b3ccf7272a] + x-ms-client-request-id: [375684e2-1a26-11e7-9b5e-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cliTestRg_Availset/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_avail_set/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cliTestRg_Availset/providers/Microsoft.Resources/deployments/av_set_deploy_Z45qIWH5DYFgYEvvrBrZWCCBvdlvRPfI","name":"av_set_deploy_Z45qIWH5DYFgYEvvrBrZWCCBvdlvRPfI","properties":{"templateHash":"11394658800043119878","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-04-04T21:11:55.0818441Z","duration":"PT7.7327217S","correlationId":"d1f30e5f-bc20-42c9-aba3-9cb4a438f725","providers":[{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"availabilitySets","locations":["westus"]}]}],"dependencies":[],"outputs":{},"outputResources":[{"id":"Microsoft.Compute/availabilitySets/availset-test"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_avail_set/providers/Microsoft.Resources/deployments/av_set_deploy_SPDoW3eXYMD22OhOalVEdpS9W5DHL3Nn","name":"av_set_deploy_SPDoW3eXYMD22OhOalVEdpS9W5DHL3Nn","properties":{"templateHash":"8041814817506538688","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-04-05T17:35:18.2863144Z","duration":"PT7.6228956S","correlationId":"18abcfb7-7f45-4334-b035-d18c53869277","providers":[{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"availabilitySets","locations":["westus"]}]}],"dependencies":[],"outputs":{},"outputResources":[{"id":"Microsoft.Compute/availabilitySets/availset-test"}]}}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 04 Apr 2017 21:12:18 GMT'] + Date: ['Wed, 05 Apr 2017 17:35:41 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] - content-length: ['725'] + content-length: ['724'] status: {code: 200, message: OK} - request: body: null @@ -117,24 +117,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.13.0 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 computemanagementclient/0.33.1rc1 Azure-SDK-For-Python AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [61eb12c2-197b-11e7-aa2f-a0b3ccf7272a] + x-ms-client-request-id: [4b061b0a-1a26-11e7-bd7b-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cliTestRg_Availset/providers/Microsoft.Compute/availabilitySets/availset-test?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_avail_set/providers/Microsoft.Compute/availabilitySets/availset-test?api-version=2016-04-30-preview response: body: {string: "{\r\n \"properties\": {\r\n \"platformUpdateDomainCount\"\ : 2,\r\n \"platformFaultDomainCount\": 2,\r\n \"virtualMachines\": []\r\ \n },\r\n \"type\": \"Microsoft.Compute/availabilitySets\",\r\n \"location\"\ - : \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cliTestRg_Availset/providers/Microsoft.Compute/availabilitySets/availset-test\"\ + : \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_avail_set/providers/Microsoft.Compute/availabilitySets/availset-test\"\ ,\r\n \"name\": \"availset-test\",\r\n \"sku\": {\r\n \"name\": \"Aligned\"\ \r\n }\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 04 Apr 2017 21:12:19 GMT'] + Date: ['Wed, 05 Apr 2017 17:35:42 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -150,32 +150,103 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.13.0 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 computemanagementclient/0.33.1rc1 Azure-SDK-For-Python AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [626d9c90-197b-11e7-a7bf-a0b3ccf7272a] + x-ms-client-request-id: [4b89e2a6-1a26-11e7-aff7-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cliTestRg_Availset/providers/Microsoft.Compute/availabilitySets?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_avail_set/providers/Microsoft.Compute/availabilitySets/availset-test?api-version=2016-04-30-preview + response: + body: {string: "{\r\n \"properties\": {\r\n \"platformUpdateDomainCount\"\ + : 2,\r\n \"platformFaultDomainCount\": 2,\r\n \"virtualMachines\": []\r\ + \n },\r\n \"type\": \"Microsoft.Compute/availabilitySets\",\r\n \"location\"\ + : \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_avail_set/providers/Microsoft.Compute/availabilitySets/availset-test\"\ + ,\r\n \"name\": \"availset-test\",\r\n \"sku\": {\r\n \"name\": \"Aligned\"\ + \r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Wed, 05 Apr 2017 17:35:43 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['449'] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"virtualMachines": [], "platformUpdateDomainCount": 2, + "platformFaultDomainCount": 2}, "sku": {"name": "Aligned"}, "location": "westus", + "tags": {"test": "success"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['181'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 computemanagementclient/0.33.1rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] + accept-language: [en-US] + x-ms-client-request-id: [4bc632d2-1a26-11e7-9654-a0b3ccf7272a] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_avail_set/providers/Microsoft.Compute/availabilitySets/availset-test?api-version=2016-04-30-preview + response: + body: {string: "{\r\n \"properties\": {\r\n \"platformUpdateDomainCount\"\ + : 2,\r\n \"platformFaultDomainCount\": 2\r\n },\r\n \"type\": \"Microsoft.Compute/availabilitySets\"\ + ,\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"test\": \"success\"\ + \r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_avail_set/providers/Microsoft.Compute/availabilitySets/availset-test\"\ + ,\r\n \"name\": \"availset-test\",\r\n \"sku\": {\r\n \"name\": \"Aligned\"\ + \r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Wed, 05 Apr 2017 17:35:44 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['448'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 computemanagementclient/0.33.1rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] + accept-language: [en-US] + x-ms-client-request-id: [4cac9c86-1a26-11e7-b434-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_avail_set/providers/Microsoft.Compute/availabilitySets?api-version=2016-04-30-preview response: body: {string: "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \ \ \"platformUpdateDomainCount\": 2,\r\n \"platformFaultDomainCount\"\ : 2,\r\n \"virtualMachines\": []\r\n },\r\n \"type\": \"\ Microsoft.Compute/availabilitySets\",\r\n \"location\": \"westus\",\r\ - \n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cliTestRg_Availset/providers/Microsoft.Compute/availabilitySets/availset-test\"\ + \n \"tags\": {\r\n \"test\": \"success\"\r\n },\r\n \ + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_avail_set/providers/Microsoft.Compute/availabilitySets/availset-test\"\ ,\r\n \"name\": \"availset-test\",\r\n \"sku\": {\r\n \"\ name\": \"Aligned\"\r\n }\r\n }\r\n ]\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 04 Apr 2017 21:12:20 GMT'] + Date: ['Wed, 05 Apr 2017 17:35:45 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['534'] + content-length: ['569'] status: {code: 200, message: OK} - request: body: null @@ -184,13 +255,13 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.13.0 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 computemanagementclient/0.33.1rc1 Azure-SDK-For-Python AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [62f493f6-197b-11e7-9f88-a0b3ccf7272a] + x-ms-client-request-id: [4d2ba6c6-1a26-11e7-ba66-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cliTestRg_Availset/providers/Microsoft.Compute/availabilitySets/availset-test/vmSizes?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_avail_set/providers/Microsoft.Compute/availabilitySets/availset-test/vmSizes?api-version=2016-04-30-preview response: body: {string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"Standard_DS1_v2\"\ ,\r\n \"numberOfCores\": 1,\r\n \"osDiskSizeInMB\": 1047552,\r\n\ @@ -517,7 +588,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 04 Apr 2017 21:12:21 GMT'] + Date: ['Wed, 05 Apr 2017 17:35:45 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -533,31 +604,32 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.13.0 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 computemanagementclient/0.33.1rc1 Azure-SDK-For-Python AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [639e81dc-197b-11e7-85b0-a0b3ccf7272a] + x-ms-client-request-id: [4dca4c80-1a26-11e7-82f4-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cliTestRg_Availset/providers/Microsoft.Compute/availabilitySets/availset-test?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_avail_set/providers/Microsoft.Compute/availabilitySets/availset-test?api-version=2016-04-30-preview response: body: {string: "{\r\n \"properties\": {\r\n \"platformUpdateDomainCount\"\ : 2,\r\n \"platformFaultDomainCount\": 2,\r\n \"virtualMachines\": []\r\ \n },\r\n \"type\": \"Microsoft.Compute/availabilitySets\",\r\n \"location\"\ - : \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cliTestRg_Availset/providers/Microsoft.Compute/availabilitySets/availset-test\"\ + : \"westus\",\r\n \"tags\": {\r\n \"test\": \"success\"\r\n },\r\n \"\ + id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_avail_set/providers/Microsoft.Compute/availabilitySets/availset-test\"\ ,\r\n \"name\": \"availset-test\",\r\n \"sku\": {\r\n \"name\": \"Aligned\"\ \r\n }\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 04 Apr 2017 21:12:22 GMT'] + Date: ['Wed, 05 Apr 2017 17:35:47 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['449'] + content-length: ['476'] status: {code: 200, message: OK} - request: body: null @@ -567,24 +639,24 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.13.0 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 computemanagementclient/0.33.1rc1 Azure-SDK-For-Python AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [6444777e-197b-11e7-9414-a0b3ccf7272a] + x-ms-client-request-id: [4e5daefa-1a26-11e7-ae0d-a0b3ccf7272a] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cliTestRg_Availset/providers/Microsoft.Compute/availabilitySets/availset-test?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_avail_set/providers/Microsoft.Compute/availabilitySets/availset-test?api-version=2016-04-30-preview response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Tue, 04 Apr 2017 21:12:24 GMT'] + Date: ['Wed, 05 Apr 2017 17:35:48 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: body: null @@ -593,19 +665,19 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.13.0 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 computemanagementclient/0.33.1rc1 Azure-SDK-For-Python AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [652fe500-197b-11e7-83aa-a0b3ccf7272a] + x-ms-client-request-id: [4f558e4c-1a26-11e7-8914-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cliTestRg_Availset/providers/Microsoft.Compute/availabilitySets?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_avail_set/providers/Microsoft.Compute/availabilitySets?api-version=2016-04-30-preview response: body: {string: '{"value":[]}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 04 Apr 2017 21:12:24 GMT'] + Date: ['Wed, 05 Apr 2017 17:35:49 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] diff --git a/src/command_modules/azure-cli-vm/tests/recordings/test_vmss_create_none_options.yaml b/src/command_modules/azure-cli-vm/tests/recordings/test_vmss_create_none_options.yaml index c1d002b79..7f4a2c0b3 100644 --- a/src/command_modules/azure-cli-vm/tests/recordings/test_vmss_create_none_options.yaml +++ b/src/command_modules/azure-cli-vm/tests/recordings/test_vmss_create_none_options.yaml @@ -6,62 +6,62 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [4bdb5d0c-e75c-11e6-9bb5-64510658e3b3] + x-ms-client-request-id: [510486a1-1a26-11e7-a3e8-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_none_options?api-version=2016-09-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options","name":"cli_test_vmss_create_none_options","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options","name":"cli_test_vmss_create_none_options","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 02:23:47 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['256'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:35:52 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null headers: Connection: [close] Host: [raw.githubusercontent.com] - User-Agent: [Python-urllib/3.5] + User-Agent: [Python-urllib/2.7] method: GET uri: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json response: - body: {string: "{\n \"$schema\":\"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\"\ + body: {string: !!python/unicode "{\n \"$schema\":\"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\"\ ,\n \"contentVersion\":\"1.0.0.0\",\n \"parameters\":{},\n \"variables\"\ :{},\n \"resources\":[],\n\n \"outputs\":{\n \"aliases\":{\n \"\ - metadata\":{\n \"description\":\"This list of aliases is used by Azure\ - \ XPLAT CLI, Azure Powershell, and Azure Portal as shorthands for commonly\ - \ used VM images. If you change this file, please verify that this doesn't\ - \ break VMSS creation from Portal :).\"\n },\n \"type\":\"object\"\ - ,\n \"value\":{\n\n \"Linux\":{\n \"CentOS\":{\n \ - \ \"publisher\":\"OpenLogic\",\n \"offer\":\"CentOS\",\n\ - \ \"sku\":\"7.2\",\n \"version\":\"latest\"\n \ - \ },\n \"CoreOS\":{\n \"publisher\":\"CoreOS\",\n \ - \ \"offer\":\"CoreOS\",\n \"sku\":\"Stable\",\n \ - \ \"version\":\"latest\"\n },\n \"Debian\":{\n \ - \ \"publisher\":\"credativ\",\n \"offer\":\"Debian\",\n\ - \ \"sku\":\"8\",\n \"version\":\"latest\"\n \ - \ },\n \"openSUSE\":{\n \"publisher\":\"SUSE\",\n \ - \ \"offer\":\"openSUSE\",\n \"sku\":\"13.2\",\n \ - \ \"version\":\"latest\"\n },\n \"RHEL\":{\n \ - \ \"publisher\":\"RedHat\",\n \"offer\":\"RHEL\",\n \ - \ \"sku\":\"7.2\",\n \"version\":\"latest\"\n },\n\ - \ \"SLES\":{\n \"publisher\":\"SUSE\",\n \"\ - offer\":\"SLES\",\n \"sku\":\"12-SP1\",\n \"version\"\ - :\"latest\"\n },\n \"UbuntuLTS\":{\n \"publisher\"\ - :\"Canonical\",\n \"offer\":\"UbuntuServer\",\n \"sku\"\ - :\"14.04.4-LTS\",\n \"version\":\"latest\"\n }\n \ - \ },\n\n \"Windows\":{\n \"Win2012R2Datacenter\":{\n \ - \ \"publisher\":\"MicrosoftWindowsServer\",\n \"offer\"\ - :\"WindowsServer\",\n \"sku\":\"2012-R2-Datacenter\",\n \ - \ \"version\":\"latest\"\n },\n \"Win2012Datacenter\"\ + type\":\"object\",\n \"value\":{\n\n \"Linux\":{\n \"\ + CentOS\":{\n \"publisher\":\"OpenLogic\",\n \"offer\"\ + :\"CentOS\",\n \"sku\":\"7.3\",\n \"version\":\"latest\"\ + \n },\n \"CoreOS\":{\n \"publisher\":\"CoreOS\"\ + ,\n \"offer\":\"CoreOS\",\n \"sku\":\"Stable\",\n \ + \ \"version\":\"latest\"\n },\n \"Debian\":{\n\ + \ \"publisher\":\"credativ\",\n \"offer\":\"Debian\"\ + ,\n \"sku\":\"8\",\n \"version\":\"latest\"\n \ + \ },\n \"openSUSE-Leap\": {\n \"publisher\":\"SUSE\"\ + ,\n \"offer\":\"openSUSE-Leap\",\n \"sku\":\"42.2\"\ + ,\n \"version\": \"latest\"\n },\n \"RHEL\":{\n\ + \ \"publisher\":\"RedHat\",\n \"offer\":\"RHEL\",\n\ + \ \"sku\":\"7.3\",\n \"version\":\"latest\"\n \ + \ },\n \"SLES\":{\n \"publisher\":\"SUSE\",\n \ + \ \"offer\":\"SLES\",\n \"sku\":\"12-SP2\",\n \ + \ \"version\":\"latest\"\n },\n \"UbuntuLTS\":{\n \ + \ \"publisher\":\"Canonical\",\n \"offer\":\"UbuntuServer\"\ + ,\n \"sku\":\"16.04-LTS\",\n \"version\":\"latest\"\n\ + \ }\n },\n\n \"Windows\":{\n \"Win2016Datacenter\"\ + :{\n \"publisher\":\"MicrosoftWindowsServer\",\n \"\ + offer\":\"WindowsServer\",\n \"sku\":\"2016-Datacenter\",\n \ + \ \"version\":\"latest\"\n },\n \"Win2012R2Datacenter\"\ + :{\n \"publisher\":\"MicrosoftWindowsServer\",\n \"\ + offer\":\"WindowsServer\",\n \"sku\":\"2012-R2-Datacenter\",\n\ + \ \"version\":\"latest\"\n },\n \"Win2012Datacenter\"\ :{\n \"publisher\":\"MicrosoftWindowsServer\",\n \"\ offer\":\"WindowsServer\",\n \"sku\":\"2012-Datacenter\",\n \ \ \"version\":\"latest\"\n },\n \"Win2008R2SP1\"\ @@ -70,30 +70,30 @@ interactions: \ \"version\":\"latest\"\n }\n }\n }\n }\n }\n\ }\n"} headers: - Accept-Ranges: [bytes] - Access-Control-Allow-Origin: ['*'] - Cache-Control: [max-age=300] - Connection: [close] - Content-Length: ['2297'] - Content-Security-Policy: [default-src 'none'; style-src 'unsafe-inline'] - Content-Type: [text/plain; charset=utf-8] - Date: ['Tue, 31 Jan 2017 02:23:48 GMT'] - ETag: ['"db78eb36618a060181b32ac2de91b1733f382e01"'] - Expires: ['Tue, 31 Jan 2017 02:28:48 GMT'] - Source-Age: ['92'] - Strict-Transport-Security: [max-age=31536000] - Vary: ['Authorization,Accept-Encoding'] - Via: [1.1 varnish] - X-Cache: [HIT] - X-Cache-Hits: ['4'] - X-Content-Type-Options: [nosniff] - X-Fastly-Request-ID: [e3d643fc88bf8216e8c0b03c54d6372bbae38ffe] - X-Frame-Options: [deny] - X-Geo-Block-List: [''] - X-GitHub-Request-Id: ['D59A:5F89:1173F0A:1201B89:588FF4D5'] - X-Served-By: [cache-den6020-DEN] - X-Timer: ['S1485829428.113981,VS0,VE0'] - X-XSS-Protection: [1; mode=block] + accept-ranges: [bytes] + access-control-allow-origin: ['*'] + cache-control: [max-age=300] + connection: [close] + content-length: ['2235'] + content-security-policy: [default-src 'none'; style-src 'unsafe-inline'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:35:54 GMT'] + etag: ['"d6824855d13e27c5258a680eb60f635d088fd05e"'] + expires: ['Wed, 05 Apr 2017 17:40:54 GMT'] + source-age: ['0'] + strict-transport-security: [max-age=31536000] + vary: ['Authorization,Accept-Encoding'] + via: [1.1 varnish] + x-cache: [MISS] + x-cache-hits: ['0'] + x-content-type-options: [nosniff] + x-fastly-request-id: [629fd3a682815aa9222dcda70eedfd53926468a4] + x-frame-options: [deny] + x-geo-block-list: [''] + x-github-request-id: ['21DA:04F8:2EAC905:3080E89:58E52AFA'] + x-served-by: [cache-sea1021-SEA] + x-timer: ['S1491413754.234857,VS0,VE414'] + x-xss-protection: [1; mode=block] status: {code: 200, message: OK} - request: body: null @@ -102,78 +102,73 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [4c1c8576-e75c-11e6-b23d-64510658e3b3] + x-ms-client-request-id: [5203a71e-1a26-11e7-8815-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Network/virtualNetworks?api-version=2016-09-01 response: - body: {string: '{"value":[]}'} + body: {string: !!python/unicode '{"value":[]}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 02:23:48 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:35:53 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: - body: '{"properties": {"template": {"contentVersion": "1.0.0.0", "resources": - [{"dependsOn": [], "properties": {"addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, - "subnets": [{"properties": {"addressPrefix": "10.0.0.0/24"}, "name": "vmss1Subnet"}]}, - "type": "Microsoft.Network/virtualNetworks", "apiVersion": "2015-06-15", "tags": - {}, "name": "vmss1VNET", "location": "westus"}, {"dependsOn": ["Microsoft.Network/virtualNetworks/vmss1VNET"], - "properties": {"upgradePolicy": {"mode": "Manual"}, "singlePlacementGroup": - true, "virtualMachineProfile": {"networkProfile": {"networkInterfaceConfigurations": - [{"properties": {"primary": "true", "ipConfigurations": [{"properties": {"subnet": - {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Network/virtualNetworks/vmss1VNET/subnets/vmss1Subnet"}}, - "name": "vmss11i6rIPConfig"}]}, "name": "vmss11i6rNic"}]}, "storageProfile": - {"imageReference": {"offer": "Debian", "sku": "8", "publisher": "credativ", - "version": "latest"}, "osDisk": {"caching": "ReadOnly", "managedDisk": {"storageAccountType": - "Standard_LRS"}, "createOption": "FromImage"}}, "osProfile": {"adminUsername": - "yugangw", "computerNamePrefix": "vmss11i6r", "linuxConfiguration": {"disablePasswordAuthentication": - true, "ssh": {"publicKeys": [{"path": "/home/yugangw/.ssh/authorized_keys", - "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== - test@example.com\n"}]}}}}, "overprovision": true}, "type": "Microsoft.Compute/virtualMachineScaleSets", - "apiVersion": "2016-04-30-preview", "tags": {}, "name": "vmss1", "sku": {"name": - "Standard_D1_v2", "tier": "Standard", "capacity": 2}, "location": "westus"}], - "variables": {"storageAccountNames": ["vmss11i6r0", "vmss11i6r1", "vmss11i6r2", - "vmss11i6r3", "vmss11i6r4"], "vhdContainers": ["[concat(''https://'', variables(''storageAccountNames'')[0], - ''.blob.core.windows.net/vhds'')]", "[concat(''https://'', variables(''storageAccountNames'')[1], - ''.blob.core.windows.net/vhds'')]", "[concat(''https://'', variables(''storageAccountNames'')[2], - ''.blob.core.windows.net/vhds'')]", "[concat(''https://'', variables(''storageAccountNames'')[3], - ''.blob.core.windows.net/vhds'')]", "[concat(''https://'', variables(''storageAccountNames'')[4], - ''.blob.core.windows.net/vhds'')]"]}, "outputs": {"VMSS": {"value": "[reference(resourceId(''Microsoft.Compute/virtualMachineScaleSets'', - ''vmss1''),providers(''Microsoft.Compute'', ''virtualMachineScaleSets'').apiVersions[0])]", - "type": "object"}}, "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "parameters": {}}, "parameters": {}, "mode": "Incremental"}}' + body: !!python/unicode '{"properties": {"mode": "Incremental", "parameters": {}, + "template": {"parameters": {}, "outputs": {"VMSS": {"type": "object", "value": + "[reference(resourceId(''Microsoft.Compute/virtualMachineScaleSets'', ''vmss1''),providers(''Microsoft.Compute'', + ''virtualMachineScaleSets'').apiVersions[0])]"}}, "variables": {}, "contentVersion": + "1.0.0.0", "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "resources": [{"name": "vmss1VNET", "tags": {}, "apiVersion": "2015-06-15", + "location": "westus", "dependsOn": [], "type": "Microsoft.Network/virtualNetworks", + "properties": {"subnets": [{"name": "vmss1Subnet", "properties": {"addressPrefix": + "10.0.0.0/24"}}], "addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}}}, {"sku": + {"tier": "Standard", "capacity": 2, "name": "Standard_D1_v2"}, "name": "vmss1", + "tags": {}, "apiVersion": "2016-04-30-preview", "location": "westus", "dependsOn": + ["Microsoft.Network/virtualNetworks/vmss1VNET"], "type": "Microsoft.Compute/virtualMachineScaleSets", + "properties": {"singlePlacementGroup": true, "virtualMachineProfile": {"storageProfile": + {"imageReference": {"sku": "8", "publisher": "credativ", "version": "latest", + "offer": "Debian"}, "osDisk": {"caching": "ReadWrite", "managedDisk": {"storageAccountType": + "Standard_LRS"}, "createOption": "FromImage"}}, "osProfile": {"computerNamePrefix": + "vmss1247x", "adminUsername": "ubuntu", "linuxConfiguration": {"ssh": {"publicKeys": + [{"path": "/home/ubuntu/.ssh/authorized_keys", "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}, "disablePasswordAuthentication": true}}, "networkProfile": + {"networkInterfaceConfigurations": [{"name": "vmss1247xNic", "properties": {"primary": + "true", "ipConfigurations": [{"name": "vmss1247xIPConfig", "properties": {"subnet": + {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Network/virtualNetworks/vmss1VNET/subnets/vmss1Subnet"}}}]}}]}}, + "overprovision": true, "upgradePolicy": {"mode": "Manual"}}}]}}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['3326'] + Content-Length: ['2753'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [4c40fd54-e75c-11e6-b444-64510658e3b3] + x-ms-client-request-id: [521dbecf-1a26-11e7-9c8c-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/vmss_deploy_N5L40IU9kvBddIGfYy2Gb51rQeR9Fol0","name":"vmss_deploy_N5L40IU9kvBddIGfYy2Gb51rQeR9Fol0","properties":{"parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-01-31T02:23:49.4134276Z","duration":"PT0.612975S","correlationId":"fa45a063-c769-4a35-9c91-7c86415baa2e","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachineScaleSets","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Network/virtualNetworks/vmss1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vmss1VNET"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"vmss1"}]}}'} + body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/vmss_deploy_oexSGEOf0DQtjm9VsFUp9ahA99kjuRkp","name":"vmss_deploy_oexSGEOf0DQtjm9VsFUp9ahA99kjuRkp","properties":{"templateHash":"15286152982969927295","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-04-05T17:35:55.8908997Z","duration":"PT0.5316267S","correlationId":"a0d7e709-a029-4ad7-9523-a2975d4f2751","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachineScaleSets","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Network/virtualNetworks/vmss1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vmss1VNET"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"vmss1"}]}}'} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/vmss_deploy_N5L40IU9kvBddIGfYy2Gb51rQeR9Fol0/operationStatuses/08587157774566771962?api-version=2016-09-01'] - Cache-Control: [no-cache] - Content-Length: ['1239'] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 02:23:49 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/vmss_deploy_oexSGEOf0DQtjm9VsFUp9ahA99kjuRkp/operationStatuses/08587101931301183462?api-version=2016-09-01'] + cache-control: [no-cache] + content-length: ['1278'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:35:56 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 201, message: Created} - request: body: null @@ -182,23 +177,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [4c40fd54-e75c-11e6-b444-64510658e3b3] + x-ms-client-request-id: [521dbecf-1a26-11e7-9c8c-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587157774566771962?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587101931301183462?api-version=2016-09-01 response: - body: {string: '{"status":"Running"}'} + body: {string: !!python/unicode '{"status":"Running"}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 02:24:19 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['20'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:36:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -207,23 +203,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [4c40fd54-e75c-11e6-b444-64510658e3b3] + x-ms-client-request-id: [521dbecf-1a26-11e7-9c8c-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587157774566771962?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587101931301183462?api-version=2016-09-01 response: - body: {string: '{"status":"Running"}'} + body: {string: !!python/unicode '{"status":"Running"}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 02:24:50 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['20'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:36:55 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -232,23 +229,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [4c40fd54-e75c-11e6-b444-64510658e3b3] + x-ms-client-request-id: [521dbecf-1a26-11e7-9c8c-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587157774566771962?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587101931301183462?api-version=2016-09-01 response: - body: {string: '{"status":"Running"}'} + body: {string: !!python/unicode '{"status":"Running"}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 02:25:20 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['20'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:37:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -257,23 +255,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [4c40fd54-e75c-11e6-b444-64510658e3b3] + x-ms-client-request-id: [521dbecf-1a26-11e7-9c8c-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587157774566771962?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587101931301183462?api-version=2016-09-01 response: - body: {string: '{"status":"Running"}'} + body: {string: !!python/unicode '{"status":"Running"}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 02:25:49 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['20'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:37:56 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -282,23 +281,52 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [4c40fd54-e75c-11e6-b444-64510658e3b3] + x-ms-client-request-id: [521dbecf-1a26-11e7-9c8c-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587157774566771962?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587101931301183462?api-version=2016-09-01 response: - body: {string: '{"status":"Running"}'} + body: {string: !!python/unicode '{"status":"Succeeded"}'} + headers: + cache-control: [no-cache] + content-length: ['22'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:38:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null headers: - Cache-Control: [no-cache] + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 02:26:20 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - content-length: ['20'] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] + accept-language: [en-US] + x-ms-client-request-id: [521dbecf-1a26-11e7-9c8c-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 + response: + body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/vmss_deploy_oexSGEOf0DQtjm9VsFUp9ahA99kjuRkp","name":"vmss_deploy_oexSGEOf0DQtjm9VsFUp9ahA99kjuRkp","properties":{"templateHash":"15286152982969927295","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-04-05T17:38:07.7332452Z","duration":"PT2M12.3739722S","correlationId":"a0d7e709-a029-4ad7-9523-a2975d4f2751","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachineScaleSets","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Network/virtualNetworks/vmss1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vmss1VNET"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"vmss1"}],"outputs":{"vmss":{"type":"Object","value":{"singlePlacementGroup":true,"upgradePolicy":{"mode":"Manual"},"virtualMachineProfile":{"osProfile":{"computerNamePrefix":"vmss1247x","adminUsername":"ubuntu","linuxConfiguration":{"disablePasswordAuthentication":true,"ssh":{"publicKeys":[{"path":"/home/ubuntu/.ssh/authorized_keys","keyData":"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}},"secrets":[]},"storageProfile":{"osDisk":{"createOption":"FromImage","caching":"ReadWrite","managedDisk":{"storageAccountType":"Standard_LRS"}},"imageReference":{"publisher":"credativ","offer":"Debian","sku":"8","version":"latest"}},"networkProfile":{"networkInterfaceConfigurations":[{"name":"vmss1247xNic","properties":{"primary":true,"ipConfigurations":[{"name":"vmss1247xIPConfig","properties":{"subnet":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Network/virtualNetworks/vmss1VNET/subnets/vmss1Subnet"}}}]}}]}},"provisioningState":"Succeeded","overprovision":true,"uniqueId":"26fcde72-e107-4262-8d44-9a168484a948"}}},"outputResources":[{"id":"Microsoft.Compute/virtualMachineScaleSets/vmss1"},{"id":"Microsoft.Network/virtualNetworks/vmss1VNET"}]}}'} + headers: + cache-control: [no-cache] + content-length: ['3210'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:38:27 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -307,23 +335,173 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 computemanagementclient/0.33.1rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [4c40fd54-e75c-11e6-b444-64510658e3b3] + x-ms-client-request-id: [ae4e0e80-1a26-11e7-8908-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587157774566771962?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2016-04-30-preview response: - body: {string: '{"status":"Succeeded"}'} + body: {string: !!python/unicode "{\r\n \"sku\": {\r\n \"name\": \"Standard_D1_v2\"\ + ,\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\"\ + : {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n\ + \ \"mode\": \"Manual\"\r\n },\r\n \"virtualMachineProfile\": {\r\ + \n \"osProfile\": {\r\n \"computerNamePrefix\": \"vmss1247x\"\ + ,\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ + : {\r\n \"disablePasswordAuthentication\": true,\r\n \"\ + ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \ + \ \"path\": \"/home/ubuntu/.ssh/authorized_keys\",\r\n \ + \ \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ==\ + \ test@example.com\\n\"\r\n }\r\n ]\r\n }\r\ + \n },\r\n \"secrets\": []\r\n },\r\n \"storageProfile\"\ + : {\r\n \"osDisk\": {\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\ + \n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n\ + \ },\r\n \"imageReference\": {\r\n \"publisher\": \"\ + credativ\",\r\n \"offer\": \"Debian\",\r\n \"sku\": \"8\"\ + ,\r\n \"version\": \"latest\"\r\n }\r\n },\r\n \"\ + networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"vmss1247xNic\"\ + ,\"properties\":{\"primary\":true,\"ipConfigurations\":[{\"name\":\"vmss1247xIPConfig\"\ + ,\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Network/virtualNetworks/vmss1VNET/subnets/vmss1Subnet\"\ + }}}]}}]}\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ + overprovision\": true,\r\n \"uniqueId\": \"26fcde72-e107-4262-8d44-9a168484a948\"\ + \r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n\ + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1\"\ + ,\r\n \"name\": \"vmss1\"\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['2621'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:38:29 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null headers: - Cache-Control: [no-cache] + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 02:26:50 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - content-length: ['22'] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 computemanagementclient/0.33.1rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] + accept-language: [en-US] + x-ms-client-request-id: [af4f2acf-1a26-11e7-8c8b-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2016-04-30-preview + response: + body: {string: !!python/unicode "{\r\n \"sku\": {\r\n \"name\": \"Standard_D1_v2\"\ + ,\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\"\ + : {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n\ + \ \"mode\": \"Manual\"\r\n },\r\n \"virtualMachineProfile\": {\r\ + \n \"osProfile\": {\r\n \"computerNamePrefix\": \"vmss1247x\"\ + ,\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ + : {\r\n \"disablePasswordAuthentication\": true,\r\n \"\ + ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \ + \ \"path\": \"/home/ubuntu/.ssh/authorized_keys\",\r\n \ + \ \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ==\ + \ test@example.com\\n\"\r\n }\r\n ]\r\n }\r\ + \n },\r\n \"secrets\": []\r\n },\r\n \"storageProfile\"\ + : {\r\n \"osDisk\": {\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\ + \n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n\ + \ },\r\n \"imageReference\": {\r\n \"publisher\": \"\ + credativ\",\r\n \"offer\": \"Debian\",\r\n \"sku\": \"8\"\ + ,\r\n \"version\": \"latest\"\r\n }\r\n },\r\n \"\ + networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"vmss1247xNic\"\ + ,\"properties\":{\"primary\":true,\"ipConfigurations\":[{\"name\":\"vmss1247xIPConfig\"\ + ,\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Network/virtualNetworks/vmss1VNET/subnets/vmss1Subnet\"\ + }}}]}}]}\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ + overprovision\": true,\r\n \"uniqueId\": \"26fcde72-e107-4262-8d44-9a168484a948\"\ + \r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n\ + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1\"\ + ,\r\n \"name\": \"vmss1\"\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['2621'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:38:30 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: !!python/unicode '{"sku": {"tier": "Standard", "capacity": 2, "name": "Standard_D1_v2"}, + "location": "westus", "properties": {"singlePlacementGroup": true, "overprovision": + true, "virtualMachineProfile": {"storageProfile": {"imageReference": {"sku": + "8", "publisher": "credativ", "version": "latest", "offer": "Debian"}, "osDisk": + {"caching": "ReadWrite", "managedDisk": {"storageAccountType": "Standard_LRS"}, + "createOption": "fromImage"}}, "osProfile": {"secrets": [], "adminUsername": + "ubuntu", "computerNamePrefix": "vmss1247x", "linuxConfiguration": {"ssh": {"publicKeys": + [{"path": "/home/ubuntu/.ssh/authorized_keys", "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}, "disablePasswordAuthentication": true}}, "networkProfile": + {"networkInterfaceConfigurations": [{"properties": {"primary": true, "ipConfigurations": + [{"properties": {"subnet": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Network/virtualNetworks/vmss1VNET/subnets/vmss1Subnet"}}, + "name": "vmss1247xIPConfig"}]}, "name": "vmss1247xNic"}]}}, "upgradePolicy": + {"mode": "Manual"}}, "tags": {"test": "success"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['1862'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 computemanagementclient/0.33.1rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] + accept-language: [en-US] + x-ms-client-request-id: [af81374f-1a26-11e7-b7f5-a0b3ccf7272a] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2016-04-30-preview + response: + body: {string: !!python/unicode "{\r\n \"sku\": {\r\n \"name\": \"Standard_D1_v2\"\ + ,\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\"\ + : {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n\ + \ \"mode\": \"Manual\"\r\n },\r\n \"virtualMachineProfile\": {\r\ + \n \"osProfile\": {\r\n \"computerNamePrefix\": \"vmss1247x\"\ + ,\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ + : {\r\n \"disablePasswordAuthentication\": true,\r\n \"\ + ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \ + \ \"path\": \"/home/ubuntu/.ssh/authorized_keys\",\r\n \ + \ \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ==\ + \ test@example.com\\n\"\r\n }\r\n ]\r\n }\r\ + \n },\r\n \"secrets\": []\r\n },\r\n \"storageProfile\"\ + : {\r\n \"osDisk\": {\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\ + \n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n\ + \ },\r\n \"imageReference\": {\r\n \"publisher\": \"\ + credativ\",\r\n \"offer\": \"Debian\",\r\n \"sku\": \"8\"\ + ,\r\n \"version\": \"latest\"\r\n }\r\n },\r\n \"\ + networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"vmss1247xNic\"\ + ,\"properties\":{\"primary\":true,\"ipConfigurations\":[{\"name\":\"vmss1247xIPConfig\"\ + ,\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Network/virtualNetworks/vmss1VNET/subnets/vmss1Subnet\"\ + }}}]}}]}\r\n },\r\n \"provisioningState\": \"Updating\",\r\n \"overprovision\"\ + : true,\r\n \"uniqueId\": \"26fcde72-e107-4262-8d44-9a168484a948\"\r\n\ + \ },\r\n \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"\ + location\": \"westus\",\r\n \"tags\": {\r\n \"test\": \"success\"\r\n\ + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1\"\ + ,\r\n \"name\": \"vmss1\"\r\n}"} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/westus/operations/b215c3c1-c984-4c12-84d7-8c01b94d6295?api-version=2016-04-30-preview'] + cache-control: [no-cache] + content-length: ['2647'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:38:32 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -332,25 +510,58 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 computemanagementclient/0.33.1rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [4c40fd54-e75c-11e6-b444-64510658e3b3] + x-ms-client-request-id: [af81374f-1a26-11e7-b7f5-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2016-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/b215c3c1-c984-4c12-84d7-8c01b94d6295?api-version=2016-04-30-preview response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Resources/deployments/vmss_deploy_N5L40IU9kvBddIGfYy2Gb51rQeR9Fol0","name":"vmss_deploy_N5L40IU9kvBddIGfYy2Gb51rQeR9Fol0","properties":{"parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-01-31T02:26:33.932548Z","duration":"PT2M45.1320954S","correlationId":"fa45a063-c769-4a35-9c91-7c86415baa2e","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachineScaleSets","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Network/virtualNetworks/vmss1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vmss1VNET"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"vmss1"}],"outputs":{"vmss":{"type":"Object","value":{"singlePlacementGroup":true,"upgradePolicy":{"mode":"Manual"},"virtualMachineProfile":{"osProfile":{"computerNamePrefix":"vmss11i6r","adminUsername":"yugangw","linuxConfiguration":{"disablePasswordAuthentication":true,"ssh":{"publicKeys":[{"path":"/home/yugangw/.ssh/authorized_keys","keyData":"ssh-rsa - AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== - test@example.com\n"}]}},"secrets":[]},"storageProfile":{"osDisk":{"createOption":"FromImage","caching":"ReadOnly","managedDisk":{"storageAccountType":"Standard_LRS"}},"imageReference":{"publisher":"credativ","offer":"Debian","sku":"8","version":"latest"}},"networkProfile":{"networkInterfaceConfigurations":[{"name":"vmss11i6rNic","properties":{"primary":true,"ipConfigurations":[{"name":"vmss11i6rIPConfig","properties":{"subnet":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Network/virtualNetworks/vmss1VNET/subnets/vmss1Subnet"}}}]}}]}},"provisioningState":"Succeeded","overprovision":true,"uniqueId":"c7d80043-b836-4fd6-bd44-09396159b26d"}}},"outputResources":[{"id":"Microsoft.Compute/virtualMachineScaleSets/vmss1"},{"id":"Microsoft.Network/virtualNetworks/vmss1VNET"}]}}'} + body: {string: !!python/unicode "{\r\n \"startTime\": \"2017-04-05T17:38:32.9148711+00:00\"\ + ,\r\n \"status\": \"InProgress\",\r\n \"name\": \"b215c3c1-c984-4c12-84d7-8c01b94d6295\"\ + \r\n}"} + headers: + cache-control: [no-cache] + content-length: ['134'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:39:03 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null headers: - Cache-Control: [no-cache] + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 02:26:50 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - content-length: ['3172'] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 computemanagementclient/0.33.1rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] + accept-language: [en-US] + x-ms-client-request-id: [af81374f-1a26-11e7-b7f5-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/b215c3c1-c984-4c12-84d7-8c01b94d6295?api-version=2016-04-30-preview + response: + body: {string: !!python/unicode "{\r\n \"startTime\": \"2017-04-05T17:38:32.9148711+00:00\"\ + ,\r\n \"status\": \"InProgress\",\r\n \"name\": \"b215c3c1-c984-4c12-84d7-8c01b94d6295\"\ + \r\n}"} + headers: + cache-control: [no-cache] + content-length: ['134'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:39:33 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -359,50 +570,83 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - computemanagementclient/0.33.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 computemanagementclient/0.33.1rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [b99a8a90-e75c-11e6-80eb-64510658e3b3] + x-ms-client-request-id: [af81374f-1a26-11e7-b7f5-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/b215c3c1-c984-4c12-84d7-8c01b94d6295?api-version=2016-04-30-preview + response: + body: {string: !!python/unicode "{\r\n \"startTime\": \"2017-04-05T17:38:32.9148711+00:00\"\ + ,\r\n \"endTime\": \"2017-04-05T17:39:52.3494835+00:00\",\r\n \"status\"\ + : \"Succeeded\",\r\n \"name\": \"b215c3c1-c984-4c12-84d7-8c01b94d6295\"\r\ + \n}"} + headers: + cache-control: [no-cache] + content-length: ['184'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:40:03 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 computemanagementclient/0.33.1rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] + accept-language: [en-US] + x-ms-client-request-id: [af81374f-1a26-11e7-b7f5-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"sku\": {\r\n \"name\": \"Standard_D1_v2\",\r\n \ - \ \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\"\ + body: {string: !!python/unicode "{\r\n \"sku\": {\r\n \"name\": \"Standard_D1_v2\"\ + ,\r\n \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\"\ : {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n\ \ \"mode\": \"Manual\"\r\n },\r\n \"virtualMachineProfile\": {\r\ - \n \"osProfile\": {\r\n \"computerNamePrefix\": \"vmss11i6r\"\ - ,\r\n \"adminUsername\": \"yugangw\",\r\n \"linuxConfiguration\"\ + \n \"osProfile\": {\r\n \"computerNamePrefix\": \"vmss1247x\"\ + ,\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ : {\r\n \"disablePasswordAuthentication\": true,\r\n \"\ ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \ - \ \"path\": \"/home/yugangw/.ssh/authorized_keys\",\r\n \ - \ \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ==\ + \ \"path\": \"/home/ubuntu/.ssh/authorized_keys\",\r\n \ + \ \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ==\ \ test@example.com\\n\"\r\n }\r\n ]\r\n }\r\ \n },\r\n \"secrets\": []\r\n },\r\n \"storageProfile\"\ : {\r\n \"osDisk\": {\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"caching\": \"ReadOnly\",\r\n \"managedDisk\": {\r\ + ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\ \n \"storageAccountType\": \"Standard_LRS\"\r\n }\r\n\ \ },\r\n \"imageReference\": {\r\n \"publisher\": \"\ credativ\",\r\n \"offer\": \"Debian\",\r\n \"sku\": \"8\"\ ,\r\n \"version\": \"latest\"\r\n }\r\n },\r\n \"\ - networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"vmss11i6rNic\"\ - ,\"properties\":{\"primary\":true,\"ipConfigurations\":[{\"name\":\"vmss11i6rIPConfig\"\ + networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"vmss1247xNic\"\ + ,\"properties\":{\"primary\":true,\"ipConfigurations\":[{\"name\":\"vmss1247xIPConfig\"\ ,\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Network/virtualNetworks/vmss1VNET/subnets/vmss1Subnet\"\ }}}]}}]}\r\n },\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - overprovision\": true,\r\n \"uniqueId\": \"c7d80043-b836-4fd6-bd44-09396159b26d\"\ + overprovision\": true,\r\n \"uniqueId\": \"26fcde72-e107-4262-8d44-9a168484a948\"\ \r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n\ - \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1\"\ + \ \"location\": \"westus\",\r\n \"tags\": {\r\n \"test\": \"success\"\ + \r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1\"\ ,\r\n \"name\": \"vmss1\"\r\n}"} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 02:26:51 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2622'] + cache-control: [no-cache] + content-length: ['2648'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:40:03 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null @@ -411,23 +655,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b2+dev] + User-Agent: [python/2.7.11 (Windows-10-10.0.14393) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 networkmanagementclient/0.30.1 Azure-SDK-For-Python AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [b9ee28a6-e75c-11e6-a86c-64510658e3b3] + x-ms-client-request-id: [e74556cf-1a26-11e7-b110-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_none_options/providers/Microsoft.Network/publicIPAddresses/vmss1PublicIP?api-version=2016-09-01 response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.Network/publicIPAddresses/vmss1PublicIP'' - under resource group ''cli_test_vmss_create_none_options'' was not found."}}'} + body: {string: !!python/unicode '{"error":{"code":"ResourceNotFound","message":"The + Resource ''Microsoft.Network/publicIPAddresses/vmss1PublicIP'' under resource + group ''cli_test_vmss_create_none_options'' was not found."}}'} headers: - Cache-Control: [no-cache] - Content-Length: ['192'] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 31 Jan 2017 02:26:51 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] + cache-control: [no-cache] + content-length: ['192'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 05 Apr 2017 17:40:04 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] x-ms-failure-cause: [gateway] status: {code: 404, message: Not Found} version: 1 diff --git a/src/command_modules/azure-cli-vm/tests/test_vm_commands.py b/src/command_modules/azure-cli-vm/tests/test_vm_commands.py index e262101db..ac8dd0720 100644 --- a/src/command_modules/azure-cli-vm/tests/test_vm_commands.py +++ b/src/command_modules/azure-cli-vm/tests/test_vm_commands.py @@ -512,7 +512,7 @@ class VMNoWaitScenarioTest(ResourceGroupVCRTestBase): class VMAvailSetScenarioTest(ResourceGroupVCRTestBase): def __init__(self, test_method): - super(VMAvailSetScenarioTest, self).__init__(__file__, test_method, resource_group='cliTestRg_Availset') + super(VMAvailSetScenarioTest, self).__init__(__file__, test_method, resource_group='cli_test_avail_set') self.location = 'westus' self.name = 'availset-test' @@ -527,6 +527,8 @@ class VMAvailSetScenarioTest(ResourceGroupVCRTestBase): JMESPathCheck('platformUpdateDomainCount', 2), JMESPathCheck('sku.managed', True) ]) + self.cmd('vm availability-set update -g {} -n {} --set tags.test=success'.format(self.resource_group, self.name), + checks=JMESPathCheck('tags.test', 'success')) self.cmd('vm availability-set list -g {}'.format(self.resource_group), checks=[ JMESPathCheck('length(@)', 1), JMESPathCheck('[0].name', self.name), @@ -1488,12 +1490,13 @@ class VMSSCreateNoneOptionsTest(ResourceGroupVCRTestBase): # pylint: disable=to self.cmd('vmss create -n {0} -g {1} --image Debian --load-balancer {3} --admin-username ubuntu' ' --ssh-key-value \'{2}\' --public-ip-address {3} --tags {3}' .format(vmss_name, self.resource_group, TEST_SSH_KEY_PUB, '""' if platform.system() == 'Windows' else "''")) - self.cmd('vmss show -n {} -g {}'.format(vmss_name, self.resource_group), [ JMESPathCheck('availabilitySet', None), JMESPathCheck('tags', {}), JMESPathCheck('virtualMachineProfile.networkProfile.networkInterfaceConfigurations.ipConfigurations.loadBalancerBackendAddressPools', None) ]) + self.cmd('vmss update -g {} -n {} --set tags.test=success'.format(self.resource_group, vmss_name), + checks=JMESPathCheck('tags.test', 'success')) self.cmd('network public-ip show -n {}PublicIP -g {}'.format(vmss_name, self.resource_group), checks=NoneCheck(), allowed_exceptions='was not found')
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 1, "test_score": 0 }, "num_modified_files": 7 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==2.0.0 -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@6186044564dc3436b7551c58eda07db4412a49f8#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-core==1.24.2 azure-datalake-store==0.0.6 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==3.0.0 azure-mgmt-compute==0.33.1rc1 azure-mgmt-containerregistry==0.2.0 azure-mgmt-datalake-analytics==0.1.3 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.3 azure-mgmt-dns==1.0.0 azure-mgmt-documentdb==0.1.1 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-monitor==0.1.0 azure-mgmt-network==0.30.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-sql==0.4.0 azure-mgmt-storage==0.31.0 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.31.0 azure-monitor==0.2.0 azure-nspkg==3.0.2 azure-storage==0.34.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==2.0.0 - azure-common==1.1.4 - azure-core==1.24.2 - azure-datalake-store==0.0.6 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==3.0.0 - azure-mgmt-compute==0.33.1rc1 - azure-mgmt-containerregistry==0.2.0 - azure-mgmt-datalake-analytics==0.1.3 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.3 - azure-mgmt-dns==1.0.0 - azure-mgmt-documentdb==0.1.1 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-monitor==0.1.0 - azure-mgmt-network==0.30.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-sql==0.4.0 - azure-mgmt-storage==0.31.0 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.31.0 - azure-monitor==0.2.0 - azure-nspkg==3.0.2 - azure-storage==0.34.0 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMAvailSetScenarioTest::test_vm_availset", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSCreateNoneOptionsTest::test_vmss_create_none_options" ]
[ "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateLinuxSecretsScenarioTest::test_vm_create_linux_secrets", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateWindowsSecretsScenarioTest::test_vm_create_windows_secrets", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSCreateLinuxSecretsScenarioTest::test_vmss_create_linux_secrets" ]
[ "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMImageListByAliasesScenarioTest::test_vm_image_list_by_alias", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMUsageScenarioTest::test_vm_usage", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMImageListThruServiceScenarioTest::test_vm_images_list_thru_services", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMOpenPortTest::test_vm_open_port", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMShowListSizesListIPAddressesScenarioTest::test_vm_show_list_sizes_list_ip_addresses", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSizeListScenarioTest::test_vm_size_list", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMImageListOffersScenarioTest::test_vm_image_list_offers", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMImageListPublishersScenarioTest::test_vm_image_list_publishers", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMImageListSkusScenarioTest::test_vm_image_list_skus", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMImageShowScenarioTest::test_vm_image_show", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMGeneralizeScenarioTest::test_vm_generalize", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateFromUnmanagedDiskTest::test_vm_create_from_unmanaged_disk", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateWithSpecializedUnmanagedDiskTest::test_vm_create_with_specialized_unmanaged_disk", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMManagedDiskScenarioTest::test_managed_disk", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateAndStateModificationsScenarioTest::test_vm_create_state_modifications", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMNoWaitScenarioTest::test_vm_create_no_wait", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMExtensionScenarioTest::test_vm_extension", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMMachineExtensionImageScenarioTest::test_vm_machine_extension_image", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMExtensionImageSearchScenarioTest::test_vm_extension_image_search", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateUbuntuScenarioTest::test_vm_create_ubuntu", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMMultiNicScenarioTest::test_vm_create_multi_nics", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateNoneOptionsTest::test_vm_create_none_options", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMBootDiagnostics::test_vm_boot_diagnostics", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSExtensionInstallTest::test_vmss_extension", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::DiagnosticsExtensionInstallTest::test_diagnostics_extension_install", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateExistingOptions::test_vm_create_existing_options", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateExistingIdsOptions::test_vm_create_existing_ids_options", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateCustomIP::test_vm_create_custom_ip", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMDiskAttachDetachTest::test_vm_disk_attach_detach", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMUnmanagedDataDiskTest::test_vm_data_unmanaged_disk", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateCustomDataScenarioTest::test_vm_create_custom_data", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::AzureContainerServiceScenarioTest::test_acs_create_update", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSCreateAndModify::test_vmss_create_and_modify", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSCreateOptions::test_vmss_create_options", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSCreateExistingOptions::test_vmss_create_existing_options", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSCreateExistingIdsOptions::test_vmss_create_existing_ids_options", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSVMsScenarioTest::test_vmss_vms", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSCustomDataScenarioTest::test_vmss_create_custom_data", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSNicScenarioTest::test_vmss_nics" ]
[]
MIT License
null
Azure__azure-cli-2844
a8395ea70322dbf535d474d52ebf3d625a6cbdf0
2017-04-12 18:02:44
eb12ac454cbe1ddb59c86cdf2045e1912660e750
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2844?src=pr&el=h1) Report > Merging [#2844](https://codecov.io/gh/Azure/azure-cli/pull/2844?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/a8395ea70322dbf535d474d52ebf3d625a6cbdf0?src=pr&el=desc) will **increase** coverage by `0.04%`. > The diff coverage is `100%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/2844/graphs/tree.svg?token=2pog0TKvF8&src=pr&height=150&width=650)](https://codecov.io/gh/Azure/azure-cli/pull/2844?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #2844 +/- ## ========================================== + Coverage 62.88% 62.92% +0.04% ========================================== Files 464 464 Lines 25901 25899 -2 Branches 3944 3943 -1 ========================================== + Hits 16288 16298 +10 + Misses 8594 8567 -27 - Partials 1019 1034 +15 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/2844?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...etwork/azure/cli/command\_modules/network/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/2844?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbmV0d29yay9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL25ldHdvcmsvY3VzdG9tLnB5) | `63.46% <ø> (+1.08%)` | :arrow_up: | | [...twork/azure/cli/command\_modules/network/\_params.py](https://codecov.io/gh/Azure/azure-cli/pull/2844?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbmV0d29yay9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL25ldHdvcmsvX3BhcmFtcy5weQ==) | `92.51% <100%> (ø)` | :arrow_up: | | [...ure-cli-core/azure/cli/core/commands/parameters.py](https://codecov.io/gh/Azure/azure-cli/pull/2844?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL2NvbW1hbmRzL3BhcmFtZXRlcnMucHk=) | `70.96% <0%> (-2.16%)` | :arrow_down: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2844?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2844?src=pr&el=footer). Last update [a8395ea...9d6c9c2](https://codecov.io/gh/Azure/azure-cli/pull/2844?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/src/command_modules/azure-cli-network/HISTORY.rst b/src/command_modules/azure-cli-network/HISTORY.rst index 93cd59cca..3be0480e2 100644 --- a/src/command_modules/azure-cli-network/HISTORY.rst +++ b/src/command_modules/azure-cli-network/HISTORY.rst @@ -10,6 +10,7 @@ unreleased * BC: Fix bug in the output of `vpn-connection create` * Fix bug where '--key-length' argument of 'vpn-connection create' was not parsed correctly. * Fix bug in `dns zone import` where records were not imported correctly. +* Fix bug where `traffic-manager endpoint update` did not work. 2.0.2 (2017-04-03) ++++++++++++++++++ diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_params.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_params.py index 7cfbe5f1f..4621edb01 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_params.py +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_params.py @@ -21,7 +21,7 @@ from azure.cli.core.commands import \ (CliArgumentType, register_cli_argument, register_extra_cli_argument) from azure.cli.core.commands.parameters import (location_type, get_resource_name_completion_list, enum_choice_list, tags_type, ignore_type, - get_generic_completion_list, file_type) + file_type) from azure.cli.core.commands.validators import \ (MarkSpecifiedAction, get_default_location_from_resource_group) from azure.cli.core.commands.template_create import get_folded_parameter_help_string @@ -537,7 +537,7 @@ register_cli_argument('network traffic-manager profile check-dns', 'type', help= # Traffic manager endpoints endpoint_types = ['azureEndpoints', 'externalEndpoints', 'nestedEndpoints'] register_cli_argument('network traffic-manager endpoint', 'endpoint_name', name_arg_type, id_part='child_name', help='Endpoint name.', completer=get_tm_endpoint_completion_list()) -register_cli_argument('network traffic-manager endpoint', 'endpoint_type', options_list=('--type',), help='Endpoint type. Values include: {}.'.format(', '.join(endpoint_types)), completer=get_generic_completion_list(endpoint_types)) +register_cli_argument('network traffic-manager endpoint', 'endpoint_type', options_list=['--type', '-t'], help='Endpoint type.', id_part='child_name', **enum_choice_list(endpoint_types)) register_cli_argument('network traffic-manager endpoint', 'profile_name', help='Name of parent profile.', completer=get_resource_name_completion_list('Microsoft.Network/trafficManagerProfiles'), id_part='name') register_cli_argument('network traffic-manager endpoint', 'endpoint_location', help="Location of the external or nested endpoints when using the 'Performance' routing method.") register_cli_argument('network traffic-manager endpoint', 'endpoint_monitor_status', help='The monitoring status of the endpoint.') diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py index bb5e9ba90..282e7eaec 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/custom.py @@ -1673,8 +1673,6 @@ def update_traffic_manager_endpoint(instance, endpoint_type=None, endpoint_locat endpoint_status=None, endpoint_monitor_status=None, priority=None, target=None, target_resource_id=None, weight=None, min_child_endpoints=None): - if endpoint_type is not None: - instance.type = endpoint_type if endpoint_location is not None: instance.endpoint_location = endpoint_location if endpoint_status is not None:
traffic-manager command failed to update endpoint ### Environment summary **Install Method:** How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly) apt-get **CLI Version:** What version of the CLI and modules are installed? (Use `az --version`) azure-cli (2.0.0) network (2.0.0) **OS Version:** What OS and version are you using? Windows 10 **Shell Type:** What shell are you using? (e.g. bash, cmd.exe, Bash on Windows) Bash on Windows --- ### Description Cannot update endpoint settings. '--type' parameter seems to be used setting resource rul as below ``` $ az network traffic-manager endpoint update -g DEMO-FTAPP --profile-name ilkimftapptm --name endpoint1 --priority 3 --type "Microsoft.Network/trafficManagerProfiles/azureEndpoints" Operation failed with status: 'Bad Request'. Details: 400 Client Error: Bad Request for url: https://management.azure.com/subscriptions/<subs>/resourceGroups/DEMO-FTAPP/providers/Microsoft.Network/trafficmanagerprofiles/ilkimftapptm/Microsoft.Network%2FtrafficManagerProfiles%2FazureEndpoints/endpoint1?api-version=2015-11-01 ``` url should be: ``` https://management.azure.com/subscriptions/<subs>/resourceGroups/DEMO-FTAPP/providers/Microsoft.Network/trafficmanagerprofiles/ilkimftapptm/azureEndpoints/endpoint1?api-version=2015-11-01 ``` I tried below command and it didn't work too! ``` $ az network traffic-manager endpoint update -g DEMO-FTAPP --profile-name ilkimftapptm --name endpoint1 --priority 3 --type "azureEndpoints" The value 'azureEndpoints' provided for field 'type' is invalid. Expected value is 'Microsoft.Network/trafficManagerProfiles/azureendpoints'. ```
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-network/tests/recordings/test_network_traffic_manager.yaml b/src/command_modules/azure-cli-network/tests/recordings/test_network_traffic_manager.yaml index a751cb376..993f92d1e 100644 --- a/src/command_modules/azure-cli-network/tests/recordings/test_network_traffic_manager.yaml +++ b/src/command_modules/azure-cli-network/tests/recordings/test_network_traffic_manager.yaml @@ -1,17 +1,17 @@ interactions: - request: - body: '{"name": "myfoobar1", "type": "Microsoft.Network/trafficManagerProfiles"}' + body: '{"type": "Microsoft.Network/trafficManagerProfiles", "name": "myfoobar1"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['73'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 trafficmanagermanagementclient/0.30.0rc6 Azure-SDK-For-Python - AZURECLI/TEST/2.0.0+dev] + AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [dea79918-fd3d-11e6-9c5e-a0b3ccf7272a] + x-ms-client-request-id: [c35bd93a-1fa8-11e7-a57c-a0b3ccf7272a] method: POST uri: https://management.azure.com/providers/Microsoft.Network/checkTrafficManagerNameAvailability?api-version=2015-11-01 response: @@ -19,7 +19,7 @@ interactions: headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Mon, 27 Feb 2017 22:41:25 GMT'] + Date: ['Wed, 12 Apr 2017 17:52:14 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -31,35 +31,35 @@ interactions: x-ms-ratelimit-remaining-tenant-writes: ['1199'] status: {code: 200, message: OK} - request: - body: '{"location": "global", "properties": {"monitorConfig": {"protocol": "http", - "path": "/", "port": 80}, "dnsConfig": {"ttl": 30, "relativeName": "mytrafficmanager001100a"}, - "profileStatus": "enabled", "trafficRoutingMethod": "weighted"}}' + body: '{"properties": {"dnsConfig": {"ttl": 30, "relativeName": "mytrafficmanager001100a"}, + "trafficRoutingMethod": "Priority", "profileStatus": "Enabled", "monitorConfig": + {"protocol": "http", "port": 80, "path": "/"}}, "location": "global"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['235'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 trafficmanagermanagementclient/0.30.0rc6 Azure-SDK-For-Python - AZURECLI/TEST/2.0.0+dev] + AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [df4a990c-fd3d-11e6-a2cf-a0b3ccf7272a] + x-ms-client-request-id: [c3b8fbe4-1fa8-11e7-b827-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_traffic_manager/providers/Microsoft.Network/trafficmanagerprofiles/mytmprofile?api-version=2015-11-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_traffic_manager\/providers\/Microsoft.Network\/trafficManagerProfiles\/mytmprofile","name":"mytmprofile","type":"Microsoft.Network\/trafficManagerProfiles","location":"global","properties":{"profileStatus":"Enabled","trafficRoutingMethod":"Weighted","dnsConfig":{"relativeName":"mytrafficmanager001100a","fqdn":"mytrafficmanager001100a.trafficmanager.net","ttl":30},"monitorConfig":{"profileMonitorStatus":"Inactive","protocol":"HTTP","port":80,"path":"\/"},"endpoints":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_traffic_manager\/providers\/Microsoft.Network\/trafficManagerProfiles\/mytmprofile","name":"mytmprofile","type":"Microsoft.Network\/trafficManagerProfiles","location":"global","properties":{"profileStatus":"Enabled","trafficRoutingMethod":"Priority","dnsConfig":{"relativeName":"mytrafficmanager001100a","fqdn":"mytrafficmanager001100a.trafficmanager.net","ttl":30},"monitorConfig":{"profileMonitorStatus":"Inactive","protocol":"HTTP","port":80,"path":"\/"},"endpoints":[]}}'} headers: Cache-Control: [private] Content-Length: ['567'] Content-Type: [application/json; charset=utf-8] - Date: ['Mon, 27 Feb 2017 22:41:27 GMT'] + Date: ['Wed, 12 Apr 2017 17:52:17 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-resource-requests: ['10799'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['10798'] status: {code: 201, message: Created} - request: body: null @@ -68,19 +68,19 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 trafficmanagermanagementclient/0.30.0rc6 Azure-SDK-For-Python - AZURECLI/TEST/2.0.0+dev] + AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [e099279e-fd3d-11e6-b940-a0b3ccf7272a] + x-ms-client-request-id: [c4b1e446-1fa8-11e7-b47a-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_traffic_manager/providers/Microsoft.Network/trafficmanagerprofiles/mytmprofile?api-version=2015-11-01 response: - body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_traffic_manager\/providers\/Microsoft.Network\/trafficManagerProfiles\/mytmprofile","name":"mytmprofile","type":"Microsoft.Network\/trafficManagerProfiles","location":"global","properties":{"profileStatus":"Enabled","trafficRoutingMethod":"Weighted","dnsConfig":{"relativeName":"mytrafficmanager001100a","fqdn":"mytrafficmanager001100a.trafficmanager.net","ttl":30},"monitorConfig":{"profileMonitorStatus":"Inactive","protocol":"HTTP","port":80,"path":"\/"},"endpoints":[]}}'} + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_traffic_manager\/providers\/Microsoft.Network\/trafficManagerProfiles\/mytmprofile","name":"mytmprofile","type":"Microsoft.Network\/trafficManagerProfiles","location":"global","properties":{"profileStatus":"Enabled","trafficRoutingMethod":"Priority","dnsConfig":{"relativeName":"mytrafficmanager001100a","fqdn":"mytrafficmanager001100a.trafficmanager.net","ttl":30},"monitorConfig":{"profileMonitorStatus":"Inactive","protocol":"HTTP","port":80,"path":"\/"},"endpoints":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Mon, 27 Feb 2017 22:41:28 GMT'] + Date: ['Wed, 12 Apr 2017 17:52:17 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -98,19 +98,53 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 trafficmanagermanagementclient/0.30.0rc6 Azure-SDK-For-Python - AZURECLI/TEST/2.0.0+dev] + AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [e1235ef0-fd3d-11e6-ae3c-a0b3ccf7272a] + x-ms-client-request-id: [c516762e-1fa8-11e7-bcf9-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_traffic_manager/providers/Microsoft.Network/trafficmanagerprofiles/mytmprofile?api-version=2015-11-01 + response: + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_traffic_manager\/providers\/Microsoft.Network\/trafficManagerProfiles\/mytmprofile","name":"mytmprofile","type":"Microsoft.Network\/trafficManagerProfiles","location":"global","properties":{"profileStatus":"Enabled","trafficRoutingMethod":"Priority","dnsConfig":{"relativeName":"mytrafficmanager001100a","fqdn":"mytrafficmanager001100a.trafficmanager.net","ttl":30},"monitorConfig":{"profileMonitorStatus":"Inactive","protocol":"HTTP","port":80,"path":"\/"},"endpoints":[]}}'} + headers: + Cache-Control: [private] + Content-Type: [application/json; charset=utf-8] + Date: ['Wed, 12 Apr 2017 17:52:17 GMT'] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET] + content-length: ['567'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['10799'] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"dnsConfig": {"ttl": 30, "fqdn": "mytrafficmanager001100a.trafficmanager.net", + "relativeName": "mytrafficmanager001100a"}, "trafficRoutingMethod": "Weighted", + "profileStatus": "Enabled", "endpoints": [], "monitorConfig": {"profileMonitorStatus": + "Inactive", "protocol": "HTTP", "port": 80, "path": "/"}}, "location": "global"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['342'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 trafficmanagermanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] + accept-language: [en-US] + x-ms-client-request-id: [c577fe92-1fa8-11e7-8040-a0b3ccf7272a] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_traffic_manager/providers/Microsoft.Network/trafficmanagerprofiles/mytmprofile?api-version=2015-11-01 response: body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_traffic_manager\/providers\/Microsoft.Network\/trafficManagerProfiles\/mytmprofile","name":"mytmprofile","type":"Microsoft.Network\/trafficManagerProfiles","location":"global","properties":{"profileStatus":"Enabled","trafficRoutingMethod":"Weighted","dnsConfig":{"relativeName":"mytrafficmanager001100a","fqdn":"mytrafficmanager001100a.trafficmanager.net","ttl":30},"monitorConfig":{"profileMonitorStatus":"Inactive","protocol":"HTTP","port":80,"path":"\/"},"endpoints":[]}}'} headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Mon, 27 Feb 2017 22:41:28 GMT'] + Date: ['Wed, 12 Apr 2017 17:52:18 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -121,6 +155,66 @@ interactions: content-length: ['567'] x-ms-ratelimit-remaining-subscription-resource-requests: ['10799'] status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 trafficmanagermanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] + accept-language: [en-US] + x-ms-client-request-id: [c63f854a-1fa8-11e7-bd49-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_traffic_manager/providers/Microsoft.Network/trafficmanagerprofiles?api-version=2015-11-01 + response: + body: {string: '{"value":[{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_traffic_manager\/providers\/Microsoft.Network\/trafficManagerProfiles\/mytmprofile","name":"mytmprofile","type":"Microsoft.Network\/trafficManagerProfiles","location":"global","properties":{"profileStatus":"Enabled","trafficRoutingMethod":"Weighted","dnsConfig":{"relativeName":"mytrafficmanager001100a","fqdn":"mytrafficmanager001100a.trafficmanager.net","ttl":30},"monitorConfig":{"profileMonitorStatus":null,"protocol":"HTTP","port":80,"path":"\/"},"endpoints":[]}}]}'} + headers: + Cache-Control: [private] + Content-Type: [application/json; charset=utf-8] + Date: ['Wed, 12 Apr 2017 17:52:20 GMT'] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET] + content-length: ['573'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['10799'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 trafficmanagermanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] + accept-language: [en-US] + x-ms-client-request-id: [c6acd7a2-1fa8-11e7-a232-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_traffic_manager/providers/Microsoft.Network/trafficmanagerprofiles/mytmprofile?api-version=2015-11-01 + response: + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_traffic_manager\/providers\/Microsoft.Network\/trafficManagerProfiles\/mytmprofile","name":"mytmprofile","type":"Microsoft.Network\/trafficManagerProfiles","location":"global","properties":{"profileStatus":"Enabled","trafficRoutingMethod":"Weighted","dnsConfig":{"relativeName":"mytrafficmanager001100a","fqdn":"mytrafficmanager001100a.trafficmanager.net","ttl":30},"monitorConfig":{"profileMonitorStatus":"Inactive","protocol":"HTTP","port":80,"path":"\/"},"endpoints":[]}}'} + headers: + Cache-Control: [private] + Content-Type: [application/json; charset=utf-8] + Date: ['Wed, 12 Apr 2017 17:52:21 GMT'] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET] + content-length: ['567'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['10798'] + status: {code: 200, message: OK} - request: body: '{"properties": {"weight": 50, "target": "www.microsoft.com"}}' headers: @@ -129,11 +223,11 @@ interactions: Connection: [keep-alive] Content-Length: ['61'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 trafficmanagermanagementclient/0.30.0rc6 Azure-SDK-For-Python - AZURECLI/TEST/2.0.0+dev] + AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [e16d6200-fd3d-11e6-ae5b-a0b3ccf7272a] + x-ms-client-request-id: [c7251738-1fa8-11e7-ac77-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_traffic_manager/providers/Microsoft.Network/trafficmanagerprofiles/mytmprofile/externalEndpoints/myendpoint?api-version=2015-11-01 response: @@ -142,13 +236,13 @@ interactions: Cache-Control: [private] Content-Length: ['461'] Content-Type: [application/json; charset=utf-8] - Date: ['Mon, 27 Feb 2017 22:41:30 GMT'] + Date: ['Wed, 12 Apr 2017 17:52:21 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] X-AspNet-Version: [4.0.30319] X-Content-Type-Options: [nosniff] X-Powered-By: [ASP.NET] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 201, message: Created} - request: body: null @@ -157,11 +251,11 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.5 + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 trafficmanagermanagementclient/0.30.0rc6 Azure-SDK-For-Python - AZURECLI/TEST/2.0.0+dev] + AZURECLI/TEST/2.0.2+dev] accept-language: [en-US] - x-ms-client-request-id: [e2782a3e-fd3d-11e6-a760-a0b3ccf7272a] + x-ms-client-request-id: [c7bce5c6-1fa8-11e7-84a1-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_traffic_manager/providers/Microsoft.Network/trafficmanagerprofiles/mytmprofile/externalEndpoints/myendpoint?api-version=2015-11-01 response: @@ -169,7 +263,7 @@ interactions: headers: Cache-Control: [private] Content-Type: [application/json; charset=utf-8] - Date: ['Mon, 27 Feb 2017 22:41:31 GMT'] + Date: ['Wed, 12 Apr 2017 17:52:22 GMT'] Server: [Microsoft-IIS/8.5] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] @@ -179,4 +273,181 @@ interactions: X-Powered-By: [ASP.NET] content-length: ['461'] status: {code: 200, message: OK} +- request: + body: '{"type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints", + "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_traffic_manager/providers/Microsoft.Network/trafficManagerProfiles/mytmprofile/externalEndpoints/myendpoint", + "name": "myendpoint", "properties": {"weight": 25, "endpointMonitorStatus": + "CheckingEndpoint", "priority": 1, "endpointStatus": "Enabled", "target": "www.contoso.com"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['439'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 trafficmanagermanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] + accept-language: [en-US] + x-ms-client-request-id: [c81c2818-1fa8-11e7-9c66-a0b3ccf7272a] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_traffic_manager/providers/Microsoft.Network/trafficmanagerprofiles/mytmprofile/externalEndpoints/myendpoint?api-version=2015-11-01 + response: + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_traffic_manager\/providers\/Microsoft.Network\/trafficManagerProfiles\/mytmprofile\/externalEndpoints\/myendpoint","name":"myendpoint","type":"Microsoft.Network\/trafficManagerProfiles\/externalEndpoints","properties":{"endpointStatus":"Enabled","endpointMonitorStatus":"CheckingEndpoint","target":"www.contoso.com","weight":25,"priority":1,"endpointLocation":null}}'} + headers: + Cache-Control: [private] + Content-Length: ['459'] + Content-Type: [application/json; charset=utf-8] + Date: ['Wed, 12 Apr 2017 17:52:24 GMT'] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 trafficmanagermanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] + accept-language: [en-US] + x-ms-client-request-id: [c9292fdc-1fa8-11e7-9ad6-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_traffic_manager/providers/Microsoft.Network/trafficmanagerprofiles/mytmprofile/externalEndpoints/myendpoint?api-version=2015-11-01 + response: + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_traffic_manager\/providers\/Microsoft.Network\/trafficManagerProfiles\/mytmprofile\/externalEndpoints\/myendpoint","name":"myendpoint","type":"Microsoft.Network\/trafficManagerProfiles\/externalEndpoints","properties":{"endpointStatus":"Enabled","endpointMonitorStatus":"CheckingEndpoint","target":"www.contoso.com","weight":25,"priority":1,"endpointLocation":null}}'} + headers: + Cache-Control: [private] + Content-Type: [application/json; charset=utf-8] + Date: ['Wed, 12 Apr 2017 17:52:24 GMT'] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET] + content-length: ['459'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 trafficmanagermanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] + accept-language: [en-US] + x-ms-client-request-id: [c960dc38-1fa8-11e7-b153-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_traffic_manager/providers/Microsoft.Network/trafficmanagerprofiles/mytmprofile?api-version=2015-11-01 + response: + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_traffic_manager\/providers\/Microsoft.Network\/trafficManagerProfiles\/mytmprofile","name":"mytmprofile","type":"Microsoft.Network\/trafficManagerProfiles","location":"global","properties":{"profileStatus":"Enabled","trafficRoutingMethod":"Weighted","dnsConfig":{"relativeName":"mytrafficmanager001100a","fqdn":"mytrafficmanager001100a.trafficmanager.net","ttl":30},"monitorConfig":{"profileMonitorStatus":"CheckingEndpoints","protocol":"HTTP","port":80,"path":"\/"},"endpoints":[{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_traffic_manager\/providers\/Microsoft.Network\/trafficManagerProfiles\/mytmprofile\/externalEndpoints\/myendpoint","name":"myendpoint","type":"Microsoft.Network\/trafficManagerProfiles\/externalEndpoints","properties":{"endpointStatus":"Enabled","endpointMonitorStatus":"CheckingEndpoint","target":"www.contoso.com","weight":25,"priority":1,"endpointLocation":null}}]}}'} + headers: + Cache-Control: [private] + Content-Type: [application/json; charset=utf-8] + Date: ['Wed, 12 Apr 2017 17:52:24 GMT'] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET] + content-length: ['1035'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['10797'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 trafficmanagermanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] + accept-language: [en-US] + x-ms-client-request-id: [c9d5ce4c-1fa8-11e7-a218-a0b3ccf7272a] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_traffic_manager/providers/Microsoft.Network/trafficmanagerprofiles/mytmprofile/externalEndpoints/myendpoint?api-version=2015-11-01 + response: + body: {string: ''} + headers: + Cache-Control: [private] + Content-Length: ['0'] + Date: ['Wed, 12 Apr 2017 17:52:26 GMT'] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 trafficmanagermanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] + accept-language: [en-US] + x-ms-client-request-id: [caae0382-1fa8-11e7-a75e-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_traffic_manager/providers/Microsoft.Network/trafficmanagerprofiles/mytmprofile?api-version=2015-11-01 + response: + body: {string: '{"id":"\/subscriptions\/0b1f6471-1bf0-4dda-aec3-cb9272f09590\/resourceGroups\/cli_test_traffic_manager\/providers\/Microsoft.Network\/trafficManagerProfiles\/mytmprofile","name":"mytmprofile","type":"Microsoft.Network\/trafficManagerProfiles","location":"global","properties":{"profileStatus":"Enabled","trafficRoutingMethod":"Weighted","dnsConfig":{"relativeName":"mytrafficmanager001100a","fqdn":"mytrafficmanager001100a.trafficmanager.net","ttl":30},"monitorConfig":{"profileMonitorStatus":"Inactive","protocol":"HTTP","port":80,"path":"\/"},"endpoints":[]}}'} + headers: + Cache-Control: [private] + Content-Type: [application/json; charset=utf-8] + Date: ['Wed, 12 Apr 2017 17:52:27 GMT'] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET] + content-length: ['567'] + x-ms-ratelimit-remaining-subscription-resource-requests: ['10798'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 trafficmanagermanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/TEST/2.0.2+dev] + accept-language: [en-US] + x-ms-client-request-id: [caf1f406-1fa8-11e7-9880-a0b3ccf7272a] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_traffic_manager/providers/Microsoft.Network/trafficmanagerprofiles/mytmprofile?api-version=2015-11-01 + response: + body: {string: ''} + headers: + Cache-Control: [private] + Content-Length: ['0'] + Date: ['Wed, 12 Apr 2017 17:52:28 GMT'] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET] + x-ms-ratelimit-remaining-subscription-resource-requests: ['10799'] + status: {code: 200, message: OK} version: 1 diff --git a/src/command_modules/azure-cli-network/tests/test_network_commands.py b/src/command_modules/azure-cli-network/tests/test_network_commands.py index 09b8c1029..b2df51b2f 100644 --- a/src/command_modules/azure-cli-network/tests/test_network_commands.py +++ b/src/command_modules/azure-cli-network/tests/test_network_commands.py @@ -1301,15 +1301,30 @@ class NetworkTrafficManagerScenarioTest(ResourceGroupVCRTestBase): unique_dns_name = 'mytrafficmanager001100a' self.cmd('network traffic-manager profile check-dns -n myfoobar1') - self.cmd('network traffic-manager profile create -n {} -g {} --routing-method weighted --unique-dns-name {}'.format(tm_name, self.resource_group, unique_dns_name), - checks=JMESPathCheck('TrafficManagerProfile.trafficRoutingMethod', 'Weighted')) + self.cmd('network traffic-manager profile create -n {} -g {} --routing-method priority --unique-dns-name {}'.format(tm_name, self.resource_group, unique_dns_name), + checks=JMESPathCheck('TrafficManagerProfile.trafficRoutingMethod', 'Priority')) self.cmd('network traffic-manager profile show -g {} -n {}'.format(self.resource_group, tm_name), checks=JMESPathCheck('dnsConfig.relativeName', unique_dns_name)) + self.cmd('network traffic-manager profile update -n {} -g {} --routing-method weighted'.format(tm_name, self.resource_group), + checks=JMESPathCheck('trafficRoutingMethod', 'Weighted')) + self.cmd('network traffic-manager profile list -g {}'.format(self.resource_group)) + # Endpoint tests self.cmd('network traffic-manager endpoint create -n {} --profile-name {} -g {} --type externalEndpoints --weight 50 --target www.microsoft.com'.format(endpoint_name, tm_name, self.resource_group), checks=JMESPathCheck('type', 'Microsoft.Network/trafficManagerProfiles/externalEndpoints')) - self.cmd('network traffic-manager endpoint show --profile-name {} --type externalEndpoints -n {} -g {}'.format(tm_name, endpoint_name, self.resource_group), - checks=JMESPathCheck('target', 'www.microsoft.com')) + self.cmd('network traffic-manager endpoint update -n {} --profile-name {} -g {} --type externalEndpoints --weight 25 --target www.contoso.com'.format(endpoint_name, tm_name, self.resource_group), checks=[ + JMESPathCheck('weight', 25), + JMESPathCheck('target', 'www.contoso.com') + ]) + self.cmd('network traffic-manager endpoint show -g {} --profile-name {} -t externalEndpoints -n {}'.format(self.resource_group, tm_name, endpoint_name)) + self.cmd('network traffic-manager endpoint list -g {} --profile-name {} -t externalEndpoints'.format(self.resource_group, tm_name), + checks=JMESPathCheck('length(@)', 1)) + self.cmd('network traffic-manager endpoint delete -g {} --profile-name {} -t externalEndpoints -n {}'.format(self.resource_group, tm_name, endpoint_name)) + self.cmd('network traffic-manager endpoint list -g {} --profile-name {} -t externalEndpoints'.format(self.resource_group, tm_name), + checks=JMESPathCheck('length(@)', 0)) + + self.cmd('network traffic-manager profile delete -g {} -n {}'.format(self.resource_group, tm_name)) + class NetworkDnsScenarioTest(ResourceGroupVCRTestBase):
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 0, "test_score": 0 }, "num_modified_files": 3 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==2.0.0 -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@a8395ea70322dbf535d474d52ebf3d625a6cbdf0#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-core==1.24.2 azure-datalake-store==0.0.6 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==3.0.0 azure-mgmt-compute==0.33.1rc1 azure-mgmt-containerregistry==0.2.0 azure-mgmt-datalake-analytics==0.1.3 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.3 azure-mgmt-dns==1.0.0 azure-mgmt-documentdb==0.1.1 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-monitor==0.1.0 azure-mgmt-network==0.30.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-sql==0.4.0 azure-mgmt-storage==0.31.0 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.31.0 azure-monitor==0.2.0 azure-nspkg==3.0.2 azure-storage==0.34.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==2.0.0 - azure-common==1.1.4 - azure-core==1.24.2 - azure-datalake-store==0.0.6 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==3.0.0 - azure-mgmt-compute==0.33.1rc1 - azure-mgmt-containerregistry==0.2.0 - azure-mgmt-datalake-analytics==0.1.3 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.3 - azure-mgmt-dns==1.0.0 - azure-mgmt-documentdb==0.1.1 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-monitor==0.1.0 - azure-mgmt-network==0.30.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-sql==0.4.0 - azure-mgmt-storage==0.31.0 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.31.0 - azure-monitor==0.2.0 - azure-nspkg==3.0.2 - azure-storage==0.34.0 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkTrafficManagerScenarioTest::test_network_traffic_manager" ]
[]
[ "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkMultiIdsShowScenarioTest::test_multi_id_show", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkUsageListScenarioTest::test_network_usage_list", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayDefaultScenarioTest::test_network_app_gateway_with_defaults", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayExistingSubnetScenarioTest::test_network_app_gateway_with_existing_subnet", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayNoWaitScenarioTest::test_network_app_gateway_no_wait", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayPrivateIpScenarioTest::test_network_app_gateway_with_private_ip", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayPublicIpScenarioTest::test_network_app_gateway_with_public_ip", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayWafScenarioTest::test_network_app_gateway_waf", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkPublicIpScenarioTest::test_network_public_ip", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkExpressRouteScenarioTest::test_network_express_route", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkLoadBalancerScenarioTest::test_network_load_balancer", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkLoadBalancerIpConfigScenarioTest::test_network_load_balancer_ip_config", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkLoadBalancerSubresourceScenarioTest::test_network_load_balancer_subresources", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkLocalGatewayScenarioTest::test_network_local_gateway", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkNicScenarioTest::test_network_nic", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkNicSubresourceScenarioTest::test_network_nic_subresources", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkNicConvenienceCommandsScenarioTest::test_network_nic_convenience_commands", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkSecurityGroupScenarioTest::test_network_nsg", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkRouteTableOperationScenarioTest::test_network_route_table_operation", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkVNetScenarioTest::test_network_vnet", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkVNetPeeringScenarioTest::test_network_vnet_peering", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkSubnetSetScenarioTest::test_network_subnet_set", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkActiveActiveCrossPremiseScenarioTest::test_network_active_active_cross_premise_connection", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkActiveActiveVnetVnetScenarioTest::test_network_active_active_vnet_vnet_connection", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkVpnGatewayScenarioTest::test_network_vpn_gateway", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkDnsScenarioTest::test_network_dns", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkZoneImportExportTest::test_network_dns_zone_import_export" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_azure-cli-2844
Azure__azure-cli-2848
f6b3c18535cf9d1753213311cfe686a7d8f1295d
2017-04-12 22:16:35
eb12ac454cbe1ddb59c86cdf2045e1912660e750
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2848?src=pr&el=h1) Report > Merging [#2848](https://codecov.io/gh/Azure/azure-cli/pull/2848?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/f6b3c18535cf9d1753213311cfe686a7d8f1295d?src=pr&el=desc) will **increase** coverage by `0.01%`. > The diff coverage is `100%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/2848/graphs/tree.svg?height=150&width=650&token=2pog0TKvF8&src=pr)](https://codecov.io/gh/Azure/azure-cli/pull/2848?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #2848 +/- ## ========================================== + Coverage 62.92% 62.94% +0.01% ========================================== Files 464 464 Lines 25899 25899 Branches 3943 3943 ========================================== + Hits 16298 16302 +4 + Misses 8567 8563 -4 Partials 1034 1034 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/2848?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [src/azure-cli-core/azure/cli/core/\_profile.py](https://codecov.io/gh/Azure/azure-cli/pull/2848?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL19wcm9maWxlLnB5) | `85.25% <100%> (+1.07%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2848?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2848?src=pr&el=footer). Last update [f6b3c18...d27d58a](https://codecov.io/gh/Azure/azure-cli/pull/2848?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/.gitignore b/.gitignore index fc479e986..7346003bc 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,6 @@ test_results/ # Code coverage .coverage + +# CI output +artifacts/ \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..a6f8e4dd9 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,29 @@ +pipeline { + agent none + triggers { pollSCM('H/3 * * * *') } + stages { + stage ('Build') { + agent any + steps { + sh 'pip install -U virtualenv' + sh 'python -m virtualenv --clear env' + sh './scripts/jenkins_build.sh' + sh './scripts/jenkins_archive.sh' + } + post { + always { deleteDir() } + } + } + stage ('Performance-Test') { + agent { label 'perf-ubuntu-a0' } + steps { + sh 'pip install -U virtualenv' + sh 'python -m virtualenv --clear env' + sh './scripts/jenkins_perf.sh' + } + post { + always { deleteDir() } + } + } + } +} diff --git a/scripts/jenkins_archive.sh b/scripts/jenkins_archive.sh new file mode 100755 index 000000000..4422c60bd --- /dev/null +++ b/scripts/jenkins_archive.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# Archive build + +set -x + +if [ -z $BUILD_NUMBER ]; then + echo "Environment variable BUILD_NUMBER is missing." + exit 1 +fi + +export +echo "build branch $BRANCH_NAME" + +version=$(printf '%.8d' $BUILD_NUMBER) +echo "Version number: $version" + +if [ -d /var/build_share ]; then + echo 'Directory /var/build_share is found. The artifacts will be archived there.' + mkdir -p /var/build_share/$BRANCH_NAME/$version + cp -R ./artifacts/ /var/build_share/$BRANCH_NAME/$version +else + echo 'Directory /var/build_share is not found. Exit without taking any actions.' +fi diff --git a/scripts/jenkins_build.sh b/scripts/jenkins_build.sh new file mode 100755 index 000000000..b12e2e093 --- /dev/null +++ b/scripts/jenkins_build.sh @@ -0,0 +1,26 @@ +# Build packages in Jenkins server. +# The script expects a virtualenv created under ./env folder as prerequisite + +set -x # do not echo command to prevent accidentally expose secrets + +. ./env/bin/activate + +echo 'Build Azure CLI and its command modules ' + +if [ -d ./artifacts ]; then + rm -rf ./artifacts +fi + +mkdir -p ./artifacts/build +artifacts=$(cd ./artifacts/build && pwd) + +working_dir=$(pwd) +for setup_file in $(find src -name 'setup.py'); do + cd $(dirname $setup_file) + echo "" + echo "Components at $(pwd) is being built ..." + python setup.py sdist -d $artifacts bdist_wheel -d $artifacts + cd $working_dir +done + +echo 'Build completed.' \ No newline at end of file diff --git a/scripts/jenkins_perf.sh b/scripts/jenkins_perf.sh new file mode 100755 index 000000000..355b34eec --- /dev/null +++ b/scripts/jenkins_perf.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +# Run performance in jenkins build + +. ./env/bin/activate + +echo "Run performance test on $(hostname)" + +if [ -z %BUILD_NUMBER ]; then + echo "Environment variable BUILD_NUMBER is missing." + exit 1 +fi + +version=$(printf '%.8d' $BUILD_NUMBER) +echo "Version number: $version" + +echo 'Before install' +which az +pip list + +build_folder=/var/build_share/$BRANCH_NAME/$version +echo "Install build from $build_folder" + +python -m pip install azure-cli --find-links file://$build_folder/artifacts/build -v +python -m pip freeze + +python ./scripts/performance/measure.py diff --git a/scripts/performance/measure.py b/scripts/performance/measure.py new file mode 100644 index 000000000..8cf6ad2b5 --- /dev/null +++ b/scripts/performance/measure.py @@ -0,0 +1,48 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import sys +from subprocess import check_output, STDOUT + +def mean(data): + """Return the sample arithmetic mean of data.""" + n = len(data) + if n < 1: + raise ValueError('len < 1') + return sum(data)/float(n) + + +def sq_deviation(data): + """Return sum of square deviations of sequence data.""" + c = mean(data) + return sum((x-c)**2 for x in data) + + +def pstdev(data): + """Calculates the population standard deviation.""" + n = len(data) + if n < 2: + raise ValueError('len < 2') + ss = sq_deviation(data) + return (ss/n) ** 0.5 + + +real = [] +user = [] +syst = [] +loop = 100 + +for i in range(loop): + lines = check_output(['time -p az'], shell=True, stderr=STDOUT).split('\n') + real_time = float(lines[-4].split()[1]) + real.append(float(lines[-4].split()[1])) + user.append(float(lines[-3].split()[1])) + syst.append(float(lines[-2].split()[1])) + sys.stdout.write('Loop {} => {} \n'.format(i, real_time)) + sys.stdout.flush() + +print('Real: mean => {} \t pstdev => {}'.format(mean(real), pstdev(real))) +print('User: mean => {} \t pstdev => {}'.format(mean(user), pstdev(user))) +print('Syst: mean => {} \t pstdev => {}'.format(mean(syst), pstdev(syst))) diff --git a/src/azure-cli-core/HISTORY.rst b/src/azure-cli-core/HISTORY.rst index 031f1ad08..edd7d5713 100644 --- a/src/azure-cli-core/HISTORY.rst +++ b/src/azure-cli-core/HISTORY.rst @@ -4,6 +4,7 @@ Release History =============== 2.0.3 (unreleased) ^^^^^^^^^^^^^^^^^^ +*core: fix a failure when login using a service principal twice (#2800) *core: Allow file path of accessTokens.json to be configurable through an env var(#2605) *core: Allow configured defaults to apply on optional args(#2703) *core: Improved performance diff --git a/src/azure-cli-core/azure/cli/core/_profile.py b/src/azure-cli-core/azure/cli/core/_profile.py index 2773418ad..aafb00f25 100644 --- a/src/azure-cli-core/azure/cli/core/_profile.py +++ b/src/azure-cli-core/azure/cli/core/_profile.py @@ -499,7 +499,7 @@ class CredsCache(object): # pylint: disable=line-too-long if (sp_entry.get(_ACCESS_TOKEN, None) != getattr(matched[0], _ACCESS_TOKEN, None) or sp_entry.get(_SERVICE_PRINCIPAL_CERT_FILE, None) != getattr(matched[0], _SERVICE_PRINCIPAL_CERT_FILE, None)): - self._service_principal_creds.pop(matched[0]) + self._service_principal_creds.remove(matched[0]) self._service_principal_creds.append(matched[0]) state_changed = True else:
Weird error on login - 'dict' object cannot be interpreted as an integer ### Environment summary **Install Method:** How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly) ``` rm -rf $HOME/.local/lib/python3.6 mkdir $HOME/.local/lib/python3.6/site-packages pip install --no-cache-dir --user --upgrade --pre azure-cli --extra-index-url https://azureclinightly.blob.core.windows.net/packages pip install --user --upgrade --pre azure-cli-acr azure-cli-keyvault --extra-index-url https://azureclinightly.blob.core.windows.net/packages ``` **CLI Version:** What version of the CLI and modules are installed? (Use `az --version`) ``` azure-cli (2.0.2+1.dev20170406) acr (2.0.0+1.dev20170406) acs (2.0.2+1.dev20170406) appservice (0.1.2+1.dev20170406) batch (2.0.0+1.dev20170406) cloud (2.0.0+1.dev20170406) component (2.0.0+1.dev20170406) configure (2.0.2+1.dev20170406) container (0.1.2+1.dev20170406) core (2.0.2+1.dev20170406) documentdb (0.1.2+1.dev20170406) feedback (2.0.0+1.dev20170406) find (0.1.2rc1+1.dev20170312) iot (0.1.2+1.dev20170406) keyvault (2.0.0+1.dev20170406) lab (0.0.1+1.dev20170406) monitor (0.0.1+1.dev20170406) network (2.0.2+1.dev20170406) nspkg (2.0.0+1.dev20170406) profile (2.0.2+1.dev20170406) redis (0.1.1b3+1.dev20170406) resource (2.0.2+1.dev20170406) role (2.0.1+1.dev20170406) sql (2.0.0+1.dev20170406) storage (2.0.2+1.dev20170406) vm (2.0.2+1.dev20170406) Python (Linux) 3.6.1 (default, Mar 27 2017, 00:27:06) [GCC 6.3.1 20170306] ``` **OS Version:** What OS and version are you using? Arch Linux, up to date **Shell Type:** What shell are you using? (e.g. bash, cmd.exe, Bash on Windows) `zsh` --- ### Description ``` $ az login --service-principal --username xxx --password xxx --tenant xxx 'dict' object cannot be interpreted as an integer Traceback (most recent call last): File "/home/cole/.local/lib/python3.6/site-packages/azure/cli/main.py", line 37, in main cmd_result = APPLICATION.execute(args) File "/home/cole/.local/lib/python3.6/site-packages/azure/cli/core/application.py", line 157, in execute result = expanded_arg.func(params) File "/home/cole/.local/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 367, in _execute_command raise ex File "/home/cole/.local/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 362, in _execute_command result = op(client, **kwargs) if client else op(**kwargs) File "/home/cole/.local/lib/python3.6/site-packages/azure/cli/command_modules/profile/custom.py", line 79, in login tenant) File "/home/cole/.local/lib/python3.6/site-packages/azure/cli/core/_profile.py", line 135, in find_subscriptions_on_login tenant)) File "/home/cole/.local/lib/python3.6/site-packages/azure/cli/core/_profile.py", line 500, in save_service_principal_cred self._service_principal_creds.pop(matched[0]) TypeError: 'dict' object cannot be interpreted as an integer ``` If I `rm -rf ~/.azure` first, it goes away. Maybe a bug in merging stuff together? ~~Also, weird though, since my script sets `AZURE_CONFIG_DIR` to a temp dir, so it should be like new every time...~~ I wasn't properly exporting it, when I do, I avoid this issue since each script run gets its own config directory.
Azure/azure-cli
diff --git a/src/azure-cli-core/tests/test_profile.py b/src/azure-cli-core/tests/test_profile.py index bbb63cd5f..a78211b84 100644 --- a/src/azure-cli-core/tests/test_profile.py +++ b/src/azure-cli-core/tests/test_profile.py @@ -581,6 +581,25 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method self.assertEqual(creds_cache._service_principal_creds, [test_sp, test_sp2]) mock_open_for_write.assert_called_with(mock.ANY, 'w+') + @mock.patch('azure.cli.core._profile._load_tokens_from_file', autospec=True) + @mock.patch('os.fdopen', autospec=True) + @mock.patch('os.open', autospec=True) + def test_credscache_add_preexisting_sp_creds(self, _, mock_open_for_write, mock_read_file): + test_sp = { + "servicePrincipalId": "myapp", + "servicePrincipalTenant": "mytenant", + "accessToken": "Secret" + } + mock_open_for_write.return_value = FileHandleStub() + mock_read_file.return_value = [test_sp] + creds_cache = CredsCache() + + # action + creds_cache.save_service_principal_cred(test_sp) + + # assert + self.assertEqual(creds_cache._service_principal_creds, [test_sp]) + @mock.patch('azure.cli.core._profile._load_tokens_from_file', autospec=True) @mock.patch('os.fdopen', autospec=True) @mock.patch('os.open', autospec=True)
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_added_files", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 0, "test_score": 0 }, "num_modified_files": 3 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==2.0.0 -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@f6b3c18535cf9d1753213311cfe686a7d8f1295d#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.4 azure-core==1.24.2 azure-datalake-store==0.0.6 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==3.0.0 azure-mgmt-compute==0.33.1rc1 azure-mgmt-containerregistry==0.2.0 azure-mgmt-datalake-analytics==0.1.3 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.3 azure-mgmt-dns==1.0.0 azure-mgmt-documentdb==0.1.1 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-monitor==0.1.0 azure-mgmt-network==0.30.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==0.30.2 azure-mgmt-sql==0.4.0 azure-mgmt-storage==0.31.0 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.31.0 azure-monitor==0.2.0 azure-nspkg==3.0.2 azure-storage==0.34.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==2.0.0 - azure-common==1.1.4 - azure-core==1.24.2 - azure-datalake-store==0.0.6 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==3.0.0 - azure-mgmt-compute==0.33.1rc1 - azure-mgmt-containerregistry==0.2.0 - azure-mgmt-datalake-analytics==0.1.3 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.3 - azure-mgmt-dns==1.0.0 - azure-mgmt-documentdb==0.1.1 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-monitor==0.1.0 - azure-mgmt-network==0.30.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==0.30.2 - azure-mgmt-sql==0.4.0 - azure-mgmt-storage==0.31.0 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.31.0 - azure-monitor==0.2.0 - azure-nspkg==3.0.2 - azure-storage==0.34.0 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_add_preexisting_sp_creds" ]
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_using_cert", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_service_principal_auth_client_cert" ]
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_create_token_cache", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_add_new_sp_creds", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds_with_cert", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds_with_secret", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_new_token_added_by_adal", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_remove_creds", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_default_active_subscription_to_non_disabled_one", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_particular_tenent", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_id", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_interactive_from_particular_tenent", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_through_interactive_flow", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password_with_account_disabled", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_current_account_user", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info_for_logged_in_service_principal", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_login_credentials", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_login_credentials_for_graph_client", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_subscription", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_load_cached_tokens", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_logout", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_logout_all", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_normalize", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_service_principal_auth_client_secret", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_set_active_subscription", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_update_add_two_different_subscriptions", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_update_with_same_subscription_added_twice" ]
[]
MIT License
null
Azure__azure-cli-2914
3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1
2017-04-19 03:29:49
eb12ac454cbe1ddb59c86cdf2045e1912660e750
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2914?src=pr&el=h1) Report > Merging [#2914](https://codecov.io/gh/Azure/azure-cli/pull/2914?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1?src=pr&el=desc) will **increase** coverage by `0.01%`. > The diff coverage is `87.5%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/2914/graphs/tree.svg?token=2pog0TKvF8&src=pr&width=650&height=150)](https://codecov.io/gh/Azure/azure-cli/pull/2914?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #2914 +/- ## ========================================== + Coverage 63.19% 63.21% +0.01% ========================================== Files 466 466 Lines 26168 26190 +22 Branches 4003 4003 ========================================== + Hits 16536 16555 +19 - Misses 8548 8551 +3 Partials 1084 1084 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/2914?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...urce/azure/cli/command\_modules/resource/\_params.py](https://codecov.io/gh/Azure/azure-cli/pull/2914?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcmVzb3VyY2UvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9yZXNvdXJjZS9fcGFyYW1zLnB5) | `100% <100%> (ø)` | :arrow_up: | | [...re/cli/command\_modules/resource/\_client\_factory.py](https://codecov.io/gh/Azure/azure-cli/pull/2914?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcmVzb3VyY2UvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9yZXNvdXJjZS9fY2xpZW50X2ZhY3RvcnkucHk=) | `79.54% <100%> (+2.04%)` | :arrow_up: | | [...source/azure/cli/command\_modules/resource/\_help.py](https://codecov.io/gh/Azure/azure-cli/pull/2914?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcmVzb3VyY2UvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9yZXNvdXJjZS9faGVscC5weQ==) | `100% <100%> (ø)` | :arrow_up: | | [...rce/azure/cli/command\_modules/resource/commands.py](https://codecov.io/gh/Azure/azure-cli/pull/2914?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcmVzb3VyY2UvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9yZXNvdXJjZS9jb21tYW5kcy5weQ==) | `83.11% <100%> (+0.45%)` | :arrow_up: | | [...ource/azure/cli/command\_modules/resource/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/2914?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcmVzb3VyY2UvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9yZXNvdXJjZS9jdXN0b20ucHk=) | `52.71% <78.57%> (+0.53%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2914?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2914?src=pr&el=footer). Last update [3699ef7...9cba2af](https://codecov.io/gh/Azure/azure-cli/pull/2914?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/azure-cli.pyproj b/azure-cli.pyproj index 39b535e11..cadb46c8f 100644 --- a/azure-cli.pyproj +++ b/azure-cli.pyproj @@ -43,7 +43,17 @@ <Compile Include="azure-cli-core\azure\cli\core\extensions\__init__.py" /> <Compile Include="azure-cli-core\azure\cli\core\help_files.py" /> <Compile Include="azure-cli-core\azure\cli\core\parser.py" /> + <Compile Include="azure-cli-core\azure\cli\core\profiles\_shared.py" /> + <Compile Include="azure-cli-core\azure\cli\core\profiles\_shared.py" /> + <Compile Include="azure-cli-core\azure\cli\core\profiles\__init__.py" /> + <Compile Include="azure-cli-core\azure\cli\core\profiles\__init__.py" /> <Compile Include="azure-cli-core\azure\cli\core\prompting.py" /> + <Compile Include="azure-cli-core\azure\cli\core\sdk\util.py" /> + <Compile Include="azure-cli-core\azure\cli\core\sdk\util.py" /> + <Compile Include="azure-cli-core\azure\cli\core\sdk\validators.py" /> + <Compile Include="azure-cli-core\azure\cli\core\sdk\validators.py" /> + <Compile Include="azure-cli-core\azure\cli\core\sdk\__init__.py" /> + <Compile Include="azure-cli-core\azure\cli\core\sdk\__init__.py" /> <Compile Include="azure-cli-core\azure\cli\core\telemetry_upload.py" /> <Compile Include="azure-cli-core\azure\cli\core\test_utils\vcr_test_base.py" /> <Compile Include="azure-cli-core\azure\cli\core\test_utils\__init__.py" /> @@ -583,6 +593,8 @@ <Folder Include="azure-cli-core\azure\cli\core\" /> <Folder Include="azure-cli-core\azure\cli\core\commands\" /> <Folder Include="azure-cli-core\azure\cli\core\extensions\" /> + <Folder Include="azure-cli-core\azure\cli\core\profiles\" /> + <Folder Include="azure-cli-core\azure\cli\core\sdk\" /> <Folder Include="azure-cli-core\azure\cli\core\test_utils\" /> <Folder Include="azure-cli-core\tests\" /> <Folder Include="azure-cli-core\tests\__pycache__\" /> diff --git a/doc/sphinx/azhelpgen/azhelpgen.py b/doc/sphinx/azhelpgen/azhelpgen.py index 0d98b5e04..969e84530 100644 --- a/doc/sphinx/azhelpgen/azhelpgen.py +++ b/doc/sphinx/azhelpgen/azhelpgen.py @@ -10,10 +10,10 @@ from docutils.statemachine import ViewList from sphinx.util.compat import Directive from sphinx.util.nodes import nested_parse_with_titles -from azure.cli.core.application import APPLICATION, Configuration +from azure.cli.core.application import Application, Configuration import azure.cli.core._help as _help -app = APPLICATION +app = Application(Configuration()) for cmd in app.configuration.get_command_table(): try: app.execute(cmd.split() + ['-h']) @@ -30,8 +30,11 @@ class AzHelpGenDirective(Directive): help_files = [] for cmd, parser in parser_dict.items(): - help_file = _help.GroupHelpFile(cmd, parser) if _is_group(parser) else _help.CommandHelpFile(cmd, parser) - help_file.load(parser) + help_file = _help.GroupHelpFile(cmd, parser) if _is_group(parser) else _help.CommandHelpFile(cmd, parser) + try: + help_file.load(parser) + catch Exception as ex: + print(ex) help_files.append(help_file) help_files = sorted(help_files, key=lambda x: x.command) diff --git a/src/azure-cli-core/azure/cli/core/commands/arm.py b/src/azure-cli-core/azure/cli/core/commands/arm.py index 958124117..5c90c8194 100644 --- a/src/azure-cli-core/azure/cli/core/commands/arm.py +++ b/src/azure-cli-core/azure/cli/core/commands/arm.py @@ -10,10 +10,13 @@ from six import string_types from azure.cli.core.commands import (CliCommand, get_op_handler, command_table as main_command_table, - command_module_map as main_command_module_map) + command_module_map as main_command_module_map, + CONFIRM_PARAM_NAME) from azure.cli.core.commands._introspection import extract_args_from_signature from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.core.application import APPLICATION, IterateValue +from azure.cli.core.prompting import prompt_y_n, NoTTYException +from azure.cli.core._config import az_config import azure.cli.core.azlogging as azlogging from azure.cli.core.util import CLIError, todict, shell_safe_json_parse from azure.cli.core.profiles import ResourceType @@ -207,12 +210,25 @@ def _get_child(parent, collection_name, item_name, collection_key): return result +def _user_confirmed(confirmation, command_args): + if callable(confirmation): + return confirmation(command_args) + try: + if isinstance(confirmation, string_types): + return prompt_y_n(confirmation) + return prompt_y_n('Are you sure you want to perform this operation?') + except NoTTYException: + logger.warning('Unable to prompt for confirmation as no tty available. Use --yes.') + return False + + # pylint: disable=too-many-arguments def cli_generic_update_command(module_name, name, getter_op, setter_op, factory=None, setter_arg_name='parameters', table_transformer=None, child_collection_prop_name=None, child_collection_key='name', child_arg_name='item_name', custom_function_op=None, - no_wait_param=None, transform=None): + no_wait_param=None, transform=None, confirmation=None, + exception_handler=None, formatter_class=None): if not isinstance(getter_op, string_types): raise ValueError("Getter operation must be a string. Got '{}'".format(getter_op)) if not isinstance(setter_op, string_types): @@ -246,6 +262,12 @@ def cli_generic_update_command(module_name, name, getter_op, setter_op, factory= def handler(args): # pylint: disable=too-many-branches,too-many-statements from msrestazure.azure_operation import AzureOperationPoller + if confirmation \ + and not args.items().get(CONFIRM_PARAM_NAME) \ + and not az_config.getboolean('core', 'disable_confirm_prompt', fallback=False) \ + and not _user_confirmed(confirmation, args.items()): + raise CLIError('Operation cancelled.') + ordered_arguments = args.pop('ordered_arguments', []) for item in ['properties_to_add', 'properties_to_set', 'properties_to_remove']: if args[item]: @@ -259,66 +281,73 @@ def cli_generic_update_command(module_name, name, getter_op, setter_op, factory= getterargs = {key: val for key, val in args.items() if key in get_arguments_loader()} getter = get_op_handler(getter_op) - if child_collection_prop_name: - parent = getter(client, **getterargs) if client else getter(**getterargs) - instance = _get_child( - parent, - child_collection_prop_name, - args.get(child_arg_name), - child_collection_key - ) - else: - parent = None - instance = getter(client, **getterargs) if client else getter(**getterargs) - - # pass instance to the custom_function, if provided - if custom_function_op: - custom_function = get_op_handler(custom_function_op) - custom_func_args = {k: v for k, v in args.items() if k in function_arguments_loader()} + try: if child_collection_prop_name: - parent = custom_function(instance, parent, **custom_func_args) + parent = getter(client, **getterargs) if client else getter(**getterargs) + instance = _get_child( + parent, + child_collection_prop_name, + args.get(child_arg_name), + child_collection_key + ) else: - instance = custom_function(instance, **custom_func_args) - - # apply generic updates after custom updates - setterargs = {key: val for key, val in args.items() if key in set_arguments_loader()} - - for arg in ordered_arguments: - arg_type, arg_values = arg - if arg_type == '--set': - try: - for expression in arg_values: - set_properties(instance, expression) - except ValueError: - raise CLIError('invalid syntax: {}'.format(set_usage)) - elif arg_type == '--add': - try: - add_properties(instance, arg_values) - except ValueError: - raise CLIError('invalid syntax: {}'.format(add_usage)) - elif arg_type == '--remove': - try: - remove_properties(instance, arg_values) - except ValueError: - raise CLIError('invalid syntax: {}'.format(remove_usage)) - - # Done... update the instance! - setterargs[setter_arg_name] = parent if child_collection_prop_name else instance - setter = get_op_handler(setter_op) - - opres = setter(client, **setterargs) if client else setter(**setterargs) - - if setterargs.get(no_wait_param, None): - return None + parent = None + instance = getter(client, **getterargs) if client else getter(**getterargs) - result = opres.result() if isinstance(opres, AzureOperationPoller) else opres - if child_collection_prop_name: - result = _get_child( - result, - child_collection_prop_name, - args.get(child_arg_name), - child_collection_key - ) + # pass instance to the custom_function, if provided + if custom_function_op: + custom_function = get_op_handler(custom_function_op) + custom_func_args = \ + {k: v for k, v in args.items() if k in function_arguments_loader()} + if child_collection_prop_name: + parent = custom_function(instance, parent, **custom_func_args) + else: + instance = custom_function(instance, **custom_func_args) + + # apply generic updates after custom updates + setterargs = {key: val for key, val in args.items() if key in set_arguments_loader()} + + for arg in ordered_arguments: + arg_type, arg_values = arg + if arg_type == '--set': + try: + for expression in arg_values: + set_properties(instance, expression) + except ValueError: + raise CLIError('invalid syntax: {}'.format(set_usage)) + elif arg_type == '--add': + try: + add_properties(instance, arg_values) + except ValueError: + raise CLIError('invalid syntax: {}'.format(add_usage)) + elif arg_type == '--remove': + try: + remove_properties(instance, arg_values) + except ValueError: + raise CLIError('invalid syntax: {}'.format(remove_usage)) + + # Done... update the instance! + setterargs[setter_arg_name] = parent if child_collection_prop_name else instance + setter = get_op_handler(setter_op) + + opres = setter(client, **setterargs) if client else setter(**setterargs) + + if setterargs.get(no_wait_param, None): + return None + + result = opres.result() if isinstance(opres, AzureOperationPoller) else opres + if child_collection_prop_name: + result = _get_child( + result, + child_collection_prop_name, + args.get(child_arg_name), + child_collection_key + ) + except Exception as ex: # pylint: disable=broad-except + if exception_handler: + result = exception_handler(ex) + else: + raise ex # apply results transform if specified if transform: @@ -334,7 +363,7 @@ def cli_generic_update_command(module_name, name, getter_op, setter_op, factory= namespace.ordered_arguments.append((option_string, values)) cmd = CliCommand(name, handler, table_transformer=table_transformer, - arguments_loader=arguments_loader) + arguments_loader=arguments_loader, formatter_class=formatter_class) group_name = 'Generic Update' cmd.add_argument('properties_to_set', '--set', nargs='+', action=OrderedArgsAction, default=[], help='Update an object by specifying a property path and value to set.' @@ -352,7 +381,7 @@ def cli_generic_update_command(module_name, name, getter_op, setter_op, factory= main_command_module_map[name] = module_name -def cli_generic_wait_command(module_name, name, getter_op, factory=None): +def cli_generic_wait_command(module_name, name, getter_op, factory=None, exception_handler=None): if not isinstance(getter_op, string_types): raise ValueError("Getter operation must be a string. Got '{}'".format(type(getter_op))) @@ -374,6 +403,12 @@ def cli_generic_wait_command(module_name, name, getter_op, factory=None): provisioning_state = getattr(properties, 'provisioning_state', None) return provisioning_state + def _handle_exception(ex): + if exception_handler: + return exception_handler(ex) + else: + raise ex + def handler(args): from msrest.exceptions import ClientException import time @@ -418,9 +453,11 @@ def cli_generic_wait_command(module_name, name, getter_op, factory=None): if wait_for_deleted: return if not any([wait_for_created, wait_for_exists, custom_condition]): - raise + _handle_exception(ex) else: - raise + _handle_exception(ex) + except Exception as ex: # pylint: disable=broad-except + _handle_exception(ex) time.sleep(interval) diff --git a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/commands.py b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/commands.py index 453f4d32c..ff1891f51 100644 --- a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/commands.py +++ b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/commands.py @@ -9,6 +9,8 @@ from azure.cli.core.commands import cli_command from azure.cli.core.commands.arm import cli_generic_update_command from azure.cli.command_modules.redis._client_factory import (cf_redis, cf_patch_schedules) +from azure.cli.command_modules.redis.custom import wrong_vmsize_argument_exception_handler + cli_command(__name__, 'redis create', 'azure.cli.command_modules.redis.custom#cli_redis_create', cf_redis) cli_command(__name__, 'redis delete', 'azure.mgmt.redis.operations.redis_operations#RedisOperations.delete', cf_redis) cli_command(__name__, 'redis export', 'azure.cli.command_modules.redis.custom#cli_redis_export', cf_redis) @@ -21,11 +23,12 @@ cli_command(__name__, 'redis regenerate-keys', 'azure.mgmt.redis.operations.redi cli_command(__name__, 'redis show', 'azure.mgmt.redis.operations.redis_operations#RedisOperations.get', cf_redis) cli_command(__name__, 'redis update-settings', 'azure.cli.command_modules.redis.custom#cli_redis_update_settings', cf_redis) -cli_generic_update_command(__name__, 'redis update', 'azure.mgmt.redis.operations.redis_operations#RedisOperations.get', - 'azure.mgmt.redis.operations.redis_operations#RedisOperations.create_or_update', - cf_redis, custom_function_op='azure.cli.command_modules.redis.custom#cli_redis_update') +cli_generic_update_command(__name__, 'redis update', + 'azure.mgmt.redis.operations.redis_operations#RedisOperations.get', + 'azure.mgmt.redis.operations.redis_operations#RedisOperations.create_or_update', cf_redis, + custom_function_op='azure.cli.command_modules.redis.custom#cli_redis_update', + exception_handler=wrong_vmsize_argument_exception_handler) cli_command(__name__, 'redis patch-schedule set', 'azure.mgmt.redis.operations.patch_schedules_operations#PatchSchedulesOperations.create_or_update', cf_patch_schedules) cli_command(__name__, 'redis patch-schedule delete', 'azure.mgmt.redis.operations.patch_schedules_operations#PatchSchedulesOperations.delete', cf_patch_schedules) cli_command(__name__, 'redis patch-schedule show', 'azure.mgmt.redis.operations.patch_schedules_operations#PatchSchedulesOperations.get', cf_patch_schedules) - diff --git a/src/command_modules/azure-cli-resource/HISTORY.rst b/src/command_modules/azure-cli-resource/HISTORY.rst index 4e6a4b0f5..1cb011440 100644 --- a/src/command_modules/azure-cli-resource/HISTORY.rst +++ b/src/command_modules/azure-cli-resource/HISTORY.rst @@ -2,8 +2,8 @@ Release History =============== -2.0.3 (unreleased) - +2.0.4 (unreleased) +* Support 'provider operation' commands (#2908) * Support generic resource create (#2606) 2.0.3 (2017-04-17) diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_client_factory.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_client_factory.py index 120dbaf54..9aa5c14ba 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_client_factory.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_client_factory.py @@ -28,6 +28,12 @@ def _resource_links_client_factory(**_): from azure.cli.core.profiles import ResourceType return get_mgmt_service_client(ResourceType.MGMT_RESOURCE_LINKS) +def _authorization_management_client(**_): + from azure.cli.core.commands.client_factory import get_mgmt_service_client + from azure.mgmt.authorization import AuthorizationManagementClient + return get_mgmt_service_client(AuthorizationManagementClient) + + def cf_resource_groups(_): return _resource_client_factory().resource_groups diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py index 02da799e6..728f0febe 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py @@ -274,6 +274,18 @@ helps['provider unregister'] = """ type: command short-summary: Unregister a provider. """ +helps['provider operation'] = """ + type: group + short-summary: Get provider operations metadatas. +""" +helps['provider operation show'] = """ + type: command + short-summary: Get an individual provider's operations. +""" +helps['provider operation list'] = """ + type: command + short-summary: Get operations from all providers. +""" helps['tag'] = """ type: group short-summary: Manage resource tags. diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_params.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_params.py index f6c2b4aae..80c6063b0 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_params.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_params.py @@ -46,6 +46,8 @@ register_cli_argument('resource create', 'is_full_object', action='store_true', register_cli_argument('provider', 'top', ignore_type) register_cli_argument('provider', 'resource_provider_namespace', options_list=('--namespace', '-n'), completer=get_providers_completion_list, help=_PROVIDER_HELP_TEXT) +register_cli_argument('provider operation', 'api_version', help="The api version of the 'Microsoft.Authorization/providerOperations' resource (omit for latest)") + register_cli_argument('feature', 'resource_provider_namespace', options_list=('--namespace',), required=True, help=_PROVIDER_HELP_TEXT) register_cli_argument('feature list', 'resource_provider_namespace', options_list=('--namespace',), required=False, help=_PROVIDER_HELP_TEXT) diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/commands.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/commands.py index 2321dea4a..bb23b2197 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/commands.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/commands.py @@ -59,7 +59,8 @@ cli_command(__name__, 'provider list', 'azure.mgmt.resource.resources.operations cli_command(__name__, 'provider show', 'azure.mgmt.resource.resources.operations.providers_operations#ProvidersOperations.get', cf_providers, exception_handler=empty_on_404) cli_command(__name__, 'provider register', 'azure.cli.command_modules.resource.custom#register_provider') cli_command(__name__, 'provider unregister', 'azure.cli.command_modules.resource.custom#unregister_provider') - +cli_command(__name__, 'provider operation list', 'azure.cli.command_modules.resource.custom#list_provider_operations') +cli_command(__name__, 'provider operation show', 'azure.cli.command_modules.resource.custom#show_provider_operations') # Resource feature commands cli_command(__name__, 'feature list', 'azure.cli.command_modules.resource.custom#list_features', cf_features) cli_command(__name__, 'feature show', 'azure.mgmt.resource.features.operations.features_operations#FeaturesOperations.get', cf_features, exception_handler=empty_on_404) diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/custom.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/custom.py index 348c44447..38329f140 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/custom.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/custom.py @@ -27,7 +27,8 @@ from azure.cli.core.profiles import get_sdk, ResourceType from ._client_factory import (_resource_client_factory, _resource_policy_client_factory, _resource_lock_client_factory, - _resource_links_client_factory) + _resource_links_client_factory, + _authorization_management_client) logger = azlogging.get_az_logger(__name__) @@ -352,6 +353,26 @@ def _update_provider(namespace, registering): msg_template = '%s is still on-going. You can monitor using \'az provider show -n %s\'' logger.warning(msg_template, action, namespace) + +def list_provider_operations(api_version=None): + api_version = api_version or _get_auth_provider_latest_api_version() + auth_client = _authorization_management_client() + return auth_client.provider_operations_metadata.list(api_version) + + +def show_provider_operations(resource_provider_namespace, api_version=None): + api_version = api_version or _get_auth_provider_latest_api_version() + auth_client = _authorization_management_client() + return auth_client.provider_operations_metadata.get(resource_provider_namespace, api_version) + + +def _get_auth_provider_latest_api_version(): + rcf = _resource_client_factory() + api_version = _ResourceUtils.resolve_api_version(rcf, 'Microsoft.Authorization', + None, 'providerOperations') + return api_version + + def move_resource(ids, destination_group, destination_subscription_id=None): '''Moves resources from one resource group to another(can be under different subscription) @@ -536,6 +557,63 @@ def list_locks(resource_group_name=None, resource_provider_namespace=None, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter=filter_string) +def _validate_lock_params_match_lock( + lock_client, name, resource_group_name, resource_provider_namespace, + parent_resource_path, resource_type, resource_name): + ''' + Locks are scoped to subscription, resource group or resource. + However, the az list command returns all locks for the current scopes + and all lower scopes (e.g. resource group level also includes resource locks). + This can lead to a confusing user experience where the user specifies a lock + name and assumes that it will work, even if they haven't given the right + scope. This function attempts to validate the parameters and help the + user find the right scope, by first finding the lock, and then infering + what it's parameters should be. + ''' + locks = lock_client.management_locks.list_at_subscription_level() + found_count = 0 # locks at different levels can have the same name + lock_resource_id = None + for lock in locks: + if lock.name == name: + found_count = found_count + 1 + lock_resource_id = lock.id + if found_count == 1: + # If we only found one lock, let's validate that the parameters are correct, + # if we found more than one, we'll assume the user knows what they're doing + # TODO: Add validation for that case too? + resource = parse_resource_id(lock_resource_id) + _resource_group = resource.get('resource_group', None) + _resource_namespace = resource.get('namespace', None) + if _resource_group is None: + return + if resource_group_name != _resource_group: + raise CLIError( + 'Unexpected --resource-group for lock {}, expected {}'.format( + name, _resource_group)) + if _resource_namespace is None: + return + if resource_provider_namespace != _resource_namespace: + raise CLIError( + 'Unexpected --namespace for lock {}, expected {}'.format(name, _resource_namespace)) + if resource.get('grandchild_type', None) is None: + _resource_type = resource.get('type', None) + _resource_name = resource.get('name', None) + else: + _resource_type = resource.get('child_type', None) + _resource_name = resource.get('child_name', None) + parent = (resource['type'] + '/' + resource['name']) + if parent != parent_resource_path: + raise CLIError( + 'Unexpected --parent for lock {}, expected {}'.format( + name, parent)) + if resource_type != _resource_type: + raise CLIError('Unexpected --resource-type for lock {}, expected {}'.format( + name, _resource_type)) + if resource_name != _resource_name: + raise CLIError('Unexpected --resource-name for lock {}, expected {}'.format( + name, _resource_name)) + + def get_lock(name, resource_group_name=None): ''' :param name: Name of the lock. @@ -563,11 +641,16 @@ def delete_lock(name, resource_group_name=None, resource_provider_namespace=None lock_client = _resource_lock_client_factory() lock_resource = _validate_lock_params(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name) + _validate_lock_params_match_lock(lock_client, name, resource_group_name, + resource_provider_namespace, parent_resource_path, + resource_type, resource_name) + resource_group_name = lock_resource[0] resource_name = lock_resource[1] resource_provider_namespace = lock_resource[2] resource_type = lock_resource[3] + if resource_group_name is None: return lock_client.management_locks.delete_at_subscription_level(name) if resource_name is None: @@ -632,7 +715,7 @@ def create_lock(name, resource_group_name=None, resource_provider_namespace=None :type notes: str ''' if level != 'ReadOnly' and level != 'CanNotDelete': - raise CLIError('--level must be one of "ReadOnly" or "CanNotDelete"') + raise CLIError('--lock-type must be one of "ReadOnly" or "CanNotDelete"') parameters = ManagementLockObject(level=level, notes=notes, name=name) lock_client = _resource_lock_client_factory() @@ -742,10 +825,10 @@ class _ResourceUtils(object): #pylint: disable=too-many-instance-attributes else: _validate_resource_inputs(resource_group_name, resource_provider_namespace, resource_type, resource_name) - api_version = _ResourceUtils._resolve_api_version(self.rcf, - resource_provider_namespace, - parent_resource_path, - resource_type) + api_version = _ResourceUtils.resolve_api_version(self.rcf, + resource_provider_namespace, + parent_resource_path, + resource_type) self.resource_group_name = resource_group_name self.resource_provider_namespace = resource_provider_namespace @@ -847,7 +930,7 @@ class _ResourceUtils(object): #pylint: disable=too-many-instance-attributes parameters) @staticmethod - def _resolve_api_version(rcf, resource_provider_namespace, parent_resource_path, resource_type): + def resolve_api_version(rcf, resource_provider_namespace, parent_resource_path, resource_type): provider = rcf.providers.get(resource_provider_namespace) #If available, we will use parent resource's api-version @@ -887,4 +970,4 @@ class _ResourceUtils(object): #pylint: disable=too-many-instance-attributes parent = None resource_type = parts['type'] - return _ResourceUtils._resolve_api_version(rcf, namespace, parent, resource_type) + return _ResourceUtils.resolve_api_version(rcf, namespace, parent, resource_type) diff --git a/src/command_modules/azure-cli-resource/setup.py b/src/command_modules/azure-cli-resource/setup.py index a9529b998..b87b9128a 100644 --- a/src/command_modules/azure-cli-resource/setup.py +++ b/src/command_modules/azure-cli-resource/setup.py @@ -27,6 +27,7 @@ CLASSIFIERS = [ DEPENDENCIES = [ 'azure-mgmt-resource==1.0.0rc1', 'azure-cli-core', + 'azure-mgmt-authorization==0.30.0rc6' ] with open('README.rst', 'r', encoding='utf-8') as f: diff --git a/src/command_modules/azure-cli-vm/HISTORY.rst b/src/command_modules/azure-cli-vm/HISTORY.rst index 4dbdb183b..62dac3bfd 100644 --- a/src/command_modules/azure-cli-vm/HISTORY.rst +++ b/src/command_modules/azure-cli-vm/HISTORY.rst @@ -2,6 +2,9 @@ Release History =============== +2.0.4 (unreleased) +++++++++++++++++++ +* vm/vmss: improve the warning text when generates ssh key pairs 2.0.3 (2017-04-17) ++++++++++++++++++ diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py index 747cef9db..f88ee11c8 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py @@ -665,7 +665,7 @@ def _validate_admin_password(password, os_type): def validate_ssh_key(namespace): string_or_file = (namespace.ssh_key_value or - os.path.join(os.path.expanduser('~'), '.ssh/id_rsa.pub')) + os.path.join(os.path.expanduser('~'), '.ssh', 'id_rsa.pub')) content = string_or_file if os.path.exists(string_or_file): logger.info('Use existing SSH public key file: %s', string_or_file) @@ -681,7 +681,10 @@ def validate_ssh_key(namespace): else: private_key_filepath = public_key_filepath + '.private' content = _generate_ssh_keys(private_key_filepath, public_key_filepath) - logger.warning('Created SSH key files: %s,%s', + logger.warning("SSH key files '%s' and '%s' have been generated under ~/.ssh to " + "allow SSH access to the VM. If using machines without " + "permanent storage like Azure Cloud Shell without an attached " + "file share, back up your keys to a safe location", private_key_filepath, public_key_filepath) else: raise CLIError('An RSA key file or key value must be supplied to SSH Key Value. '
Add support for querying ARM operations In the CLI 2.0 today, we don't have a way of showing operations, and (per the ARM team) "operations is critical for RBAC (creating custom roles etc) and auditing (this is what gets written into Event service entries)."
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-resource/tests/recordings/test_provider_operation.yaml b/src/command_modules/azure-cli-resource/tests/recordings/test_provider_operation.yaml new file mode 100644 index 000000000..300172ede --- /dev/null +++ b/src/command_modules/azure-cli-resource/tests/recordings/test_provider_operation.yaml @@ -0,0 +1,428 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [b0b09c36-24ae-11e7-b378-64510658e3b3] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization","namespace":"Microsoft.Authorization","resourceTypes":[{"resourceType":"roleAssignments","locations":[],"apiVersions":["2016-07-01","2015-07-01","2015-06-01","2015-05-01-preview","2014-10-01-preview","2014-07-01-preview","2014-04-01-preview"]},{"resourceType":"roleDefinitions","locations":[],"apiVersions":["2016-07-01","2015-07-01","2015-06-01","2015-05-01-preview","2014-10-01-preview","2014-07-01-preview","2014-04-01-preview"]},{"resourceType":"classicAdministrators","locations":[],"apiVersions":["2015-06-01","2015-05-01-preview","2014-10-01-preview","2014-07-01-preview","2014-04-01-preview"]},{"resourceType":"permissions","locations":[],"apiVersions":["2016-07-01","2015-07-01","2015-06-01","2015-05-01-preview","2014-10-01-preview","2014-07-01-preview","2014-04-01-preview"]},{"resourceType":"locks","locations":[],"apiVersions":["2017-04-01","2016-09-01","2015-06-01","2015-05-01-preview","2015-01-01"]},{"resourceType":"operations","locations":[],"apiVersions":["2016-07-01","2015-07-01","2015-01-01","2014-10-01-preview","2014-06-01"]},{"resourceType":"policyDefinitions","locations":[],"apiVersions":["2016-12-01","2016-04-01","2015-10-01-preview"]},{"resourceType":"policyAssignments","locations":[],"apiVersions":["2016-12-01","2016-04-01","2015-10-01-preview"]},{"resourceType":"providerOperations","locations":[],"apiVersions":["2016-07-01","2015-07-01-preview","2015-07-01"]},{"resourceType":"elevateAccess","locations":[],"apiVersions":["2016-07-01","2015-07-01","2015-06-01","2015-05-01-preview","2014-10-01-preview","2014-07-01-preview","2014-04-01-preview"]}],"registrationState":"Registered"}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Wed, 19 Apr 2017 03:17:16 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['1711'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 authorizationmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/TEST/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [b11a8248-24ae-11e7-a4df-64510658e3b3] + method: GET + uri: https://management.azure.com/providers/Microsoft.Authorization/providerOperations/microsoft.compute?api-version=2016-07-01&$expand=resourceTypes + response: + body: {string: '{"displayName":"Microsoft Compute","operations":[{"name":"Microsoft.Compute/register/action","displayName":"Register + Subscription for Compute","description":"Registers Subscription with Microsoft.Compute + resource provider","origin":"user,system","properties":null}],"resourceTypes":[{"name":"restorePointCollections","displayName":"Restore + Point Collections","operations":[{"name":"Microsoft.Compute/restorePointCollections/read","displayName":"Get + Restore Point Collection","description":"Get the properties of a restore point + collection","origin":"user,system","properties":null},{"name":"Microsoft.Compute/restorePointCollections/write","displayName":"Create + or Update Restore Point Collection","description":"Creates a new restore point + collection or updates an existing one","origin":"user,system","properties":null},{"name":"Microsoft.Compute/restorePointCollections/delete","displayName":"Delete + Restore Point Collection","description":"Deletes the restore point collection + and contained restore points","origin":"user,system","properties":null}]},{"name":"restorePointCollections/restorePoints","displayName":"Restore + Points","operations":[{"name":"Microsoft.Compute/restorePointCollections/restorePoints/read","displayName":"Get + Restore Point","description":"Get the properties of a restore point","origin":"user,system","properties":null},{"name":"Microsoft.Compute/restorePointCollections/restorePoints/write","displayName":"Create + Restore Point","description":"Creates a new restore point","origin":"user,system","properties":null},{"name":"Microsoft.Compute/restorePointCollections/restorePoints/delete","displayName":"Delete + Restore Point","description":"Deletes the restore point","origin":"user,system","properties":null},{"name":"Microsoft.Compute/restorePointCollections/restorePoints/retrieveSasUris/action","displayName":"Get + Restore Point along with blob SAS URIs","description":"Get the properties + of a restore point along with blob SAS URIs","origin":"user,system","properties":null}]},{"name":"virtualMachineScaleSets","displayName":"Virtual + Machine Scale Sets","operations":[{"name":"Microsoft.Compute/virtualMachineScaleSets/read","displayName":"Get + Virtual Machine Scale Set","description":"Get the properties of a virtual + machine scale set","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/write","displayName":"Create + or Update Virtual Machine Scale Set","description":"Creates a new virtual + machine scale set or updates an existing one","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/delete","displayName":"Delete + Virtual Machine Scale Set","description":"Deletes the virtual machine scale + set","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/start/action","displayName":"Start + Virtual Machine Scale Set","description":"Starts the instances of the virtual + machine scale set","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/powerOff/action","displayName":"Power + Off Virtual Machine Scale Set","description":"Powers off the instances of + the virtual machine scale set","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/restart/action","displayName":"Restart + Virtual Machine Scale Set","description":"Restarts the instances of the virtual + machine scale set","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/deallocate/action","displayName":"Deallocate + Virtual Machine Scale Set","description":"Powers off and releases the compute + resources for the instances of the virtual machine scale set ","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/manualUpgrade/action","displayName":"Manual + Upgrade Virtual Machine Scale Set","description":"Manually updates instances + to latest model of the virtual machine scale set","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/scale/action","displayName":"Scale + Virtual Machine Scale Set","description":"Scale In/Scale Out instance count + of an existing virtual machine scale set","origin":"user,system","properties":null}]},{"name":"virtualMachineScaleSets/providers/Microsoft.Insights/metricDefinitions","displayName":"Virtual + Machine Scalet Set Metric Definitions","operations":[{"name":"Microsoft.Compute/virtualMachineScaleSets/providers/Microsoft.Insights/metricDefinitions/read","displayName":"Get + Virtual Machine Scalet Set Metric Definitions","description":"Reads Virtual + Machine Scalet Set Metric Definitions","origin":"system","properties":{"serviceSpecification":{"metricSpecifications":[{"name":"Percentage + CPU","displayName":"Percentage CPU","displayDescription":"The percentage of + allocated compute units that are currently in use by the Virtual Machine(s)","unit":"Percent","aggregationType":"Average"},{"name":"Network + In","displayName":"Network In","displayDescription":"The number of bytes received + on all network interfaces by the Virtual Machine(s) (Incoming Traffic)","unit":"Bytes","aggregationType":"Total"},{"name":"Network + Out","displayName":"Network Out","displayDescription":"The number of bytes + out on all network interfaces by the Virtual Machine(s) (Outgoing Traffic)","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Read Bytes","displayName":"Disk Read Bytes","displayDescription":"Total bytes + read from disk during monitoring period","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Write Bytes","displayName":"Disk Write Bytes","displayDescription":"Total + bytes written to disk during monitoring period","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Read Operations/Sec","displayName":"Disk Read Operations/Sec","displayDescription":"Disk + Read IOPS","unit":"CountPerSecond","aggregationType":"Average"},{"name":"Disk + Write Operations/Sec","displayName":"Disk Write Operations/Sec","displayDescription":"Disk + Write IOPS","unit":"CountPerSecond","aggregationType":"Average"}]}}}]},{"name":"virtualMachineScaleSets/instanceView","displayName":"Virtual + Machine Scale Set Instance View","operations":[{"name":"Microsoft.Compute/virtualMachineScaleSets/instanceView/read","displayName":"Get + Virtual Machine Scale Set Instance View","description":"Gets the instance + view of the virtual machine scale set","origin":"user,system","properties":null}]},{"name":"virtualMachineScaleSets/skus","displayName":"Virtual + Machine Scale Set SKU","operations":[{"name":"Microsoft.Compute/virtualMachineScaleSets/skus/read","displayName":"List + SKUs for Virtual Machine Scale Set","description":"Lists the valid SKUs for + an existing virtual machine scale set","origin":"user,system","properties":null}]},{"name":"virtualMachineScaleSets/virtualMachines","displayName":"Virtual + Machine in Scale Set","operations":[{"name":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/read","displayName":"Gets + the properties of a Virtual Machine in a Virtual Machine Scale Set","description":"Retrieves + the properties of a Virtual Machine in a VM Scale Set","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/delete","displayName":"Delete + Virtual Machine in a Virtual Machine Scale Set","description":"Delete a specific + Virtual Machine in a VM Scale Set.","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/start/action","displayName":"Start + Virtual Machine in a Virtual Machine Scale Set","description":"Starts a Virtual + Machine instance in a VM Scale Set.","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/powerOff/action","displayName":"Power + off Virtual Machine in a Virtual Machine Scale Set","description":"Powers + Off a Virtual Machine instance in a VM Scale Set.","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/restart/action","displayName":"Restart + Virtual Machine instance in a Virtual Machine Scale Set","description":"Restarts + a Virtual Machine instance in a VM Scale Set.","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/deallocate/action","displayName":"Deallocate + Virtual Machine in a Virtual Machine Scale Set","description":"Powers off + and releases the compute resources for a Virtual Machine in a VM Scale Set.","origin":"user,system","properties":null}]},{"name":"virtualMachineScaleSets/virtualMachines/providers/Microsoft.Insights/metricDefinitions","displayName":"Virtual + Machine in Scale Set Metric Definitions","operations":[{"name":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/providers/Microsoft.Insights/metricDefinitions/read","displayName":"Get + Virtual Machine in Scale Set Metric Definitions","description":"Reads Virtual + Machine in Scale Set Metric Definitions","origin":"system","properties":{"serviceSpecification":{"metricSpecifications":[{"name":"Percentage + CPU","displayName":"Percentage CPU","displayDescription":"The percentage of + allocated compute units that are currently in use by the Virtual Machine(s)","unit":"Percent","aggregationType":"Average"},{"name":"Network + In","displayName":"Network In","displayDescription":"The number of bytes received + on all network interfaces by the Virtual Machine(s) (Incoming Traffic)","unit":"Bytes","aggregationType":"Total"},{"name":"Network + Out","displayName":"Network Out","displayDescription":"The number of bytes + out on all network interfaces by the Virtual Machine(s) (Outgoing Traffic)","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Read Bytes","displayName":"Disk Read Bytes","displayDescription":"Total bytes + read from disk during monitoring period","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Write Bytes","displayName":"Disk Write Bytes","displayDescription":"Total + bytes written to disk during monitoring period","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Read Operations/Sec","displayName":"Disk Read Operations/Sec","displayDescription":"Disk + Read IOPS","unit":"CountPerSecond","aggregationType":"Average"},{"name":"Disk + Write Operations/Sec","displayName":"Disk Write Operations/Sec","displayDescription":"Disk + Write IOPS","unit":"CountPerSecond","aggregationType":"Average"}]}}}]},{"name":"virtualMachineScaleSets/virtualMachines/instanceView","displayName":"Instance + View of Virtual Machine in Scale Set","operations":[{"name":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/instanceView/read","displayName":"Gets + Instance View of a Virtual Machine in a Virtual Machine Scale Set","description":"Retrieves + the instance view of a Virtual Machine in a VM Scale Set.","origin":"user,system","properties":null}]},{"name":"images","displayName":"Images","operations":[{"name":"Microsoft.Compute/images/read","displayName":"Get + Image","description":"Get the properties of the Image","origin":"user,system","properties":null},{"name":"Microsoft.Compute/images/write","displayName":"Create + or Update Image","description":"Creates a new Image or updates an existing + one","origin":"user,system","properties":null},{"name":"Microsoft.Compute/images/delete","displayName":"Delete + Image","description":"Deletes the image","origin":"user,system","properties":null}]},{"name":"operations","displayName":"Available + Compute Operations","operations":[{"name":"Microsoft.Compute/operations/read","displayName":"List + Available Compute Operations","description":"Lists operations available on + Microsoft.Compute resource provider","origin":"user,system","properties":null}]},{"name":"disks","displayName":"Disks","operations":[{"name":"Microsoft.Compute/disks/read","displayName":"Get + Disk","description":"Get the properties of a Disk","origin":"user,system","properties":null},{"name":"Microsoft.Compute/disks/write","displayName":"Create + or Update Disk","description":"Creates a new Disk or updates an existing one","origin":"user,system","properties":null},{"name":"Microsoft.Compute/disks/delete","displayName":"Delete + Disk","description":"Deletes the Disk","origin":"user,system","properties":null},{"name":"Microsoft.Compute/disks/beginGetAccess/action","displayName":"Get + Disk SAS URI","description":"Get the SAS URI of the Disk for blob access","origin":"user,system","properties":null},{"name":"Microsoft.Compute/disks/endGetAccess/action","displayName":"Revoke + Disk SAS URI","description":"Revoke the SAS URI of the Disk","origin":"user,system","properties":null}]},{"name":"snapshots","displayName":"Snapshots","operations":[{"name":"Microsoft.Compute/snapshots/read","displayName":"Get + Snapshot","description":"Get the properties of a Snapshot","origin":"user,system","properties":null},{"name":"Microsoft.Compute/snapshots/write","displayName":"Create + or Update Snapshot","description":"Create a new Snapshot or update an existing + one","origin":"user,system","properties":null},{"name":"Microsoft.Compute/snapshots/delete","displayName":"Delete + Snapshot","description":"Delete a Snapshot","origin":"user,system","properties":null}]},{"name":"availabilitySets","displayName":"Availability + Sets","operations":[{"name":"Microsoft.Compute/availabilitySets/read","displayName":"Get + Availablity Set","description":"Get the properties of an availability set","origin":"user,system","properties":null},{"name":"Microsoft.Compute/availabilitySets/write","displayName":"Create + or Update Availability Set","description":"Creates a new availability set + or updates an existing one","origin":"user,system","properties":null},{"name":"Microsoft.Compute/availabilitySets/delete","displayName":"Delete + Availability Set","description":"Deletes the availability set","origin":"user,system","properties":null}]},{"name":"availabilitySets/vmSizes","displayName":"Virtual + Machine Size for Availability set","operations":[{"name":"Microsoft.Compute/availabilitySets/vmSizes/read","displayName":"List + Virtual Machine Sizes for Availability Set","description":"List available + sizes for creating or updating a virtual machine in the availability set","origin":"user,system","properties":null}]},{"name":"virtualMachines","displayName":"Virtual + Machines","operations":[{"name":"Microsoft.Compute/virtualMachines/read","displayName":"Get + Virtual Machine","description":"Get the properties of a virtual machine","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/write","displayName":"Create + or Update Virtual Machine","description":"Creates a new virtual machine or + updates an existing virtual machine","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/delete","displayName":"Delete + Virtual Machine","description":"Deletes the virtual machine","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/start/action","displayName":"Start + Virtual Machine","description":"Starts the virtual machine","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/powerOff/action","displayName":"Power + Off Virtual Machine","description":"Powers off the virtual machine. Note that + the virtual machine will continue to be billed.","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/redeploy/action","displayName":"Redeploy + Virtual Machine","description":"Redeploys virtual machine","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/restart/action","displayName":"Restart + Virtual Machine","description":"Restarts the virtual machine","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/deallocate/action","displayName":"Deallocate + Virtual Machine","description":"Powers off the virtual machine and releases + the compute resources","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/generalize/action","displayName":"Generalize + Virtual Machine","description":"Sets the virtual machine state to Generalized + and prepares the virtual machine for capture","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/capture/action","displayName":"Capture + Virtual Machine","description":"Captures the virtual machine by copying virtual + hard disks and generates a template that can be used to create similar virtual + machines","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/convertToManagedDisks/action","displayName":"Convert + Virtual Machine disks to Managed Disks","description":"Converts the blob based + disks of the virtual machine to managed disks","origin":"user,system","properties":null}]},{"name":"virtualMachines/providers/Microsoft.Insights/metricDefinitions","displayName":"Virtual + Machine Metric Definitions","operations":[{"name":"Microsoft.Compute/virtualMachines/providers/Microsoft.Insights/metricDefinitions/read","displayName":"Get + Virtual Machine Metric Definitions","description":"Reads Virtual Machine Metric + Definitions","origin":"system","properties":{"serviceSpecification":{"metricSpecifications":[{"name":"Percentage + CPU","displayName":"Percentage CPU","displayDescription":"The percentage of + allocated compute units that are currently in use by the Virtual Machine(s)","unit":"Percent","aggregationType":"Average"},{"name":"Network + In","displayName":"Network In","displayDescription":"The number of bytes received + on all network interfaces by the Virtual Machine(s) (Incoming Traffic)","unit":"Bytes","aggregationType":"Total"},{"name":"Network + Out","displayName":"Network Out","displayDescription":"The number of bytes + out on all network interfaces by the Virtual Machine(s) (Outgoing Traffic)","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Read Bytes","displayName":"Disk Read Bytes","displayDescription":"Total bytes + read from disk during monitoring period","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Write Bytes","displayName":"Disk Write Bytes","displayDescription":"Total + bytes written to disk during monitoring period","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Read Operations/Sec","displayName":"Disk Read Operations/Sec","displayDescription":"Disk + Read IOPS","unit":"CountPerSecond","aggregationType":"Average"},{"name":"Disk + Write Operations/Sec","displayName":"Disk Write Operations/Sec","displayDescription":"Disk + Write IOPS","unit":"CountPerSecond","aggregationType":"Average"}]}}}]},{"name":"virtualMachines/vmSizes","displayName":"Virtual + Machine Size","operations":[{"name":"Microsoft.Compute/virtualMachines/vmSizes/read","displayName":"Lists + Available Virtual Machine Sizes","description":"Lists available sizes the + virtual machine can be updated to","origin":"user,system","properties":null}]},{"name":"virtualMachines/instanceView","displayName":"Virtual + Machine Instance View","operations":[{"name":"Microsoft.Compute/virtualMachines/instanceView/read","displayName":"Get + Virtual Machine Instance View","description":"Gets the detailed runtime status + of the virtual machine and its resources","origin":"user,system","properties":null}]},{"name":"virtualMachines/extensions","displayName":"Virtual + Machine Extensions","operations":[{"name":"Microsoft.Compute/virtualMachines/extensions/read","displayName":"Get + Virtual Machine Extension","description":"Get the properties of a virtual + machine extension","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/extensions/write","displayName":"Create + or Update Virtual Machine Extension","description":"Creates a new virtual + machine extension or updates an existing one","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/extensions/delete","displayName":"Delete + Virtual Machine Extension","description":"Deletes the virtual machine extension","origin":"user,system","properties":null}]},{"name":"locations/vmSizes","displayName":"Virtual + Machine Sizes","operations":[{"name":"Microsoft.Compute/locations/vmSizes/read","displayName":"List + Available Virtual Machine Sizes in Location","description":"Lists available + virtual machine sizes in a location","origin":"user,system","properties":null}]},{"name":"locations/usages","displayName":"Usage + Metrics","operations":[{"name":"Microsoft.Compute/locations/usages/read","displayName":"Get + Usage Metrics","description":"Gets service limits and current usage quantities + for the subscription''s compute resources in a location","origin":"user,system","properties":null}]},{"name":"locations/operations","displayName":"Operation","operations":[{"name":"Microsoft.Compute/locations/operations/read","displayName":"Get + Operation","description":"Gets the status of an asynchronous operation","origin":"user,system","properties":null}]}],"id":"/providers/Microsoft.Authorization/providerOperations/Microsoft.Compute","type":"Microsoft.Authorization/providerOperations","name":"Microsoft.Compute"}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Wed, 19 Apr 2017 03:17:16 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Set-Cookie: [x-ms-gateway-slice=productionb; path=/; secure; HttpOnly] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET] + content-length: ['20896'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 authorizationmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/TEST/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [b1821cb8-24ae-11e7-a4ab-64510658e3b3] + method: GET + uri: https://management.azure.com/providers/Microsoft.Authorization/providerOperations/microsoft.compute?api-version=2015-07-01&$expand=resourceTypes + response: + body: {string: '{"displayName":"Microsoft Compute","operations":[{"name":"Microsoft.Compute/register/action","displayName":"Register + Subscription for Compute","description":"Registers Subscription with Microsoft.Compute + resource provider","origin":"user,system","properties":null}],"resourceTypes":[{"name":"restorePointCollections","displayName":"Restore + Point Collections","operations":[{"name":"Microsoft.Compute/restorePointCollections/read","displayName":"Get + Restore Point Collection","description":"Get the properties of a restore point + collection","origin":"user,system","properties":null},{"name":"Microsoft.Compute/restorePointCollections/write","displayName":"Create + or Update Restore Point Collection","description":"Creates a new restore point + collection or updates an existing one","origin":"user,system","properties":null},{"name":"Microsoft.Compute/restorePointCollections/delete","displayName":"Delete + Restore Point Collection","description":"Deletes the restore point collection + and contained restore points","origin":"user,system","properties":null}]},{"name":"restorePointCollections/restorePoints","displayName":"Restore + Points","operations":[{"name":"Microsoft.Compute/restorePointCollections/restorePoints/read","displayName":"Get + Restore Point","description":"Get the properties of a restore point","origin":"user,system","properties":null},{"name":"Microsoft.Compute/restorePointCollections/restorePoints/write","displayName":"Create + Restore Point","description":"Creates a new restore point","origin":"user,system","properties":null},{"name":"Microsoft.Compute/restorePointCollections/restorePoints/delete","displayName":"Delete + Restore Point","description":"Deletes the restore point","origin":"user,system","properties":null},{"name":"Microsoft.Compute/restorePointCollections/restorePoints/retrieveSasUris/action","displayName":"Get + Restore Point along with blob SAS URIs","description":"Get the properties + of a restore point along with blob SAS URIs","origin":"user,system","properties":null}]},{"name":"virtualMachineScaleSets","displayName":"Virtual + Machine Scale Sets","operations":[{"name":"Microsoft.Compute/virtualMachineScaleSets/read","displayName":"Get + Virtual Machine Scale Set","description":"Get the properties of a virtual + machine scale set","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/write","displayName":"Create + or Update Virtual Machine Scale Set","description":"Creates a new virtual + machine scale set or updates an existing one","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/delete","displayName":"Delete + Virtual Machine Scale Set","description":"Deletes the virtual machine scale + set","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/start/action","displayName":"Start + Virtual Machine Scale Set","description":"Starts the instances of the virtual + machine scale set","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/powerOff/action","displayName":"Power + Off Virtual Machine Scale Set","description":"Powers off the instances of + the virtual machine scale set","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/restart/action","displayName":"Restart + Virtual Machine Scale Set","description":"Restarts the instances of the virtual + machine scale set","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/deallocate/action","displayName":"Deallocate + Virtual Machine Scale Set","description":"Powers off and releases the compute + resources for the instances of the virtual machine scale set ","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/manualUpgrade/action","displayName":"Manual + Upgrade Virtual Machine Scale Set","description":"Manually updates instances + to latest model of the virtual machine scale set","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/scale/action","displayName":"Scale + Virtual Machine Scale Set","description":"Scale In/Scale Out instance count + of an existing virtual machine scale set","origin":"user,system","properties":null}]},{"name":"virtualMachineScaleSets/providers/Microsoft.Insights/metricDefinitions","displayName":"Virtual + Machine Scalet Set Metric Definitions","operations":[{"name":"Microsoft.Compute/virtualMachineScaleSets/providers/Microsoft.Insights/metricDefinitions/read","displayName":"Get + Virtual Machine Scalet Set Metric Definitions","description":"Reads Virtual + Machine Scalet Set Metric Definitions","origin":"system","properties":{"serviceSpecification":{"metricSpecifications":[{"name":"Percentage + CPU","displayName":"Percentage CPU","displayDescription":"The percentage of + allocated compute units that are currently in use by the Virtual Machine(s)","unit":"Percent","aggregationType":"Average"},{"name":"Network + In","displayName":"Network In","displayDescription":"The number of bytes received + on all network interfaces by the Virtual Machine(s) (Incoming Traffic)","unit":"Bytes","aggregationType":"Total"},{"name":"Network + Out","displayName":"Network Out","displayDescription":"The number of bytes + out on all network interfaces by the Virtual Machine(s) (Outgoing Traffic)","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Read Bytes","displayName":"Disk Read Bytes","displayDescription":"Total bytes + read from disk during monitoring period","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Write Bytes","displayName":"Disk Write Bytes","displayDescription":"Total + bytes written to disk during monitoring period","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Read Operations/Sec","displayName":"Disk Read Operations/Sec","displayDescription":"Disk + Read IOPS","unit":"CountPerSecond","aggregationType":"Average"},{"name":"Disk + Write Operations/Sec","displayName":"Disk Write Operations/Sec","displayDescription":"Disk + Write IOPS","unit":"CountPerSecond","aggregationType":"Average"}]}}}]},{"name":"virtualMachineScaleSets/instanceView","displayName":"Virtual + Machine Scale Set Instance View","operations":[{"name":"Microsoft.Compute/virtualMachineScaleSets/instanceView/read","displayName":"Get + Virtual Machine Scale Set Instance View","description":"Gets the instance + view of the virtual machine scale set","origin":"user,system","properties":null}]},{"name":"virtualMachineScaleSets/skus","displayName":"Virtual + Machine Scale Set SKU","operations":[{"name":"Microsoft.Compute/virtualMachineScaleSets/skus/read","displayName":"List + SKUs for Virtual Machine Scale Set","description":"Lists the valid SKUs for + an existing virtual machine scale set","origin":"user,system","properties":null}]},{"name":"virtualMachineScaleSets/virtualMachines","displayName":"Virtual + Machine in Scale Set","operations":[{"name":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/read","displayName":"Gets + the properties of a Virtual Machine in a Virtual Machine Scale Set","description":"Retrieves + the properties of a Virtual Machine in a VM Scale Set","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/delete","displayName":"Delete + Virtual Machine in a Virtual Machine Scale Set","description":"Delete a specific + Virtual Machine in a VM Scale Set.","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/start/action","displayName":"Start + Virtual Machine in a Virtual Machine Scale Set","description":"Starts a Virtual + Machine instance in a VM Scale Set.","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/powerOff/action","displayName":"Power + off Virtual Machine in a Virtual Machine Scale Set","description":"Powers + Off a Virtual Machine instance in a VM Scale Set.","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/restart/action","displayName":"Restart + Virtual Machine instance in a Virtual Machine Scale Set","description":"Restarts + a Virtual Machine instance in a VM Scale Set.","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/deallocate/action","displayName":"Deallocate + Virtual Machine in a Virtual Machine Scale Set","description":"Powers off + and releases the compute resources for a Virtual Machine in a VM Scale Set.","origin":"user,system","properties":null}]},{"name":"virtualMachineScaleSets/virtualMachines/providers/Microsoft.Insights/metricDefinitions","displayName":"Virtual + Machine in Scale Set Metric Definitions","operations":[{"name":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/providers/Microsoft.Insights/metricDefinitions/read","displayName":"Get + Virtual Machine in Scale Set Metric Definitions","description":"Reads Virtual + Machine in Scale Set Metric Definitions","origin":"system","properties":{"serviceSpecification":{"metricSpecifications":[{"name":"Percentage + CPU","displayName":"Percentage CPU","displayDescription":"The percentage of + allocated compute units that are currently in use by the Virtual Machine(s)","unit":"Percent","aggregationType":"Average"},{"name":"Network + In","displayName":"Network In","displayDescription":"The number of bytes received + on all network interfaces by the Virtual Machine(s) (Incoming Traffic)","unit":"Bytes","aggregationType":"Total"},{"name":"Network + Out","displayName":"Network Out","displayDescription":"The number of bytes + out on all network interfaces by the Virtual Machine(s) (Outgoing Traffic)","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Read Bytes","displayName":"Disk Read Bytes","displayDescription":"Total bytes + read from disk during monitoring period","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Write Bytes","displayName":"Disk Write Bytes","displayDescription":"Total + bytes written to disk during monitoring period","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Read Operations/Sec","displayName":"Disk Read Operations/Sec","displayDescription":"Disk + Read IOPS","unit":"CountPerSecond","aggregationType":"Average"},{"name":"Disk + Write Operations/Sec","displayName":"Disk Write Operations/Sec","displayDescription":"Disk + Write IOPS","unit":"CountPerSecond","aggregationType":"Average"}]}}}]},{"name":"virtualMachineScaleSets/virtualMachines/instanceView","displayName":"Instance + View of Virtual Machine in Scale Set","operations":[{"name":"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/instanceView/read","displayName":"Gets + Instance View of a Virtual Machine in a Virtual Machine Scale Set","description":"Retrieves + the instance view of a Virtual Machine in a VM Scale Set.","origin":"user,system","properties":null}]},{"name":"images","displayName":"Images","operations":[{"name":"Microsoft.Compute/images/read","displayName":"Get + Image","description":"Get the properties of the Image","origin":"user,system","properties":null},{"name":"Microsoft.Compute/images/write","displayName":"Create + or Update Image","description":"Creates a new Image or updates an existing + one","origin":"user,system","properties":null},{"name":"Microsoft.Compute/images/delete","displayName":"Delete + Image","description":"Deletes the image","origin":"user,system","properties":null}]},{"name":"operations","displayName":"Available + Compute Operations","operations":[{"name":"Microsoft.Compute/operations/read","displayName":"List + Available Compute Operations","description":"Lists operations available on + Microsoft.Compute resource provider","origin":"user,system","properties":null}]},{"name":"disks","displayName":"Disks","operations":[{"name":"Microsoft.Compute/disks/read","displayName":"Get + Disk","description":"Get the properties of a Disk","origin":"user,system","properties":null},{"name":"Microsoft.Compute/disks/write","displayName":"Create + or Update Disk","description":"Creates a new Disk or updates an existing one","origin":"user,system","properties":null},{"name":"Microsoft.Compute/disks/delete","displayName":"Delete + Disk","description":"Deletes the Disk","origin":"user,system","properties":null},{"name":"Microsoft.Compute/disks/beginGetAccess/action","displayName":"Get + Disk SAS URI","description":"Get the SAS URI of the Disk for blob access","origin":"user,system","properties":null},{"name":"Microsoft.Compute/disks/endGetAccess/action","displayName":"Revoke + Disk SAS URI","description":"Revoke the SAS URI of the Disk","origin":"user,system","properties":null}]},{"name":"snapshots","displayName":"Snapshots","operations":[{"name":"Microsoft.Compute/snapshots/read","displayName":"Get + Snapshot","description":"Get the properties of a Snapshot","origin":"user,system","properties":null},{"name":"Microsoft.Compute/snapshots/write","displayName":"Create + or Update Snapshot","description":"Create a new Snapshot or update an existing + one","origin":"user,system","properties":null},{"name":"Microsoft.Compute/snapshots/delete","displayName":"Delete + Snapshot","description":"Delete a Snapshot","origin":"user,system","properties":null}]},{"name":"availabilitySets","displayName":"Availability + Sets","operations":[{"name":"Microsoft.Compute/availabilitySets/read","displayName":"Get + Availablity Set","description":"Get the properties of an availability set","origin":"user,system","properties":null},{"name":"Microsoft.Compute/availabilitySets/write","displayName":"Create + or Update Availability Set","description":"Creates a new availability set + or updates an existing one","origin":"user,system","properties":null},{"name":"Microsoft.Compute/availabilitySets/delete","displayName":"Delete + Availability Set","description":"Deletes the availability set","origin":"user,system","properties":null}]},{"name":"availabilitySets/vmSizes","displayName":"Virtual + Machine Size for Availability set","operations":[{"name":"Microsoft.Compute/availabilitySets/vmSizes/read","displayName":"List + Virtual Machine Sizes for Availability Set","description":"List available + sizes for creating or updating a virtual machine in the availability set","origin":"user,system","properties":null}]},{"name":"virtualMachines","displayName":"Virtual + Machines","operations":[{"name":"Microsoft.Compute/virtualMachines/read","displayName":"Get + Virtual Machine","description":"Get the properties of a virtual machine","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/write","displayName":"Create + or Update Virtual Machine","description":"Creates a new virtual machine or + updates an existing virtual machine","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/delete","displayName":"Delete + Virtual Machine","description":"Deletes the virtual machine","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/start/action","displayName":"Start + Virtual Machine","description":"Starts the virtual machine","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/powerOff/action","displayName":"Power + Off Virtual Machine","description":"Powers off the virtual machine. Note that + the virtual machine will continue to be billed.","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/redeploy/action","displayName":"Redeploy + Virtual Machine","description":"Redeploys virtual machine","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/restart/action","displayName":"Restart + Virtual Machine","description":"Restarts the virtual machine","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/deallocate/action","displayName":"Deallocate + Virtual Machine","description":"Powers off the virtual machine and releases + the compute resources","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/generalize/action","displayName":"Generalize + Virtual Machine","description":"Sets the virtual machine state to Generalized + and prepares the virtual machine for capture","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/capture/action","displayName":"Capture + Virtual Machine","description":"Captures the virtual machine by copying virtual + hard disks and generates a template that can be used to create similar virtual + machines","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/convertToManagedDisks/action","displayName":"Convert + Virtual Machine disks to Managed Disks","description":"Converts the blob based + disks of the virtual machine to managed disks","origin":"user,system","properties":null}]},{"name":"virtualMachines/providers/Microsoft.Insights/metricDefinitions","displayName":"Virtual + Machine Metric Definitions","operations":[{"name":"Microsoft.Compute/virtualMachines/providers/Microsoft.Insights/metricDefinitions/read","displayName":"Get + Virtual Machine Metric Definitions","description":"Reads Virtual Machine Metric + Definitions","origin":"system","properties":{"serviceSpecification":{"metricSpecifications":[{"name":"Percentage + CPU","displayName":"Percentage CPU","displayDescription":"The percentage of + allocated compute units that are currently in use by the Virtual Machine(s)","unit":"Percent","aggregationType":"Average"},{"name":"Network + In","displayName":"Network In","displayDescription":"The number of bytes received + on all network interfaces by the Virtual Machine(s) (Incoming Traffic)","unit":"Bytes","aggregationType":"Total"},{"name":"Network + Out","displayName":"Network Out","displayDescription":"The number of bytes + out on all network interfaces by the Virtual Machine(s) (Outgoing Traffic)","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Read Bytes","displayName":"Disk Read Bytes","displayDescription":"Total bytes + read from disk during monitoring period","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Write Bytes","displayName":"Disk Write Bytes","displayDescription":"Total + bytes written to disk during monitoring period","unit":"Bytes","aggregationType":"Total"},{"name":"Disk + Read Operations/Sec","displayName":"Disk Read Operations/Sec","displayDescription":"Disk + Read IOPS","unit":"CountPerSecond","aggregationType":"Average"},{"name":"Disk + Write Operations/Sec","displayName":"Disk Write Operations/Sec","displayDescription":"Disk + Write IOPS","unit":"CountPerSecond","aggregationType":"Average"}]}}}]},{"name":"virtualMachines/vmSizes","displayName":"Virtual + Machine Size","operations":[{"name":"Microsoft.Compute/virtualMachines/vmSizes/read","displayName":"Lists + Available Virtual Machine Sizes","description":"Lists available sizes the + virtual machine can be updated to","origin":"user,system","properties":null}]},{"name":"virtualMachines/instanceView","displayName":"Virtual + Machine Instance View","operations":[{"name":"Microsoft.Compute/virtualMachines/instanceView/read","displayName":"Get + Virtual Machine Instance View","description":"Gets the detailed runtime status + of the virtual machine and its resources","origin":"user,system","properties":null}]},{"name":"virtualMachines/extensions","displayName":"Virtual + Machine Extensions","operations":[{"name":"Microsoft.Compute/virtualMachines/extensions/read","displayName":"Get + Virtual Machine Extension","description":"Get the properties of a virtual + machine extension","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/extensions/write","displayName":"Create + or Update Virtual Machine Extension","description":"Creates a new virtual + machine extension or updates an existing one","origin":"user,system","properties":null},{"name":"Microsoft.Compute/virtualMachines/extensions/delete","displayName":"Delete + Virtual Machine Extension","description":"Deletes the virtual machine extension","origin":"user,system","properties":null}]},{"name":"locations/vmSizes","displayName":"Virtual + Machine Sizes","operations":[{"name":"Microsoft.Compute/locations/vmSizes/read","displayName":"List + Available Virtual Machine Sizes in Location","description":"Lists available + virtual machine sizes in a location","origin":"user,system","properties":null}]},{"name":"locations/usages","displayName":"Usage + Metrics","operations":[{"name":"Microsoft.Compute/locations/usages/read","displayName":"Get + Usage Metrics","description":"Gets service limits and current usage quantities + for the subscription''s compute resources in a location","origin":"user,system","properties":null}]},{"name":"locations/operations","displayName":"Operation","operations":[{"name":"Microsoft.Compute/locations/operations/read","displayName":"Get + Operation","description":"Gets the status of an asynchronous operation","origin":"user,system","properties":null}]}],"id":"/providers/Microsoft.Authorization/providerOperations/Microsoft.Compute","type":"Microsoft.Authorization/providerOperations","name":"Microsoft.Compute"}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Wed, 19 Apr 2017 03:17:17 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Set-Cookie: [x-ms-gateway-slice=productionb; path=/] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET] + content-length: ['20896'] + status: {code: 200, message: OK} +version: 1 diff --git a/src/command_modules/azure-cli-resource/tests/test_resource.py b/src/command_modules/azure-cli-resource/tests/test_resource.py index 0705f87e8..8a6f1e28f 100644 --- a/src/command_modules/azure-cli-resource/tests/test_resource.py +++ b/src/command_modules/azure-cli-resource/tests/test_resource.py @@ -262,6 +262,25 @@ class ProviderRegistrationTest(VCRTestBase): # Not RG test base because it opera result = self.cmd('provider show -n {}'.format(provider)) self.assertTrue(result['registrationState'] in ['Registering', 'Registered']) + +class ProviderOperationTest(VCRTestBase): # Not RG test base because it operates only on the subscription + def __init__(self, test_method): + super(ProviderOperationTest, self).__init__(__file__, test_method) + + def test_provider_operation(self): + self.execute() + + def body(self): + self.cmd('provider operation show --namespace microsoft.compute', checks=[ + JMESPathCheck('id', '/providers/Microsoft.Authorization/providerOperations/Microsoft.Compute'), + JMESPathCheck('type', 'Microsoft.Authorization/providerOperations') + ]) + self.cmd('provider operation show --namespace microsoft.compute --api-version 2015-07-01', checks=[ + JMESPathCheck('id', '/providers/Microsoft.Authorization/providerOperations/Microsoft.Compute'), + JMESPathCheck('type', 'Microsoft.Authorization/providerOperations') + ]) + + class DeploymentTest(ResourceGroupVCRTestBase): def __init__(self, test_method): super(DeploymentTest, self).__init__(__file__, test_method, resource_group='azure-cli-deployment-test')
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 2, "test_score": 1 }, "num_modified_files": 13 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==2.0.0 -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@3699ef7fdefc8c40fa76ebd83976fc8d4a0b92d1#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.6 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==3.0.0 azure-mgmt-compute==1.0.0rc1 azure-mgmt-containerregistry==0.2.0 azure-mgmt-datalake-analytics==0.1.3 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.3 azure-mgmt-dns==1.0.0 azure-mgmt-documentdb==0.1.1 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-monitor==0.1.0 azure-mgmt-network==1.0.0rc1 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.0.0rc1 azure-mgmt-sql==0.4.0 azure-mgmt-storage==1.0.0rc1 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.31.0 azure-monitor==0.2.0 azure-multiapi-storage==0.1.0 azure-nspkg==3.0.2 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 futures==3.1.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==2.0.0 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.6 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==3.0.0 - azure-mgmt-compute==1.0.0rc1 - azure-mgmt-containerregistry==0.2.0 - azure-mgmt-datalake-analytics==0.1.3 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.3 - azure-mgmt-dns==1.0.0 - azure-mgmt-documentdb==0.1.1 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-monitor==0.1.0 - azure-mgmt-network==1.0.0rc1 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.0.0rc1 - azure-mgmt-sql==0.4.0 - azure-mgmt-storage==1.0.0rc1 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.31.0 - azure-monitor==0.2.0 - azure-multiapi-storage==0.1.0 - azure-nspkg==3.0.2 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - futures==3.1.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-resource/tests/test_resource.py::ProviderOperationTest::test_provider_operation" ]
[]
[ "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceGroupScenarioTest::test_resource_group", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceGroupNoWaitScenarioTest::test_resource_group_no_wait", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceScenarioTest::test_resource_scenario", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceIDScenarioTest::test_resource_id_scenario", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceCreateScenarioTest::test_resource_create", "src/command_modules/azure-cli-resource/tests/test_resource.py::TagScenarioTest::test_tag_scenario", "src/command_modules/azure-cli-resource/tests/test_resource.py::ProviderRegistrationTest::test_provider_registration", "src/command_modules/azure-cli-resource/tests/test_resource.py::DeploymentTest::test_group_deployment", "src/command_modules/azure-cli-resource/tests/test_resource.py::DeploymentnoWaitTest::test_group_deployment_no_wait", "src/command_modules/azure-cli-resource/tests/test_resource.py::DeploymentThruUriTest::test_group_deployment_thru_uri", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceMoveScenarioTest::test_resource_move", "src/command_modules/azure-cli-resource/tests/test_resource.py::FeatureScenarioTest::test_feature_list", "src/command_modules/azure-cli-resource/tests/test_resource.py::PolicyScenarioTest::test_resource_policy" ]
[]
MIT License
null
Azure__azure-cli-2943
fe509f803d562c48b3c1d936f59d4b7b6f698136
2017-04-20 18:46:27
eb12ac454cbe1ddb59c86cdf2045e1912660e750
diff --git a/src/azure-cli-core/azure/cli/core/_profile.py b/src/azure-cli-core/azure/cli/core/_profile.py index e0d45196a..9788066e4 100644 --- a/src/azure-cli-core/azure/cli/core/_profile.py +++ b/src/azure-cli-core/azure/cli/core/_profile.py @@ -106,6 +106,7 @@ class Profile(object): password, is_service_principal, tenant, + allow_no_subscriptions=False, subscription_finder=None): from azure.cli.core._debug import allow_debug_adal_connection allow_debug_adal_connection() @@ -128,18 +129,26 @@ class Profile(object): subscriptions = subscription_finder.find_from_user_account( username, password, tenant, self._ad_resource_uri) - if not subscriptions: - raise CLIError('No subscriptions found for this account.') + if not allow_no_subscriptions and not subscriptions: + raise CLIError("No subscriptions were found for '{}'. If this is expected, use " + "'--allow-no-subscriptions' to have tenant level accesses".format( + username)) if is_service_principal: self._creds_cache.save_service_principal_cred(sp_auth.get_entry_to_persist(username, tenant)) - if self._creds_cache.adal_token_cache.has_state_changed: self._creds_cache.persist_cached_creds() + + if allow_no_subscriptions: + t_list = [s.tenant_id for s in subscriptions] + bare_tenants = [t for t in subscription_finder.tenants if t not in t_list] + subscriptions = Profile._build_tenant_level_accounts(bare_tenants) + consolidated = Profile._normalize_properties(subscription_finder.user_id, subscriptions, is_service_principal) + self._set_subscriptions(consolidated) # use deepcopy as we don't want to persist these changes to file. return deepcopy(consolidated) @@ -162,6 +171,24 @@ class Profile(object): }) return consolidated + @staticmethod + def _build_tenant_level_accounts(tenants): + from azure.cli.core.profiles import get_sdk, ResourceType + SubscriptionType = get_sdk(ResourceType.MGMT_RESOURCE_SUBSCRIPTIONS, + 'Subscription', mod='models') + StateType = get_sdk(ResourceType.MGMT_RESOURCE_SUBSCRIPTIONS, + 'SubscriptionState', mod='models') + result = [] + for t in tenants: + s = SubscriptionType() + s.id = '/subscriptions/' + t + s.subscription = t + s.tenant_id = t + s.display_name = 'N/A(tenant level account)' + s.state = StateType.enabled + result.append(s) + return result + def _set_subscriptions(self, new_subscriptions): existing_ones = self.load_cached_subscriptions(all_clouds=True) active_one = next((x for x in existing_ones if x.get(_IS_DEFAULT_SUBSCRIPTION)), None) @@ -345,6 +372,7 @@ class SubscriptionFinder(object): config, base_url=CLOUD.endpoints.resource_manager)) self._arm_client_factory = create_arm_client_factory + self.tenants = [] def find_from_user_account(self, username, password, tenant, resource): context = self._create_auth_context(tenant or _COMMON_TENANT) @@ -379,6 +407,7 @@ class SubscriptionFinder(object): token_entry = sp_auth.acquire_token(context, resource, client_id) self.user_id = client_id result = self._find_using_specific_tenant(tenant, token_entry[_ACCESS_TOKEN]) + self.tenants = [tenant] return result def _create_auth_context(self, tenant, use_token_cache=True): @@ -410,6 +439,7 @@ class SubscriptionFinder(object): temp_credentials[_ACCESS_TOKEN]) all_subscriptions.extend(subscriptions) + self.tenants = tenants return all_subscriptions def _find_using_specific_tenant(self, tenant, access_token): @@ -422,6 +452,7 @@ class SubscriptionFinder(object): for s in subscriptions: setattr(s, 'tenant_id', tenant) all_subscriptions.append(s) + self.tenants = [tenant] return all_subscriptions diff --git a/src/command_modules/azure-cli-profile/HISTORY.rst b/src/command_modules/azure-cli-profile/HISTORY.rst index 3392ef64a..5b8cee30e 100644 --- a/src/command_modules/azure-cli-profile/HISTORY.rst +++ b/src/command_modules/azure-cli-profile/HISTORY.rst @@ -2,6 +2,9 @@ Release History =============== +2.0.4 (unreleased) +++++++++++++++++++ +* Support login when there are no subscriptions found (#2560) 2.0.3 (2017-04-17) ++++++++++++++++++ diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py index 494a62dbb..2b552e0d6 100644 --- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py +++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py @@ -21,6 +21,7 @@ register_cli_argument('login', 'password', options_list=('--password', '-p'), he register_cli_argument('login', 'service_principal', action='store_true', help='The credential representing a service principal.') register_cli_argument('login', 'username', options_list=('--username', '-u'), help='Organization id or service principal') register_cli_argument('login', 'tenant', options_list=('--tenant', '-t'), help='The AAD tenant, must provide when using service principals.') +register_cli_argument('login', 'allow_no_subscriptions', action='store_true', help="Support access tenants without subscriptions. It's uncommon but useful to run tenant level commands, such as 'az ad'") register_cli_argument('logout', 'username', help='account user, if missing, logout the current active account') diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py index f163f8122..089fdc1fe 100644 --- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py +++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py @@ -54,7 +54,8 @@ def account_clear(): profile.logout_all() -def login(username=None, password=None, service_principal=None, tenant=None): +def login(username=None, password=None, service_principal=None, tenant=None, + allow_no_subscriptions=False): """Log in to access Azure subscriptions""" from adal.adal_error import AdalError import requests @@ -76,7 +77,8 @@ def login(username=None, password=None, service_principal=None, tenant=None): username, password, service_principal, - tenant) + tenant, + allow_no_subscriptions=allow_no_subscriptions) except AdalError as err: # try polish unfriendly server errors if username: diff --git a/src/command_modules/azure-cli-storage/HISTORY.rst b/src/command_modules/azure-cli-storage/HISTORY.rst index 0f6cf0717..f7d5140f8 100644 --- a/src/command_modules/azure-cli-storage/HISTORY.rst +++ b/src/command_modules/azure-cli-storage/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +unreleased +++++++++++++++++++ + +* Default location to resource group location for `storage account create`. + 2.0.3 (2017-04-17) ++++++++++++++++++ diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_params.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_params.py index 242334575..ed58494ad 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_params.py +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_params.py @@ -11,7 +11,8 @@ from six import u as unicode_string from azure.cli.core._config import az_config from azure.cli.core.commands.parameters import \ (ignore_type, tags_type, file_type, get_resource_name_completion_list, enum_choice_list, - model_choice_list, enum_default) + model_choice_list, enum_default, location_type) +from azure.cli.core.commands.validators import get_default_location_from_resource_group import azure.cli.core.commands.arm # pylint: disable=unused-import from azure.cli.core.commands import register_cli_argument, register_extra_cli_argument, CliArgumentType @@ -283,6 +284,7 @@ register_cli_argument('storage account show-connection-string', 'key_name', opti for item in ['blob', 'file', 'queue', 'table']: register_cli_argument('storage account show-connection-string', '{}_endpoint'.format(item), help='Custom endpoint for {}s.'.format(item)) +register_cli_argument('storage account create', 'location', location_type, validator=get_default_location_from_resource_group) register_cli_argument('storage account create', 'account_type', help='The storage account type', **model_choice_list(ResourceType.MGMT_STORAGE, 'AccountType')) register_cli_argument('storage account create', 'account_name', account_name_type, options_list=('--name', '-n'), completer=None) diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py index 8018c9b4e..266f15f07 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py @@ -52,7 +52,7 @@ def _update_progress(current, total): # CUSTOM METHODS -def create_storage_account(resource_group_name, account_name, sku, location, +def create_storage_account(resource_group_name, account_name, sku, location=None, kind=None, tags=None, custom_domain=None, encryption=None, access_tier=None): StorageAccountCreateParameters, Kind, Sku, CustomDomain, AccessTier = get_sdk( @@ -75,7 +75,8 @@ def create_storage_account(resource_group_name, account_name, sku, location, return scf.storage_accounts.create(resource_group_name, account_name, params) -def create_storage_account_with_account_type(resource_group_name, account_name, location, account_type, tags=None): +def create_storage_account_with_account_type(resource_group_name, account_name, account_type, + location=None, tags=None): StorageAccountCreateParameters, AccountType = get_sdk( ResourceType.MGMT_STORAGE, 'StorageAccountCreateParameters',
Azure CLI Feature: Use default location and sku when specifying a resource group ### Environment summary **Install Method:** How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly) Answer here: pip **CLI Version:** What version of the CLI and modules are installed? (Use `az --version`) Answer here: azure-cli (2.0.3) **OS Version:** What OS and version are you using? Answer here: macOS 10.12.3 **Shell Type:** What shell are you using? (e.g. bash, cmd.exe, Bash on Windows) Answer here: bash on macOS --- ### Description It would be great if when we create a storage account (or other resources) that if we specify a resource group, we can default to use its location. Otherwise we do this ... ``` az group create -n PapaResourceGroup -l eastus az storage account create -n papastorage -g PapaResourceGroup --sku Standard_LRS -l eastus ``` Notice we type the location twice. If I omit the location in the second command, it fails. We also should be able to default the sku. A quicker way would look like this ... ``` az group create -n PapaResourceGroup -l eastus az storage account create -n papastorage -g PapaResourceGroup ``` cc // @SyntaxC4
Azure/azure-cli
diff --git a/src/azure-cli-core/tests/test_profile.py b/src/azure-cli-core/tests/test_profile.py index e344826e2..7c092e55f 100644 --- a/src/azure-cli-core/tests/test_profile.py +++ b/src/azure-cli-core/tests/test_profile.py @@ -243,6 +243,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method 'my-secret', True, self.tenant_id, + False, finder) # action extended_info = profile.get_expanded_subscription_info() @@ -253,6 +254,35 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method self.assertEqual('https://login.microsoftonline.com', extended_info['endpoints'].active_directory) + @mock.patch('adal.AuthenticationContext', autospec=True) + def test_create_account_without_subscriptions(self, mock_auth_context): + mock_auth_context.acquire_token_with_client_credentials.return_value = self.token_entry1 + mock_arm_client = mock.MagicMock() + mock_arm_client.subscriptions.list.return_value = [] + finder = SubscriptionFinder(lambda _, _2: mock_auth_context, + None, + lambda _: mock_arm_client) + + storage_mock = {'subscriptions': []} + profile = Profile(storage_mock) + profile._management_resource_uri = 'https://management.core.windows.net/' + + # action + result = profile.find_subscriptions_on_login(False, + '1234', + 'my-secret', + True, + self.tenant_id, + allow_no_subscriptions=True, + subscription_finder=finder) + + # assert + self.assertTrue(1, len(result)) + self.assertEqual(result[0]['id'], self.tenant_id) + self.assertEqual(result[0]['state'], 'Enabled') + self.assertEqual(result[0]['tenantId'], self.tenant_id) + self.assertEqual(result[0]['name'], 'N/A(tenant level account)') + @mock.patch('azure.cli.core._profile._load_tokens_from_file', autospec=True) def test_get_current_account_user(self, mock_read_cred_file): # setup
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 0, "test_score": 3 }, "num_modified_files": 7 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==2.0.0 -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@fe509f803d562c48b3c1d936f59d4b7b6f698136#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.6 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==3.0.0 azure-mgmt-compute==1.0.0rc1 azure-mgmt-containerregistry==0.2.0 azure-mgmt-datalake-analytics==0.1.3 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.3 azure-mgmt-dns==1.0.0 azure-mgmt-documentdb==0.1.1 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-monitor==0.2.0 azure-mgmt-network==1.0.0rc2 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.0.0rc1 azure-mgmt-sql==0.4.0 azure-mgmt-storage==1.0.0rc1 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.31.0 azure-monitor==0.3.0 azure-multiapi-storage==0.1.0 azure-nspkg==3.0.2 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 futures==3.1.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==2.0.0 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.6 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==3.0.0 - azure-mgmt-compute==1.0.0rc1 - azure-mgmt-containerregistry==0.2.0 - azure-mgmt-datalake-analytics==0.1.3 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.3 - azure-mgmt-dns==1.0.0 - azure-mgmt-documentdb==0.1.1 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-monitor==0.2.0 - azure-mgmt-network==1.0.0rc2 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.0.0rc1 - azure-mgmt-sql==0.4.0 - azure-mgmt-storage==1.0.0rc1 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.31.0 - azure-monitor==0.3.0 - azure-multiapi-storage==0.1.0 - azure-nspkg==3.0.2 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - futures==3.1.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_create_account_without_subscriptions", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info_for_logged_in_service_principal" ]
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_using_cert", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_service_principal_auth_client_cert" ]
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_create_token_cache", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_add_new_sp_creds", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_add_preexisting_sp_creds", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds_with_cert", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds_with_secret", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_new_token_added_by_adal", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_remove_creds", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_default_active_subscription_to_non_disabled_one", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_particular_tenent", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_id", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_interactive_from_particular_tenent", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_through_interactive_flow", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password_with_account_disabled", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_current_account_user", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_login_credentials", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_login_credentials_for_graph_client", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_subscription", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_load_cached_tokens", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_logout", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_logout_all", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_normalize", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_service_principal_auth_client_secret", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_set_active_subscription", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_update_add_two_different_subscriptions", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_update_with_same_subscription_added_twice" ]
[]
MIT License
null
Azure__azure-cli-2955
3079f47653297161fd877f994cfaa0bc202f039f
2017-04-21 17:50:06
eb12ac454cbe1ddb59c86cdf2045e1912660e750
yugangw-msft: ```bash (env) D:\sdk\azure-cli>az ad group -h Group az ad group: Manage Azure Active Directory groups. Subgroups: member : Manage Azure Active Directory group members. Commands: create : Create a group in the directory. delete : Delete a group in the directory. get-member-groups: Gets a collection that contains the Object IDs of the groups of which the group is a member. list : List groups in the directory. show : Gets group information from the directory. (env) D:\sdk\azure-cli>az ad group member -h Group az ad group member: Manage Azure Active Directory group members. Commands: add : Add a memeber to a group. check : Checks whether the specified user, group, contact, or service principal is a direct or a transitive member of the specified group. list : Gets the members of a group. remove: Remove a memeber from a group. ``` codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=h1) Report > Merging [#2955](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/86c54142d7084eff0e8f2f5c7ae48ecbd53dfc0c?src=pr&el=desc) will **increase** coverage by `0.07%`. > The diff coverage is `85.1%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/2955/graphs/tree.svg?height=150&width=650&token=2pog0TKvF8&src=pr)](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #2955 +/- ## ========================================== + Coverage 63.33% 63.41% +0.07% ========================================== Files 466 467 +1 Lines 26539 26584 +45 Branches 4069 4073 +4 ========================================== + Hits 16809 16858 +49 + Misses 8617 8609 -8 - Partials 1113 1117 +4 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...-cli-role/azure/cli/command\_modules/role/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcm9sZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3JvbGUvY3VzdG9tLnB5) | `33.56% <ø> (+1.6%)` | :arrow_up: | | [...e-cli-role/azure/cli/command\_modules/role/\_help.py](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcm9sZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3JvbGUvX2hlbHAucHk=) | `100% <100%> (ø)` | :arrow_up: | | [...cli-role/azure/cli/command\_modules/role/\_params.py](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcm9sZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3JvbGUvX3BhcmFtcy5weQ==) | `100% <100%> (ø)` | :arrow_up: | | [...li-role/azure/cli/command\_modules/role/commands.py](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcm9sZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3JvbGUvY29tbWFuZHMucHk=) | `90.19% <100%> (+5.75%)` | :arrow_up: | | [...role/azure/cli/command\_modules/role/\_validators.py](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcm9sZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3JvbGUvX3ZhbGlkYXRvcnMucHk=) | `76.66% <76.66%> (ø)` | | | [...rofile/azure/cli/command\_modules/profile/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcHJvZmlsZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3Byb2ZpbGUvY3VzdG9tLnB5) | `35.21% <0%> (+2.81%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=footer). Last update [86c5414...85551c8](https://codecov.io/gh/Azure/azure-cli/pull/2955?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/src/command_modules/azure-cli-role/HISTORY.rst b/src/command_modules/azure-cli-role/HISTORY.rst index b34ef4fe7..5b6240d98 100644 --- a/src/command_modules/azure-cli-role/HISTORY.rst +++ b/src/command_modules/azure-cli-role/HISTORY.rst @@ -5,6 +5,7 @@ Release History 2.0.3 (unreleased) ++++++++++++++++++ * create-for-rbac: ensure SP's end date will not exceed certificate's expiration date (#2989) +* RBAC: add full support for 'ad group' (#2016) 2.0.2 (2017-04-17) ++++++++++++++++++ diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_help.py b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_help.py index 852adcc35..25814a12f 100644 --- a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_help.py +++ b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_help.py @@ -140,6 +140,10 @@ helps['ad group'] = """ type: group short-summary: Manage Azure Active Directory groups. """ +helps['ad group member'] = """ + type: group + short-summary: Manage Azure Active Directory group members. +""" helps['ad sp'] = """ type: group short-summary: Manage Azure Active Directory service principals for automation authentication. diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_params.py b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_params.py index 828f046fc..9c749fcde 100644 --- a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_params.py +++ b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_params.py @@ -8,9 +8,10 @@ from azure.cli.core.commands import CliArgumentType from azure.cli.core.commands import register_cli_argument from azure.cli.core.commands.parameters import enum_choice_list from .custom import get_role_definition_name_completion_list +from ._validators import validate_group, validate_member_id, VARIANT_GROUP_ID_ARGS register_cli_argument('ad app', 'application_object_id', options_list=('--object-id',)) -register_cli_argument('ad app', 'display_name', help=' the display name of the application') +register_cli_argument('ad app', 'display_name', help='the display name of the application') register_cli_argument('ad app', 'homepage', help='the url where users can sign in and use your app.') register_cli_argument('ad app', 'identifier', options_list=('--id',), help='identifier uri, application id, or object id') register_cli_argument('ad app', 'identifier_uris', nargs='+', help='space separated unique URIs that Azure AD can use for this app.') @@ -47,6 +48,15 @@ register_cli_argument('ad', 'query_filter', options_list=('--filter',), help='OD register_cli_argument('ad user', 'mail_nickname', help='mail alias. Defaults to user principal name') register_cli_argument('ad user', 'force_change_password_next_login', action='store_true') +group_help_msg = "group's object id or display name(prefix also works if there is a unique match)" +for arg in VARIANT_GROUP_ID_ARGS: + register_cli_argument('ad group', arg, options_list=('--group', '-g'), validator=validate_group, help=group_help_msg) + +register_cli_argument('ad group get-member-groups', 'security_enabled_only', action='store_true', default=False, required=False) +member_id_help_msg = 'The object ID of the contact, group, user, or service principal' +register_cli_argument('ad group member add', 'url', options_list='--member-id', validator=validate_member_id, help=member_id_help_msg) +register_cli_argument('ad group member', 'member_object_id', options_list='--member-id', help=member_id_help_msg) + register_cli_argument('role', 'scope', help='scope at which the role assignment or definition applies to, e.g., /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333, /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup, or /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM') register_cli_argument('role assignment', 'role_assignment_name', options_list=('--name', '-n')) register_cli_argument('role assignment', 'role', help='role name or id', completer=get_role_definition_name_completion_list) diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_validators.py b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_validators.py new file mode 100644 index 000000000..e88fb273b --- /dev/null +++ b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_validators.py @@ -0,0 +1,44 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import uuid +from azure.cli.core.util import CLIError +from ._client_factory import _graph_client_factory + +VARIANT_GROUP_ID_ARGS = ['object_id', 'group_id', 'group_object_id'] + + +def validate_group(namespace): + # For AD auto-commands, here we resolve logic names to object ids needed by SDK methods + attr, value = next(((x, getattr(namespace, x)) for x in VARIANT_GROUP_ID_ARGS + if hasattr(namespace, x))) + try: + uuid.UUID(value) + except ValueError: + client = _graph_client_factory() + sub_filters = [] + sub_filters.append("startswith(displayName,'{}')".format(value)) + sub_filters.append("displayName eq '{}'".format(value)) + result = list(client.groups.list(filter=' or '.join(sub_filters))) + count = len(result) + if count == 1: + setattr(namespace, attr, result[0].object_id) + elif count == 0: + raise CLIError("No group matches the name of '{}'".format(value)) + else: + raise CLIError("More than one groups match the name of '{}'".format(value)) + + +def validate_member_id(namespace): + from azure.cli.core._profile import Profile, CLOUD + try: + uuid.UUID(namespace.url) + profile = Profile() + _, _, tenant_id = profile.get_login_credentials() + graph_url = CLOUD.endpoints.active_directory_graph_resource_id + namespace.url = '{}{}/directoryObjects/{}'.format(graph_url, tenant_id, + namespace.url) + except ValueError: + pass # let it go, invalid values will be caught by server anyway diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/commands.py b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/commands.py index 3a490dfef..86a2a689b 100644 --- a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/commands.py +++ b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/commands.py @@ -105,12 +105,23 @@ cli_command(__name__, 'ad user list', 'azure.cli.command_modules.role.custom#lis cli_command(__name__, 'ad user create', 'azure.cli.command_modules.role.custom#create_user', get_graph_client_users) -cli_command(__name__, 'ad group delete', - 'azure.graphrbac.operations.groups_operations#GroupsOperations.delete', - get_graph_client_groups) -cli_command(__name__, 'ad group show', - 'azure.graphrbac.operations.groups_operations#GroupsOperations.get', - get_graph_client_groups, +group_path = 'azure.graphrbac.operations.groups_operations#GroupsOperations.{}' +cli_command(__name__, 'ad group create', group_path.format('create'), get_graph_client_groups) +cli_command(__name__, 'ad group delete', group_path.format('delete'), get_graph_client_groups) +cli_command(__name__, 'ad group show', group_path.format('get'), get_graph_client_groups, exception_handler=empty_on_404) -cli_command(__name__, 'ad group list', 'azure.cli.command_modules.role.custom#list_groups', +cli_command(__name__, 'ad group list', + 'azure.cli.command_modules.role.custom#list_groups', + get_graph_client_groups) + +cli_command(__name__, 'ad group get-member-groups', group_path.format('get_member_groups'), + get_graph_client_groups) + +cli_command(__name__, 'ad group member list', group_path.format('get_group_members'), + get_graph_client_groups) +cli_command(__name__, 'ad group member add', group_path.format('add_member'), + get_graph_client_groups) +cli_command(__name__, 'ad group member remove', group_path.format('remove_member'), + get_graph_client_groups) +cli_command(__name__, 'ad group member check', group_path.format('is_member_of'), get_graph_client_groups) diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/custom.py b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/custom.py index 4ccf4d0c8..5d22e92e2 100644 --- a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/custom.py +++ b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/custom.py @@ -357,12 +357,14 @@ create_user.__doc__ = UserCreateParameters.__doc__ def list_groups(client, display_name=None, query_filter=None): + ''' + list groups in the directory + ''' sub_filters = [] if query_filter: sub_filters.append(query_filter) if display_name: sub_filters.append("startswith(displayName,'{}')".format(display_name)) - return client.list(filter=(' and ').join(sub_filters))
RBAC: support AD group commands 1. Author commands under `az ad group`, to be in parity with xplat's 2. On `group list`, add `--display-name` filtering 3. support group name when resolve `--assignee' on role creation
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-role/tests/recordings/test_graph_group_scenario.yaml b/src/command_modules/azure-cli-role/tests/recordings/test_graph_group_scenario.yaml new file mode 100644 index 000000000..325267215 --- /dev/null +++ b/src/command_modules/azure-cli-role/tests/recordings/test_graph_group_scenario.yaml @@ -0,0 +1,1048 @@ +interactions: +- request: + body: '{"passwordProfile": {"forceChangePasswordNextLogin": false, "password": + "Test1234!!"}, "accountEnabled": true, "userPrincipalName": "deleteme1@AzureSDKTeam.onmicrosoft.com", + "mailNickname": "deleteme1", "displayName": "deleteme1"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad user create] + Connection: [keep-alive] + Content-Length: ['230'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/users?api-version=1.6 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.User/@Element","odata.type":"Microsoft.DirectoryServices.User","objectType":"User","objectId":"41109d4c-94f8-4308-a702-0a6f541d16a4","deletionTimestamp":null,"accountEnabled":true,"signInNames":[],"assignedLicenses":[],"assignedPlans":[],"city":null,"companyName":null,"country":null,"creationType":null,"department":null,"dirSyncEnabled":null,"displayName":"deleteme1","facsimileTelephoneNumber":null,"givenName":null,"immutableId":null,"isCompromised":null,"jobTitle":null,"lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme1","mobile":null,"onPremisesSecurityIdentifier":null,"otherMails":[],"passwordPolicies":null,"passwordProfile":null,"physicalDeliveryOfficeName":null,"postalCode":null,"preferredLanguage":null,"provisionedPlans":[],"provisioningErrors":[],"proxyAddresses":[],"refreshTokensValidFromDateTime":"2017-04-21T02:34:51.7535386Z","showInAddressList":null,"sipProxyAddress":null,"state":null,"streetAddress":null,"surname":null,"telephoneNumber":null,"usageLocation":null,"userPrincipalName":"deleteme1@AzureSDKTeam.onmicrosoft.com","userType":"Member"}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['1216'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:50 GMT'] + Duration: ['8671347'] + Expires: ['-1'] + Location: ['https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/directoryObjects/41109d4c-94f8-4308-a702-0a6f541d16a4/Microsoft.DirectoryServices.User'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [WJ9iNj7ky7Q0raKkGm6593SGt4ZAaZkDQgVPLNeXP0c=] + ocp-aad-session-key: [jpR7XXuX_T1kxSIkqFOB52jihfMTnn9SH4VWMOFXyp0ZNiFqhwsUnGl9wn5W-i3hqVx0J62RXwirgueJgLB7qRY_ZrmB5UZud2phlU0NZcVvhFOgMjFVJThd1KC61mYY5N6N537jdMmLDDe2_RIDEKhMkPKPw-JnPn_nCbLSWnIG-vqlchEdaqCdFEvyQgkdP4yedcwRXuAbmqp4jujqfQ.M32PAKgiR6c_upGTEedeqJUTCKT98l29GfNeezk8wW4] + request-id: [42b9d2f6-90dc-456e-aff0-1711d90eeaed] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 201, message: Created} +- request: + body: '{"passwordProfile": {"forceChangePasswordNextLogin": false, "password": + "Test1234!!"}, "accountEnabled": true, "userPrincipalName": "deleteme2@AzureSDKTeam.onmicrosoft.com", + "mailNickname": "deleteme2", "displayName": "deleteme2"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad user create] + Connection: [keep-alive] + Content-Length: ['230'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/users?api-version=1.6 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.User/@Element","odata.type":"Microsoft.DirectoryServices.User","objectType":"User","objectId":"649c0cdc-2f45-4f78-b1d9-f555756dedba","deletionTimestamp":null,"accountEnabled":true,"signInNames":[],"assignedLicenses":[],"assignedPlans":[],"city":null,"companyName":null,"country":null,"creationType":null,"department":null,"dirSyncEnabled":null,"displayName":"deleteme2","facsimileTelephoneNumber":null,"givenName":null,"immutableId":null,"isCompromised":null,"jobTitle":null,"lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme2","mobile":null,"onPremisesSecurityIdentifier":null,"otherMails":[],"passwordPolicies":null,"passwordProfile":null,"physicalDeliveryOfficeName":null,"postalCode":null,"preferredLanguage":null,"provisionedPlans":[],"provisioningErrors":[],"proxyAddresses":[],"refreshTokensValidFromDateTime":"2017-04-21T02:34:52.5000485Z","showInAddressList":null,"sipProxyAddress":null,"state":null,"streetAddress":null,"surname":null,"telephoneNumber":null,"usageLocation":null,"userPrincipalName":"deleteme2@AzureSDKTeam.onmicrosoft.com","userType":"Member"}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['1216'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:53 GMT'] + Duration: ['8892284'] + Expires: ['-1'] + Location: ['https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/directoryObjects/649c0cdc-2f45-4f78-b1d9-f555756dedba/Microsoft.DirectoryServices.User'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [u3zz2DALsiEmtzDI1/lFfQ0UcLsw4WkTvQJPQAl1nu0=] + ocp-aad-session-key: [f0dEeZJswiKEs92Lt9GL5-gLCN0jfABXm0H0UrGYDbLoIs1s9Unws4ropIkTTPi1k8dbWjdcn2f-K9WkvLjsuiFwqtDyqYVBbABZYoGcs0cQ7Xo2h-kCKGjn13kbIfLLbcMs_RfGHsGewZ2cVvBZ1KbjcBKlfr4nEbWcfcM27tL7-EIP1vD_02lCmR0TZzQbtp0VFMdz83xs741c15862w.60JMcr9O_9PccmmONTfbG1v4nt-abfjZE6V41dTdMHM] + request-id: [707086d5-fa4b-4c2a-bf73-e294b49af987] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 201, message: Created} +- request: + body: '{"securityEnabled": true, "mailEnabled": false, "mailNickname": "deleteme_g", + "displayName": "deleteme_g"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group create] + Connection: [keep-alive] + Content-Length: ['106'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group/@Element","odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['552'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:53 GMT'] + Duration: ['2380019'] + Expires: ['-1'] + Location: ['https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/directoryObjects/b511b706-141f-48e5-a700-7015860dbb04/Microsoft.DirectoryServices.Group'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [NQzzohdyto5u0aXRdIyWmvWAgmuTAftnKRMh6cwShWo=] + ocp-aad-session-key: [GJRbngTR61d56iJMPzyG31LFKOekl2lCiAF_4guv3uTEJM0pTp1IYSXej2vgjzZSZr_wc_QSSG2GjGPcvHSz6PHgpFZmyQKBORagTwJf6Sgnb5Cjq1ARhihaDfMoLp2Nwp3UKTdz4UmNlo48Act_66uoyRctddJV4xDNfX-_ib-u3psokOIAHlwOJaPCtt1a9lQZz3vYDNalIBgj2PgYlA.oysqr2-y3Dlx0zLdT6uZXhz1yUSnwGH8jKUIgr_3Exg] + request-id: [d7b18b60-8e95-4124-a278-e11110db1fdb] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group member add] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['555'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:53 GMT'] + Duration: ['613565'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [4GoW7S4gK6ZADtJZ7anfPxmmIML2y1bLgHB/c5EmhGY=] + ocp-aad-session-key: [lVsL2ZNIVd6_koFCuZYBVypsOnwVi5RhktUhdU4EOGiAAogYhHtSeHArVlX-7J8V10S0K9VoDpn6J5ea_hgJcPbIjRBnF4jV6D5ignl8wpDUtDNricnghCITwDfGvtKDnbVhp_QlOmzpYEmTp89GzRvC6Hbt3qTqOk8GCCLG8qLC7dQhBO3UhtB8muEE4Zmu1__yXL1MO2LmRryH1XCw8A.nhxhzPCkXl7HVSP-Pg4r1wzJz42LCmtEjBeRUPQMxkE] + request-id: [649d075d-95f3-45d8-a462-91d4057163ea] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: '{"url": "https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/directoryObjects/41109d4c-94f8-4308-a702-0a6f541d16a4"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group member add] + Connection: [keep-alive] + Content-Length: ['127'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups/b511b706-141f-48e5-a700-7015860dbb04/$links/members?api-version=1.6 + response: + body: {string: ''} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + DataServiceVersion: [1.0;] + Date: ['Fri, 21 Apr 2017 02:34:53 GMT'] + Duration: ['1463966'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [p2VNFLoaL7S6Sl7mYZqZdKbM00cEf5mOy6vYy8NtAMg=] + ocp-aad-session-key: [Mc2Rjck_-jBXj-Da58jstd6v38mDi8GHdb2HNhm0rmJVN4CnooTHUAOMHHzq-fnbQ6URRFeYUV7EUwhf4nkA4SiNG4SWiwU8APAhVn8jrJs_xUXrjvo1Z1gu3Xnv0YWX0rTpX3eeV4WhXYbJWg2cYChAzF3ebXuW8YbR5tNl59MAKKM9w5ROdxY7s9BTm4UdJOQ7aWIr3H007p_RZaly7Q.WeG2JMDgIMMM0KjLnGgvWRoJz3GGEcTU-iOiCtPgYcU] + request-id: [691a8ac3-715c-4eb1-9d64-993356b5ac53] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 204, message: No Content} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group member add] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['555'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:51 GMT'] + Duration: ['633708'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [TJ/xKag4M2mTYYn3oFmzro7Z2/Yt3ZkfYZ6omhAf2Kg=] + ocp-aad-session-key: [tgzoU9JUnwbYTWQcIfGbFU9A5W7_pdTcN0MBB9GgzZuOJh7dQmg5gx7ACvLmuf5YX96wBimFsnGbYtimx3Ue8KEOK6sCqxOqjn_c2ftwkiNKYhY2sqkV17KEou3pL0GJtiIRJwIWjdBS65lflkOVW1C6eRFPm-8ga8R7ufl1zYkMCeTXhPesVuQwQ4Qrg08XJ3g6tmeN82T6hgg3tA7VFA.QOc5DkKbo5rfi87-6n1xJSgJ_TOkNRnKZXh3b2Vebsc] + request-id: [e7ce4ca2-f289-431d-9489-f972e8c2b93c] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: '{"url": "https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/directoryObjects/649c0cdc-2f45-4f78-b1d9-f555756dedba"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group member add] + Connection: [keep-alive] + Content-Length: ['127'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups/b511b706-141f-48e5-a700-7015860dbb04/$links/members?api-version=1.6 + response: + body: {string: ''} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + DataServiceVersion: [1.0;] + Date: ['Fri, 21 Apr 2017 02:34:55 GMT'] + Duration: ['2588595'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [O47BPeqbxW4dIh1dbaaiyT5Lss9ZWY0UVhN/+FnW4PY=] + ocp-aad-session-key: [KgIPVZbeF1-PL2sO3Kq1GECy_eOyO76-rtcBT5GQPHLLl7N1ZokI5rqNitIKraWaBreIZ3jXYLgzlHMUQNMtwzrndGu-_uhPi5S9ZfS4Fs8yv2OcXMz2j_pFKMbDtFI9E0vGk4Sr9yAbKBOJnTgGak-yRYYo8UFB7TId3itnKuZWXEyTJq4L6UciG-kb8eyP_u1enjZivXzDqcCVVGY8cg.r_TJVu8lMP-4xXIuuhve7oo8HbA-AHdX7kHcI6zklY4] + request-id: [f7c039e8-5f75-4478-8606-dc0997ef1780] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 204, message: No Content} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['555'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:52 GMT'] + Duration: ['967824'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [cze88VSQ6HNztT9BK1BBqepYViZ+GvMC7osQIs0Tj5w=] + ocp-aad-session-key: [-5j5Ahwc7IMTKpWeF-kh3_QD14JFDesEmh8WUaXsIe5DPRG0PLSt_hO9LNUVYwOruRczAEPAbYxyb6u1A660EkqUCguZnZ80Dr4BMjyCZX7W0I3oK9kg8X0_KQMBLo7fP0vOZfLt0Mb1WTU9nM4atfC0fpO0sDzZUiXssuMWO0RD0BOxK1gWtd_pszIHl9CRKaPqHVQ05EFKP62TVDXveg.iJ8127LwB9Up_Urrj0xvV-NV7k3u0wZDDSvuuRd36Rc] + request-id: [0afe37e2-23a2-426d-844b-3f514ecd2a71] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups/b511b706-141f-48e5-a700-7015860dbb04?api-version=1.6 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group/@Element","odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['552'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:53 GMT'] + Duration: ['532282'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [bKebP66qgjbXsGkb8RKjEOK0Di4Z+mUFNK2uc4Kp3R8=] + ocp-aad-session-key: [DKS6X08Gzb4T4ohSw7NjrENjB-mLnbMLkOko1uC7zV5c7m2iakb2NG-ShAfDb-E1Rr-DwCq2FxxbowwD6Wwdr_TpzYWtJgULrB_ubgyAYbVkczf3Ycia8L0WyxKMXjk1HH3MbXXgZguiRXa6xSeVZcKS5_3UQE45TmCtVtNp9UzxMGBndJqmoDLrD429ppoJhlfA6jDJ1ok_dvSLgrWtoQ.Igsp3oo_oqgVSiCn5TWYqSXIghR4S2l2ghfvtMiaKQM] + request-id: [ef46cf12-ae59-4187-8170-eca9b76a29d9] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups/b511b706-141f-48e5-a700-7015860dbb04?api-version=1.6 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group/@Element","odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['552'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:56 GMT'] + Duration: ['591932'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [GWBF+FqKrwi9lJ0Nz2UosGLK6d7IORKv9drCwOzHa0Q=] + ocp-aad-session-key: [YDIS_R4fAoyGIX0WhWxYFw1FDWyLY1HsyiMA3x6aTFyMyvnE637IV3Lz7H8clHb12vOw01PBH-sOscshSTjL11HPmJIDlwOcvBuRtOXvuZSWUyp4V8_jO4VdTIuK5zbjThFZS15oAV2ujYB_ND36x2GP4NkAmz6BeE8nVhwyPh15XqqbwVVgOjcKwRvcTV1QqkKezvHgqKy1DLkMbw2D_g.WHyFdJ3G1HsN6XQ9FsTfBpbcbd1q_QgBaLtqFYBIFug] + request-id: [0da9d692-6a81-469d-8202-ccb68bf23e9f] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['555'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:54 GMT'] + Duration: ['636208'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [nG3hKVoq5XXuUdcuvSQIIaqQRGfFv8ulezCBqMPQCRQ=] + ocp-aad-session-key: [_hasrBAPYrcMyTqk7-JKvJ4RF_E-Q_0dnzcSp-N7p0WApD5pO_i0HzI0DCGesNwEcHm4k6o5g6n6uKj8xSDMCk7FnzOfWFt5CJlkdWphgf_AD2STxTEuyHFoLw9RTjN_zmklZHDhiMKtRDl1eMKUzMHgGucn0yh5jV1qpoYA3qeSjWVkPcm2tinQG3OLMk5XXEugvwGrczZfee0XgUDvOQ.pCR1otnzCj8LPTz0-pOtvCKF9lU7DmNKmNUOjR_kUsk] + request-id: [fb2902c6-d7b6-43be-86e5-f5c308ed2a07] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group get-member-groups] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['555'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:55 GMT'] + Duration: ['602504'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [xU4JSRnBDDuUT0qZaU7x6kfvEIokIxo5omNgFl2G0G4=] + ocp-aad-session-key: [OTQMxLHuUsIgc3ZFQJfpfavOnhw_OX1uMKuj3-9lXQgemAd6Tl_qVYvMxqJd1eOK5BiMQqfpqktUM4hlumWo_1oEF1PiA_X0EGhEkiq1Wos7YLfDDtLhSGyJq8FtaltULVlTfSmnGD2Y56-KxCvrL5NenemOd5zCAJpt3QIWu4xJtUAcEXF3O4CkAGEXQNY6FqEIHnAAcY1LQgtp7YgAaA.Hk_VuLh7XR6rRAn66nmruKCFAtxoaCI04ld9oeZ1uzI] + request-id: [d6450c5b-c7ee-4a5a-96bb-5f2156e9ebfd] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: '{"securityEnabledOnly": false}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group get-member-groups] + Connection: [keep-alive] + Content-Length: ['30'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups/b511b706-141f-48e5-a700-7015860dbb04/getMemberGroups?api-version=1.6 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#Collection(Edm.String)","value":[]}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['127'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:57 GMT'] + Duration: ['860475'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [2mzsumD7v4laEobzcd1BLO71t/RyrMmpEcVHR0ySBgI=] + ocp-aad-session-key: [CSlAkP3jSRRDYfT6gT36QzmwtPMLYLL1LgowcGHVZ4RFpymPbEI9Qd2HGpjuLrTZ2HC0iHL4vF1nYL_5CX_4ucK_wR8wobcCom93gvO9vH_qbu46h7sUSJoqtyPc7l0prau_VRTMenswmCWPnwpmHfcxzLeE5MkRZAjwWFFT1wozXKZRe90LJgkpfhCdWvdf95CbQZyIlkVZsKHc7WKgpw.KohCAEDmIrkgl533DVtAMiM36kmniAQPMrN5_Q5eupg] + request-id: [59972335-0452-498f-aac4-1e884a21f767] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group member check] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['555'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:55 GMT'] + Duration: ['669783'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [v4ImhedTSMLcBqRGrUg4p+YYyJPNNYsWlqCUOR8+Elg=] + ocp-aad-session-key: [fKytxFLzaKADa9Bj5TrZUEHhLwxnse5FP-NjTz6VUot1t9uEEqCAeNB5WzLnJGg9M8suutqxkx9Xdpd8BcZn0gTwo2W0Zv5NAdOdW-jWTYUuq6NShKhVkMocF4_ympjuMl91J8bwd71aVZcgy3bYlXOD-exyOqD0EgjiNr49dsBmsfcGXmfnDdtJP5Z3VSdkpt9EerqPWIGNoANAMk9q6A.CoXW9B-GDT0SMGocGBhmNouBV5eNzZYlIzuOz4N_jpg] + request-id: [209df732-f113-4a39-8949-953eefadd24e] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: '{"groupId": "b511b706-141f-48e5-a700-7015860dbb04", "memberId": "41109d4c-94f8-4308-a702-0a6f541d16a4"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group member check] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/isMemberOf?api-version=1.6 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#Edm.Boolean","value":true}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['118'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:54 GMT'] + Duration: ['810984'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [0lQ4vCmckKCyRLoL4AoEX4aKPw4qTo7BdYx2Pv/0osg=] + ocp-aad-session-key: [_JpCop26AtTqhzRT-f7kL870Cu-5buOlVaE8K2g8_Rd2jWW0iNt7stu5Iks2HBZngb442bG8iY0qXd-_L7GP-Uskag_kslAHZ9_AjfhxTZN7Sf3jECQVY0-ptyTGtzuH8Kwn8eSXNlXYujbMzaGY-SDGsKe6PAcvqdRCAvIMdPTY_JbiA8zMoLC8W38mru5qJZL3UZzx7KkMtA_v4GHAAg.dqfTW22-j6WG-x5hDsmTEDe4GivwGJnEQbTtwrRvWxA] + request-id: [2e0c0686-9861-4efd-b05a-117df3c4b83c] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group member check] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['555'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:57 GMT'] + Duration: ['657067'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [pl1kFb+g22xnnvGQgyu9q8Kv53mcwJTK0gXSbnmQHzY=] + ocp-aad-session-key: [D_nZv7BCyyH6hlTvgKbDTE9IazhxY-nkG1TuujzN3aIMX7Bd3iDvXMexnWqfxoqTZ-L-B80C5RPPCzHumjjdt0Pfc_g_dqyS_w-i6-kou6l74Zcf8URH_MldqFcP5qbxAm4HqVfDQnCeGX69Fmu2y02B7X37AZX-d-xoPPriC-CRq_6Q_of5IXQ016ZxTN_WWJbjw60cVV-nSaT7kkExew.EwnlKxADC8uYpvoJLAyjx2X5ah-tUT3CvsXDLLb3urU] + request-id: [ad92ec24-7416-4f12-8ddb-904ba9b727c2] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: '{"groupId": "b511b706-141f-48e5-a700-7015860dbb04", "memberId": "649c0cdc-2f45-4f78-b1d9-f555756dedba"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group member check] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/isMemberOf?api-version=1.6 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#Edm.Boolean","value":true}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['118'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:58 GMT'] + Duration: ['1363446'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [zBnO1zgN2HN/dAMzOnN35k2SLefJt7CbCenk7Vv7NR0=] + ocp-aad-session-key: [-TiuX6eJNiZR5sLdWaZrYhs1vdOlVQPbB7WGntmO-Ih8Sy-tgqZ231YAiFWoQ2vCeYr1pq3B5UGCuGhedAGVmCQOQqBTBRwP2TQklHXsYpMykYL5MkRcOhAe_hoYiwaFbCUt-3nRBTIgPl2Kr_fPelty82eT09gMO62-wEWE6kGZRqTLH_pC0xkLsLX547Kz12pSvACjjpIeCwyntegALw.Jg6m9-Tptl_sHwTs-qSTZjYkowuz5wne44awV_BfMv8] + request-id: [b0e3ec2f-6e1d-4a01-94af-fc1f3631f9e1] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group member list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['555'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:56 GMT'] + Duration: ['503530'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [WJ9iNj7ky7Q0raKkGm6593SGt4ZAaZkDQgVPLNeXP0c=] + ocp-aad-session-key: [s4MzuxF7PdUctiURqSCyFM4YarHwm4Xu5NDwpXdGD5My5mOBj_10DJCTTiy9AoPB4yK-XLVblTzodQjoUCNqRrGmN7kWzDaBABnY07YXqM4yos8WfnagpjNKUOFwojko2DKzCRyozLN7zkI83OPUW0gpumTT756eA3CWeg9uzLPg1rDaDSEKfqWZQDZSnqHBpKTvuElFgi_zI9mZfjSqSQ.r6CVQarU5-XzxmQNj--scdG-3Js9D3MbCZE_kJmbriE] + request-id: [231fc766-9c95-4a42-a7af-5f3d513f9b4c] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group member list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups/b511b706-141f-48e5-a700-7015860dbb04/members?api-version=1.6 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.User","objectType":"User","objectId":"41109d4c-94f8-4308-a702-0a6f541d16a4","deletionTimestamp":null,"accountEnabled":true,"signInNames":[],"assignedLicenses":[],"assignedPlans":[],"city":null,"companyName":null,"country":null,"creationType":null,"department":null,"dirSyncEnabled":null,"displayName":"deleteme1","facsimileTelephoneNumber":null,"givenName":null,"immutableId":null,"isCompromised":null,"jobTitle":null,"lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme1","mobile":null,"onPremisesSecurityIdentifier":null,"otherMails":[],"passwordPolicies":null,"passwordProfile":null,"physicalDeliveryOfficeName":null,"postalCode":null,"preferredLanguage":null,"provisionedPlans":[],"provisioningErrors":[],"proxyAddresses":[],"refreshTokensValidFromDateTime":"2017-04-21T02:34:51Z","showInAddressList":null,"sipProxyAddress":null,"state":null,"streetAddress":null,"surname":null,"telephoneNumber":null,"usageLocation":null,"userPrincipalName":"deleteme1@AzureSDKTeam.onmicrosoft.com","userType":"Member"},{"odata.type":"Microsoft.DirectoryServices.User","objectType":"User","objectId":"649c0cdc-2f45-4f78-b1d9-f555756dedba","deletionTimestamp":null,"accountEnabled":true,"signInNames":[],"assignedLicenses":[],"assignedPlans":[],"city":null,"companyName":null,"country":null,"creationType":null,"department":null,"dirSyncEnabled":null,"displayName":"deleteme2","facsimileTelephoneNumber":null,"givenName":null,"immutableId":null,"isCompromised":null,"jobTitle":null,"lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme2","mobile":null,"onPremisesSecurityIdentifier":null,"otherMails":[],"passwordPolicies":null,"passwordProfile":null,"physicalDeliveryOfficeName":null,"postalCode":null,"preferredLanguage":null,"provisionedPlans":[],"provisioningErrors":[],"proxyAddresses":[],"refreshTokensValidFromDateTime":"2017-04-21T02:34:52Z","showInAddressList":null,"sipProxyAddress":null,"state":null,"streetAddress":null,"surname":null,"telephoneNumber":null,"usageLocation":null,"userPrincipalName":"deleteme2@AzureSDKTeam.onmicrosoft.com","userType":"Member"}]}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['2236'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:58 GMT'] + Duration: ['830347'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [JI7Ca0Wtacsn3e2Y1FRjFO8qh6f3DNYttzXsIANsgIA=] + ocp-aad-session-key: [MyKWg_I_7XGy3aU0fv7IykF3JWU1LUc76ZrFlJDEvtngI9fjM9DxLbid04bmhYoZBAvaqjFJaKjxrlGFcS0NelPbaxVPvznRSXuK7NcWM-IkpLYC8luNgPfTljTa1pp5k5HiAqVf92DeIoUa_wymsCnUzIxUiKghvZEatWPw9MJBgHQ-lnZabqBHu1w0txkA3UJqmExlJDkBg0TQmZWS2Q.gpY5bTlXcwfHZilpCGbJQz-Ylxl0IhfTIxagx5dUeqg] + request-id: [f4acfc1e-6b2f-4a79-a502-03cd8f5801d2] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group member remove] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['555'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:56 GMT'] + Duration: ['506900'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [O47BPeqbxW4dIh1dbaaiyT5Lss9ZWY0UVhN/+FnW4PY=] + ocp-aad-session-key: [z3lSHGlTSyWGBXraRiHc-kHSCzKy0CuH27o-v5Pwjd4NwNooZ8I_jmixBVTiX7R6x8sS0E9PL-ob1hIfN18dGzZestDbSPnaCmKn_4yjDCXWf_dh9_KfzB4OeIKyFiCwr5NcQU_FdngQuzO8rIgAaj5LK_KVRtwkeYMBlL-2EQxL1iDyGC7bF4t0rFxg-NVW_Y2i9mf-lPcJaLLprYsp1g.zOxy-ZzKq9pq0K03tQs5zxP8SKJy7WhxY8OkRrXu8bE] + request-id: [f1df41ee-cd2b-47c2-a7a4-26ab3d4ea6ce] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group member remove] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: DELETE + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups/b511b706-141f-48e5-a700-7015860dbb04/$links/members/41109d4c-94f8-4308-a702-0a6f541d16a4?api-version=1.6 + response: + body: {string: ''} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + DataServiceVersion: [1.0;] + Date: ['Fri, 21 Apr 2017 02:34:56 GMT'] + Duration: ['2264001'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [Gn/SyFs1dI76n3DdqL7J62Lgmc/wMbIjPyRQ+vCls0k=] + ocp-aad-session-key: [isZqfNhyBGpSID-iupVpM_ceSzx5HasaP6wT7cUFjc3dCRd5lXE7q6NOyFu3X6TdoL46o3pCXbouBhVkFww7EuyeivddBZrlDoW8157LvM5fc3EgDsbWa1fJien5MrYKog38AmLG-vKsiBShDkYm7bY2wX1dM053D7EldRlq23ogZyWLuTufr1AwWqw6IwAfVHCTmSyYdiDqcM2EaHp7uA.MdO06y-NG9KQaVpO4ZZQx5UZErNAGqsaIheOrl2WkK8] + request-id: [c95e201a-2ef2-4d3e-8c4c-289d67778d25] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 204, message: No Content} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group member check] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['555'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:56 GMT'] + Duration: ['902544'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [JI7Ca0Wtacsn3e2Y1FRjFO8qh6f3DNYttzXsIANsgIA=] + ocp-aad-session-key: [Ixi9Zw0nnJ_cLexDXVKMMyDHI12GEB7Bqe6jHvOJto-z3SrIRxrBmmL2C2e7Ei0JYvrKblOJQyxcEM10Ko6Tux1bJizCcnOgaGfbwoUArfpn4L5i5npLxYycpIvC9ccou4aZwEGBgTGrpU6ikpTtq7EHnwZuauUIhOWgw5YxKsoF8h_ALWrwV78X5jLy_XG_96DnNf_Tf2-YUm-TkXWXMw.ZWBUBsEQ0fvQGQLF_nUNzojvb7Ipzl_tmXCmDH0npWQ] + request-id: [23dc0b65-1128-421b-8e22-115ac2a482fd] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: '{"groupId": "b511b706-141f-48e5-a700-7015860dbb04", "memberId": "41109d4c-94f8-4308-a702-0a6f541d16a4"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group member check] + Connection: [keep-alive] + Content-Length: ['103'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/isMemberOf?api-version=1.6 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#Edm.Boolean","value":false}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['119'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:58 GMT'] + Duration: ['930994'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [iyH1L5ZSeWH83EP1icIOAwr148oY/OGtb+Pw+quNhWk=] + ocp-aad-session-key: [saU0G3jLDN3q38j_e89BHbOJSXIG3CVkdt7Wzj52cGrFX_KKTJv3sCwz_bDEdZnCi76bYCIGqFaM6ruj-zlJSp67G3nr1qJ-4_vOdVvtj6Mz3rE9v5MF61aRVPLevQCXCER_cCG_-9geT4yiKlsZ0SzyEgwC3PnnTIm30HJHoNYXoqTTyVm2ak-m_JdxzufWwOvB37r7dSN5Eknri5Z9Jg.uOFMAEkCGQ8MG7fjBTzaDP_d32TUwjLPLSYErDY4x00] + request-id: [00e0dbe2-a8d1-46d0-b626-d3dfedcf2ec1] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group delete] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter=startswith%28displayName%2C%27deleteme_g%27%29%20or%20displayName%20eq%20%27deleteme_g%27 + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"b511b706-141f-48e5-a700-7015860dbb04","deletionTimestamp":null,"description":null,"dirSyncEnabled":null,"displayName":"deleteme_g","lastDirSyncTime":null,"mail":null,"mailNickname":"deleteme_g","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['555'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:59 GMT'] + Duration: ['534658'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [JI7Ca0Wtacsn3e2Y1FRjFO8qh6f3DNYttzXsIANsgIA=] + ocp-aad-session-key: [LLv91GFqIBDylaY8nCzsIu6ncyPFpFrDgwSG5WbQ6uaZziEtmR7JQCx7IHENvL0dC2pinnGg_rj3OpLKlW0HwIFosf_3nAVT83SjKP6HVF84kO2ggLil7PUMAgOr6QhVLuWxxzuqzmT_IeHnROOHR4HvuF7sw4fGyktpP-pGW3SKpHzjRmHdX1ot2Lv9Y35VQ9hVAwYKMzVMr2msGZ2SFw.Wzrkhf5M2eSmF3zPf8n-dtwLe1x9hXpSmHJRqSJt4p4] + request-id: [1eb02221-6565-4bd8-9e69-8260b570f66f] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: DELETE + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups/b511b706-141f-48e5-a700-7015860dbb04?api-version=1.6 + response: + body: {string: ''} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + DataServiceVersion: [1.0;] + Date: ['Fri, 21 Apr 2017 02:34:59 GMT'] + Duration: ['1432029'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [kuyxkXWpuMdFkyXupIcvORPNJ/cSc7C7Qv+yP0H/SL8=] + ocp-aad-session-key: [5r2cXJ4JlXL82zHO6N1eHSUTyf3gOowRwmmNcHP6io1291uQMjaFaSsBWVfvY04uFFhEqScMhiNyWuhF8DSty1LbfZulags2SjweEr93IPhdd2osXW5VF1gQEKruYOdwCLfyEI4RMk-CgkmgFAep4ED7FQI1CT-etHGenE2rawllPxncHXpunP3DvbMsSUys7dAyWaVFDChC9FfxQNzDew.c1-LftJXGu5ega3zTPx8GcZab8-viwiyOdm0nsBqKl0] + request-id: [a0a2c6e8-50d0-4950-b862-709348956edf] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 204, message: No Content} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad group list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/groups?api-version=1.6&$filter= + response: + body: {string: '{"odata.metadata":"https://graph.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/$metadata#directoryObjects/Microsoft.DirectoryServices.Group","value":[{"odata.type":"Microsoft.DirectoryServices.Group","objectType":"Group","objectId":"d758a069-52cc-47f6-bc00-961cea17be39","deletionTimestamp":null,"description":"for + bug investigation and will delete ","dirSyncEnabled":null,"displayName":"yugangwTestGroup","lastDirSyncTime":null,"mail":null,"mailNickname":"fb7f38a2-3b88-49a7-b890-71105a0091b7","mailEnabled":false,"onPremisesSecurityIdentifier":null,"provisioningErrors":[],"proxyAddresses":[],"securityEnabled":true}]}'} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + Content-Length: ['623'] + Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] + DataServiceVersion: [3.0;] + Date: ['Fri, 21 Apr 2017 02:34:59 GMT'] + Duration: ['648611'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [u3zz2DALsiEmtzDI1/lFfQ0UcLsw4WkTvQJPQAl1nu0=] + ocp-aad-session-key: [gdefyo02rjZpQ4alGN3LlhbqHuofuYFfbrWf8_HmgDE1RAsyLPD9__rN2qS7S7pnyeDJpd34iBfACME1vnWmEs8V3I7vNh5CiQcoy6VOIKwWfXLy7uFM_3H_w8A6f3hxqbuymCeTN0-4vP9b1SizZTrj9u3qYyPvznP2mGgSCO98zHyQLWPUG0t9fhxJlWb8pUHB7b0fNXxwjHDAAFnNxw.I9mpazRb1lY7F7iXf1Dn36KhFfZm-SNSVZu2NrR_DU8] + request-id: [a38f7538-9554-4955-bfb7-be38e1fcc9e9] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad user delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: DELETE + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/users/41109d4c-94f8-4308-a702-0a6f541d16a4?api-version=1.6 + response: + body: {string: ''} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + DataServiceVersion: [1.0;] + Date: ['Fri, 21 Apr 2017 02:35:01 GMT'] + Duration: ['11793485'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [1sP0P7WxKcBID6yc4fbz9MeUVowvkTIjVOQX5YMG/jY=] + ocp-aad-session-key: [JmkBUmhKvkEH-OeCNAXbnL4RSo-pgfrl4ubNDoMR7CaPOU_shaDJPHayz3PX_Gl3DSdPB_ingGSo2F7gb6CP87Il9yNmzvqM6ssWKm1RVSQU8ME4oYn-Qdhs7aXNRADVZVcefIgHUyDXRZDpZLp8YM6sauBkkyIfzcaum7CcjwGdeC6K04NUuwHA1n7HRx3ZKlbDGoDhAkUfRNsdM8_fjQ.mhlltQ0G6fsfwX-hzU4_V88B5c1IX8mwSx4QYhntv18] + request-id: [bd02d713-ee43-4416-b722-12e4385ace1e] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 204, message: No Content} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [ad user delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.14393-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 graphrbacmanagementclient/0.30.0rc6 Azure-SDK-For-Python + AZURECLI/2.0.3+dev] + accept-language: [en-US] + x-ms-client-request-id: [17e413a2-263b-11e7-9185-64510658e3b3] + method: DELETE + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/users/649c0cdc-2f45-4f78-b1d9-f555756dedba?api-version=1.6 + response: + body: {string: ''} + headers: + Access-Control-Allow-Origin: ['*'] + Cache-Control: [no-cache] + DataServiceVersion: [1.0;] + Date: ['Fri, 21 Apr 2017 02:35:02 GMT'] + Duration: ['12149129'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-IIS/8.5] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + X-AspNet-Version: [4.0.30319] + X-Content-Type-Options: [nosniff] + X-Powered-By: [ASP.NET, ASP.NET] + ocp-aad-diagnostics-server-name: [DJl/5bFSkj1cqgm9u7PtSoh9YAGkLAPecUruXCQn6TE=] + ocp-aad-session-key: [njJm2iHZLEr7FCWeEBDNfjLMWjYHetqMGYgkQtXxVNV1MQ8WvEv2k9pcmTeXTng_zRF32wu714hTx3tXrQu6VvrLiLVnD61UKLRgTgLDxB59lSVfw6TiXIDCK32RzuStmWhNz33YkvLtjikdMd7sb3_4WDKff2j_8UsbUvxrz2vsYKg1ldnwhf1JnFqm8RlX1FcSKD_uTIWnbP9k9fIpKg.7J0h-ySRCH2ygywgtd1ktEKsMc4J1dy1wk5adRmYi3I] + request-id: [0c718af5-bcc8-4339-81c2-95653fe7aa58] + x-ms-dirapi-data-contract-version: ['1.6'] + status: {code: 204, message: No Content} +version: 1 diff --git a/src/command_modules/azure-cli-role/tests/test_graph.py b/src/command_modules/azure-cli-role/tests/test_graph.py index ad32ff733..95f3b3655 100644 --- a/src/command_modules/azure-cli-role/tests/test_graph.py +++ b/src/command_modules/azure-cli-role/tests/test_graph.py @@ -2,8 +2,11 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- - +import json from azure.cli.core.test_utils.vcr_test_base import VCRTestBase, JMESPathCheck, NoneCheck +from azure.cli.testsdk import ScenarioTest +from azure.cli.testsdk import JMESPathCheck as JMESPathCheck2 +from azure.cli.testsdk import NoneCheck as NoneCheck2 class ServicePrincipalExpressCreateScenarioTest(VCRTestBase): @@ -85,3 +88,71 @@ class ApplicationSetScenarioTest(VCRTestBase): # delete app self.cmd('ad app delete --id {}'.format(app_id_uri)) self.cmd('ad app list --identifier-uri {}'.format(app_id_uri), checks=NoneCheck()) + + +class GraphGroupScenarioTest(ScenarioTest): + + def test_graph_group_scenario(self): + self.user1 = 'deleteme1' + self.user1 = 'deleteme2' + upn = self.cmd('account show --query "user.name" -o tsv').output + _, domain = upn.split('@', 1) + user1 = 'deleteme1' + user2 = 'deleteme2' + group = 'deleteme_g' + password = 'Test1234!!' + try: + # create user1 + user1_result = json.loads(self.cmd('ad user create --display-name {0} --password {1} --user-principal-name {0}@{2}'.format(user1, password, domain)).output) + # create user2 + user2_result = json.loads(self.cmd('ad user create --display-name {0} --password {1} --user-principal-name {0}@{2}'.format(user2, password, domain)).output) + # create group + group_result = json.loads(self.cmd('ad group create --display-name {0} --mail-nickname {0}'.format(group)).output) + # add user1 into group + self.cmd('ad group member add -g {} --member-id {}'.format(group, user1_result['objectId']), checks=NoneCheck2()) + # add user2 into group + self.cmd('ad group member add -g {} --member-id {}'.format(group, user2_result['objectId']), checks=NoneCheck2()) + # show group + self.cmd('ad group show -g ' + group, checks=[ + JMESPathCheck2('objectId', group_result['objectId']), + JMESPathCheck2('displayName', group) + ]) + self.cmd('ad group show -g ' + group_result['objectId'], checks=[ + JMESPathCheck2('displayName', group) + ]) + # list group + self.cmd('ad group list --display-name ' + group, checks=[ + JMESPathCheck2('[0].displayName', group) + ]) + # show member groups + self.cmd('ad group get-member-groups -g ' + group, checks=[ + JMESPathCheck2('length([])', 0) + ]) + # check user1 memebership + self.cmd('ad group member check -g {} --member-id {}'.format(group, user1_result['objectId']), checks=[ + JMESPathCheck2('value', True) + ]) + # check user2 memebership + self.cmd('ad group member check -g {} --member-id {}'.format(group, user2_result['objectId']), checks=[ + JMESPathCheck2('value', True) + ]) + # list memebers + self.cmd('ad group member list -g ' + group, checks=[ + JMESPathCheck2("length([?displayName=='{}'])".format(user1), 1), + JMESPathCheck2("length([?displayName=='{}'])".format(user2), 1), + JMESPathCheck2("length([])", 2), + ]) + # remove user1 + self.cmd('ad group member remove -g {} --member-id {}'.format(group, user1_result['objectId'])) + # check user1 memebership + self.cmd('ad group member check -g {} --member-id {}'.format(group, user1_result['objectId']), checks=[ + JMESPathCheck2('value', False) + ]) + # delete the group + self.cmd('ad group delete -g ' + group) + self.cmd('ad group list', checks=[ + JMESPathCheck2("length([?displayName=='{}'])".format(group), 0) + ]) + finally: + self.cmd('ad user delete --upn-or-object-id ' + user1_result['objectId']) + self.cmd('ad user delete --upn-or-object-id ' + user2_result['objectId'])
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_added_files", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 1, "test_score": 3 }, "num_modified_files": 5 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==2.0.0 -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@3079f47653297161fd877f994cfaa0bc202f039f#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.6 azure-graphrbac==0.30.0rc6 azure-keyvault==0.1.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==3.0.0 azure-mgmt-compute==1.0.0rc1 azure-mgmt-containerregistry==0.2.0 azure-mgmt-datalake-analytics==0.1.3 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.3 azure-mgmt-dns==1.0.0 azure-mgmt-documentdb==0.1.1 azure-mgmt-iothub==0.2.1 azure-mgmt-keyvault==0.30.0 azure-mgmt-monitor==0.2.0 azure-mgmt-network==1.0.0rc2 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.0.0rc1 azure-mgmt-sql==0.4.0 azure-mgmt-storage==1.0.0rc1 azure-mgmt-trafficmanager==0.30.0rc6 azure-mgmt-web==0.31.0 azure-monitor==0.3.0 azure-multiapi-storage==0.1.0 azure-nspkg==3.0.2 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 futures==3.1.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==2.0.0 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.6 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.1.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==3.0.0 - azure-mgmt-compute==1.0.0rc1 - azure-mgmt-containerregistry==0.2.0 - azure-mgmt-datalake-analytics==0.1.3 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.3 - azure-mgmt-dns==1.0.0 - azure-mgmt-documentdb==0.1.1 - azure-mgmt-iothub==0.2.1 - azure-mgmt-keyvault==0.30.0 - azure-mgmt-monitor==0.2.0 - azure-mgmt-network==1.0.0rc2 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.0.0rc1 - azure-mgmt-sql==0.4.0 - azure-mgmt-storage==1.0.0rc1 - azure-mgmt-trafficmanager==0.30.0rc6 - azure-mgmt-web==0.31.0 - azure-monitor==0.3.0 - azure-multiapi-storage==0.1.0 - azure-nspkg==3.0.2 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - futures==3.1.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-role/tests/test_graph.py::GraphGroupScenarioTest::test_graph_group_scenario" ]
[]
[ "src/command_modules/azure-cli-role/tests/test_graph.py::ServicePrincipalExpressCreateScenarioTest::test_sp_create_scenario", "src/command_modules/azure-cli-role/tests/test_graph.py::ApplicationSetScenarioTest::test_application_set_scenario" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_azure-cli-2955
Azure__azure-cli-3164
0c5e91ca52cf0ed5f9284968dd3272275020ce89
2017-05-04 19:54:32
eb12ac454cbe1ddb59c86cdf2045e1912660e750
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3164?src=pr&el=h1) Report > Merging [#3164](https://codecov.io/gh/Azure/azure-cli/pull/3164?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/0c5e91ca52cf0ed5f9284968dd3272275020ce89?src=pr&el=desc) will **increase** coverage by `<.01%`. > The diff coverage is `92.59%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/3164/graphs/tree.svg?width=650&height=150&src=pr&token=2pog0TKvF8)](https://codecov.io/gh/Azure/azure-cli/pull/3164?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #3164 +/- ## ========================================== + Coverage 71.11% 71.12% +<.01% ========================================== Files 362 362 Lines 23914 23929 +15 Branches 3653 3658 +5 ========================================== + Hits 17006 17019 +13 Misses 5812 5812 - Partials 1096 1098 +2 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/3164?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [src/azure-cli-core/azure/cli/core/\_profile.py](https://codecov.io/gh/Azure/azure-cli/pull/3164?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL19wcm9maWxlLnB5) | `87.64% <92.59%> (-0.04%)` | :arrow_down: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3164?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3164?src=pr&el=footer). Last update [0c5e91c...d097884](https://codecov.io/gh/Azure/azure-cli/pull/3164?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/src/azure-cli-core/HISTORY.rst b/src/azure-cli-core/HISTORY.rst index 0db20c494..49f585169 100644 --- a/src/azure-cli-core/HISTORY.rst +++ b/src/azure-cli-core/HISTORY.rst @@ -6,6 +6,7 @@ Release History ^^^^^^^^^^^^^^^^^^ * core: capture exceptions caused by unregistered provider and auto-register it * login: avoid the bad exception when the user account has no subscription and no tenants +* perf: persist adal token cache in memory till process exits (#2603) 2.0.4 (2017-04-28) ^^^^^^^^^^^^^^^^^^ diff --git a/src/azure-cli-core/azure/cli/core/_profile.py b/src/azure-cli-core/azure/cli/core/_profile.py index b5a6c77a6..4cae579da 100644 --- a/src/azure-cli-core/azure/cli/core/_profile.py +++ b/src/azure-cli-core/azure/cli/core/_profile.py @@ -93,11 +93,20 @@ class CredentialType(Enum): # pylint: disable=too-few-public-methods rbac = CLOUD.endpoints.active_directory_graph_resource_id +_GLOBAL_CREDS_CACHE = None + + class Profile(object): - def __init__(self, storage=None, auth_ctx_factory=None): + def __init__(self, storage=None, auth_ctx_factory=None, use_global_creds_cache=True): self._storage = storage or ACCOUNT self.auth_ctx_factory = auth_ctx_factory or _AUTH_CTX_FACTORY - self._creds_cache = CredsCache(self.auth_ctx_factory) + if use_global_creds_cache: + global _GLOBAL_CREDS_CACHE # pylint: disable=global-statement + if _GLOBAL_CREDS_CACHE is None: + _GLOBAL_CREDS_CACHE = CredsCache(self.auth_ctx_factory, async_persist=True) + self._creds_cache = _GLOBAL_CREDS_CACHE + else: + self._creds_cache = CredsCache(self.auth_ctx_factory, async_persist=False) self._management_resource_uri = CLOUD.endpoints.management self._ad_resource_uri = CLOUD.endpoints.active_directory_resource_id @@ -470,29 +479,39 @@ class CredsCache(object): also be handled ''' - def __init__(self, auth_ctx_factory=None): + def __init__(self, auth_ctx_factory=None, async_persist=True): # AZURE_ACCESS_TOKEN_FILE is used by Cloud Console and not meant to be user configured self._token_file = (os.environ.get('AZURE_ACCESS_TOKEN_FILE', None) or os.path.join(get_config_dir(), 'accessTokens.json')) self._service_principal_creds = [] self._auth_ctx_factory = auth_ctx_factory or _AUTH_CTX_FACTORY self._adal_token_cache_attr = None + self._should_flush_to_disk = False + self._async_persist = async_persist + if async_persist: + import atexit + atexit.register(self.flush_to_disk) def persist_cached_creds(self): - with os.fdopen(os.open(self._token_file, os.O_RDWR | os.O_CREAT | os.O_TRUNC, 0o600), - 'w+') as cred_file: - items = self.adal_token_cache.read_items() - all_creds = [entry for _, entry in items] + self._should_flush_to_disk = True + if not self._async_persist: + self.flush_to_disk() + self.adal_token_cache.has_state_changed = False - # trim away useless fields (needed for cred sharing with xplat) - for i in all_creds: - for key in TOKEN_FIELDS_EXCLUDED_FROM_PERSISTENCE: - i.pop(key, None) + def flush_to_disk(self): + if self._should_flush_to_disk: + with os.fdopen(os.open(self._token_file, os.O_RDWR | os.O_CREAT | os.O_TRUNC, 0o600), + 'w+') as cred_file: + items = self.adal_token_cache.read_items() + all_creds = [entry for _, entry in items] - all_creds.extend(self._service_principal_creds) - cred_file.write(json.dumps(all_creds)) + # trim away useless fields (needed for cred sharing with xplat) + for i in all_creds: + for key in TOKEN_FIELDS_EXCLUDED_FROM_PERSISTENCE: + i.pop(key, None) - self.adal_token_cache.has_state_changed = False + all_creds.extend(self._service_principal_creds) + cred_file.write(json.dumps(all_creds)) def retrieve_token_for_user(self, username, tenant, resource): authority = get_authority_url(tenant)
auth: cache adal token cache in memory The goal is to use a single copy of token cache across the same process, rather dump it after getting a token. Building up a token cache is non trivial involving reading and writing the ~/.azure/accesstoken.json. For some commands which involves 1000+ rest call, like datalake, the perf hit is not trivial.
Azure/azure-cli
diff --git a/src/azure-cli-core/tests/test_profile.py b/src/azure-cli-core/tests/test_profile.py index 6f25f61de..ea3648494 100644 --- a/src/azure-cli-core/tests/test_profile.py +++ b/src/azure-cli-core/tests/test_profile.py @@ -76,7 +76,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method def test_update_add_two_different_subscriptions(self): storage_mock = {'subscriptions': None} - profile = Profile(storage_mock) + profile = Profile(storage_mock, use_global_creds_cache=False) # add the first and verify consolidated = Profile._normalize_properties(self.user1, @@ -127,7 +127,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method def test_update_with_same_subscription_added_twice(self): storage_mock = {'subscriptions': None} - profile = Profile(storage_mock) + profile = Profile(storage_mock, use_global_creds_cache=False) # add one twice and verify we will have one but with new token consolidated = Profile._normalize_properties(self.user1, @@ -149,7 +149,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method def test_set_active_subscription(self): storage_mock = {'subscriptions': None} - profile = Profile(storage_mock) + profile = Profile(storage_mock, use_global_creds_cache=False) consolidated = Profile._normalize_properties(self.user1, [self.subscription1], @@ -169,7 +169,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method def test_default_active_subscription_to_non_disabled_one(self): storage_mock = {'subscriptions': None} - profile = Profile(storage_mock) + profile = Profile(storage_mock, use_global_creds_cache=False) subscriptions = profile._normalize_properties( self.user2, [self.subscription2, self.subscription1], False) @@ -182,7 +182,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method def test_get_subscription(self): storage_mock = {'subscriptions': None} - profile = Profile(storage_mock) + profile = Profile(storage_mock, use_global_creds_cache=False) consolidated = Profile._normalize_properties(self.user1, [self.subscription1], @@ -200,7 +200,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method def test_get_expanded_subscription_info(self): storage_mock = {'subscriptions': None} - profile = Profile(storage_mock) + profile = Profile(storage_mock, use_global_creds_cache=False) consolidated = Profile._normalize_properties(self.user1, [self.subscription1], @@ -236,7 +236,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method lambda _: mock_arm_client) storage_mock = {'subscriptions': []} - profile = Profile(storage_mock) + profile = Profile(storage_mock, use_global_creds_cache=False) profile._management_resource_uri = 'https://management.core.windows.net/' profile.find_subscriptions_on_login(False, '1234', @@ -264,7 +264,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method lambda _: mock_arm_client) storage_mock = {'subscriptions': []} - profile = Profile(storage_mock) + profile = Profile(storage_mock, use_global_creds_cache=False) profile._management_resource_uri = 'https://management.core.windows.net/' # action @@ -288,7 +288,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method finder = mock.MagicMock() finder.find_through_interactive_flow.return_value = [] storage_mock = {'subscriptions': []} - profile = Profile(storage_mock) + profile = Profile(storage_mock, use_global_creds_cache=False) # action result = profile.find_subscriptions_on_login(True, @@ -308,7 +308,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method mock_read_cred_file.return_value = [Test_Profile.token_entry1] storage_mock = {'subscriptions': None} - profile = Profile(storage_mock) + profile = Profile(storage_mock, use_global_creds_cache=False) consolidated = Profile._normalize_properties(self.user1, [self.subscription1], False) @@ -322,7 +322,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method @mock.patch('azure.cli.core._profile._load_tokens_from_file', return_value=None) def test_create_token_cache(self, mock_read_file): mock_read_file.return_value = [] - profile = Profile() + profile = Profile(use_global_creds_cache=False) cache = profile._creds_cache.adal_token_cache self.assertFalse(cache.read_items()) self.assertTrue(mock_read_file.called) @@ -330,7 +330,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method @mock.patch('azure.cli.core._profile._load_tokens_from_file', autospec=True) def test_load_cached_tokens(self, mock_read_file): mock_read_file.return_value = [Test_Profile.token_entry1] - profile = Profile() + profile = Profile(use_global_creds_cache=False) cache = profile._creds_cache.adal_token_cache matched = cache.find({ "_authority": "https://login.microsoftonline.com/common", @@ -348,7 +348,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method mock_get_token.return_value = (some_token_type, Test_Profile.raw_token1) # setup storage_mock = {'subscriptions': None} - profile = Profile(storage_mock) + profile = Profile(storage_mock, use_global_creds_cache=False) consolidated = Profile._normalize_properties(self.user1, [self.subscription1], False) @@ -375,7 +375,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method mock_get_token.return_value = (some_token_type, Test_Profile.raw_token1) # setup storage_mock = {'subscriptions': None} - profile = Profile(storage_mock) + profile = Profile(storage_mock, use_global_creds_cache=False) consolidated = Profile._normalize_properties(self.user1, [self.subscription1], False) profile._set_subscriptions(consolidated) @@ -395,7 +395,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method mock_read_cred_file.return_value = [Test_Profile.token_entry1] storage_mock = {'subscriptions': None} - profile = Profile(storage_mock) + profile = Profile(storage_mock, use_global_creds_cache=False) consolidated = Profile._normalize_properties(self.user1, [self.subscription1], False) @@ -413,7 +413,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method def test_logout_all(self, mock_delete_cred_file): # setup storage_mock = {'subscriptions': None} - profile = Profile(storage_mock) + profile = Profile(storage_mock, use_global_creds_cache=False) consolidated = Profile._normalize_properties(self.user1, [self.subscription1], False) @@ -584,7 +584,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method mock_read_file.return_value = [self.token_entry1, test_sp] # action - creds_cache = CredsCache() + creds_cache = CredsCache(async_persist=False) # assert token_entries = [entry for _, entry in creds_cache.load_adal_token_cache().read_items()] @@ -601,7 +601,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method mock_read_file.return_value = [test_sp] # action - creds_cache = CredsCache() + creds_cache = CredsCache(async_persist=False) creds_cache.load_adal_token_cache() # assert @@ -623,7 +623,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method } mock_open_for_write.return_value = FileHandleStub() mock_read_file.return_value = [self.token_entry1, test_sp] - creds_cache = CredsCache() + creds_cache = CredsCache(async_persist=False) # action creds_cache.save_service_principal_cred(test_sp2) @@ -645,7 +645,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method } mock_open_for_write.return_value = FileHandleStub() mock_read_file.return_value = [test_sp] - creds_cache = CredsCache() + creds_cache = CredsCache(async_persist=False) # action creds_cache.save_service_principal_cred(test_sp) @@ -664,7 +664,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method } mock_open_for_write.return_value = FileHandleStub() mock_read_file.return_value = [self.token_entry1, test_sp] - creds_cache = CredsCache() + creds_cache = CredsCache(async_persist=False) # action #1, logout a user creds_cache.remove_cached_creds(self.user1) @@ -704,7 +704,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method mock_adal_auth_context.acquire_token.side_effect = acquire_token_side_effect mock_open_for_write.return_value = FileHandleStub() mock_read_file.return_value = [self.token_entry1] - creds_cache = CredsCache(auth_ctx_factory=get_auth_context) + creds_cache = CredsCache(auth_ctx_factory=get_auth_context, async_persist=False) # action mgmt_resource = 'https://management.core.windows.net/'
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 0, "test_score": 3 }, "num_modified_files": 2 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==2.0.1 -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_cognitiveservices&subdirectory=src/command_modules/azure-cli-cognitiveservices azure-cli-command-modules-nspkg==2.0.3 -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure azure-cli-container==0.3.18 -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_shell&subdirectory=src/command_modules/azure-cli-shell -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@0c5e91ca52cf0ed5f9284968dd3272275020ce89#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.8 azure-graphrbac==0.30.0rc6 azure-keyvault==0.2.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==3.0.1 azure-mgmt-cognitiveservices==1.0.0 azure-mgmt-compute==1.0.0rc1 azure-mgmt-containerinstance==1.4.0 azure-mgmt-containerregistry==0.2.1 azure-mgmt-datalake-analytics==0.1.4 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.4 azure-mgmt-devtestlabs==2.0.0 azure-mgmt-dns==1.0.1 azure-mgmt-documentdb==0.1.3 azure-mgmt-iothub==0.2.2 azure-mgmt-keyvault==0.31.0 azure-mgmt-loganalytics==0.2.0 azure-mgmt-monitor==0.2.1 azure-mgmt-network==3.0.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.0.0rc1 azure-mgmt-sql==0.4.0 azure-mgmt-storage==1.0.0rc1 azure-mgmt-trafficmanager==0.30.0 azure-mgmt-web==0.32.0 azure-monitor==0.3.0 azure-multiapi-storage==0.1.0 azure-nspkg==1.0.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 futures==3.1.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 prompt-toolkit==3.0.36 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pydocumentdb==2.3.5 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.5 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 vsts-cd-manager==1.0.2 wcwidth==0.2.13 websocket-client==1.3.1 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==2.0.1 - azure-cli-command-modules-nspkg==2.0.3 - azure-cli-container==0.3.18 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.8 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.2.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==3.0.1 - azure-mgmt-cognitiveservices==1.0.0 - azure-mgmt-compute==1.0.0rc1 - azure-mgmt-containerinstance==1.4.0 - azure-mgmt-containerregistry==0.2.1 - azure-mgmt-datalake-analytics==0.1.4 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.4 - azure-mgmt-devtestlabs==2.0.0 - azure-mgmt-dns==1.0.1 - azure-mgmt-documentdb==0.1.3 - azure-mgmt-iothub==0.2.2 - azure-mgmt-keyvault==0.31.0 - azure-mgmt-loganalytics==0.2.0 - azure-mgmt-monitor==0.2.1 - azure-mgmt-network==3.0.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.0.0rc1 - azure-mgmt-sql==0.4.0 - azure-mgmt-storage==1.0.0rc1 - azure-mgmt-trafficmanager==0.30.0 - azure-mgmt-web==0.32.0 - azure-monitor==0.3.0 - azure-multiapi-storage==0.1.0 - azure-nspkg==1.0.0 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - futures==3.1.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - prompt-toolkit==3.0.36 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pydocumentdb==2.3.5 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.5 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - vsts-cd-manager==1.0.2 - wcwidth==0.2.13 - websocket-client==1.3.1 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_create_account_without_subscriptions", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_create_account_without_subscriptions_without_tenant", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_create_token_cache", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_add_new_sp_creds", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_add_preexisting_sp_creds", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds_with_cert", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds_with_secret", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_new_token_added_by_adal", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_remove_creds", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_default_active_subscription_to_non_disabled_one", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_current_account_user", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info_for_logged_in_service_principal", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_login_credentials", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_login_credentials_for_graph_client", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_subscription", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_load_cached_tokens", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_logout", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_logout_all", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_set_active_subscription", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_update_add_two_different_subscriptions", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_update_with_same_subscription_added_twice" ]
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_using_cert", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_service_principal_auth_client_cert" ]
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_particular_tenent", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_id", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_interactive_from_particular_tenent", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_through_interactive_flow", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password_with_account_disabled", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_normalize", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_service_principal_auth_client_secret" ]
[]
MIT License
null
Azure__azure-cli-3354
4417fb03c91b0caa5f88a72ca0372d5931c072d9
2017-05-15 16:03:53
eb12ac454cbe1ddb59c86cdf2045e1912660e750
tjprescott: @yugangw-msft I agree. codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3354?src=pr&el=h1) Report > Merging [#3354](https://codecov.io/gh/Azure/azure-cli/pull/3354?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/4417fb03c91b0caa5f88a72ca0372d5931c072d9?src=pr&el=desc) will **decrease** coverage by `<.01%`. > The diff coverage is `71.42%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/3354/graphs/tree.svg?token=2pog0TKvF8&width=650&height=150&src=pr)](https://codecov.io/gh/Azure/azure-cli/pull/3354?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #3354 +/- ## ========================================== - Coverage 70.66% 70.65% -0.01% ========================================== Files 391 391 Lines 25255 25259 +4 Branches 3835 3836 +1 ========================================== + Hits 17847 17848 +1 - Misses 6272 6274 +2 - Partials 1136 1137 +1 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/3354?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...zure-cli-vm/azure/cli/command\_modules/vm/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/3354?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktdm0vYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy92bS9jdXN0b20ucHk=) | `72.93% <71.42%> (-0.21%)` | :arrow_down: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3354?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3354?src=pr&el=footer). Last update [4417fb0...ef65f19](https://codecov.io/gh/Azure/azure-cli/pull/3354?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). tjprescott: @yugangw-msft I made the change you suggested.
diff --git a/appveyor.yml b/appveyor.yml index a3b8e2a82..23c0de8d3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,7 +13,7 @@ environment: install: - SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH% - python scripts/dev_setup.py - - python -m pip install sphinx + - python -m pip install sphinx==1.5.6 build_script: - ps: | diff --git a/azure-cli.pyproj b/azure-cli.pyproj index a4caa6f17..5316ef474 100644 --- a/azure-cli.pyproj +++ b/azure-cli.pyproj @@ -946,7 +946,6 @@ <Folder Include="command_modules\azure-cli-vm\azure\cli\" /> <Folder Include="command_modules\azure-cli-vm\azure\cli\command_modules\" /> <Folder Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\" /> - <Folder Include="command_modules\azure-cli-vm\azure\cli\command_modules\vm\tests\" /> <Folder Include="command_modules\azure-cli-vm\tests\" /> <Folder Include="command_modules\azure-cli-vm\tests\keyvault\" /> <Folder Include="command_modules\azure-cli-dls\" /> diff --git a/src/command_modules/azure-cli-vm/HISTORY.rst b/src/command_modules/azure-cli-vm/HISTORY.rst index 50d71c09c..d9a31bfac 100644 --- a/src/command_modules/azure-cli-vm/HISTORY.rst +++ b/src/command_modules/azure-cli-vm/HISTORY.rst @@ -6,6 +6,7 @@ unreleased * diagnostics: Fix incorrect Linux diagnostics default config with update for LAD v.3.0 extension * disk: support cross subscription blob import * vm: support license type on create +* BC: vm open-port: command always returns the NSG. Previously it returned the NIC or Subnet. 2.0.6 (2017-05-09) ++++++++++++++++++ diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py index 5c48d6656..3e07efc92 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py @@ -1177,6 +1177,7 @@ def vm_open_port(resource_group_name, vm_name, port, priority=900, network_secur raise CLIError("No NIC associated with VM '{}'".format(vm_name)) # get existing NSG or create a new one + created_nsg = False nic = network.network_interfaces.get(resource_group_name, os.path.split(nic_ids[0].id)[1]) if not apply_to_subnet: nsg = nic.network_security_group @@ -1197,6 +1198,7 @@ def vm_open_port(resource_group_name, vm_name, port, priority=900, network_secur parameters=NetworkSecurityGroup(location=location) ) ) + created_nsg = True # update the NSG with the new rule to allow inbound traffic SecurityRule = get_sdk(ResourceType.MGMT_NETWORK, 'SecurityRule', mod='models') @@ -1210,23 +1212,21 @@ def vm_open_port(resource_group_name, vm_name, port, priority=900, network_secur resource_group_name, nsg_name, rule_name, rule) ) - # update the NIC or subnet - if not apply_to_subnet: + # update the NIC or subnet if a new NSG was created + if created_nsg and not apply_to_subnet: nic.network_security_group = nsg - return LongRunningOperation('Updating NIC')( - network.network_interfaces.create_or_update( - resource_group_name, nic.name, nic) - ) - else: + LongRunningOperation('Updating NIC')(network.network_interfaces.create_or_update( + resource_group_name, nic.name, nic)) + elif created_nsg and apply_to_subnet: subnet.network_security_group = nsg - return LongRunningOperation('Updating subnet')( - network.subnets.create_or_update( - resource_group_name=resource_group_name, - virtual_network_name=subnet_id['name'], - subnet_name=subnet_id['child_name'], - subnet_parameters=subnet - ) - ) + LongRunningOperation('Updating subnet')(network.subnets.create_or_update( + resource_group_name=resource_group_name, + virtual_network_name=subnet_id['name'], + subnet_name=subnet_id['child_name'], + subnet_parameters=subnet + )) + + return network.network_security_groups.get(resource_group_name, nsg_name) def _build_nic_list(nic_ids):
az vm open-port returns error but executes successfully ### Description az vm open-port returns an error but executes successfully Example: PS C:\Users\larry> az vm open-port -g JUMPBOXRG -n jumpbox --port 80 --priority 500 Operation failed with status: 'Not Found'. Details: 404 Client Error: Not Found for url: https://management.azure.com/subscriptions/5ba80c27-8c76-[***]/providers/Microsoft.Network/locations/eastus/operations/5c5fa1c7-3e4a-4dd3-[***]?api-version=2017-03-01 Error occurs on Windows & Linux --- ### Environment summary **Install Method:** How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly) Windows: pip. Linux: apt-get **CLI Version:** What version of the CLI and modules are installed? (Use `az --version`) 2.0.6 **OS Version:** What OS and version are you using? Windows 10, Ubuntu 17.04 **Shell Type:** What shell are you using? (e.g. bash, cmd.exe, Bash on Windows) Powershell, Bash
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-vm/tests/recordings/test_vm_open_port.yaml b/src/command_modules/azure-cli-vm/tests/recordings/test_vm_open_port.yaml index 0aa74e003..df0308bf4 100644 --- a/src/command_modules/azure-cli-vm/tests/recordings/test_vm_open_port.yaml +++ b/src/command_modules/azure-cli-vm/tests/recordings/test_vm_open_port.yaml @@ -6,23 +6,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - computemanagementclient/0.33.1rc1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [8b0d4f74-1697-11e7-9a38-f4b7e2e85440] + x-ms-client-request-id: [0fb8f1a8-3a91-11e7-b05a-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"5075a256-2327-4846-b023-231e045604b5\"\ + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"b8d1de5a-64b6-4f37-bdd3-0fd302008576\"\ ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ ,\r\n \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\ \n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_3bihPHQTJ0\",\r\n \"createOption\": \"FromImage\"\ + \ \"name\": \"osdisk_YXbKt2a4DE\",\r\n \"createOption\": \"FromImage\"\ ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Compute/disks/osdisk_3bihPHQTJ0\"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Compute/disks/osdisk_YXbKt2a4DE\"\ \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ ,\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ @@ -36,7 +37,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:56:18 GMT'] + Date: ['Tue, 16 May 2017 23:40:36 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -52,20 +53,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [8b345bb4-1697-11e7-9c1d-f4b7e2e85440] + x-ms-client-request-id: [0fdcf78a-3a91-11e7-b103-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic?api-version=2017-03-01 response: body: {string: "{\r\n \"name\": \"vm1VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - ,\r\n \"etag\": \"W/\\\"3698e0ce-cf23-48dd-97c5-bb6f7aa1659b\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"467e1f68-631a-4a50-9a85-7f0893f75459\\\"\",\r\n \ \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n\ - \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"a841d97c-9eed-4000-bef6-05ba81198e68\"\ + \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"acf9de26-2136-403a-8429-12c3eaa63554\"\ ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm1\"\ ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\ - ,\r\n \"etag\": \"W/\\\"3698e0ce-cf23-48dd-97c5-bb6f7aa1659b\\\"\"\ + ,\r\n \"etag\": \"W/\\\"467e1f68-631a-4a50-9a85-7f0893f75459\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ : \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\":\ @@ -74,8 +76,8 @@ interactions: \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"yqoxwrdrqerepkqkjgsgl2amrc.dx.internal.cloudapp.net\"\ - \r\n },\r\n \"macAddress\": \"00-0D-3A-36-F9-C9\",\r\n \"enableAcceleratedNetworking\"\ + internalDomainNameSuffix\": \"dpfibvfzyeaejlgmx3vt4p22cc.dx.internal.cloudapp.net\"\ + \r\n },\r\n \"macAddress\": \"00-0D-3A-30-5C-3C\",\r\n \"enableAcceleratedNetworking\"\ : false,\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\"\ : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ \r\n },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \ @@ -85,8 +87,8 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:56:18 GMT'] - ETag: [W/"3698e0ce-cf23-48dd-97c5-bb6f7aa1659b"] + Date: ['Tue, 16 May 2017 23:40:36 GMT'] + ETag: [W/"467e1f68-631a-4a50-9a85-7f0893f75459"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -96,41 +98,42 @@ interactions: content-length: ['2189'] status: {code: 200, message: OK} - request: - body: '{"properties": {"destinationPortRange": "*", "sourcePortRange": "*", "protocol": - "*", "access": "allow", "destinationAddressPrefix": "*", "priority": 900, "sourceAddressPrefix": - "*", "direction": "inbound"}, "name": "open-port-all"}' + body: '{"name": "open-port-all", "properties": {"sourceAddressPrefix": "*", "direction": + "inbound", "priority": 900, "destinationPortRange": "*", "protocol": "*", "destinationAddressPrefix": + "*", "access": "allow", "sourcePortRange": "*"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['232'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [8b5bde98-1697-11e7-9144-f4b7e2e85440] + x-ms-client-request-id: [101557dc-3a91-11e7-af60-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/open-port-all?api-version=2017-03-01 response: body: {string: "{\r\n \"name\": \"open-port-all\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/open-port-all\"\ - ,\r\n \"etag\": \"W/\\\"78ec4e59-badc-48a2-a4e8-9645691d75bb\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"4432927e-5f08-4b52-ab69-d46c6dfebee0\\\"\",\r\n \ \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ : \"*\",\r\n \"sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ : \"*\",\r\n \"access\": \"Allow\",\r\n \"priority\": 900,\r\n \"\ direction\": \"Inbound\"\r\n }\r\n}"} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/a223ce3a-20ce-4309-9092-7cd0c0a84eaf?api-version=2017-03-01'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/49f2734e-6fc7-4471-84c1-3f0de0678807?api-version=2017-03-01'] Cache-Control: [no-cache] Content-Length: ['570'] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:56:18 GMT'] + Date: ['Tue, 16 May 2017 23:40:37 GMT'] Expires: ['-1'] Pragma: [no-cache] Retry-After: ['10'] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 201, message: Created} - request: body: null @@ -139,18 +142,19 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [8b5bde98-1697-11e7-9144-f4b7e2e85440] + x-ms-client-request-id: [101557dc-3a91-11e7-af60-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/a223ce3a-20ce-4309-9092-7cd0c0a84eaf?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/49f2734e-6fc7-4471-84c1-3f0de0678807?api-version=2017-03-01 response: body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:56:29 GMT'] + Date: ['Tue, 16 May 2017 23:40:47 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -166,15 +170,16 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [8b5bde98-1697-11e7-9144-f4b7e2e85440] + x-ms-client-request-id: [101557dc-3a91-11e7-af60-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/open-port-all?api-version=2017-03-01 response: body: {string: "{\r\n \"name\": \"open-port-all\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/open-port-all\"\ - ,\r\n \"etag\": \"W/\\\"35b90cac-1fef-48fd-901c-d0f80a58ba43\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\",\r\n \ \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ : \"*\",\r\n \"sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ @@ -183,8 +188,8 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:56:29 GMT'] - ETag: [W/"35b90cac-1fef-48fd-901c-d0f80a58ba43"] + Date: ['Tue, 16 May 2017 23:40:48 GMT'] + ETag: [W/"b5a3dd59-d43b-4102-9161-9cf9edf79734"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -193,71 +198,6 @@ interactions: Vary: [Accept-Encoding] content-length: ['571'] status: {code: 200, message: OK} -- request: - body: '{"etag": "W/\"3698e0ce-cf23-48dd-97c5-bb6f7aa1659b\"", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic", - "properties": {"macAddress": "00-0D-3A-36-F9-C9", "enableIPForwarding": false, - "virtualMachine": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Compute/virtualMachines/vm1"}, - "ipConfigurations": [{"etag": "W/\"3698e0ce-cf23-48dd-97c5-bb6f7aa1659b\"", - "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1", - "properties": {"subnet": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet"}, - "publicIPAddress": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"}, - "privateIPAddress": "10.0.0.4", "privateIPAllocationMethod": "Dynamic", "primary": - true, "provisioningState": "Succeeded", "privateIPAddressVersion": "IPv4"}, - "name": "ipconfigvm1"}], "provisioningState": "Succeeded", "resourceGuid": "a841d97c-9eed-4000-bef6-05ba81198e68", - "primary": true, "networkSecurityGroup": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"}, - "enableAcceleratedNetworking": false, "dnsSettings": {"internalDomainNameSuffix": - "yqoxwrdrqerepkqkjgsgl2amrc.dx.internal.cloudapp.net", "dnsServers": [], "appliedDnsServers": - []}}, "tags": {}, "location": "westus"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['1788'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] - accept-language: [en-US] - x-ms-client-request-id: [9283a5fa-1697-11e7-8767-f4b7e2e85440] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic?api-version=2017-03-01 - response: - body: {string: "{\r\n \"name\": \"vm1VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - ,\r\n \"etag\": \"W/\\\"9b75fd4e-85cc-4c69-94c4-46b63b7e7c6d\\\"\",\r\n \ - \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n\ - \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"a841d97c-9eed-4000-bef6-05ba81198e68\"\ - ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm1\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\ - ,\r\n \"etag\": \"W/\\\"9b75fd4e-85cc-4c69-94c4-46b63b7e7c6d\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\":\ - \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\ - \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\ - \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ - : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ - \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"yqoxwrdrqerepkqkjgsgl2amrc.dx.internal.cloudapp.net\"\ - \r\n },\r\n \"macAddress\": \"00-0D-3A-36-F9-C9\",\r\n \"enableAcceleratedNetworking\"\ - : false,\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ - \r\n },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Compute/virtualMachines/vm1\"\ - \r\n }\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\ - \n}"} - headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/bfe5fff4-9760-4e4d-876f-4281ec837b72?api-version=2017-03-01'] - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:56:31 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2189'] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - status: {code: 200, message: OK} - request: body: null headers: @@ -265,75 +205,106 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [9283a5fa-1697-11e7-8767-f4b7e2e85440] + x-ms-client-request-id: [173d4736-3a91-11e7-8990-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/bfe5fff4-9760-4e4d-876f-4281ec837b72?api-version=2017-03-01 - response: - body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} - headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:57:01 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['29'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] - accept-language: [en-US] - x-ms-client-request-id: [9283a5fa-1697-11e7-8767-f4b7e2e85440] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG?api-version=2017-03-01 response: - body: {string: "{\r\n \"name\": \"vm1VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - ,\r\n \"etag\": \"W/\\\"9b75fd4e-85cc-4c69-94c4-46b63b7e7c6d\\\"\",\r\n \ - \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n\ - \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"a841d97c-9eed-4000-bef6-05ba81198e68\"\ - ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm1\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\ - ,\r\n \"etag\": \"W/\\\"9b75fd4e-85cc-4c69-94c4-46b63b7e7c6d\\\"\"\ + body: {string: "{\r\n \"name\": \"vm1NSG\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/networkSecurityGroups\",\r\n \"location\"\ + : \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"resourceGuid\": \"06d0b2ae-cf07-4f71-9961-a6d1f2d0560d\"\ + ,\r\n \"securityRules\": [\r\n {\r\n \"name\": \"default-allow-ssh\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/default-allow-ssh\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\":\ - \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\ - \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\ - \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ - : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ - \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"yqoxwrdrqerepkqkjgsgl2amrc.dx.internal.cloudapp.net\"\ - \r\n },\r\n \"macAddress\": \"00-0D-3A-36-F9-C9\",\r\n \"enableAcceleratedNetworking\"\ - : false,\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ - \r\n },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Compute/virtualMachines/vm1\"\ - \r\n }\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\ - \n}"} + ,\r\n \"protocol\": \"Tcp\",\r\n \"sourcePortRange\": \"\ + *\",\r\n \"destinationPortRange\": \"22\",\r\n \"sourceAddressPrefix\"\ + : \"*\",\r\n \"destinationAddressPrefix\": \"*\",\r\n \"\ + access\": \"Allow\",\r\n \"priority\": 1000,\r\n \"direction\"\ + : \"Inbound\"\r\n }\r\n },\r\n {\r\n \"name\": \"\ + open-port-all\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/open-port-all\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ + ,\r\n \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\"\ + : \"*\",\r\n \"destinationAddressPrefix\": \"*\",\r\n \"\ + access\": \"Allow\",\r\n \"priority\": 900,\r\n \"direction\"\ + : \"Inbound\"\r\n }\r\n }\r\n ],\r\n \"defaultSecurityRules\"\ + : [\r\n {\r\n \"name\": \"AllowVnetInBound\",\r\n \"id\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowVnetInBound\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"description\": \"Allow inbound traffic from all VMs in VNET\"\ + ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ + ,\r\n \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\"\ + : \"VirtualNetwork\",\r\n \"destinationAddressPrefix\": \"VirtualNetwork\"\ + ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ + \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ + \n \"name\": \"AllowAzureLoadBalancerInBound\",\r\n \"id\":\ + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowAzureLoadBalancerInBound\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"description\": \"Allow inbound traffic from azure load balancer\"\ + ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ + ,\r\n \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\"\ + : \"AzureLoadBalancer\",\r\n \"destinationAddressPrefix\": \"*\"\ + ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n\ + \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ + \n \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/DenyAllInBound\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"description\": \"Deny all inbound traffic\",\r\n \ + \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ + \ \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\"\ + : \"*\",\r\n \"destinationAddressPrefix\": \"*\",\r\n \"\ + access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ + : \"Inbound\"\r\n }\r\n },\r\n {\r\n \"name\": \"\ + AllowVnetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowVnetOutBound\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"description\": \"Allow outbound traffic from all VMs to all\ + \ VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ + : \"*\",\r\n \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\"\ + : \"VirtualNetwork\",\r\n \"destinationAddressPrefix\": \"VirtualNetwork\"\ + ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ + \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\ + \n \"name\": \"AllowInternetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowInternetOutBound\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"description\": \"Allow outbound traffic from all VMs to Internet\"\ + ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ + ,\r\n \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\"\ + : \"*\",\r\n \"destinationAddressPrefix\": \"Internet\",\r\n \ + \ \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n \ + \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\n \ + \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/DenyAllOutBound\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"description\": \"Deny all outbound traffic\",\r\n \ + \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ + \ \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\"\ + : \"*\",\r\n \"destinationAddressPrefix\": \"*\",\r\n \"\ + access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ + : \"Outbound\"\r\n }\r\n }\r\n ],\r\n \"networkInterfaces\"\ + : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + \r\n }\r\n ]\r\n }\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:57:01 GMT'] - ETag: [W/"9b75fd4e-85cc-4c69-94c4-46b63b7e7c6d"] + Date: ['Tue, 16 May 2017 23:40:48 GMT'] + ETag: [W/"b5a3dd59-d43b-4102-9161-9cf9edf79734"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['2189'] + content-length: ['6735'] status: {code: 200, message: OK} - request: body: null @@ -342,21 +313,22 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [a61e706e-1697-11e7-b60e-f4b7e2e85440] + x-ms-client-request-id: [177a9bbe-3a91-11e7-a894-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG?api-version=2017-03-01 response: body: {string: "{\r\n \"name\": \"vm1NSG\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ - ,\r\n \"etag\": \"W/\\\"35b90cac-1fef-48fd-901c-d0f80a58ba43\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/networkSecurityGroups\",\r\n \"location\"\ : \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"e1a9a417-53a8-4b13-af8d-d5f60e85669a\"\ + : \"Succeeded\",\r\n \"resourceGuid\": \"06d0b2ae-cf07-4f71-9961-a6d1f2d0560d\"\ ,\r\n \"securityRules\": [\r\n {\r\n \"name\": \"default-allow-ssh\"\ ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/default-allow-ssh\"\ - ,\r\n \"etag\": \"W/\\\"35b90cac-1fef-48fd-901c-d0f80a58ba43\\\"\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"protocol\": \"Tcp\",\r\n \"sourcePortRange\": \"\ *\",\r\n \"destinationPortRange\": \"22\",\r\n \"sourceAddressPrefix\"\ @@ -364,7 +336,7 @@ interactions: access\": \"Allow\",\r\n \"priority\": 1000,\r\n \"direction\"\ : \"Inbound\"\r\n }\r\n },\r\n {\r\n \"name\": \"\ open-port-all\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/open-port-all\"\ - ,\r\n \"etag\": \"W/\\\"35b90cac-1fef-48fd-901c-d0f80a58ba43\\\"\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ ,\r\n \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\"\ @@ -373,7 +345,7 @@ interactions: : \"Inbound\"\r\n }\r\n }\r\n ],\r\n \"defaultSecurityRules\"\ : [\r\n {\r\n \"name\": \"AllowVnetInBound\",\r\n \"id\"\ : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowVnetInBound\"\ - ,\r\n \"etag\": \"W/\\\"35b90cac-1fef-48fd-901c-d0f80a58ba43\\\"\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from all VMs in VNET\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -383,7 +355,7 @@ interactions: \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowAzureLoadBalancerInBound\",\r\n \"id\":\ \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowAzureLoadBalancerInBound\"\ - ,\r\n \"etag\": \"W/\\\"35b90cac-1fef-48fd-901c-d0f80a58ba43\\\"\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from azure load balancer\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -392,7 +364,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n\ \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/DenyAllInBound\"\ - ,\r\n \"etag\": \"W/\\\"35b90cac-1fef-48fd-901c-d0f80a58ba43\\\"\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all inbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -401,7 +373,7 @@ interactions: access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ : \"Inbound\"\r\n }\r\n },\r\n {\r\n \"name\": \"\ AllowVnetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowVnetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"35b90cac-1fef-48fd-901c-d0f80a58ba43\\\"\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to all\ \ VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ @@ -410,7 +382,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowInternetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowInternetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"35b90cac-1fef-48fd-901c-d0f80a58ba43\\\"\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to Internet\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -419,7 +391,7 @@ interactions: \ \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n \ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\n \ \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/DenyAllOutBound\"\ - ,\r\n \"etag\": \"W/\\\"35b90cac-1fef-48fd-901c-d0f80a58ba43\\\"\"\ + ,\r\n \"etag\": \"W/\\\"b5a3dd59-d43b-4102-9161-9cf9edf79734\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all outbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -432,8 +404,8 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:57:03 GMT'] - ETag: [W/"35b90cac-1fef-48fd-901c-d0f80a58ba43"] + Date: ['Tue, 16 May 2017 23:40:49 GMT'] + ETag: [W/"b5a3dd59-d43b-4102-9161-9cf9edf79734"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -449,23 +421,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - computemanagementclient/0.33.1rc1 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [a6dc6c08-1697-11e7-8dd1-f4b7e2e85440] + x-ms-client-request-id: [17a1289a-3a91-11e7-9813-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"5075a256-2327-4846-b023-231e045604b5\"\ + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"b8d1de5a-64b6-4f37-bdd3-0fd302008576\"\ ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ ,\r\n \"sku\": \"14.04.4-LTS\",\r\n \"version\": \"latest\"\r\ \n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_3bihPHQTJ0\",\r\n \"createOption\": \"FromImage\"\ + \ \"name\": \"osdisk_YXbKt2a4DE\",\r\n \"createOption\": \"FromImage\"\ ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Compute/disks/osdisk_3bihPHQTJ0\"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Compute/disks/osdisk_YXbKt2a4DE\"\ \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ ,\r\n \"adminUsername\": \"ubuntu\",\r\n \"linuxConfiguration\"\ @@ -479,7 +452,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:57:05 GMT'] + Date: ['Tue, 16 May 2017 23:40:49 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -495,20 +468,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [a709bdd2-1697-11e7-b314-f4b7e2e85440] + x-ms-client-request-id: [17c33206-3a91-11e7-a030-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic?api-version=2017-03-01 response: body: {string: "{\r\n \"name\": \"vm1VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - ,\r\n \"etag\": \"W/\\\"9b75fd4e-85cc-4c69-94c4-46b63b7e7c6d\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"467e1f68-631a-4a50-9a85-7f0893f75459\\\"\",\r\n \ \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n\ - \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"a841d97c-9eed-4000-bef6-05ba81198e68\"\ + \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"acf9de26-2136-403a-8429-12c3eaa63554\"\ ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm1\"\ ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\ - ,\r\n \"etag\": \"W/\\\"9b75fd4e-85cc-4c69-94c4-46b63b7e7c6d\\\"\"\ + ,\r\n \"etag\": \"W/\\\"467e1f68-631a-4a50-9a85-7f0893f75459\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ : \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\":\ @@ -517,8 +491,8 @@ interactions: \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"yqoxwrdrqerepkqkjgsgl2amrc.dx.internal.cloudapp.net\"\ - \r\n },\r\n \"macAddress\": \"00-0D-3A-36-F9-C9\",\r\n \"enableAcceleratedNetworking\"\ + internalDomainNameSuffix\": \"dpfibvfzyeaejlgmx3vt4p22cc.dx.internal.cloudapp.net\"\ + \r\n },\r\n \"macAddress\": \"00-0D-3A-30-5C-3C\",\r\n \"enableAcceleratedNetworking\"\ : false,\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\"\ : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ \r\n },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \ @@ -528,8 +502,8 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:57:05 GMT'] - ETag: [W/"9b75fd4e-85cc-4c69-94c4-46b63b7e7c6d"] + Date: ['Tue, 16 May 2017 23:40:49 GMT'] + ETag: [W/"467e1f68-631a-4a50-9a85-7f0893f75459"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -545,15 +519,16 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [a72f21a8-1697-11e7-97c5-f4b7e2e85440] + x-ms-client-request-id: [17efc81a-3a91-11e7-87e9-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet?api-version=2017-03-01 response: body: {string: "{\r\n \"name\": \"vm1Subnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\ - ,\r\n \"etag\": \"W/\\\"3d59c338-7994-44e4-8d70-2fa4e0ecfdeb\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"f459dd81-724d-4c66-b439-6cfe004dd253\\\"\",\r\n \ \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ addressPrefix\": \"10.0.0.0/24\",\r\n \"ipConfigurations\": [\r\n \ \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\ @@ -561,8 +536,8 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:57:05 GMT'] - ETag: [W/"3d59c338-7994-44e4-8d70-2fa4e0ecfdeb"] + Date: ['Tue, 16 May 2017 23:40:49 GMT'] + ETag: [W/"f459dd81-724d-4c66-b439-6cfe004dd253"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -579,21 +554,22 @@ interactions: Connection: [keep-alive] Content-Length: ['22'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [a7573208-1697-11e7-bb17-f4b7e2e85440] + x-ms-client-request-id: [18173da4-3a91-11e7-bfea-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg?api-version=2017-03-01 response: body: {string: "{\r\n \"name\": \"newNsg\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg\"\ - ,\r\n \"etag\": \"W/\\\"fda9a35f-5618-4aa5-9eb8-ddbd6616c68a\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"f0b25726-7cfc-4939-a5da-c5aefd86a8c7\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/networkSecurityGroups\",\r\n \"location\"\ : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"resourceGuid\": \"2b91219b-09b1-428a-b93c-49083df6ba8f\",\r\n \ + ,\r\n \"resourceGuid\": \"83ba7695-815c-4917-815e-234b1c1ea744\",\r\n \ \ \"securityRules\": [],\r\n \"defaultSecurityRules\": [\r\n {\r\ \n \"name\": \"AllowVnetInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowVnetInBound\"\ - ,\r\n \"etag\": \"W/\\\"fda9a35f-5618-4aa5-9eb8-ddbd6616c68a\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f0b25726-7cfc-4939-a5da-c5aefd86a8c7\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ ,\r\n \"description\": \"Allow inbound traffic from all VMs in VNET\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -603,7 +579,7 @@ interactions: \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowAzureLoadBalancerInBound\",\r\n \"id\":\ \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowAzureLoadBalancerInBound\"\ - ,\r\n \"etag\": \"W/\\\"fda9a35f-5618-4aa5-9eb8-ddbd6616c68a\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f0b25726-7cfc-4939-a5da-c5aefd86a8c7\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ ,\r\n \"description\": \"Allow inbound traffic from azure load balancer\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -612,7 +588,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n\ \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/DenyAllInBound\"\ - ,\r\n \"etag\": \"W/\\\"fda9a35f-5618-4aa5-9eb8-ddbd6616c68a\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f0b25726-7cfc-4939-a5da-c5aefd86a8c7\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ ,\r\n \"description\": \"Deny all inbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -621,7 +597,7 @@ interactions: access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ : \"Inbound\"\r\n }\r\n },\r\n {\r\n \"name\": \"\ AllowVnetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowVnetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"fda9a35f-5618-4aa5-9eb8-ddbd6616c68a\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f0b25726-7cfc-4939-a5da-c5aefd86a8c7\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to all\ \ VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ @@ -630,7 +606,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowInternetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowInternetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"fda9a35f-5618-4aa5-9eb8-ddbd6616c68a\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f0b25726-7cfc-4939-a5da-c5aefd86a8c7\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to Internet\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -639,7 +615,7 @@ interactions: \ \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n \ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\n \ \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/DenyAllOutBound\"\ - ,\r\n \"etag\": \"W/\\\"fda9a35f-5618-4aa5-9eb8-ddbd6616c68a\\\"\"\ + ,\r\n \"etag\": \"W/\\\"f0b25726-7cfc-4939-a5da-c5aefd86a8c7\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ ,\r\n \"description\": \"Deny all outbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -648,17 +624,17 @@ interactions: access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ : \"Outbound\"\r\n }\r\n }\r\n ]\r\n }\r\n}"} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/360caa80-6fa6-42e9-9c90-8cba9d9e18e5?api-version=2017-03-01'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/fe380d2b-71a6-4500-9f37-fb8df9299b7b?api-version=2017-03-01'] Cache-Control: [no-cache] Content-Length: ['5138'] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:57:06 GMT'] + Date: ['Tue, 16 May 2017 23:40:50 GMT'] Expires: ['-1'] Pragma: [no-cache] Retry-After: ['10'] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 201, message: Created} - request: body: null @@ -667,18 +643,19 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [a7573208-1697-11e7-bb17-f4b7e2e85440] + x-ms-client-request-id: [18173da4-3a91-11e7-bfea-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/360caa80-6fa6-42e9-9c90-8cba9d9e18e5?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/fe380d2b-71a6-4500-9f37-fb8df9299b7b?api-version=2017-03-01 response: body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:57:17 GMT'] + Date: ['Tue, 16 May 2017 23:41:00 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -694,21 +671,22 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [a7573208-1697-11e7-bb17-f4b7e2e85440] + x-ms-client-request-id: [18173da4-3a91-11e7-bfea-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg?api-version=2017-03-01 response: body: {string: "{\r\n \"name\": \"newNsg\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg\"\ - ,\r\n \"etag\": \"W/\\\"a89b28c2-a57e-49e9-845d-3cdf498d5777\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"d8504aba-c21f-422d-ab19-c595af79b03e\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/networkSecurityGroups\",\r\n \"location\"\ : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"2b91219b-09b1-428a-b93c-49083df6ba8f\",\r\n \ + ,\r\n \"resourceGuid\": \"83ba7695-815c-4917-815e-234b1c1ea744\",\r\n \ \ \"securityRules\": [],\r\n \"defaultSecurityRules\": [\r\n {\r\ \n \"name\": \"AllowVnetInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowVnetInBound\"\ - ,\r\n \"etag\": \"W/\\\"a89b28c2-a57e-49e9-845d-3cdf498d5777\\\"\"\ + ,\r\n \"etag\": \"W/\\\"d8504aba-c21f-422d-ab19-c595af79b03e\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from all VMs in VNET\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -718,7 +696,7 @@ interactions: \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowAzureLoadBalancerInBound\",\r\n \"id\":\ \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowAzureLoadBalancerInBound\"\ - ,\r\n \"etag\": \"W/\\\"a89b28c2-a57e-49e9-845d-3cdf498d5777\\\"\"\ + ,\r\n \"etag\": \"W/\\\"d8504aba-c21f-422d-ab19-c595af79b03e\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from azure load balancer\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -727,7 +705,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n\ \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/DenyAllInBound\"\ - ,\r\n \"etag\": \"W/\\\"a89b28c2-a57e-49e9-845d-3cdf498d5777\\\"\"\ + ,\r\n \"etag\": \"W/\\\"d8504aba-c21f-422d-ab19-c595af79b03e\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all inbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -736,7 +714,7 @@ interactions: access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ : \"Inbound\"\r\n }\r\n },\r\n {\r\n \"name\": \"\ AllowVnetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowVnetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"a89b28c2-a57e-49e9-845d-3cdf498d5777\\\"\"\ + ,\r\n \"etag\": \"W/\\\"d8504aba-c21f-422d-ab19-c595af79b03e\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to all\ \ VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ @@ -745,7 +723,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowInternetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowInternetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"a89b28c2-a57e-49e9-845d-3cdf498d5777\\\"\"\ + ,\r\n \"etag\": \"W/\\\"d8504aba-c21f-422d-ab19-c595af79b03e\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to Internet\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -754,7 +732,7 @@ interactions: \ \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n \ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\n \ \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/DenyAllOutBound\"\ - ,\r\n \"etag\": \"W/\\\"a89b28c2-a57e-49e9-845d-3cdf498d5777\\\"\"\ + ,\r\n \"etag\": \"W/\\\"d8504aba-c21f-422d-ab19-c595af79b03e\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all outbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -765,8 +743,8 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:57:17 GMT'] - ETag: [W/"a89b28c2-a57e-49e9-845d-3cdf498d5777"] + Date: ['Tue, 16 May 2017 23:41:01 GMT'] + ETag: [W/"d8504aba-c21f-422d-ab19-c595af79b03e"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -776,41 +754,42 @@ interactions: content-length: ['5145'] status: {code: 200, message: OK} - request: - body: '{"properties": {"destinationPortRange": "*", "sourcePortRange": "*", "protocol": - "*", "access": "allow", "destinationAddressPrefix": "*", "priority": 900, "sourceAddressPrefix": - "*", "direction": "inbound"}, "name": "open-port-all"}' + body: '{"name": "open-port-all", "properties": {"sourceAddressPrefix": "*", "direction": + "inbound", "priority": 900, "destinationPortRange": "*", "protocol": "*", "destinationAddressPrefix": + "*", "access": "allow", "sourcePortRange": "*"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['232'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [af17e3ba-1697-11e7-abf2-f4b7e2e85440] + x-ms-client-request-id: [1f3f0f50-3a91-11e7-8863-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/securityRules/open-port-all?api-version=2017-03-01 response: body: {string: "{\r\n \"name\": \"open-port-all\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/securityRules/open-port-all\"\ - ,\r\n \"etag\": \"W/\\\"9b8c6e07-b5d1-4234-8c5e-d5c4f03a734b\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"0be30305-b192-4910-9c71-632a08861433\\\"\",\r\n \ \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ : \"*\",\r\n \"sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ : \"*\",\r\n \"access\": \"Allow\",\r\n \"priority\": 900,\r\n \"\ direction\": \"Inbound\"\r\n }\r\n}"} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/364634b9-909f-4cd2-816a-dd5bec8bb6ae?api-version=2017-03-01'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/f00ef70d-073b-448c-86c2-4422acef345e?api-version=2017-03-01'] Cache-Control: [no-cache] Content-Length: ['570'] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:57:18 GMT'] + Date: ['Tue, 16 May 2017 23:41:02 GMT'] Expires: ['-1'] Pragma: [no-cache] Retry-After: ['10'] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 201, message: Created} - request: body: null @@ -819,18 +798,19 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [af17e3ba-1697-11e7-abf2-f4b7e2e85440] + x-ms-client-request-id: [1f3f0f50-3a91-11e7-8863-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/364634b9-909f-4cd2-816a-dd5bec8bb6ae?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/f00ef70d-073b-448c-86c2-4422acef345e?api-version=2017-03-01 response: body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:57:29 GMT'] + Date: ['Tue, 16 May 2017 23:41:13 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -846,15 +826,16 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [af17e3ba-1697-11e7-abf2-f4b7e2e85440] + x-ms-client-request-id: [1f3f0f50-3a91-11e7-8863-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/securityRules/open-port-all?api-version=2017-03-01 response: body: {string: "{\r\n \"name\": \"open-port-all\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/securityRules/open-port-all\"\ - ,\r\n \"etag\": \"W/\\\"3180cf40-8b1d-454c-becc-3ae196aecae0\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"f26b729e-2bbc-4236-9d9c-dc34973b52e7\\\"\",\r\n \ \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ : \"*\",\r\n \"sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ @@ -863,8 +844,8 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:57:29 GMT'] - ETag: [W/"3180cf40-8b1d-454c-becc-3ae196aecae0"] + Date: ['Tue, 16 May 2017 23:41:13 GMT'] + ETag: [W/"f26b729e-2bbc-4236-9d9c-dc34973b52e7"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -874,60 +855,63 @@ interactions: content-length: ['571'] status: {code: 200, message: OK} - request: - body: '{"etag": "W/\"3d59c338-7994-44e4-8d70-2fa4e0ecfdeb\"", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet", - "properties": {"addressPrefix": "10.0.0.0/24", "networkSecurityGroup": {"etag": - "W/\"a89b28c2-a57e-49e9-845d-3cdf498d5777\"", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg", - "properties": {"resourceGuid": "2b91219b-09b1-428a-b93c-49083df6ba8f", "securityRules": - [], "defaultSecurityRules": [{"etag": "W/\"a89b28c2-a57e-49e9-845d-3cdf498d5777\"", + body: '{"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet", + "etag": "W/\"f459dd81-724d-4c66-b439-6cfe004dd253\"", "properties": {"provisioningState": + "Succeeded", "addressPrefix": "10.0.0.0/24", "networkSecurityGroup": {"id": + "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg", + "etag": "W/\"d8504aba-c21f-422d-ab19-c595af79b03e\"", "properties": {"securityRules": + [], "provisioningState": "Succeeded", "defaultSecurityRules": [{"etag": "W/\"d8504aba-c21f-422d-ab19-c595af79b03e\"", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowVnetInBound", - "properties": {"destinationPortRange": "*", "description": "Allow inbound traffic - from all VMs in VNET", "direction": "Inbound", "protocol": "*", "access": "Allow", - "destinationAddressPrefix": "VirtualNetwork", "priority": 65000, "sourceAddressPrefix": - "VirtualNetwork", "provisioningState": "Succeeded", "sourcePortRange": "*"}, - "name": "AllowVnetInBound"}, {"etag": "W/\"a89b28c2-a57e-49e9-845d-3cdf498d5777\"", + "name": "AllowVnetInBound", "properties": {"sourceAddressPrefix": "VirtualNetwork", + "direction": "Inbound", "priority": 65000, "provisioningState": "Succeeded", + "destinationPortRange": "*", "protocol": "*", "destinationAddressPrefix": "VirtualNetwork", + "access": "Allow", "sourcePortRange": "*", "description": "Allow inbound traffic + from all VMs in VNET"}}, {"etag": "W/\"d8504aba-c21f-422d-ab19-c595af79b03e\"", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowAzureLoadBalancerInBound", - "properties": {"destinationPortRange": "*", "description": "Allow inbound traffic - from azure load balancer", "direction": "Inbound", "protocol": "*", "access": - "Allow", "destinationAddressPrefix": "*", "priority": 65001, "sourceAddressPrefix": - "AzureLoadBalancer", "provisioningState": "Succeeded", "sourcePortRange": "*"}, - "name": "AllowAzureLoadBalancerInBound"}, {"etag": "W/\"a89b28c2-a57e-49e9-845d-3cdf498d5777\"", + "name": "AllowAzureLoadBalancerInBound", "properties": {"sourceAddressPrefix": + "AzureLoadBalancer", "direction": "Inbound", "priority": 65001, "provisioningState": + "Succeeded", "destinationPortRange": "*", "protocol": "*", "destinationAddressPrefix": + "*", "access": "Allow", "sourcePortRange": "*", "description": "Allow inbound + traffic from azure load balancer"}}, {"etag": "W/\"d8504aba-c21f-422d-ab19-c595af79b03e\"", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/DenyAllInBound", - "properties": {"destinationPortRange": "*", "description": "Deny all inbound - traffic", "direction": "Inbound", "protocol": "*", "access": "Deny", "destinationAddressPrefix": - "*", "priority": 65500, "sourceAddressPrefix": "*", "provisioningState": "Succeeded", - "sourcePortRange": "*"}, "name": "DenyAllInBound"}, {"etag": "W/\"a89b28c2-a57e-49e9-845d-3cdf498d5777\"", + "name": "DenyAllInBound", "properties": {"sourceAddressPrefix": "*", "direction": + "Inbound", "priority": 65500, "provisioningState": "Succeeded", "destinationPortRange": + "*", "protocol": "*", "destinationAddressPrefix": "*", "access": "Deny", "sourcePortRange": + "*", "description": "Deny all inbound traffic"}}, {"etag": "W/\"d8504aba-c21f-422d-ab19-c595af79b03e\"", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowVnetOutBound", - "properties": {"destinationPortRange": "*", "description": "Allow outbound traffic - from all VMs to all VMs in VNET", "direction": "Outbound", "protocol": "*", - "access": "Allow", "destinationAddressPrefix": "VirtualNetwork", "priority": - 65000, "sourceAddressPrefix": "VirtualNetwork", "provisioningState": "Succeeded", - "sourcePortRange": "*"}, "name": "AllowVnetOutBound"}, {"etag": "W/\"a89b28c2-a57e-49e9-845d-3cdf498d5777\"", + "name": "AllowVnetOutBound", "properties": {"sourceAddressPrefix": "VirtualNetwork", + "direction": "Outbound", "priority": 65000, "provisioningState": "Succeeded", + "destinationPortRange": "*", "protocol": "*", "destinationAddressPrefix": "VirtualNetwork", + "access": "Allow", "sourcePortRange": "*", "description": "Allow outbound traffic + from all VMs to all VMs in VNET"}}, {"etag": "W/\"d8504aba-c21f-422d-ab19-c595af79b03e\"", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowInternetOutBound", - "properties": {"destinationPortRange": "*", "description": "Allow outbound traffic - from all VMs to Internet", "direction": "Outbound", "protocol": "*", "access": - "Allow", "destinationAddressPrefix": "Internet", "priority": 65001, "sourceAddressPrefix": - "*", "provisioningState": "Succeeded", "sourcePortRange": "*"}, "name": "AllowInternetOutBound"}, - {"etag": "W/\"a89b28c2-a57e-49e9-845d-3cdf498d5777\"", "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/DenyAllOutBound", - "properties": {"destinationPortRange": "*", "description": "Deny all outbound - traffic", "direction": "Outbound", "protocol": "*", "access": "Deny", "destinationAddressPrefix": - "*", "priority": 65500, "sourceAddressPrefix": "*", "provisioningState": "Succeeded", - "sourcePortRange": "*"}, "name": "DenyAllOutBound"}], "provisioningState": "Succeeded"}, - "location": "westus"}, "provisioningState": "Succeeded"}, "name": "vm1Subnet"}' + "name": "AllowInternetOutBound", "properties": {"sourceAddressPrefix": "*", + "direction": "Outbound", "priority": 65001, "provisioningState": "Succeeded", + "destinationPortRange": "*", "protocol": "*", "destinationAddressPrefix": "Internet", + "access": "Allow", "sourcePortRange": "*", "description": "Allow outbound traffic + from all VMs to Internet"}}, {"etag": "W/\"d8504aba-c21f-422d-ab19-c595af79b03e\"", + "id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/DenyAllOutBound", + "name": "DenyAllOutBound", "properties": {"sourceAddressPrefix": "*", "direction": + "Outbound", "priority": 65500, "provisioningState": "Succeeded", "destinationPortRange": + "*", "protocol": "*", "destinationAddressPrefix": "*", "access": "Deny", "sourcePortRange": + "*", "description": "Deny all outbound traffic"}}], "resourceGuid": "83ba7695-815c-4917-815e-234b1c1ea744"}, + "location": "westus"}}, "name": "vm1Subnet"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['4339'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b63ffeec-1697-11e7-8f60-f4b7e2e85440] + x-ms-client-request-id: [26673678-3a91-11e7-afe4-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet?api-version=2017-03-01 response: body: {string: "{\r\n \"name\": \"vm1Subnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\ - ,\r\n \"etag\": \"W/\\\"32c1cb2b-991e-4536-8e5b-53c411b9c1e3\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"4b1faf1a-281a-4eb0-8225-5c85f49f8ed9\\\"\",\r\n \ \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ addressPrefix\": \"10.0.0.0/24\",\r\n \"networkSecurityGroup\": {\r\n \ \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg\"\ @@ -935,10 +919,10 @@ interactions: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\ \r\n }\r\n ]\r\n }\r\n}"} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/c401ae58-d935-4c57-88fb-9d74e801f0d4?api-version=2017-03-01'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/7780cb3c-66c8-45b8-9076-1b7ec01060c7?api-version=2017-03-01'] Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:57:31 GMT'] + Date: ['Tue, 16 May 2017 23:41:14 GMT'] Expires: ['-1'] Pragma: [no-cache] Retry-After: ['3'] @@ -947,7 +931,7 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['806'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -956,18 +940,19 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b63ffeec-1697-11e7-8f60-f4b7e2e85440] + x-ms-client-request-id: [26673678-3a91-11e7-afe4-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/c401ae58-d935-4c57-88fb-9d74e801f0d4?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7780cb3c-66c8-45b8-9076-1b7ec01060c7?api-version=2017-03-01 response: body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:57:34 GMT'] + Date: ['Tue, 16 May 2017 23:41:18 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -983,15 +968,16 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b63ffeec-1697-11e7-8f60-f4b7e2e85440] + x-ms-client-request-id: [26673678-3a91-11e7-afe4-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet?api-version=2017-03-01 response: body: {string: "{\r\n \"name\": \"vm1Subnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\ - ,\r\n \"etag\": \"W/\\\"63ff1aae-705e-4b66-a59d-6360a593c7ef\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"fd8c47c9-4595-4936-876b-68369f62ed80\\\"\",\r\n \ \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ addressPrefix\": \"10.0.0.0/24\",\r\n \"networkSecurityGroup\": {\r\n \ \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg\"\ @@ -1001,8 +987,8 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:57:35 GMT'] - ETag: [W/"63ff1aae-705e-4b66-a59d-6360a593c7ef"] + Date: ['Tue, 16 May 2017 23:41:18 GMT'] + ETag: [W/"fd8c47c9-4595-4936-876b-68369f62ed80"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -1018,21 +1004,122 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.6 msrest_azure/0.4.7 - networkmanagementclient/0.30.0 Azure-SDK-For-Python AZURECLI/TEST/2.0.1+dev] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [29636d2e-3a91-11e7-b928-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg?api-version=2017-03-01 + response: + body: {string: "{\r\n \"name\": \"newNsg\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg\"\ + ,\r\n \"etag\": \"W/\\\"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/networkSecurityGroups\",\r\n \"location\"\ + : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"resourceGuid\": \"83ba7695-815c-4917-815e-234b1c1ea744\",\r\n \ + \ \"securityRules\": [\r\n {\r\n \"name\": \"open-port-all\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/securityRules/open-port-all\"\ + ,\r\n \"etag\": \"W/\\\"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ + ,\r\n \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\"\ + : \"*\",\r\n \"destinationAddressPrefix\": \"*\",\r\n \"\ + access\": \"Allow\",\r\n \"priority\": 900,\r\n \"direction\"\ + : \"Inbound\"\r\n }\r\n }\r\n ],\r\n \"defaultSecurityRules\"\ + : [\r\n {\r\n \"name\": \"AllowVnetInBound\",\r\n \"id\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowVnetInBound\"\ + ,\r\n \"etag\": \"W/\\\"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"description\": \"Allow inbound traffic from all VMs in VNET\"\ + ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ + ,\r\n \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\"\ + : \"VirtualNetwork\",\r\n \"destinationAddressPrefix\": \"VirtualNetwork\"\ + ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ + \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ + \n \"name\": \"AllowAzureLoadBalancerInBound\",\r\n \"id\":\ + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowAzureLoadBalancerInBound\"\ + ,\r\n \"etag\": \"W/\\\"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"description\": \"Allow inbound traffic from azure load balancer\"\ + ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ + ,\r\n \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\"\ + : \"AzureLoadBalancer\",\r\n \"destinationAddressPrefix\": \"*\"\ + ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n\ + \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ + \n \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/DenyAllInBound\"\ + ,\r\n \"etag\": \"W/\\\"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"description\": \"Deny all inbound traffic\",\r\n \ + \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ + \ \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\"\ + : \"*\",\r\n \"destinationAddressPrefix\": \"*\",\r\n \"\ + access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ + : \"Inbound\"\r\n }\r\n },\r\n {\r\n \"name\": \"\ + AllowVnetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowVnetOutBound\"\ + ,\r\n \"etag\": \"W/\\\"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"description\": \"Allow outbound traffic from all VMs to all\ + \ VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ + : \"*\",\r\n \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\"\ + : \"VirtualNetwork\",\r\n \"destinationAddressPrefix\": \"VirtualNetwork\"\ + ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ + \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\ + \n \"name\": \"AllowInternetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowInternetOutBound\"\ + ,\r\n \"etag\": \"W/\\\"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"description\": \"Allow outbound traffic from all VMs to Internet\"\ + ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ + ,\r\n \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\"\ + : \"*\",\r\n \"destinationAddressPrefix\": \"Internet\",\r\n \ + \ \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n \ + \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\n \ + \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/DenyAllOutBound\"\ + ,\r\n \"etag\": \"W/\\\"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"description\": \"Deny all outbound traffic\",\r\n \ + \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ + \ \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\"\ + : \"*\",\r\n \"destinationAddressPrefix\": \"*\",\r\n \"\ + access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ + : \"Outbound\"\r\n }\r\n }\r\n ],\r\n \"subnets\": [\r\n\ + \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\ + \r\n }\r\n ]\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Tue, 16 May 2017 23:41:18 GMT'] + ETag: [W/"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68"] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['6043'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b9ddd81e-1697-11e7-a9bc-f4b7e2e85440] + x-ms-client-request-id: [298021f4-3a91-11e7-9cf2-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg?api-version=2017-03-01 response: body: {string: "{\r\n \"name\": \"newNsg\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg\"\ - ,\r\n \"etag\": \"W/\\\"caf86478-953e-48b0-a2db-a0548c82b687\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/networkSecurityGroups\",\r\n \"location\"\ : \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"2b91219b-09b1-428a-b93c-49083df6ba8f\",\r\n \ + ,\r\n \"resourceGuid\": \"83ba7695-815c-4917-815e-234b1c1ea744\",\r\n \ \ \"securityRules\": [\r\n {\r\n \"name\": \"open-port-all\"\ ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/securityRules/open-port-all\"\ - ,\r\n \"etag\": \"W/\\\"caf86478-953e-48b0-a2db-a0548c82b687\\\"\"\ + ,\r\n \"etag\": \"W/\\\"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ ,\r\n \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\"\ @@ -1041,7 +1128,7 @@ interactions: : \"Inbound\"\r\n }\r\n }\r\n ],\r\n \"defaultSecurityRules\"\ : [\r\n {\r\n \"name\": \"AllowVnetInBound\",\r\n \"id\"\ : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowVnetInBound\"\ - ,\r\n \"etag\": \"W/\\\"caf86478-953e-48b0-a2db-a0548c82b687\\\"\"\ + ,\r\n \"etag\": \"W/\\\"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from all VMs in VNET\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -1051,7 +1138,7 @@ interactions: \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowAzureLoadBalancerInBound\",\r\n \"id\":\ \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowAzureLoadBalancerInBound\"\ - ,\r\n \"etag\": \"W/\\\"caf86478-953e-48b0-a2db-a0548c82b687\\\"\"\ + ,\r\n \"etag\": \"W/\\\"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from azure load balancer\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -1060,7 +1147,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n\ \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/DenyAllInBound\"\ - ,\r\n \"etag\": \"W/\\\"caf86478-953e-48b0-a2db-a0548c82b687\\\"\"\ + ,\r\n \"etag\": \"W/\\\"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all inbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -1069,7 +1156,7 @@ interactions: access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ : \"Inbound\"\r\n }\r\n },\r\n {\r\n \"name\": \"\ AllowVnetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowVnetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"caf86478-953e-48b0-a2db-a0548c82b687\\\"\"\ + ,\r\n \"etag\": \"W/\\\"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to all\ \ VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ @@ -1078,7 +1165,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowInternetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/AllowInternetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"caf86478-953e-48b0-a2db-a0548c82b687\\\"\"\ + ,\r\n \"etag\": \"W/\\\"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to Internet\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -1087,7 +1174,7 @@ interactions: \ \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n \ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\n \ \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port/providers/Microsoft.Network/networkSecurityGroups/newNsg/defaultSecurityRules/DenyAllOutBound\"\ - ,\r\n \"etag\": \"W/\\\"caf86478-953e-48b0-a2db-a0548c82b687\\\"\"\ + ,\r\n \"etag\": \"W/\\\"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all outbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -1100,8 +1187,8 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 01 Apr 2017 04:57:37 GMT'] - ETag: [W/"caf86478-953e-48b0-a2db-a0548c82b687"] + Date: ['Tue, 16 May 2017 23:41:19 GMT'] + ETag: [W/"1849fbb6-9d1b-4064-a0ce-ac84b5cebf68"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] diff --git a/src/command_modules/azure-cli-vm/tests/test_vm_commands.py b/src/command_modules/azure-cli-vm/tests/test_vm_commands.py index 04b61dfbe..0040ba3f0 100644 --- a/src/command_modules/azure-cli-vm/tests/test_vm_commands.py +++ b/src/command_modules/azure-cli-vm/tests/test_vm_commands.py @@ -95,7 +95,7 @@ class VMOpenPortTest(ResourceGroupVCRTestBase): vm = self.vm_name # min params - apply to existing NIC (updates existing NSG) - nsg_id = self.cmd('vm open-port -g {} -n {} --port * --priority 900'.format(rg, vm))['networkSecurityGroup']['id'] + nsg_id = self.cmd('vm open-port -g {} -n {} --port * --priority 900'.format(rg, vm))['id'] nsg_name = os.path.split(nsg_id)[1] self.cmd('network nsg show -g {} -n {}'.format(rg, nsg_name), checks=JMESPathCheck("length(securityRules[?name == 'open-port-all'])", 1))
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 2, "test_score": 3 }, "num_modified_files": 4 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==2.0.1 -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_cdn&subdirectory=src/command_modules/azure-cli-cdn -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_cognitiveservices&subdirectory=src/command_modules/azure-cli-cognitiveservices -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_cosmosdb&subdirectory=src/command_modules/azure-cli-cosmosdb -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_interactive&subdirectory=src/command_modules/azure-cli-interactive -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_rdbms&subdirectory=src/command_modules/azure-cli-rdbms -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_sf&subdirectory=src/command_modules/azure-cli-sf -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@4417fb03c91b0caa5f88a72ca0372d5931c072d9#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.9 azure-graphrbac==0.30.0rc6 azure-keyvault==0.3.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==3.0.1 azure-mgmt-cdn==0.30.2 azure-mgmt-cognitiveservices==1.0.0 azure-mgmt-compute==1.0.0rc1 azure-mgmt-containerregistry==0.2.1 azure-mgmt-datalake-analytics==0.1.4 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.4 azure-mgmt-devtestlabs==2.0.0 azure-mgmt-dns==1.0.1 azure-mgmt-documentdb==0.1.3 azure-mgmt-iothub==0.2.2 azure-mgmt-keyvault==0.31.0 azure-mgmt-monitor==0.2.1 azure-mgmt-network==1.0.0rc3 azure-mgmt-nspkg==1.0.0 azure-mgmt-rdbms==0.1.0 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.1.0rc1 azure-mgmt-sql==0.4.0 azure-mgmt-storage==1.0.0rc1 azure-mgmt-trafficmanager==0.30.0 azure-mgmt-web==0.32.0 azure-monitor==0.3.0 azure-multiapi-storage==0.1.0 azure-nspkg==1.0.0 azure-servicefabric==5.6.130 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 futures==3.1.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 prompt-toolkit==3.0.36 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pydocumentdb==2.3.5 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 pytz==2025.2 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.7 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 vsts-cd-manager==1.0.2 wcwidth==0.2.13 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==2.0.1 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.9 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.3.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==3.0.1 - azure-mgmt-cdn==0.30.2 - azure-mgmt-cognitiveservices==1.0.0 - azure-mgmt-compute==1.0.0rc1 - azure-mgmt-containerregistry==0.2.1 - azure-mgmt-datalake-analytics==0.1.4 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.4 - azure-mgmt-devtestlabs==2.0.0 - azure-mgmt-dns==1.0.1 - azure-mgmt-documentdb==0.1.3 - azure-mgmt-iothub==0.2.2 - azure-mgmt-keyvault==0.31.0 - azure-mgmt-monitor==0.2.1 - azure-mgmt-network==1.0.0rc3 - azure-mgmt-nspkg==1.0.0 - azure-mgmt-rdbms==0.1.0 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.1.0rc1 - azure-mgmt-sql==0.4.0 - azure-mgmt-storage==1.0.0rc1 - azure-mgmt-trafficmanager==0.30.0 - azure-mgmt-web==0.32.0 - azure-monitor==0.3.0 - azure-multiapi-storage==0.1.0 - azure-nspkg==1.0.0 - azure-servicefabric==5.6.130 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - futures==3.1.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - prompt-toolkit==3.0.36 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pydocumentdb==2.3.5 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pytz==2025.2 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.7 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - vsts-cd-manager==1.0.2 - wcwidth==0.2.13 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMOpenPortTest::test_vm_open_port" ]
[ "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateLinuxSecretsScenarioTest::test_vm_create_linux_secrets", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateWindowsSecretsScenarioTest::test_vm_create_windows_secrets", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSCreateLinuxSecretsScenarioTest::test_vmss_create_linux_secrets" ]
[ "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMImageListByAliasesScenarioTest::test_vm_image_list_by_alias", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMUsageScenarioTest::test_vm_usage", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMImageListThruServiceScenarioTest::test_vm_images_list_thru_services", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMShowListSizesListIPAddressesScenarioTest::test_vm_show_list_sizes_list_ip_addresses", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSizeListScenarioTest::test_vm_size_list", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMImageListOffersScenarioTest::test_vm_image_list_offers", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMImageListPublishersScenarioTest::test_vm_image_list_publishers", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMImageListSkusScenarioTest::test_vm_image_list_skus", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMImageShowScenarioTest::test_vm_image_show", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMGeneralizeScenarioTest::test_vm_generalize", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMWindowsLicenseTest::test_windows_vm_license_type", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateFromUnmanagedDiskTest::test_vm_create_from_unmanaged_disk", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateWithSpecializedUnmanagedDiskTest::test_vm_create_with_specialized_unmanaged_disk", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMManagedDiskScenarioTest::test_managed_disk", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateAndStateModificationsScenarioTest::test_vm_create_state_modifications", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMNoWaitScenarioTest::test_vm_create_no_wait", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMAvailSetScenarioTest::test_vm_availset", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMExtensionScenarioTest::test_vm_extension", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMMachineExtensionImageScenarioTest::test_vm_machine_extension_image", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMExtensionImageSearchScenarioTest::test_vm_extension_image_search", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateUbuntuScenarioTest::test_vm_create_ubuntu", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMMultiNicScenarioTest::test_vm_create_multi_nics", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateNoneOptionsTest::test_vm_create_none_options", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMBootDiagnostics::test_vm_boot_diagnostics", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSExtensionInstallTest::test_vmss_extension", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::DiagnosticsExtensionInstallTest::test_diagnostics_extension_install", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateExistingOptions::test_vm_create_existing_options", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateExistingIdsOptions::test_vm_create_existing_ids_options", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateCustomIP::test_vm_create_custom_ip", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMDiskAttachDetachTest::test_vm_disk_attach_detach", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMUnmanagedDataDiskTest::test_vm_data_unmanaged_disk", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMCreateCustomDataScenarioTest::test_vm_create_custom_data", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSCreateAndModify::test_vmss_create_and_modify", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSCreateOptions::test_vmss_create_options", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSCreateNoneOptionsTest::test_vmss_create_none_options", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSCreateExistingOptions::test_vmss_create_existing_options", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSCreateExistingIdsOptions::test_vmss_create_existing_ids_options", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSVMsScenarioTest::test_vmss_vms", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSCustomDataScenarioTest::test_vmss_create_custom_data", "src/command_modules/azure-cli-vm/tests/test_vm_commands.py::VMSSNicScenarioTest::test_vmss_nics" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_azure-cli-3354
Azure__azure-cli-3373
5bb6b7bb83f5396ee9b6a8c5f458eeb629215703
2017-05-16 22:24:34
eb12ac454cbe1ddb59c86cdf2045e1912660e750
tjprescott: **monitor alert create** ``` Command az monitor alert create: Create a metric-based alert rule. Arguments --condition [Required]: The condition expression upon which to trigger the rule. Usage: --condition "METRIC {>,>=,<,<=} THRESHOLD {avg,min,max,total,last} PERIOD" Example: --condition "Percentage CPU > 60 avg 1h30m". --name -n [Required]: Name of the alert rule. --resource-group -g [Required]: Name of resource group. You can configure the default group using `az configure --defaults group=<name>`. --description : Free-text description of the rule. Defaults to the condition expression. --disabled : Create the rule in a disabled state. Allowed values: false, true. --location -l : Location. You can configure the default location using `az configure --defaults location=<location>`. --tags : Space separated tags in 'key[=value]' format. Use "" to clear existing tags. Action Arguments --action -a : Add an action to fire when the alert is triggered. Usage: --add-action TYPE KEY [ARG ...] Email: --add-action email bob@contoso.com ann@contoso.com Webhook: --add-action webhook https://www.contoso.com/alert apiKey=value Webhook: --add-action webhook https://www.contoso.com/alert?apiKey=value To specify multiple actions, add multiple --add-action ARGS entries. --email-service-owners : Email the service owners if an alert is triggered. Allowed values: false, true. Target Resource Arguments --target [Required]: Name or ID of the target resource. --target-namespace : Target resource provider namespace. --target-parent : Target resource parent path, if applicable. --target-type : Target resource type. Can also accept namespace/type format (Ex: 'Microsoft.Compute/virtualMachines)'). Examples Create a High CPU-based alert on a VM with no actions. az vm alert rule create -n rule1 -g <RG> --target <VM ID> --condition "Percentage CPU > 90 avg 5m" Create a High CPU-based alert on a VM with email and webhook actions. az vm alert rule create -n rule1 -g <RG> --target <VM ID> \ --condition "Percentage CPU > 90 avg 5m" \ --action email bob@contoso.com ann@contoso.com --email-service-owners \ --action webhook https://www.contoso.com/alerts?type=HighCPU \ --action webhook https://alerts.contoso.com apiKey=<KEY> type=HighCPU ``` tjprescott: **monitor alert update** ``` Command az monitor alert update: Update a metric-based alert rule. To specify the condition: --condition METRIC {>,>=,<,<=} THRESHOLD {avg,min,max,total,last} PERIOD. Arguments --description : Free-text description of the rule. --enabled --tags : Space separated tags in 'key[=value]' format. Use "" to clear existing tags. Resource Id Arguments --ids : One or more resource IDs (space delimited). If provided, no other 'Resource Id' arguments should be specified. --name -n : Name of the alert rule. --resource-group -g : Name of resource group. You can configure the default group using `az configure --defaults group=<name>`. Action Arguments --add-action -a : Add an action to fire when the alert is triggered. Usage: --add-action TYPE KEY [ARG ...] Email: --add-action email bob@contoso.com ann@contoso.com Webhook: --add-action webhook https://www.contoso.com/alert apiKey=value Webhook: --add-action webhook https://www.contoso.com/alert?apiKey=value To specify multiple actions, add multiple --add-action ARGS entries. --email-service-owners: Email the service owners if an alert is triggered. Allowed values: false, true. --remove-action -r : Remove one or more actions. Usage: --remove-action TYPE KEY [KEY ...] Email: --remove-action email bob@contoso.com ann@contoso.com Webhook: --remove-action webhook https://contoso.com/alert https://alerts.contoso.com. Condition Arguments --aggregation : Type of aggregation to apply based on --period. Allowed values: avg, last, max, min, total. --condition : The condition expression upon which to trigger the rule. Usage: --condition "METRIC {>,>=,<,<=} THRESHOLD {avg,min,max,total,last} PERIOD" Example: --condition "Percentage CPU > 60 avg 1h30m". --metric : Name of the metric to base the rule on. Values from: az monitor metrics list-definitions. --operator : How to compare the metric against the threshold. Allowed values: <, <=, >, >=. --period : Time span over which to apply --aggregation, in nDnHnMnS shorthand or full ISO8601 format. --threshold : Numeric threshold at which to trigger the alert. Target Resource Arguments --target : ID of the resource to target for the alert rule. --target-namespace : Target resource provider namespace. --target-parent : Target resource parent path, if applicable. --target-type : Target resource type. Can also accept namespace/type format (Ex: 'Microsoft.Compute/virtualMachines)'). ``` codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3373?src=pr&el=h1) Report > Merging [#3373](https://codecov.io/gh/Azure/azure-cli/pull/3373?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/4417fb03c91b0caa5f88a72ca0372d5931c072d9?src=pr&el=desc) will **increase** coverage by `0.14%`. > The diff coverage is `85.43%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/3373/graphs/tree.svg?token=2pog0TKvF8&width=650&height=150&src=pr)](https://codecov.io/gh/Azure/azure-cli/pull/3373?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #3373 +/- ## ========================================= + Coverage 70.66% 70.8% +0.14% ========================================= Files 391 392 +1 Lines 25255 25442 +187 Branches 3835 3875 +40 ========================================= + Hits 17847 18015 +168 - Misses 6272 6276 +4 - Partials 1136 1151 +15 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/3373?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...ure-cli-core/azure/cli/core/commands/parameters.py](https://codecov.io/gh/Azure/azure-cli/pull/3373?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL2NvbW1hbmRzL3BhcmFtZXRlcnMucHk=) | `72.47% <100%> (ø)` | :arrow_up: | | [...onitor/azure/cli/command\_modules/monitor/params.py](https://codecov.io/gh/Azure/azure-cli/pull/3373?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbW9uaXRvci9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL21vbml0b3IvcGFyYW1zLnB5) | `100% <100%> (ø)` | :arrow_up: | | [...itor/azure/cli/command\_modules/monitor/commands.py](https://codecov.io/gh/Azure/azure-cli/pull/3373?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbW9uaXRvci9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL21vbml0b3IvY29tbWFuZHMucHk=) | `100% <100%> (ø)` | :arrow_up: | | [...or/azure/cli/command\_modules/monitor/validators.py](https://codecov.io/gh/Azure/azure-cli/pull/3373?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbW9uaXRvci9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL21vbml0b3IvdmFsaWRhdG9ycy5weQ==) | `48.38% <100%> (+34.87%)` | :arrow_up: | | [...-monitor/azure/cli/command\_modules/monitor/help.py](https://codecov.io/gh/Azure/azure-cli/pull/3373?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbW9uaXRvci9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL21vbml0b3IvaGVscC5weQ==) | `100% <100%> (ø)` | :arrow_up: | | [...ure/cli/command\_modules/monitor/\_client\_factory.py](https://codecov.io/gh/Azure/azure-cli/pull/3373?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbW9uaXRvci9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL21vbml0b3IvX2NsaWVudF9mYWN0b3J5LnB5) | `77.27% <66.66%> (+35.6%)` | :arrow_up: | | [...onitor/azure/cli/command\_modules/monitor/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/3373?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbW9uaXRvci9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL21vbml0b3IvY3VzdG9tLnB5) | `71.91% <75%> (+4.63%)` | :arrow_up: | | [...nitor/azure/cli/command\_modules/monitor/actions.py](https://codecov.io/gh/Azure/azure-cli/pull/3373?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktbW9uaXRvci9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL21vbml0b3IvYWN0aW9ucy5weQ==) | `79.1% <79.1%> (ø)` | | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3373?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3373?src=pr&el=footer). Last update [4417fb0...0e9a686](https://codecov.io/gh/Azure/azure-cli/pull/3373?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/azure-cli.pyproj b/azure-cli.pyproj index 5316ef474..720fd0f7d 100644 --- a/azure-cli.pyproj +++ b/azure-cli.pyproj @@ -503,16 +503,25 @@ <Compile Include="command_modules\azure-cli-lab\azure\cli\command_modules\lab\__init__.py" /> <Compile Include="command_modules\azure-cli-lab\azure_bdist_wheel.py" /> <Compile Include="command_modules\azure-cli-lab\setup.py" /> + <Compile Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\actions.py"> + <SubType>Code</SubType> + </Compile> <Compile Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\commands.py" /> <Compile Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\custom.py" /> <Compile Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\help.py" /> <Compile Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\params.py" /> - <Compile Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\tests\test_custom.py" /> + <Compile Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\_exception_handler.py"> + <SubType>Code</SubType> + </Compile> + <Compile Include="command_modules\azure-cli-monitor\tests\test_custom.py" /> <Compile Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\validators.py" /> <Compile Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\_client_factory.py" /> <Compile Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\__init__.py" /> <Compile Include="command_modules\azure-cli-monitor\azure_bdist_wheel.py" /> <Compile Include="command_modules\azure-cli-monitor\setup.py" /> + <Compile Include="command_modules\azure-cli-monitor\tests\test_monitor.py"> + <SubType>Code</SubType> + </Compile> <Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\zone_file\configs.py" /> <Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\zone_file\exceptions.py" /> <Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\zone_file\make_zone_file.py" /> @@ -874,8 +883,7 @@ <Folder Include="command_modules\azure-cli-monitor\azure\cli\" /> <Folder Include="command_modules\azure-cli-monitor\azure\cli\command_modules\" /> <Folder Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\" /> - <Folder Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\tests\" /> - <Folder Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\tests\__pycache__\" /> + <Folder Include="command_modules\azure-cli-monitor\tests\" /> <Folder Include="command_modules\azure-cli-network\azure\cli\command_modules\network\zone_file\" /> <Folder Include="command_modules\azure-cli-network\tests\" /> <Folder Include="command_modules\azure-cli-network\tests\zone_files\" /> diff --git a/src/azure-cli-core/HISTORY.rst b/src/azure-cli-core/HISTORY.rst index b66c03554..103f25a5c 100644 --- a/src/azure-cli-core/HISTORY.rst +++ b/src/azure-cli-core/HISTORY.rst @@ -6,6 +6,7 @@ Release History unreleased ^^^^^^^^^^^^^^^^^^ * Command paths are no longer case sensitive. +* Certain boolean-type parameters are no longer case sensitive. 2.0.6 (2017-05-09) ^^^^^^^^^^^^^^^^^^ diff --git a/src/azure-cli-core/azure/cli/core/commands/parameters.py b/src/azure-cli-core/azure/cli/core/commands/parameters.py index f33c9509c..71a80e0e3 100644 --- a/src/azure-cli-core/azure/cli/core/commands/parameters.py +++ b/src/azure-cli-core/azure/cli/core/commands/parameters.py @@ -148,12 +148,12 @@ def three_state_flag(positive_label='true', negative_label='false', invert=False def __call__(self, parser, namespace, values, option_string=None): if invert: if values: - values = positive_label if values == negative_label else negative_label + values = positive_label if values.lower() == negative_label else negative_label else: values = values or negative_label else: values = values or positive_label - setattr(namespace, self.dest, values == positive_label) + setattr(namespace, self.dest, values.lower() == positive_label) params = { 'choices': CaseInsensitiveList(choices), diff --git a/src/command_modules/azure-cli-monitor/HISTORY.rst b/src/command_modules/azure-cli-monitor/HISTORY.rst index e488c756b..d71675a7b 100644 --- a/src/command_modules/azure-cli-monitor/HISTORY.rst +++ b/src/command_modules/azure-cli-monitor/HISTORY.rst @@ -7,6 +7,19 @@ unreleased +++++++++++++++++++++ * Include autoscale template file to fix `az monitor autoscale-settings get-parameters-template` command (#3349) +* BC: `monitor alert-rule-incidents list` renamed `monitor alert list-incidents` +* BC: `monitor alert-rule-incidents show` renamed `monitor alert show-incident` +* BC: `monitor metric-defintions list` renamed `monitor metrics list-definitions` +* BC: `monitor alert-rules` renamed `monitor alert` +* BC: `monitor alert create` completely revamped. `condition` and `action` no longer accepts JSON. + Adds numerous parameters to simplify the rule creation process. `location` no longer required. + Added name or ID support for target. + `--alert-rule-resource-name` removed. `is-enabled` renamed `enabled` and no longer required. + `description` defaults based on the supplied condition. Added examples to help clarifiy the + new format. +* BC: Support names or IDs for `monitor metric` commands. +* `monitor alert rule update` - Added numerous convenience arguments to improve usability. Added + examples to explain usage of the new arguments. 0.0.4 (2017-05-09) +++++++++++++++++++++ diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_client_factory.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_client_factory.py index 4664711f2..62c0c5062 100644 --- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_client_factory.py +++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_client_factory.py @@ -5,46 +5,46 @@ # MANAGEMENT CLIENT FACTORIES -def get_monitor_management_client(_): +def cf_monitor(_): from azure.mgmt.monitor import MonitorManagementClient from azure.cli.core.commands.client_factory import get_mgmt_service_client return get_mgmt_service_client(MonitorManagementClient) -def get_monitor_autoscale_settings_operation(kwargs): - return get_monitor_management_client(kwargs).autoscale_settings +def cf_alert_rules(kwargs): + return cf_monitor(kwargs).alert_rules -def get_monitor_diagnostic_settings_operation(kwargs): - return get_monitor_management_client(kwargs).service_diagnostic_settings +def cf_alert_rule_incidents(kwargs): + return cf_monitor(kwargs).alert_rule_incidents -def get_monitor_alert_rules_operation(kwargs): - return get_monitor_management_client(kwargs).alert_rules +def cf_autoscale(kwargs): + return cf_monitor(kwargs).autoscale_settings -def get_monitor_alert_rule_incidents_operation(kwargs): - return get_monitor_management_client(kwargs).alert_rule_incidents +def cf_diagnostics(kwargs): + return cf_monitor(kwargs).service_diagnostic_settings -def get_monitor_log_profiles_operation(kwargs): - return get_monitor_management_client(kwargs).log_profiles +def cf_log_profiles(kwargs): + return cf_monitor(kwargs).log_profiles # DATA CLIENT FACTORIES -def get_monitor_client(_): +def cf_monitor_data(_): from azure.monitor import MonitorClient from azure.cli.core.commands.client_factory import get_mgmt_service_client return get_mgmt_service_client(MonitorClient) -def get_monitor_activity_log_operation(kwargs): - return get_monitor_client(kwargs).activity_logs +def cf_metrics(kwargs): + return cf_monitor_data(kwargs).metrics -def get_monitor_metric_definitions_operation(kwargs): - return get_monitor_client(kwargs).metric_definitions +def cf_metric_def(kwargs): + return cf_monitor_data(kwargs).metric_definitions -def get_monitor_metrics_operation(kwargs): - return get_monitor_client(kwargs).metrics +def cf_activity_log(kwargs): + return cf_monitor_data(kwargs).activity_logs diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_exception_handler.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_exception_handler.py new file mode 100644 index 000000000..f4915d921 --- /dev/null +++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_exception_handler.py @@ -0,0 +1,18 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core.util import CLIError + + +def monitor_exception_handler(ex): + from azure.mgmt.monitor.models import ErrorResponseException + if hasattr(ex, 'inner_exception') and 'MonitoringService' in ex.inner_exception.message: + raise CLIError(ex.inner_exception.code) + elif isinstance(ex, ErrorResponseException): + raise CLIError(ex) + else: + import sys + from six import reraise + reraise(*sys.exc_info()) diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_help.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_help.py index df03bc6dd..90df287da 100644 --- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_help.py +++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_help.py @@ -11,19 +11,143 @@ helps['monitor'] = """ type: group short-summary: Commands to manage Azure Monitor service. """ -# MANAGEMENT COMMANDS HELPS -helps['monitor alert-rules'] = """ - type: group - short-summary: Commands to manage alerts assigned to Azure resources. - """ -helps['monitor alert-rules update'] = """ - type: command - short-summary: Updates an alert rule. - """ -helps['monitor alert-rule-incidents'] = """ - type: group - short-summary: Commands to manage alert rule incidents. - """ + +# region Alerts + +helps['monitor alert'] = """ + type: group + short-summary: Commands to manage metric-based alert rules. + """ + +helps['monitor alert create'] = """ + type: command + short-summary: Create a metric-based alert rule. + parameters: + - name: --action -a + short-summary: Add an action to fire when the alert is triggered. + long-summary: | + Usage: --action TYPE KEY [ARG ...] + Email: --action email bob@contoso.com ann@contoso.com + Webhook: --action webhook https://www.contoso.com/alert apiKey=value + Webhook: --action webhook https://www.contoso.com/alert?apiKey=value + To specify multiple actions, add multiple --add-action ARGS entries. + - name: --description + short-summary: Free-text description of the rule. Defaults to the condition expression. + - name: --disabled + short-summary: Create the rule in a disabled state. + - name: --condition + short-summary: The condition expression upon which to trigger the rule. + long-summary: | + Usage: --condition "METRIC {>,>=,<,<=} THRESHOLD {avg,min,max,total,last} PERIOD" + Example: --condition "Percentage CPU > 60 avg 1h30m" + - name: --email-service-owners + short-summary: Email the service owners if an alert is triggered. + examples: + - name: Create a High CPU-based alert on a VM with no actions. + text: > + az vm alert rule create -n rule1 -g <RG> --target <VM ID> --condition "Percentage CPU > 90 avg 5m" + - name: Create a High CPU-based alert on a VM with email and webhook actions. + text: | + az vm alert rule create -n rule1 -g <RG> --target <VM ID> \\ + --condition "Percentage CPU > 90 avg 5m" \\ + --action email bob@contoso.com ann@contoso.com --email-service-owners \\ + --action webhook https://www.contoso.com/alerts?type=HighCPU \\ + --action webhook https://alerts.contoso.com apiKey=<KEY> type=HighCPU +""" + +helps['monitor alert update'] = """ + type: command + short-summary: Update a metric-based alert rule. + long-summary: | + To specify the condition: + --condition METRIC {>,>=,<,<=} THRESHOLD {avg,min,max,total,last} PERIOD + parameters: + - name: --target + short-summary: ID of the resource to target for the alert rule. + - name: --description + short-summary: Free-text description of the rule. + - name: --condition + short-summary: The condition expression upon which to trigger the rule. + long-summary: | + Usage: --condition "METRIC {>,>=,<,<=} THRESHOLD {avg,min,max,total,last} PERIOD" + Example: --condition "Percentage CPU > 60 avg 1h30m" + - name: --add-action -a + short-summary: Add an action to fire when the alert is triggered. + long-summary: | + Usage: --add-action TYPE KEY [ARG ...] + Email: --add-action email bob@contoso.com ann@contoso.com + Webhook: --add-action webhook https://www.contoso.com/alert apiKey=value + Webhook: --add-action webhook https://www.contoso.com/alert?apiKey=value + To specify multiple actions, add multiple --add-action ARGS entries. + - name: --remove-action -r + short-summary: Remove one or more actions. + long-summary: | + Usage: --remove-action TYPE KEY [KEY ...] + Email: --remove-action email bob@contoso.com ann@contoso.com + Webhook: --remove-action webhook https://contoso.com/alert https://alerts.contoso.com + - name: --email-service-owners + short-summary: Email the service owners if an alert is triggered. + - name: --metric + short-summary: Name of the metric to base the rule on. + populator-commands: + - az monitor metrics list-definitions + - name: --operator + short-summary: How to compare the metric against the threshold. + - name: --threshold + short-summary: Numeric threshold at which to trigger the alert. + - name: --aggregation + short-summary: Type of aggregation to apply based on --period. + - name: --period + short-summary: > + Time span over which to apply --aggregation, in nDnHnMnS shorthand or full ISO8601 format. +""" + +helps['monitor alert delete'] = """ + type: command + short-summary: Delete an alert rule. + """ + +helps['monitor alert list'] = """ + type: command + short-summary: List alert rules in a resource group. + """ + +helps['monitor alert show'] = """ + type: command + short-summary: Show an alert rule. + """ + +helps['monitor alert show-incident'] = """ + type: command + short-summary: Show details of an alert rule incident. + """ + +helps['monitor alert list-incidents'] = """ + type: command + short-summary: List all incidents for an alert rule. + """ + +# endregion + +# region Metrics + +helps['monitor metrics'] = """ + type: group + short-summary: Commands to view Azure resource metrics. +""" + +helps['monitor metrics list'] = """ + type: command + short-summary: List metric values for a resource. +""" + +helps['monitor metrics list-definitions'] = """ + type: command + short-summary: List metric definitions for a resource. +""" + +# endregion + helps['monitor log-profiles'] = """ type: group short-summary: Commands to manage the log profiles assigned to Azure subscription. @@ -79,16 +203,8 @@ helps['monitor autoscale-settings update'] = """ type: command short-summary: Updates an autoscale setting. """ -# DATA COMMANDS HELPS + helps['monitor activity-log'] = """ - type: group - short-summary: Commands to manage activity log. - """ -helps['monitor metrics'] = """ - type: group - short-summary: Commands to manage metrics. - """ -helps['monitor metric-definitions'] = """ - type: group - short-summary: Commands to manage metric definitions. - """ + type: group + short-summary: Commands to manage activity log. +""" diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/actions.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/actions.py new file mode 100644 index 000000000..f3f748db1 --- /dev/null +++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/actions.py @@ -0,0 +1,99 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import argparse +import re + +from azure.cli.core.util import CLIError +from azure.cli.command_modules.monitor.custom import operator_map, aggregation_map + + +def period_type(value): + + def _get_substring(indices): + if indices == tuple([-1, -1]): + return '' + else: + return value[indices[0]: indices[1]] + + regex = r'(p)?(\d+y)?(\d+m)?(\d+d)?(t)?(\d+h)?(\d+m)?(\d+s)?' + match = re.match(regex, value.lower()) + match_len = match.regs[0] + if match_len != tuple([0, len(value)]): + raise ValueError + # simply return value if a valid ISO8601 string is supplied + if match.regs[1] != tuple([-1, -1]) and match.regs[5] != tuple([-1, -1]): + return value + else: + # if shorthand is used, only support days, minutes, hours, seconds + # ensure M is interpretted as minutes + days = _get_substring(match.regs[4]) + minutes = _get_substring(match.regs[6]) or _get_substring(match.regs[3]) + hours = _get_substring(match.regs[7]) + seconds = _get_substring(match.regs[8]) + return 'P{}T{}{}{}'.format(days, minutes, hours, seconds).upper() + + +# pylint: disable=too-few-public-methods +class ConditionAction(argparse.Action): + def __call__(self, parser, namespace, values, option_string=None): + from azure.mgmt.monitor.models import ThresholdRuleCondition, RuleMetricDataSource + # get default description if not specified + if namespace.description is None: + namespace.description = ' '.join(values) + if len(values) == 1: + # workaround because CMD.exe eats > character... Allows condition to be + # specified as a quoted expression + values = values[0].split(' ') + if len(values) < 5: + raise CLIError('usage error: --condition METRIC {>,>=,<,<=} THRESHOLD {avg,min,max,total,last} DURATION') + metric_name = ' '.join(values[:-4]) + operator = operator_map[values[-4]] + threshold = int(values[-3]) + aggregation = aggregation_map[values[-2].lower()] + window = period_type(values[-1]) + metric = RuleMetricDataSource(None, metric_name) # target URI will be filled in later + condition = ThresholdRuleCondition(operator, threshold, metric, window, aggregation) + namespace.condition = condition + + +# pylint: disable=protected-access +class AlertAddAction(argparse._AppendAction): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + super(AlertAddAction, self).__call__(parser, namespace, action, option_string) + + def get_action(self, values, option_string): # pylint: disable=no-self-use + _type = values[0].lower() + action = None + if _type == 'email': + from azure.mgmt.monitor.models import RuleEmailAction + action = RuleEmailAction(custom_emails=values[1:]) + elif _type == 'webhook': + from azure.mgmt.monitor.models import RuleWebhookAction + uri = values[1] + try: + properties = dict(x.split('=', 1) for x in values[2:]) + except ValueError: + raise CLIError('usage error: {} webhook URI [KEY=VALUE ...]'.format(option_string)) + action = RuleWebhookAction(uri, properties) # pylint: disable=redefined-variable-type + else: + raise CLIError('usage error: {} TYPE KEY [ARGS]'.format(option_string)) + + return action + + +class AlertRemoveAction(argparse._AppendAction): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + super(AlertRemoveAction, self).__call__(parser, namespace, action, option_string) + + def get_action(self, values, option_string): # pylint: disable=no-self-use + # TYPE is artificially enforced to create consistency with the --add-action argument + # but it could be enhanced to do additional validation in the future. + _type = values[0].lower() + if _type not in ['email', 'webhook']: + raise CLIError('usage error: {} TYPE KEY [KEY ...]'.format(option_string)) + return values[1:] diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/commands.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/commands.py index 620c42ba1..2abc7c7f4 100644 --- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/commands.py +++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/commands.py @@ -3,99 +3,92 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from ._client_factory import (get_monitor_alert_rules_operation, - get_monitor_alert_rule_incidents_operation, - get_monitor_log_profiles_operation, - get_monitor_autoscale_settings_operation, - get_monitor_diagnostic_settings_operation, - get_monitor_activity_log_operation, - get_monitor_metric_definitions_operation, - get_monitor_metrics_operation) -from azure.cli.core.sdk.util import (ServiceGroup, create_service_adapter) +# pylint: disable=line-too-long + +from ._client_factory import \ + (cf_alert_rules, cf_metrics, cf_metric_def, cf_alert_rule_incidents, cf_log_profiles, + cf_autoscale, cf_diagnostics, cf_activity_log) +from ._exception_handler import monitor_exception_handler +from azure.cli.core.commands import cli_command +from azure.cli.core.commands.arm import cli_generic_update_command + + +def monitor_command(*args, **kwargs): + cli_command(*args, exception_handler=monitor_exception_handler, **kwargs) # MANAGEMENT COMMANDS -custom_operations = create_service_adapter('azure.cli.command_modules.monitor.custom') - -alert_rules_operations = create_service_adapter( - 'azure.mgmt.monitor.operations.alert_rules_operations', - 'AlertRulesOperations') - -with ServiceGroup(__name__, get_monitor_alert_rules_operation, alert_rules_operations) as s: - with s.group('monitor alert-rules') as c: - c.command('create', 'create_or_update') - c.command('delete', 'delete') - c.command('show', 'get') - c.command('list', 'list_by_resource_group') - c.generic_update_command('update', 'get', 'create_or_update') - -alert_rule_incidents_operations = create_service_adapter( - 'azure.mgmt.monitor.operations.alert_rule_incidents_operations', - 'AlertRuleIncidentsOperations') - -with ServiceGroup(__name__, get_monitor_alert_rule_incidents_operation, - alert_rule_incidents_operations) as s: - with s.group('monitor alert-rule-incidents') as c: - c.command('show', 'get') - c.command('list', 'list_by_alert_rule') - -log_profiles_operations = create_service_adapter( - 'azure.mgmt.monitor.operations.log_profiles_operations', - 'LogProfilesOperations') - -with ServiceGroup(__name__, get_monitor_log_profiles_operation, - log_profiles_operations) as s: - with s.group('monitor log-profiles') as c: - c.command('create', 'create_or_update') - c.command('delete', 'delete') - c.command('show', 'get') - c.command('list', 'list') - c.generic_update_command('update', 'get', 'create_or_update') - -diagnostic_settings_operations = create_service_adapter( - 'azure.mgmt.monitor.operations.service_diagnostic_settings_operations', - 'ServiceDiagnosticSettingsOperations') - -with ServiceGroup(__name__, get_monitor_diagnostic_settings_operation, - diagnostic_settings_operations) as s: - with s.group('monitor diagnostic-settings') as c: - c.command('show', 'get') - c.generic_update_command('update', 'get', 'create_or_update') - -with ServiceGroup(__name__, get_monitor_diagnostic_settings_operation, custom_operations) as s: - with s.group('monitor diagnostic-settings') as c: - c.command('create', 'create_diagnostics_settings') - -autoscale_settings_operations = create_service_adapter( - 'azure.mgmt.monitor.operations.autoscale_settings_operations', - 'AutoscaleSettingsOperations') - -with ServiceGroup(__name__, get_monitor_autoscale_settings_operation, - autoscale_settings_operations) as s: - with s.group('monitor autoscale-settings') as c: - c.command('create', 'create_or_update') - c.command('delete', 'delete') - c.command('show', 'get') - c.command('list', 'list_by_resource_group') - c.generic_update_command('update', 'get', 'create_or_update') - -with ServiceGroup(__name__, get_monitor_autoscale_settings_operation, - custom_operations) as s: - with s.group('monitor autoscale-settings') as c: - c.command('get-parameters-template', 'scaffold_autoscale_settings_parameters') - - -# DATA COMMANDS -with ServiceGroup(__name__, get_monitor_activity_log_operation, - custom_operations) as s: - with s.group('monitor activity-log') as c: - c.command('list', 'list_activity_log') - -with ServiceGroup(__name__, get_monitor_metric_definitions_operation, - custom_operations) as s: - with s.group('monitor metric-definitions') as c: - c.command('list', 'list_metric_definitions') - -with ServiceGroup(__name__, get_monitor_metrics_operation, custom_operations) as s: - with s.group('monitor metrics') as c: - c.command('list', 'list_metrics') + +custom_path = 'azure.cli.command_modules.monitor.custom#' + +# region Alerts + +ar_path = 'azure.mgmt.monitor.operations.alert_rules_operations#AlertRulesOperations.' + +monitor_command(__name__, 'monitor alert create', custom_path + 'create_metric_rule', cf_alert_rules) +monitor_command(__name__, 'monitor alert delete', ar_path + 'delete', cf_alert_rules) +monitor_command(__name__, 'monitor alert show', ar_path + 'get', cf_alert_rules) +monitor_command(__name__, 'monitor alert list', ar_path + 'list_by_resource_group', cf_alert_rules) +cli_generic_update_command(__name__, 'monitor alert update', + ar_path + 'get', ar_path + 'create_or_update', cf_alert_rules, + custom_function_op=custom_path + 'update_metric_rule', + exception_handler=monitor_exception_handler) + +ari_path = 'azure.mgmt.monitor.operations.alert_rule_incidents_operations#AlertRuleIncidentsOperations.' +monitor_command(__name__, 'monitor alert show-incident', ari_path + 'get', cf_alert_rule_incidents) +monitor_command(__name__, 'monitor alert list-incidents', ari_path + 'list_by_alert_rule', cf_alert_rule_incidents) + +# endregion + +# region Metrics + +monitor_command(__name__, 'monitor metrics list', custom_path + 'list_metrics', cf_metrics) +monitor_command(__name__, 'monitor metrics list-definitions', custom_path + 'list_metric_definitions', cf_metric_def) + +# endregion + +# region Log Profiles + +lp_path = 'azure.mgmt.monitor.operations.log_profiles_operations#LogProfilesOperations.' +monitor_command(__name__, 'monitor log-profiles create', lp_path + 'create_or_update', cf_log_profiles) +monitor_command(__name__, 'monitor log-profiles delete', lp_path + 'delete', cf_log_profiles) +monitor_command(__name__, 'monitor log-profiles show', lp_path + 'get', cf_log_profiles) +monitor_command(__name__, 'monitor log-profiles list', lp_path + 'list', cf_log_profiles) +cli_generic_update_command(__name__, 'monitor log-profiles update', + lp_path + 'get', lp_path + 'create_or_update', cf_log_profiles, + exception_handler=monitor_exception_handler) + +# endregion + +# region Diagnostic Settings + +diag_path = 'azure.mgmt.monitor.operations.service_diagnostic_settings_operations#ServiceDiagnosticSettingsOperations.' +monitor_command(__name__, 'monitor diagnostic-settings create', custom_path + 'create_diagnostics_settings', cf_diagnostics) +monitor_command(__name__, 'monitor diagnostic-settings show', diag_path + 'get', cf_diagnostics) +cli_generic_update_command(__name__, 'monitor diagnostic-settings update', + diag_path + 'get', diag_path + 'create_or_update', cf_diagnostics, + exception_handler=monitor_exception_handler) + +# endregion + + +# region Autoscale + +autoscale_path = 'azure.mgmt.monitor.operations.autoscale_settings_operations#AutoscaleSettingsOperations.' + +monitor_command(__name__, 'monitor autoscale-settings create', autoscale_path + 'create_or_update', cf_autoscale) +monitor_command(__name__, 'monitor autoscale-settings delete', autoscale_path + 'delete', cf_autoscale) +monitor_command(__name__, 'monitor autoscale-settings show', autoscale_path + 'get', cf_autoscale) +monitor_command(__name__, 'monitor autoscale-settings list', autoscale_path + 'list_by_resource_group', cf_autoscale) +monitor_command(__name__, 'monitor autoscale-settings get-parameters-template', custom_path + 'scaffold_autoscale_settings_parameters', cf_autoscale) +cli_generic_update_command(__name__, 'monitor autoscale-settings update', + autoscale_path + 'get', autoscale_path + 'create_or_update', cf_autoscale, + exception_handler=monitor_exception_handler) + +# endregion + +# region Activity Log + +monitor_command(__name__, 'monitor activity-log list', custom_path + 'list_activity_log', cf_activity_log) + +# endregion diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/custom.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/custom.py index f838dcaf8..6f4d4a14d 100644 --- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/custom.py +++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/custom.py @@ -6,6 +6,7 @@ from __future__ import print_function import datetime import os from azure.cli.core.util import get_file_json, CLIError +from azure.mgmt.monitor.models import ConditionOperator, TimeAggregationOperator # 1 hour in milliseconds DEFAULT_QUERY_TIME_RANGE = 3600000 @@ -13,14 +14,135 @@ DEFAULT_QUERY_TIME_RANGE = 3600000 # ISO format with explicit indication of timezone DATE_TIME_FORMAT = '%Y-%m-%dT%H:%M:%SZ' +# region Alerts + +operator_map = { + '>': ConditionOperator.greater_than.value, + '>=': ConditionOperator.greater_than_or_equal.value, + '<': ConditionOperator.less_than, + '<=': ConditionOperator.less_than_or_equal +} + + +aggregation_map = { + 'avg': TimeAggregationOperator.average.value, + 'min': TimeAggregationOperator.minimum.value, + 'max': TimeAggregationOperator.maximum.value, + 'total': TimeAggregationOperator.total.value, + 'last': TimeAggregationOperator.last.value +} + + +def _parse_actions(actions): + """ Actions come in as a combined list. This method separates the webhook actions into a + separate collection and combines any number of email actions into a single email collection + and a single value for `email_service_owners`. If any email action contains a True value + for `send_to_service_owners` then it is assumed the entire value should be True. """ + from azure.mgmt.monitor.models import RuleEmailAction, RuleWebhookAction + actions = actions or [] + email_service_owners = None + webhooks = [x for x in actions if isinstance(x, RuleWebhookAction)] + custom_emails = set() + for action in actions: + if isinstance(action, RuleEmailAction): + if action.send_to_service_owners: + email_service_owners = True + custom_emails = custom_emails | set(action.custom_emails) + return list(custom_emails), webhooks, email_service_owners + + +def _parse_action_removals(actions): + """ Separates the combined list of keys to remove into webhooks and emails. """ + flattened = list(set([x for sublist in actions for x in sublist])) + emails = [] + webhooks = [] + for item in flattened: + if item.startswith('http://') or item.startswith('https://'): + webhooks.append(item) + else: + emails.append(item) + return emails, webhooks + + +def create_metric_rule(client, resource_group_name, rule_name, target, condition, + description=None, disabled=False, location=None, tags=None, + email_service_owners=False, actions=None): + from azure.mgmt.monitor.models import AlertRuleResource, RuleEmailAction, RuleWebhookAction + condition.data_source.resource_uri = target + custom_emails, webhooks, _ = _parse_actions(actions) + actions = [RuleEmailAction(email_service_owners, custom_emails)] + (webhooks or []) + rule = AlertRuleResource(location, rule_name, not disabled, + condition, tags, description, actions) + return client.create_or_update(resource_group_name, rule_name, rule) + + +def update_metric_rule(instance, target=None, condition=None, description=None, enabled=None, + metric=None, operator=None, threshold=None, aggregation=None, period=None, + tags=None, email_service_owners=None, add_actions=None, remove_actions=None): + # Update general properties + if description is not None: + instance.description = description + if enabled is not None: + instance.is_enabled = enabled + if tags is not None: + instance.tags = tags + + # Update conditions + if condition is not None: + target = target or instance.condition.data_source.resource_uri + instance.condition = condition + + if metric is not None: + instance.condition.data_source.metric_name = metric + if operator is not None: + instance.condition.operator = operator_map[operator] + if threshold is not None: + instance.condition.threshold = threshold + if aggregation is not None: + instance.condition.time_aggregation = aggregation_map[aggregation] + if period is not None: + instance.condition.window_size = period + + if target is not None: + instance.condition.data_source.resource_uri = target + + # Update actions + emails, webhooks, curr_email_service_owners = _parse_actions(instance.actions) + + # process removals + if remove_actions is not None: + removed_emails, removed_webhooks = _parse_action_removals(remove_actions) + emails = [x for x in emails if x not in removed_emails] + webhooks = [x for x in webhooks if x.service_uri not in removed_webhooks] + + # process additions + if add_actions is not None: + added_emails, added_webhooks, _ = _parse_actions(add_actions) + emails = list(set(emails) | set(added_emails)) + webhooks = webhooks + added_webhooks + + # Replace the existing actions array. This potentially restructures rules that were created + # via other methods (Portal, ARM template). However, the functionality of these rules should + # be the same. + from azure.mgmt.monitor.models import RuleEmailAction + if email_service_owners is None: + email_service_owners = curr_email_service_owners + actions = [RuleEmailAction(email_service_owners, emails)] + webhooks + instance.actions = actions + + return instance + +# endregion + -def list_metric_definitions(client, resource_id, metric_names=None): +# pylint: disable=unused-argument +def list_metric_definitions(client, resource, resource_group_name=None, metric_names=None): '''Commands to manage metric definitions. :param str resource_id: The identifier of the resource :param str metric_names: The list of metric names ''' odata_filter = _metric_names_filter_builder(metric_names) - metric_definitions = client.list(resource_id, filter=odata_filter) + metric_definitions = client.list(resource, filter=odata_filter) return list(metric_definitions) @@ -34,7 +156,8 @@ def _metric_names_filter_builder(metric_names=None): return ' or '.join(filters) -def list_metrics(client, resource_id, time_grain, +# pylint: disable=unused-argument +def list_metrics(client, resource, time_grain, resource_group_name=None, start_time=None, end_time=None, metric_names=None): '''Lists the metric values for a resource. :param str resource_id: The identifier of the resource @@ -49,7 +172,7 @@ def list_metrics(client, resource_id, time_grain, :param str metric_names: The space separated list of metric names ''' odata_filter = _metrics_odata_filter_builder(time_grain, start_time, end_time, metric_names) - metrics = client.list(resource_id, filter=odata_filter) + metrics = client.list(resource, filter=odata_filter) return list(metrics) diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/params.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/params.py index 460194968..a42b1b0d5 100644 --- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/params.py +++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/params.py @@ -5,39 +5,84 @@ from azure.cli.core.sdk.util import ParametersContext from azure.cli.core.util import get_json_object -from azure.cli.command_modules.monitor.validators import (validate_diagnostic_settings) +from azure.cli.core.commands import \ + (CliArgumentType, register_cli_argument, register_extra_cli_argument) +from azure.cli.core.commands.parameters import \ + (location_type, enum_choice_list, tags_type, three_state_flag) +from azure.cli.core.commands.validators import get_default_location_from_resource_group -with ParametersContext(command='monitor alert-rules') as c: - c.register_alias('name', ('--azure-resource-name',)) - c.register_alias('rule_name', ('--name', '-n')) +from azure.cli.command_modules.monitor.actions import \ + (AlertAddAction, AlertRemoveAction, ConditionAction, period_type) +from azure.cli.command_modules.monitor.custom import operator_map, aggregation_map +from azure.cli.command_modules.monitor.validators import \ + (validate_diagnostic_settings, get_target_resource_validator) +from azure.mgmt.monitor.models.monitor_management_client_enums import \ + (ConditionOperator, TimeAggregationOperator) +from azure.mgmt.monitor.models import (LogProfileResource, RetentionPolicy) -with ParametersContext(command='monitor alert-rules create') as c: - from azure.mgmt.monitor.models.alert_rule_resource import AlertRuleResource +# pylint: disable=line-too-long - c.expand('parameters', AlertRuleResource) - c.register('condition', ('--condition',), - type=get_json_object, - help='JSON encoded condition configuration. Use @{file} to load from a file.') - c.register('actions', ('--actions',), - type=get_json_object, - help='JSON encoded array of actions that are performed when the alert ' - 'rule becomes active, and when an alert condition is resolved. ' - 'Use @{file} to load from a file.') -with ParametersContext(command='monitor alert-rules show') as c: - c.argument('rule_name', id_part='name') +def register_resource_parameter(command, dest, arg_group=None, required=True): + """ Helper method to add the extra parameters needed to support specifying name or ID + for target resources. """ + register_cli_argument(command, dest, options_list=['--{}'.format(dest)], arg_group=arg_group, required=required, validator=get_target_resource_validator(dest, required), help="Name or ID of the target resource.") + register_extra_cli_argument(command, 'namespace', options_list=['--{}-namespace'.format(dest)], arg_group=arg_group, help="Target resource provider namespace.") + register_extra_cli_argument(command, 'parent', options_list=['--{}-parent'.format(dest)], arg_group=arg_group, help="Target resource parent path, if applicable.") + register_extra_cli_argument(command, 'resource_type', options_list=['--{}-type'.format(dest)], arg_group=arg_group, help="Target resource type. Can also accept namespace/type format (Ex: 'Microsoft.Compute/virtualMachines)')") -with ParametersContext(command='monitor alert-rules delete') as c: - c.argument('rule_name', id_part='name') -# https://github.com/Azure/azure-rest-api-specs/issues/1017 -with ParametersContext(command='monitor alert-rules list') as c: - c.ignore('filter') +name_arg_type = CliArgumentType(options_list=['--name', '-n'], metavar='NAME') + +register_cli_argument('monitor', 'location', location_type, validator=get_default_location_from_resource_group) +register_cli_argument('monitor', 'tags', tags_type) + +# region Alerts + +register_cli_argument('monitor alert', 'rule_name', name_arg_type, id_part='name', help='Name of the alert rule.') -with ParametersContext(command='monitor alert-rule-incidents') as c: - c.register_alias('incident_name', ('--name', '-n')) +register_cli_argument('monitor alert create', 'rule_name', name_arg_type, id_part='name', help='Name of the alert rule.') +register_cli_argument('monitor alert create', 'custom_emails', nargs='+', arg_group='Action') +register_cli_argument('monitor alert create', 'disabled', **three_state_flag()) +register_cli_argument('monitor alert create', 'email_service_owners', arg_group='Action', **three_state_flag()) +register_cli_argument('monitor alert create', 'actions', options_list=['--action', '-a'], action=AlertAddAction, nargs='+', arg_group='Action') +register_cli_argument('monitor alert create', 'condition', action=ConditionAction, nargs='+') +register_cli_argument('monitor alert create', 'metric_name', arg_group='Condition') +register_cli_argument('monitor alert create', 'operator', arg_group='Condition', **enum_choice_list(ConditionOperator)) +register_cli_argument('monitor alert create', 'threshold', arg_group='Condition') +register_cli_argument('monitor alert create', 'time_aggregation', arg_group='Condition', **enum_choice_list(TimeAggregationOperator)) +register_cli_argument('monitor alert create', 'window_size', arg_group='Condition') +register_resource_parameter('monitor alert create', 'target', 'Target Resource') + +register_cli_argument('monitor alert update', 'rule_name', name_arg_type, id_part='name', help='Name of the alert rule.') +register_cli_argument('monitor alert update', 'email_service_owners', arg_group='Action', **three_state_flag()) +register_cli_argument('monitor alert update', 'add_actions', options_list=['--add-action', '-a'], nargs='+', action=AlertAddAction, arg_group='Action') +register_cli_argument('monitor alert update', 'remove_actions', options_list=['--remove-action', '-r'], nargs='+', action=AlertRemoveAction, arg_group='Action') +register_cli_argument('monitor alert update', 'condition', action=ConditionAction, nargs='+', arg_group='Condition') +register_cli_argument('monitor alert update', 'metric', arg_group='Condition') +register_cli_argument('monitor alert update', 'operator', arg_group='Condition', **enum_choice_list(operator_map.keys())) +register_cli_argument('monitor alert update', 'threshold', arg_group='Condition') +register_cli_argument('monitor alert update', 'aggregation', arg_group='Condition', **enum_choice_list(aggregation_map.keys())) +register_cli_argument('monitor alert update', 'period', type=period_type, arg_group='Condition') +register_resource_parameter('monitor alert update', 'target', 'Target Resource', required=False) + +for item in ['show-incident', 'list-incidents']: + register_cli_argument('monitor alert {}'.format(item), 'rule_name', options_list=['--rule-name'], id_part='name') + register_cli_argument('monitor alert {}'.format(item), 'incident_name', name_arg_type, id_part='child_name') + +register_cli_argument('monitor alert list-incidents', 'rule_name', options_list=['--rule-name'], id_part=None) + +# endregion + +# region Metrics + +for item in ['list', 'list-definitions']: + register_resource_parameter('monitor metrics {}'.format(item), 'resource', 'Target Resource') + register_cli_argument('monitor metrics {}'.format(item), 'resource_group_name', arg_group='Target Resource') + +# endregion with ParametersContext(command='monitor autoscale-settings') as c: c.register_alias('name', ('--azure-resource-name',)) c.register_alias('autoscale_setting_name', ('--name', '-n')) @@ -78,9 +123,6 @@ with ParametersContext(command='monitor log-profiles') as c: c.register_alias('log_profile_name', ('--name', '-n')) with ParametersContext(command='monitor log-profiles create') as c: - from azure.mgmt.monitor.models.log_profile_resource import LogProfileResource - from azure.mgmt.monitor.models.retention_policy import RetentionPolicy - c.register_alias('name', ('--log-profile-name',)) c.expand('retention_policy', RetentionPolicy) c.expand('parameters', LogProfileResource) diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/validators.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/validators.py index 1cd23eebb..292414d18 100644 --- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/validators.py +++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/validators.py @@ -7,6 +7,41 @@ from azure.cli.core.commands.arm import is_valid_resource_id, resource_id, parse from azure.cli.core.util import CLIError +def get_target_resource_validator(dest, required): + def _validator(namespace): + name_or_id = getattr(namespace, dest) + rg = namespace.resource_group_name + res_ns = namespace.namespace + parent = namespace.parent + res_type = namespace.resource_type + + usage_error = CLIError('usage error: --{0} ID | --{0} NAME --resource-group NAME ' + '--{0}-namespace NAMESPACE [--{0}-parent PARENT] ' + '[--{0}-type TYPE]'.format(dest)) + if not name_or_id and required: + raise usage_error + elif name_or_id: + if is_valid_resource_id(name_or_id) and any((res_ns, parent, res_type)): + raise usage_error + elif not is_valid_resource_id(name_or_id): + from azure.cli.core.commands.client_factory import get_subscription_id + if res_type and '/' in res_type: + res_ns = res_ns or res_type.rsplit('/', 1)[0] + res_type = res_type.rsplit('/', 1)[1] + if not all((rg, res_ns, res_type, name_or_id)): + raise usage_error + + setattr(namespace, dest, + '/subscriptions/{}/resourceGroups/{}/providers/{}/{}{}/{}'.format( + get_subscription_id(), rg, res_ns, parent + '/' if parent else '', + res_type, name_or_id)) + + del namespace.namespace + del namespace.parent + del namespace.resource_type + return _validator + + # pylint: disable=line-too-long def validate_diagnostic_settings(namespace): from azure.cli.core.commands.client_factory import get_subscription_id diff --git a/src/command_modules/azure-cli-network/HISTORY.rst b/src/command_modules/azure-cli-network/HISTORY.rst index 4546398cc..1c3d7867a 100644 --- a/src/command_modules/azure-cli-network/HISTORY.rst +++ b/src/command_modules/azure-cli-network/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +unreleased +++++++++++++++++++ + +* `network watcher show-topology`: Fix bug with location defaulting logic. + 2.0.6 (2017-05-09) ++++++++++++++++++ diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_validators.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_validators.py index 9946f272c..30254e8be 100644 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_validators.py +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_validators.py @@ -729,11 +729,10 @@ def process_nw_topology_namespace(namespace): location = namespace.location if not location: - resource_client = \ get_mgmt_service_client(ResourceType.MGMT_RESOURCE_RESOURCES).resource_groups resource_group = resource_client.get(namespace.target_resource_group_name) - location = resource_group.location # pylint: disable=no-member + namespace.location = resource_group.location # pylint: disable=no-member get_network_watcher_from_location( watcher_name='network_watcher_name', rg_name='resource_group_name')(namespace)
conditions JSON format required is not syntactically correct JSON ### Description **Outline the issue here:** The only JSON which the Azure cloud will accept for creating a Monitoring rule is as below: { "dataSource": { "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", "resourceUri": "/subscriptions/your_subscription/resourceGroups/your_resource_group/providers/Microsoft.Compute/virtualMachines/hcm99mon01", "metricName": "Percentage CPU", }, "odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", "threshold" : 60, "operator": "GreaterThan", "windowSize" : "PT5M", "timeAggregation": "Average" } The comma after "metricName": "Percentage CPU", is not correct JSON as there are no items following the comma. Yet the Azure cloud will say "poorly formed request" when the comma is removed. The JSON code above will work in Azure cloud to create a metric based rule. But will fail JSON validation at the JSON validation LINT site: https://jsonlint.com/ --- ### Environment summary **Install Method:** How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly) Answer here: Nightly then installed public / bash **CLI Version:** What version of the CLI and modules are installed? (Use `az --version`) Answer here: 3.0.2 Monitor 0.0.3 **OS Version:** What OS and version are you using? Answer here: macOS Sierra **Shell Type:** What shell are you using? (e.g. bash, cmd.exe, Bash on Windows) Answer here: csh
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-monitor/tests/recordings/test_monitor.yaml b/src/command_modules/azure-cli-monitor/tests/recordings/test_monitor.yaml new file mode 100644 index 000000000..8eac5a22c --- /dev/null +++ b/src/command_modules/azure-cli-monitor/tests/recordings/test_monitor.yaml @@ -0,0 +1,1241 @@ +interactions: +- request: + body: '{"tags": {"use": "az-test"}, "location": "westus"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001","name":"cli_test_monitor000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:27:20 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [vm create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001","name":"cli_test_monitor000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:27:21 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [close] + Host: [raw.githubusercontent.com] + User-Agent: [Python-urllib/3.5] + method: GET + uri: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json + response: + body: {string: "{\n \"$schema\":\"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\"\ + ,\n \"contentVersion\":\"1.0.0.0\",\n \"parameters\":{},\n \"variables\"\ + :{},\n \"resources\":[],\n\n \"outputs\":{\n \"aliases\":{\n \"\ + type\":\"object\",\n \"value\":{\n\n \"Linux\":{\n \"\ + CentOS\":{\n \"publisher\":\"OpenLogic\",\n \"offer\"\ + :\"CentOS\",\n \"sku\":\"7.3\",\n \"version\":\"latest\"\ + \n },\n \"CoreOS\":{\n \"publisher\":\"CoreOS\"\ + ,\n \"offer\":\"CoreOS\",\n \"sku\":\"Stable\",\n \ + \ \"version\":\"latest\"\n },\n \"Debian\":{\n\ + \ \"publisher\":\"credativ\",\n \"offer\":\"Debian\"\ + ,\n \"sku\":\"8\",\n \"version\":\"latest\"\n \ + \ },\n \"openSUSE-Leap\": {\n \"publisher\":\"SUSE\"\ + ,\n \"offer\":\"openSUSE-Leap\",\n \"sku\":\"42.2\"\ + ,\n \"version\": \"latest\"\n },\n \"RHEL\":{\n\ + \ \"publisher\":\"RedHat\",\n \"offer\":\"RHEL\",\n\ + \ \"sku\":\"7.3\",\n \"version\":\"latest\"\n \ + \ },\n \"SLES\":{\n \"publisher\":\"SUSE\",\n \ + \ \"offer\":\"SLES\",\n \"sku\":\"12-SP2\",\n \ + \ \"version\":\"latest\"\n },\n \"UbuntuLTS\":{\n \ + \ \"publisher\":\"Canonical\",\n \"offer\":\"UbuntuServer\"\ + ,\n \"sku\":\"16.04-LTS\",\n \"version\":\"latest\"\n\ + \ }\n },\n\n \"Windows\":{\n \"Win2016Datacenter\"\ + :{\n \"publisher\":\"MicrosoftWindowsServer\",\n \"\ + offer\":\"WindowsServer\",\n \"sku\":\"2016-Datacenter\",\n \ + \ \"version\":\"latest\"\n },\n \"Win2012R2Datacenter\"\ + :{\n \"publisher\":\"MicrosoftWindowsServer\",\n \"\ + offer\":\"WindowsServer\",\n \"sku\":\"2012-R2-Datacenter\",\n\ + \ \"version\":\"latest\"\n },\n \"Win2012Datacenter\"\ + :{\n \"publisher\":\"MicrosoftWindowsServer\",\n \"\ + offer\":\"WindowsServer\",\n \"sku\":\"2012-Datacenter\",\n \ + \ \"version\":\"latest\"\n },\n \"Win2008R2SP1\"\ + :{\n \"publisher\":\"MicrosoftWindowsServer\",\n \"\ + offer\":\"WindowsServer\",\n \"sku\":\"2008-R2-SP1\",\n \ + \ \"version\":\"latest\"\n }\n }\n }\n }\n }\n\ + }\n"} + headers: + accept-ranges: [bytes] + access-control-allow-origin: ['*'] + cache-control: [max-age=300] + connection: [close] + content-length: ['2235'] + content-security-policy: [default-src 'none'; style-src 'unsafe-inline'] + content-type: [text/plain; charset=utf-8] + date: ['Tue, 16 May 2017 21:27:21 GMT'] + etag: ['"d6824855d13e27c5258a680eb60f635d088fd05e"'] + expires: ['Tue, 16 May 2017 21:32:21 GMT'] + source-age: ['0'] + strict-transport-security: [max-age=31536000] + vary: ['Authorization,Accept-Encoding'] + via: [1.1 varnish] + x-cache: [MISS] + x-cache-hits: ['0'] + x-content-type-options: [nosniff] + x-fastly-request-id: [9c036cbbaaff7302979f64509adf7fb65e855b1b] + x-frame-options: [deny] + x-geo-block-list: [''] + x-github-request-id: ['647C:4019:466F47C:495454A:591B6EB9'] + x-served-by: [cache-sea1025-SEA] + x-timer: ['S1494970042.861616,VS0,VE78'] + x-xss-protection: [1; mode=block] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [vm create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/virtualNetworks?api-version=2017-03-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:27:21 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: 'b''{"properties": {"template": {"variables": {}, "outputs": {}, "parameters": + {}, "contentVersion": "1.0.0.0", "resources": [{"name": "vm1VNET", "tags": {}, + "type": "Microsoft.Network/virtualNetworks", "location": "westus", "properties": + {"subnets": [{"properties": {"addressPrefix": "10.0.0.0/24"}, "name": "vm1Subnet"}], + "addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}}, "apiVersion": "2015-06-15", + "dependsOn": []}, {"name": "vm1NSG", "tags": {}, "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2015-06-15", "properties": {"securityRules": [{"properties": + {"direction": "Inbound", "sourcePortRange": "*", "destinationAddressPrefix": + "*", "access": "Allow", "priority": 1000, "sourceAddressPrefix": "*", "protocol": + "Tcp", "destinationPortRange": "22"}, "name": "default-allow-ssh"}]}, "location": + "westus", "dependsOn": []}, {"name": "vm1PublicIP", "tags": {}, "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2015-06-15", "properties": {"publicIPAllocationMethod": "dynamic"}, + "location": "westus", "dependsOn": []}, {"name": "vm1VMNic", "tags": {}, "type": + "Microsoft.Network/networkInterfaces", "apiVersion": "2015-06-15", "properties": + {"ipConfigurations": [{"properties": {"subnet": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet"}, + "privateIPAllocationMethod": "Dynamic", "publicIPAddress": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"}}, + "name": "ipconfigvm1"}], "networkSecurityGroup": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"}}, + "location": "westus", "dependsOn": ["Microsoft.Network/virtualNetworks/vm1VNET", + "Microsoft.Network/networkSecurityGroups/vm1NSG", "Microsoft.Network/publicIpAddresses/vm1PublicIP"]}, + {"name": "vm1", "tags": {}, "type": "Microsoft.Compute/virtualMachines", "apiVersion": + "2016-04-30-preview", "properties": {"storageProfile": {"osDisk": {"createOption": + "fromImage", "caching": null, "managedDisk": {"storageAccountType": "Premium_LRS"}, + "name": "osdisk_ccsFuak3AF"}, "imageReference": {"version": "latest", "offer": + "UbuntuServer", "sku": "16.04-LTS", "publisher": "Canonical"}}, "osProfile": + {"linuxConfiguration": {"disablePasswordAuthentication": true, "ssh": {"publicKeys": + [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLkUy/BFb7o47gQqFcMiioYD4w3Tu/7bpy7t/3pQVhjmsEEaWk09dA1Ju1UbukKaLpOprch/r9bgUWu1oTEP7E5evwaJl0TvLX0gsxGGItfPc58bbQ77uxuXhMfYEZ6oiS+Ybt5nUjjDUUNhSIrKSLhCHCmQ9JnOd/AObf9G4iR38bsABIAVxmbYT6OQKm4oRwNs1c99B5TsfnREFs7yawCV3hjKVHsD3bRo83bBbBG3d/CHYfcnEbpK4weagw899YodAXDiUh0qYfOy0mGz4zWaQ4rcCitk9od/WSDhLAOy74cqwzKJwoR9DcALxkWVMuJW7xBF9tWEroVvFrh6/N", + "path": "/home/trpresco/.ssh/authorized_keys"}]}}, "computerName": "vm1", "adminUsername": + "trpresco"}, "networkProfile": {"networkInterfaces": [{"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic"}]}, + "hardwareProfile": {"vmSize": "Standard_DS1_v2"}}, "location": "westus", "dependsOn": + ["Microsoft.Network/networkInterfaces/vm1VMNic"]}], "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"}, + "parameters": {}, "mode": "Incremental"}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [vm create] + Connection: [keep-alive] + Content-Length: ['3687'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Resources/deployments/vm_deploy_lBbLTLjPfcn0397KjOapCc1k2BqtMVeQ","name":"vm_deploy_lBbLTLjPfcn0397KjOapCc1k2BqtMVeQ","properties":{"templateHash":"719195829845188578","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-05-16T21:27:23.4263869Z","duration":"PT0.57642S","correlationId":"deea0a51-5ef6-473d-9be8-c2b28815aa7a","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}]}}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/Microsoft.Resources/deployments/vm_deploy_lBbLTLjPfcn0397KjOapCc1k2BqtMVeQ/operationStatuses/08587066368426276617?api-version=2017-05-10'] + cache-control: [no-cache] + content-length: ['2698'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:27:23 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [vm create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587066368426276617?api-version=2017-05-10 + response: + body: {string: '{"status":"Running"}'} + headers: + cache-control: [no-cache] + content-length: ['20'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:27:53 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [vm create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587066368426276617?api-version=2017-05-10 + response: + body: {string: '{"status":"Running"}'} + headers: + cache-control: [no-cache] + content-length: ['20'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:28:23 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [vm create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587066368426276617?api-version=2017-05-10 + response: + body: {string: '{"status":"Running"}'} + headers: + cache-control: [no-cache] + content-length: ['20'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:28:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [vm create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587066368426276617?api-version=2017-05-10 + response: + body: {string: '{"status":"Running"}'} + headers: + cache-control: [no-cache] + content-length: ['20'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:29:24 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [vm create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587066368426276617?api-version=2017-05-10 + response: + body: {string: '{"status":"Succeeded"}'} + headers: + cache-control: [no-cache] + content-length: ['22'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:29:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [vm create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Resources/deployments/vm_deploy_lBbLTLjPfcn0397KjOapCc1k2BqtMVeQ","name":"vm_deploy_lBbLTLjPfcn0397KjOapCc1k2BqtMVeQ","properties":{"templateHash":"719195829845188578","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-05-16T21:29:39.3379001Z","duration":"PT2M16.4879332S","correlationId":"deea0a51-5ef6-473d-9be8-c2b28815aa7a","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/virtualNetworks/vm1VNET"}]}}'} + headers: + cache-control: [no-cache] + content-length: ['3767'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:29:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [vm create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2016-04-30-preview&$expand=instanceView + response: + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"eaa22fed-0ce9-4ef4-95f7-4b2687ef5032\"\ + ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ + \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ + \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ + ,\r\n \"sku\": \"16.04-LTS\",\r\n \"version\": \"latest\"\r\n\ + \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ + \ \"name\": \"osdisk_ccsFuak3AF\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ + \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/disks/osdisk_ccsFuak3AF\"\ + \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ + : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ + ,\r\n \"adminUsername\": \"trpresco\",\r\n \"linuxConfiguration\"\ + : {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\"\ + : {\r\n \"publicKeys\": [\r\n {\r\n \"path\"\ + : \"/home/trpresco/.ssh/authorized_keys\",\r\n \"keyData\": \"\ + ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLkUy/BFb7o47gQqFcMiioYD4w3Tu/7bpy7t/3pQVhjmsEEaWk09dA1Ju1UbukKaLpOprch/r9bgUWu1oTEP7E5evwaJl0TvLX0gsxGGItfPc58bbQ77uxuXhMfYEZ6oiS+Ybt5nUjjDUUNhSIrKSLhCHCmQ9JnOd/AObf9G4iR38bsABIAVxmbYT6OQKm4oRwNs1c99B5TsfnREFs7yawCV3hjKVHsD3bRo83bBbBG3d/CHYfcnEbpK4weagw899YodAXDiUh0qYfOy0mGz4zWaQ4rcCitk9od/WSDhLAOy74cqwzKJwoR9DcALxkWVMuJW7xBF9tWEroVvFrh6/N\"\ + \r\n }\r\n ]\r\n }\r\n },\r\n \"secrets\"\ + : []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\"\ + :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + }]},\r\n \"provisioningState\": \"Succeeded\",\r\n \"instanceView\"\ + : {\r\n \"vmAgent\": {\r\n \"vmAgentVersion\": \"2.2.10\",\r\n\ + \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ + ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ + Ready\",\r\n \"message\": \"Guest Agent is running\",\r\n \ + \ \"time\": \"2017-05-16T21:29:31+00:00\"\r\n }\r\n \ + \ ],\r\n \"extensionHandlers\": []\r\n },\r\n \"statuses\"\ + : [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\ + \n \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning\ + \ succeeded\",\r\n \"time\": \"2017-05-16T21:29:27.2746488+00:00\"\ + \r\n },\r\n {\r\n \"code\": \"PowerState/running\"\ + ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\ + \r\n }\r\n ]\r\n }\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines\"\ + ,\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1\"\ + ,\r\n \"name\": \"vm1\"\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['3022'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:29:55 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [vm create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic?api-version=2017-03-01 + response: + body: {string: "{\r\n \"name\": \"vm1VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + ,\r\n \"etag\": \"W/\\\"875c08df-09dc-45da-852a-65ce884c6447\\\"\",\r\n \ + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n\ + \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"0eaad880-5345-4ce7-9bd9-47d27b9e7ac8\"\ + ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm1\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\ + ,\r\n \"etag\": \"W/\\\"875c08df-09dc-45da-852a-65ce884c6447\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ + : \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\":\ + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\ + \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ + : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ + \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ + internalDomainNameSuffix\": \"naijypgg2gjubdldespkkm5rqd.dx.internal.cloudapp.net\"\ + \r\n },\r\n \"macAddress\": \"00-0D-3A-31-34-03\",\r\n \"enableAcceleratedNetworking\"\ + : false,\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\"\ + : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ + \r\n },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \ + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1\"\ + \r\n }\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\ + \n}"} + headers: + cache-control: [no-cache] + content-length: ['2495'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:29:55 GMT'] + etag: [W/"875c08df-09dc-45da-852a-65ce884c6447"] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [vm create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP?api-version=2017-03-01 + response: + body: {string: "{\r\n \"name\": \"vm1PublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\ + ,\r\n \"etag\": \"W/\\\"913f9ae8-8ea2-430d-b2b5-54bfe7d7e9d5\\\"\",\r\n \ + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n\ + \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"16679c95-f20a-4fff-b220-bcbb80e8d9b1\"\ + ,\r\n \"ipAddress\": \"137.117.21.91\",\r\n \"publicIPAddressVersion\"\ + : \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\"\ + : 4,\r\n \"ipConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\ + \r\n }\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\"\r\ + \n}"} + headers: + cache-control: [no-cache] + content-length: ['939'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:29:55 GMT'] + etag: [W/"913f9ae8-8ea2-430d-b2b5-54bfe7d7e9d5"] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor metrics list-definitions] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/microsoft.insights/metricDefinitions?api-version=2016-03-01&$filter= + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/microsoft.insights/metricdefinitions","value":[{"resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","name":{"value":"Percentage + CPU","localizedValue":"Percentage CPU"},"category":"AllMetrics","startTime":"0001-01-01T00:00:00Z","endTime":"0001-01-01T00:00:00Z","unit":"Percent","primaryAggregationType":"Average","ResourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","ResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricAvailabilities":[{"timeGrain":"PT1M","retention":"P30D"},{"timeGrain":"PT1H","retention":"P30D"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/microsoft.insights/metricdefinitions/Percentage + CPU"},{"resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","name":{"value":"Network + In","localizedValue":"Network In"},"category":"AllMetrics","startTime":"0001-01-01T00:00:00Z","endTime":"0001-01-01T00:00:00Z","unit":"Bytes","primaryAggregationType":"Total","ResourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","ResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricAvailabilities":[{"timeGrain":"PT1M","retention":"P30D"},{"timeGrain":"PT1H","retention":"P30D"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/microsoft.insights/metricdefinitions/Network + In"},{"resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","name":{"value":"Network + Out","localizedValue":"Network Out"},"category":"AllMetrics","startTime":"0001-01-01T00:00:00Z","endTime":"0001-01-01T00:00:00Z","unit":"Bytes","primaryAggregationType":"Total","ResourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","ResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricAvailabilities":[{"timeGrain":"PT1M","retention":"P30D"},{"timeGrain":"PT1H","retention":"P30D"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/microsoft.insights/metricdefinitions/Network + Out"},{"resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","name":{"value":"Disk + Read Bytes","localizedValue":"Disk Read Bytes"},"category":"AllMetrics","startTime":"0001-01-01T00:00:00Z","endTime":"0001-01-01T00:00:00Z","unit":"Bytes","primaryAggregationType":"Total","ResourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","ResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricAvailabilities":[{"timeGrain":"PT1M","retention":"P30D"},{"timeGrain":"PT1H","retention":"P30D"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/microsoft.insights/metricdefinitions/Disk + Read Bytes"},{"resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","name":{"value":"Disk + Write Bytes","localizedValue":"Disk Write Bytes"},"category":"AllMetrics","startTime":"0001-01-01T00:00:00Z","endTime":"0001-01-01T00:00:00Z","unit":"Bytes","primaryAggregationType":"Total","ResourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","ResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricAvailabilities":[{"timeGrain":"PT1M","retention":"P30D"},{"timeGrain":"PT1H","retention":"P30D"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/microsoft.insights/metricdefinitions/Disk + Write Bytes"},{"resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","name":{"value":"Disk + Read Operations/Sec","localizedValue":"Disk Read Operations/Sec"},"category":"AllMetrics","startTime":"0001-01-01T00:00:00Z","endTime":"0001-01-01T00:00:00Z","unit":"CountPerSecond","primaryAggregationType":"Average","ResourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","ResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricAvailabilities":[{"timeGrain":"PT1M","retention":"P30D"},{"timeGrain":"PT1H","retention":"P30D"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/microsoft.insights/metricdefinitions/Disk + Read Operations/Sec"},{"resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","name":{"value":"Disk + Write Operations/Sec","localizedValue":"Disk Write Operations/Sec"},"category":"AllMetrics","startTime":"0001-01-01T00:00:00Z","endTime":"0001-01-01T00:00:00Z","unit":"CountPerSecond","primaryAggregationType":"Average","ResourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","ResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricAvailabilities":[{"timeGrain":"PT1M","retention":"P30D"},{"timeGrain":"PT1H","retention":"P30D"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/microsoft.insights/metricdefinitions/Disk + Write Operations/Sec"}]}'} + headers: + cache-control: [no-cache] + content-length: ['10140'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:29:56 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001","name":"cli_test_monitor000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:29:56 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: 'b''{"location": "westus", "properties": {"isEnabled": true, "name": "rule1", + "description": "Percentage CPU > 90 avg 5m", "actions": [{"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", + "sendToServiceOwners": false, "customEmails": []}], "condition": {"threshold": + 90.0, "windowSize": "PT5M", "operator": "GreaterThan", "dataSource": {"metricName": + "Percentage CPU", "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1"}, + "odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "timeAggregation": "Average"}}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert create] + Connection: [keep-alive] + Content-Length: ['794'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitormanagementclient/0.2.1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1?api-version=2016-03-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1","name":"rule1","type":"Microsoft.Insights/alertRules","location":"westus","tags":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"},"properties":{"name":"rule1","description":"Percentage + CPU > 90 avg 5m","isEnabled":true,"condition":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition","dataSource":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource","resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricName":"Percentage + CPU"},"threshold":90.0,"windowSize":"PT5M","timeAggregation":"Average"},"lastUpdatedTime":"2017-05-16T21:29:58.549822Z","provisioningState":"Succeeded","actions":[{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleEmailAction","customEmails":[]}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1585'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:29:59 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001","name":"cli_test_monitor000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:29:59 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: 'b''{"location": "westus", "properties": {"isEnabled": false, "name": "rule2", + "description": "Test Rule 2", "actions": [{"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", + "sendToServiceOwners": false, "customEmails": ["test1@contoso.com", "test3@contoso.com", + "test2@contoso.com"]}], "condition": {"threshold": 60.0, "windowSize": "PT1H", + "operator": "GreaterThanOrEqual", "dataSource": {"metricName": "Percentage CPU", + "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1"}, + "odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "timeAggregation": "Average"}}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert create] + Connection: [keep-alive] + Content-Length: ['848'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitormanagementclient/0.2.1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule2?api-version=2016-03-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule2","name":"rule2","type":"Microsoft.Insights/alertRules","location":"westus","tags":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"},"properties":{"name":"rule2","description":"Test + Rule 2","condition":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition","dataSource":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource","resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricName":"Percentage + CPU"},"operator":"GreaterThanOrEqual","threshold":60.0,"windowSize":"PT1H","timeAggregation":"Average"},"lastUpdatedTime":"2017-05-16T21:30:01.236707Z","provisioningState":"Succeeded","actions":[{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleEmailAction","customEmails":["test1@contoso.com","test3@contoso.com","test2@contoso.com"]}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1644'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:30:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001","name":"cli_test_monitor000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:30:02 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: 'b''{"location": "westus", "properties": {"isEnabled": true, "name": "rule3", + "description": "Percentage CPU >= 99 avg 5m", "actions": [{"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", + "sendToServiceOwners": false, "customEmails": []}, {"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction", + "properties": {}, "serviceUri": "https://alert.contoso.com?apiKey=value"}, {"odata.type": + "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction", "properties": + {"apiKey": "value"}, "serviceUri": "https://contoso.com/alerts"}], "condition": + {"threshold": 99.0, "windowSize": "PT5M", "operator": "GreaterThanOrEqual", + "dataSource": {"metricName": "Percentage CPU", "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1"}, + "odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "timeAggregation": "Average"}}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert create] + Connection: [keep-alive] + Content-Length: ['1115'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitormanagementclient/0.2.1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule3?api-version=2016-03-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule3","name":"rule3","type":"Microsoft.Insights/alertRules","location":"westus","tags":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"},"properties":{"name":"rule3","description":"Percentage + CPU >= 99 avg 5m","isEnabled":true,"condition":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition","dataSource":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource","resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricName":"Percentage + CPU"},"operator":"GreaterThanOrEqual","threshold":99.0,"windowSize":"PT5M","timeAggregation":"Average"},"lastUpdatedTime":"2017-05-16T21:30:03.2203596Z","provisioningState":"Succeeded","actions":[{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleWebhookAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleWebhookAction","serviceUri":"https://alert.contoso.com?apiKey=value","properties":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary`1[[System.String, + mscorlib]], Microsoft.WindowsAzure.Management.Common.Storage"}},{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleWebhookAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleWebhookAction","serviceUri":"https://contoso.com/alerts","properties":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary`1[[System.String, + mscorlib]], Microsoft.WindowsAzure.Management.Common.Storage","apiKey":"value"}},{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleEmailAction","customEmails":[]}]}}'} + headers: + cache-control: [no-cache] + content-length: ['2508'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:30:03 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitormanagementclient/0.2.1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1?api-version=2016-03-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1","name":"rule1","type":"Microsoft.Insights/alertRules","location":"westus","tags":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"},"properties":{"name":"rule1","description":"Percentage + CPU > 90 avg 5m","isEnabled":true,"condition":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition","dataSource":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource","resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricName":"Percentage + CPU"},"threshold":90.0,"windowSize":"PT5M","timeAggregation":"Average"},"lastUpdatedTime":"2017-05-16T21:29:58.549822Z","provisioningState":"Succeeded","actions":[{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleEmailAction","customEmails":[]}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1585'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:30:04 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitormanagementclient/0.2.1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule2?api-version=2016-03-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Tue, 16 May 2017 21:30:05 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1195'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitormanagementclient/0.2.1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule3?api-version=2016-03-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Tue, 16 May 2017 21:30:06 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitormanagementclient/0.2.1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/microsoft.insights/alertrules?api-version=2016-03-01 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1","name":"rule1","type":"Microsoft.Insights/alertRules","location":"westus","tags":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"},"properties":{"name":"rule1","description":"Percentage + CPU > 90 avg 5m","isEnabled":true,"condition":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition","dataSource":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource","resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricName":"Percentage + CPU"},"threshold":90.0,"windowSize":"PT5M","timeAggregation":"Average"},"lastUpdatedTime":"2017-05-16T21:29:58.549822Z","provisioningState":"Succeeded","actions":[{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleEmailAction","customEmails":[]}]}}]}'} + headers: + cache-control: [no-cache] + content-length: ['1597'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:30:07 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitormanagementclient/0.2.1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1?api-version=2016-03-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1","name":"rule1","type":"Microsoft.Insights/alertRules","location":"westus","tags":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"},"properties":{"name":"rule1","description":"Percentage + CPU > 90 avg 5m","isEnabled":true,"condition":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition","dataSource":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource","resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricName":"Percentage + CPU"},"threshold":90.0,"windowSize":"PT5M","timeAggregation":"Average"},"lastUpdatedTime":"2017-05-16T21:29:58.549822Z","provisioningState":"Succeeded","actions":[{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleEmailAction","customEmails":[]}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1585'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:30:07 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: 'b''{"tags": {"$type": "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"}, "location": "westus", "properties": + {"isEnabled": true, "name": "rule1", "description": "Percentage CPU > 90 avg + 5m", "actions": [{"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", + "customEmails": ["test1@contoso.com"]}, {"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction", + "properties": {}, "serviceUri": "https://alert.contoso.com?apiKey=value"}], + "condition": {"threshold": 85.0, "windowSize": "PT5M", "operator": "GreaterThanOrEqual", + "dataSource": {"metricName": "Percentage CPU", "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1"}, + "odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "timeAggregation": "Average"}}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert update] + Connection: [keep-alive] + Content-Length: ['1089'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitormanagementclient/0.2.1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1?api-version=2016-03-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1","name":"rule1","type":"Microsoft.Insights/alertRules","location":"westus","tags":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"},"properties":{"name":"rule1","description":"Percentage + CPU > 90 avg 5m","isEnabled":true,"condition":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition","dataSource":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource","resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricName":"Percentage + CPU"},"operator":"GreaterThanOrEqual","threshold":85.0,"windowSize":"PT5M","timeAggregation":"Average"},"lastUpdatedTime":"2017-05-16T21:30:10.5609273Z","provisioningState":"Succeeded","actions":[{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleWebhookAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleWebhookAction","serviceUri":"https://alert.contoso.com?apiKey=value","properties":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary`1[[System.String, + mscorlib]], Microsoft.WindowsAzure.Management.Common.Storage"}},{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleEmailAction","customEmails":["test1@contoso.com"]}]}}'} + headers: + cache-control: [no-cache] + content-length: ['2079'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:30:10 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitormanagementclient/0.2.1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1?api-version=2016-03-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1","name":"rule1","type":"Microsoft.Insights/alertRules","location":"westus","tags":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"},"properties":{"name":"rule1","description":"Percentage + CPU > 90 avg 5m","isEnabled":true,"condition":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition","dataSource":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource","resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricName":"Percentage + CPU"},"operator":"GreaterThanOrEqual","threshold":85.0,"windowSize":"PT5M","timeAggregation":"Average"},"lastUpdatedTime":"2017-05-16T21:30:10.5609273Z","provisioningState":"Succeeded","actions":[{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleWebhookAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleWebhookAction","serviceUri":"https://alert.contoso.com?apiKey=value","properties":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary`1[[System.String, + mscorlib]], Microsoft.WindowsAzure.Management.Common.Storage"}},{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleEmailAction","customEmails":["test1@contoso.com"]}]}}'} + headers: + cache-control: [no-cache] + content-length: ['2079'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:30:10 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: 'b''{"tags": {"$type": "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"}, "location": "westus", "properties": + {"isEnabled": true, "name": "rule1", "description": "Percentage CPU > 90 avg + 5m", "actions": [{"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", + "customEmails": ["test2@contoso.com", "test3@contoso.com"]}, {"odata.type": + "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction", "properties": + {"$type": "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary`1[[System.String, + mscorlib]], Microsoft.WindowsAzure.Management.Common.Storage"}, "serviceUri": + "https://alert.contoso.com?apiKey=value"}], "condition": {"threshold": 85.0, + "windowSize": "PT5M", "operator": "GreaterThanOrEqual", "dataSource": {"metricName": + "Percentage CPU", "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1"}, + "odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "timeAggregation": "Average"}}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert update] + Connection: [keep-alive] + Content-Length: ['1272'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitormanagementclient/0.2.1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1?api-version=2016-03-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1","name":"rule1","type":"Microsoft.Insights/alertRules","location":"westus","tags":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"},"properties":{"name":"rule1","description":"Percentage + CPU > 90 avg 5m","isEnabled":true,"condition":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition","dataSource":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource","resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricName":"Percentage + CPU"},"operator":"GreaterThanOrEqual","threshold":85.0,"windowSize":"PT5M","timeAggregation":"Average"},"lastUpdatedTime":"2017-05-16T21:30:11.7383668Z","provisioningState":"Succeeded","actions":[{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleWebhookAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleWebhookAction","serviceUri":"https://alert.contoso.com?apiKey=value","properties":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary`1[[System.String, + mscorlib]], Microsoft.WindowsAzure.Management.Common.Storage"}},{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleEmailAction","customEmails":["test2@contoso.com","test3@contoso.com"]}]}}'} + headers: + cache-control: [no-cache] + content-length: ['2099'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:30:11 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitormanagementclient/0.2.1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1?api-version=2016-03-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1","name":"rule1","type":"Microsoft.Insights/alertRules","location":"westus","tags":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"},"properties":{"name":"rule1","description":"Percentage + CPU > 90 avg 5m","isEnabled":true,"condition":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition","dataSource":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource","resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricName":"Percentage + CPU"},"operator":"GreaterThanOrEqual","threshold":85.0,"windowSize":"PT5M","timeAggregation":"Average"},"lastUpdatedTime":"2017-05-16T21:30:11.7383668Z","provisioningState":"Succeeded","actions":[{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleWebhookAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleWebhookAction","serviceUri":"https://alert.contoso.com?apiKey=value","properties":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary`1[[System.String, + mscorlib]], Microsoft.WindowsAzure.Management.Common.Storage"}},{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleEmailAction","customEmails":["test2@contoso.com","test3@contoso.com"]}]}}'} + headers: + cache-control: [no-cache] + content-length: ['2099'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:30:12 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: 'b''{"tags": {"$type": "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"}, "location": "westus", "properties": + {"isEnabled": true, "name": "rule1", "description": "Percentage CPU > 90 avg + 5m", "actions": [{"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", + "sendToServiceOwners": true, "customEmails": ["test2@contoso.com", "test3@contoso.com"]}, + {"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction", + "properties": {"$type": "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary`1[[System.String, + mscorlib]], Microsoft.WindowsAzure.Management.Common.Storage"}, "serviceUri": + "https://alert.contoso.com?apiKey=value"}], "condition": {"threshold": 85.0, + "windowSize": "PT5M", "operator": "GreaterThanOrEqual", "dataSource": {"metricName": + "Percentage CPU", "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1"}, + "odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "timeAggregation": "Average"}}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert update] + Connection: [keep-alive] + Content-Length: ['1301'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitormanagementclient/0.2.1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1?api-version=2016-03-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1","name":"rule1","type":"Microsoft.Insights/alertRules","location":"westus","tags":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"},"properties":{"name":"rule1","description":"Percentage + CPU > 90 avg 5m","isEnabled":true,"condition":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition","dataSource":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource","resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricName":"Percentage + CPU"},"operator":"GreaterThanOrEqual","threshold":85.0,"windowSize":"PT5M","timeAggregation":"Average"},"lastUpdatedTime":"2017-05-16T21:30:16.0587829Z","provisioningState":"Succeeded","actions":[{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleWebhookAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleWebhookAction","serviceUri":"https://alert.contoso.com?apiKey=value","properties":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary`1[[System.String, + mscorlib]], Microsoft.WindowsAzure.Management.Common.Storage"}},{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleEmailAction","sendToServiceOwners":true,"customEmails":["test2@contoso.com","test3@contoso.com"]}]}}'} + headers: + cache-control: [no-cache] + content-length: ['2126'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:30:16 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitormanagementclient/0.2.1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1?api-version=2016-03-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1","name":"rule1","type":"Microsoft.Insights/alertRules","location":"westus","tags":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"},"properties":{"name":"rule1","description":"Percentage + CPU > 90 avg 5m","isEnabled":true,"condition":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition","dataSource":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource","resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricName":"Percentage + CPU"},"operator":"GreaterThanOrEqual","threshold":85.0,"windowSize":"PT5M","timeAggregation":"Average"},"lastUpdatedTime":"2017-05-16T21:30:16.0587829Z","provisioningState":"Succeeded","actions":[{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleWebhookAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleWebhookAction","serviceUri":"https://alert.contoso.com?apiKey=value","properties":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary`1[[System.String, + mscorlib]], Microsoft.WindowsAzure.Management.Common.Storage"}},{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleEmailAction","sendToServiceOwners":true,"customEmails":["test2@contoso.com","test3@contoso.com"]}]}}'} + headers: + cache-control: [no-cache] + content-length: ['2126'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:30:15 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: 'b''{"tags": {"$type": "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"}, "location": "westus", "properties": + {"isEnabled": true, "name": "rule1", "description": "Percentage CPU > 90 avg + 5m", "actions": [{"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", + "sendToServiceOwners": false, "customEmails": ["test2@contoso.com", "test3@contoso.com"]}, + {"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction", + "properties": {"apiKey": "value"}, "serviceUri": "https://contoso.com/alerts"}], + "condition": {"threshold": 85.0, "windowSize": "PT5M", "operator": "GreaterThanOrEqual", + "dataSource": {"metricName": "Percentage CPU", "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1"}, + "odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "timeAggregation": "Average"}}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [monitor alert update] + Connection: [keep-alive] + Content-Length: ['1145'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitormanagementclient/0.2.1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1?api-version=2016-03-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/microsoft.insights/alertrules/rule1","name":"rule1","type":"Microsoft.Insights/alertRules","location":"westus","tags":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, + Microsoft.WindowsAzure.Management.Common.Storage"},"properties":{"name":"rule1","description":"Percentage + CPU > 90 avg 5m","isEnabled":true,"condition":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition","dataSource":{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource","resourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor000001/providers/Microsoft.Compute/virtualMachines/vm1","metricName":"Percentage + CPU"},"operator":"GreaterThanOrEqual","threshold":85.0,"windowSize":"PT5M","timeAggregation":"Average"},"lastUpdatedTime":"2017-05-16T21:30:17.7055681Z","provisioningState":"Succeeded","actions":[{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleWebhookAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleWebhookAction","serviceUri":"https://contoso.com/alerts","properties":{"$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary`1[[System.String, + mscorlib]], Microsoft.WindowsAzure.Management.Common.Storage","apiKey":"value"}},{"$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, + Microsoft.WindowsAzure.Management.Mon.Client","odata.type":"Microsoft.Azure.Management.Insights.Models.RuleEmailAction","customEmails":["test2@contoso.com","test3@contoso.com"]}]}}'} + headers: + cache-control: [no-cache] + content-length: ['2104'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 16 May 2017 21:30:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_monitor000001?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Tue, 16 May 2017 21:30:17 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGTU9OSVRPUk9PSUlTTjJVNktPRVJMNTZDTTNSTUJLUVBUSHwxM0ZEOTgyRjQxMDlGQUMzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + retry-after: ['15'] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1195'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/test_custom.py b/src/command_modules/azure-cli-monitor/tests/test_custom.py similarity index 66% rename from src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/test_custom.py rename to src/command_modules/azure-cli-monitor/tests/test_custom.py index d4dba006a..ec3cd8fdb 100644 --- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/test_custom.py +++ b/src/command_modules/azure-cli-monitor/tests/test_custom.py @@ -4,6 +4,10 @@ # -------------------------------------------------------------------------------------------- import unittest +try: + import unittest.mock as mock +except ImportError: + import mock import re from azure.cli.core.util import CLIError from azure.cli.command_modules.monitor.custom import (_metric_names_filter_builder, @@ -14,7 +18,8 @@ from azure.cli.command_modules.monitor.custom import (_metric_names_filter_build scaffold_autoscale_settings_parameters) -class CustomCommandTest(unittest.TestCase): +class FilterBuilderTests(unittest.TestCase): + def test_metric_names_filter_builder(self): metric_names = None filter_output = _metric_names_filter_builder(metric_names) @@ -107,3 +112,64 @@ class CustomCommandTest(unittest.TestCase): template = scaffold_autoscale_settings_parameters(None) if not template or not isinstance(template, dict): assert False + + +def _mock_get_subscription_id(): + return '00000000-0000-0000-0000-000000000000' + + +class MonitorNameOrIdTest(unittest.TestCase): + + def _build_namespace(self, name_or_id=None, resource_group=None, provider_namespace=None, parent=None, resource_type=None): + from argparse import Namespace + ns = Namespace() + ns.name_or_id = name_or_id + ns.resource_group_name = resource_group + ns.namespace = provider_namespace + ns.parent = parent + ns.resource_type = resource_type + return ns + + @mock.patch('azure.cli.core.commands.client_factory.get_subscription_id', _mock_get_subscription_id) + def test_monitor_resource_id(self): + from azure.cli.command_modules.monitor.validators import get_target_resource_validator + validator = get_target_resource_validator('name_or_id', True) + + id = '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.Compute/virtualMachines/vm1' + + # must supply name or ID + ns = self._build_namespace() + with self.assertRaises(CLIError): + validator(ns) + + # must only supply ID or name parameters + ns = self._build_namespace(id, 'my-rg', 'blahblah', 'stuff') + with self.assertRaises(CLIError): + validator(ns) + + # error on invalid ID + ns = self._build_namespace('bad-id') + with self.assertRaises(CLIError): + validator(ns) + + # allow Provider/Type syntax (same as resource commands) + ns = self._build_namespace('vm1', 'my-rg', None, None, 'Microsoft.Compute/virtualMachines') + validator(ns) + self.assertEqual(ns.name_or_id, id) + + # allow Provider and Type separate + ns = self._build_namespace('vm1', 'my-rg', 'Microsoft.Compute', None, 'virtualMachines') + validator(ns) + self.assertEqual(ns.name_or_id, id) + + # verify works with parent + id = '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.Compute/fakeType/type1/anotherFakeType/type2/virtualMachines/vm1' + ns = self._build_namespace('vm1', 'my-rg', 'Microsoft.Compute', 'fakeType/type1/anotherFakeType/type2', 'virtualMachines') + validator(ns) + self.assertEqual(ns.name_or_id, id) + + # verify extra parameters are removed + self.assertFalse(hasattr(ns, 'resource_name')) + self.assertFalse(hasattr(ns, 'namespace')) + self.assertFalse(hasattr(ns, 'parent')) + self.assertFalse(hasattr(ns, 'resource_type')) diff --git a/src/command_modules/azure-cli-monitor/tests/test_monitor.py b/src/command_modules/azure-cli-monitor/tests/test_monitor.py new file mode 100644 index 000000000..a191b8558 --- /dev/null +++ b/src/command_modules/azure-cli-monitor/tests/test_monitor.py @@ -0,0 +1,105 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import unittest + +from azure.cli.testsdk import ScenarioTest, JMESPathCheck, ResourceGroupPreparer + + +class MonitorTests(ScenarioTest): + + @ResourceGroupPreparer(name_prefix='cli_test_monitor') + def test_monitor(self, resource_group): + + vm = 'vm1' + + vm_json = self.cmd('vm create -g {} -n {} --image UbuntuLTS --admin-password TestPassword11!! --admin-username testadmin --authentication-type password'.format(resource_group, vm)).get_output_in_json() + vm_id = vm_json['id'] + + # catalog command--so just don't fail + self.cmd('monitor metrics list-definitions --resource {} -g {} --resource-type Microsoft.Compute/virtualMachines'.format(vm, resource_group)) + + # test alert commands + rule1 = 'rule1' + rule2 = 'rule2' + rule3 = 'rule3' + webhook1 = 'https://alert.contoso.com?apiKey=value' + webhook2 = 'https://contoso.com/alerts' + self.cmd('monitor alert create -g {} -n {} --target {} --condition "Percentage CPU > 90 avg 5m"'.format(resource_group, rule1, vm_id), checks=[ + JMESPathCheck('actions[0].customEmails', []), + JMESPathCheck('actions[0].sendToServiceOwners', None), + JMESPathCheck('alertRuleResourceName', rule1), + JMESPathCheck('condition.dataSource.metricName', 'Percentage CPU'), + JMESPathCheck('condition.dataSource.resourceUri', vm_id), + JMESPathCheck('condition.threshold', 90.0), + JMESPathCheck('condition.timeAggregation', 'Average'), + JMESPathCheck('condition.windowSize', '0:05:00'), + ]) + self.cmd('monitor alert create -g {} -n {} --target {} --target-namespace Microsoft.Compute --target-type virtualMachines --disabled --condition "Percentage CPU >= 60 avg 1h" --description "Test Rule 2" -a email test1@contoso.com test2@contoso.com test3@contoso.com'.format(resource_group, rule2, vm), checks=[ + JMESPathCheck('length(actions[0].customEmails)', 3), + JMESPathCheck('actions[0].sendToServiceOwners', None), + JMESPathCheck('alertRuleResourceName', rule2), + JMESPathCheck('condition.dataSource.metricName', 'Percentage CPU'), + JMESPathCheck('condition.dataSource.resourceUri', vm_id), + JMESPathCheck('condition.threshold', 60.0), + JMESPathCheck('condition.timeAggregation', 'Average'), + JMESPathCheck('condition.windowSize', '1:00:00'), + JMESPathCheck('isEnabled', None), + JMESPathCheck('description', 'Test Rule 2') + ]) + self.cmd('monitor alert create -g {} -n {} --target {} --condition "Percentage CPU >= 99 avg 5m" --action webhook {} --action webhook {} apiKey=value'.format(resource_group, rule3, vm_id, webhook1, webhook2), checks=[ + JMESPathCheck('alertRuleResourceName', rule3), + JMESPathCheck('condition.dataSource.metricName', 'Percentage CPU'), + JMESPathCheck('condition.dataSource.resourceUri', vm_id), + JMESPathCheck('condition.operator', 'GreaterThanOrEqual'), + JMESPathCheck('condition.threshold', 99.0), + JMESPathCheck('condition.timeAggregation', 'Average'), + JMESPathCheck('condition.windowSize', '0:05:00'), + JMESPathCheck('isEnabled', True), + JMESPathCheck('description', 'Percentage CPU >= 99 avg 5m') + ]) + self.cmd('monitor alert show -g {} -n {}'.format(resource_group, rule1), checks=[ + JMESPathCheck('alertRuleResourceName', rule1) + ]) + + self.cmd('monitor alert delete -g {} -n {}'.format(resource_group, rule2)) + self.cmd('monitor alert delete -g {} -n {}'.format(resource_group, rule3)) + self.cmd('monitor alert list -g {}'.format(resource_group), checks=[ + JMESPathCheck('length(@)', 1) + ]) + + def _check_emails(actions, emails_to_verify, email_service_owners=None): + emails = next((x for x in actions if x['odatatype'].endswith('RuleEmailAction')), None) + custom_emails = emails['customEmails'] + if emails_to_verify is not None: + self.assertEqual(str(emails_to_verify.sort()), str(custom_emails.sort())) + if email_service_owners is not None: + self.assertEqual(emails['sendToServiceOwners'], email_service_owners) + + def _check_webhooks(actions, uris_to_check): + webhooks = [x['serviceUri'] for x in actions if x['odatatype'].endswith('RuleWebhookAction')] + if uris_to_check is not None: + self.assertEqual(webhooks.sort(), uris_to_check.sort()) + + # test updates + result = self.cmd('monitor alert update -g {} -n {} -a email test1@contoso.com -a webhook {} --operator ">=" --threshold 85'.format(resource_group, rule1, webhook1), checks=[ + JMESPathCheck('condition.operator', 'GreaterThanOrEqual'), + JMESPathCheck('condition.threshold', 85.0), + ]).get_output_in_json() + _check_emails(result['actions'], ['test1@contoso.com'], None) + _check_webhooks(result['actions'], [webhook1]) + + result = self.cmd('monitor alert update -g {} -n {} -r email test1@contoso.com -a email test2@contoso.com -a email test3@contoso.com'.format(resource_group, rule1)).get_output_in_json() + _check_emails(result['actions'], ['test1@contoso.com', 'test2@contoso.com', 'test3@contoso.com'], None) + + result = self.cmd('monitor alert update -g {} -n {} --email-service-owners'.format(resource_group, rule1)).get_output_in_json() + _check_emails(result['actions'], None, True) + + self.cmd('monitor alert update -g {} -n {} --email-service-owners False --remove-action webhook {} --add-action webhook {}'.format(resource_group, rule1, webhook1, webhook2)) + _check_webhooks(result['actions'], [webhook2]) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/command_modules/azure-cli-network/tests/recordings/test_network_watcher.yaml b/src/command_modules/azure-cli-network/tests/recordings/test_network_watcher.yaml index 338a058af..307db7748 100644 --- a/src/command_modules/azure-cli-network/tests/recordings/test_network_watcher.yaml +++ b/src/command_modules/azure-cli-network/tests/recordings/test_network_watcher.yaml @@ -7,94 +7,99 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b5bab27e-245b-11e7-aaa0-a0b3ccf7272a] + x-ms-client-request-id: [289e7a62-3b29-11e7-b711-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"780f3380-5349-41a5-81ed-cd7a4e96ed49\"","type":"Microsoft.Network/networkWatchers","location":"westus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"westus2-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus2-watcher","etag":"W/\"220a932a-d62d-47f1-8b0d-26a20d23991a\"","type":"Microsoft.Network/networkWatchers","location":"westus2","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"westus-watcher\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher\"\ + ,\r\n \"etag\": \"W/\\\"670c995d-bb81-4cfb-bfeb-0f1d0d902b82\\\"\",\r\ + \n \"type\": \"Microsoft.Network/networkWatchers\",\r\n \"location\"\ + : \"westus\",\r\n \"tags\": {\r\n \"foo\": \"doo\"\r\n },\r\ + \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"runningOperationIds\": []\r\n }\r\n }\r\n ]\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:23:17 GMT'] + Date: ['Wed, 17 May 2017 17:49:27 GMT'] Expires: ['-1'] Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['1073'] - x-ms-original-request-ids: [a05b9d14-6893-4d9b-a257-c31d3855c278, c5bbed0f-ed4c-434f-8808-221f2585619e, - d687f68a-4036-4aa9-aa06-c4c6e16a9b33] + content-length: ['520'] status: {code: 200, message: OK} - request: - body: '{"location": "westus"}' + body: '{"location": "westus2"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['22'] + Content-Length: ['23'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b602a836-245b-11e7-b4b9-a0b3ccf7272a] + x-ms-client-request-id: [28c60290-3b29-11e7-b660-a0b3ccf7272a] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkWatchers/westus2-watcher?api-version=2017-03-01 response: - body: {string: "{\r\n \"name\": \"westus-watcher\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher\"\ - ,\r\n \"etag\": \"W/\\\"780f3380-5349-41a5-81ed-cd7a4e96ed49\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/networkWatchers\",\r\n \"location\": \"westus\"\ + body: {string: "{\r\n \"name\": \"westus2-watcher\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkWatchers/westus2-watcher\"\ + ,\r\n \"etag\": \"W/\\\"02ca7f3e-011c-4723-a6e3-ca5252774a5a\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/networkWatchers\",\r\n \"location\": \"westus2\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ \ \"runningOperationIds\": []\r\n }\r\n}"} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/05971129-028f-49a0-8123-f0ac8473e0c7?api-version=2017-03-01'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus2/operations/3a979408-c169-4ea8-8d36-eb6c874befb0?api-version=2017-03-01'] Cache-Control: [no-cache] + Content-Length: ['429'] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:23:17 GMT'] + Date: ['Wed, 17 May 2017 17:49:28 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['402'] x-ms-ratelimit-remaining-subscription-writes: ['1199'] - status: {code: 200, message: OK} + status: {code: 201, message: Created} - request: - body: '{"location": "westus2"}' + body: '{"location": "westus", "tags": {"foo": "doo"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['23'] + Content-Length: ['46'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b6a62100-245b-11e7-a8fa-a0b3ccf7272a] + x-ms-client-request-id: [29431668-3b29-11e7-9e16-a0b3ccf7272a] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus2-watcher?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher?api-version=2017-03-01 response: - body: {string: "{\r\n \"name\": \"westus2-watcher\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus2-watcher\"\ - ,\r\n \"etag\": \"W/\\\"220a932a-d62d-47f1-8b0d-26a20d23991a\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/networkWatchers\",\r\n \"location\": \"westus2\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"runningOperationIds\": []\r\n }\r\n}"} + body: {string: "{\r\n \"name\": \"westus-watcher\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher\"\ + ,\r\n \"etag\": \"W/\\\"64d50082-001f-41e2-9bd2-c57b90281e00\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/networkWatchers\",\r\n \"location\": \"westus\"\ + ,\r\n \"tags\": {\r\n \"foo\": \"doo\"\r\n },\r\n \"properties\": {\r\ + \n \"provisioningState\": \"Succeeded\",\r\n \"runningOperationIds\"\ + : []\r\n }\r\n}"} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus2/operations/5d3322c0-b870-4e3f-987e-66b2863cd182?api-version=2017-03-01'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/f141f428-4888-4f45-a405-62f844f1512c?api-version=2017-03-01'] Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:23:17 GMT'] + Date: ['Wed, 17 May 2017 17:49:28 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['405'] + content-length: ['439'] x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: @@ -105,25 +110,24 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b6d786d4-245b-11e7-a6f3-a0b3ccf7272a] + x-ms-client-request-id: [2980eada-3b29-11e7-9a9a-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"780f3380-5349-41a5-81ed-cd7a4e96ed49\"","type":"Microsoft.Network/networkWatchers","location":"westus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"westus2-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus2-watcher","etag":"W/\"220a932a-d62d-47f1-8b0d-26a20d23991a\"","type":"Microsoft.Network/networkWatchers","location":"westus2","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"64d50082-001f-41e2-9bd2-c57b90281e00\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"westus2-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkWatchers/westus2-watcher","etag":"W/\"02ca7f3e-011c-4723-a6e3-ca5252774a5a\"","type":"Microsoft.Network/networkWatchers","location":"westus2","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:23:18 GMT'] + Date: ['Wed, 17 May 2017 17:49:28 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] - content-length: ['1073'] - x-ms-original-request-ids: [12144127-00cc-46f3-acf6-8eee276b9801, 5988e9ad-537b-4b0b-b1ec-725987a34273, - 40591546-de51-4fb5-a1ef-bb827fd3fe4a] + content-length: ['765'] + x-ms-original-request-ids: [f7152f68-bacd-4bdc-87c8-6bebc4dabcc2, a14638e9-5d2d-4331-a326-c5e0bb7d0f2b] status: {code: 200, message: OK} - request: body: null @@ -133,28 +137,27 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b72ba8f6-245b-11e7-8c05-a0b3ccf7272a] + x-ms-client-request-id: [29b0b31c-3b29-11e7-8224-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"780f3380-5349-41a5-81ed-cd7a4e96ed49\"","type":"Microsoft.Network/networkWatchers","location":"westus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"westus2-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus2-watcher","etag":"W/\"220a932a-d62d-47f1-8b0d-26a20d23991a\"","type":"Microsoft.Network/networkWatchers","location":"westus2","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"64d50082-001f-41e2-9bd2-c57b90281e00\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"westus2-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkWatchers/westus2-watcher","etag":"W/\"02ca7f3e-011c-4723-a6e3-ca5252774a5a\"","type":"Microsoft.Network/networkWatchers","location":"westus2","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:23:18 GMT'] + Date: ['Wed, 17 May 2017 17:49:29 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] - content-length: ['1073'] - x-ms-original-request-ids: [b45f3e96-e19d-4f1f-b7e2-73d6f4212c02, 206581e3-0ef4-4f98-bf9e-8845482b28c1, - 06a88aa8-193c-44c4-8a4a-7a30d8a47c1d] + content-length: ['765'] + x-ms-original-request-ids: [cb2b4107-0140-46ad-9bf7-9f3ba4bc600d, 3ec116d8-6cef-4f42-a279-44642cced67e] status: {code: 200, message: OK} - request: - body: '{"tags": {"foo": "doo"}, "location": "westus"}' + body: '{"location": "westus", "tags": {"foo": "doo"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -162,24 +165,24 @@ interactions: Content-Length: ['46'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b771fce6-245b-11e7-8209-a0b3ccf7272a] + x-ms-client-request-id: [29e669e8-3b29-11e7-9ea0-a0b3ccf7272a] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher?api-version=2017-03-01 response: - body: {string: "{\r\n \"name\": \"westus-watcher\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher\"\ - ,\r\n \"etag\": \"W/\\\"c0dd6b55-d81f-4708-a1cc-25fbf5c327a8\\\"\",\r\n \ + body: {string: "{\r\n \"name\": \"westus-watcher\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher\"\ + ,\r\n \"etag\": \"W/\\\"64d50082-001f-41e2-9bd2-c57b90281e00\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/networkWatchers\",\r\n \"location\": \"westus\"\ ,\r\n \"tags\": {\r\n \"foo\": \"doo\"\r\n },\r\n \"properties\": {\r\ \n \"provisioningState\": \"Succeeded\",\r\n \"runningOperationIds\"\ : []\r\n }\r\n}"} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/594182f2-db8b-41c6-a1ab-10c25ea4c7b3?api-version=2017-03-01'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/8feea2ee-dfab-442e-a9b1-fc28fedb9ea2?api-version=2017-03-01'] Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:23:19 GMT'] + Date: ['Wed, 17 May 2017 17:49:30 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -187,10 +190,10 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['439'] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: - body: '{"tags": {"foo": "doo"}, "location": "westus2"}' + body: '{"location": "westus2", "tags": {"foo": "doo"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -198,32 +201,32 @@ interactions: Content-Length: ['47'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b7ccb102-245b-11e7-a054-a0b3ccf7272a] + x-ms-client-request-id: [2a15d990-3b29-11e7-907c-a0b3ccf7272a] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus2-watcher?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkWatchers/westus2-watcher?api-version=2017-03-01 response: - body: {string: "{\r\n \"name\": \"westus2-watcher\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus2-watcher\"\ - ,\r\n \"etag\": \"W/\\\"ea4f9434-fdfb-4d7d-b9aa-cc22e999974e\\\"\",\r\n \ + body: {string: "{\r\n \"name\": \"westus2-watcher\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkWatchers/westus2-watcher\"\ + ,\r\n \"etag\": \"W/\\\"1dcbb925-967e-4415-a7ff-1ada8e9d87e2\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/networkWatchers\",\r\n \"location\": \"westus2\"\ ,\r\n \"tags\": {\r\n \"foo\": \"doo\"\r\n },\r\n \"properties\": {\r\ \n \"provisioningState\": \"Succeeded\",\r\n \"runningOperationIds\"\ : []\r\n }\r\n}"} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus2/operations/35e03a6a-9839-41ed-9695-6eabcf642c12?api-version=2017-03-01'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus2/operations/2263ab1e-c011-4258-8b37-8e7b519e294a?api-version=2017-03-01'] Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:23:20 GMT'] + Date: ['Wed, 17 May 2017 17:49:30 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['442'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + content-length: ['466'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -233,25 +236,24 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b83dc106-245b-11e7-8d26-a0b3ccf7272a] + x-ms-client-request-id: [2a99a028-3b29-11e7-a329-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"c0dd6b55-d81f-4708-a1cc-25fbf5c327a8\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"westus2-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus2-watcher","etag":"W/\"ea4f9434-fdfb-4d7d-b9aa-cc22e999974e\"","type":"Microsoft.Network/networkWatchers","location":"westus2","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"64d50082-001f-41e2-9bd2-c57b90281e00\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"westus2-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkWatchers/westus2-watcher","etag":"W/\"1dcbb925-967e-4415-a7ff-1ada8e9d87e2\"","type":"Microsoft.Network/networkWatchers","location":"westus2","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:23:21 GMT'] + Date: ['Wed, 17 May 2017 17:49:30 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] - content-length: ['1115'] - x-ms-original-request-ids: [d847eeab-e414-467f-bcb5-93444abc162c, a0c6b8cb-1045-4174-ab35-cda3f28254c5, - 7e702627-5132-4c82-baa6-7a86c423b3d8] + content-length: ['786'] + x-ms-original-request-ids: [ef7d2a7b-dc71-4327-9808-726e3eb302ad, 839bf2fc-f0eb-4099-ba6b-85196290c87c] status: {code: 200, message: OK} - request: body: null @@ -261,25 +263,24 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b899f0a4-245b-11e7-9bcd-a0b3ccf7272a] + x-ms-client-request-id: [2ad7718a-3b29-11e7-a1c4-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"c0dd6b55-d81f-4708-a1cc-25fbf5c327a8\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"westus2-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus2-watcher","etag":"W/\"ea4f9434-fdfb-4d7d-b9aa-cc22e999974e\"","type":"Microsoft.Network/networkWatchers","location":"westus2","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"64d50082-001f-41e2-9bd2-c57b90281e00\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"westus2-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkWatchers/westus2-watcher","etag":"W/\"1dcbb925-967e-4415-a7ff-1ada8e9d87e2\"","type":"Microsoft.Network/networkWatchers","location":"westus2","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:23:21 GMT'] + Date: ['Wed, 17 May 2017 17:49:31 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] - content-length: ['1115'] - x-ms-original-request-ids: [6ef73889-df07-4611-af7d-e8567254e8f7, 5cd047f2-b306-4c71-b42b-b82e77de4898, - 4158d825-c7a8-430c-9830-204420e8e1bc] + content-length: ['786'] + x-ms-original-request-ids: [770eb39d-3081-4080-b4a7-b358897ec3ca, dc1f340a-acb9-47bc-9a2b-48feb9540b35] status: {code: 200, message: OK} - request: body: null @@ -290,21 +291,21 @@ interactions: Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b8e318ec-245b-11e7-bea5-a0b3ccf7272a] + x-ms-client-request-id: [2b05a66c-3b29-11e7-88b5-a0b3ccf7272a] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus2-watcher?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkWatchers/westus2-watcher?api-version=2017-03-01 response: body: {string: ''} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus2/operations/1544fb32-0f04-4d5a-b9e7-1e4b86600e61?api-version=2017-03-01'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus2/operations/e04b7f69-2149-4707-b9de-b1d9d332b9cf?api-version=2017-03-01'] Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Tue, 18 Apr 2017 17:23:21 GMT'] + Date: ['Wed, 17 May 2017 17:49:31 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus2/operationResults/1544fb32-0f04-4d5a-b9e7-1e4b86600e61?api-version=2017-03-01'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus2/operationResults/e04b7f69-2149-4707-b9de-b1d9d332b9cf?api-version=2017-03-01'] Pragma: [no-cache] Retry-After: ['10'] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -319,18 +320,18 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b8e318ec-245b-11e7-bea5-a0b3ccf7272a] + x-ms-client-request-id: [2b05a66c-3b29-11e7-88b5-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/1544fb32-0f04-4d5a-b9e7-1e4b86600e61?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/e04b7f69-2149-4707-b9de-b1d9d332b9cf?api-version=2017-03-01 response: body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:23:32 GMT'] + Date: ['Wed, 17 May 2017 17:49:42 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -347,25 +348,24 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [bf72dd12-245b-11e7-b76a-a0b3ccf7272a] + x-ms-client-request-id: [319481a6-3b29-11e7-8ccc-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"c0dd6b55-d81f-4708-a1cc-25fbf5c327a8\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"64d50082-001f-41e2-9bd2-c57b90281e00\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:23:32 GMT'] + Date: ['Wed, 17 May 2017 17:49:42 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [b0a0d4a6-a252-4593-83fb-85f532dd7943, ed803d0c-49f9-468a-a1a7-d4de99b03bbc, - 13b62d9a-9c60-4eec-a771-e63d81a87c28] + content-length: ['385'] + x-ms-original-request-ids: [01cb86b2-0e22-449a-a9ae-45e2502ffce0, 071c4239-852b-46e0-9b0c-b2186730d0ff] status: {code: 200, message: OK} - request: body: null @@ -375,27 +375,27 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [bfc7de5e-245b-11e7-bb7c-a0b3ccf7272a] + x-ms-client-request-id: [31b0ef3a-3b29-11e7-8aca-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"c0dd6b55-d81f-4708-a1cc-25fbf5c327a8\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"64d50082-001f-41e2-9bd2-c57b90281e00\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:23:33 GMT'] + Date: ['Wed, 17 May 2017 17:49:42 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [868d82e9-25e8-4161-a9d1-043808047510, ca0c9be5-eb7b-46f5-9bac-3417ca797730] + content-length: ['385'] + x-ms-original-request-ids: [0454fc69-8d77-4f7b-a16c-5cfb94265213, 4da4abca-1374-4a79-a326-f12c9968fa1e] status: {code: 200, message: OK} - request: - body: '{"kind": "Storage", "location": "westus", "sku": {"name": "Standard_LRS"}}' + body: '{"location": "westus", "kind": "Storage", "sku": {"name": "Standard_LRS"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -404,9 +404,9 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [c079eb4a-245b-11e7-ac2e-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Storage/storageAccounts/clitestnwstorage1?api-version=2016-12-01 response: @@ -414,9 +414,9 @@ interactions: headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Tue, 18 Apr 2017 17:23:36 GMT'] + Date: ['Wed, 17 May 2017 17:49:43 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/e51e3930-d3c2-4c5f-bcdb-4ae6a7d0c459?monitor=true&api-version=2016-12-01'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] Retry-After: ['17'] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] @@ -432,27 +432,24 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [c079eb4a-245b-11e7-ac2e-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/e51e3930-d3c2-4c5f-bcdb-4ae6a7d0c459?monitor=true&api-version=2016-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Storage/storageAccounts/clitestnwstorage1","kind":"Storage","location":"westus","name":"clitestnwstorage1","properties":{"creationTime":"2017-04-18T17:23:36.9566350Z","primaryEndpoints":{"blob":"https://clitestnwstorage1.blob.core.windows.net/","file":"https://clitestnwstorage1.file.core.windows.net/","queue":"https://clitestnwstorage1.queue.core.windows.net/","table":"https://clitestnwstorage1.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available","supportsHttpsTrafficOnly":false},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} - - '} + body: {string: ''} headers: Cache-Control: [no-cache] - Content-Type: [application/json] - Date: ['Tue, 18 Apr 2017 17:23:54 GMT'] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:50:01 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] + Retry-After: ['17'] Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['774'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -461,94 +458,52 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 resourcemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [cd0039dc-245b-11e7-b928-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_network_watcher?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher","name":"cli_test_network_watcher","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: ''} headers: Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:23:55 GMT'] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:50:19 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - content-length: ['238'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: - Connection: [close] - Host: [raw.githubusercontent.com] - User-Agent: [Python-urllib/3.5] + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: "{\n \"$schema\":\"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\"\ - ,\n \"contentVersion\":\"1.0.0.0\",\n \"parameters\":{},\n \"variables\"\ - :{},\n \"resources\":[],\n\n \"outputs\":{\n \"aliases\":{\n \"\ - type\":\"object\",\n \"value\":{\n\n \"Linux\":{\n \"\ - CentOS\":{\n \"publisher\":\"OpenLogic\",\n \"offer\"\ - :\"CentOS\",\n \"sku\":\"7.3\",\n \"version\":\"latest\"\ - \n },\n \"CoreOS\":{\n \"publisher\":\"CoreOS\"\ - ,\n \"offer\":\"CoreOS\",\n \"sku\":\"Stable\",\n \ - \ \"version\":\"latest\"\n },\n \"Debian\":{\n\ - \ \"publisher\":\"credativ\",\n \"offer\":\"Debian\"\ - ,\n \"sku\":\"8\",\n \"version\":\"latest\"\n \ - \ },\n \"openSUSE-Leap\": {\n \"publisher\":\"SUSE\"\ - ,\n \"offer\":\"openSUSE-Leap\",\n \"sku\":\"42.2\"\ - ,\n \"version\": \"latest\"\n },\n \"RHEL\":{\n\ - \ \"publisher\":\"RedHat\",\n \"offer\":\"RHEL\",\n\ - \ \"sku\":\"7.3\",\n \"version\":\"latest\"\n \ - \ },\n \"SLES\":{\n \"publisher\":\"SUSE\",\n \ - \ \"offer\":\"SLES\",\n \"sku\":\"12-SP2\",\n \ - \ \"version\":\"latest\"\n },\n \"UbuntuLTS\":{\n \ - \ \"publisher\":\"Canonical\",\n \"offer\":\"UbuntuServer\"\ - ,\n \"sku\":\"16.04-LTS\",\n \"version\":\"latest\"\n\ - \ }\n },\n\n \"Windows\":{\n \"Win2016Datacenter\"\ - :{\n \"publisher\":\"MicrosoftWindowsServer\",\n \"\ - offer\":\"WindowsServer\",\n \"sku\":\"2016-Datacenter\",\n \ - \ \"version\":\"latest\"\n },\n \"Win2012R2Datacenter\"\ - :{\n \"publisher\":\"MicrosoftWindowsServer\",\n \"\ - offer\":\"WindowsServer\",\n \"sku\":\"2012-R2-Datacenter\",\n\ - \ \"version\":\"latest\"\n },\n \"Win2012Datacenter\"\ - :{\n \"publisher\":\"MicrosoftWindowsServer\",\n \"\ - offer\":\"WindowsServer\",\n \"sku\":\"2012-Datacenter\",\n \ - \ \"version\":\"latest\"\n },\n \"Win2008R2SP1\"\ - :{\n \"publisher\":\"MicrosoftWindowsServer\",\n \"\ - offer\":\"WindowsServer\",\n \"sku\":\"2008-R2-SP1\",\n \ - \ \"version\":\"latest\"\n }\n }\n }\n }\n }\n\ - }\n"} + body: {string: ''} headers: - Accept-Ranges: [bytes] - Access-Control-Allow-Origin: ['*'] - Cache-Control: [max-age=300] - Connection: [close] - Content-Length: ['2235'] - Content-Security-Policy: [default-src 'none'; style-src 'unsafe-inline'] - Content-Type: [text/plain; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:23:56 GMT'] - ETag: ['"d6824855d13e27c5258a680eb60f635d088fd05e"'] - Expires: ['Tue, 18 Apr 2017 17:28:56 GMT'] - Source-Age: ['0'] - Strict-Transport-Security: [max-age=31536000] - Vary: ['Authorization,Accept-Encoding'] - Via: [1.1 varnish] - X-Cache: [MISS] - X-Cache-Hits: ['0'] - X-Content-Type-Options: [nosniff] - X-Fastly-Request-ID: [6fd506e90b0466d7e41f98f0d6d937b284cfbc50] - X-Frame-Options: [deny] - X-Geo-Block-List: [''] - X-GitHub-Request-Id: ['E7DE:04F5:51456B5:5481E9C:58F64BAB'] - X-Served-By: [cache-sea1050-SEA] - X-Timer: ['S1492536236.129848,VS0,VE109'] - X-XSS-Protection: [1; mode=block] - status: {code: 200, message: OK} + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:50:36 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} - request: body: null headers: @@ -557,81 +512,52 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [cd46a0a4-245b-11e7-9980-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: '{"value":[]}'} + body: {string: ''} headers: Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:23:56 GMT'] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:50:54 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - content-length: ['12'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: - body: '{"properties": {"mode": "Incremental", "template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", "resources": [{"type": "Microsoft.Network/virtualNetworks", - "tags": {}, "location": "westus", "name": "vm1VNET", "properties": {"subnets": - [{"properties": {"addressPrefix": "10.0.0.0/24"}, "name": "vm1Subnet"}], "addressSpace": - {"addressPrefixes": ["10.0.0.0/16"]}}, "apiVersion": "2015-06-15", "dependsOn": - []}, {"type": "Microsoft.Network/networkSecurityGroups", "tags": {}, "location": - "westus", "name": "vm1NSG", "dependsOn": [], "properties": {"securityRules": - [{"properties": {"sourcePortRange": "*", "destinationPortRange": "22", "access": - "Allow", "destinationAddressPrefix": "*", "sourceAddressPrefix": "*", "protocol": - "Tcp", "priority": 1000, "direction": "Inbound"}, "name": "default-allow-ssh"}]}, - "apiVersion": "2015-06-15"}, {"type": "Microsoft.Network/publicIPAddresses", - "tags": {}, "location": "westus", "name": "vm1PublicIP", "dependsOn": [], "properties": - {"publicIPAllocationMethod": "dynamic"}, "apiVersion": "2015-06-15"}, {"type": - "Microsoft.Network/networkInterfaces", "tags": {}, "location": "westus", "name": - "vm1VMNic", "dependsOn": ["Microsoft.Network/virtualNetworks/vm1VNET", "Microsoft.Network/networkSecurityGroups/vm1NSG", - "Microsoft.Network/publicIpAddresses/vm1PublicIP"], "properties": {"networkSecurityGroup": - {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"}, - "ipConfigurations": [{"properties": {"subnet": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet"}, - "privateIPAllocationMethod": "Dynamic", "publicIPAddress": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"}}, - "name": "ipconfigvm1"}]}, "apiVersion": "2015-06-15"}, {"type": "Microsoft.Compute/virtualMachines", - "tags": {}, "location": "westus", "name": "vm1", "dependsOn": ["Microsoft.Network/networkInterfaces/vm1VMNic"], - "properties": {"networkProfile": {"networkInterfaces": [{"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic"}]}, - "storageProfile": {"osDisk": {"createOption": "fromImage", "caching": null, - "managedDisk": {"storageAccountType": "Premium_LRS"}, "name": "osdisk_EF1e9VAb72"}, - "imageReference": {"offer": "UbuntuServer", "version": "latest", "sku": "16.04-LTS", - "publisher": "Canonical"}}, "osProfile": {"linuxConfiguration": {"ssh": {"publicKeys": - [{"path": "/home/trpresco/.ssh/authorized_keys", "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLkUy/BFb7o47gQqFcMiioYD4w3Tu/7bpy7t/3pQVhjmsEEaWk09dA1Ju1UbukKaLpOprch/r9bgUWu1oTEP7E5evwaJl0TvLX0gsxGGItfPc58bbQ77uxuXhMfYEZ6oiS+Ybt5nUjjDUUNhSIrKSLhCHCmQ9JnOd/AObf9G4iR38bsABIAVxmbYT6OQKm4oRwNs1c99B5TsfnREFs7yawCV3hjKVHsD3bRo83bBbBG3d/CHYfcnEbpK4weagw899YodAXDiUh0qYfOy0mGz4zWaQ4rcCitk9od/WSDhLAOy74cqwzKJwoR9DcALxkWVMuJW7xBF9tWEroVvFrh6/N"}]}, - "disablePasswordAuthentication": true}, "adminUsername": "trpresco", "computerName": - "vm1"}, "hardwareProfile": {"vmSize": "Standard_DS1_v2"}}, "apiVersion": "2016-04-30-preview"}], - "outputs": {}, "variables": {}, "parameters": {}}, "parameters": {}}}' + body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['3507'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 resourcemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [cd5b6080-245b-11e7-a6b8-a0b3ccf7272a] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/vm_deploy_BtQtA5NtaP93vKt6AOGfHuNwNZIITzAR","name":"vm_deploy_BtQtA5NtaP93vKt6AOGfHuNwNZIITzAR","properties":{"templateHash":"6887668168770991941","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-04-18T17:23:57.6063245Z","duration":"PT0.6204488S","correlationId":"bd69eddb-3cc0-4be5-993f-c862fb5024b7","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIpAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIpAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}]}}'} + body: {string: ''} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/vm_deploy_BtQtA5NtaP93vKt6AOGfHuNwNZIITzAR/operationStatuses/08587090706484917545?api-version=2017-05-10'] Cache-Control: [no-cache] - Content-Length: ['2386'] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:23:56 GMT'] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:51:11 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - status: {code: 201, message: Created} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -640,24 +566,25 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 resourcemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [cd5b6080-245b-11e7-a6b8-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587090706484917545?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: '{"status":"Running"}'} + body: {string: ''} headers: Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:24:27 GMT'] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:51:29 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - content-length: ['20'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -666,24 +593,25 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 resourcemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [cd5b6080-245b-11e7-a6b8-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587090706484917545?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: '{"status":"Running"}'} + body: {string: ''} headers: Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:24:57 GMT'] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:51:46 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - content-length: ['20'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -692,24 +620,25 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 resourcemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [cd5b6080-245b-11e7-a6b8-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587090706484917545?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: '{"status":"Running"}'} + body: {string: ''} headers: Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:25:27 GMT'] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:52:04 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - content-length: ['20'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -718,24 +647,25 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 resourcemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [cd5b6080-245b-11e7-a6b8-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587090706484917545?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: '{"status":"Succeeded"}'} + body: {string: ''} headers: Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:25:58 GMT'] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:52:21 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - content-length: ['22'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -744,24 +674,25 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 resourcemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [cd5b6080-245b-11e7-a6b8-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/vm_deploy_BtQtA5NtaP93vKt6AOGfHuNwNZIITzAR","name":"vm_deploy_BtQtA5NtaP93vKt6AOGfHuNwNZIITzAR","properties":{"templateHash":"6887668168770991941","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-04-18T17:25:51.8593562Z","duration":"PT1M54.8734805S","correlationId":"bd69eddb-3cc0-4be5-993f-c862fb5024b7","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIpAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIpAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}],"outputs":{},"outputResources":[{"id":"Microsoft.Compute/virtualMachines/vm1"},{"id":"Microsoft.Network/networkInterfaces/vm1VMNic"},{"id":"Microsoft.Network/networkSecurityGroups/vm1NSG"},{"id":"Microsoft.Network/publicIPAddresses/vm1PublicIP"},{"id":"Microsoft.Network/virtualNetworks/vm1VNET"}]}}'} + body: {string: ''} headers: Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:25:58 GMT'] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:52:38 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - content-length: ['2688'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -770,60 +701,25 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [16b63146-245c-11e7-adbc-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"2391ed7e-4579-4e07-bde3-ab3889095130\"\ - ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ - \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ - \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ - ,\r\n \"sku\": \"16.04-LTS\",\r\n \"version\": \"latest\"\r\n\ - \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_EF1e9VAb72\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ - \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/disks/osdisk_EF1e9VAb72\"\ - \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ - : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ - ,\r\n \"adminUsername\": \"trpresco\",\r\n \"linuxConfiguration\"\ - : {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\"\ - : {\r\n \"publicKeys\": [\r\n {\r\n \"path\"\ - : \"/home/trpresco/.ssh/authorized_keys\",\r\n \"keyData\": \"\ - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLkUy/BFb7o47gQqFcMiioYD4w3Tu/7bpy7t/3pQVhjmsEEaWk09dA1Ju1UbukKaLpOprch/r9bgUWu1oTEP7E5evwaJl0TvLX0gsxGGItfPc58bbQ77uxuXhMfYEZ6oiS+Ybt5nUjjDUUNhSIrKSLhCHCmQ9JnOd/AObf9G4iR38bsABIAVxmbYT6OQKm4oRwNs1c99B5TsfnREFs7yawCV3hjKVHsD3bRo83bBbBG3d/CHYfcnEbpK4weagw899YodAXDiUh0qYfOy0mGz4zWaQ4rcCitk9od/WSDhLAOy74cqwzKJwoR9DcALxkWVMuJW7xBF9tWEroVvFrh6/N\"\ - \r\n }\r\n ]\r\n }\r\n },\r\n \"secrets\"\ - : []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - }]},\r\n \"provisioningState\": \"Succeeded\",\r\n \"instanceView\"\ - : {\r\n \"vmAgent\": {\r\n \"vmAgentVersion\": \"Unknown\",\r\n\ - \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/Unavailable\"\ - ,\r\n \"level\": \"Warning\",\r\n \"displayStatus\"\ - : \"Not Ready\",\r\n \"message\": \"VM status blob is found but\ - \ not yet populated.\",\r\n \"time\": \"2017-04-18T17:25:59+00:00\"\ - \r\n }\r\n ]\r\n },\r\n \"statuses\": [\r\n \ - \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ - \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ - ,\r\n \"time\": \"2017-04-18T17:25:41.4063635+00:00\"\r\n \ - \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n \ - \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\ - \n }\r\n ]\r\n }\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines\"\ - ,\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ - ,\r\n \"name\": \"vm1\"\r\n}"} + body: {string: ''} headers: Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:25:59 GMT'] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:52:55 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2887'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -832,49 +728,25 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [16da07dc-245c-11e7-8242-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: "{\r\n \"name\": \"vm1VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - ,\r\n \"etag\": \"W/\\\"f6aa9cf5-0cba-4ac2-a216-8ceae0e1afcf\\\"\",\r\n \ - \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n\ - \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"bcfed233-7a67-4590-a43c-f81471e3da46\"\ - ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm1\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\ - ,\r\n \"etag\": \"W/\\\"f6aa9cf5-0cba-4ac2-a216-8ceae0e1afcf\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\":\ - \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\ - \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\ - \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ - : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ - \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"yoerbdku5cpuppgm4azb304f0g.dx.internal.cloudapp.net\"\ - \r\n },\r\n \"macAddress\": \"00-0D-3A-36-82-6C\",\r\n \"enableAcceleratedNetworking\"\ - : false,\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ - \r\n },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ - \r\n }\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\ - \n}"} + body: {string: ''} headers: Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:25:58 GMT'] - ETag: [W/"f6aa9cf5-0cba-4ac2-a216-8ceae0e1afcf"] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:53:13 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2225'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -883,35 +755,52 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [16fd9cd2-245c-11e7-a836-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: "{\r\n \"name\": \"vm1PublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\ - ,\r\n \"etag\": \"W/\\\"8fe97487-b404-4a43-b601-f064a9bebfee\\\"\",\r\n \ - \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n\ - \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"a8da445e-1b99-457b-b4ad-fa907caa1e2f\"\ - ,\r\n \"ipAddress\": \"13.64.70.192\",\r\n \"publicIPAddressVersion\"\ - : \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\"\ - : 4,\r\n \"ipConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\ - \r\n }\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\"\r\ - \n}"} + body: {string: ''} headers: Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:53:30 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:25:59 GMT'] - ETag: [W/"8fe97487-b404-4a43-b601-f064a9bebfee"] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:53:48 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['848'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -920,60 +809,52 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [172a47f8-245c-11e7-8d82-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"2391ed7e-4579-4e07-bde3-ab3889095130\"\ - ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ - \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ - \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ - ,\r\n \"sku\": \"16.04-LTS\",\r\n \"version\": \"latest\"\r\n\ - \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_EF1e9VAb72\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ - \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/disks/osdisk_EF1e9VAb72\"\ - \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ - : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ - ,\r\n \"adminUsername\": \"trpresco\",\r\n \"linuxConfiguration\"\ - : {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\"\ - : {\r\n \"publicKeys\": [\r\n {\r\n \"path\"\ - : \"/home/trpresco/.ssh/authorized_keys\",\r\n \"keyData\": \"\ - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLkUy/BFb7o47gQqFcMiioYD4w3Tu/7bpy7t/3pQVhjmsEEaWk09dA1Ju1UbukKaLpOprch/r9bgUWu1oTEP7E5evwaJl0TvLX0gsxGGItfPc58bbQ77uxuXhMfYEZ6oiS+Ybt5nUjjDUUNhSIrKSLhCHCmQ9JnOd/AObf9G4iR38bsABIAVxmbYT6OQKm4oRwNs1c99B5TsfnREFs7yawCV3hjKVHsD3bRo83bBbBG3d/CHYfcnEbpK4weagw899YodAXDiUh0qYfOy0mGz4zWaQ4rcCitk9od/WSDhLAOy74cqwzKJwoR9DcALxkWVMuJW7xBF9tWEroVvFrh6/N\"\ - \r\n }\r\n ]\r\n }\r\n },\r\n \"secrets\"\ - : []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - }]},\r\n \"provisioningState\": \"Succeeded\",\r\n \"instanceView\"\ - : {\r\n \"vmAgent\": {\r\n \"vmAgentVersion\": \"Unknown\",\r\n\ - \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/Unavailable\"\ - ,\r\n \"level\": \"Warning\",\r\n \"displayStatus\"\ - : \"Not Ready\",\r\n \"message\": \"VM status blob is found but\ - \ not yet populated.\",\r\n \"time\": \"2017-04-18T17:25:59+00:00\"\ - \r\n }\r\n ]\r\n },\r\n \"statuses\": [\r\n \ - \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ - \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\"\ - ,\r\n \"time\": \"2017-04-18T17:25:41.4063635+00:00\"\r\n \ - \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n \ - \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\ - \n }\r\n ]\r\n }\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines\"\ - ,\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ - ,\r\n \"name\": \"vm1\"\r\n}"} + body: {string: ''} headers: Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:54:06 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:26:00 GMT'] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:54:23 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['2887'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -982,1358 +863,754 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [174f4412-245c-11e7-a671-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/publishers?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"\ - 4psa\",\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/4psa\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4ward365\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/4ward365\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"7isolutions\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/7isolutions\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"a10networks\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/a10networks\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"abiquo\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/abiquo\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"accellion\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/accellion\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Acronis\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Acronis\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Acronis.Backup\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Acronis.Backup\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"actian_matrix\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/actian_matrix\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"actifio\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/actifio\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"active-navigation\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/active-navigation\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"activeeon\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/activeeon\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"adam-software\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/adam-software\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"adatao\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/adatao\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"adobe_test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/adobe_test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"adra-match\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/adra-match\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"advantech\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/advantech\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"advantech-webaccess\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/advantech-webaccess\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"advellence\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/advellence\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aerospike\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aerospike\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aerospike-database\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aerospike-database\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aimsinnovation\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aimsinnovation\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"AIP.Diagnostics.Test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/AIP.Diagnostics.Test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aiscaler-cache-control-ddos-and-url-rewriting-\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aiscaler-cache-control-ddos-and-url-rewriting-\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"akeron\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/akeron\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"akumina\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/akumina\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"alachisoft\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/alachisoft\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"alertlogic\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/alertlogic\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"AlertLogic.Extension\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/AlertLogic.Extension\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"algebraix-data\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/algebraix-data\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"alienvault\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/alienvault\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"alldigital-brevity\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/alldigital-brevity\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"alteryx\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/alteryx\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"altiar\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/altiar\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"alvao\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/alvao\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"analitica\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/analitica\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"angoss\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/angoss\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"apigee\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/apigee\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"appcelerator\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/appcelerator\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"appex-networks\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/appex-networks\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"appistry\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/appistry\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"appscale-marketplace\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/appscale-marketplace\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"appveyorci\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/appveyorci\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"appzero\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/appzero\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aqua-security\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aqua-security\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"arangodb\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/arangodb\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aras\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aras\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"archive360\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/archive360\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"array_networks\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/array_networks\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"arvatosystems\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/arvatosystems\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"asigra\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/asigra\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aspex\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aspex\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aspex-managed-cloud\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aspex-managed-cloud\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"atlassian\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/atlassian\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"atmosera\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/atmosera\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"atomicorp\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/atomicorp\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"attunity_cloudbeam\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/attunity_cloudbeam\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"auraportal\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/auraportal\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"auriq-systems\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/auriq-systems\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"avds\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/avds\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"avepoint\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/avepoint\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"averesystems\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/averesystems\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aviatrix-systems\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aviatrix-systems\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"awingu\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/awingu\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"axinom\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/axinom\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"axway\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/axway\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"azul\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/azul\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"AzureRT.Test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/AzureRT.Test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"azuresyncfusion\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/azuresyncfusion\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"azuretesting\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/azuretesting\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"AzureTools1type\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/AzureTools1type\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"balabit\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/balabit\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"barracudanetworks\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/barracudanetworks\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"basho\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/basho\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"batch\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/batch\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bdy\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bdy\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"beyondtrust\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/beyondtrust\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Bitnami\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Bitnami\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bizagi\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bizagi\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"biztalk360\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/biztalk360\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"blackberry\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/blackberry\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"blockapps\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/blockapps\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"blockchain-foundry\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/blockchain-foundry\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"blockstack\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/blockstack\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bluetalon\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bluetalon\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bmc.ctm\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bmc.ctm\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bmcctm.test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bmcctm.test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"boundlessgeo\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/boundlessgeo\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"boxless\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/boxless\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"brainshare-it\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/brainshare-it\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"brocade_communications\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/brocade_communications\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bryte\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bryte\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bssw\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bssw\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"buddhalabs\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/buddhalabs\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bugrius\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bugrius\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bwappengine\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bwappengine\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Canonical\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Canonical\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"caringo\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/caringo\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"catechnologies\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/catechnologies\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cautelalabs\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cautelalabs\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cbrdashboard\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cbrdashboard\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cds\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cds\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"certivox\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/certivox\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cfd-direct\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cfd-direct\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"chain\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/chain\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"checkpoint\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/checkpoint\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"checkpointsystems\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/checkpointsystems\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"chef-software\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/chef-software\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Chef.Bootstrap.WindowsAzure\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Chef.Bootstrap.WindowsAzure\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cherwell\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cherwell\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cipherpoint\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cipherpoint\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"circleci\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/circleci\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cires21\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cires21\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cisco\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cisco\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"citrix\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/citrix\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"clear-linux-project\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/clear-linux-project\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"click2cloud-inc\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/click2cloud-inc\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"clickberry\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/clickberry\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"clouber\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/clouber\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloud-cruiser\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloud-cruiser\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudbees\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudbees\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudbees-enterprise-jenkins\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudbees-enterprise-jenkins\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudbolt-software\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudbolt-software\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudboost\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudboost\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudcoreo\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudcoreo\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudcruiser\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudcruiser\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudera\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudera\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudera1qaz2wsx\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudera1qaz2wsx\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudhouse\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudhouse\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudify\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudify\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudlink\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudlink\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"CloudLinkEMC.SecureVM\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/CloudLinkEMC.SecureVM\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"CloudLinkEMC.SecureVM.Test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/CloudLinkEMC.SecureVM.Test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"CloudLinkEMC.SecureVM.Test2\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/CloudLinkEMC.SecureVM.Test2\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudsecurity\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudsecurity\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudsoft\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudsoft\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"clustrix\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/clustrix\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"codelathe\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/codelathe\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"codenvy\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/codenvy\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"coffingdw\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/coffingdw\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cognosys\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cognosys\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cohesity\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cohesity\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cohesive\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cohesive\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"commvault\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/commvault\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"companyname-short\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/companyname-short\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"composable\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/composable\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"comunity\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/comunity\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Confer\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Confer\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"confluentinc\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/confluentinc\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"connecting-software\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/connecting-software\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"consensys\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/consensys\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"convertigo\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/convertigo\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"corda\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/corda\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cordis\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cordis\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"corent-technology-pvt\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/corent-technology-pvt\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"CoreOS\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/CoreOS\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"couchbase\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/couchbase\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"crate-io\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/crate-io\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"credativ\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/credativ\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cristie-software-clonemanager\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cristie-software-clonemanager\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cryptzone\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cryptzone\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"csstest\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/csstest\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ctm.bmc.com\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ctm.bmc.com\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dalet\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dalet\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"danielsol.AzureTools1\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/danielsol.AzureTools1\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Dans.Windows.App\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Dans.Windows.App\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Dans3.Windows.App\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Dans3.Windows.App\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dataart\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dataart\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"datacastle\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/datacastle\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"datacore\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/datacore\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Datadog.Agent\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Datadog.Agent\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dataexpeditioninc\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dataexpeditioninc\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dataiku\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dataiku\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"datalayer\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/datalayer\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dataliberation\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dataliberation\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"datastax\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/datastax\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"datasunrise\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/datasunrise\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"datometry\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/datometry\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"defacto_global_\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/defacto_global_\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dell-software\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dell-software\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dellemc\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dellemc\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dell_software\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dell_software\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"denyall\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/denyall\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"derdack\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/derdack\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dgsecure\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dgsecure\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"digitaloffice\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/digitaloffice\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"docker\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/docker\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"docscorp-us\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/docscorp-us\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dolbydeveloper\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dolbydeveloper\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dome9\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dome9\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"donovapub\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/donovapub\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"drone\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/drone\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dsi\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dsi\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dundas\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dundas\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dynatrace\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dynatrace\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dynatrace.ruxit\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dynatrace.ruxit\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"eastbanctech\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/eastbanctech\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"easyterritory\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/easyterritory\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"edevtech\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/edevtech\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"egnyte\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/egnyte\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"egress\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/egress\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"eip\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/eip\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"eip-eipower\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/eip-eipower\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"elastacloud\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/elastacloud\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"elasticbox\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/elasticbox\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"elecard\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/elecard\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"element-it\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/element-it\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"elementrem\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/elementrem\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"elfiqnetworks\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/elfiqnetworks\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"eloquera\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/eloquera\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"emercoin\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/emercoin\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"enforongo\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/enforongo\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"enterprise-ethereum-alliance\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/enterprise-ethereum-alliance\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"eperi\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/eperi\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"equalum\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/equalum\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"equilibrium\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/equilibrium\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ESET\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ESET\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"esri\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/esri\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ethcore\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ethcore\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ethereum\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ethereum\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"eurotech\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/eurotech\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"eventtracker\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/eventtracker\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"evostream-inc\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/evostream-inc\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"exasol\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/exasol\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"exit-games\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/exit-games\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"expertime\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/expertime\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"f5-networks\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/f5-networks\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"falconstorsoftware\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/falconstorsoftware\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"fidesys\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/fidesys\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"filebridge\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/filebridge\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"firehost\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/firehost\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"flexerasoftware\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/flexerasoftware\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"flowforma\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/flowforma\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"fluid-mobility\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/fluid-mobility\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"foghorn-systems\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/foghorn-systems\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"folio3-dynamics-services\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/folio3-dynamics-services\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"forscene\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/forscene\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"fortinet\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/fortinet\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"fortycloud\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/fortycloud\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"fptjapan\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/fptjapan\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"fw\",\r\ - \n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/fw\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"g-data-software\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/g-data-software\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"gbs\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/gbs\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"gemalto-safenet\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/gemalto-safenet\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Gemalto.SafeNet.ProtectV\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Gemalto.SafeNet.ProtectV\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"GitHub\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/GitHub\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"gitlab\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/gitlab\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"globalscape\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/globalscape\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"gordic\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/gordic\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"graphitegtc\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/graphitegtc\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"greathorn\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/greathorn\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"greensql\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/greensql\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"gridgain\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/gridgain\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"h2o-ai\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/h2o-ai\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"haivision\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/haivision\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"halobicloud\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/halobicloud\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hanu\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hanu\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"HDInsight\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/HDInsight\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hewlett-packard\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hewlett-packard\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hillstone-networks\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hillstone-networks\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hitachi-solutions\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hitachi-solutions\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hortonworks\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hortonworks\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hpe\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hpe\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"HPE.Security.ApplicationDefender\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/HPE.Security.ApplicationDefender\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"humanlogic\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/humanlogic\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hush-hush\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hush-hush\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hvr\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hvr\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hyperglance\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hyperglance\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hypergrid\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hypergrid\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hytrust\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hytrust\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"iaansys\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/iaansys\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"iamcloud\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/iamcloud\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ibabs-eu\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ibabs-eu\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"idcspa\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/idcspa\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ikan\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ikan\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"imaginecommunications\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/imaginecommunications\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"imc\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/imc\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"imperva\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/imperva\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"incredibuild\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/incredibuild\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"infoblox\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/infoblox\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"infolibrarian\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/infolibrarian\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"informatica\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/informatica\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"informatica-cloud\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/informatica-cloud\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"informationbuilders\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/informationbuilders\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"infostrat\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/infostrat\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"inriver\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/inriver\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"insitesoftware\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/insitesoftware\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"intel\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/intel\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"intelligent-plant-ltd\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/intelligent-plant-ltd\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"intigua\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/intigua\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"iquest\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/iquest\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ishlangu-load-balancer-adc\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ishlangu-load-balancer-adc\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"itelios\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/itelios\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"jedox\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/jedox\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"jelastic\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/jelastic\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"jetnexus\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/jetnexus\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"jfrog\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/jfrog\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"jitterbit_integration\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/jitterbit_integration\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"kaazing\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/kaazing\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"kali-linux\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/kali-linux\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Kasperskylab.ksa\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Kasperskylab.ksa\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"kaspersky_lab\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/kaspersky_lab\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"kelverion\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/kelverion\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"kemptech\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/kemptech\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"kepion\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/kepion\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"knime\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/knime\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"kollective\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/kollective\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"lakesidesoftware\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/lakesidesoftware\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"lansa\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/lansa\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"le\",\r\ - \n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/le\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"learningtechnolgy\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/learningtechnolgy\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"lieberlieber\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/lieberlieber\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"liebsoft\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/liebsoft\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"literatu\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/literatu\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"loadbalancer\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/loadbalancer\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"logi-analytics\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/logi-analytics\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"loginpeople\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/loginpeople\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"logiticks\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/logiticks\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"logmein\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/logmein\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"logsign\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/logsign\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"logtrust\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/logtrust\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"looker\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/looker\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"luxoft\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/luxoft\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mactores_inc\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mactores_inc\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"magelia\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/magelia\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"manageengine\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/manageengine\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mapr-technologies\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mapr-technologies\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mariadb\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mariadb\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"marklogic\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/marklogic\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"massiveanalytic-\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/massiveanalytic-\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mavinglobal\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mavinglobal\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"McAfee.EndpointSecurity\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/McAfee.EndpointSecurity\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"McAfee.EndpointSecurity.test3\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/McAfee.EndpointSecurity.test3\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"meanio\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/meanio\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mediazenie\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mediazenie\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"memsql\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/memsql\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mendix\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mendix\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mentalnotes\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mentalnotes\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mesosphere\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mesosphere\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"metavistech\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/metavistech\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mfiles\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mfiles\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mico\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mico\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"microsoft-ads\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/microsoft-ads\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Applications\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Applications\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Backup.Test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Backup.Test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Compute.Security\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Compute.Security\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Diagnostics\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Diagnostics\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Extensions\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Extensions\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Networking.SDN\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Networking.SDN\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.NetworkWatcher\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.NetworkWatcher\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.RecoveryServices\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.RecoveryServices\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.RecoveryServices.SiteRecovery\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.RecoveryServices.SiteRecovery\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Security\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Security\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Security.Test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Security.Test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.SiteRecovery.Test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.SiteRecovery.Test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Test.Identity\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Test.Identity\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.WindowsFabric.Test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.WindowsFabric.Test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.AzureCAT.AzureEnhancedMonitoring\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.AzureCAT.AzureEnhancedMonitoring\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.AzureCAT.AzureEnhancedMonitoringTest\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.AzureCAT.AzureEnhancedMonitoringTest\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.AzureSecurity.JITAccess\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.AzureSecurity.JITAccess\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.CloudBackup.Workload.Extension\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.CloudBackup.Workload.Extension\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.CloudBackup.Workload.Extension.Edp\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.CloudBackup.Workload.Extension.Edp\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Compute\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.EnterpriseCloud.Monitoring\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.EnterpriseCloud.Monitoring\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.EnterpriseCloud.Monitoring.Test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.EnterpriseCloud.Monitoring.Test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Golive.Extensions\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Golive.Extensions\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.HDInsight.Current\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.HDInsight.Current\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.HpcCompute\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.HpcCompute\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.HpcPack\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.HpcPack\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.ManagedIdentity\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.ManagedIdentity\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.OSTCExtensions\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.OSTCExtensions\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.OSTCExtensions.Edp\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.OSTCExtensions.Edp\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.OSTCExtensions.Test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.OSTCExtensions.Test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Powershell\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Powershell.Test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Powershell.UUID\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.UUID\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.SqlServer.Managability.IaaS.Test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.SqlServer.Managability.IaaS.Test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.SqlServer.Management\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.SqlServer.Management\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.SystemCenter\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.SystemCenter\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.VisualStudio.Azure.ETWTraceListenerService\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.Azure.ETWTraceListenerService\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.VisualStudio.Azure.RemoteDebug\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.Azure.RemoteDebug\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.VisualStudio.Azure.RemoteDebug.Json\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.Azure.RemoteDebug.Json\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.VisualStudio.ServiceProfiler\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.ServiceProfiler\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.VisualStudio.Services\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.Services\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Windows.AzureRemoteApp.Test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Windows.AzureRemoteApp.Test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Windows.RemoteDesktop\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Windows.RemoteDesktop\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.WindowsAzure.Compute\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.WindowsAzure.Compute\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftAzureSiteRecovery\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftAzureSiteRecovery\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftBizTalkServer\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftBizTalkServer\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftDynamicsAX\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftDynamicsAX\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftDynamicsGP\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftDynamicsGP\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftDynamicsNAV\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftDynamicsNAV\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftHybridCloudStorage\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftHybridCloudStorage\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftOSTC\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftOSTC\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftRServer\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftRServer\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftSharePoint\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftSharePoint\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftSQLServer\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftSQLServer\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftVisualStudio\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftVisualStudio\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftWindowsServer\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftWindowsServerEssentials\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServerEssentials\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftWindowsServerHPCPack\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServerHPCPack\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftWindowsServerRemoteDesktop\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServerRemoteDesktop\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"midvision\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/midvision\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"miraclelinux\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/miraclelinux\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"miracl_linux\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/miracl_linux\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mobilab\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mobilab\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mokxa-technologies\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mokxa-technologies\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"moviemasher\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/moviemasher\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"msopentech\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/msopentech\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"msrazuresapservices\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/msrazuresapservices\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mtnfog\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mtnfog\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mvp-systems\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mvp-systems\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mxhero\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mxhero\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"my-com\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/my-com\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"namirial\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/namirial\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"narrativescience\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/narrativescience\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"nasuni\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/nasuni\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ncbi\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ncbi\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ndl\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ndl\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"netapp\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/netapp\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"netatwork\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/netatwork\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"netgate\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/netgate\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"netiq\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/netiq\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"netsil\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/netsil\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"netwrix\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/netwrix\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"neusoft-neteye\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/neusoft-neteye\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"new-signature\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/new-signature\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"nextlimit\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/nextlimit\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"nexus\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/nexus\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"nginxinc\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/nginxinc\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"nicepeopleatwork\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/nicepeopleatwork\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"nodejsapi\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/nodejsapi\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"nodesource\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/nodesource\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"noobaa\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/noobaa\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"norsync\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/norsync\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"nuxeo\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/nuxeo\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"OctopusDeploy.Tentacle\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/OctopusDeploy.Tentacle\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"officeclipsuite\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/officeclipsuite\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"omega-software\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/omega-software\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ooyala\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ooyala\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"op5\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/op5\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"opencell\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/opencell\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"OpenLogic\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/OpenLogic\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"openmeap\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/openmeap\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"opennebulasystems\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/opennebulasystems\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"opentext\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/opentext\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"opslogix\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/opslogix\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Oracle\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Oracle\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"orckestra\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/orckestra\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"orfast-technologies\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/orfast-technologies\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"orientdb\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/orientdb\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"origam\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/origam\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"osisoft\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/osisoft\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"outsystems\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/outsystems\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"paloaltonetworks\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/paloaltonetworks\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"panorama-necto\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/panorama-necto\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"panzura-file-system\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/panzura-file-system\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"parallels\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/parallels\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"parasoft\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/parasoft\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"passlogy\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/passlogy\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"pe-gromenko\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/pe-gromenko\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"pivotal\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/pivotal\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"plesk\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/plesk\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"pointmatter\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/pointmatter\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"portalarchitects\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/portalarchitects\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"predictionio\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/predictionio\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"predixion\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/predixion\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"prestashop\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/prestashop\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"prime-strategy\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/prime-strategy\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"primesoft\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/primesoft\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"primestream\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/primestream\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"proarch\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/proarch\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"process-one\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/process-one\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"profisee\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/profisee\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"progelspa\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/progelspa\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ptsecurity\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ptsecurity\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ptv_group\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ptv_group\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"puppet\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/puppet\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"PuppetLabs\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/PuppetLabs\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"PuppetLabs.Test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/PuppetLabs.Test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"pxlag_swiss\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/pxlag_swiss\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"pydio\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/pydio\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"pyramidanalytics\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/pyramidanalytics\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"qlik\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/qlik\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"quales\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/quales\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Qualys\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Qualys\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"qualysguard\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/qualysguard\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"quasardb\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/quasardb\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"qubole\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/qubole\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"qubole-inc\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/qubole-inc\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"radware\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/radware\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"rancher\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/rancher\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"rapid7\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/rapid7\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"realm\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/realm\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"RedHat\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/RedHat\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"redpoint-global\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/redpoint-global\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"relevance-lab\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/relevance-lab\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"remotelearner\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/remotelearner\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"res\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/res\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"revolution-analytics\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/revolution-analytics\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"RightScaleLinux\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/RightScaleLinux\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"RightScaleWindowsServer\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/RightScaleWindowsServer\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"riverbed\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/riverbed\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"RiverbedTechnology\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/RiverbedTechnology\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"rocketsoftware\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/rocketsoftware\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"rocket_software\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/rocket_software\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"saama\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/saama\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"saltstack\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/saltstack\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"samsung-sds\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/samsung-sds\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"samsungsds-cello\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/samsungsds-cello\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sap\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sap\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sapho\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sapho\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"scalearc\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/scalearc\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"scalebase\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/scalebase\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"scalegrid\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/scalegrid\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"scsk\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/scsk\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"seagate\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/seagate\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"searchblox\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/searchblox\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sensorberg\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sensorberg\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sentryone\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sentryone\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"servoy\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/servoy\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sestek\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sestek\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"shadow-soft\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/shadow-soft\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sharefile\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sharefile\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"shareshiftneeraj.test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/shareshiftneeraj.test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"shavlik\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/shavlik\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sightapps\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sightapps\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"silver-peak-systems\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/silver-peak-systems\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"simmachinesinc\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/simmachinesinc\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sinefa\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sinefa\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sios_datakeeper\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sios_datakeeper\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sisense\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sisense\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Site24x7\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Site24x7\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"slamby\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/slamby\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"snaplogic\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/snaplogic\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"snip2code\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/snip2code\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"soasta\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/soasta\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"softnas\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/softnas\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"soha\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/soha\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"solanolabs\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/solanolabs\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"solarwinds\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/solarwinds\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sophos\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sophos\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"spacecurve\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/spacecurve\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"spagobi\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/spagobi\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sphere3d\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sphere3d\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"splunk\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/splunk\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"stackato-platform-as-a-service\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/stackato-platform-as-a-service\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"stackstorm\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/stackstorm\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"starwind\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/starwind\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"StatusReport.Diagnostics.Test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/StatusReport.Diagnostics.Test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"stealthbits\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/stealthbits\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"steelhive\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/steelhive\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"stonefly\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/stonefly\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"stormshield\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/stormshield\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"storreduce\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/storreduce\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"stratalux\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/stratalux\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"stratus-id\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/stratus-id\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"streamsets\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/streamsets\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"striim\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/striim\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sumologic\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sumologic\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sunview-software\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sunview-software\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"SUSE\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/SUSE\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"suse-byos\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/suse-byos\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Symantec\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Symantec.QA\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec.QA\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Symantec.staging\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec.staging\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Symantec.test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec.test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"symantectest1\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/symantectest1\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"SymantecTest9\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/SymantecTest9\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"SymantecTestLsTestLogonImport\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/SymantecTestLsTestLogonImport\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"SymantecTestLsTestSerdefDat\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/SymantecTestLsTestSerdefDat\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"SymantecTestRU4\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/SymantecTestRU4\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"syncfusion\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/syncfusion\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"syncfusionbigdataplatfor\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/syncfusionbigdataplatfor\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"syncfusiondashboard\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/syncfusiondashboard\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tableau\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tableau\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tactic\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tactic\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"talon\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/talon\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"targit\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/targit\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tavendo\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tavendo\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"techdivision\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/techdivision\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"telepat\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/telepat\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tenable\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tenable\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tentity\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tentity\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"teradata\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/teradata\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Teradici\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Teradici\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Test.Gemalto.SafeNet.ProtectV\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.Gemalto.SafeNet.ProtectV\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Test.HP.AppDefender\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.HP.AppDefender\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Test.Microsoft.VisualStudio.Services\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.Microsoft.VisualStudio.Services\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Test.NJHP.AppDefender\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.NJHP.AppDefender\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Test.TrendMicro.DeepSecurity\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.TrendMicro.DeepSecurity\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Test1.NJHP.AppDefender\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Test1.NJHP.AppDefender\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Test3.Microsoft.VisualStudio.Services\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Test3.Microsoft.VisualStudio.Services\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"thales-vormetric\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/thales-vormetric\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"thinkboxsoftware\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/thinkboxsoftware\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tibco-software\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tibco-software\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tig\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tig\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tokyosystemhouse\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tokyosystemhouse\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"topdesk\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/topdesk\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"torusware\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/torusware\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"townsend-security\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/townsend-security\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"transvault\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/transvault\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"trendmicro\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/trendmicro\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"TrendMicro.DeepSecurity\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/TrendMicro.DeepSecurity\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"TrendMicro.PortalProtect\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/TrendMicro.PortalProtect\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tsa-public-service\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tsa-public-service\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"twistlock\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/twistlock\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"typesafe\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/typesafe\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ubeeko\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ubeeko\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ubercloud\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ubercloud\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ulex\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ulex\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"unidesk\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/unidesk\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"unidesk-corp\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/unidesk-corp\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"uniprint-net\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/uniprint-net\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"unisys-azuremp-stealth\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/unisys-azuremp-stealth\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"unitrends\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/unitrends\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"usp\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/usp\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"varnish\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/varnish\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vbot\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vbot\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vecompsoftware\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vecompsoftware\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"veeam\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/veeam\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"velostrata\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/velostrata\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"velostrata-inc\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/velostrata-inc\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ventify\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ventify\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"veritas\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/veritas\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vertabelo\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vertabelo\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vidispine\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vidispine\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vidizmo\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vidizmo\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vintegris\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vintegris\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"viptela\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/viptela\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vircom\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vircom\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"virtualworks\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/virtualworks\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"visionware\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/visionware\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vision_solutions\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vision_solutions\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vizixiotplatformretail001\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vizixiotplatformretail001\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vmturbo\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vmturbo\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Vormetric\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Vormetric\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vte\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vte\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"WAD2AI.Diagnostics.Test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/WAD2AI.Diagnostics.Test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"WAD2EventHub.Diagnostics.Test\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/WAD2EventHub.Diagnostics.Test\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"wallix\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/wallix\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"waratek\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/waratek\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"wardy-it-solutions\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/wardy-it-solutions\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"warewolf-esb\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/warewolf-esb\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"watchfulsoftware\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/watchfulsoftware\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"waves\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/waves\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"websense-apmailpe\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/websense-apmailpe\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"wipro-ltd\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/wipro-ltd\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"wmspanel\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/wmspanel\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"workshare-technology\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/workshare-technology\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"wowza\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/wowza\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"xebialabs\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/xebialabs\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"xfinityinc\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/xfinityinc\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"xmpro\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/xmpro\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"xrm\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/xrm\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"xtremedata\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/xtremedata\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"yellowfin\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/yellowfin\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"your-shop-online\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/your-shop-online\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"zealcorp\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/zealcorp\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"zementis\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/zementis\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"zend\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/zend\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"zerodown_software\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/zerodown_software\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"zerto\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/zerto\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"zoomdata\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/zoomdata\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"zscaler\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/zscaler\"\ - \r\n }\r\n]"} + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:54:40 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:54:58 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:55:15 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:55:33 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:55:50 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:56:07 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:56:25 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:56:42 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:57:00 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:57:17 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:57:35 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:57:52 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:58:10 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:58:27 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:58:44 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:59:02 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:59:20 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:59:37 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 17:59:54 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:00:13 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:00:30 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:00:48 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:01:05 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:01:23 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:01:39 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:01:58 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} headers: Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:02:15 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:25:59 GMT'] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:02:33 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['134255'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -2342,30 +1619,52 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [1797fa42-245c-11e7-ac2e-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Azure.NetworkWatcher/artifacttypes/vmextension/types?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"\ - NetworkWatcherAgentLinux\",\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.NetworkWatcher/ArtifactTypes/VMExtension/Types/NetworkWatcherAgentLinux\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"NetworkWatcherAgentWindows\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.NetworkWatcher/ArtifactTypes/VMExtension/Types/NetworkWatcherAgentWindows\"\ - \r\n }\r\n]"} + body: {string: ''} headers: Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:02:50 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:26:00 GMT'] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:03:07 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['583'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -2374,66 +1673,214 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [17c9485e-245c-11e7-8822-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Azure.NetworkWatcher/artifacttypes/vmextension/types/NetworkWatcherAgentLinux/versions?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"\ - 1.4.13.0\",\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.NetworkWatcher/ArtifactTypes/VMExtension/Types/NetworkWatcherAgentLinux/Versions/1.4.13.0\"\ - \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"1.4.20.0\"\ - ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.NetworkWatcher/ArtifactTypes/VMExtension/Types/NetworkWatcherAgentLinux/Versions/1.4.20.0\"\ - \r\n }\r\n]"} + body: {string: ''} headers: Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:03:25 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:26:01 GMT'] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:03:43 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['583'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:04:00 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} - request: - body: '{"properties": {"typeHandlerVersion": "1.4", "type": "NetworkWatcherAgentLinux", - "autoUpgradeMinorVersion": true, "publisher": "Microsoft.Azure.NetworkWatcher"}, - "location": "westus"}' + body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['183'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [17f62b6c-245c-11e7-813f-a0b3ccf7272a] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux?api-version=2016-04-30-preview + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: "{\r\n \"properties\": {\r\n \"publisher\": \"Microsoft.Azure.NetworkWatcher\"\ - ,\r\n \"type\": \"NetworkWatcherAgentLinux\",\r\n \"typeHandlerVersion\"\ - : \"1.4\",\r\n \"autoUpgradeMinorVersion\": true,\r\n \"provisioningState\"\ - : \"Creating\"\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\"\ - ,\r\n \"location\": \"westus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux\"\ - ,\r\n \"name\": \"NetworkWatcherAgentLinux\"\r\n}"} + body: {string: ''} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/westus/operations/29fb1799-efc4-4913-beec-872453d9f6fb?api-version=2016-04-30-preview'] Cache-Control: [no-cache] - Content-Length: ['547'] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:04:18 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:26:02 GMT'] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:04:35 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - status: {code: 201, message: Created} + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:04:52 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:05:10 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:05:27 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] + Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} - request: body: null headers: @@ -2442,28 +1889,25 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [17f62b6c-245c-11e7-813f-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/29fb1799-efc4-4913-beec-872453d9f6fb?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: "{\r\n \"startTime\": \"2017-04-18T17:26:01.8600818+00:00\",\r\ - \n \"status\": \"InProgress\",\r\n \"name\": \"29fb1799-efc4-4913-beec-872453d9f6fb\"\ - \r\n}"} + body: {string: ''} headers: Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:26:31 GMT'] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:05:45 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['134'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -2472,28 +1916,25 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [17f62b6c-245c-11e7-813f-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/29fb1799-efc4-4913-beec-872453d9f6fb?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: "{\r\n \"startTime\": \"2017-04-18T17:26:01.8600818+00:00\",\r\ - \n \"endTime\": \"2017-04-18T17:26:53.659669+00:00\",\r\n \"status\": \"\ - Succeeded\",\r\n \"name\": \"29fb1799-efc4-4913-beec-872453d9f6fb\"\r\n}"} + body: {string: ''} headers: Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:27:02 GMT'] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:06:02 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['183'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -2502,31 +1943,25 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [17f62b6c-245c-11e7-813f-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: "{\r\n \"properties\": {\r\n \"publisher\": \"Microsoft.Azure.NetworkWatcher\"\ - ,\r\n \"type\": \"NetworkWatcherAgentLinux\",\r\n \"typeHandlerVersion\"\ - : \"1.4\",\r\n \"autoUpgradeMinorVersion\": true,\r\n \"provisioningState\"\ - : \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\"\ - ,\r\n \"location\": \"westus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux\"\ - ,\r\n \"name\": \"NetworkWatcherAgentLinux\"\r\n}"} + body: {string: ''} headers: Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:27:03 GMT'] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:06:20 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['548'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -2535,98 +1970,52 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [3cf6241c-245c-11e7-8f20-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"c0dd6b55-d81f-4708-a1cc-25fbf5c327a8\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: ''} headers: Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:27:03 GMT'] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:06:37 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [93f5dd30-6844-4dc5-8c0b-a35f1861501a, f0ee2b52-588a-4f79-848e-f2b0770bd748] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: - body: '{"targetResourceGroupName": "cli_test_network_watcher"}' + body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['61'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [3d2a08a6-245c-11e7-b3d2-a0b3ccf7272a] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/topology?api-version=2017-03-01 + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: "{\r\n \"id\": \"83ec6e57-0e58-48b4-9296-01f529de9902\",\r\n \ - \ \"createdDateTime\": \"2017-04-18T17:27:03.0202668Z\",\r\n \"lastModified\"\ - : \"2017-04-18T17:26:42.6238543Z\",\r\n \"resources\": [\r\n {\r\n \ - \ \"name\": \"vm1VNET\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET\"\ - ,\r\n \"location\": \"westus\",\r\n \"associations\": [\r\n \ - \ {\r\n \"name\": \"vm1Subnet\",\r\n \"resourceId\":\ - \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\ - ,\r\n \"associationType\": \"Contains\"\r\n }\r\n ]\r\ - \n },\r\n {\r\n \"name\": \"vm1Subnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\ - ,\r\n \"location\": \"westus\",\r\n \"associations\": []\r\n \ - \ },\r\n {\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ - ,\r\n \"location\": \"westus\",\r\n \"associations\": [\r\n \ - \ {\r\n \"name\": \"vm1VMNic\",\r\n \"resourceId\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - ,\r\n \"associationType\": \"Contains\"\r\n }\r\n ]\r\ - \n },\r\n {\r\n \"name\": \"vm1VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - ,\r\n \"location\": \"westus\",\r\n \"associations\": [\r\n \ - \ {\r\n \"name\": \"vm1\",\r\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ - ,\r\n \"associationType\": \"Associated\"\r\n },\r\n \ - \ {\r\n \"name\": \"vm1NSG\",\r\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ - ,\r\n \"associationType\": \"Associated\"\r\n },\r\n \ - \ {\r\n \"name\": \"vm1Subnet\",\r\n \"resourceId\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\ - ,\r\n \"associationType\": \"Associated\"\r\n },\r\n \ - \ {\r\n \"name\": \"vm1PublicIP\",\r\n \"resourceId\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\ - ,\r\n \"associationType\": \"Associated\"\r\n }\r\n ]\r\ - \n },\r\n {\r\n \"name\": \"vm1NSG\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ - ,\r\n \"location\": \"westus\",\r\n \"associations\": [\r\n \ - \ {\r\n \"name\": \"default-allow-ssh\",\r\n \"resourceId\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/default-allow-ssh\"\ - ,\r\n \"associationType\": \"Contains\"\r\n }\r\n ]\r\ - \n },\r\n {\r\n \"name\": \"default-allow-ssh\",\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/default-allow-ssh\"\ - ,\r\n \"location\": \"westus\",\r\n \"associations\": []\r\n \ - \ },\r\n {\r\n \"name\": \"vm1PublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\ - ,\r\n \"location\": \"westus\",\r\n \"associations\": [\r\n \ - \ {\r\n \"name\": \"vm1VMNic\",\r\n \"resourceId\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - ,\r\n \"associationType\": \"Associated\"\r\n }\r\n ]\r\ - \n }\r\n ]\r\n}"} + body: {string: ''} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/4185251f-8a8f-4d78-929a-fb51411511bd?api-version=2017-03-01'] Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:27:03 GMT'] + Content-Length: ['0'] + Date: ['Wed, 17 May 2017 18:06:55 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/4185251f-8a8f-4d78-929a-fb51411511bd?api-version=2017-03-01'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01'] Pragma: [no-cache] - Retry-After: ['10'] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Retry-After: ['17'] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['4413'] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - status: {code: 200, message: OK} + status: {code: 202, message: Accepted} - request: body: null headers: @@ -2635,54 +2024,27 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 storagemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [3d5de122-245c-11e7-a5ce-a0b3ccf7272a] + x-ms-client-request-id: [31d89c1e-3b29-11e7-8c57-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/ded84fd2-c38a-4122-848e-8ddb2c8798ca?monitor=true&api-version=2016-12-01 response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"2391ed7e-4579-4e07-bde3-ab3889095130\"\ - ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ - \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ - \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ - ,\r\n \"sku\": \"16.04-LTS\",\r\n \"version\": \"latest\"\r\n\ - \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_EF1e9VAb72\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ - \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/disks/osdisk_EF1e9VAb72\"\ - \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ - : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ - ,\r\n \"adminUsername\": \"trpresco\",\r\n \"linuxConfiguration\"\ - : {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\"\ - : {\r\n \"publicKeys\": [\r\n {\r\n \"path\"\ - : \"/home/trpresco/.ssh/authorized_keys\",\r\n \"keyData\": \"\ - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLkUy/BFb7o47gQqFcMiioYD4w3Tu/7bpy7t/3pQVhjmsEEaWk09dA1Ju1UbukKaLpOprch/r9bgUWu1oTEP7E5evwaJl0TvLX0gsxGGItfPc58bbQ77uxuXhMfYEZ6oiS+Ybt5nUjjDUUNhSIrKSLhCHCmQ9JnOd/AObf9G4iR38bsABIAVxmbYT6OQKm4oRwNs1c99B5TsfnREFs7yawCV3hjKVHsD3bRo83bBbBG3d/CHYfcnEbpK4weagw899YodAXDiUh0qYfOy0mGz4zWaQ4rcCitk9od/WSDhLAOy74cqwzKJwoR9DcALxkWVMuJW7xBF9tWEroVvFrh6/N\"\ - \r\n }\r\n ]\r\n }\r\n },\r\n \"secrets\"\ - : []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - }]},\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"resources\"\ - : [\r\n {\r\n \"properties\": {\r\n \"publisher\": \"Microsoft.Azure.NetworkWatcher\"\ - ,\r\n \"type\": \"NetworkWatcherAgentLinux\",\r\n \"typeHandlerVersion\"\ - : \"1.4\",\r\n \"autoUpgradeMinorVersion\": true,\r\n \"provisioningState\"\ - : \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\"\ - ,\r\n \"location\": \"westus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux\"\ - ,\r\n \"name\": \"NetworkWatcherAgentLinux\"\r\n }\r\n ],\r\n \"\ - type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ - ,\r\n \"name\": \"vm1\"\r\n}"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Storage/storageAccounts/clitestnwstorage1","kind":"Storage","location":"westus","name":"clitestnwstorage1","properties":{"creationTime":"2017-05-17T17:49:44.5029253Z","primaryEndpoints":{"blob":"https://clitestnwstorage1.blob.core.windows.net/","file":"https://clitestnwstorage1.file.core.windows.net/","queue":"https://clitestnwstorage1.queue.core.windows.net/","table":"https://clitestnwstorage1.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available","supportsHttpsTrafficOnly":false},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + + '} headers: Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:27:04 GMT'] + Content-Type: [application/json] + Date: ['Wed, 17 May 2017 18:07:12 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['2729'] + content-length: ['774'] status: {code: 200, message: OK} - request: body: null @@ -2692,89 +2054,176 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [3d7a54b6-245c-11e7-ac45-a0b3ccf7272a] + x-ms-client-request-id: [a5483762-3b2b-11e7-be5a-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_network_watcher?api-version=2017-05-10 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"c0dd6b55-d81f-4708-a1cc-25fbf5c327a8\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher","name":"cli_test_network_watcher","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:27:04 GMT'] + Date: ['Wed, 17 May 2017 18:07:13 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [f1c7f5cb-fa8e-42d9-b722-567724eec884, c5610522-b364-4171-a82d-56e3ae3125c9] + content-length: ['238'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [close] + Host: [raw.githubusercontent.com] + User-Agent: [Python-urllib/3.5] + method: GET + uri: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json + response: + body: {string: "{\n \"$schema\":\"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\"\ + ,\n \"contentVersion\":\"1.0.0.0\",\n \"parameters\":{},\n \"variables\"\ + :{},\n \"resources\":[],\n\n \"outputs\":{\n \"aliases\":{\n \"\ + type\":\"object\",\n \"value\":{\n\n \"Linux\":{\n \"\ + CentOS\":{\n \"publisher\":\"OpenLogic\",\n \"offer\"\ + :\"CentOS\",\n \"sku\":\"7.3\",\n \"version\":\"latest\"\ + \n },\n \"CoreOS\":{\n \"publisher\":\"CoreOS\"\ + ,\n \"offer\":\"CoreOS\",\n \"sku\":\"Stable\",\n \ + \ \"version\":\"latest\"\n },\n \"Debian\":{\n\ + \ \"publisher\":\"credativ\",\n \"offer\":\"Debian\"\ + ,\n \"sku\":\"8\",\n \"version\":\"latest\"\n \ + \ },\n \"openSUSE-Leap\": {\n \"publisher\":\"SUSE\"\ + ,\n \"offer\":\"openSUSE-Leap\",\n \"sku\":\"42.2\"\ + ,\n \"version\": \"latest\"\n },\n \"RHEL\":{\n\ + \ \"publisher\":\"RedHat\",\n \"offer\":\"RHEL\",\n\ + \ \"sku\":\"7.3\",\n \"version\":\"latest\"\n \ + \ },\n \"SLES\":{\n \"publisher\":\"SUSE\",\n \ + \ \"offer\":\"SLES\",\n \"sku\":\"12-SP2\",\n \ + \ \"version\":\"latest\"\n },\n \"UbuntuLTS\":{\n \ + \ \"publisher\":\"Canonical\",\n \"offer\":\"UbuntuServer\"\ + ,\n \"sku\":\"16.04-LTS\",\n \"version\":\"latest\"\n\ + \ }\n },\n\n \"Windows\":{\n \"Win2016Datacenter\"\ + :{\n \"publisher\":\"MicrosoftWindowsServer\",\n \"\ + offer\":\"WindowsServer\",\n \"sku\":\"2016-Datacenter\",\n \ + \ \"version\":\"latest\"\n },\n \"Win2012R2Datacenter\"\ + :{\n \"publisher\":\"MicrosoftWindowsServer\",\n \"\ + offer\":\"WindowsServer\",\n \"sku\":\"2012-R2-Datacenter\",\n\ + \ \"version\":\"latest\"\n },\n \"Win2012Datacenter\"\ + :{\n \"publisher\":\"MicrosoftWindowsServer\",\n \"\ + offer\":\"WindowsServer\",\n \"sku\":\"2012-Datacenter\",\n \ + \ \"version\":\"latest\"\n },\n \"Win2008R2SP1\"\ + :{\n \"publisher\":\"MicrosoftWindowsServer\",\n \"\ + offer\":\"WindowsServer\",\n \"sku\":\"2008-R2-SP1\",\n \ + \ \"version\":\"latest\"\n }\n }\n }\n }\n }\n\ + }\n"} + headers: + Accept-Ranges: [bytes] + Access-Control-Allow-Origin: ['*'] + Cache-Control: [max-age=300] + Connection: [close] + Content-Length: ['2235'] + Content-Security-Policy: [default-src 'none'; style-src 'unsafe-inline'] + Content-Type: [text/plain; charset=utf-8] + Date: ['Wed, 17 May 2017 18:07:14 GMT'] + ETag: ['"d6824855d13e27c5258a680eb60f635d088fd05e"'] + Expires: ['Wed, 17 May 2017 18:12:14 GMT'] + Source-Age: ['142'] + Strict-Transport-Security: [max-age=31536000] + Vary: ['Authorization,Accept-Encoding'] + Via: [1.1 varnish] + X-Cache: [HIT] + X-Cache-Hits: ['1'] + X-Content-Type-Options: [nosniff] + X-Fastly-Request-ID: [6125d3887259a1ebbf8873042e28ed9967c4eb92] + X-Frame-Options: [deny] + X-Geo-Block-List: [''] + X-GitHub-Request-Id: ['F7B8:AE41:AC84F:B235E:591C90C4'] + X-Served-By: [cache-dfw1824-DFW] + X-Timer: ['S1495044435.596302,VS0,VE1'] + X-XSS-Protection: [1; mode=block] status: {code: 200, message: OK} - request: - body: '{"targetResourceId": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1", - "localIPAddress": "10.0.0.4", "remoteIPAddress": "100.1.2.3", "localPort": "22", - "protocol": "TCP", "remotePort": "*", "direction": "Inbound"}' + body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['312'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [3dcc1f58-245c-11e7-85b7-a0b3ccf7272a] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/ipFlowVerify?api-version=2017-03-01 + x-ms-client-request-id: [a58ce554-3b2b-11e7-bd26-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks?api-version=2017-03-01 response: - body: {string: "{\r\n \"access\": \"Allow\",\r\n \"ruleName\": \"securityRules/default-allow-ssh\"\ - \r\n}"} + body: {string: '{"value":[]}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:27:14 GMT'] + Date: ['Wed, 17 May 2017 18:07:14 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/a9b4051a-c9e9-4e50-8a58-2d713b0bc883?api-version=2017-03-01'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['75'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + content-length: ['12'] status: {code: 200, message: OK} - request: - body: null + body: '{"properties": {"mode": "Incremental", "parameters": {}, "template": {"parameters": + {}, "contentVersion": "1.0.0.0", "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "outputs": {}, "resources": [{"location": "westus", "tags": {}, "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2015-06-15", "dependsOn": [], "properties": {"addressSpace": + {"addressPrefixes": ["10.0.0.0/16"]}, "subnets": [{"name": "vm1Subnet", "properties": + {"addressPrefix": "10.0.0.0/24"}}]}, "name": "vm1VNET"}, {"location": "westus", + "tags": {}, "type": "Microsoft.Network/networkSecurityGroups", "apiVersion": + "2015-06-15", "dependsOn": [], "properties": {"securityRules": [{"name": "default-allow-ssh", + "properties": {"destinationAddressPrefix": "*", "protocol": "Tcp", "sourcePortRange": + "*", "access": "Allow", "sourceAddressPrefix": "*", "destinationPortRange": + "22", "direction": "Inbound", "priority": 1000}}]}, "name": "vm1NSG"}, {"location": + "westus", "tags": {}, "type": "Microsoft.Network/publicIPAddresses", "apiVersion": + "2015-06-15", "dependsOn": [], "properties": {"publicIPAllocationMethod": "dynamic"}, + "name": "vm1PublicIP"}, {"location": "westus", "tags": {}, "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2015-06-15", "dependsOn": ["Microsoft.Network/virtualNetworks/vm1VNET", + "Microsoft.Network/networkSecurityGroups/vm1NSG", "Microsoft.Network/publicIpAddresses/vm1PublicIP"], + "properties": {"ipConfigurations": [{"name": "ipconfigvm1", "properties": {"publicIPAddress": + {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"}, + "privateIPAllocationMethod": "Dynamic", "subnet": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet"}}}], + "networkSecurityGroup": {"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"}}, + "name": "vm1VMNic"}, {"location": "westus", "tags": {}, "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2016-04-30-preview", "dependsOn": ["Microsoft.Network/networkInterfaces/vm1VMNic"], + "properties": {"hardwareProfile": {"vmSize": "Standard_DS1_v2"}, "storageProfile": + {"imageReference": {"version": "latest", "publisher": "Canonical", "sku": "16.04-LTS", + "offer": "UbuntuServer"}, "osDisk": {"caching": null, "managedDisk": {"storageAccountType": + "Premium_LRS"}, "name": "osdisk_zsw3gJW0hI", "createOption": "fromImage"}}, + "networkProfile": {"networkInterfaces": [{"id": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic"}]}, + "osProfile": {"adminUsername": "deploy", "adminPassword": "PassPass10!)", "computerName": + "vm1"}}, "name": "vm1"}], "variables": {}}}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] + Content-Length: ['3006'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [3dcc1f58-245c-11e7-85b7-a0b3ccf7272a] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/a9b4051a-c9e9-4e50-8a58-2d713b0bc883?api-version=2017-03-01 + x-ms-client-request-id: [a5a7f708-3b2b-11e7-b0cd-a0b3ccf7272a] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 response: - body: {string: "{\r\n \"access\": \"Allow\",\r\n \"ruleName\": \"securityRules/default-allow-ssh\"\ - \r\n}"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/vm_deploy_R3hPRxFGmMw1a32VhvS7RbuYNzLPsSJp","name":"vm_deploy_R3hPRxFGmMw1a32VhvS7RbuYNzLPsSJp","properties":{"templateHash":"11234453629923614285","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-05-17T18:07:16.1427112Z","duration":"PT0.6742895S","correlationId":"3cc46313-d654-44e6-b709-e16c670d63de","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}]}}'} headers: + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/vm_deploy_R3hPRxFGmMw1a32VhvS7RbuYNzLPsSJp/operationStatuses/08587065624500092092?api-version=2017-05-10'] Cache-Control: [no-cache] + Content-Length: ['2387'] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:27:44 GMT'] + Date: ['Wed, 17 May 2017 18:07:16 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/a9b4051a-c9e9-4e50-8a58-2d713b0bc883?api-version=2017-03-01'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['75'] - status: {code: 200, message: OK} + x-ms-ratelimit-remaining-subscription-writes: ['1196'] + status: {code: 201, message: Created} - request: body: null headers: @@ -2783,54 +2232,23 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [56456a00-245c-11e7-96f8-a0b3ccf7272a] + x-ms-client-request-id: [a5a7f708-3b2b-11e7-b0cd-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587065624500092092?api-version=2017-05-10 response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"2391ed7e-4579-4e07-bde3-ab3889095130\"\ - ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ - \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ - \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ - ,\r\n \"sku\": \"16.04-LTS\",\r\n \"version\": \"latest\"\r\n\ - \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_EF1e9VAb72\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ - \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/disks/osdisk_EF1e9VAb72\"\ - \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ - : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ - ,\r\n \"adminUsername\": \"trpresco\",\r\n \"linuxConfiguration\"\ - : {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\"\ - : {\r\n \"publicKeys\": [\r\n {\r\n \"path\"\ - : \"/home/trpresco/.ssh/authorized_keys\",\r\n \"keyData\": \"\ - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLkUy/BFb7o47gQqFcMiioYD4w3Tu/7bpy7t/3pQVhjmsEEaWk09dA1Ju1UbukKaLpOprch/r9bgUWu1oTEP7E5evwaJl0TvLX0gsxGGItfPc58bbQ77uxuXhMfYEZ6oiS+Ybt5nUjjDUUNhSIrKSLhCHCmQ9JnOd/AObf9G4iR38bsABIAVxmbYT6OQKm4oRwNs1c99B5TsfnREFs7yawCV3hjKVHsD3bRo83bBbBG3d/CHYfcnEbpK4weagw899YodAXDiUh0qYfOy0mGz4zWaQ4rcCitk9od/WSDhLAOy74cqwzKJwoR9DcALxkWVMuJW7xBF9tWEroVvFrh6/N\"\ - \r\n }\r\n ]\r\n }\r\n },\r\n \"secrets\"\ - : []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - }]},\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"resources\"\ - : [\r\n {\r\n \"properties\": {\r\n \"publisher\": \"Microsoft.Azure.NetworkWatcher\"\ - ,\r\n \"type\": \"NetworkWatcherAgentLinux\",\r\n \"typeHandlerVersion\"\ - : \"1.4\",\r\n \"autoUpgradeMinorVersion\": true,\r\n \"provisioningState\"\ - : \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\"\ - ,\r\n \"location\": \"westus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux\"\ - ,\r\n \"name\": \"NetworkWatcherAgentLinux\"\r\n }\r\n ],\r\n \"\ - type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ - ,\r\n \"name\": \"vm1\"\r\n}"} + body: {string: '{"status":"Running"}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:27:46 GMT'] + Date: ['Wed, 17 May 2017 18:07:46 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['2729'] + content-length: ['20'] status: {code: 200, message: OK} - request: body: null @@ -2840,58 +2258,49 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [57018822-245c-11e7-a385-a0b3ccf7272a] + x-ms-client-request-id: [a5a7f708-3b2b-11e7-b0cd-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587065624500092092?api-version=2017-05-10 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"8d0d9a1b-e99e-4fe6-aac5-b186e23f4e02\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: '{"status":"Running"}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:27:47 GMT'] + Date: ['Wed, 17 May 2017 18:08:16 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [0c2a3df8-d9ad-4481-9bd9-0800bf4dc713, 0ebe7bac-9c4a-4d34-a29c-456d59624a53] + content-length: ['20'] status: {code: 200, message: OK} - request: - body: '{"targetResourceId": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1", - "localIPAddress": "10.0.0.4", "remoteIPAddress": "100.1.2.3", "localPort": "*", - "protocol": "TCP", "remotePort": "80", "direction": "Outbound"}' + body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['313'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [574378e8-245c-11e7-96bd-a0b3ccf7272a] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/ipFlowVerify?api-version=2017-03-01 + x-ms-client-request-id: [a5a7f708-3b2b-11e7-b0cd-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587065624500092092?api-version=2017-05-10 response: - body: {string: "{\r\n \"access\": \"Allow\",\r\n \"ruleName\": \"defaultSecurityRules/AllowInternetOutBound\"\ - \r\n}"} + body: {string: '{"status":"Running"}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:27:57 GMT'] + Date: ['Wed, 17 May 2017 18:08:46 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/ee09ebde-cd49-4c7a-8567-99207578aafd?api-version=2017-03-01'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['86'] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + content-length: ['20'] status: {code: 200, message: OK} - request: body: null @@ -2901,27 +2310,23 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [574378e8-245c-11e7-96bd-a0b3ccf7272a] + x-ms-client-request-id: [a5a7f708-3b2b-11e7-b0cd-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/ee09ebde-cd49-4c7a-8567-99207578aafd?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587065624500092092?api-version=2017-05-10 response: - body: {string: "{\r\n \"access\": \"Allow\",\r\n \"ruleName\": \"defaultSecurityRules/AllowInternetOutBound\"\ - \r\n}"} + body: {string: '{"status":"Succeeded"}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:28:27 GMT'] + Date: ['Wed, 17 May 2017 18:09:17 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/ee09ebde-cd49-4c7a-8567-99207578aafd?api-version=2017-03-01'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['86'] + content-length: ['22'] status: {code: 200, message: OK} - request: body: null @@ -2931,54 +2336,23 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [6fbd93f4-245c-11e7-9b0d-a0b3ccf7272a] + x-ms-client-request-id: [a5a7f708-3b2b-11e7-b0cd-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"2391ed7e-4579-4e07-bde3-ab3889095130\"\ - ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ - \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ - \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ - ,\r\n \"sku\": \"16.04-LTS\",\r\n \"version\": \"latest\"\r\n\ - \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_EF1e9VAb72\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ - \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/disks/osdisk_EF1e9VAb72\"\ - \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ - : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ - ,\r\n \"adminUsername\": \"trpresco\",\r\n \"linuxConfiguration\"\ - : {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\"\ - : {\r\n \"publicKeys\": [\r\n {\r\n \"path\"\ - : \"/home/trpresco/.ssh/authorized_keys\",\r\n \"keyData\": \"\ - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLkUy/BFb7o47gQqFcMiioYD4w3Tu/7bpy7t/3pQVhjmsEEaWk09dA1Ju1UbukKaLpOprch/r9bgUWu1oTEP7E5evwaJl0TvLX0gsxGGItfPc58bbQ77uxuXhMfYEZ6oiS+Ybt5nUjjDUUNhSIrKSLhCHCmQ9JnOd/AObf9G4iR38bsABIAVxmbYT6OQKm4oRwNs1c99B5TsfnREFs7yawCV3hjKVHsD3bRo83bBbBG3d/CHYfcnEbpK4weagw899YodAXDiUh0qYfOy0mGz4zWaQ4rcCitk9od/WSDhLAOy74cqwzKJwoR9DcALxkWVMuJW7xBF9tWEroVvFrh6/N\"\ - \r\n }\r\n ]\r\n }\r\n },\r\n \"secrets\"\ - : []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - }]},\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"resources\"\ - : [\r\n {\r\n \"properties\": {\r\n \"publisher\": \"Microsoft.Azure.NetworkWatcher\"\ - ,\r\n \"type\": \"NetworkWatcherAgentLinux\",\r\n \"typeHandlerVersion\"\ - : \"1.4\",\r\n \"autoUpgradeMinorVersion\": true,\r\n \"provisioningState\"\ - : \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\"\ - ,\r\n \"location\": \"westus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux\"\ - ,\r\n \"name\": \"NetworkWatcherAgentLinux\"\r\n }\r\n ],\r\n \"\ - type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ - ,\r\n \"name\": \"vm1\"\r\n}"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Resources/deployments/vm_deploy_R3hPRxFGmMw1a32VhvS7RbuYNzLPsSJp","name":"vm_deploy_R3hPRxFGmMw1a32VhvS7RbuYNzLPsSJp","properties":{"templateHash":"11234453629923614285","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-05-17T18:09:06.7164592Z","duration":"PT1M51.2480375S","correlationId":"3cc46313-d654-44e6-b709-e16c670d63de","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET"}]}}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:28:27 GMT'] + Date: ['Wed, 17 May 2017 18:09:17 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['2729'] + content-length: ['3229'] status: {code: 200, message: OK} - request: body: null @@ -2988,226 +2362,106 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [6fe32414-245c-11e7-88d3-a0b3ccf7272a] + x-ms-client-request-id: [ef8d40c0-3b2b-11e7-87bf-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&api-version=2016-04-30-preview response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"4a48285c-ea69-4b56-b122-adba62c8fea7\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"b7933411-7b6c-4d69-bf8b-ed176c5749fb\"\ + ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ + \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ + \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ + ,\r\n \"sku\": \"16.04-LTS\",\r\n \"version\": \"latest\"\r\n\ + \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ + \ \"name\": \"osdisk_zsw3gJW0hI\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ + \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/disks/osdisk_zsw3gJW0hI\"\ + \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ + : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ + ,\r\n \"adminUsername\": \"deploy\",\r\n \"linuxConfiguration\"\ + : {\r\n \"disablePasswordAuthentication\": false\r\n },\r\n \ + \ \"secrets\": []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\"\ + :[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + }]},\r\n \"provisioningState\": \"Succeeded\",\r\n \"instanceView\"\ + : {\r\n \"vmAgent\": {\r\n \"vmAgentVersion\": \"2.2.10\",\r\n\ + \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ + ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ + Ready\",\r\n \"message\": \"Guest Agent is running\",\r\n \ + \ \"time\": \"2017-05-17T18:09:01+00:00\"\r\n }\r\n \ + \ ],\r\n \"extensionHandlers\": []\r\n },\r\n \"statuses\"\ + : [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\ + \n \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning\ + \ succeeded\",\r\n \"time\": \"2017-05-17T18:08:59.8703483+00:00\"\ + \r\n },\r\n {\r\n \"code\": \"PowerState/running\"\ + ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\ + \r\n }\r\n ]\r\n }\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines\"\ + ,\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ + ,\r\n \"name\": \"vm1\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:28:28 GMT'] + Date: ['Wed, 17 May 2017 18:09:18 GMT'] Expires: ['-1'] Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [809a632d-9f86-4782-a23b-26fb3a6af617, 8d8f46e6-2e6e-4561-9d3f-954bc47cdac8] + content-length: ['2315'] status: {code: 200, message: OK} - request: - body: '{"targetResourceId": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1"}' + body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['169'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [702d03ba-245c-11e7-a02e-a0b3ccf7272a] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/securityGroupView?api-version=2017-03-01 + x-ms-client-request-id: [efb67cf8-3b2b-11e7-983f-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic?api-version=2017-03-01 response: - body: {string: "{\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - ,\r\n \"securityRuleAssociations\": {\r\n \"networkInterfaceAssociation\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - ,\r\n \"securityRules\": [\r\n {\r\n \"name\"\ - : \"default-allow-ssh\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/default-allow-ssh\"\ - ,\r\n \"etag\": \"W/\\\"d1339094-205b-4ade-a7fc-719e9b17c36f\\\ - \"\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"protocol\": \"Tcp\",\r\n \ - \ \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ - : \"22\",\r\n \"sourceAddressPrefix\": \"*\",\r\n \ - \ \"destinationAddressPrefix\": \"*\",\r\n \"access\"\ - : \"Allow\",\r\n \"priority\": 1000,\r\n \"\ - direction\": \"Inbound\"\r\n }\r\n }\r\n \ - \ ]\r\n },\r\n \"defaultSecurityRules\": [\r\n {\r\n\ - \ \"name\": \"AllowVnetInBound\",\r\n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"description\": \"Allow inbound traffic\ - \ from all VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \ - \ \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ - : \"*\",\r\n \"sourceAddressPrefix\": \"VirtualNetwork\",\r\n\ - \ \"destinationAddressPrefix\": \"VirtualNetwork\",\r\n \ - \ \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ - \ \"direction\": \"Inbound\"\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AllowAzureLoadBalancerInBound\",\r\ - \n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"description\": \"Allow inbound traffic\ - \ from azure load balancer\",\r\n \"protocol\": \"*\",\r\n \ - \ \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ - : \"*\",\r\n \"sourceAddressPrefix\": \"AzureLoadBalancer\",\r\ - \n \"destinationAddressPrefix\": \"*\",\r\n \"access\"\ - : \"Allow\",\r\n \"priority\": 65001,\r\n \"direction\"\ - : \"Inbound\"\r\n }\r\n },\r\n {\r\n \ - \ \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"description\": \"Deny all inbound traffic\"\ - ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ - : \"*\",\r\n \"destinationPortRange\": \"*\",\r\n \ - \ \"sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ - : \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ - : 65500,\r\n \"direction\": \"Inbound\"\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AllowVnetOutBound\"\ - ,\r\n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"description\": \"Allow outbound traffic\ - \ from all VMs to all VMs in VNET\",\r\n \"protocol\": \"*\"\ - ,\r\n \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ - : \"*\",\r\n \"sourceAddressPrefix\": \"VirtualNetwork\",\r\n\ - \ \"destinationAddressPrefix\": \"VirtualNetwork\",\r\n \ - \ \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ - \ \"direction\": \"Outbound\"\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AllowInternetOutBound\",\r\n \ - \ \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"description\": \"Allow outbound traffic\ - \ from all VMs to Internet\",\r\n \"protocol\": \"*\",\r\n \ - \ \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ - : \"*\",\r\n \"sourceAddressPrefix\": \"*\",\r\n \ - \ \"destinationAddressPrefix\": \"Internet\",\r\n \"access\"\ - : \"Allow\",\r\n \"priority\": 65001,\r\n \"direction\"\ - : \"Outbound\"\r\n }\r\n },\r\n {\r\n \ - \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"description\": \"Deny all outbound traffic\"\ - ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ - : \"*\",\r\n \"destinationPortRange\": \"*\",\r\n \ - \ \"sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ - : \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ - : 65500,\r\n \"direction\": \"Outbound\"\r\n }\r\n\ - \ }\r\n ],\r\n \"effectiveSecurityRules\": [\r\n \ - \ {\r\n \"name\": \"DefaultOutboundDenyAll\",\r\n \ - \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"0-65535\"\ - ,\r\n \"destinationPortRange\": \"0-65535\",\r\n \"\ - sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ - : \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ - : 65500,\r\n \"direction\": \"Outbound\"\r\n },\r\n \ - \ {\r\n \"name\": \"DefaultRule_AllowVnetOutBound\",\r\n\ - \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"\ - 0-65535\",\r\n \"destinationPortRange\": \"0-65535\",\r\n \ - \ \"sourceAddressPrefix\": \"VirtualNetwork\",\r\n \"expandedSourceAddressPrefix\"\ - : [\r\n \"10.0.0.0/16\",\r\n \"168.63.129.16/32\"\ - \r\n ],\r\n \"destinationAddressPrefix\": \"VirtualNetwork\"\ - ,\r\n \"expandedDestinationAddressPrefix\": [\r\n \ - \ \"10.0.0.0/16\",\r\n \"168.63.129.16/32\"\r\n ],\r\ - \n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\ - \n \"direction\": \"Outbound\"\r\n },\r\n {\r\ - \n \"name\": \"DefaultRule_AllowInternetOutBound\",\r\n \ - \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"0-65535\"\ - ,\r\n \"destinationPortRange\": \"0-65535\",\r\n \"\ - sourceAddressPrefix\": \"0.0.0.0/0\",\r\n \"destinationAddressPrefix\"\ - : \"Internet\",\r\n \"expandedDestinationAddressPrefix\": [\r\n\ - \ \"32.0.0.0/3\",\r\n \"4.0.0.0/6\",\r\n \ - \ \"2.0.0.0/7\",\r\n \"1.0.0.0/8\",\r\n \"\ - 12.0.0.0/6\",\r\n \"8.0.0.0/7\",\r\n \"11.0.0.0/8\"\ - ,\r\n \"64.0.0.0/3\",\r\n \"112.0.0.0/5\",\r\n \ - \ \"120.0.0.0/6\",\r\n \"124.0.0.0/7\",\r\n \ - \ \"126.0.0.0/8\",\r\n \"128.0.0.0/3\",\r\n \ - \ \"176.0.0.0/4\",\r\n \"160.0.0.0/5\",\r\n \ - \ \"170.0.0.0/7\",\r\n \"168.0.0.0/8\",\r\n \"169.0.0.0/9\"\ - ,\r\n \"169.128.0.0/10\",\r\n \"169.192.0.0/11\"\ - ,\r\n \"169.224.0.0/12\",\r\n \"169.240.0.0/13\"\ - ,\r\n \"169.248.0.0/14\",\r\n \"169.252.0.0/15\"\ - ,\r\n \"169.255.0.0/16\",\r\n \"174.0.0.0/7\",\r\ - \n \"173.0.0.0/8\",\r\n \"172.128.0.0/9\",\r\n \ - \ \"172.64.0.0/10\",\r\n \"172.32.0.0/11\",\r\n \ - \ \"172.0.0.0/12\",\r\n \"208.0.0.0/4\",\r\n \ - \ \"200.0.0.0/5\",\r\n \"194.0.0.0/7\",\r\n \ - \ \"193.0.0.0/8\",\r\n \"192.64.0.0/10\",\r\n \ - \ \"192.32.0.0/11\",\r\n \"192.16.0.0/12\",\r\n \ - \ \"192.8.0.0/13\",\r\n \"192.4.0.0/14\",\r\n \ - \ \"192.2.0.0/15\",\r\n \"192.1.0.0/16\",\r\n \"\ - 192.0.128.0/17\",\r\n \"192.0.64.0/18\",\r\n \"\ - 192.0.32.0/19\",\r\n \"192.0.16.0/20\",\r\n \"192.0.8.0/21\"\ - ,\r\n \"192.0.4.0/22\",\r\n \"192.0.0.0/23\",\r\n\ - \ \"192.0.3.0/24\",\r\n \"192.192.0.0/10\",\r\n\ - \ \"192.128.0.0/11\",\r\n \"192.176.0.0/12\",\r\n\ - \ \"192.160.0.0/13\",\r\n \"192.172.0.0/14\",\r\n\ - \ \"192.170.0.0/15\",\r\n \"192.169.0.0/16\",\r\n\ - \ \"196.0.0.0/7\",\r\n \"199.0.0.0/8\",\r\n \ - \ \"198.128.0.0/9\",\r\n \"198.64.0.0/10\",\r\n \ - \ \"198.32.0.0/11\",\r\n \"198.0.0.0/12\",\r\n \ - \ \"198.24.0.0/13\",\r\n \"198.20.0.0/14\",\r\n \ - \ \"198.16.0.0/15\",\r\n \"104.0.0.0/5\",\r\n \ - \ \"96.0.0.0/6\",\r\n \"102.0.0.0/7\",\r\n \ - \ \"101.0.0.0/8\",\r\n \"100.128.0.0/9\",\r\n \"\ - 100.0.0.0/10\",\r\n \"16.0.0.0/5\",\r\n \"28.0.0.0/6\"\ - ,\r\n \"26.0.0.0/7\",\r\n \"24.0.0.0/8\"\r\n \ - \ ],\r\n \"access\": \"Allow\",\r\n \"priority\"\ - : 65001,\r\n \"direction\": \"Outbound\"\r\n },\r\n \ - \ {\r\n \"name\": \"DefaultRule_DenyAllOutBound\",\r\n \ - \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"\ - 0-65535\",\r\n \"destinationPortRange\": \"0-65535\",\r\n \ - \ \"sourceAddressPrefix\": \"0.0.0.0/0\",\r\n \"destinationAddressPrefix\"\ - : \"0.0.0.0/0\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ - : 65500,\r\n \"direction\": \"Outbound\"\r\n },\r\n \ - \ {\r\n \"name\": \"DefaultInboundDenyAll\",\r\n \ - \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"0-65535\"\ - ,\r\n \"destinationPortRange\": \"0-65535\",\r\n \"\ - sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ - : \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ - : 65500,\r\n \"direction\": \"Inbound\"\r\n },\r\n \ - \ {\r\n \"name\": \"DefaultRule_AllowVnetInBound\",\r\n \ - \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"\ - 0-65535\",\r\n \"destinationPortRange\": \"0-65535\",\r\n \ - \ \"sourceAddressPrefix\": \"VirtualNetwork\",\r\n \"expandedSourceAddressPrefix\"\ - : [\r\n \"10.0.0.0/16\",\r\n \"168.63.129.16/32\"\ - \r\n ],\r\n \"destinationAddressPrefix\": \"VirtualNetwork\"\ - ,\r\n \"expandedDestinationAddressPrefix\": [\r\n \ - \ \"10.0.0.0/16\",\r\n \"168.63.129.16/32\"\r\n ],\r\ - \n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\ - \n \"direction\": \"Inbound\"\r\n },\r\n {\r\n\ - \ \"name\": \"DefaultRule_AllowAzureLoadBalancerInBound\",\r\n\ - \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"\ - 0-65535\",\r\n \"destinationPortRange\": \"0-65535\",\r\n \ - \ \"sourceAddressPrefix\": \"AzureLoadBalancer\",\r\n \"\ - expandedSourceAddressPrefix\": [\r\n \"168.63.129.16/32\"\r\n\ - \ ],\r\n \"destinationAddressPrefix\": \"0.0.0.0/0\"\ - ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\ - \n \"direction\": \"Inbound\"\r\n },\r\n {\r\n\ - \ \"name\": \"DefaultRule_DenyAllInBound\",\r\n \"protocol\"\ - : \"All\",\r\n \"sourcePortRange\": \"0-65535\",\r\n \ - \ \"destinationPortRange\": \"0-65535\",\r\n \"sourceAddressPrefix\"\ - : \"0.0.0.0/0\",\r\n \"destinationAddressPrefix\": \"0.0.0.0/0\"\ - ,\r\n \"access\": \"Deny\",\r\n \"priority\": 65500,\r\ - \n \"direction\": \"Inbound\"\r\n },\r\n {\r\n\ - \ \"name\": \"UserRule_default-allow-ssh\",\r\n \"protocol\"\ - : \"Tcp\",\r\n \"sourcePortRange\": \"0-65535\",\r\n \ - \ \"destinationPortRange\": \"22-22\",\r\n \"sourceAddressPrefix\"\ - : \"0.0.0.0/0\",\r\n \"destinationAddressPrefix\": \"0.0.0.0/0\"\ - ,\r\n \"access\": \"Allow\",\r\n \"priority\": 1000,\r\ - \n \"direction\": \"Inbound\"\r\n }\r\n ]\r\n \ - \ }\r\n }\r\n ]\r\n}"} + body: {string: "{\r\n \"name\": \"vm1VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + ,\r\n \"etag\": \"W/\\\"a0b95da3-3e12-4853-bc28-6b9531019638\\\"\",\r\n \ + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n\ + \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"c2b6e61d-354e-4e4f-9fad-78d37d511903\"\ + ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm1\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\ + ,\r\n \"etag\": \"W/\\\"a0b95da3-3e12-4853-bc28-6b9531019638\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ + : \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\":\ + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\ + \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ + : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ + \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ + internalDomainNameSuffix\": \"s2uogyc11d5ulkyom3ybgkzhlg.dx.internal.cloudapp.net\"\ + \r\n },\r\n \"macAddress\": \"00-0D-3A-36-C9-3E\",\r\n \"enableAcceleratedNetworking\"\ + : false,\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\"\ + : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ + \r\n },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \ + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ + \r\n }\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\ + \n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:28:36 GMT'] + Date: ['Wed, 17 May 2017 18:09:19 GMT'] + ETag: [W/"a0b95da3-3e12-4853-bc28-6b9531019638"] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/6b6f95ea-6609-417f-ba71-3a9bdc6aafa4?api-version=2017-03-01'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['12218'] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + content-length: ['2225'] status: {code: 200, message: OK} - request: body: null @@ -3217,197 +2471,1494 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [702d03ba-245c-11e7-a02e-a0b3ccf7272a] + x-ms-client-request-id: [efdf64ac-3b2b-11e7-be6a-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/6b6f95ea-6609-417f-ba71-3a9bdc6aafa4?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP?api-version=2017-03-01 response: - body: {string: "{\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - ,\r\n \"securityRuleAssociations\": {\r\n \"networkInterfaceAssociation\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - ,\r\n \"securityRules\": [\r\n {\r\n \"name\"\ - : \"default-allow-ssh\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/default-allow-ssh\"\ - ,\r\n \"etag\": \"W/\\\"d1339094-205b-4ade-a7fc-719e9b17c36f\\\ - \"\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"protocol\": \"Tcp\",\r\n \ - \ \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ - : \"22\",\r\n \"sourceAddressPrefix\": \"*\",\r\n \ - \ \"destinationAddressPrefix\": \"*\",\r\n \"access\"\ - : \"Allow\",\r\n \"priority\": 1000,\r\n \"\ - direction\": \"Inbound\"\r\n }\r\n }\r\n \ - \ ]\r\n },\r\n \"defaultSecurityRules\": [\r\n {\r\n\ - \ \"name\": \"AllowVnetInBound\",\r\n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/AllowVnetInBound\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"description\": \"Allow inbound traffic\ - \ from all VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \ - \ \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ - : \"*\",\r\n \"sourceAddressPrefix\": \"VirtualNetwork\",\r\n\ - \ \"destinationAddressPrefix\": \"VirtualNetwork\",\r\n \ - \ \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ - \ \"direction\": \"Inbound\"\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AllowAzureLoadBalancerInBound\",\r\ - \n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/AllowAzureLoadBalancerInBound\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"description\": \"Allow inbound traffic\ - \ from azure load balancer\",\r\n \"protocol\": \"*\",\r\n \ - \ \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ - : \"*\",\r\n \"sourceAddressPrefix\": \"AzureLoadBalancer\",\r\ - \n \"destinationAddressPrefix\": \"*\",\r\n \"access\"\ - : \"Allow\",\r\n \"priority\": 65001,\r\n \"direction\"\ - : \"Inbound\"\r\n }\r\n },\r\n {\r\n \ - \ \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/DenyAllInBound\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"description\": \"Deny all inbound traffic\"\ - ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ - : \"*\",\r\n \"destinationPortRange\": \"*\",\r\n \ - \ \"sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ - : \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ - : 65500,\r\n \"direction\": \"Inbound\"\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AllowVnetOutBound\"\ - ,\r\n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/AllowVnetOutBound\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"description\": \"Allow outbound traffic\ - \ from all VMs to all VMs in VNET\",\r\n \"protocol\": \"*\"\ - ,\r\n \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ - : \"*\",\r\n \"sourceAddressPrefix\": \"VirtualNetwork\",\r\n\ - \ \"destinationAddressPrefix\": \"VirtualNetwork\",\r\n \ - \ \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ - \ \"direction\": \"Outbound\"\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AllowInternetOutBound\",\r\n \ - \ \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/AllowInternetOutBound\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"description\": \"Allow outbound traffic\ - \ from all VMs to Internet\",\r\n \"protocol\": \"*\",\r\n \ - \ \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ - : \"*\",\r\n \"sourceAddressPrefix\": \"*\",\r\n \ - \ \"destinationAddressPrefix\": \"Internet\",\r\n \"access\"\ - : \"Allow\",\r\n \"priority\": 65001,\r\n \"direction\"\ - : \"Outbound\"\r\n }\r\n },\r\n {\r\n \ - \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/DenyAllOutBound\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"description\": \"Deny all outbound traffic\"\ - ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ - : \"*\",\r\n \"destinationPortRange\": \"*\",\r\n \ - \ \"sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ - : \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ - : 65500,\r\n \"direction\": \"Outbound\"\r\n }\r\n\ - \ }\r\n ],\r\n \"effectiveSecurityRules\": [\r\n \ - \ {\r\n \"name\": \"DefaultOutboundDenyAll\",\r\n \ - \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"0-65535\"\ - ,\r\n \"destinationPortRange\": \"0-65535\",\r\n \"\ - sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ - : \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ - : 65500,\r\n \"direction\": \"Outbound\"\r\n },\r\n \ - \ {\r\n \"name\": \"DefaultRule_AllowVnetOutBound\",\r\n\ - \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"\ - 0-65535\",\r\n \"destinationPortRange\": \"0-65535\",\r\n \ - \ \"sourceAddressPrefix\": \"VirtualNetwork\",\r\n \"expandedSourceAddressPrefix\"\ - : [\r\n \"10.0.0.0/16\",\r\n \"168.63.129.16/32\"\ - \r\n ],\r\n \"destinationAddressPrefix\": \"VirtualNetwork\"\ - ,\r\n \"expandedDestinationAddressPrefix\": [\r\n \ - \ \"10.0.0.0/16\",\r\n \"168.63.129.16/32\"\r\n ],\r\ - \n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\ - \n \"direction\": \"Outbound\"\r\n },\r\n {\r\ - \n \"name\": \"DefaultRule_AllowInternetOutBound\",\r\n \ - \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"0-65535\"\ - ,\r\n \"destinationPortRange\": \"0-65535\",\r\n \"\ - sourceAddressPrefix\": \"0.0.0.0/0\",\r\n \"destinationAddressPrefix\"\ - : \"Internet\",\r\n \"expandedDestinationAddressPrefix\": [\r\n\ - \ \"32.0.0.0/3\",\r\n \"4.0.0.0/6\",\r\n \ - \ \"2.0.0.0/7\",\r\n \"1.0.0.0/8\",\r\n \"\ - 12.0.0.0/6\",\r\n \"8.0.0.0/7\",\r\n \"11.0.0.0/8\"\ - ,\r\n \"64.0.0.0/3\",\r\n \"112.0.0.0/5\",\r\n \ - \ \"120.0.0.0/6\",\r\n \"124.0.0.0/7\",\r\n \ - \ \"126.0.0.0/8\",\r\n \"128.0.0.0/3\",\r\n \ - \ \"176.0.0.0/4\",\r\n \"160.0.0.0/5\",\r\n \ - \ \"170.0.0.0/7\",\r\n \"168.0.0.0/8\",\r\n \"169.0.0.0/9\"\ - ,\r\n \"169.128.0.0/10\",\r\n \"169.192.0.0/11\"\ - ,\r\n \"169.224.0.0/12\",\r\n \"169.240.0.0/13\"\ - ,\r\n \"169.248.0.0/14\",\r\n \"169.252.0.0/15\"\ - ,\r\n \"169.255.0.0/16\",\r\n \"174.0.0.0/7\",\r\ - \n \"173.0.0.0/8\",\r\n \"172.128.0.0/9\",\r\n \ - \ \"172.64.0.0/10\",\r\n \"172.32.0.0/11\",\r\n \ - \ \"172.0.0.0/12\",\r\n \"208.0.0.0/4\",\r\n \ - \ \"200.0.0.0/5\",\r\n \"194.0.0.0/7\",\r\n \ - \ \"193.0.0.0/8\",\r\n \"192.64.0.0/10\",\r\n \ - \ \"192.32.0.0/11\",\r\n \"192.16.0.0/12\",\r\n \ - \ \"192.8.0.0/13\",\r\n \"192.4.0.0/14\",\r\n \ - \ \"192.2.0.0/15\",\r\n \"192.1.0.0/16\",\r\n \"\ - 192.0.128.0/17\",\r\n \"192.0.64.0/18\",\r\n \"\ - 192.0.32.0/19\",\r\n \"192.0.16.0/20\",\r\n \"192.0.8.0/21\"\ - ,\r\n \"192.0.4.0/22\",\r\n \"192.0.0.0/23\",\r\n\ - \ \"192.0.3.0/24\",\r\n \"192.192.0.0/10\",\r\n\ - \ \"192.128.0.0/11\",\r\n \"192.176.0.0/12\",\r\n\ - \ \"192.160.0.0/13\",\r\n \"192.172.0.0/14\",\r\n\ - \ \"192.170.0.0/15\",\r\n \"192.169.0.0/16\",\r\n\ - \ \"196.0.0.0/7\",\r\n \"199.0.0.0/8\",\r\n \ - \ \"198.128.0.0/9\",\r\n \"198.64.0.0/10\",\r\n \ - \ \"198.32.0.0/11\",\r\n \"198.0.0.0/12\",\r\n \ - \ \"198.24.0.0/13\",\r\n \"198.20.0.0/14\",\r\n \ - \ \"198.16.0.0/15\",\r\n \"104.0.0.0/5\",\r\n \ - \ \"96.0.0.0/6\",\r\n \"102.0.0.0/7\",\r\n \ - \ \"101.0.0.0/8\",\r\n \"100.128.0.0/9\",\r\n \"\ - 100.0.0.0/10\",\r\n \"16.0.0.0/5\",\r\n \"28.0.0.0/6\"\ - ,\r\n \"26.0.0.0/7\",\r\n \"24.0.0.0/8\"\r\n \ - \ ],\r\n \"access\": \"Allow\",\r\n \"priority\"\ - : 65001,\r\n \"direction\": \"Outbound\"\r\n },\r\n \ - \ {\r\n \"name\": \"DefaultRule_DenyAllOutBound\",\r\n \ - \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"\ - 0-65535\",\r\n \"destinationPortRange\": \"0-65535\",\r\n \ - \ \"sourceAddressPrefix\": \"0.0.0.0/0\",\r\n \"destinationAddressPrefix\"\ - : \"0.0.0.0/0\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ - : 65500,\r\n \"direction\": \"Outbound\"\r\n },\r\n \ - \ {\r\n \"name\": \"DefaultInboundDenyAll\",\r\n \ - \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"0-65535\"\ - ,\r\n \"destinationPortRange\": \"0-65535\",\r\n \"\ - sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ - : \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ - : 65500,\r\n \"direction\": \"Inbound\"\r\n },\r\n \ - \ {\r\n \"name\": \"DefaultRule_AllowVnetInBound\",\r\n \ - \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"\ - 0-65535\",\r\n \"destinationPortRange\": \"0-65535\",\r\n \ - \ \"sourceAddressPrefix\": \"VirtualNetwork\",\r\n \"expandedSourceAddressPrefix\"\ - : [\r\n \"10.0.0.0/16\",\r\n \"168.63.129.16/32\"\ - \r\n ],\r\n \"destinationAddressPrefix\": \"VirtualNetwork\"\ - ,\r\n \"expandedDestinationAddressPrefix\": [\r\n \ - \ \"10.0.0.0/16\",\r\n \"168.63.129.16/32\"\r\n ],\r\ - \n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\ - \n \"direction\": \"Inbound\"\r\n },\r\n {\r\n\ - \ \"name\": \"DefaultRule_AllowAzureLoadBalancerInBound\",\r\n\ - \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"\ - 0-65535\",\r\n \"destinationPortRange\": \"0-65535\",\r\n \ - \ \"sourceAddressPrefix\": \"AzureLoadBalancer\",\r\n \"\ - expandedSourceAddressPrefix\": [\r\n \"168.63.129.16/32\"\r\n\ - \ ],\r\n \"destinationAddressPrefix\": \"0.0.0.0/0\"\ - ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\ - \n \"direction\": \"Inbound\"\r\n },\r\n {\r\n\ - \ \"name\": \"DefaultRule_DenyAllInBound\",\r\n \"protocol\"\ - : \"All\",\r\n \"sourcePortRange\": \"0-65535\",\r\n \ - \ \"destinationPortRange\": \"0-65535\",\r\n \"sourceAddressPrefix\"\ - : \"0.0.0.0/0\",\r\n \"destinationAddressPrefix\": \"0.0.0.0/0\"\ - ,\r\n \"access\": \"Deny\",\r\n \"priority\": 65500,\r\ - \n \"direction\": \"Inbound\"\r\n },\r\n {\r\n\ - \ \"name\": \"UserRule_default-allow-ssh\",\r\n \"protocol\"\ - : \"Tcp\",\r\n \"sourcePortRange\": \"0-65535\",\r\n \ - \ \"destinationPortRange\": \"22-22\",\r\n \"sourceAddressPrefix\"\ - : \"0.0.0.0/0\",\r\n \"destinationAddressPrefix\": \"0.0.0.0/0\"\ - ,\r\n \"access\": \"Allow\",\r\n \"priority\": 1000,\r\ - \n \"direction\": \"Inbound\"\r\n }\r\n ]\r\n \ - \ }\r\n }\r\n ]\r\n}"} + body: {string: "{\r\n \"name\": \"vm1PublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\ + ,\r\n \"etag\": \"W/\\\"0df50ec6-2d36-46e1-825c-ee6888f08417\\\"\",\r\n \ + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n\ + \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"ced991c4-541d-4601-9dff-db2c2e9ef81e\"\ + ,\r\n \"ipAddress\": \"13.64.117.217\",\r\n \"publicIPAddressVersion\"\ + : \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\"\ + : 4,\r\n \"ipConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\ + \r\n }\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\"\r\ + \n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Wed, 17 May 2017 18:09:19 GMT'] + ETag: [W/"0df50ec6-2d36-46e1-825c-ee6888f08417"] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['849'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [f002ea80-3b2b-11e7-9291-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&api-version=2016-04-30-preview + response: + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"b7933411-7b6c-4d69-bf8b-ed176c5749fb\"\ + ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ + \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ + \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ + ,\r\n \"sku\": \"16.04-LTS\",\r\n \"version\": \"latest\"\r\n\ + \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ + \ \"name\": \"osdisk_zsw3gJW0hI\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ + \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/disks/osdisk_zsw3gJW0hI\"\ + \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ + : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ + ,\r\n \"adminUsername\": \"deploy\",\r\n \"linuxConfiguration\"\ + : {\r\n \"disablePasswordAuthentication\": false\r\n },\r\n \ + \ \"secrets\": []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\"\ + :[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + }]},\r\n \"provisioningState\": \"Succeeded\",\r\n \"instanceView\"\ + : {\r\n \"vmAgent\": {\r\n \"vmAgentVersion\": \"2.2.10\",\r\n\ + \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ + ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ + Ready\",\r\n \"message\": \"Guest Agent is running\",\r\n \ + \ \"time\": \"2017-05-17T18:09:01+00:00\"\r\n }\r\n \ + \ ],\r\n \"extensionHandlers\": []\r\n },\r\n \"statuses\"\ + : [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\ + \n \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning\ + \ succeeded\",\r\n \"time\": \"2017-05-17T18:08:59.8703483+00:00\"\ + \r\n },\r\n {\r\n \"code\": \"PowerState/running\"\ + ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\ + \r\n }\r\n ]\r\n }\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines\"\ + ,\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ + ,\r\n \"name\": \"vm1\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Wed, 17 May 2017 18:09:18 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2315'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] + accept-language: [en-US] + x-ms-client-request-id: [f029311a-3b2b-11e7-9ca0-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/publishers?api-version=2016-04-30-preview + response: + body: {string: "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"\ + 4psa\",\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/4psa\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4ward365\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/4ward365\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"7isolutions\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/7isolutions\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"a10networks\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/a10networks\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"abiquo\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/abiquo\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"accellion\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/accellion\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Acronis\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Acronis\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Acronis.Backup\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Acronis.Backup\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"actian_matrix\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/actian_matrix\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"actifio\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/actifio\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"active-navigation\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/active-navigation\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"activeeon\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/activeeon\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"adam-software\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/adam-software\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"adatao\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/adatao\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"adobe_test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/adobe_test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"adra-match\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/adra-match\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"advantech\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/advantech\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"advantech-webaccess\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/advantech-webaccess\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"advellence\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/advellence\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aerospike\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aerospike\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aerospike-database\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aerospike-database\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aimsinnovation\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aimsinnovation\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"AIP.Diagnostics.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/AIP.Diagnostics.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aiscaler-cache-control-ddos-and-url-rewriting-\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aiscaler-cache-control-ddos-and-url-rewriting-\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"akeron\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/akeron\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"akumina\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/akumina\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"alachisoft\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/alachisoft\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"alertlogic\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/alertlogic\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"AlertLogic.Extension\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/AlertLogic.Extension\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"algebraix-data\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/algebraix-data\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"alienvault\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/alienvault\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"alldigital-brevity\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/alldigital-brevity\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"alteryx\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/alteryx\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"altiar\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/altiar\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"alvao\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/alvao\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"analitica\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/analitica\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"angoss\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/angoss\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"apigee\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/apigee\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"appcelerator\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/appcelerator\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"appex-networks\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/appex-networks\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"appistry\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/appistry\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"appscale-marketplace\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/appscale-marketplace\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"appveyorci\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/appveyorci\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"appzero\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/appzero\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aqua-security\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aqua-security\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"arangodb\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/arangodb\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aras\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aras\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"archive360\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/archive360\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"array_networks\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/array_networks\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"arvatosystems\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/arvatosystems\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"asigra\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/asigra\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aspex\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aspex\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aspex-managed-cloud\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aspex-managed-cloud\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"atlassian\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/atlassian\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"atmosera\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/atmosera\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"atomicorp\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/atomicorp\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"attunity_cloudbeam\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/attunity_cloudbeam\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"auraportal\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/auraportal\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"auriq-systems\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/auriq-systems\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"avds\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/avds\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"avepoint\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/avepoint\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"averesystems\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/averesystems\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"aviatrix-systems\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/aviatrix-systems\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"awingu\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/awingu\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"axinom\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/axinom\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"axway\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/axway\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"azul\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/azul\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"AzureRT.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/AzureRT.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"azuresyncfusion\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/azuresyncfusion\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"azuretesting\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/azuretesting\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"azuretesting2\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/azuretesting2\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"AzureTools1type\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/AzureTools1type\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"balabit\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/balabit\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"barracudanetworks\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/barracudanetworks\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"basho\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/basho\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"batch\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/batch\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bdy\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bdy\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"beyondtrust\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/beyondtrust\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Bing\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Bing\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Bitnami\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Bitnami\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bizagi\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bizagi\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"biztalk360\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/biztalk360\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"blackberry\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/blackberry\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"blockapps\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/blockapps\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"blockchain-foundry\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/blockchain-foundry\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"blockstack\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/blockstack\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bluetalon\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bluetalon\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bmc.ctm\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bmc.ctm\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bmcctm.test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bmcctm.test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"boundlessgeo\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/boundlessgeo\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"boxless\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/boxless\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"brainshare-it\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/brainshare-it\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"brocade_communications\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/brocade_communications\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bryte\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bryte\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bssw\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bssw\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"buddhalabs\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/buddhalabs\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bugrius\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bugrius\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"bwappengine\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/bwappengine\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Canonical\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Canonical\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"caringo\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/caringo\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cask\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cask\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"catechnologies\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/catechnologies\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cautelalabs\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cautelalabs\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cavirin\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cavirin\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cbrdashboard\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cbrdashboard\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cbreplicator\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cbreplicator\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cds\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cds\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"certivox\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/certivox\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cfd-direct\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cfd-direct\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"chain\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/chain\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"checkpoint\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/checkpoint\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"checkpointsystems\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/checkpointsystems\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"chef-software\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/chef-software\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Chef.Bootstrap.WindowsAzure\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Chef.Bootstrap.WindowsAzure\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cherwell\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cherwell\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cipherpoint\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cipherpoint\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"circleci\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/circleci\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cires21\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cires21\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cisco\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cisco\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"citrix\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/citrix\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"clear-linux-project\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/clear-linux-project\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"click2cloud-inc\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/click2cloud-inc\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"clickberry\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/clickberry\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"clouber\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/clouber\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloud-cruiser\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloud-cruiser\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudbees\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudbees\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudbees-enterprise-jenkins\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudbees-enterprise-jenkins\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudbolt-software\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudbolt-software\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudboost\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudboost\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudcoreo\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudcoreo\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudcruiser\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudcruiser\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudera\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudera\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudera1qaz2wsx\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudera1qaz2wsx\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudhouse\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudhouse\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudify\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudify\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudlink\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudlink\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"CloudLinkEMC.SecureVM\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/CloudLinkEMC.SecureVM\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"CloudLinkEMC.SecureVM.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/CloudLinkEMC.SecureVM.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"CloudLinkEMC.SecureVM.Test2\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/CloudLinkEMC.SecureVM.Test2\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudneeti\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudneeti\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudsecurity\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudsecurity\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cloudsoft\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudsoft\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"clustrix\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/clustrix\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"codelathe\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/codelathe\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"codenvy\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/codenvy\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"coffingdw\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/coffingdw\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cognosys\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cognosys\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cohesity\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cohesity\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cohesive\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cohesive\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"commvault\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/commvault\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"companyname-short\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/companyname-short\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"composable\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/composable\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"comunity\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/comunity\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Confer\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Confer\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"confluentinc\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/confluentinc\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"connecting-software\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/connecting-software\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"consensys\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/consensys\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"convertigo\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/convertigo\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"corda\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/corda\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cordis\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cordis\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"corent-technology-pvt\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/corent-technology-pvt\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"CoreOS\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/CoreOS\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"couchbase\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/couchbase\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"crate-io\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/crate-io\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"credativ\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/credativ\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cristie-software-clonemanager\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cristie-software-clonemanager\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"cryptzone\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/cryptzone\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"csstest\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/csstest\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ctm.bmc.com\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ctm.bmc.com\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dalet\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dalet\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"danielsol.AzureTools1\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/danielsol.AzureTools1\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Dans.Windows.App\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Dans.Windows.App\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Dans3.Windows.App\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Dans3.Windows.App\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dataart\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dataart\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"datacastle\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/datacastle\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"datacore\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/datacore\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Datadog.Agent\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Datadog.Agent\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dataexpeditioninc\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dataexpeditioninc\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dataiku\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dataiku\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"datalayer\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/datalayer\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dataliberation\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dataliberation\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"datastax\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/datastax\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"datasunrise\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/datasunrise\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"datometry\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/datometry\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"defacto_global_\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/defacto_global_\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dell-software\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dell-software\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dellemc\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dellemc\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dell_software\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dell_software\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"denyall\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/denyall\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"derdack\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/derdack\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dgsecure\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dgsecure\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"digitaloffice\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/digitaloffice\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"docker\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/docker\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"docscorp-us\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/docscorp-us\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dolbydeveloper\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dolbydeveloper\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dome9\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dome9\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"donovapub\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/donovapub\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"drone\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/drone\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dsi\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dsi\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dundas\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dundas\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dynatrace\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dynatrace\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"dynatrace.ruxit\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/dynatrace.ruxit\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"eastbanctech\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/eastbanctech\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"easyterritory\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/easyterritory\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"edevtech\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/edevtech\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"egnyte\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/egnyte\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"egress\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/egress\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"eip\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/eip\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"eip-eipower\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/eip-eipower\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"elastacloud\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/elastacloud\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"elasticbox\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/elasticbox\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"elecard\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/elecard\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"electric-cloud\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/electric-cloud\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"element-it\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/element-it\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"elementrem\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/elementrem\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"elfiqnetworks\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/elfiqnetworks\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"eloquera\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/eloquera\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"emercoin\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/emercoin\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"enforongo\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/enforongo\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"enterprise-ethereum-alliance\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/enterprise-ethereum-alliance\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"eperi\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/eperi\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"equalum\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/equalum\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"equilibrium\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/equilibrium\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"esdenera\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/esdenera\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ESET\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ESET\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"esri\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/esri\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ethcore\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ethcore\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ethereum\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ethereum\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"eventtracker\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/eventtracker\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"evostream-inc\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/evostream-inc\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"exasol\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/exasol\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"exit-games\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/exit-games\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"expertime\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/expertime\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"f5-networks\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/f5-networks\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"falconstorsoftware\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/falconstorsoftware\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"fidesys\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/fidesys\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"filebridge\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/filebridge\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"firehost\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/firehost\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"flexerasoftware\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/flexerasoftware\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"flowforma\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/flowforma\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"fluid-mobility\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/fluid-mobility\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"flynet\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/flynet\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"foghorn-systems\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/foghorn-systems\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"folio3-dynamics-services\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/folio3-dynamics-services\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"forscene\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/forscene\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"fortinet\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/fortinet\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"fortycloud\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/fortycloud\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"fptjapan\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/fptjapan\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"fw\",\r\ + \n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/fw\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"g-data-software\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/g-data-software\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"gbs\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/gbs\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"gemalto-safenet\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/gemalto-safenet\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Gemalto.SafeNet.ProtectV\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Gemalto.SafeNet.ProtectV\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"GitHub\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/GitHub\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"gitlab\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/gitlab\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"globalscape\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/globalscape\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"gordic\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/gordic\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"graphitegtc\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/graphitegtc\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"greathorn\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/greathorn\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"greensql\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/greensql\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"gridgain\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/gridgain\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"guardicore\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/guardicore\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"h2o-ai\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/h2o-ai\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"haivision\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/haivision\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"halobicloud\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/halobicloud\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hanu\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hanu\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"HDInsight\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/HDInsight\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hewlett-packard\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hewlett-packard\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hillstone-networks\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hillstone-networks\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hitachi-solutions\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hitachi-solutions\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hortonworks\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hortonworks\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hpe\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hpe\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"HPE.Security.ApplicationDefender\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/HPE.Security.ApplicationDefender\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"http-cisco-com\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/http-cisco-com\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"humanlogic\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/humanlogic\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hush-hush\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hush-hush\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hvr\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hvr\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hyperglance\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hyperglance\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hypergrid\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hypergrid\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"hytrust\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/hytrust\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"iaansys\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/iaansys\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"iamcloud\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/iamcloud\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ibabs-eu\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ibabs-eu\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"idcspa\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/idcspa\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ikan\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ikan\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"imaginecommunications\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/imaginecommunications\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"imc\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/imc\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"imperva\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/imperva\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"incredibuild\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/incredibuild\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"infoblox\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/infoblox\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"infolibrarian\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/infolibrarian\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"informatica\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/informatica\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"informatica-cloud\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/informatica-cloud\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"informationbuilders\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/informationbuilders\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"infostrat\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/infostrat\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ingrammicro\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ingrammicro\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"inriver\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/inriver\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"insitesoftware\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/insitesoftware\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"intel\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/intel\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"intelligent-plant-ltd\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/intelligent-plant-ltd\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"intigua\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/intigua\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"iquest\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/iquest\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ishlangu-load-balancer-adc\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ishlangu-load-balancer-adc\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"itelios\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/itelios\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"jamcracker\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/jamcracker\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"jedox\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/jedox\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"jelastic\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/jelastic\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"jetnexus\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/jetnexus\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"jfrog\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/jfrog\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"jitterbit_integration\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/jitterbit_integration\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"kaazing\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/kaazing\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"kali-linux\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/kali-linux\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Kaspersky.Lab\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Kaspersky.Lab\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"kaspersky_lab\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/kaspersky_lab\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"kelverion\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/kelverion\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"kemptech\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/kemptech\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"kepion\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/kepion\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"knime\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/knime\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"kollective\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/kollective\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"lakesidesoftware\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/lakesidesoftware\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"lansa\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/lansa\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"le\",\r\ + \n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/le\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"learningtechnolgy\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/learningtechnolgy\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"lieberlieber\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/lieberlieber\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"liebsoft\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/liebsoft\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"literatu\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/literatu\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"loadbalancer\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/loadbalancer\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"logi-analytics\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/logi-analytics\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"loginpeople\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/loginpeople\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"logiticks\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/logiticks\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"logmein\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/logmein\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"logsign\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/logsign\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"logtrust\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/logtrust\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"looker\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/looker\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"luxoft\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/luxoft\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mactores_inc\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mactores_inc\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"magelia\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/magelia\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"manageengine\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/manageengine\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mapr-technologies\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mapr-technologies\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mariadb\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mariadb\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"marklogic\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/marklogic\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"massiveanalytic-\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/massiveanalytic-\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mavinglobal\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mavinglobal\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"McAfee.EndpointSecurity\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/McAfee.EndpointSecurity\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"McAfee.EndpointSecurity.test3\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/McAfee.EndpointSecurity.test3\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"meanio\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/meanio\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mediazenie\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mediazenie\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"memsql\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/memsql\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mendix\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mendix\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mentalnotes\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mentalnotes\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mesosphere\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mesosphere\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"metavistech\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/metavistech\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mfiles\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mfiles\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mico\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mico\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"microsoft-ads\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/microsoft-ads\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Applications\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Applications\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Backup.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Backup.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Compute.Security\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Compute.Security\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Diagnostics\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Diagnostics\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Diagnostics.Build.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Diagnostics.Build.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Extensions\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Extensions\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Networking.SDN\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Networking.SDN\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.NetworkWatcher\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.NetworkWatcher\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.RecoveryServices\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.RecoveryServices\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.RecoveryServices.SiteRecovery\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.RecoveryServices.SiteRecovery\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Security\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Security\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Security.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Security.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.SiteRecovery.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.SiteRecovery.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.Test.Identity\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Test.Identity\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Azure.WindowsFabric.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.WindowsFabric.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.AzureCAT.AzureEnhancedMonitoring\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.AzureCAT.AzureEnhancedMonitoring\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.AzureCAT.AzureEnhancedMonitoringTest\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.AzureCAT.AzureEnhancedMonitoringTest\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.AzureSecurity.JITAccess\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.AzureSecurity.JITAccess\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.CloudBackup.Workload.Extension\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.CloudBackup.Workload.Extension\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Compute\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.EnterpriseCloud.Monitoring\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.EnterpriseCloud.Monitoring\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.EnterpriseCloud.Monitoring.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.EnterpriseCloud.Monitoring.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Golive.Extensions\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Golive.Extensions\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.HDInsight.Current\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.HDInsight.Current\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.HpcCompute\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.HpcCompute\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.HpcPack\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.HpcPack\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.ManagedIdentity\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.ManagedIdentity\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.OSTCExtensions\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.OSTCExtensions\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.OSTCExtensions.Edp\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.OSTCExtensions.Edp\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.OSTCExtensions.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.OSTCExtensions.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Powershell\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Powershell.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Powershell.WinClient\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.WinClient\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.SqlServer.Managability.IaaS.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.SqlServer.Managability.IaaS.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.SqlServer.Management\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.SqlServer.Management\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.SystemCenter\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.SystemCenter\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.VisualStudio.Azure.ETWTraceListenerService\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.Azure.ETWTraceListenerService\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.VisualStudio.Azure.RemoteDebug\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.Azure.RemoteDebug\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.VisualStudio.Azure.RemoteDebug.Json\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.Azure.RemoteDebug.Json\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.VisualStudio.ServiceProfiler\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.ServiceProfiler\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.VisualStudio.Services\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.Services\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Windows.AzureRemoteApp.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Windows.AzureRemoteApp.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.Windows.RemoteDesktop\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Windows.RemoteDesktop\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Microsoft.WindowsAzure.Compute\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.WindowsAzure.Compute\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftAzureSiteRecovery\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftAzureSiteRecovery\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftBizTalkServer\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftBizTalkServer\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftDynamicsAX\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftDynamicsAX\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftDynamicsGP\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftDynamicsGP\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftDynamicsNAV\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftDynamicsNAV\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftHybridCloudStorage\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftHybridCloudStorage\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftOSTC\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftOSTC\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftRServer\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftRServer\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftSharePoint\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftSharePoint\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftSQLServer\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftSQLServer\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftVisualStudio\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftVisualStudio\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftWindowsServer\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftWindowsServerEssentials\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServerEssentials\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftWindowsServerHPCPack\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServerHPCPack\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"MicrosoftWindowsServerRemoteDesktop\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServerRemoteDesktop\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"midvision\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/midvision\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"miraclelinux\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/miraclelinux\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"miracl_linux\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/miracl_linux\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mobilab\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mobilab\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mokxa-technologies\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mokxa-technologies\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"moviemasher\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/moviemasher\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"msopentech\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/msopentech\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"msrazuresapservices\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/msrazuresapservices\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mtnfog\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mtnfog\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mvp-systems\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mvp-systems\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"mxhero\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/mxhero\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"my-com\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/my-com\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"namirial\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/namirial\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"narrativescience\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/narrativescience\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"nasuni\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/nasuni\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ncbi\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ncbi\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ndl\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ndl\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"netapp\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/netapp\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"netatwork\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/netatwork\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"netgate\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/netgate\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"netiq\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/netiq\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"netmail\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/netmail\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"netsil\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/netsil\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"netwrix\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/netwrix\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"neusoft-neteye\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/neusoft-neteye\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"new-signature\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/new-signature\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"nextlimit\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/nextlimit\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"nexus\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/nexus\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"nginxinc\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/nginxinc\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"nicepeopleatwork\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/nicepeopleatwork\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"nodejsapi\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/nodejsapi\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"nodesource\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/nodesource\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"noobaa\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/noobaa\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"norsync\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/norsync\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"nuxeo\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/nuxeo\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"OctopusDeploy.Tentacle\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/OctopusDeploy.Tentacle\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"officeclipsuite\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/officeclipsuite\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"omega-software\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/omega-software\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ooyala\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ooyala\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"op5\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/op5\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"opencell\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/opencell\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"OpenLogic\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/OpenLogic\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"openmeap\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/openmeap\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"opennebulasystems\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/opennebulasystems\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"opentext\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/opentext\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"opslogix\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/opslogix\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Oracle\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Oracle\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"orckestra\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/orckestra\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"orfast-technologies\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/orfast-technologies\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"orientdb\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/orientdb\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"origam\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/origam\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"osisoft\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/osisoft\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"outsystems\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/outsystems\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"paloaltonetworks\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/paloaltonetworks\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"panorama-necto\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/panorama-necto\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"panzura-file-system\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/panzura-file-system\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"parallels\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/parallels\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"parasoft\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/parasoft\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"passlogy\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/passlogy\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"pe-gromenko\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/pe-gromenko\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"pivotal\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/pivotal\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"plesk\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/plesk\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"pointmatter\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/pointmatter\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"portalarchitects\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/portalarchitects\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"postgres-pro\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/postgres-pro\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"predictionio\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/predictionio\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"predixion\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/predixion\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"prestashop\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/prestashop\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"prime-strategy\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/prime-strategy\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"primesoft\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/primesoft\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"primestream\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/primestream\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"proarch\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/proarch\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"process-one\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/process-one\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"profisee\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/profisee\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"progelspa\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/progelspa\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ptsecurity\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ptsecurity\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ptv_group\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ptv_group\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"puppet\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/puppet\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"PuppetLabs\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/PuppetLabs\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"PuppetLabs.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/PuppetLabs.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"pxlag_swiss\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/pxlag_swiss\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"pydio\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/pydio\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"pyramidanalytics\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/pyramidanalytics\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"qlik\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/qlik\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"quales\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/quales\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Qualys\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Qualys\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"qualysguard\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/qualysguard\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"quasardb\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/quasardb\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"qubole\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/qubole\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"qubole-inc\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/qubole-inc\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"radware\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/radware\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"rancher\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/rancher\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"rapid7\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/rapid7\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"realm\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/realm\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"RedHat\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/RedHat\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"redpoint-global\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/redpoint-global\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"relevance-lab\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/relevance-lab\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"remotelearner\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/remotelearner\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"res\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/res\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"revolution-analytics\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/revolution-analytics\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"RightScaleLinux\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/RightScaleLinux\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"RightScaleWindowsServer\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/RightScaleWindowsServer\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"riverbed\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/riverbed\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"RiverbedTechnology\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/RiverbedTechnology\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"rocketsoftware\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/rocketsoftware\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"rocket_software\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/rocket_software\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"saama\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/saama\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"saltstack\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/saltstack\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"samsung-sds\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/samsung-sds\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"samsungsds-cello\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/samsungsds-cello\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sap\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sap\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sapho\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sapho\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"scalearc\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/scalearc\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"scalebase\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/scalebase\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"scalegrid\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/scalegrid\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"scsk\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/scsk\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"seagate\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/seagate\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"searchblox\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/searchblox\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sensorberg\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sensorberg\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sentryone\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sentryone\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"servoy\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/servoy\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sestek\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sestek\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"shadow-soft\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/shadow-soft\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sharefile\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sharefile\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"shareshiftneeraj.test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/shareshiftneeraj.test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"shavlik\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/shavlik\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sightapps\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sightapps\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"silver-peak-systems\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/silver-peak-systems\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"simmachinesinc\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/simmachinesinc\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sinefa\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sinefa\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sios_datakeeper\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sios_datakeeper\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sisense\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sisense\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Site24x7\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Site24x7\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"skyarc\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/skyarc\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"slamby\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/slamby\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"smartmessage-autoflow\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/smartmessage-autoflow\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"snaplogic\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/snaplogic\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"snip2code\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/snip2code\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"soasta\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/soasta\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"softnas\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/softnas\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"soha\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/soha\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"solanolabs\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/solanolabs\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"solarwinds\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/solarwinds\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sophos\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sophos\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"spacecurve\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/spacecurve\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"spagobi\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/spagobi\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sphere3d\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sphere3d\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"splunk\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/splunk\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"stackato-platform-as-a-service\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/stackato-platform-as-a-service\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"stackstorm\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/stackstorm\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"starwind\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/starwind\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"StatusReport.Diagnostics.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/StatusReport.Diagnostics.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"stealthbits\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/stealthbits\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"steelhive\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/steelhive\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"stonefly\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/stonefly\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"stormshield\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/stormshield\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"storreduce\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/storreduce\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"stratalux\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/stratalux\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"stratus-id\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/stratus-id\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"streamsets\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/streamsets\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"striim\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/striim\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sumologic\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sumologic\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"sunview-software\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/sunview-software\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"SUSE\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/SUSE\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"suse-byos\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/suse-byos\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Symantec\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Symantec.QA\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec.QA\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Symantec.SCWP.Agent.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec.SCWP.Agent.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Symantec.SCWP.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec.SCWP.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Symantec.staging\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec.staging\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Symantec.test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec.test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"symantectest1\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/symantectest1\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"SymantecTest9\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/SymantecTest9\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"SymantecTestLsTestLogonImport\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/SymantecTestLsTestLogonImport\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"SymantecTestLsTestSerdefDat\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/SymantecTestLsTestSerdefDat\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"SymantecTestRU4\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/SymantecTestRU4\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"syncfusion\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/syncfusion\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"syncfusionbigdataplatfor\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/syncfusionbigdataplatfor\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"syncfusiondashboard\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/syncfusiondashboard\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tableau\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tableau\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tactic\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tactic\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"talon\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/talon\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"targit\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/targit\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tavendo\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tavendo\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"techdivision\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/techdivision\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"telepat\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/telepat\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tenable\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tenable\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tentity\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tentity\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"teradata\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/teradata\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Teradici\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Teradici\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Test.Gemalto.SafeNet.ProtectV\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.Gemalto.SafeNet.ProtectV\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Test.HP.AppDefender\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.HP.AppDefender\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Test.Microsoft.VisualStudio.Services\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.Microsoft.VisualStudio.Services\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Test.NJHP.AppDefender\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.NJHP.AppDefender\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Test.TrendMicro.DeepSecurity\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.TrendMicro.DeepSecurity\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Test1.NJHP.AppDefender\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Test1.NJHP.AppDefender\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Test3.Microsoft.VisualStudio.Services\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Test3.Microsoft.VisualStudio.Services\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"thales-vormetric\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/thales-vormetric\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"thinkboxsoftware\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/thinkboxsoftware\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tibco-software\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tibco-software\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tig\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tig\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tokyosystemhouse\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tokyosystemhouse\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"topdesk\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/topdesk\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"torusware\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/torusware\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"townsend-security\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/townsend-security\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"transvault\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/transvault\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"trendmicro\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/trendmicro\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"TrendMicro.DeepSecurity\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/TrendMicro.DeepSecurity\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"TrendMicro.PortalProtect\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/TrendMicro.PortalProtect\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"tsa-public-service\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/tsa-public-service\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"twistlock\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/twistlock\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"typesafe\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/typesafe\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ubeeko\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ubeeko\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ubercloud\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ubercloud\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ulex\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ulex\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"unidesk\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/unidesk\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"unidesk-corp\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/unidesk-corp\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"uniprint-net\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/uniprint-net\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"unisys-azuremp-stealth\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/unisys-azuremp-stealth\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"unitrends\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/unitrends\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"usp\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/usp\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"varnish\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/varnish\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vbot\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vbot\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vecompsoftware\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vecompsoftware\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"veeam\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/veeam\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"velostrata\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/velostrata\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"velostrata-inc\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/velostrata-inc\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"ventify\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/ventify\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"veritas\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/veritas\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"versasec\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/versasec\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vertabelo\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vertabelo\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vidispine\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vidispine\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vidizmo\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vidizmo\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vintegris\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vintegris\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"viptela\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/viptela\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vircom\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vircom\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"virtualworks\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/virtualworks\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"visionware\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/visionware\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vision_solutions\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vision_solutions\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vizixiotplatformretail001\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vizixiotplatformretail001\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vmturbo\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vmturbo\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Vormetric\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Vormetric\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"vte\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/vte\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"WAD2AI.Diagnostics.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/WAD2AI.Diagnostics.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"WAD2EventHub.Diagnostics.Test\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/WAD2EventHub.Diagnostics.Test\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"wallix\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/wallix\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"waratek\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/waratek\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"wardy-it-solutions\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/wardy-it-solutions\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"warewolf-esb\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/warewolf-esb\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"watchfulsoftware\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/watchfulsoftware\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"waves\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/waves\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"websense-apmailpe\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/websense-apmailpe\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"winmagic_securedoc_cloudvm\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/winmagic_securedoc_cloudvm\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"wipro-ltd\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/wipro-ltd\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"wmspanel\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/wmspanel\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"workshare-technology\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/workshare-technology\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"workspot\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/workspot\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"wowza\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/wowza\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"xebialabs\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/xebialabs\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"xfinityinc\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/xfinityinc\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"xmpro\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/xmpro\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"xrm\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/xrm\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"xtremedata\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/xtremedata\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"yellowfin\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/yellowfin\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"your-shop-online\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/your-shop-online\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"zealcorp\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/zealcorp\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"zementis\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/zementis\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"zend\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/zend\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"zerodown_software\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/zerodown_software\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"zerto\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/zerto\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"zoomdata\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/zoomdata\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"zscaler\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/zscaler\"\ + \r\n }\r\n]"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:29:06 GMT'] + Date: ['Wed, 17 May 2017 18:09:19 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/6b6f95ea-6609-417f-ba71-3a9bdc6aafa4?api-version=2017-03-01'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['12330'] + content-length: ['138454'] status: {code: 200, message: OK} - request: body: null @@ -3418,53 +3969,28 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [86e0b330-245c-11e7-bc5f-a0b3ccf7272a] + x-ms-client-request-id: [f07c5278-3b2b-11e7-b19a-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Azure.NetworkWatcher/artifacttypes/vmextension/types?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"2391ed7e-4579-4e07-bde3-ab3889095130\"\ - ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ - \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ - \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ - ,\r\n \"sku\": \"16.04-LTS\",\r\n \"version\": \"latest\"\r\n\ - \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_EF1e9VAb72\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ - \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/disks/osdisk_EF1e9VAb72\"\ - \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ - : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ - ,\r\n \"adminUsername\": \"trpresco\",\r\n \"linuxConfiguration\"\ - : {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\"\ - : {\r\n \"publicKeys\": [\r\n {\r\n \"path\"\ - : \"/home/trpresco/.ssh/authorized_keys\",\r\n \"keyData\": \"\ - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLkUy/BFb7o47gQqFcMiioYD4w3Tu/7bpy7t/3pQVhjmsEEaWk09dA1Ju1UbukKaLpOprch/r9bgUWu1oTEP7E5evwaJl0TvLX0gsxGGItfPc58bbQ77uxuXhMfYEZ6oiS+Ybt5nUjjDUUNhSIrKSLhCHCmQ9JnOd/AObf9G4iR38bsABIAVxmbYT6OQKm4oRwNs1c99B5TsfnREFs7yawCV3hjKVHsD3bRo83bBbBG3d/CHYfcnEbpK4weagw899YodAXDiUh0qYfOy0mGz4zWaQ4rcCitk9od/WSDhLAOy74cqwzKJwoR9DcALxkWVMuJW7xBF9tWEroVvFrh6/N\"\ - \r\n }\r\n ]\r\n }\r\n },\r\n \"secrets\"\ - : []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - }]},\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"resources\"\ - : [\r\n {\r\n \"properties\": {\r\n \"publisher\": \"Microsoft.Azure.NetworkWatcher\"\ - ,\r\n \"type\": \"NetworkWatcherAgentLinux\",\r\n \"typeHandlerVersion\"\ - : \"1.4\",\r\n \"autoUpgradeMinorVersion\": true,\r\n \"provisioningState\"\ - : \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\"\ - ,\r\n \"location\": \"westus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux\"\ - ,\r\n \"name\": \"NetworkWatcherAgentLinux\"\r\n }\r\n ],\r\n \"\ - type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ - ,\r\n \"name\": \"vm1\"\r\n}"} + body: {string: "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"\ + NetworkWatcherAgentLinux\",\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.NetworkWatcher/ArtifactTypes/VMExtension/Types/NetworkWatcherAgentLinux\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"NetworkWatcherAgentWindows\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.NetworkWatcher/ArtifactTypes/VMExtension/Types/NetworkWatcherAgentWindows\"\ + \r\n }\r\n]"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:29:07 GMT'] + Date: ['Wed, 17 May 2017 18:09:20 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['2729'] + content-length: ['583'] status: {code: 200, message: OK} - request: body: null @@ -3474,58 +4000,65 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [87004d92-245c-11e7-8d77-a0b3ccf7272a] + x-ms-client-request-id: [f0957dba-3b2b-11e7-bcba-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Azure.NetworkWatcher/artifacttypes/vmextension/types/NetworkWatcherAgentLinux/versions?api-version=2016-04-30-preview response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"ac5bb09d-df32-4c3d-b829-f6a40596a666\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"\ + 1.4.13.0\",\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.NetworkWatcher/ArtifactTypes/VMExtension/Types/NetworkWatcherAgentLinux/Versions/1.4.13.0\"\ + \r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"1.4.20.0\"\ + ,\r\n \"id\": \"/Subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.NetworkWatcher/ArtifactTypes/VMExtension/Types/NetworkWatcherAgentLinux/Versions/1.4.20.0\"\ + \r\n }\r\n]"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:29:07 GMT'] + Date: ['Wed, 17 May 2017 18:09:20 GMT'] Expires: ['-1'] Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [b5c5410a-2523-44bd-84de-a062f2a2bb77, 61a50158-0c33-434d-8122-e75121117fa7] + content-length: ['583'] status: {code: 200, message: OK} - request: - body: '{"destinationIPAddress": "10.0.0.6", "sourceIPAddress": "123.4.5.6", "targetResourceId": - "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1"}' + body: '{"location": "westus", "properties": {"typeHandlerVersion": "1.4", "publisher": + "Microsoft.Azure.NetworkWatcher", "autoUpgradeMinorVersion": true, "type": "NetworkWatcherAgentLinux"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['237'] + Content-Length: ['183'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [87369770-245c-11e7-8884-a0b3ccf7272a] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/nextHop?api-version=2017-03-01 + x-ms-client-request-id: [f0c8654a-3b2b-11e7-98c9-a0b3ccf7272a] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"nextHopType\": \"VnetLocal\",\r\n \"routeTableId\":\ - \ \"System Route\"\r\n}"} + body: {string: "{\r\n \"properties\": {\r\n \"publisher\": \"Microsoft.Azure.NetworkWatcher\"\ + ,\r\n \"type\": \"NetworkWatcherAgentLinux\",\r\n \"typeHandlerVersion\"\ + : \"1.4\",\r\n \"autoUpgradeMinorVersion\": true,\r\n \"provisioningState\"\ + : \"Creating\"\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\"\ + ,\r\n \"location\": \"westus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux\"\ + ,\r\n \"name\": \"NetworkWatcherAgentLinux\"\r\n}"} headers: + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Compute/locations/westus/operations/cc0813b6-7728-44f2-9202-3ae151a2904a?api-version=2016-04-30-preview'] Cache-Control: [no-cache] + Content-Length: ['547'] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:29:19 GMT'] + Date: ['Wed, 17 May 2017 18:09:21 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/9ea774a5-1363-4f55-9093-28bf65b14af1?api-version=2017-03-01'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['69'] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - status: {code: 200, message: OK} + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} - request: body: null headers: @@ -3534,27 +4067,27 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [87369770-245c-11e7-8884-a0b3ccf7272a] + x-ms-client-request-id: [f0c8654a-3b2b-11e7-98c9-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/9ea774a5-1363-4f55-9093-28bf65b14af1?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/cc0813b6-7728-44f2-9202-3ae151a2904a?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"nextHopType\": \"VnetLocal\",\r\n \"routeTableId\":\ - \ \"System Route\"\r\n}"} + body: {string: "{\r\n \"startTime\": \"2017-05-17T18:09:22.2471024+00:00\",\r\ + \n \"status\": \"InProgress\",\r\n \"name\": \"cc0813b6-7728-44f2-9202-3ae151a2904a\"\ + \r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:29:49 GMT'] + Date: ['Wed, 17 May 2017 18:09:51 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/9ea774a5-1363-4f55-9093-28bf65b14af1?api-version=2017-03-01'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['69'] + content-length: ['134'] status: {code: 200, message: OK} - request: body: null @@ -3565,53 +4098,26 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [a0eb6628-245c-11e7-bbef-a0b3ccf7272a] + x-ms-client-request-id: [f0c8654a-3b2b-11e7-98c9-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/cc0813b6-7728-44f2-9202-3ae151a2904a?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"2391ed7e-4579-4e07-bde3-ab3889095130\"\ - ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ - \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ - \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ - ,\r\n \"sku\": \"16.04-LTS\",\r\n \"version\": \"latest\"\r\n\ - \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_EF1e9VAb72\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ - \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/disks/osdisk_EF1e9VAb72\"\ - \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ - : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ - ,\r\n \"adminUsername\": \"trpresco\",\r\n \"linuxConfiguration\"\ - : {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\"\ - : {\r\n \"publicKeys\": [\r\n {\r\n \"path\"\ - : \"/home/trpresco/.ssh/authorized_keys\",\r\n \"keyData\": \"\ - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLkUy/BFb7o47gQqFcMiioYD4w3Tu/7bpy7t/3pQVhjmsEEaWk09dA1Ju1UbukKaLpOprch/r9bgUWu1oTEP7E5evwaJl0TvLX0gsxGGItfPc58bbQ77uxuXhMfYEZ6oiS+Ybt5nUjjDUUNhSIrKSLhCHCmQ9JnOd/AObf9G4iR38bsABIAVxmbYT6OQKm4oRwNs1c99B5TsfnREFs7yawCV3hjKVHsD3bRo83bBbBG3d/CHYfcnEbpK4weagw899YodAXDiUh0qYfOy0mGz4zWaQ4rcCitk9od/WSDhLAOy74cqwzKJwoR9DcALxkWVMuJW7xBF9tWEroVvFrh6/N\"\ - \r\n }\r\n ]\r\n }\r\n },\r\n \"secrets\"\ - : []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - }]},\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"resources\"\ - : [\r\n {\r\n \"properties\": {\r\n \"publisher\": \"Microsoft.Azure.NetworkWatcher\"\ - ,\r\n \"type\": \"NetworkWatcherAgentLinux\",\r\n \"typeHandlerVersion\"\ - : \"1.4\",\r\n \"autoUpgradeMinorVersion\": true,\r\n \"provisioningState\"\ - : \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\"\ - ,\r\n \"location\": \"westus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux\"\ - ,\r\n \"name\": \"NetworkWatcherAgentLinux\"\r\n }\r\n ],\r\n \"\ - type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ - ,\r\n \"name\": \"vm1\"\r\n}"} + body: {string: "{\r\n \"startTime\": \"2017-05-17T18:09:22.2471024+00:00\",\r\ + \n \"endTime\": \"2017-05-17T18:10:06.3266153+00:00\",\r\n \"status\": \"\ + Succeeded\",\r\n \"name\": \"cc0813b6-7728-44f2-9202-3ae151a2904a\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:29:50 GMT'] + Date: ['Wed, 17 May 2017 18:10:22 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['2729'] + content-length: ['184'] status: {code: 200, message: OK} - request: body: null @@ -3621,24 +4127,30 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [a108d79e-245c-11e7-bd24-a0b3ccf7272a] + x-ms-client-request-id: [f0c8654a-3b2b-11e7-98c9-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux?api-version=2016-04-30-preview response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"b86608a6-2af4-4b94-a56c-2dddda76b4f0\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: "{\r\n \"properties\": {\r\n \"publisher\": \"Microsoft.Azure.NetworkWatcher\"\ + ,\r\n \"type\": \"NetworkWatcherAgentLinux\",\r\n \"typeHandlerVersion\"\ + : \"1.4\",\r\n \"autoUpgradeMinorVersion\": true,\r\n \"provisioningState\"\ + : \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\"\ + ,\r\n \"location\": \"westus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux\"\ + ,\r\n \"name\": \"NetworkWatcherAgentLinux\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:29:51 GMT'] + Date: ['Wed, 17 May 2017 18:10:21 GMT'] Expires: ['-1'] Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [0ec0a9a1-5f0d-44f4-8d02-78b4cfb67775, 94eaee93-efbd-428b-8716-14aa01dbb0ea] + content-length: ['548'] status: {code: 200, message: OK} - request: body: null @@ -3648,54 +4160,23 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [a14b3628-245c-11e7-9cf0-a0b3ccf7272a] + x-ms-client-request-id: [15b6226e-3b2c-11e7-953e-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2016-04-30-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_network_watcher?api-version=2017-05-10 response: - body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"2391ed7e-4579-4e07-bde3-ab3889095130\"\ - ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ - \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ - \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ - ,\r\n \"sku\": \"16.04-LTS\",\r\n \"version\": \"latest\"\r\n\ - \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ - \ \"name\": \"osdisk_EF1e9VAb72\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ - \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/disks/osdisk_EF1e9VAb72\"\ - \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ - : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ - ,\r\n \"adminUsername\": \"trpresco\",\r\n \"linuxConfiguration\"\ - : {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\"\ - : {\r\n \"publicKeys\": [\r\n {\r\n \"path\"\ - : \"/home/trpresco/.ssh/authorized_keys\",\r\n \"keyData\": \"\ - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLkUy/BFb7o47gQqFcMiioYD4w3Tu/7bpy7t/3pQVhjmsEEaWk09dA1Ju1UbukKaLpOprch/r9bgUWu1oTEP7E5evwaJl0TvLX0gsxGGItfPc58bbQ77uxuXhMfYEZ6oiS+Ybt5nUjjDUUNhSIrKSLhCHCmQ9JnOd/AObf9G4iR38bsABIAVxmbYT6OQKm4oRwNs1c99B5TsfnREFs7yawCV3hjKVHsD3bRo83bBbBG3d/CHYfcnEbpK4weagw899YodAXDiUh0qYfOy0mGz4zWaQ4rcCitk9od/WSDhLAOy74cqwzKJwoR9DcALxkWVMuJW7xBF9tWEroVvFrh6/N\"\ - \r\n }\r\n ]\r\n }\r\n },\r\n \"secrets\"\ - : []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - }]},\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"resources\"\ - : [\r\n {\r\n \"properties\": {\r\n \"publisher\": \"Microsoft.Azure.NetworkWatcher\"\ - ,\r\n \"type\": \"NetworkWatcherAgentLinux\",\r\n \"typeHandlerVersion\"\ - : \"1.4\",\r\n \"autoUpgradeMinorVersion\": true,\r\n \"provisioningState\"\ - : \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\"\ - ,\r\n \"location\": \"westus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux\"\ - ,\r\n \"name\": \"NetworkWatcherAgentLinux\"\r\n }\r\n ],\r\n \"\ - type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ - ,\r\n \"name\": \"vm1\"\r\n}"} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher","name":"cli_test_network_watcher","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:29:51 GMT'] + Date: ['Wed, 17 May 2017 18:10:22 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['2729'] + content-length: ['238'] status: {code: 200, message: OK} - request: body: null @@ -3705,91 +4186,104 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [a163bb7e-245c-11e7-a1a8-a0b3ccf7272a] + x-ms-client-request-id: [15cab324-3b2c-11e7-b80e-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"b86608a6-2af4-4b94-a56c-2dddda76b4f0\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"westus-watcher\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher\"\ + ,\r\n \"etag\": \"W/\\\"14cf38ce-15b8-4743-bdc5-cc262339035c\\\"\",\r\ + \n \"type\": \"Microsoft.Network/networkWatchers\",\r\n \"location\"\ + : \"westus\",\r\n \"tags\": {\r\n \"foo\": \"doo\"\r\n },\r\ + \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"runningOperationIds\": []\r\n }\r\n }\r\n ]\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:29:52 GMT'] + Date: ['Wed, 17 May 2017 18:10:23 GMT'] Expires: ['-1'] Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [4e332321-ea41-4c2a-9743-0d9981f584ec, b1ef39b3-118e-4924-8066-eeaef4adcb97] + content-length: ['520'] status: {code: 200, message: OK} - request: - body: '{"properties": {"target": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1", - "storageLocation": {"filePath": "capture\\capture.cap"}}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['232'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] - accept-language: [en-US] - x-ms-client-request-id: [a1a9e63a-245c-11e7-9d79-a0b3ccf7272a] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/packetCaptures/capture1?api-version=2017-03-01 - response: - body: {string: "{\r\n \"name\": \"capture1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/packetCaptures/capture1\"\ - ,\r\n \"etag\": \"W/\\\"1f7a5dd5-382d-4430-9651-78b3d6655ca6\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ - target\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ - ,\r\n \"bytesToCapturePerPacket\": 0,\r\n \"totalBytesPerSession\":\ - \ 1073741824,\r\n \"timeLimitInSeconds\": 18000,\r\n \"storageLocation\"\ - : {\r\n \"storagePath\": \"\",\r\n \"filePath\": \"capture\\\\capture.cap\"\ - \r\n },\r\n \"filters\": []\r\n }\r\n}"} - headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/5a500e01-072b-4e1f-8b30-2a54ca20e902?api-version=2017-03-01'] - Cache-Control: [no-cache] - Content-Length: ['710'] - Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:29:52 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Retry-After: ['10'] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - status: {code: 201, message: Created} -- request: - body: null + body: '{"targetResourceGroupName": "cli_test_network_watcher"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] + Content-Length: ['61'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [a1a9e63a-245c-11e7-9d79-a0b3ccf7272a] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5a500e01-072b-4e1f-8b30-2a54ca20e902?api-version=2017-03-01 + x-ms-client-request-id: [15faf62e-3b2c-11e7-ac07-a0b3ccf7272a] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher/topology?api-version=2017-03-01 response: - body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} + body: {string: "{\r\n \"id\": \"8343a696-3ca0-43b8-816d-5eafa286a47b\",\r\n \ + \ \"createdDateTime\": \"2017-05-17T18:10:24.380616Z\",\r\n \"lastModified\"\ + : \"2017-05-17T18:09:42.0696256Z\",\r\n \"resources\": [\r\n {\r\n \ + \ \"name\": \"vm1VNET\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET\"\ + ,\r\n \"location\": \"westus\",\r\n \"associations\": [\r\n \ + \ {\r\n \"name\": \"vm1Subnet\",\r\n \"resourceId\":\ + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\ + ,\r\n \"associationType\": \"Contains\"\r\n }\r\n ]\r\ + \n },\r\n {\r\n \"name\": \"vm1Subnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\ + ,\r\n \"location\": \"westus\",\r\n \"associations\": []\r\n \ + \ },\r\n {\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ + ,\r\n \"location\": \"westus\",\r\n \"associations\": [\r\n \ + \ {\r\n \"name\": \"vm1VMNic\",\r\n \"resourceId\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + ,\r\n \"associationType\": \"Contains\"\r\n }\r\n ]\r\ + \n },\r\n {\r\n \"name\": \"vm1VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + ,\r\n \"location\": \"westus\",\r\n \"associations\": [\r\n \ + \ {\r\n \"name\": \"vm1\",\r\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ + ,\r\n \"associationType\": \"Associated\"\r\n },\r\n \ + \ {\r\n \"name\": \"vm1NSG\",\r\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ + ,\r\n \"associationType\": \"Associated\"\r\n },\r\n \ + \ {\r\n \"name\": \"vm1Subnet\",\r\n \"resourceId\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\ + ,\r\n \"associationType\": \"Associated\"\r\n },\r\n \ + \ {\r\n \"name\": \"vm1PublicIP\",\r\n \"resourceId\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\ + ,\r\n \"associationType\": \"Associated\"\r\n }\r\n ]\r\ + \n },\r\n {\r\n \"name\": \"vm1NSG\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ + ,\r\n \"location\": \"westus\",\r\n \"associations\": [\r\n \ + \ {\r\n \"name\": \"default-allow-ssh\",\r\n \"resourceId\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/default-allow-ssh\"\ + ,\r\n \"associationType\": \"Contains\"\r\n }\r\n ]\r\ + \n },\r\n {\r\n \"name\": \"default-allow-ssh\",\r\n \"id\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/default-allow-ssh\"\ + ,\r\n \"location\": \"westus\",\r\n \"associations\": []\r\n \ + \ },\r\n {\r\n \"name\": \"vm1PublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\ + ,\r\n \"location\": \"westus\",\r\n \"associations\": [\r\n \ + \ {\r\n \"name\": \"vm1VMNic\",\r\n \"resourceId\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + ,\r\n \"associationType\": \"Associated\"\r\n }\r\n ]\r\ + \n }\r\n ]\r\n}"} headers: + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/92d07cbf-171c-43b1-9b5d-11da558cc1e1?api-version=2017-03-01'] Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:03 GMT'] + Date: ['Wed, 17 May 2017 18:10:23 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/92d07cbf-171c-43b1-9b5d-11da558cc1e1?api-version=2017-03-01'] Pragma: [no-cache] Retry-After: ['10'] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['30'] + content-length: ['4412'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: body: null @@ -3799,25 +4293,50 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [a1a9e63a-245c-11e7-9d79-a0b3ccf7272a] + x-ms-client-request-id: [162f6efa-3b2c-11e7-ba66-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5a500e01-072b-4e1f-8b30-2a54ca20e902?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"b7933411-7b6c-4d69-bf8b-ed176c5749fb\"\ + ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ + \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ + \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ + ,\r\n \"sku\": \"16.04-LTS\",\r\n \"version\": \"latest\"\r\n\ + \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ + \ \"name\": \"osdisk_zsw3gJW0hI\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ + \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/disks/osdisk_zsw3gJW0hI\"\ + \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ + : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ + ,\r\n \"adminUsername\": \"deploy\",\r\n \"linuxConfiguration\"\ + : {\r\n \"disablePasswordAuthentication\": false\r\n },\r\n \ + \ \"secrets\": []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\"\ + :[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + }]},\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"resources\"\ + : [\r\n {\r\n \"properties\": {\r\n \"publisher\": \"Microsoft.Azure.NetworkWatcher\"\ + ,\r\n \"type\": \"NetworkWatcherAgentLinux\",\r\n \"typeHandlerVersion\"\ + : \"1.4\",\r\n \"autoUpgradeMinorVersion\": true,\r\n \"provisioningState\"\ + : \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\"\ + ,\r\n \"location\": \"westus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux\"\ + ,\r\n \"name\": \"NetworkWatcherAgentLinux\"\r\n }\r\n ],\r\n \"\ + type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\"\ + ,\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ + ,\r\n \"name\": \"vm1\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:13 GMT'] + Date: ['Wed, 17 May 2017 18:10:23 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['29'] + content-length: ['2157'] status: {code: 200, message: OK} - request: body: null @@ -3827,60 +4346,65 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [a1a9e63a-245c-11e7-9d79-a0b3ccf7272a] + x-ms-client-request-id: [16559192-3b2c-11e7-adf3-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/packetCaptures/capture1?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 response: - body: {string: "{\r\n \"name\": \"capture1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/packetCaptures/capture1\"\ - ,\r\n \"etag\": \"W/\\\"2a8de57f-96e4-4e5c-b636-c16f30424248\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - target\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ - ,\r\n \"bytesToCapturePerPacket\": 0,\r\n \"totalBytesPerSession\":\ - \ 1073741824,\r\n \"timeLimitInSeconds\": 18000,\r\n \"storageLocation\"\ - : {\r\n \"storagePath\": \"\",\r\n \"filePath\": \"capture\\\\capture.cap\"\ - \r\n },\r\n \"filters\": []\r\n }\r\n}"} + body: {string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"westus-watcher\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher\"\ + ,\r\n \"etag\": \"W/\\\"14cf38ce-15b8-4743-bdc5-cc262339035c\\\"\",\r\ + \n \"type\": \"Microsoft.Network/networkWatchers\",\r\n \"location\"\ + : \"westus\",\r\n \"tags\": {\r\n \"foo\": \"doo\"\r\n },\r\ + \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"runningOperationIds\": []\r\n }\r\n }\r\n ]\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:13 GMT'] - ETag: [W/"2a8de57f-96e4-4e5c-b636-c16f30424248"] + Date: ['Wed, 17 May 2017 18:10:24 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['711'] + content-length: ['520'] status: {code: 200, message: OK} - request: - body: null + body: '{"localPort": "22", "remoteIPAddress": "100.1.2.3", "remotePort": "*", + "localIPAddress": "10.0.0.4", "protocol": "TCP", "targetResourceId": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1", + "direction": "Inbound"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] + Content-Length: ['312'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [aed028c8-245c-11e7-a7e7-a0b3ccf7272a] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 + x-ms-client-request-id: [167b3f9e-3b2c-11e7-881f-a0b3ccf7272a] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher/ipFlowVerify?api-version=2017-03-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"2a8de57f-96e4-4e5c-b636-c16f30424248\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: "{\r\n \"access\": \"Allow\",\r\n \"ruleName\": \"securityRules/default-allow-ssh\"\ + \r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:14 GMT'] + Date: ['Wed, 17 May 2017 18:10:31 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/8cb5d2f8-154b-41be-abed-7c1f8e74f5be?api-version=2017-03-01'] Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [5bdd8776-4777-44ef-a445-4759c56502c8, dde95a53-d58d-4076-8b1f-36026c929107] + content-length: ['75'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -3890,33 +4414,27 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [af163a40-245c-11e7-936a-a0b3ccf7272a] + x-ms-client-request-id: [167b3f9e-3b2c-11e7-881f-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/packetCaptures/capture1?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/8cb5d2f8-154b-41be-abed-7c1f8e74f5be?api-version=2017-03-01 response: - body: {string: "{\r\n \"name\": \"capture1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/packetCaptures/capture1\"\ - ,\r\n \"etag\": \"W/\\\"2a8de57f-96e4-4e5c-b636-c16f30424248\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - target\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ - ,\r\n \"bytesToCapturePerPacket\": 0,\r\n \"totalBytesPerSession\":\ - \ 1073741824,\r\n \"timeLimitInSeconds\": 18000,\r\n \"storageLocation\"\ - : {\r\n \"storagePath\": \"\",\r\n \"filePath\": \"capture\\\\capture.cap\"\ - \r\n },\r\n \"filters\": []\r\n }\r\n}"} + body: {string: "{\r\n \"access\": \"Allow\",\r\n \"ruleName\": \"securityRules/default-allow-ssh\"\ + \r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:14 GMT'] - ETag: [W/"2a8de57f-96e4-4e5c-b636-c16f30424248"] + Date: ['Wed, 17 May 2017 18:11:02 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/8cb5d2f8-154b-41be-abed-7c1f8e74f5be?api-version=2017-03-01'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['711'] + content-length: ['75'] status: {code: 200, message: OK} - request: body: null @@ -3926,24 +4444,50 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [af4c31f8-245c-11e7-907a-a0b3ccf7272a] + x-ms-client-request-id: [2db6954a-3b2c-11e7-a4d4-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2016-04-30-preview response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"2a8de57f-96e4-4e5c-b636-c16f30424248\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"b7933411-7b6c-4d69-bf8b-ed176c5749fb\"\ + ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ + \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ + \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ + ,\r\n \"sku\": \"16.04-LTS\",\r\n \"version\": \"latest\"\r\n\ + \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ + \ \"name\": \"osdisk_zsw3gJW0hI\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ + \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/disks/osdisk_zsw3gJW0hI\"\ + \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ + : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ + ,\r\n \"adminUsername\": \"deploy\",\r\n \"linuxConfiguration\"\ + : {\r\n \"disablePasswordAuthentication\": false\r\n },\r\n \ + \ \"secrets\": []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\"\ + :[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + }]},\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"resources\"\ + : [\r\n {\r\n \"properties\": {\r\n \"publisher\": \"Microsoft.Azure.NetworkWatcher\"\ + ,\r\n \"type\": \"NetworkWatcherAgentLinux\",\r\n \"typeHandlerVersion\"\ + : \"1.4\",\r\n \"autoUpgradeMinorVersion\": true,\r\n \"provisioningState\"\ + : \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\"\ + ,\r\n \"location\": \"westus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux\"\ + ,\r\n \"name\": \"NetworkWatcherAgentLinux\"\r\n }\r\n ],\r\n \"\ + type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\"\ + ,\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ + ,\r\n \"name\": \"vm1\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:15 GMT'] + Date: ['Wed, 17 May 2017 18:11:02 GMT'] Expires: ['-1'] Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [dae5b4b7-dfaa-4a9b-b8a3-e03643cfa1e3, bee2ad7d-2fc8-42ab-8ad7-6ffee9efdcb8] + content-length: ['2157'] status: {code: 200, message: OK} - request: body: null @@ -3951,57 +4495,67 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [af95b2d0-245c-11e7-b0e9-a0b3ccf7272a] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/packetCaptures/capture1/stop?api-version=2017-03-01 + x-ms-client-request-id: [2dd0f0b4-3b2c-11e7-9be3-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 response: - body: {string: ''} + body: {string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"westus-watcher\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher\"\ + ,\r\n \"etag\": \"W/\\\"f024d3fb-9f90-413a-a43c-11ce6edb1827\\\"\",\r\ + \n \"type\": \"Microsoft.Network/networkWatchers\",\r\n \"location\"\ + : \"westus\",\r\n \"tags\": {\r\n \"foo\": \"doo\"\r\n },\r\ + \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"runningOperationIds\": []\r\n }\r\n }\r\n ]\r\n}"} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/cf2cda71-f753-4191-9b32-b0fad0627ee9?api-version=2017-03-01'] Cache-Control: [no-cache] - Content-Length: ['0'] - Date: ['Tue, 18 Apr 2017 17:30:15 GMT'] + Content-Type: [application/json; charset=utf-8] + Date: ['Wed, 17 May 2017 18:11:02 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/cf2cda71-f753-4191-9b32-b0fad0627ee9?api-version=2017-03-01'] Pragma: [no-cache] - Retry-After: ['10'] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - status: {code: 202, message: Accepted} + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['520'] + status: {code: 200, message: OK} - request: - body: null + body: '{"localPort": "*", "remoteIPAddress": "100.1.2.3", "remotePort": "80", + "localIPAddress": "10.0.0.4", "protocol": "TCP", "targetResourceId": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1", + "direction": "Outbound"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] + Content-Length: ['313'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [af95b2d0-245c-11e7-b0e9-a0b3ccf7272a] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cf2cda71-f753-4191-9b32-b0fad0627ee9?api-version=2017-03-01 + x-ms-client-request-id: [2dfbc750-3b2c-11e7-be61-a0b3ccf7272a] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher/ipFlowVerify?api-version=2017-03-01 response: - body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} + body: {string: "{\r\n \"access\": \"Allow\",\r\n \"ruleName\": \"defaultSecurityRules/AllowInternetOutBound\"\ + \r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:25 GMT'] + Date: ['Wed, 17 May 2017 18:11:09 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/672ffbc1-9a68-4248-bee9-798fc2d685af?api-version=2017-03-01'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['29'] + content-length: ['86'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -4011,24 +4565,27 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b62d0428-245c-11e7-b96f-a0b3ccf7272a] + x-ms-client-request-id: [2dfbc750-3b2c-11e7-be61-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/672ffbc1-9a68-4248-bee9-798fc2d685af?api-version=2017-03-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"33072e8b-debd-41fe-8be6-baea52110c63\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: "{\r\n \"access\": \"Allow\",\r\n \"ruleName\": \"defaultSecurityRules/AllowInternetOutBound\"\ + \r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:27 GMT'] + Date: ['Wed, 17 May 2017 18:11:40 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/672ffbc1-9a68-4248-bee9-798fc2d685af?api-version=2017-03-01'] Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [35e28cbb-00e6-421d-b9d0-c7bf3a04ee0e, 24855f90-fdce-4659-9ff8-4f861dcdae2c] + content-length: ['86'] status: {code: 200, message: OK} - request: body: null @@ -4036,32 +4593,52 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b67030b4-245c-11e7-ab98-a0b3ccf7272a] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/packetCaptures/capture1/queryStatus?api-version=2017-03-01 + x-ms-client-request-id: [4406cf68-3b2c-11e7-a8ee-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2016-04-30-preview response: - body: {string: "{\r\n \"name\": \"capture1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/packetCaptures/capture1\"\ - ,\r\n \"captureStartTime\": \"2017-04-18T17:30:05.0528196Z\",\r\n \"packetCaptureStatus\"\ - : \"Stopped\",\r\n \"stopReason\": \"Manual\",\r\n \"packetCaptureError\"\ - : []\r\n}"} + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"b7933411-7b6c-4d69-bf8b-ed176c5749fb\"\ + ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ + \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ + \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ + ,\r\n \"sku\": \"16.04-LTS\",\r\n \"version\": \"latest\"\r\n\ + \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ + \ \"name\": \"osdisk_zsw3gJW0hI\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ + \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/disks/osdisk_zsw3gJW0hI\"\ + \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ + : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ + ,\r\n \"adminUsername\": \"deploy\",\r\n \"linuxConfiguration\"\ + : {\r\n \"disablePasswordAuthentication\": false\r\n },\r\n \ + \ \"secrets\": []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\"\ + :[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + }]},\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"resources\"\ + : [\r\n {\r\n \"properties\": {\r\n \"publisher\": \"Microsoft.Azure.NetworkWatcher\"\ + ,\r\n \"type\": \"NetworkWatcherAgentLinux\",\r\n \"typeHandlerVersion\"\ + : \"1.4\",\r\n \"autoUpgradeMinorVersion\": true,\r\n \"provisioningState\"\ + : \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\"\ + ,\r\n \"location\": \"westus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux\"\ + ,\r\n \"name\": \"NetworkWatcherAgentLinux\"\r\n }\r\n ],\r\n \"\ + type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\"\ + ,\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ + ,\r\n \"name\": \"vm1\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:27 GMT'] + Date: ['Wed, 17 May 2017 18:11:40 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['343'] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + content-length: ['2157'] status: {code: 200, message: OK} - request: body: null @@ -4071,61 +4648,233 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b711fb7e-245c-11e7-a359-a0b3ccf7272a] + x-ms-client-request-id: [442f3cfe-3b2c-11e7-987b-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"33072e8b-debd-41fe-8be6-baea52110c63\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"westus-watcher\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher\"\ + ,\r\n \"etag\": \"W/\\\"1ffa87f0-9a7b-4a70-abf7-ff7a6659af5d\\\"\",\r\ + \n \"type\": \"Microsoft.Network/networkWatchers\",\r\n \"location\"\ + : \"westus\",\r\n \"tags\": {\r\n \"foo\": \"doo\"\r\n },\r\ + \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"runningOperationIds\": []\r\n }\r\n }\r\n ]\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:28 GMT'] + Date: ['Wed, 17 May 2017 18:11:41 GMT'] Expires: ['-1'] Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [10b20e98-228c-4a88-a9ae-e6e96a6364a8, e69f43f7-cb1e-4401-ab67-3b57c28fde47] + content-length: ['520'] status: {code: 200, message: OK} - request: - body: null + body: '{"targetResourceId": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] + Content-Length: ['169'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b755aa78-245c-11e7-afae-a0b3ccf7272a] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/packetCaptures?api-version=2017-03-01 + x-ms-client-request-id: [446397a2-3b2c-11e7-b11d-a0b3ccf7272a] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher/securityGroupView?api-version=2017-03-01 response: - body: {string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"capture1\",\r\ - \n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/packetCaptures/capture1\"\ - ,\r\n \"etag\": \"W/\\\"33072e8b-debd-41fe-8be6-baea52110c63\\\"\",\r\ - \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"target\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ - ,\r\n \"bytesToCapturePerPacket\": 0,\r\n \"totalBytesPerSession\"\ - : 1073741824,\r\n \"timeLimitInSeconds\": 18000,\r\n \"storageLocation\"\ - : {\r\n \"storagePath\": \"\",\r\n \"filePath\": \"capture\\\ - \\capture.cap\"\r\n },\r\n \"filters\": []\r\n }\r\n \ - \ }\r\n ]\r\n}"} + body: {string: "{\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + ,\r\n \"securityRuleAssociations\": {\r\n \"networkInterfaceAssociation\"\ + : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + ,\r\n \"securityRules\": [\r\n {\r\n \"name\"\ + : \"default-allow-ssh\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/default-allow-ssh\"\ + ,\r\n \"etag\": \"W/\\\"510099fc-4ac7-42ba-954f-6cc3e3c90cad\\\ + \"\",\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"protocol\": \"Tcp\",\r\n \ + \ \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ + : \"22\",\r\n \"sourceAddressPrefix\": \"*\",\r\n \ + \ \"destinationAddressPrefix\": \"*\",\r\n \"access\"\ + : \"Allow\",\r\n \"priority\": 1000,\r\n \"\ + direction\": \"Inbound\"\r\n }\r\n }\r\n \ + \ ]\r\n },\r\n \"defaultSecurityRules\": [\r\n {\r\n\ + \ \"name\": \"AllowVnetInBound\",\r\n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"description\": \"Allow inbound traffic\ + \ from all VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \ + \ \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ + : \"*\",\r\n \"sourceAddressPrefix\": \"VirtualNetwork\",\r\n\ + \ \"destinationAddressPrefix\": \"VirtualNetwork\",\r\n \ + \ \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ + \ \"direction\": \"Inbound\"\r\n }\r\n },\r\ + \n {\r\n \"name\": \"AllowAzureLoadBalancerInBound\",\r\ + \n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"description\": \"Allow inbound traffic\ + \ from azure load balancer\",\r\n \"protocol\": \"*\",\r\n \ + \ \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ + : \"*\",\r\n \"sourceAddressPrefix\": \"AzureLoadBalancer\",\r\ + \n \"destinationAddressPrefix\": \"*\",\r\n \"access\"\ + : \"Allow\",\r\n \"priority\": 65001,\r\n \"direction\"\ + : \"Inbound\"\r\n }\r\n },\r\n {\r\n \ + \ \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"description\": \"Deny all inbound traffic\"\ + ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ + : \"*\",\r\n \"destinationPortRange\": \"*\",\r\n \ + \ \"sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ + : \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ + : 65500,\r\n \"direction\": \"Inbound\"\r\n }\r\n\ + \ },\r\n {\r\n \"name\": \"AllowVnetOutBound\"\ + ,\r\n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"description\": \"Allow outbound traffic\ + \ from all VMs to all VMs in VNET\",\r\n \"protocol\": \"*\"\ + ,\r\n \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ + : \"*\",\r\n \"sourceAddressPrefix\": \"VirtualNetwork\",\r\n\ + \ \"destinationAddressPrefix\": \"VirtualNetwork\",\r\n \ + \ \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ + \ \"direction\": \"Outbound\"\r\n }\r\n },\r\ + \n {\r\n \"name\": \"AllowInternetOutBound\",\r\n \ + \ \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"description\": \"Allow outbound traffic\ + \ from all VMs to Internet\",\r\n \"protocol\": \"*\",\r\n \ + \ \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ + : \"*\",\r\n \"sourceAddressPrefix\": \"*\",\r\n \ + \ \"destinationAddressPrefix\": \"Internet\",\r\n \"access\"\ + : \"Allow\",\r\n \"priority\": 65001,\r\n \"direction\"\ + : \"Outbound\"\r\n }\r\n },\r\n {\r\n \ + \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"description\": \"Deny all outbound traffic\"\ + ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ + : \"*\",\r\n \"destinationPortRange\": \"*\",\r\n \ + \ \"sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ + : \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ + : 65500,\r\n \"direction\": \"Outbound\"\r\n }\r\n\ + \ }\r\n ],\r\n \"effectiveSecurityRules\": [\r\n \ + \ {\r\n \"name\": \"DefaultOutboundDenyAll\",\r\n \ + \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"0-65535\"\ + ,\r\n \"destinationPortRange\": \"0-65535\",\r\n \"\ + sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ + : \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ + : 65500,\r\n \"direction\": \"Outbound\"\r\n },\r\n \ + \ {\r\n \"name\": \"DefaultRule_AllowVnetOutBound\",\r\n\ + \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"\ + 0-65535\",\r\n \"destinationPortRange\": \"0-65535\",\r\n \ + \ \"sourceAddressPrefix\": \"VirtualNetwork\",\r\n \"expandedSourceAddressPrefix\"\ + : [\r\n \"10.0.0.0/16\",\r\n \"168.63.129.16/32\"\ + \r\n ],\r\n \"destinationAddressPrefix\": \"VirtualNetwork\"\ + ,\r\n \"expandedDestinationAddressPrefix\": [\r\n \ + \ \"10.0.0.0/16\",\r\n \"168.63.129.16/32\"\r\n ],\r\ + \n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\ + \n \"direction\": \"Outbound\"\r\n },\r\n {\r\ + \n \"name\": \"DefaultRule_AllowInternetOutBound\",\r\n \ + \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"0-65535\"\ + ,\r\n \"destinationPortRange\": \"0-65535\",\r\n \"\ + sourceAddressPrefix\": \"0.0.0.0/0\",\r\n \"destinationAddressPrefix\"\ + : \"Internet\",\r\n \"expandedDestinationAddressPrefix\": [\r\n\ + \ \"32.0.0.0/3\",\r\n \"4.0.0.0/6\",\r\n \ + \ \"2.0.0.0/7\",\r\n \"1.0.0.0/8\",\r\n \"\ + 12.0.0.0/6\",\r\n \"8.0.0.0/7\",\r\n \"11.0.0.0/8\"\ + ,\r\n \"64.0.0.0/3\",\r\n \"112.0.0.0/5\",\r\n \ + \ \"120.0.0.0/6\",\r\n \"124.0.0.0/7\",\r\n \ + \ \"126.0.0.0/8\",\r\n \"128.0.0.0/3\",\r\n \ + \ \"176.0.0.0/4\",\r\n \"160.0.0.0/5\",\r\n \ + \ \"170.0.0.0/7\",\r\n \"168.0.0.0/8\",\r\n \"169.0.0.0/9\"\ + ,\r\n \"169.128.0.0/10\",\r\n \"169.192.0.0/11\"\ + ,\r\n \"169.224.0.0/12\",\r\n \"169.240.0.0/13\"\ + ,\r\n \"169.248.0.0/14\",\r\n \"169.252.0.0/15\"\ + ,\r\n \"169.255.0.0/16\",\r\n \"174.0.0.0/7\",\r\ + \n \"173.0.0.0/8\",\r\n \"172.128.0.0/9\",\r\n \ + \ \"172.64.0.0/10\",\r\n \"172.32.0.0/11\",\r\n \ + \ \"172.0.0.0/12\",\r\n \"208.0.0.0/4\",\r\n \ + \ \"200.0.0.0/5\",\r\n \"194.0.0.0/7\",\r\n \ + \ \"193.0.0.0/8\",\r\n \"192.64.0.0/10\",\r\n \ + \ \"192.32.0.0/11\",\r\n \"192.16.0.0/12\",\r\n \ + \ \"192.8.0.0/13\",\r\n \"192.4.0.0/14\",\r\n \ + \ \"192.2.0.0/15\",\r\n \"192.1.0.0/16\",\r\n \"\ + 192.0.128.0/17\",\r\n \"192.0.64.0/18\",\r\n \"\ + 192.0.32.0/19\",\r\n \"192.0.16.0/20\",\r\n \"192.0.8.0/21\"\ + ,\r\n \"192.0.4.0/22\",\r\n \"192.0.0.0/23\",\r\n\ + \ \"192.0.3.0/24\",\r\n \"192.192.0.0/10\",\r\n\ + \ \"192.128.0.0/11\",\r\n \"192.176.0.0/12\",\r\n\ + \ \"192.160.0.0/13\",\r\n \"192.172.0.0/14\",\r\n\ + \ \"192.170.0.0/15\",\r\n \"192.169.0.0/16\",\r\n\ + \ \"196.0.0.0/7\",\r\n \"199.0.0.0/8\",\r\n \ + \ \"198.128.0.0/9\",\r\n \"198.64.0.0/10\",\r\n \ + \ \"198.32.0.0/11\",\r\n \"198.0.0.0/12\",\r\n \ + \ \"198.24.0.0/13\",\r\n \"198.20.0.0/14\",\r\n \ + \ \"198.16.0.0/15\",\r\n \"104.0.0.0/5\",\r\n \ + \ \"96.0.0.0/6\",\r\n \"102.0.0.0/7\",\r\n \ + \ \"101.0.0.0/8\",\r\n \"100.128.0.0/9\",\r\n \"\ + 100.0.0.0/10\",\r\n \"16.0.0.0/5\",\r\n \"28.0.0.0/6\"\ + ,\r\n \"26.0.0.0/7\",\r\n \"24.0.0.0/8\"\r\n \ + \ ],\r\n \"access\": \"Allow\",\r\n \"priority\"\ + : 65001,\r\n \"direction\": \"Outbound\"\r\n },\r\n \ + \ {\r\n \"name\": \"DefaultRule_DenyAllOutBound\",\r\n \ + \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"\ + 0-65535\",\r\n \"destinationPortRange\": \"0-65535\",\r\n \ + \ \"sourceAddressPrefix\": \"0.0.0.0/0\",\r\n \"destinationAddressPrefix\"\ + : \"0.0.0.0/0\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ + : 65500,\r\n \"direction\": \"Outbound\"\r\n },\r\n \ + \ {\r\n \"name\": \"DefaultInboundDenyAll\",\r\n \ + \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"0-65535\"\ + ,\r\n \"destinationPortRange\": \"0-65535\",\r\n \"\ + sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ + : \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ + : 65500,\r\n \"direction\": \"Inbound\"\r\n },\r\n \ + \ {\r\n \"name\": \"DefaultRule_AllowVnetInBound\",\r\n \ + \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"\ + 0-65535\",\r\n \"destinationPortRange\": \"0-65535\",\r\n \ + \ \"sourceAddressPrefix\": \"VirtualNetwork\",\r\n \"expandedSourceAddressPrefix\"\ + : [\r\n \"10.0.0.0/16\",\r\n \"168.63.129.16/32\"\ + \r\n ],\r\n \"destinationAddressPrefix\": \"VirtualNetwork\"\ + ,\r\n \"expandedDestinationAddressPrefix\": [\r\n \ + \ \"10.0.0.0/16\",\r\n \"168.63.129.16/32\"\r\n ],\r\ + \n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\ + \n \"direction\": \"Inbound\"\r\n },\r\n {\r\n\ + \ \"name\": \"DefaultRule_AllowAzureLoadBalancerInBound\",\r\n\ + \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"\ + 0-65535\",\r\n \"destinationPortRange\": \"0-65535\",\r\n \ + \ \"sourceAddressPrefix\": \"AzureLoadBalancer\",\r\n \"\ + expandedSourceAddressPrefix\": [\r\n \"168.63.129.16/32\"\r\n\ + \ ],\r\n \"destinationAddressPrefix\": \"0.0.0.0/0\"\ + ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\ + \n \"direction\": \"Inbound\"\r\n },\r\n {\r\n\ + \ \"name\": \"DefaultRule_DenyAllInBound\",\r\n \"protocol\"\ + : \"All\",\r\n \"sourcePortRange\": \"0-65535\",\r\n \ + \ \"destinationPortRange\": \"0-65535\",\r\n \"sourceAddressPrefix\"\ + : \"0.0.0.0/0\",\r\n \"destinationAddressPrefix\": \"0.0.0.0/0\"\ + ,\r\n \"access\": \"Deny\",\r\n \"priority\": 65500,\r\ + \n \"direction\": \"Inbound\"\r\n },\r\n {\r\n\ + \ \"name\": \"UserRule_default-allow-ssh\",\r\n \"protocol\"\ + : \"Tcp\",\r\n \"sourcePortRange\": \"0-65535\",\r\n \ + \ \"destinationPortRange\": \"22-22\",\r\n \"sourceAddressPrefix\"\ + : \"0.0.0.0/0\",\r\n \"destinationAddressPrefix\": \"0.0.0.0/0\"\ + ,\r\n \"access\": \"Allow\",\r\n \"priority\": 1000,\r\ + \n \"direction\": \"Inbound\"\r\n }\r\n ]\r\n \ + \ }\r\n }\r\n ]\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:28 GMT'] + Date: ['Wed, 17 May 2017 18:11:46 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/6885b0dc-d551-42cf-9ded-8227eeeecdb8?api-version=2017-03-01'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['804'] + content-length: ['12218'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: body: null @@ -4135,24 +4884,197 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b77470fe-245c-11e7-9380-a0b3ccf7272a] + x-ms-client-request-id: [446397a2-3b2c-11e7-b11d-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/6885b0dc-d551-42cf-9ded-8227eeeecdb8?api-version=2017-03-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"33072e8b-debd-41fe-8be6-baea52110c63\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: "{\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + ,\r\n \"securityRuleAssociations\": {\r\n \"networkInterfaceAssociation\"\ + : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + ,\r\n \"securityRules\": [\r\n {\r\n \"name\"\ + : \"default-allow-ssh\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/default-allow-ssh\"\ + ,\r\n \"etag\": \"W/\\\"510099fc-4ac7-42ba-954f-6cc3e3c90cad\\\ + \"\",\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"protocol\": \"Tcp\",\r\n \ + \ \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ + : \"22\",\r\n \"sourceAddressPrefix\": \"*\",\r\n \ + \ \"destinationAddressPrefix\": \"*\",\r\n \"access\"\ + : \"Allow\",\r\n \"priority\": 1000,\r\n \"\ + direction\": \"Inbound\"\r\n }\r\n }\r\n \ + \ ]\r\n },\r\n \"defaultSecurityRules\": [\r\n {\r\n\ + \ \"name\": \"AllowVnetInBound\",\r\n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/AllowVnetInBound\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"description\": \"Allow inbound traffic\ + \ from all VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \ + \ \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ + : \"*\",\r\n \"sourceAddressPrefix\": \"VirtualNetwork\",\r\n\ + \ \"destinationAddressPrefix\": \"VirtualNetwork\",\r\n \ + \ \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ + \ \"direction\": \"Inbound\"\r\n }\r\n },\r\ + \n {\r\n \"name\": \"AllowAzureLoadBalancerInBound\",\r\ + \n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/AllowAzureLoadBalancerInBound\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"description\": \"Allow inbound traffic\ + \ from azure load balancer\",\r\n \"protocol\": \"*\",\r\n \ + \ \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ + : \"*\",\r\n \"sourceAddressPrefix\": \"AzureLoadBalancer\",\r\ + \n \"destinationAddressPrefix\": \"*\",\r\n \"access\"\ + : \"Allow\",\r\n \"priority\": 65001,\r\n \"direction\"\ + : \"Inbound\"\r\n }\r\n },\r\n {\r\n \ + \ \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/DenyAllInBound\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"description\": \"Deny all inbound traffic\"\ + ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ + : \"*\",\r\n \"destinationPortRange\": \"*\",\r\n \ + \ \"sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ + : \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ + : 65500,\r\n \"direction\": \"Inbound\"\r\n }\r\n\ + \ },\r\n {\r\n \"name\": \"AllowVnetOutBound\"\ + ,\r\n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/AllowVnetOutBound\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"description\": \"Allow outbound traffic\ + \ from all VMs to all VMs in VNET\",\r\n \"protocol\": \"*\"\ + ,\r\n \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ + : \"*\",\r\n \"sourceAddressPrefix\": \"VirtualNetwork\",\r\n\ + \ \"destinationAddressPrefix\": \"VirtualNetwork\",\r\n \ + \ \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ + \ \"direction\": \"Outbound\"\r\n }\r\n },\r\ + \n {\r\n \"name\": \"AllowInternetOutBound\",\r\n \ + \ \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/AllowInternetOutBound\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"description\": \"Allow outbound traffic\ + \ from all VMs to Internet\",\r\n \"protocol\": \"*\",\r\n \ + \ \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\"\ + : \"*\",\r\n \"sourceAddressPrefix\": \"*\",\r\n \ + \ \"destinationAddressPrefix\": \"Internet\",\r\n \"access\"\ + : \"Allow\",\r\n \"priority\": 65001,\r\n \"direction\"\ + : \"Outbound\"\r\n }\r\n },\r\n {\r\n \ + \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions//resourceGroups//providers/Microsoft.Network/networkSecurityGroups//defaultSecurityRules/DenyAllOutBound\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"description\": \"Deny all outbound traffic\"\ + ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ + : \"*\",\r\n \"destinationPortRange\": \"*\",\r\n \ + \ \"sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ + : \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ + : 65500,\r\n \"direction\": \"Outbound\"\r\n }\r\n\ + \ }\r\n ],\r\n \"effectiveSecurityRules\": [\r\n \ + \ {\r\n \"name\": \"DefaultOutboundDenyAll\",\r\n \ + \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"0-65535\"\ + ,\r\n \"destinationPortRange\": \"0-65535\",\r\n \"\ + sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ + : \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ + : 65500,\r\n \"direction\": \"Outbound\"\r\n },\r\n \ + \ {\r\n \"name\": \"DefaultRule_AllowVnetOutBound\",\r\n\ + \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"\ + 0-65535\",\r\n \"destinationPortRange\": \"0-65535\",\r\n \ + \ \"sourceAddressPrefix\": \"VirtualNetwork\",\r\n \"expandedSourceAddressPrefix\"\ + : [\r\n \"10.0.0.0/16\",\r\n \"168.63.129.16/32\"\ + \r\n ],\r\n \"destinationAddressPrefix\": \"VirtualNetwork\"\ + ,\r\n \"expandedDestinationAddressPrefix\": [\r\n \ + \ \"10.0.0.0/16\",\r\n \"168.63.129.16/32\"\r\n ],\r\ + \n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\ + \n \"direction\": \"Outbound\"\r\n },\r\n {\r\ + \n \"name\": \"DefaultRule_AllowInternetOutBound\",\r\n \ + \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"0-65535\"\ + ,\r\n \"destinationPortRange\": \"0-65535\",\r\n \"\ + sourceAddressPrefix\": \"0.0.0.0/0\",\r\n \"destinationAddressPrefix\"\ + : \"Internet\",\r\n \"expandedDestinationAddressPrefix\": [\r\n\ + \ \"32.0.0.0/3\",\r\n \"4.0.0.0/6\",\r\n \ + \ \"2.0.0.0/7\",\r\n \"1.0.0.0/8\",\r\n \"\ + 12.0.0.0/6\",\r\n \"8.0.0.0/7\",\r\n \"11.0.0.0/8\"\ + ,\r\n \"64.0.0.0/3\",\r\n \"112.0.0.0/5\",\r\n \ + \ \"120.0.0.0/6\",\r\n \"124.0.0.0/7\",\r\n \ + \ \"126.0.0.0/8\",\r\n \"128.0.0.0/3\",\r\n \ + \ \"176.0.0.0/4\",\r\n \"160.0.0.0/5\",\r\n \ + \ \"170.0.0.0/7\",\r\n \"168.0.0.0/8\",\r\n \"169.0.0.0/9\"\ + ,\r\n \"169.128.0.0/10\",\r\n \"169.192.0.0/11\"\ + ,\r\n \"169.224.0.0/12\",\r\n \"169.240.0.0/13\"\ + ,\r\n \"169.248.0.0/14\",\r\n \"169.252.0.0/15\"\ + ,\r\n \"169.255.0.0/16\",\r\n \"174.0.0.0/7\",\r\ + \n \"173.0.0.0/8\",\r\n \"172.128.0.0/9\",\r\n \ + \ \"172.64.0.0/10\",\r\n \"172.32.0.0/11\",\r\n \ + \ \"172.0.0.0/12\",\r\n \"208.0.0.0/4\",\r\n \ + \ \"200.0.0.0/5\",\r\n \"194.0.0.0/7\",\r\n \ + \ \"193.0.0.0/8\",\r\n \"192.64.0.0/10\",\r\n \ + \ \"192.32.0.0/11\",\r\n \"192.16.0.0/12\",\r\n \ + \ \"192.8.0.0/13\",\r\n \"192.4.0.0/14\",\r\n \ + \ \"192.2.0.0/15\",\r\n \"192.1.0.0/16\",\r\n \"\ + 192.0.128.0/17\",\r\n \"192.0.64.0/18\",\r\n \"\ + 192.0.32.0/19\",\r\n \"192.0.16.0/20\",\r\n \"192.0.8.0/21\"\ + ,\r\n \"192.0.4.0/22\",\r\n \"192.0.0.0/23\",\r\n\ + \ \"192.0.3.0/24\",\r\n \"192.192.0.0/10\",\r\n\ + \ \"192.128.0.0/11\",\r\n \"192.176.0.0/12\",\r\n\ + \ \"192.160.0.0/13\",\r\n \"192.172.0.0/14\",\r\n\ + \ \"192.170.0.0/15\",\r\n \"192.169.0.0/16\",\r\n\ + \ \"196.0.0.0/7\",\r\n \"199.0.0.0/8\",\r\n \ + \ \"198.128.0.0/9\",\r\n \"198.64.0.0/10\",\r\n \ + \ \"198.32.0.0/11\",\r\n \"198.0.0.0/12\",\r\n \ + \ \"198.24.0.0/13\",\r\n \"198.20.0.0/14\",\r\n \ + \ \"198.16.0.0/15\",\r\n \"104.0.0.0/5\",\r\n \ + \ \"96.0.0.0/6\",\r\n \"102.0.0.0/7\",\r\n \ + \ \"101.0.0.0/8\",\r\n \"100.128.0.0/9\",\r\n \"\ + 100.0.0.0/10\",\r\n \"16.0.0.0/5\",\r\n \"28.0.0.0/6\"\ + ,\r\n \"26.0.0.0/7\",\r\n \"24.0.0.0/8\"\r\n \ + \ ],\r\n \"access\": \"Allow\",\r\n \"priority\"\ + : 65001,\r\n \"direction\": \"Outbound\"\r\n },\r\n \ + \ {\r\n \"name\": \"DefaultRule_DenyAllOutBound\",\r\n \ + \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"\ + 0-65535\",\r\n \"destinationPortRange\": \"0-65535\",\r\n \ + \ \"sourceAddressPrefix\": \"0.0.0.0/0\",\r\n \"destinationAddressPrefix\"\ + : \"0.0.0.0/0\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ + : 65500,\r\n \"direction\": \"Outbound\"\r\n },\r\n \ + \ {\r\n \"name\": \"DefaultInboundDenyAll\",\r\n \ + \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"0-65535\"\ + ,\r\n \"destinationPortRange\": \"0-65535\",\r\n \"\ + sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\"\ + : \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\"\ + : 65500,\r\n \"direction\": \"Inbound\"\r\n },\r\n \ + \ {\r\n \"name\": \"DefaultRule_AllowVnetInBound\",\r\n \ + \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"\ + 0-65535\",\r\n \"destinationPortRange\": \"0-65535\",\r\n \ + \ \"sourceAddressPrefix\": \"VirtualNetwork\",\r\n \"expandedSourceAddressPrefix\"\ + : [\r\n \"10.0.0.0/16\",\r\n \"168.63.129.16/32\"\ + \r\n ],\r\n \"destinationAddressPrefix\": \"VirtualNetwork\"\ + ,\r\n \"expandedDestinationAddressPrefix\": [\r\n \ + \ \"10.0.0.0/16\",\r\n \"168.63.129.16/32\"\r\n ],\r\ + \n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\ + \n \"direction\": \"Inbound\"\r\n },\r\n {\r\n\ + \ \"name\": \"DefaultRule_AllowAzureLoadBalancerInBound\",\r\n\ + \ \"protocol\": \"All\",\r\n \"sourcePortRange\": \"\ + 0-65535\",\r\n \"destinationPortRange\": \"0-65535\",\r\n \ + \ \"sourceAddressPrefix\": \"AzureLoadBalancer\",\r\n \"\ + expandedSourceAddressPrefix\": [\r\n \"168.63.129.16/32\"\r\n\ + \ ],\r\n \"destinationAddressPrefix\": \"0.0.0.0/0\"\ + ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\ + \n \"direction\": \"Inbound\"\r\n },\r\n {\r\n\ + \ \"name\": \"DefaultRule_DenyAllInBound\",\r\n \"protocol\"\ + : \"All\",\r\n \"sourcePortRange\": \"0-65535\",\r\n \ + \ \"destinationPortRange\": \"0-65535\",\r\n \"sourceAddressPrefix\"\ + : \"0.0.0.0/0\",\r\n \"destinationAddressPrefix\": \"0.0.0.0/0\"\ + ,\r\n \"access\": \"Deny\",\r\n \"priority\": 65500,\r\ + \n \"direction\": \"Inbound\"\r\n },\r\n {\r\n\ + \ \"name\": \"UserRule_default-allow-ssh\",\r\n \"protocol\"\ + : \"Tcp\",\r\n \"sourcePortRange\": \"0-65535\",\r\n \ + \ \"destinationPortRange\": \"22-22\",\r\n \"sourceAddressPrefix\"\ + : \"0.0.0.0/0\",\r\n \"destinationAddressPrefix\": \"0.0.0.0/0\"\ + ,\r\n \"access\": \"Allow\",\r\n \"priority\": 1000,\r\ + \n \"direction\": \"Inbound\"\r\n }\r\n ]\r\n \ + \ }\r\n }\r\n ]\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:28 GMT'] + Date: ['Wed, 17 May 2017 18:12:17 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/6885b0dc-d551-42cf-9ded-8227eeeecdb8?api-version=2017-03-01'] Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [68ae6432-4230-4c5e-acac-b9238e1cdc7c, dda2b7bf-d11c-4a7e-b69c-1ff78991009d] + content-length: ['12330'] status: {code: 200, message: OK} - request: body: null @@ -4160,30 +5082,53 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 computemanagementclient/1.0.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b7c22080-245c-11e7-b3cd-a0b3ccf7272a] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/packetCaptures/capture1?api-version=2017-03-01 + x-ms-client-request-id: [5a7395d0-3b2c-11e7-a3df-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2016-04-30-preview response: - body: {string: ''} + body: {string: "{\r\n \"properties\": {\r\n \"vmId\": \"b7933411-7b6c-4d69-bf8b-ed176c5749fb\"\ + ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\ + \n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ + \ \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\"\ + ,\r\n \"sku\": \"16.04-LTS\",\r\n \"version\": \"latest\"\r\n\ + \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \ + \ \"name\": \"osdisk_zsw3gJW0hI\",\r\n \"createOption\": \"FromImage\"\ + ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ + \ \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/disks/osdisk_zsw3gJW0hI\"\ + \r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\"\ + : []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\"\ + ,\r\n \"adminUsername\": \"deploy\",\r\n \"linuxConfiguration\"\ + : {\r\n \"disablePasswordAuthentication\": false\r\n },\r\n \ + \ \"secrets\": []\r\n },\r\n \"networkProfile\": {\"networkInterfaces\"\ + :[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + }]},\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"resources\"\ + : [\r\n {\r\n \"properties\": {\r\n \"publisher\": \"Microsoft.Azure.NetworkWatcher\"\ + ,\r\n \"type\": \"NetworkWatcherAgentLinux\",\r\n \"typeHandlerVersion\"\ + : \"1.4\",\r\n \"autoUpgradeMinorVersion\": true,\r\n \"provisioningState\"\ + : \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\"\ + ,\r\n \"location\": \"westus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1/extensions/NetworkWatcherAgentLinux\"\ + ,\r\n \"name\": \"NetworkWatcherAgentLinux\"\r\n }\r\n ],\r\n \"\ + type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\"\ + ,\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1\"\ + ,\r\n \"name\": \"vm1\"\r\n}"} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/77de8d02-6d06-42ac-9410-640b3e290a68?api-version=2017-03-01'] Cache-Control: [no-cache] - Content-Length: ['0'] - Date: ['Tue, 18 Apr 2017 17:30:29 GMT'] + Content-Type: [application/json; charset=utf-8] + Date: ['Wed, 17 May 2017 18:12:18 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/77de8d02-6d06-42ac-9410-640b3e290a68?api-version=2017-03-01'] Pragma: [no-cache] - Retry-After: ['10'] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] - status: {code: 202, message: Accepted} + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['2157'] + status: {code: 200, message: OK} - request: body: null headers: @@ -4192,52 +5137,64 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [b7c22080-245c-11e7-b3cd-a0b3ccf7272a] + x-ms-client-request-id: [5a99d492-3b2c-11e7-8a42-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/77de8d02-6d06-42ac-9410-640b3e290a68?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 response: - body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} + body: {string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"westus-watcher\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher\"\ + ,\r\n \"etag\": \"W/\\\"247fc44f-4b27-4fda-b00a-6bc0a361e015\\\"\",\r\ + \n \"type\": \"Microsoft.Network/networkWatchers\",\r\n \"location\"\ + : \"westus\",\r\n \"tags\": {\r\n \"foo\": \"doo\"\r\n },\r\ + \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"runningOperationIds\": []\r\n }\r\n }\r\n ]\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:39 GMT'] + Date: ['Wed, 17 May 2017 18:12:18 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['29'] + content-length: ['520'] status: {code: 200, message: OK} - request: - body: null + body: '{"sourceIPAddress": "123.4.5.6", "destinationIPAddress": "10.0.0.6", "targetResourceId": + "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Compute/virtualMachines/vm1"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] + Content-Length: ['237'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [be56f686-245c-11e7-b967-a0b3ccf7272a] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 + x-ms-client-request-id: [5aca3536-3b2c-11e7-ba19-a0b3ccf7272a] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher/nextHop?api-version=2017-03-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"dfd9df62-e6f3-45e3-b735-1347fcf09733\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: "{\r\n \"nextHopType\": \"VnetLocal\",\r\n \"routeTableId\":\ + \ \"System Route\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:40 GMT'] + Date: ['Wed, 17 May 2017 18:12:25 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/02ae9f60-a8ba-429c-8c8a-9324b4af01a9?api-version=2017-03-01'] Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [3b3a2378-97fb-428a-816e-57e68ff39daa, 7e06feb7-6d40-40f1-863e-33a6f1ff2033] + content-length: ['69'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -4247,25 +5204,27 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [be975e5e-245c-11e7-b975-a0b3ccf7272a] + x-ms-client-request-id: [5aca3536-3b2c-11e7-ba19-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/packetCaptures?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/02ae9f60-a8ba-429c-8c8a-9324b4af01a9?api-version=2017-03-01 response: - body: {string: "{\r\n \"value\": []\r\n}"} + body: {string: "{\r\n \"nextHopType\": \"VnetLocal\",\r\n \"routeTableId\":\ + \ \"System Route\"\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:40 GMT'] + Date: ['Wed, 17 May 2017 18:12:55 GMT'] Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operationResults/02ae9f60-a8ba-429c-8c8a-9324b4af01a9?api-version=2017-03-01'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['19'] + content-length: ['69'] status: {code: 200, message: OK} - request: body: null @@ -4275,21 +5234,21 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [bebbaf80-245c-11e7-93c4-a0b3ccf7272a] + x-ms-client-request-id: [716fffdc-3b2c-11e7-a920-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG?api-version=2017-03-01 response: body: {string: "{\r\n \"name\": \"vm1NSG\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ - ,\r\n \"etag\": \"W/\\\"d1339094-205b-4ade-a7fc-719e9b17c36f\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"510099fc-4ac7-42ba-954f-6cc3e3c90cad\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/networkSecurityGroups\",\r\n \"location\"\ : \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"bef1c5b7-fe7a-4f4c-b9d0-5a79fc3de2b8\"\ + : \"Succeeded\",\r\n \"resourceGuid\": \"10d1088f-ef47-43cd-bcb6-28a454e99563\"\ ,\r\n \"securityRules\": [\r\n {\r\n \"name\": \"default-allow-ssh\"\ ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/default-allow-ssh\"\ - ,\r\n \"etag\": \"W/\\\"d1339094-205b-4ade-a7fc-719e9b17c36f\\\"\"\ + ,\r\n \"etag\": \"W/\\\"510099fc-4ac7-42ba-954f-6cc3e3c90cad\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"protocol\": \"Tcp\",\r\n \"sourcePortRange\": \"\ *\",\r\n \"destinationPortRange\": \"22\",\r\n \"sourceAddressPrefix\"\ @@ -4298,7 +5257,7 @@ interactions: : \"Inbound\"\r\n }\r\n }\r\n ],\r\n \"defaultSecurityRules\"\ : [\r\n {\r\n \"name\": \"AllowVnetInBound\",\r\n \"id\"\ : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowVnetInBound\"\ - ,\r\n \"etag\": \"W/\\\"d1339094-205b-4ade-a7fc-719e9b17c36f\\\"\"\ + ,\r\n \"etag\": \"W/\\\"510099fc-4ac7-42ba-954f-6cc3e3c90cad\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from all VMs in VNET\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -4308,7 +5267,7 @@ interactions: \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowAzureLoadBalancerInBound\",\r\n \"id\":\ \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowAzureLoadBalancerInBound\"\ - ,\r\n \"etag\": \"W/\\\"d1339094-205b-4ade-a7fc-719e9b17c36f\\\"\"\ + ,\r\n \"etag\": \"W/\\\"510099fc-4ac7-42ba-954f-6cc3e3c90cad\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from azure load balancer\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -4317,7 +5276,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n\ \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/DenyAllInBound\"\ - ,\r\n \"etag\": \"W/\\\"d1339094-205b-4ade-a7fc-719e9b17c36f\\\"\"\ + ,\r\n \"etag\": \"W/\\\"510099fc-4ac7-42ba-954f-6cc3e3c90cad\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all inbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -4326,7 +5285,7 @@ interactions: access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ : \"Inbound\"\r\n }\r\n },\r\n {\r\n \"name\": \"\ AllowVnetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowVnetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"d1339094-205b-4ade-a7fc-719e9b17c36f\\\"\"\ + ,\r\n \"etag\": \"W/\\\"510099fc-4ac7-42ba-954f-6cc3e3c90cad\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to all\ \ VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ @@ -4335,7 +5294,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowInternetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowInternetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"d1339094-205b-4ade-a7fc-719e9b17c36f\\\"\"\ + ,\r\n \"etag\": \"W/\\\"510099fc-4ac7-42ba-954f-6cc3e3c90cad\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to Internet\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -4344,7 +5303,7 @@ interactions: \ \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n \ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\n \ \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/DenyAllOutBound\"\ - ,\r\n \"etag\": \"W/\\\"d1339094-205b-4ade-a7fc-719e9b17c36f\\\"\"\ + ,\r\n \"etag\": \"W/\\\"510099fc-4ac7-42ba-954f-6cc3e3c90cad\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all outbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -4357,8 +5316,8 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:41 GMT'] - ETag: [W/"d1339094-205b-4ade-a7fc-719e9b17c36f"] + Date: ['Wed, 17 May 2017 18:12:56 GMT'] + ETag: [W/"510099fc-4ac7-42ba-954f-6cc3e3c90cad"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -4375,24 +5334,31 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [bee6199e-245c-11e7-8dfa-a0b3ccf7272a] + x-ms-client-request-id: [71925cba-3b2c-11e7-b7b0-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"dfd9df62-e6f3-45e3-b735-1347fcf09733\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"westus-watcher\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher\"\ + ,\r\n \"etag\": \"W/\\\"4193236f-4ead-4280-9e0a-6b141a5993a4\\\"\",\r\ + \n \"type\": \"Microsoft.Network/networkWatchers\",\r\n \"location\"\ + : \"westus\",\r\n \"tags\": {\r\n \"foo\": \"doo\"\r\n },\r\ + \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"runningOperationIds\": []\r\n }\r\n }\r\n ]\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:41 GMT'] + Date: ['Wed, 17 May 2017 18:12:57 GMT'] Expires: ['-1'] Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [ac76b7d5-2aba-4f1e-b9e6-c134cbd87f2a, 121c5eb1-fa3e-43c1-9249-5b4d14a7019f] + content-length: ['520'] status: {code: 200, message: OK} - request: body: '{"targetResourceId": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"}' @@ -4403,12 +5369,12 @@ interactions: Content-Length: ['178'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [bf05e262-245c-11e7-80c1-a0b3ccf7272a] + x-ms-client-request-id: [71bd1742-3b2c-11e7-b490-a0b3ccf7272a] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/queryFlowLogStatus?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher/queryFlowLogStatus?api-version=2017-03-01 response: body: {string: "{\r\n \"targetResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ ,\r\n \"properties\": {\r\n \"enabled\": false,\r\n \"retentionPolicy\"\ @@ -4416,7 +5382,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:42 GMT'] + Date: ['Wed, 17 May 2017 18:12:59 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -4427,9 +5393,9 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: ['1196'] status: {code: 200, message: OK} - request: - body: '{"properties": {"storageId": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Storage/storageAccounts/clitestnwstorage1", - "enabled": true, "retentionPolicy": {"days": 5, "enabled": true}}, "targetResourceId": - "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"}' + body: '{"targetResourceId": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG", + "properties": {"storageId": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Storage/storageAccounts/clitestnwstorage1", + "retentionPolicy": {"days": 5, "enabled": true}, "enabled": true}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -4437,12 +5403,12 @@ interactions: Content-Length: ['436'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [c0374ae2-245c-11e7-9707-a0b3ccf7272a] + x-ms-client-request-id: [7386d158-3b2c-11e7-93b4-a0b3ccf7272a] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/configureFlowLog?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher/configureFlowLog?api-version=2017-03-01 response: body: {string: "{\r\n \"targetResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ ,\r\n \"properties\": {\r\n \"storageId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Storage/storageAccounts/clitestnwstorage1\"\ @@ -4451,7 +5417,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:46 GMT'] + Date: ['Wed, 17 May 2017 18:13:03 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -4459,7 +5425,7 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['486'] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -4469,21 +5435,21 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [c2a076d4-245c-11e7-a3df-a0b3ccf7272a] + x-ms-client-request-id: [7559ef24-3b2c-11e7-86df-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG?api-version=2017-03-01 response: body: {string: "{\r\n \"name\": \"vm1NSG\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ - ,\r\n \"etag\": \"W/\\\"d29bdd31-fc65-4372-b610-266d81733b3e\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"0beed153-4cbb-4bc9-bc15-85c0b3a83ce1\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/networkSecurityGroups\",\r\n \"location\"\ : \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"bef1c5b7-fe7a-4f4c-b9d0-5a79fc3de2b8\"\ + : \"Succeeded\",\r\n \"resourceGuid\": \"10d1088f-ef47-43cd-bcb6-28a454e99563\"\ ,\r\n \"securityRules\": [\r\n {\r\n \"name\": \"default-allow-ssh\"\ ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/default-allow-ssh\"\ - ,\r\n \"etag\": \"W/\\\"d29bdd31-fc65-4372-b610-266d81733b3e\\\"\"\ + ,\r\n \"etag\": \"W/\\\"0beed153-4cbb-4bc9-bc15-85c0b3a83ce1\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"protocol\": \"Tcp\",\r\n \"sourcePortRange\": \"\ *\",\r\n \"destinationPortRange\": \"22\",\r\n \"sourceAddressPrefix\"\ @@ -4492,7 +5458,7 @@ interactions: : \"Inbound\"\r\n }\r\n }\r\n ],\r\n \"defaultSecurityRules\"\ : [\r\n {\r\n \"name\": \"AllowVnetInBound\",\r\n \"id\"\ : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowVnetInBound\"\ - ,\r\n \"etag\": \"W/\\\"d29bdd31-fc65-4372-b610-266d81733b3e\\\"\"\ + ,\r\n \"etag\": \"W/\\\"0beed153-4cbb-4bc9-bc15-85c0b3a83ce1\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from all VMs in VNET\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -4502,7 +5468,7 @@ interactions: \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowAzureLoadBalancerInBound\",\r\n \"id\":\ \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowAzureLoadBalancerInBound\"\ - ,\r\n \"etag\": \"W/\\\"d29bdd31-fc65-4372-b610-266d81733b3e\\\"\"\ + ,\r\n \"etag\": \"W/\\\"0beed153-4cbb-4bc9-bc15-85c0b3a83ce1\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from azure load balancer\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -4511,7 +5477,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n\ \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/DenyAllInBound\"\ - ,\r\n \"etag\": \"W/\\\"d29bdd31-fc65-4372-b610-266d81733b3e\\\"\"\ + ,\r\n \"etag\": \"W/\\\"0beed153-4cbb-4bc9-bc15-85c0b3a83ce1\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all inbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -4520,7 +5486,7 @@ interactions: access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ : \"Inbound\"\r\n }\r\n },\r\n {\r\n \"name\": \"\ AllowVnetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowVnetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"d29bdd31-fc65-4372-b610-266d81733b3e\\\"\"\ + ,\r\n \"etag\": \"W/\\\"0beed153-4cbb-4bc9-bc15-85c0b3a83ce1\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to all\ \ VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ @@ -4529,7 +5495,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowInternetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowInternetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"d29bdd31-fc65-4372-b610-266d81733b3e\\\"\"\ + ,\r\n \"etag\": \"W/\\\"0beed153-4cbb-4bc9-bc15-85c0b3a83ce1\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to Internet\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -4538,7 +5504,7 @@ interactions: \ \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n \ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\n \ \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/DenyAllOutBound\"\ - ,\r\n \"etag\": \"W/\\\"d29bdd31-fc65-4372-b610-266d81733b3e\\\"\"\ + ,\r\n \"etag\": \"W/\\\"0beed153-4cbb-4bc9-bc15-85c0b3a83ce1\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all outbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -4551,8 +5517,8 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:47 GMT'] - ETag: [W/"d29bdd31-fc65-4372-b610-266d81733b3e"] + Date: ['Wed, 17 May 2017 18:13:03 GMT'] + ETag: [W/"0beed153-4cbb-4bc9-bc15-85c0b3a83ce1"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -4569,24 +5535,31 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [c2cb9224-245c-11e7-8ce0-a0b3ccf7272a] + x-ms-client-request-id: [758f5e0a-3b2c-11e7-b89a-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"16bc459a-15d2-4bd5-b275-25e10f671942\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"westus-watcher\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher\"\ + ,\r\n \"etag\": \"W/\\\"607f5007-3939-4e8a-a4e1-391e01daa300\\\"\",\r\ + \n \"type\": \"Microsoft.Network/networkWatchers\",\r\n \"location\"\ + : \"westus\",\r\n \"tags\": {\r\n \"foo\": \"doo\"\r\n },\r\ + \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"runningOperationIds\": []\r\n }\r\n }\r\n ]\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:47 GMT'] + Date: ['Wed, 17 May 2017 18:13:04 GMT'] Expires: ['-1'] Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [27e26e09-98ef-46d2-8886-7efa00d4b63d, 4cad2d29-c1f9-4472-9ced-fc710d960f40] + content-length: ['520'] status: {code: 200, message: OK} - request: body: '{"targetResourceId": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"}' @@ -4597,12 +5570,12 @@ interactions: Content-Length: ['178'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [c30e5cf6-245c-11e7-8b13-a0b3ccf7272a] + x-ms-client-request-id: [75c2a3f0-3b2c-11e7-ac61-a0b3ccf7272a] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/queryFlowLogStatus?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher/queryFlowLogStatus?api-version=2017-03-01 response: body: {string: "{\r\n \"targetResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ ,\r\n \"properties\": {\r\n \"storageId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Storage/storageAccounts/clitestnwstorage1\"\ @@ -4611,7 +5584,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:48 GMT'] + Date: ['Wed, 17 May 2017 18:13:04 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -4619,12 +5592,12 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['486'] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] status: {code: 200, message: OK} - request: - body: '{"properties": {"storageId": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Storage/storageAccounts/clitestnwstorage1", - "enabled": true, "retentionPolicy": {"days": 0, "enabled": false}}, "targetResourceId": - "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"}' + body: '{"targetResourceId": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG", + "properties": {"storageId": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Storage/storageAccounts/clitestnwstorage1", + "retentionPolicy": {"days": 0, "enabled": false}, "enabled": true}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -4632,12 +5605,12 @@ interactions: Content-Length: ['437'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [c3a75a0c-245c-11e7-bd2f-a0b3ccf7272a] + x-ms-client-request-id: [765b7c58-3b2c-11e7-b82d-a0b3ccf7272a] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/configureFlowLog?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher/configureFlowLog?api-version=2017-03-01 response: body: {string: "{\r\n \"targetResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ ,\r\n \"properties\": {\r\n \"storageId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Storage/storageAccounts/clitestnwstorage1\"\ @@ -4646,7 +5619,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:52 GMT'] + Date: ['Wed, 17 May 2017 18:13:06 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -4654,7 +5627,7 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['487'] - x-ms-ratelimit-remaining-subscription-writes: ['1195'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -4664,21 +5637,21 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [c6134f1c-245c-11e7-83c9-a0b3ccf7272a] + x-ms-client-request-id: [782ebc7e-3b2c-11e7-8d98-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG?api-version=2017-03-01 response: body: {string: "{\r\n \"name\": \"vm1NSG\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ - ,\r\n \"etag\": \"W/\\\"f229d106-046f-46e5-bb87-7008ed874d43\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"dbc15dfd-f82f-43d2-8d79-92ad587d3d37\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/networkSecurityGroups\",\r\n \"location\"\ : \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"bef1c5b7-fe7a-4f4c-b9d0-5a79fc3de2b8\"\ + : \"Succeeded\",\r\n \"resourceGuid\": \"10d1088f-ef47-43cd-bcb6-28a454e99563\"\ ,\r\n \"securityRules\": [\r\n {\r\n \"name\": \"default-allow-ssh\"\ ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/securityRules/default-allow-ssh\"\ - ,\r\n \"etag\": \"W/\\\"f229d106-046f-46e5-bb87-7008ed874d43\\\"\"\ + ,\r\n \"etag\": \"W/\\\"dbc15dfd-f82f-43d2-8d79-92ad587d3d37\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"protocol\": \"Tcp\",\r\n \"sourcePortRange\": \"\ *\",\r\n \"destinationPortRange\": \"22\",\r\n \"sourceAddressPrefix\"\ @@ -4687,7 +5660,7 @@ interactions: : \"Inbound\"\r\n }\r\n }\r\n ],\r\n \"defaultSecurityRules\"\ : [\r\n {\r\n \"name\": \"AllowVnetInBound\",\r\n \"id\"\ : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowVnetInBound\"\ - ,\r\n \"etag\": \"W/\\\"f229d106-046f-46e5-bb87-7008ed874d43\\\"\"\ + ,\r\n \"etag\": \"W/\\\"dbc15dfd-f82f-43d2-8d79-92ad587d3d37\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from all VMs in VNET\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -4697,7 +5670,7 @@ interactions: \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowAzureLoadBalancerInBound\",\r\n \"id\":\ \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowAzureLoadBalancerInBound\"\ - ,\r\n \"etag\": \"W/\\\"f229d106-046f-46e5-bb87-7008ed874d43\\\"\"\ + ,\r\n \"etag\": \"W/\\\"dbc15dfd-f82f-43d2-8d79-92ad587d3d37\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow inbound traffic from azure load balancer\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -4706,7 +5679,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n\ \ \"direction\": \"Inbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"DenyAllInBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/DenyAllInBound\"\ - ,\r\n \"etag\": \"W/\\\"f229d106-046f-46e5-bb87-7008ed874d43\\\"\"\ + ,\r\n \"etag\": \"W/\\\"dbc15dfd-f82f-43d2-8d79-92ad587d3d37\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all inbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -4715,7 +5688,7 @@ interactions: access\": \"Deny\",\r\n \"priority\": 65500,\r\n \"direction\"\ : \"Inbound\"\r\n }\r\n },\r\n {\r\n \"name\": \"\ AllowVnetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowVnetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"f229d106-046f-46e5-bb87-7008ed874d43\\\"\"\ + ,\r\n \"etag\": \"W/\\\"dbc15dfd-f82f-43d2-8d79-92ad587d3d37\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to all\ \ VMs in VNET\",\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\"\ @@ -4724,7 +5697,7 @@ interactions: ,\r\n \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n\ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\ \n \"name\": \"AllowInternetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/AllowInternetOutBound\"\ - ,\r\n \"etag\": \"W/\\\"f229d106-046f-46e5-bb87-7008ed874d43\\\"\"\ + ,\r\n \"etag\": \"W/\\\"dbc15dfd-f82f-43d2-8d79-92ad587d3d37\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Allow outbound traffic from all VMs to Internet\"\ ,\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\"\ @@ -4733,7 +5706,7 @@ interactions: \ \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n \ \ \"direction\": \"Outbound\"\r\n }\r\n },\r\n {\r\n \ \ \"name\": \"DenyAllOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG/defaultSecurityRules/DenyAllOutBound\"\ - ,\r\n \"etag\": \"W/\\\"f229d106-046f-46e5-bb87-7008ed874d43\\\"\"\ + ,\r\n \"etag\": \"W/\\\"dbc15dfd-f82f-43d2-8d79-92ad587d3d37\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"description\": \"Deny all outbound traffic\",\r\n \ \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \ @@ -4746,8 +5719,8 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:53 GMT'] - ETag: [W/"f229d106-046f-46e5-bb87-7008ed874d43"] + Date: ['Wed, 17 May 2017 18:13:08 GMT'] + ETag: [W/"dbc15dfd-f82f-43d2-8d79-92ad587d3d37"] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -4764,24 +5737,31 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [c6472eee-245c-11e7-bd36-a0b3ccf7272a] + x-ms-client-request-id: [785f40ec-3b2c-11e7-ae3a-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkWatchers?api-version=2017-03-01 response: - body: {string: '{"value":[{"name":"westus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher","etag":"W/\"e051b0d8-09f7-424a-a4c6-758eda67af3d\"","type":"Microsoft.Network/networkWatchers","location":"westus","tags":{"foo":"doo"},"properties":{"provisioningState":"Succeeded","runningOperationIds":[]}},{"name":"eastus-watcher","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/eastus-watcher","etag":"W/\"48095d1b-2cf2-457e-b99f-b8e79b9684a3\"","type":"Microsoft.Network/networkWatchers","location":"eastus","properties":{"provisioningState":"Succeeded","runningOperationIds":[]}}]}'} + body: {string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"westus-watcher\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher\"\ + ,\r\n \"etag\": \"W/\\\"1aefe8e6-5397-4652-9432-eb65db5c4c88\\\"\",\r\ + \n \"type\": \"Microsoft.Network/networkWatchers\",\r\n \"location\"\ + : \"westus\",\r\n \"tags\": {\r\n \"foo\": \"doo\"\r\n },\r\ + \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"runningOperationIds\": []\r\n }\r\n }\r\n ]\r\n}"} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:53 GMT'] + Date: ['Wed, 17 May 2017 18:13:08 GMT'] Expires: ['-1'] Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - content-length: ['738'] - x-ms-original-request-ids: [cb6d839a-9ddb-44b9-89f6-0e3a761fc760, e2b36fc3-54c8-4f3f-9d13-ab5014c0711f] + content-length: ['520'] status: {code: 200, message: OK} - request: body: '{"targetResourceId": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"}' @@ -4792,12 +5772,12 @@ interactions: Content-Length: ['178'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 - msrest_azure/0.4.7 networkmanagementclient/1.0.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.2+dev] + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.6+dev] accept-language: [en-US] - x-ms-client-request-id: [c6706068-245c-11e7-84be-a0b3ccf7272a] + x-ms-client-request-id: [78893b1c-3b2c-11e7-9de8-a0b3ccf7272a] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-nw/providers/Microsoft.Network/networkWatchers/westus-watcher/queryFlowLogStatus?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tjp-vm/providers/Microsoft.Network/networkWatchers/westus-watcher/queryFlowLogStatus?api-version=2017-03-01 response: body: {string: "{\r\n \"targetResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ ,\r\n \"properties\": {\r\n \"storageId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_network_watcher/providers/Microsoft.Storage/storageAccounts/clitestnwstorage1\"\ @@ -4806,7 +5786,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Tue, 18 Apr 2017 17:30:53 GMT'] + Date: ['Wed, 17 May 2017 18:13:09 GMT'] Expires: ['-1'] Pragma: [no-cache] Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] @@ -4814,6 +5794,6 @@ interactions: Transfer-Encoding: [chunked] Vary: [Accept-Encoding] content-length: ['487'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] status: {code: 200, message: OK} version: 1 diff --git a/src/command_modules/azure-cli-network/tests/test_network_commands.py b/src/command_modules/azure-cli-network/tests/test_network_commands.py index 89442016f..ba92c9ea1 100644 --- a/src/command_modules/azure-cli-network/tests/test_network_commands.py +++ b/src/command_modules/azure-cli-network/tests/test_network_commands.py @@ -1317,15 +1317,16 @@ class NetworkVpnGatewayScenarioTest(ResourceGroupVCRTestBase): # pylint: disable self.cmd('network vpn-connection update -n {} -g {} --routing-weight 25'.format(conn12, rg), checks=JMESPathCheck('routingWeight', 25)) + # TODO: Re-enable test once issue #3385 is fixed. # test network watcher troubleshooting commands - storage_account = 'clitestnwstorage2' - container_name = 'troubleshooting-results' - self.cmd('storage account create -g {} -l westus --sku Standard_LRS -n {}'.format(rg, storage_account)) - self.cmd('storage container create --account-name {} -n {}'.format(storage_account, container_name)) - storage_path = 'https://{}.blob.core.windows.net/{}'.format(storage_account, container_name) - self.cmd('network watcher configure -g {} --locations westus --enabled'.format(rg)) - self.cmd('network watcher troubleshooting start -g {} --resource {} --resource-type vpnConnection --storage-account {} --storage-path {}'.format(rg, conn12, storage_account, storage_path)) - self.cmd('network watcher troubleshooting show -g {} --resource {} --resource-type vpnConnection'.format(rg, conn12)) + # storage_account = 'clitestnwstorage2' + # container_name = 'troubleshooting-results' + # self.cmd('storage account create -g {} -l westus --sku Standard_LRS -n {}'.format(rg, storage_account)) + # self.cmd('storage container create --account-name {} -n {}'.format(storage_account, container_name)) + # storage_path = 'https://{}.blob.core.windows.net/{}'.format(storage_account, container_name) + # self.cmd('network watcher configure -g {} --locations westus --enabled'.format(rg)) + # self.cmd('network watcher troubleshooting start -g {} --resource {} --resource-type vpnConnection --storage-account {} --storage-path {}'.format(rg, conn12, storage_account, storage_path)) + # self.cmd('network watcher troubleshooting show -g {} --resource {} --resource-type vpnConnection'.format(rg, conn12)) class NetworkTrafficManagerScenarioTest(ResourceGroupVCRTestBase): @@ -1500,7 +1501,7 @@ class NetworkWatcherScenarioTest(ResourceGroupVCRTestBase): self.cmd('vm create -g {} -n {} --image UbuntuLTS --authentication-type password --admin-username deploy --admin-password PassPass10!)'.format(resource_group, vm)) self.cmd('vm extension set -g {} --vm-name {} -n NetworkWatcherAgentLinux --publisher Microsoft.Azure.NetworkWatcher'.format(resource_group, vm)) - self.cmd('network watcher show-topology -g {} -l westus'.format(resource_group)) + self.cmd('network watcher show-topology -g {}'.format(resource_group)) self.cmd('network watcher test-ip-flow -g {} --vm {} --direction inbound --local 10.0.0.4:22 --protocol tcp --remote 100.1.2.3:*'.format(resource_group, vm)) self.cmd('network watcher test-ip-flow -g {} --vm {} --direction outbound --local 10.0.0.4:* --protocol tcp --remote 100.1.2.3:80'.format(resource_group, vm)) @@ -1509,15 +1510,16 @@ class NetworkWatcherScenarioTest(ResourceGroupVCRTestBase): self.cmd('network watcher show-next-hop -g {} --vm {} --source-ip 123.4.5.6 --dest-ip 10.0.0.6'.format(resource_group, vm)) - capture = 'capture1' - location = 'westus' - self.cmd('network watcher packet-capture create -g {} --vm {} -n {} --file-path capture/capture.cap'.format(resource_group, vm, capture)) - self.cmd('network watcher packet-capture show -l {} -n {}'.format(location, capture)) - self.cmd('network watcher packet-capture stop -l {} -n {}'.format(location, capture)) - self.cmd('network watcher packet-capture show-status -l {} -n {}'.format(location, capture)) - self.cmd('network watcher packet-capture list -l {}'.format(location, capture)) - self.cmd('network watcher packet-capture delete -l {} -n {}'.format(location, capture)) - self.cmd('network watcher packet-capture list -l {}'.format(location, capture)) + # TODO: Re-enable once issue #3385 is resolved + #capture = 'capture1' + #location = 'westus' + #self.cmd('network watcher packet-capture create -g {} --vm {} -n {} --file-path capture/capture.cap'.format(resource_group, vm, capture)) + #self.cmd('network watcher packet-capture show -l {} -n {}'.format(location, capture)) + #self.cmd('network watcher packet-capture stop -l {} -n {}'.format(location, capture)) + #self.cmd('network watcher packet-capture show-status -l {} -n {}'.format(location, capture)) + #self.cmd('network watcher packet-capture list -l {}'.format(location, capture)) + #self.cmd('network watcher packet-capture delete -l {} -n {}'.format(location, capture)) + #self.cmd('network watcher packet-capture list -l {}'.format(location, capture)) nsg = '{}NSG'.format(vm) self.cmd('network watcher flow-log configure -g {} --nsg {} --enabled --retention 5 --storage-account {}'.format(resource_group, nsg, storage_account))
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_added_files", "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": -1, "issue_text_score": 2, "test_score": -1 }, "num_modified_files": 12 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==2.0.1 -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_cdn&subdirectory=src/command_modules/azure-cli-cdn -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_cognitiveservices&subdirectory=src/command_modules/azure-cli-cognitiveservices -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_cosmosdb&subdirectory=src/command_modules/azure-cli-cosmosdb -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_interactive&subdirectory=src/command_modules/azure-cli-interactive -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_rdbms&subdirectory=src/command_modules/azure-cli-rdbms -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_sf&subdirectory=src/command_modules/azure-cli-sf -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@5bb6b7bb83f5396ee9b6a8c5f458eeb629215703#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.9 azure-graphrbac==0.30.0rc6 azure-keyvault==0.3.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==3.0.1 azure-mgmt-cdn==0.30.2 azure-mgmt-cognitiveservices==1.0.0 azure-mgmt-compute==1.0.0rc1 azure-mgmt-containerregistry==0.2.1 azure-mgmt-datalake-analytics==0.1.4 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.4 azure-mgmt-devtestlabs==2.0.0 azure-mgmt-dns==1.0.1 azure-mgmt-documentdb==0.1.3 azure-mgmt-iothub==0.2.2 azure-mgmt-keyvault==0.31.0 azure-mgmt-monitor==0.2.1 azure-mgmt-network==1.0.0rc3 azure-mgmt-nspkg==1.0.0 azure-mgmt-rdbms==0.1.0 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.1.0rc1 azure-mgmt-sql==0.4.0 azure-mgmt-storage==1.0.0rc1 azure-mgmt-trafficmanager==0.30.0 azure-mgmt-web==0.32.0 azure-monitor==0.3.0 azure-multiapi-storage==0.1.0 azure-nspkg==1.0.0 azure-servicefabric==5.6.130 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 futures==3.1.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 prompt-toolkit==3.0.36 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pydocumentdb==2.3.5 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 pytz==2025.2 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.7 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 vsts-cd-manager==1.0.2 wcwidth==0.2.13 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==2.0.1 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.9 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.3.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==3.0.1 - azure-mgmt-cdn==0.30.2 - azure-mgmt-cognitiveservices==1.0.0 - azure-mgmt-compute==1.0.0rc1 - azure-mgmt-containerregistry==0.2.1 - azure-mgmt-datalake-analytics==0.1.4 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.4 - azure-mgmt-devtestlabs==2.0.0 - azure-mgmt-dns==1.0.1 - azure-mgmt-documentdb==0.1.3 - azure-mgmt-iothub==0.2.2 - azure-mgmt-keyvault==0.31.0 - azure-mgmt-monitor==0.2.1 - azure-mgmt-network==1.0.0rc3 - azure-mgmt-nspkg==1.0.0 - azure-mgmt-rdbms==0.1.0 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.1.0rc1 - azure-mgmt-sql==0.4.0 - azure-mgmt-storage==1.0.0rc1 - azure-mgmt-trafficmanager==0.30.0 - azure-mgmt-web==0.32.0 - azure-monitor==0.3.0 - azure-multiapi-storage==0.1.0 - azure-nspkg==1.0.0 - azure-servicefabric==5.6.130 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - futures==3.1.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - prompt-toolkit==3.0.36 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pydocumentdb==2.3.5 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pytz==2025.2 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.7 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - vsts-cd-manager==1.0.2 - wcwidth==0.2.13 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-monitor/tests/test_custom.py::MonitorNameOrIdTest::test_monitor_resource_id", "src/command_modules/azure-cli-monitor/tests/test_monitor.py::MonitorTests::test_monitor", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkWatcherScenarioTest::test_network_watcher" ]
[]
[ "src/command_modules/azure-cli-monitor/tests/test_custom.py::FilterBuilderTests::test_activity_logs_select_filter_builder", "src/command_modules/azure-cli-monitor/tests/test_custom.py::FilterBuilderTests::test_build_activity_logs_odata_filter", "src/command_modules/azure-cli-monitor/tests/test_custom.py::FilterBuilderTests::test_build_odata_filter", "src/command_modules/azure-cli-monitor/tests/test_custom.py::FilterBuilderTests::test_metric_names_filter_builder", "src/command_modules/azure-cli-monitor/tests/test_custom.py::FilterBuilderTests::test_metrics_odata_filter_builder", "src/command_modules/azure-cli-monitor/tests/test_custom.py::FilterBuilderTests::test_scaffold_autoscale_settings_parameters", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkMultiIdsShowScenarioTest::test_multi_id_show", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkUsageListScenarioTest::test_network_usage_list", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayDefaultScenarioTest::test_network_app_gateway_with_defaults", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayExistingSubnetScenarioTest::test_network_app_gateway_with_existing_subnet", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayNoWaitScenarioTest::test_network_app_gateway_no_wait", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayPrivateIpScenarioTest::test_network_app_gateway_with_private_ip", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayPublicIpScenarioTest::test_network_app_gateway_with_public_ip", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkAppGatewayWafConfigScenarioTest::test_network_app_gateway_waf_config", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkPublicIpScenarioTest::test_network_public_ip", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkExpressRouteScenarioTest::test_network_express_route", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkLoadBalancerScenarioTest::test_network_load_balancer", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkLoadBalancerIpConfigScenarioTest::test_network_load_balancer_ip_config", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkLoadBalancerSubresourceScenarioTest::test_network_load_balancer_subresources", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkLocalGatewayScenarioTest::test_network_local_gateway", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkNicScenarioTest::test_network_nic", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkNicSubresourceScenarioTest::test_network_nic_subresources", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkNicConvenienceCommandsScenarioTest::test_network_nic_convenience_commands", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkSecurityGroupScenarioTest::test_network_nsg", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkRouteTableOperationScenarioTest::test_network_route_table_operation", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkVNetScenarioTest::test_network_vnet", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkVNetPeeringScenarioTest::test_network_vnet_peering", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkSubnetSetScenarioTest::test_network_subnet_set", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkActiveActiveCrossPremiseScenarioTest::test_network_active_active_cross_premise_connection", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkActiveActiveVnetVnetScenarioTest::test_network_active_active_vnet_vnet_connection", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkVpnGatewayScenarioTest::test_network_vpn_gateway", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkTrafficManagerScenarioTest::test_network_traffic_manager", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkDnsScenarioTest::test_network_dns", "src/command_modules/azure-cli-network/tests/test_network_commands.py::NetworkZoneImportExportTest::test_network_dns_zone_import_export" ]
[]
MIT License
null
Azure__azure-cli-3409
40c111b3daa79c4cc326f09d47e60be5826ecccc
2017-05-19 20:00:44
58aac4203905792244f4bb244910354fd44425d6
brendandburns: @tjprescott fixed (test fixed too) tjprescott: ``` /home/travis/build/Azure/azure-cli/src/command_modules/azure-cli-resource/tests/test_resource_validators.py:20:1: E302 expected 2 blank lines, found 1 2 E302 expected 2 blank lines, found 1 ``` Have I mentioned I hate PEP8? yugangw-msft: @brendandburns, please add a functional test, say a VCR scenario test, to verify simple "az lock create/read/delete" command work. brendandburns: VCR test added, please take another look... codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3409?src=pr&el=h1) Report > Merging [#3409](https://codecov.io/gh/Azure/azure-cli/pull/3409?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/7c10cae4442c3d64d5570fe4dcdf96c47dd1531a?src=pr&el=desc) will **increase** coverage by `0.18%`. > The diff coverage is `100%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/3409/graphs/tree.svg?width=650&src=pr&token=2pog0TKvF8&height=150)](https://codecov.io/gh/Azure/azure-cli/pull/3409?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #3409 +/- ## ========================================== + Coverage 70.73% 70.92% +0.18% ========================================== Files 394 394 Lines 25534 25534 Branches 3889 3889 ========================================== + Hits 18062 18110 +48 + Misses 6337 6279 -58 - Partials 1135 1145 +10 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/3409?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [.../azure/cli/command\_modules/resource/\_validators.py](https://codecov.io/gh/Azure/azure-cli/pull/3409?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcmVzb3VyY2UvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9yZXNvdXJjZS9fdmFsaWRhdG9ycy5weQ==) | `69.56% <100%> (ø)` | :arrow_up: | | [...nent/azure/cli/command\_modules/component/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/3409?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktY29tcG9uZW50L2F6dXJlL2NsaS9jb21tYW5kX21vZHVsZXMvY29tcG9uZW50L2N1c3RvbS5weQ==) | `16.23% <0%> (ø)` | :arrow_up: | | [...dback/azure/cli/command\_modules/feedback/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/3409?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktZmVlZGJhY2svYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9mZWVkYmFjay9jdXN0b20ucHk=) | `34.69% <0%> (ø)` | :arrow_up: | | [src/azure-cli-core/azure/cli/core/util.py](https://codecov.io/gh/Azure/azure-cli/pull/3409?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL3V0aWwucHk=) | `68.61% <0%> (ø)` | :arrow_up: | | [...re/cli/command\_modules/resource/\_client\_factory.py](https://codecov.io/gh/Azure/azure-cli/pull/3409?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcmVzb3VyY2UvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9yZXNvdXJjZS9fY2xpZW50X2ZhY3RvcnkucHk=) | `88.46% <0%> (+5.76%)` | :arrow_up: | | [...ource/azure/cli/command\_modules/resource/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/3409?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcmVzb3VyY2UvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9yZXNvdXJjZS9jdXN0b20ucHk=) | `61.64% <0%> (+7.53%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3409?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3409?src=pr&el=footer). Last update [7c10cae...abc205c](https://codecov.io/gh/Azure/azure-cli/pull/3409?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). brendandburns: Comments (mostly) addressed, please take another look.
diff --git a/src/azure-cli/setup.py b/src/azure-cli/setup.py index 331db8c41..6a59bb8be 100644 --- a/src/azure-cli/setup.py +++ b/src/azure-cli/setup.py @@ -54,11 +54,13 @@ DEPENDENCIES = [ 'azure-cli-acs', 'azure-cli-appservice', 'azure-cli-batch', + 'azure-cli-billing', 'azure-cli-cdn', 'azure-cli-cloud', 'azure-cli-cognitiveservices', 'azure-cli-component', 'azure-cli-configure', + 'azure-cli-consumption', 'azure-cli-core', 'azure-cli-dla', 'azure-cli-dls', diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_validators.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_validators.py index f2436813e..4348e2b7b 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_validators.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_validators.py @@ -64,8 +64,8 @@ def internal_validate_lock_parameters(resource_group_name, resource_provider_nam def validate_lock_parameters(namespace): - internal_validate_lock_parameters(namespace.get('resource_group_name', None), - namespace.get('resource_provider_namespace', None), - namespace.get('parent_resource_path', None), - namespace.get('resource_type', None), - namespace.get('resource_name', None)) + internal_validate_lock_parameters(getattr(namespace, 'resource_group_name', None), + getattr(namespace, 'resource_provider_namespace', None), + getattr(namespace, 'parent_resource_path', None), + getattr(namespace, 'resource_type', None), + getattr(namespace, 'resource_name', None)) diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py index f92f94630..39896c05e 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py @@ -292,7 +292,9 @@ def create_managed_disk(resource_group_name, disk_name, location=None, # below are generated internally from 'source' source_blob_uri=None, source_disk=None, source_snapshot=None, source_storage_account_id=None, no_wait=False, tags=None): - from azure.mgmt.compute.models import Disk, CreationData, DiskCreateOption + Disk, CreationData, DiskCreateOption = get_sdk(ResourceType.MGMT_COMPUTE, 'Disk', 'CreationData', + 'DiskCreateOption', mod='models') + location = location or get_resource_group_location(resource_group_name) if source_blob_uri: option = DiskCreateOption.import_enum @@ -402,7 +404,8 @@ def create_snapshot(resource_group_name, snapshot_name, location=None, size_gb=N # below are generated internally from 'source' source_blob_uri=None, source_disk=None, source_snapshot=None, source_storage_account_id=None, tags=None): - from azure.mgmt.compute.models import Snapshot, CreationData, DiskCreateOption + Snapshot, CreationData, DiskCreateOption = get_sdk(ResourceType.MGMT_COMPUTE, 'Snapshot', 'CreationData', + 'DiskCreateOption', mod='models') location = location or get_resource_group_location(resource_group_name) if source_blob_uri: @@ -474,8 +477,10 @@ def create_image(resource_group_name, name, os_type=None, location=None, # pyli os_blob_uri=None, data_blob_uris=None, os_snapshot=None, data_snapshots=None, os_disk=None, data_disks=None, tags=None): - from azure.mgmt.compute.models import (ImageOSDisk, ImageDataDisk, ImageStorageProfile, Image, SubResource, - OperatingSystemStateTypes) + ImageOSDisk, ImageDataDisk, ImageStorageProfile, Image, SubResource, OperatingSystemStateTypes = get_sdk( + ResourceType.MGMT_COMPUTE, 'ImageOSDisk', 'ImageDataDisk', 'ImageStorageProfile', 'Image', 'SubResource', + 'OperatingSystemStateTypes', mod='models') + # pylint: disable=line-too-long if source_virtual_machine: location = location or get_resource_group_location(resource_group_name)
[Lock] az create lock Fails ### Description Creating locks fails with: ``` az lock create: error: 'Namespace' object has no attribute 'get' ``` --- ### Environment summary **Install Method:** How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly) Answer here: `pip3` **CLI Version:** What version of the CLI and modules are installed? (Use `az --version`) Answer here: ``` azure-cli (2.0.6) acr (2.0.4) acs (2.0.6) appservice (0.1.6) batch (2.0.4) cdn (0.0.2) cloud (2.0.2) cognitiveservices (0.1.2) command-modules-nspkg (2.0.0) component (2.0.4) configure (2.0.6) core (2.0.6) cosmosdb (0.1.6) dla (0.0.6) dls (0.0.6) feedback (2.0.2) find (0.2.2) interactive (0.3.1) iot (0.1.5) keyvault (2.0.4) lab (0.0.4) monitor (0.0.4) network (2.0.6) nspkg (3.0.0) profile (2.0.4) rdbms (0.0.1) redis (0.2.3) resource (2.0.6) role (2.0.4) sf (1.0.1) sql (2.0.3) storage (2.0.6) vm (2.0.6) Python (Linux) 3.6.1 (default, Mar 27 2017, 00:27:06) [GCC 6.3.1 20170306] ``` **OS Version:** What OS and version are you using? Answer here: Arch Linux, kernel 4.10.8. But was tested in Ubuntu 17.04 container and it also fails. **Shell Type:** What shell are you using? (e.g. bash, cmd.exe, Bash on Windows) Answer here: `bash` and `nash`. Both fails.
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-resource/tests/recordings/test_list_locks.yaml b/src/command_modules/azure-cli-resource/tests/recordings/test_list_locks.yaml new file mode 100644 index 000000000..b43592289 --- /dev/null +++ b/src/command_modules/azure-cli-resource/tests/recordings/test_list_locks.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:27:30 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +version: 1 diff --git a/src/command_modules/azure-cli-resource/tests/recordings/test_lock_create_list_delete.yaml b/src/command_modules/azure-cli-resource/tests/recordings/test_lock_create_list_delete.yaml new file mode 100644 index 000000000..60cb34dd2 --- /dev/null +++ b/src/command_modules/azure-cli-resource/tests/recordings/test_lock_create_list_delete.yaml @@ -0,0 +1,260 @@ +interactions: +- request: + body: '{"name": "foo", "properties": {"level": "ReadOnly"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock create] + Connection: [keep-alive] + Content-Length: ['52'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/foo?api-version=2016-09-01 + response: + body: {string: '{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"}'} + headers: + cache-control: [no-cache] + content-length: ['190'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:38:22 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"}]}'} + headers: + cache-control: [no-cache] + content-length: ['202'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:38:23 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/foo?api-version=2016-09-01 + response: + body: {string: '{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"}'} + headers: + cache-control: [no-cache] + content-length: ['190'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:38:23 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock delete] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"}]}'} + headers: + cache-control: [no-cache] + content-length: ['202'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:38:24 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/foo?api-version=2016-09-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Fri, 19 May 2017 23:38:25 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: '{"name": "foo", "properties": {"level": "CanNotDelete"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock create] + Connection: [keep-alive] + Content-Length: ['56'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/foo?api-version=2016-09-01 + response: + body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"}'} + headers: + cache-control: [no-cache] + content-length: ['194'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:38:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"}]}'} + headers: + cache-control: [no-cache] + content-length: ['206'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:38:27 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/foo?api-version=2016-09-01 + response: + body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"}'} + headers: + cache-control: [no-cache] + content-length: ['194'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:38:28 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock delete] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"}]}'} + headers: + cache-control: [no-cache] + content-length: ['206'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:38:30 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks/foo?api-version=2016-09-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Fri, 19 May 2017 23:38:30 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] + status: {code: 200, message: OK} +version: 1 diff --git a/src/command_modules/azure-cli-resource/tests/recordings/test_lock_create_list_delete_resource_group.yaml b/src/command_modules/azure-cli-resource/tests/recordings/test_lock_create_list_delete_resource_group.yaml new file mode 100644 index 000000000..d3cd445b4 --- /dev/null +++ b/src/command_modules/azure-cli-resource/tests/recordings/test_lock_create_list_delete_resource_group.yaml @@ -0,0 +1,315 @@ +interactions: +- request: + body: '{"tags": {"use": "az-test"}, "location": "westus"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:42:41 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1187'] + status: {code: 201, message: Created} +- request: + body: '{"properties": {"level": "ReadOnly"}, "name": "foo"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock create] + Connection: [keep-alive] + Content-Length: ['52'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Authorization/locks/foo?api-version=2016-09-01 + response: + body: {string: '{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"}'} + headers: + cache-control: [no-cache] + content-length: ['281'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:42:43 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1189'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg6hms5bk4lei5ddclway74mxxuyl46kfsfuygwco5al3eh7ousyhogw676rbllwli3/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"}]}'} + headers: + cache-control: [no-cache] + content-length: ['575'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:42:46 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Authorization/locks/foo?api-version=2016-09-01 + response: + body: {string: '{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"}'} + headers: + cache-control: [no-cache] + content-length: ['281'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:42:53 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock delete] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg6hms5bk4lei5ddclway74mxxuyl46kfsfuygwco5al3eh7ousyhogw676rbllwli3/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"},{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"}]}'} + headers: + cache-control: [no-cache] + content-length: ['575'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:43:05 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Authorization/locks/foo?api-version=2016-09-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Fri, 19 May 2017 23:43:07 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"level": "CanNotDelete"}, "name": "foo"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock create] + Connection: [keep-alive] + Content-Length: ['56'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Authorization/locks/foo?api-version=2016-09-01 + response: + body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"}'} + headers: + cache-control: [no-cache] + content-length: ['285'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:43:08 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg6hms5bk4lei5ddclway74mxxuyl46kfsfuygwco5al3eh7ousyhogw676rbllwli3/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"}]}'} + headers: + cache-control: [no-cache] + content-length: ['579'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:43:09 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Authorization/locks/foo?api-version=2016-09-01 + response: + body: {string: '{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"}'} + headers: + cache-control: [no-cache] + content-length: ['285'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:43:11 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock delete] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/locks?api-version=2016-09-01 + response: + body: {string: '{"value":[{"properties":{"level":"ReadOnly"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg6hms5bk4lei5ddclway74mxxuyl46kfsfuygwco5al3eh7ousyhogw676rbllwli3/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"},{"properties":{"level":"CanNotDelete"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Authorization/locks/foo","type":"Microsoft.Authorization/locks","name":"foo"}]}'} + headers: + cache-control: [no-cache] + content-length: ['579'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 19 May 2017 23:43:12 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [lock delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 managementlockclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Authorization/locks/foo?api-version=2016-09-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Fri, 19 May 2017 23:43:13 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1188'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.6+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Fri, 19 May 2017 23:43:15 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdORlVXV05FUE4zVlQzRkJDSlc1UUwzQUVMTFE3Mk1TQ1JXQnwxMEFGMEY1QzVBMjE5M0FCLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + retry-after: ['15'] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-resource/tests/test_locks.py b/src/command_modules/azure-cli-resource/tests/test_locks.py new file mode 100644 index 000000000..fdee87239 --- /dev/null +++ b/src/command_modules/azure-cli-resource/tests/test_locks.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import unittest + +from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer + + +class ResourceLockTests(ScenarioTest): + def test_list_locks(self): + # just make sure this doesn't throw + self.cmd('az lock list').get_output_in_json() + + # Test for subscription level locks + def test_lock_create_list_delete(self): + for lock_type in ['ReadOnly', 'CanNotDelete']: + self.cmd('az lock create -n foo --lock-type {}'.format(lock_type)) + locks_list = self.cmd('az lock list').get_output_in_json() + assert len(locks_list) > 0 + assert 'foo' in [l['name'] for l in locks_list] + lock = self.cmd('az lock show -n foo').get_output_in_json() + self.assertEqual(lock.get('name', None), 'foo') + self.assertEqual(lock.get('level', None), lock_type) + self.cmd('az lock delete -n foo') + + # Test for resource group level locks + @ResourceGroupPreparer() + def test_lock_create_list_delete_resource_group(self, resource_group): + for lock_type in ['ReadOnly', 'CanNotDelete']: + self.cmd('az lock create -n foo -g {} --lock-type {}'.format(resource_group, lock_type)) + locks_list = self.cmd('az lock list').get_output_in_json() + assert 'foo' in [l['name'] for l in locks_list] + assert len(locks_list) > 0 + lock = self.cmd('az lock show -g {} -n foo'.format(resource_group)).get_output_in_json() + self.assertEqual(lock.get('name', None), 'foo') + self.assertEqual(lock.get('level', None), lock_type) + self.cmd('az lock delete -g {} -n foo'.format(resource_group)) + + # TODO: test for resource group level locks + + +if __name__ == '__main__': + unittest.main() diff --git a/src/command_modules/azure-cli-resource/tests/test_resource_validators.py b/src/command_modules/azure-cli-resource/tests/test_resource_validators.py index ca533fd35..eea7b941b 100644 --- a/src/command_modules/azure-cli-resource/tests/test_resource_validators.py +++ b/src/command_modules/azure-cli-resource/tests/test_resource_validators.py @@ -4,8 +4,8 @@ # -------------------------------------------------------------------------------------------- import unittest -import mock import os.path +import mock from six import StringIO from azure.cli.core.util import CLIError @@ -15,6 +15,10 @@ from azure.cli.command_modules.resource._validators import ( ) +class NamespaceObject: + pass + + class Test_resource_validators(unittest.TestCase): def setUp(self): self.io = StringIO() @@ -59,9 +63,12 @@ class Test_resource_validators(unittest.TestCase): } ] for valid_namespace in valid: + namespace_obj = NamespaceObject() + for key in valid_namespace: + setattr(namespace_obj, key, valid_namespace[key]) try: # If unexpected invalid, this throws, so no need for asserts - validate_lock_parameters(valid_namespace) + validate_lock_parameters(namespace_obj) except CLIError as ex: self.fail('Test {} failed. {}'.format(valid_namespace['test'], ex)) @@ -102,7 +109,10 @@ class Test_resource_validators(unittest.TestCase): ] for invalid_namespace in invalid: with self.assertRaises(CLIError): - validate_lock_parameters(invalid_namespace) + namespace_obj = NamespaceObject() + for key in invalid_namespace: + setattr(namespace_obj, key, invalid_namespace[key]) + validate_lock_parameters(namespace_obj) def test_generate_deployment_name_from_file(self): # verify auto-gen from uri
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 1, "test_score": 3 }, "num_modified_files": 3 }
0.3
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==2.11.7 attrs==22.2.0 autopep8==1.2.4 azure-batch==3.0.0 -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_billing&subdirectory=src/command_modules/azure-cli-billing -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_cdn&subdirectory=src/command_modules/azure-cli-cdn -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_cognitiveservices&subdirectory=src/command_modules/azure-cli-cognitiveservices -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_consumption&subdirectory=src/command_modules/azure-cli-consumption -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_cosmosdb&subdirectory=src/command_modules/azure-cli-cosmosdb -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_interactive&subdirectory=src/command_modules/azure-cli-interactive -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_rdbms&subdirectory=src/command_modules/azure-cli-rdbms -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_sf&subdirectory=src/command_modules/azure-cli-sf -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@40c111b3daa79c4cc326f09d47e60be5826ecccc#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.9 azure-graphrbac==0.30.0rc6 azure-keyvault==0.3.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==4.0.0 azure-mgmt-billing==0.1.0 azure-mgmt-cdn==0.30.2 azure-mgmt-cognitiveservices==1.0.0 azure-mgmt-compute==1.0.0rc1 azure-mgmt-consumption==0.1.0 azure-mgmt-containerregistry==0.2.1 azure-mgmt-datalake-analytics==0.1.4 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.4 azure-mgmt-devtestlabs==2.0.0 azure-mgmt-dns==1.0.1 azure-mgmt-documentdb==0.1.3 azure-mgmt-iothub==0.2.2 azure-mgmt-keyvault==0.31.0 azure-mgmt-monitor==0.2.1 azure-mgmt-network==1.0.0rc3 azure-mgmt-nspkg==1.0.0 azure-mgmt-rdbms==0.1.0 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.1.0rc1 azure-mgmt-sql==0.4.0 azure-mgmt-storage==1.0.0rc1 azure-mgmt-trafficmanager==0.30.0 azure-mgmt-web==0.32.0 azure-monitor==0.3.0 azure-multiapi-storage==0.1.0 azure-nspkg==1.0.0 azure-servicefabric==5.6.130 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 futures==3.1.1 humanfriendly==2.4 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 isort==5.10.1 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 prompt-toolkit==3.0.36 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pydocumentdb==2.3.5 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.7.1 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 pytz==2025.2 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.7 tomli==1.2.3 typed-ast==1.5.5 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 vsts-cd-manager==1.0.2 wcwidth==0.2.13 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==2.11.7 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==3.0.0 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.9 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.3.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==4.0.0 - azure-mgmt-billing==0.1.0 - azure-mgmt-cdn==0.30.2 - azure-mgmt-cognitiveservices==1.0.0 - azure-mgmt-compute==1.0.0rc1 - azure-mgmt-consumption==0.1.0 - azure-mgmt-containerregistry==0.2.1 - azure-mgmt-datalake-analytics==0.1.4 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.4 - azure-mgmt-devtestlabs==2.0.0 - azure-mgmt-dns==1.0.1 - azure-mgmt-documentdb==0.1.3 - azure-mgmt-iothub==0.2.2 - azure-mgmt-keyvault==0.31.0 - azure-mgmt-monitor==0.2.1 - azure-mgmt-network==1.0.0rc3 - azure-mgmt-nspkg==1.0.0 - azure-mgmt-rdbms==0.1.0 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.1.0rc1 - azure-mgmt-sql==0.4.0 - azure-mgmt-storage==1.0.0rc1 - azure-mgmt-trafficmanager==0.30.0 - azure-mgmt-web==0.32.0 - azure-monitor==0.3.0 - azure-multiapi-storage==0.1.0 - azure-nspkg==1.0.0 - azure-servicefabric==5.6.130 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - futures==3.1.1 - humanfriendly==2.4 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - isort==5.10.1 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - prompt-toolkit==3.0.36 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pydocumentdb==2.3.5 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.7.1 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pytz==2025.2 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.7 - tomli==1.2.3 - typed-ast==1.5.5 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - vsts-cd-manager==1.0.2 - wcwidth==0.2.13 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-resource/tests/test_locks.py::ResourceLockTests::test_lock_create_list_delete", "src/command_modules/azure-cli-resource/tests/test_locks.py::ResourceLockTests::test_lock_create_list_delete_resource_group", "src/command_modules/azure-cli-resource/tests/test_resource_validators.py::Test_resource_validators::test_validate_lock_params", "src/command_modules/azure-cli-resource/tests/test_resource_validators.py::Test_resource_validators::test_validate_lock_params_invalid" ]
[]
[ "src/command_modules/azure-cli-resource/tests/test_locks.py::ResourceLockTests::test_list_locks", "src/command_modules/azure-cli-resource/tests/test_resource_validators.py::Test_resource_validators::test_generate_deployment_name_from_file" ]
[]
MIT License
null
Azure__azure-cli-3415
46d5382995c2740df260704f270df0e5cac965a5
2017-05-20 00:07:55
58aac4203905792244f4bb244910354fd44425d6
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3415?src=pr&el=h1) Report > Merging [#3415](https://codecov.io/gh/Azure/azure-cli/pull/3415?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/46d5382995c2740df260704f270df0e5cac965a5?src=pr&el=desc) will **increase** coverage by `<.01%`. > The diff coverage is `72.72%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/3415/graphs/tree.svg?src=pr&width=650&token=2pog0TKvF8&height=150)](https://codecov.io/gh/Azure/azure-cli/pull/3415?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #3415 +/- ## ========================================== + Coverage 70.81% 70.81% +<.01% ========================================== Files 394 394 Lines 25533 25532 -1 Branches 3889 3890 +1 ========================================== Hits 18081 18081 + Misses 6310 6308 -2 - Partials 1142 1143 +1 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/3415?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [src/azure-cli-core/azure/cli/core/\_profile.py](https://codecov.io/gh/Azure/azure-cli/pull/3415?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL19wcm9maWxlLnB5) | `87.85% <72.72%> (+0.2%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3415?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3415?src=pr&el=footer). Last update [46d5382...287b9e0](https://codecov.io/gh/Azure/azure-cli/pull/3415?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/src/azure-cli-core/HISTORY.rst b/src/azure-cli-core/HISTORY.rst index 103f25a5c..867cd36a3 100644 --- a/src/azure-cli-core/HISTORY.rst +++ b/src/azure-cli-core/HISTORY.rst @@ -7,6 +7,7 @@ unreleased ^^^^^^^^^^^^^^^^^^ * Command paths are no longer case sensitive. * Certain boolean-type parameters are no longer case sensitive. +* Support login to ADFS on prem server like Azure Stack 2.0.6 (2017-05-09) ^^^^^^^^^^^^^^^^^^ diff --git a/src/azure-cli-core/azure/cli/core/_profile.py b/src/azure-cli-core/azure/cli/core/_profile.py index 79191e18a..43fbe0d3b 100644 --- a/src/azure-cli-core/azure/cli/core/_profile.py +++ b/src/azure-cli-core/azure/cli/core/_profile.py @@ -56,9 +56,14 @@ _CLIENT_ID = '04b07795-8ddb-461a-bbee-02f9e1bf7b46' _COMMON_TENANT = 'common' -def _authentication_context_factory(authority, cache): +def _authentication_context_factory(tenant, cache): import adal - return adal.AuthenticationContext(authority, cache=cache, api_version=None) + authority_url = CLOUD.endpoints.active_directory + is_adfs = authority_url.lower().endswith('/adfs') + if not is_adfs: + authority_url = authority_url + '/' + (tenant or _COMMON_TENANT) + return adal.AuthenticationContext(authority_url, cache=cache, api_version=None, + validate_authority=(not is_adfs)) _AUTH_CTX_FACTORY = _authentication_context_factory @@ -69,10 +74,6 @@ CLOUD = get_active_cloud() logger.debug('Current cloud config:\n%s', str(CLOUD)) -def get_authority_url(tenant=None): - return CLOUD.endpoints.active_directory + '/' + (tenant or _COMMON_TENANT) - - def _load_tokens_from_file(file_path): all_entries = [] if os.path.isfile(file_path): @@ -393,7 +394,7 @@ class SubscriptionFinder(object): self.tenants = [] def find_from_user_account(self, username, password, tenant, resource): - context = self._create_auth_context(tenant or _COMMON_TENANT) + context = self._create_auth_context(tenant) token_entry = context.acquire_token_with_username_password( resource, username, @@ -408,8 +409,7 @@ class SubscriptionFinder(object): return result def find_through_interactive_flow(self, tenant, resource): - - context = self._create_auth_context(tenant or _COMMON_TENANT) + context = self._create_auth_context(tenant) code = context.acquire_user_code(resource, _CLIENT_ID) logger.warning(code['message']) token_entry = context.acquire_token_with_device_code(resource, code, _CLIENT_ID) @@ -430,8 +430,7 @@ class SubscriptionFinder(object): def _create_auth_context(self, tenant, use_token_cache=True): token_cache = self._adal_token_cache if use_token_cache else None - authority = get_authority_url(tenant) - return self._auth_context_factory(authority, token_cache) + return self._auth_context_factory(tenant, token_cache) def _find_using_common_tenant(self, access_token, resource): import adal @@ -514,8 +513,7 @@ class CredsCache(object): cred_file.write(json.dumps(all_creds)) def retrieve_token_for_user(self, username, tenant, resource): - authority = get_authority_url(tenant) - context = self._auth_ctx_factory(authority, cache=self.adal_token_cache) + context = self._auth_ctx_factory(tenant, cache=self.adal_token_cache) token_entry = context.acquire_token(resource, username, _CLIENT_ID) if not token_entry: raise CLIError("Could not retrieve token from local cache, please run 'az login'.") @@ -530,8 +528,7 @@ class CredsCache(object): if not matched: raise CLIError("Please run 'az account set' to select active account.") cred = matched[0] - authority_url = get_authority_url(cred[_SERVICE_PRINCIPAL_TENANT]) - context = self._auth_ctx_factory(authority_url, None) + context = self._auth_ctx_factory(cred[_SERVICE_PRINCIPAL_TENANT], None) sp_auth = ServicePrincipalAuth(cred.get(_ACCESS_TOKEN, None) or cred.get(_SERVICE_PRINCIPAL_CERT_FILE, None)) token_entry = sp_auth.acquire_token(context, resource, sp_id)
login: expose ADFS flow for azure stack env
Azure/azure-cli
diff --git a/src/azure-cli-core/tests/test_profile.py b/src/azure-cli-core/tests/test_profile.py index ea3648494..90603c558 100644 --- a/src/azure-cli-core/tests/test_profile.py +++ b/src/azure-cli-core/tests/test_profile.py @@ -13,7 +13,7 @@ from adal import AdalError from azure.mgmt.resource.subscriptions.models import (SubscriptionState, Subscription, SubscriptionPolicies, SpendingLimit) from azure.cli.core._profile import (Profile, CredsCache, SubscriptionFinder, - ServicePrincipalAuth, CLOUD) + ServicePrincipalAuth, CLOUD, _AUTH_CTX_FACTORY) from azure.cli.core.util import CLIError @@ -451,6 +451,38 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method mock_auth_context.acquire_token.assert_called_once_with( mgmt_resource, self.user1, mock.ANY) + @mock.patch('adal.AuthenticationContext.acquire_token_with_username_password', autospec=True) + @mock.patch('adal.AuthenticationContext.acquire_token', autospec=True) + @mock.patch('azure.cli.core._profile.CLOUD', autospec=True) + def test_find_subscriptions_thru_username_password_adfs(self, mock_get_cloud, mock_acquire_token, + mock_acquire_token_username_password): + TEST_ADFS_AUTH_URL = 'https://adfs.local.azurestack.external/adfs' + + def test_acquire_token(self, resource, username, password, client_id): + global acquire_token_invoked + acquire_token_invoked = True + if (self.authority.url == TEST_ADFS_AUTH_URL and self.authority.is_adfs_authority): + return Test_Profile.token_entry1 + else: + raise ValueError('AuthContext was not initialized correctly for ADFS') + + mock_acquire_token_username_password.side_effect = test_acquire_token + mock_acquire_token.return_value = self.token_entry1 + mock_arm_client = mock.MagicMock() + mock_arm_client.tenants.list.return_value = [TenantStub(self.tenant_id)] + mock_arm_client.subscriptions.list.return_value = [self.subscription1] + mock_get_cloud.endpoints.active_directory = TEST_ADFS_AUTH_URL + finder = SubscriptionFinder(_AUTH_CTX_FACTORY, + None, + lambda _: mock_arm_client) + mgmt_resource = 'https://management.core.windows.net/' + # action + subs = finder.find_from_user_account(self.user1, 'bar', None, mgmt_resource) + + # assert + self.assertEqual([self.subscription1], subs) + self.assertTrue(acquire_token_invoked) + @mock.patch('adal.AuthenticationContext', autospec=True) @mock.patch('azure.cli.core._profile.logger', autospec=True) def test_find_subscriptions_thru_username_password_with_account_disabled(self, mock_logger,
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 3, "test_score": 0 }, "num_modified_files": 2 }
0.3
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==3.0.0 -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_cdn&subdirectory=src/command_modules/azure-cli-cdn -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_cognitiveservices&subdirectory=src/command_modules/azure-cli-cognitiveservices -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_cosmosdb&subdirectory=src/command_modules/azure-cli-cosmosdb -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_interactive&subdirectory=src/command_modules/azure-cli-interactive -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_rdbms&subdirectory=src/command_modules/azure-cli-rdbms -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_sf&subdirectory=src/command_modules/azure-cli-sf -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@46d5382995c2740df260704f270df0e5cac965a5#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.9 azure-graphrbac==0.30.0rc6 azure-keyvault==0.3.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==4.0.0 azure-mgmt-cdn==0.30.2 azure-mgmt-cognitiveservices==1.0.0 azure-mgmt-compute==1.0.0rc1 azure-mgmt-containerregistry==0.2.1 azure-mgmt-datalake-analytics==0.1.4 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.4 azure-mgmt-devtestlabs==2.0.0 azure-mgmt-dns==1.0.1 azure-mgmt-documentdb==0.1.3 azure-mgmt-iothub==0.2.2 azure-mgmt-keyvault==0.31.0 azure-mgmt-monitor==0.2.1 azure-mgmt-network==1.0.0rc3 azure-mgmt-nspkg==1.0.0 azure-mgmt-rdbms==0.1.0 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.1.0rc1 azure-mgmt-sql==0.4.0 azure-mgmt-storage==1.0.0rc1 azure-mgmt-trafficmanager==0.30.0 azure-mgmt-web==0.32.0 azure-monitor==0.3.0 azure-multiapi-storage==0.1.0 azure-nspkg==1.0.0 azure-servicefabric==5.6.130 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 futures==3.1.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 prompt-toolkit==3.0.36 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pydocumentdb==2.3.5 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 pytz==2025.2 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.7 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 vsts-cd-manager==1.0.2 wcwidth==0.2.13 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==3.0.0 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.9 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.3.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==4.0.0 - azure-mgmt-cdn==0.30.2 - azure-mgmt-cognitiveservices==1.0.0 - azure-mgmt-compute==1.0.0rc1 - azure-mgmt-containerregistry==0.2.1 - azure-mgmt-datalake-analytics==0.1.4 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.4 - azure-mgmt-devtestlabs==2.0.0 - azure-mgmt-dns==1.0.1 - azure-mgmt-documentdb==0.1.3 - azure-mgmt-iothub==0.2.2 - azure-mgmt-keyvault==0.31.0 - azure-mgmt-monitor==0.2.1 - azure-mgmt-network==1.0.0rc3 - azure-mgmt-nspkg==1.0.0 - azure-mgmt-rdbms==0.1.0 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.1.0rc1 - azure-mgmt-sql==0.4.0 - azure-mgmt-storage==1.0.0rc1 - azure-mgmt-trafficmanager==0.30.0 - azure-mgmt-web==0.32.0 - azure-monitor==0.3.0 - azure-multiapi-storage==0.1.0 - azure-nspkg==1.0.0 - azure-servicefabric==5.6.130 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - futures==3.1.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - prompt-toolkit==3.0.36 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pydocumentdb==2.3.5 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pytz==2025.2 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.7 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - vsts-cd-manager==1.0.2 - wcwidth==0.2.13 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password_adfs" ]
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_using_cert", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_service_principal_auth_client_cert" ]
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_create_account_without_subscriptions", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_create_account_without_subscriptions_without_tenant", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_create_token_cache", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_add_new_sp_creds", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_add_preexisting_sp_creds", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds_with_cert", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds_with_secret", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_new_token_added_by_adal", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_remove_creds", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_default_active_subscription_to_non_disabled_one", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_particular_tenent", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_id", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_interactive_from_particular_tenent", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_through_interactive_flow", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password_with_account_disabled", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_current_account_user", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info_for_logged_in_service_principal", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_login_credentials", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_login_credentials_for_graph_client", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_subscription", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_load_cached_tokens", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_logout", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_logout_all", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_normalize", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_service_principal_auth_client_secret", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_set_active_subscription", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_update_add_two_different_subscriptions", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_update_with_same_subscription_added_twice" ]
[]
MIT License
null
Azure__azure-cli-3441
2e672ea8757dd37052fb8131852eda28cd573cb2
2017-05-24 17:32:50
58aac4203905792244f4bb244910354fd44425d6
diff --git a/src/azure-cli-core/azure/cli/core/_profile.py b/src/azure-cli-core/azure/cli/core/_profile.py index 113eac669..17763237a 100644 --- a/src/azure-cli-core/azure/cli/core/_profile.py +++ b/src/azure-cli-core/azure/cli/core/_profile.py @@ -471,7 +471,6 @@ class SubscriptionFinder(object): temp_credentials[_ACCESS_TOKEN]) all_subscriptions.extend(subscriptions) - self.tenants = tenants return all_subscriptions def _find_using_specific_tenant(self, tenant, access_token): @@ -484,7 +483,7 @@ class SubscriptionFinder(object): for s in subscriptions: setattr(s, 'tenant_id', tenant) all_subscriptions.append(s) - self.tenants = [tenant] + self.tenants.append(tenant) return all_subscriptions diff --git a/src/command_modules/azure-cli-interactive/azclishell/_dump_commands.py b/src/command_modules/azure-cli-interactive/azclishell/_dump_commands.py index c1ccb67af..6fc3d1c26 100644 --- a/src/command_modules/azure-cli-interactive/azclishell/_dump_commands.py +++ b/src/command_modules/azure-cli-interactive/azclishell/_dump_commands.py @@ -14,6 +14,7 @@ import yaml from azure.cli.core.application import APPLICATION, Configuration from azure.cli.core.commands import _update_command_definitions, BLACKLISTED_MODS from azure.cli.core.help_files import helps +from azure.cli.core.commands.arm import add_id_parameters import azclishell.configuration as config @@ -48,6 +49,7 @@ def dump_command_table(): command_file = config.CONFIGURATION.get_help_files() install_modules() + add_id_parameters(CMD_TABLE) data = {} for cmd in CMD_TABLE: diff --git a/src/command_modules/azure-cli-interactive/azclishell/app.py b/src/command_modules/azure-cli-interactive/azclishell/app.py index 405bf53e3..6b653c00d 100644 --- a/src/command_modules/azure-cli-interactive/azclishell/app.py +++ b/src/command_modules/azure-cli-interactive/azclishell/app.py @@ -554,8 +554,7 @@ class Shell(object): CONFIG.load(os.path.join(azure_folder, 'az.json')) SESSION.load(os.path.join(azure_folder, 'az.sess'), max_age=3600) - config = Configuration() - self.app.initialize(config) + self.app.initialize(Configuration()) result = self.app.execute(args) self.last_exit = 0 diff --git a/src/command_modules/azure-cli-profile/HISTORY.rst b/src/command_modules/azure-cli-profile/HISTORY.rst index e0018b776..3eee49a32 100644 --- a/src/command_modules/azure-cli-profile/HISTORY.rst +++ b/src/command_modules/azure-cli-profile/HISTORY.rst @@ -6,6 +6,7 @@ Release History 2.0.5 (unreleased) * Output deprecating information on using '--expanded-view' * Add get-access-token command to provide raw AAD token +* Support login with a user account with no associated subscriptions 2.0.4 (2017-04-28) ++++++++++++++++++ diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/commands.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/commands.py index 24b237cec..69ca29b28 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/commands.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/commands.py @@ -64,6 +64,26 @@ def transform_vm_create_output(result): return None if isinstance(result, ClientRawResponse) else result +def transform_vm_usage_list(result): + result = list(result) + for item in result: + item.current_value = str(item.current_value) + item.limit = str(item.limit) + item.local_name = item.name.localized_value + return result + + +def transform_vm_usage_table(result): + transformed = [] + for item in result: + transformed.append(OrderedDict([ + ('Name', item['localName']), + ('CurrentValue', item['currentValue']), + ('Limit', item['limit']) + ])) + return transformed + + def transform_vm_list(vm_list): return [transform_vm(v) for v in vm_list] @@ -217,7 +237,7 @@ cli_command(__name__, 'vm image list-skus', mgmt_path.format(op_var, op_class, ' cli_command(__name__, 'vm image list', custom_path.format('list_vm_images')) # VM Usage -cli_command(__name__, 'vm list-usage', mgmt_path.format('usage_operations', 'UsageOperations', 'list'), cf_usage) +cli_command(__name__, 'vm list-usage', mgmt_path.format('usage_operations', 'UsageOperations', 'list'), cf_usage, transform=transform_vm_usage_list, table_transformer=transform_vm_usage_table) # VMSS cli_command(__name__, 'vmss delete', mgmt_path.format('virtual_machine_scale_sets_operations', 'VirtualMachineScaleSetsOperations', 'delete'), cf_vmss, no_wait_param='raw')
az vm list-usages needs table/tsv work Currently outputs like: ``` $ az vm list-usage --location westus Limit CurrentValue ------- -------------- 2000 100 4 10000 4 2000 100 4 100 100 100 100 100 100 100 100 100 100 24 48 8 100 100 100 100 2000 1 2000 4 ``` But should have a formatter written to provide output like ``` Name CurrentValue Limit ------------------- ------------- -------- standardMSFamily 1 2000 StandardDiskCount 0 100 PremiumDiskCount 1 100 [...] ``` In addition, when the `CurrentValue`values are 0, we should still show the 0 in `table` output, where it seems we suppress the 0 value now (it is in the JSON doc).
Azure/azure-cli
diff --git a/src/azure-cli-core/tests/test_profile.py b/src/azure-cli-core/tests/test_profile.py index ad9d05766..0b11ec681 100644 --- a/src/azure-cli-core/tests/test_profile.py +++ b/src/azure-cli-core/tests/test_profile.py @@ -255,7 +255,7 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method extended_info['endpoints'].active_directory) @mock.patch('adal.AuthenticationContext', autospec=True) - def test_create_account_without_subscriptions(self, mock_auth_context): + def test_create_account_without_subscriptions_thru_service_principal(self, mock_auth_context): mock_auth_context.acquire_token_with_client_credentials.return_value = self.token_entry1 mock_arm_client = mock.MagicMock() mock_arm_client.subscriptions.list.return_value = [] @@ -277,7 +277,42 @@ class Test_Profile(unittest.TestCase): # pylint: disable=too-many-public-method subscription_finder=finder) # assert - self.assertTrue(1, len(result)) + self.assertEqual(1, len(result)) + self.assertEqual(result[0]['id'], self.tenant_id) + self.assertEqual(result[0]['state'], 'Enabled') + self.assertEqual(result[0]['tenantId'], self.tenant_id) + self.assertEqual(result[0]['name'], 'N/A(tenant level account)') + + @mock.patch('adal.AuthenticationContext', autospec=True) + def test_create_account_without_subscriptions_thru_common_tenant(self, mock_auth_context): + mock_auth_context.acquire_token.return_value = self.token_entry1 + mock_auth_context.acquire_token_with_username_password.return_value = self.token_entry1 + tenant_object = mock.MagicMock() + tenant_object.id = "foo-bar" + tenant_object.tenant_id = self.tenant_id + mock_arm_client = mock.MagicMock() + mock_arm_client.subscriptions.list.return_value = [] + mock_arm_client.tenants.list.return_value = (x for x in [tenant_object]) + + finder = SubscriptionFinder(lambda _, _2: mock_auth_context, + None, + lambda _: mock_arm_client) + + storage_mock = {'subscriptions': []} + profile = Profile(storage_mock, use_global_creds_cache=False) + profile._management_resource_uri = 'https://management.core.windows.net/' + + # action + result = profile.find_subscriptions_on_login(False, + '1234', + 'my-secret', + False, + None, + allow_no_subscriptions=True, + subscription_finder=finder) + + # assert + self.assertEqual(1, len(result)) self.assertEqual(result[0]['id'], self.tenant_id) self.assertEqual(result[0]['state'], 'Enabled') self.assertEqual(result[0]['tenantId'], self.tenant_id)
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 1, "test_score": 3 }, "num_modified_files": 5 }
0.3
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==1.4.9 attrs==22.2.0 autopep8==1.2.4 azure-batch==3.0.0 -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_cdn&subdirectory=src/command_modules/azure-cli-cdn -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_cognitiveservices&subdirectory=src/command_modules/azure-cli-cognitiveservices -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_cosmosdb&subdirectory=src/command_modules/azure-cli-cosmosdb -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_interactive&subdirectory=src/command_modules/azure-cli-interactive -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_rdbms&subdirectory=src/command_modules/azure-cli-rdbms -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_sf&subdirectory=src/command_modules/azure-cli-sf -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@2e672ea8757dd37052fb8131852eda28cd573cb2#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.9 azure-graphrbac==0.30.0rc6 azure-keyvault==0.3.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==4.0.0 azure-mgmt-cdn==0.30.2 azure-mgmt-cognitiveservices==1.0.0 azure-mgmt-compute==1.0.0rc1 azure-mgmt-containerregistry==0.2.1 azure-mgmt-datalake-analytics==0.1.4 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.4 azure-mgmt-devtestlabs==2.0.0 azure-mgmt-dns==1.0.1 azure-mgmt-documentdb==0.1.3 azure-mgmt-iothub==0.2.2 azure-mgmt-keyvault==0.31.0 azure-mgmt-monitor==0.2.1 azure-mgmt-network==1.0.0rc3 azure-mgmt-nspkg==1.0.0 azure-mgmt-rdbms==0.1.0 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.1.0rc1 azure-mgmt-sql==0.4.0 azure-mgmt-storage==1.0.0rc1 azure-mgmt-trafficmanager==0.30.0 azure-mgmt-web==0.32.0 azure-monitor==0.3.0 azure-multiapi-storage==0.1.0 azure-nspkg==1.0.0 azure-servicefabric==5.6.130 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==4.2 cryptography==40.0.2 flake8==3.2.1 futures==3.1.1 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.7.0 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.5.3 mock==1.3.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pep8==1.7.1 pluggy==1.0.0 prompt-toolkit==3.0.36 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.2.0 pycparser==2.21 pydocumentdb==2.3.5 pyflakes==1.3.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.5.4 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 pytz==2025.2 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.7 tomli==1.2.3 typing-extensions==4.1.1 urllib3==1.16 vcrpy==1.10.3 vsts-cd-manager==1.0.2 wcwidth==0.2.13 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==1.4.9 - attrs==22.2.0 - autopep8==1.2.4 - azure-batch==3.0.0 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.9 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.3.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==4.0.0 - azure-mgmt-cdn==0.30.2 - azure-mgmt-cognitiveservices==1.0.0 - azure-mgmt-compute==1.0.0rc1 - azure-mgmt-containerregistry==0.2.1 - azure-mgmt-datalake-analytics==0.1.4 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.4 - azure-mgmt-devtestlabs==2.0.0 - azure-mgmt-dns==1.0.1 - azure-mgmt-documentdb==0.1.3 - azure-mgmt-iothub==0.2.2 - azure-mgmt-keyvault==0.31.0 - azure-mgmt-monitor==0.2.1 - azure-mgmt-network==1.0.0rc3 - azure-mgmt-nspkg==1.0.0 - azure-mgmt-rdbms==0.1.0 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.1.0rc1 - azure-mgmt-sql==0.4.0 - azure-mgmt-storage==1.0.0rc1 - azure-mgmt-trafficmanager==0.30.0 - azure-mgmt-web==0.32.0 - azure-monitor==0.3.0 - azure-multiapi-storage==0.1.0 - azure-nspkg==1.0.0 - azure-servicefabric==5.6.130 - cffi==1.15.1 - colorama==0.3.7 - coverage==4.2 - cryptography==40.0.2 - flake8==3.2.1 - futures==3.1.1 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.7.0 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.5.3 - mock==1.3.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pep8==1.7.1 - pip==9.0.1 - pluggy==1.0.0 - prompt-toolkit==3.0.36 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.2.0 - pycparser==2.21 - pydocumentdb==2.3.5 - pyflakes==1.3.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.5.4 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pytz==2025.2 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.7 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.16 - vcrpy==1.10.3 - vsts-cd-manager==1.0.2 - wcwidth==0.2.13 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_create_account_without_subscriptions_thru_common_tenant" ]
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_using_cert", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_service_principal_auth_client_cert" ]
[ "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_create_account_without_subscriptions_thru_service_principal", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_create_account_without_subscriptions_without_tenant", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_create_token_cache", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_add_new_sp_creds", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_add_preexisting_sp_creds", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds_with_cert", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds_with_secret", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_new_token_added_by_adal", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_credscache_remove_creds", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_default_active_subscription_to_non_disabled_one", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_particular_tenent", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_id", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_interactive_from_particular_tenent", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_through_interactive_flow", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password_adfs", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password_with_account_disabled", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_current_account_user", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_expanded_subscription_info_for_logged_in_service_principal", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_login_credentials", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_login_credentials_for_graph_client", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_raw_token", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_get_subscription", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_load_cached_tokens", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_logout", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_logout_all", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_normalize", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_service_principal_auth_client_secret", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_set_active_subscription", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_update_add_two_different_subscriptions", "src/azure-cli-core/tests/test_profile.py::Test_Profile::test_update_with_same_subscription_added_twice" ]
[]
MIT License
null
Azure__azure-cli-3643
c024331912bbf467725d76d437557ebc6e4aba17
2017-06-09 16:51:58
eb12ac454cbe1ddb59c86cdf2045e1912660e750
diff --git a/doc/configuring_your_machine.md b/doc/configuring_your_machine.md index 7af498348..a4cbd442c 100644 --- a/doc/configuring_your_machine.md +++ b/doc/configuring_your_machine.md @@ -72,7 +72,7 @@ The repo has a launch.json file that will launch the version of Python that is f #### OSX/Ubuntu (bash): ```Shell - source <clone root>/env/scripts/activate + . <clone root>/env/bin/activate ``` #### Windows: diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py index fd4342d86..5e0d8d925 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py @@ -679,8 +679,8 @@ def _validate_admin_password(password, os_type): max_length = 72 if is_linux else 123 min_length = 12 if len(password) not in range(min_length, max_length + 1): - raise CLIError('The pssword length must be between {} and {}'.format(min_length, - max_length)) + raise CLIError('The password length must be between {} and {}'.format(min_length, + max_length)) contains_lower = re.findall('[a-z]+', password) contains_upper = re.findall('[A-Z]+', password) contains_digit = re.findall('[0-9]+', password)
The error message for too short/long password for VM is spelled incorrectly (pssword) We even have a test that verifies that it is incorrectly spelled :)
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-vm/tests/test_vm_actions.py b/src/command_modules/azure-cli-vm/tests/test_vm_actions.py index 800a04d14..45f0b6e8c 100644 --- a/src/command_modules/azure-cli-vm/tests/test_vm_actions.py +++ b/src/command_modules/azure-cli-vm/tests/test_vm_actions.py @@ -117,7 +117,7 @@ class TestActions(unittest.TestCase): def test_validate_admin_password_linux(self): # pylint: disable=line-too-long - err_length = 'The pssword length must be between 12 and 72' + err_length = 'The password length must be between 12 and 72' err_variety = 'Password must have the 3 of the following: 1 lower case character, 1 upper case character, 1 number and 1 special character' self._verify_password_with_ex('te', 'linux', err_length) @@ -129,7 +129,7 @@ class TestActions(unittest.TestCase): def test_validate_admin_password_windows(self): # pylint: disable=line-too-long - err_length = 'The pssword length must be between 12 and 123' + err_length = 'The password length must be between 12 and 123' err_variety = 'Password must have the 3 of the following: 1 lower case character, 1 upper case character, 1 number and 1 special character' self._verify_password_with_ex('P1', 'windows', err_length)
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 2, "test_score": 0 }, "num_modified_files": 2 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==2.11.7 attrs==22.2.0 autopep8==2.0.4 azure-batch==3.0.0 -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_billing&subdirectory=src/command_modules/azure-cli-billing -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_cdn&subdirectory=src/command_modules/azure-cli-cdn -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_cognitiveservices&subdirectory=src/command_modules/azure-cli-cognitiveservices -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_consumption&subdirectory=src/command_modules/azure-cli-consumption -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_cosmosdb&subdirectory=src/command_modules/azure-cli-cosmosdb -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_interactive&subdirectory=src/command_modules/azure-cli-interactive -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_rdbms&subdirectory=src/command_modules/azure-cli-rdbms -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_sf&subdirectory=src/command_modules/azure-cli-sf -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@c024331912bbf467725d76d437557ebc6e4aba17#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.9 azure-graphrbac==0.30.0rc6 azure-keyvault==0.3.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==4.0.0 azure-mgmt-billing==0.1.0 azure-mgmt-cdn==0.30.2 azure-mgmt-cognitiveservices==1.0.0 azure-mgmt-compute==1.0.0rc1 azure-mgmt-consumption==0.1.0 azure-mgmt-containerregistry==0.2.1 azure-mgmt-datalake-analytics==0.1.4 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.4 azure-mgmt-devtestlabs==2.0.0 azure-mgmt-dns==1.0.1 azure-mgmt-documentdb==0.1.3 azure-mgmt-iothub==0.2.2 azure-mgmt-keyvault==0.31.0 azure-mgmt-monitor==0.2.1 azure-mgmt-network==1.0.0rc3 azure-mgmt-nspkg==1.0.0 azure-mgmt-rdbms==0.1.0 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.1.0rc1 azure-mgmt-sql==0.5.1 azure-mgmt-storage==1.0.0rc1 azure-mgmt-trafficmanager==0.30.0 azure-mgmt-web==0.32.0 azure-monitor==0.3.0 azure-multiapi-storage==0.1.0 azure-nspkg==1.0.0 azure-servicefabric==5.6.130 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==6.2 cryptography==40.0.2 flake8==5.0.4 futures==3.1.1 humanfriendly==2.4 idna==3.10 importlib-metadata==4.2.0 iniconfig==1.1.1 isodate==0.7.0 isort==5.10.1 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.7.0 mock==5.2.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pluggy==1.0.0 prompt-toolkit==3.0.36 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.10.0 pycparser==2.21 pydocumentdb==2.3.5 pyflakes==2.5.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.7.1 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 pytz==2025.2 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.7 tomli==1.2.3 typed-ast==1.5.5 typing-extensions==4.1.1 urllib3==1.26.20 urllib3-secure-extra==0.1.0 vcrpy==1.10.3 vsts-cd-manager==1.0.2 wcwidth==0.2.13 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==2.11.7 - attrs==22.2.0 - autopep8==2.0.4 - azure-batch==3.0.0 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.9 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.3.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==4.0.0 - azure-mgmt-billing==0.1.0 - azure-mgmt-cdn==0.30.2 - azure-mgmt-cognitiveservices==1.0.0 - azure-mgmt-compute==1.0.0rc1 - azure-mgmt-consumption==0.1.0 - azure-mgmt-containerregistry==0.2.1 - azure-mgmt-datalake-analytics==0.1.4 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.4 - azure-mgmt-devtestlabs==2.0.0 - azure-mgmt-dns==1.0.1 - azure-mgmt-documentdb==0.1.3 - azure-mgmt-iothub==0.2.2 - azure-mgmt-keyvault==0.31.0 - azure-mgmt-monitor==0.2.1 - azure-mgmt-network==1.0.0rc3 - azure-mgmt-nspkg==1.0.0 - azure-mgmt-rdbms==0.1.0 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.1.0rc1 - azure-mgmt-sql==0.5.1 - azure-mgmt-storage==1.0.0rc1 - azure-mgmt-trafficmanager==0.30.0 - azure-mgmt-web==0.32.0 - azure-monitor==0.3.0 - azure-multiapi-storage==0.1.0 - azure-nspkg==1.0.0 - azure-servicefabric==5.6.130 - cffi==1.15.1 - colorama==0.3.7 - coverage==6.2 - cryptography==40.0.2 - flake8==5.0.4 - futures==3.1.1 - humanfriendly==2.4 - idna==3.10 - importlib-metadata==4.2.0 - iniconfig==1.1.1 - isodate==0.7.0 - isort==5.10.1 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.7.0 - mock==5.2.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pip==9.0.1 - pluggy==1.0.0 - prompt-toolkit==3.0.36 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.10.0 - pycparser==2.21 - pydocumentdb==2.3.5 - pyflakes==2.5.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.7.1 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pytz==2025.2 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.7 - tomli==1.2.3 - typed-ast==1.5.5 - typing-extensions==4.1.1 - urllib3==1.26.20 - urllib3-secure-extra==0.1.0 - vcrpy==1.10.3 - vsts-cd-manager==1.0.2 - wcwidth==0.2.13 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-vm/tests/test_vm_actions.py::TestActions::test_validate_admin_password_linux", "src/command_modules/azure-cli-vm/tests/test_vm_actions.py::TestActions::test_validate_admin_password_windows" ]
[]
[ "src/command_modules/azure-cli-vm/tests/test_vm_actions.py::TestActions::test_figure_out_storage_source", "src/command_modules/azure-cli-vm/tests/test_vm_actions.py::TestActions::test_generate_specfied_ssh_key_files", "src/command_modules/azure-cli-vm/tests/test_vm_actions.py::TestActions::test_get_next_subnet_addr_suffix", "src/command_modules/azure-cli-vm/tests/test_vm_actions.py::TestActions::test_parse_image_argument", "src/command_modules/azure-cli-vm/tests/test_vm_actions.py::TestActions::test_source_storage_account_err_case", "src/command_modules/azure-cli-vm/tests/test_vm_actions.py::TestActions::test_validate_admin_username_linux", "src/command_modules/azure-cli-vm/tests/test_vm_actions.py::TestActions::test_validate_admin_username_windows" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_azure-cli-3643
Azure__azure-cli-3645
fb9f2e795d88105549c8552dd7a38136a3fdfda0
2017-06-09 17:35:19
eb12ac454cbe1ddb59c86cdf2045e1912660e750
diff --git a/azure-cli.pyproj b/azure-cli.pyproj index 3fdf7cd0a..ea34c0dd2 100644 --- a/azure-cli.pyproj +++ b/azure-cli.pyproj @@ -592,6 +592,8 @@ </Compile> <Compile Include="command_modules\azure-cli-resource\azure_bdist_wheel.py" /> <Compile Include="command_modules\azure-cli-resource\tests\test_api_check.py" /> + <Compile Include="command_modules\azure-cli-resource\tests\test_custom.py" /> + <Compile Include="command_modules\azure-cli-resource\tests\test_locks.py" /> <Compile Include="command_modules\azure-cli-resource\tests\test_resource.py" /> <Compile Include="command_modules\azure-cli-resource\tests\test_resource_list_odata_filter.py" /> <Compile Include="command_modules\azure-cli-resource\tests\test_resource_validators.py" /> @@ -1119,7 +1121,6 @@ <Content Include="command_modules\azure-cli-resource\tests\sample_policy_rule.json" /> <Content Include="command_modules\azure-cli-resource\tests\crossrg_deploy.json" /> <Content Include="command_modules\azure-cli-resource\tests\simple_deploy.json" /> - <Content Include="command_modules\azure-cli-resource\tests\crossrg_deploy_parameters.json" /> <Content Include="command_modules\azure-cli-resource\tests\simple_deploy_parameters.json" /> <Content Include="command_modules\azure-cli-role\HISTORY.rst" /> <Content Include="command_modules\azure-cli-sf\HISTORY.rst" /> diff --git a/src/command_modules/azure-cli-interactive/azclishell/app.py b/src/command_modules/azure-cli-interactive/azclishell/app.py index 81fd00581..628a98763 100644 --- a/src/command_modules/azure-cli-interactive/azclishell/app.py +++ b/src/command_modules/azure-cli-interactive/azclishell/app.py @@ -435,12 +435,6 @@ class Shell(object): elif text.strip() == CLEAR_WORD: outside = True cmd = CLEAR_WORD - if '--version' in text: - try: - continue_flag = True - show_version_info_exit(sys.stdout) - except SystemExit: - pass if text: if text[0] == SELECT_SYMBOL['outside']: cmd = text[1:] @@ -459,7 +453,12 @@ class Shell(object): elif text[0] == SELECT_SYMBOL['query']: # query previous output continue_flag = self.handle_jmespath_query(text, continue_flag) - + elif text[0] == '--version' or text[0] == '-v': + try: + continue_flag = True + show_version_info_exit(sys.stdout) + except SystemExit: + pass elif "|" in text or ">" in text: # anything I don't parse, send off outside = True cmd = "az " + cmd diff --git a/src/command_modules/azure-cli-resource/HISTORY.rst b/src/command_modules/azure-cli-resource/HISTORY.rst index bcad7f816..6c6a7856b 100644 --- a/src/command_modules/azure-cli-resource/HISTORY.rst +++ b/src/command_modules/azure-cli-resource/HISTORY.rst @@ -5,7 +5,8 @@ Release History unreleased ++++++++++++++++++ -Fix --resource-type parsing for the lock command to accept <resource-namespace>/<resource-type> +* Fix --resource-type parsing for the lock command to accept <resource-namespace>/<resource-type> +* Add support for specifying deployment parameters using KEY=VALUE syntax. 2.0.7 (2017-05-30) ++++++++++++++++++ diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py index 0809a3a5f..63b8529a5 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py @@ -281,6 +281,12 @@ helps['group deployment'] = """ helps['group deployment create'] = """ type: command short-summary: Start a deployment. + parameters: + - name: --parameters + short-summary: Supply deployment parameter values. + long-summary: > + Parameters may be supplied from a parameters file, raw JSON (which can be loaded using `@<file path>` syntax, or as <KEY=VALUE> pairs. Parameters are evaluated in order, so when a value is assigned twice, the latter value will be used. + It is recommended that you supply your parameters file first, and then override selectively using KEY=VALUE syntax (example: --parameters params.json --parameters location=westus) examples: - name: Create a deployment from a remote template file. text: > @@ -288,6 +294,9 @@ helps['group deployment create'] = """ - name: Create a deployment from a local template file and use parameter values in a string. text: > az group deployment create -g MyResourceGroup --template-file azuredeploy.json --parameters "{\\"location\\": {\\"value\\": \\"westus\\"}}" + - name: Create a deployment from a local template, use a parameter file and selectively override parameters. + text: > + az group deployment create -g MyResourceGroup --template-file azuredeploy.json --parameters params.json --parameters MyValue=This MyArray=@array.json """ helps['group deployment export'] = """ type: command @@ -296,6 +305,12 @@ helps['group deployment export'] = """ helps['group deployment validate'] = """ type: command short-summary: Validate whether the specified template is syntactically correct and will be accepted by Azure Resource Manager. + parameters: + - name: --parameters + short-summary: Supply deployment parameter values. + long-summary: > + Parameters may be supplied from a parameters file, raw JSON (which can be loaded using `@<file path>` syntax, or as <KEY=VALUE> pairs. Parameters are evaluated in order, so when a value is assigned twice, the latter value will be used. + It is recommended that you supply your parameters file first, and then override selectively using KEY=VALUE syntax (example: --parameters params.json --parameters location=westus) """ helps['group deployment wait'] = """ type: command diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_params.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_params.py index 6f636d9cf..104f4cb98 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_params.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_params.py @@ -15,7 +15,7 @@ from azure.cli.core.commands.parameters import (ignore_type, resource_group_name enum_choice_list, no_wait_type, file_type) from .custom import (get_policy_completion_list, get_policy_assignment_completion_list, get_resource_types_completion_list, get_providers_completion_list) -from ._validators import validate_deployment_name, validate_lock_parameters +from ._validators import process_deployment_create_namespace, validate_lock_parameters, validate_deployment_parameters # BASIC PARAMETER CONFIGURATION @@ -72,15 +72,19 @@ register_cli_argument('policy assignment', 'policy', help='policy name or fully register_cli_argument('group', 'tag', tag_type) register_cli_argument('group', 'tags', tags_type) register_cli_argument('group', 'resource_group_name', resource_group_name_type, options_list=('--name', '-n')) + register_cli_argument('group deployment', 'resource_group_name', arg_type=resource_group_name_type, completer=get_resource_group_completion_list) register_cli_argument('group deployment', 'deployment_name', options_list=('--name', '-n'), required=True, help='The deployment name.') -register_cli_argument('group deployment', 'parameters', action='append', completer=FilesCompleter(), help="provide deployment parameter values, either json string, or use `@<file path>` to load from a file. Can be repeated. If a the same parameter is present in multiple arguments, the last value wins.") register_cli_argument('group deployment', 'template_file', completer=FilesCompleter(), type=file_type, help="a template file path in the file system") register_cli_argument('group deployment', 'template_uri', help='a uri to a remote template file') register_cli_argument('group deployment', 'mode', help='Incremental (only add resources to resource group) or Complete (remove extra resources from resource group)', **enum_choice_list(DeploymentMode)) + register_cli_argument('group deployment create', 'deployment_name', options_list=('--name', '-n'), required=False, - validator=validate_deployment_name, help='The deployment name. Default to template file base name') + validator=process_deployment_create_namespace, help='The deployment name. Default to template file base name') +register_cli_argument('group deployment', 'parameters', action='append', nargs='+', completer=FilesCompleter(), validator=validate_deployment_parameters) + register_cli_argument('group deployment operation show', 'operation_ids', nargs='+', help='A list of operation ids to show') + register_cli_argument('group export', 'include_comments', action='store_true') register_cli_argument('group export', 'include_parameter_default_value', action='store_true') register_cli_argument('group create', 'rg_name', options_list=('--name', '-n'), help='name of the new resource group', completer=None) diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_validators.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_validators.py index 4348e2b7b..fd6531210 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_validators.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_validators.py @@ -14,7 +14,7 @@ except ImportError: from azure.cli.core.util import CLIError -def validate_deployment_name(namespace): +def _validate_deployment_name(namespace): # If missing,try come out with a name associated with the template name if namespace.deployment_name is None: template_filename = None @@ -29,6 +29,55 @@ def validate_deployment_name(namespace): namespace.deployment_name = 'deployment1' +def validate_deployment_parameters(namespace): + + from azure.cli.core.util import shell_safe_json_parse, get_file_json + + def _try_parse_json_object(value): + try: + parsed = shell_safe_json_parse(value) + return parsed.get('parameters', parsed) + except CLIError: + return None + + def _try_load_file_object(value): + if os.path.isfile(value): + parsed = get_file_json(value, throw_on_empty=False) + return parsed.get('parameters', parsed) + return None + + def _try_parse_key_value_object(parameters, value): + try: + key, value = value.split('=', 1) + except ValueError: + return False + + try: + parameters[key] = {'value': shell_safe_json_parse(value)} + except (ValueError, CLIError): + parameters[key] = {'value': value} + + return True + + parameters = {} + for params in namespace.parameters or []: + for item in params: + if not _try_parse_key_value_object(parameters, item): + param_obj = _try_load_file_object(item) or _try_parse_json_object(item) + if not param_obj: + raise CLIError('Unable to parse parameter: {}'.format(item)) + parameters.update(param_obj) + + namespace.parameters = parameters + + +def process_deployment_create_namespace(namespace): + if (namespace.template_uri and namespace.template_file) or \ + (not namespace.template_uri and not namespace.template_file): + raise CLIError('incorrect usage: --template-file FILE | --template-uri URI') + _validate_deployment_name(namespace) + + def internal_validate_lock_parameters(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name): if resource_group_name is None: diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/custom.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/custom.py index eac565632..7e578d808 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/custom.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/custom.py @@ -293,19 +293,6 @@ def _prompt_for_parameters(missing_parameters): return result -def _merge_parameters(parameter_list): - parameters = None - for params in parameter_list or []: - params_object = shell_safe_json_parse(params) - if params_object: - params_object = params_object.get('parameters', params_object) - if parameters is None: - parameters = params_object - else: - parameters.update(params_object) - return parameters - - def _get_missing_parameters(parameters, template, prompt_fn): missing = _find_missing_parameters(parameters, template) if missing: @@ -331,19 +318,13 @@ def _urlretrieve(url): def _deploy_arm_template_core(resource_group_name, # pylint: disable=too-many-arguments template_file=None, template_uri=None, deployment_name=None, - parameter_list=None, mode='incremental', validate_only=False, + parameters=None, mode='incremental', validate_only=False, no_wait=False): DeploymentProperties, TemplateLink = get_sdk(ResourceType.MGMT_RESOURCE_RESOURCES, 'DeploymentProperties', 'TemplateLink', mod='models') - - if bool(template_uri) == bool(template_file): - raise CLIError('please provide either template file path or uri, but not both') - - parameters = _merge_parameters(parameter_list) - if parameters is None: - parameters = {} + parameters = parameters or {} template = None template_link = None template_obj = None diff --git a/src/command_modules/azure-cli-storage/HISTORY.rst b/src/command_modules/azure-cli-storage/HISTORY.rst index 10bcec411..89d769875 100644 --- a/src/command_modules/azure-cli-storage/HISTORY.rst +++ b/src/command_modules/azure-cli-storage/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +unreleased ++++++++++++++++++ + +* Fix #3592: convert generator to a list in download batch command dry run mode + 2.0.7 (2017-05-30) ++++++++++++++++++ diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/blob.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/blob.py index 5f09afc71..70c62ae87 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/blob.py +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/blob.py @@ -109,7 +109,7 @@ def storage_blob_download_batch(client, source, destination, source_container_na The pattern is used for files globbing. The supported patterns are '*', '?', '[seq]', and '[!seq]'. """ - source_blobs = collect_blobs(client, source_container_name, pattern) + source_blobs = list(collect_blobs(client, source_container_name, pattern)) if dryrun: logger = get_az_logger(__name__)
Public IP creation with --version parameter ### Description When I run the following command it should create IPv4 IP address but as an output I get versions of each Azure CLI modules **Command** network public-ip create --name linuxvm --resource-group clivm --allocation-method Dynamic --location southeastasia --version "IPv4" --verbose **Output** azure-cli (2.0.6) acr (2.0.4) acs (2.0.6) appservice (0.1.6) batch (2.0.4) cdn (0.0.2) cloud (2.0.2) cognitiveservices (0.1.2) command-modules-nspkg (2.0.0) component (2.0.4) configure (2.0.6) core (2.0.6) cosmosdb (0.1.6) dla (0.0.6) dls (0.0.6) feedback (2.0.2) find (0.2.2) interactive (0.3.1) iot (0.1.5) keyvault (2.0.4) lab (0.0.4) monitor (0.0.4) network (2.0.6) nspkg (3.0.0) profile (2.0.4) rdbms (0.0.1) redis (0.2.3) resource (2.0.6) role (2.0.4) sf (1.0.1) sql (2.0.3) storage (2.0.6) vm (2.0.6) Python (Windows) 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe' What I did was I remove the version parameter and run the command and It works as I expected **Command** az network public-ip create --name linuxvm-ip --resource-group clivm --location southeastasia --verbose **Output** ``` { "publicIp": { "dnsSettings": null, "etag": "W/\"e102dba5-471b-49c9-a6c6-55db94c410a8\"", "id": "/subscriptions/<SubscriptionID>/resourceGroups/clivm/providers/Microsoft.Network/publicIPAddresses/linuxvm-ip", "idleTimeoutInMinutes": 4, "ipAddress": null, "ipConfiguration": null, "location": "southeastasia", "name": "linuxvm-ip", "provisioningState": "Succeeded", "publicIpAddressVersion": "IPv4", "publicIpAllocationMethod": "Dynamic", "resourceGroup": "clivm", "resourceGuid": "6c3bdf50-acbd-4395-8b81-20f73215f85c", "tags": null, "type": "Microsoft.Network/publicIPAddresses" } } ``` --- ### Environment summary **Install Method:** How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly) Answer here: MSI **CLI Version:** What version of the CLI and modules are installed? (Use `az --version`) Answer here: azure-cli (2.0.6) **OS Version:** What OS and version are you using? Answer here: Windows 10 Creates Update **Shell Type:** What shell are you using? (e.g. bash, cmd.exe, Bash on Windows) Answer here: CMD.exe
Azure/azure-cli
diff --git a/src/azure-cli-testsdk/azure/cli/testsdk/__init__.py b/src/azure-cli-testsdk/azure/cli/testsdk/__init__.py index bc8662e4b..ba11839ae 100644 --- a/src/azure-cli-testsdk/azure/cli/testsdk/__init__.py +++ b/src/azure-cli-testsdk/azure/cli/testsdk/__init__.py @@ -10,11 +10,11 @@ from .exceptions import CliTestError from .checkers import (JMESPathCheck, JMESPathCheckExists, JMESPathCheckGreaterThan, NoneCheck, StringCheck, StringContainCheck) from .decorators import live_only, record_only, api_version_constraint -from .utilities import get_sha1_hash, get_active_api_profile +from .utilities import get_sha1_hash, get_active_api_profile, create_random_name __all__ = ['ScenarioTest', 'LiveTest', 'ResourceGroupPreparer', 'StorageAccountPreparer', 'RoleBasedServicePrincipalPreparer', 'CliTestError', 'JMESPathCheck', 'JMESPathCheckExists', 'NoneCheck', 'live_only', 'record_only', 'StringCheck', 'StringContainCheck', 'get_sha1_hash', 'KeyVaultPreparer', - 'JMESPathCheckGreaterThan', 'api_version_constraint', 'get_active_api_profile'] + 'JMESPathCheckGreaterThan', 'api_version_constraint', 'get_active_api_profile', 'create_random_name'] __version__ = '0.1.0+dev' diff --git a/src/command_modules/azure-cli-resource/tests/crossrg_deploy_parameters.json b/src/command_modules/azure-cli-resource/tests/crossrg_deploy_parameters.json deleted file mode 100644 index 326d026b5..000000000 --- a/src/command_modules/azure-cli-resource/tests/crossrg_deploy_parameters.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "CrossRg": { - "value": "crossrg5" - } -} \ No newline at end of file diff --git a/src/command_modules/azure-cli-resource/tests/recordings/latest/test_crossrg_deployment.yaml b/src/command_modules/azure-cli-resource/tests/recordings/latest/test_crossrg_deployment.yaml new file mode 100644 index 000000000..a7b30f4f1 --- /dev/null +++ b/src/command_modules/azure-cli-resource/tests/recordings/latest/test_crossrg_deployment.yaml @@ -0,0 +1,358 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"use": "az-test"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.7+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cross_rg_alt000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_alt000001","name":"cli_test_cross_rg_alt000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 08 Jun 2017 22:26:13 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: '{"location": "westus", "tags": {"use": "az-test"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.7+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cross_rg_deploy000002?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_deploy000002","name":"cli_test_cross_rg_deploy000002","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 08 Jun 2017 22:26:13 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: 'b''{"properties": {"template": {"parameters": {"StorageAccountName1": {"defaultValue": + "test1ddosdatest72", "type": "string"}, "CrossRg": {"defaultValue": "crossrg5", + "type": "string"}, "StorageAccountName2": {"defaultValue": "test1ddfosatdest73", + "type": "string"}}, "resources": [{"type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", "resourceGroup": "[parameters(\''CrossRg\'')]", + "properties": {"template": {"parameters": {}, "variables": {}, "resources": + [{"location": "West US", "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", + "properties": {"accountType": "Standard_LRS"}, "name": "[parameters(\''StorageAccountName2\'')]"}], + "contentVersion": "1.0.0.0", "outputs": {"result": {"type": "string", "value": + "Hello World"}}, "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"}, + "parameters": {}, "mode": "Incremental"}, "name": "nestedTemplate"}, {"location": + "West US", "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", + "properties": {"accountType": "Standard_LRS"}, "name": "[parameters(\''StorageAccountName1\'')]"}], + "contentVersion": "1.0.0.0", "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "variables": {}}, "parameters": {"CrossRG": {"value": "cli_test_cross_rg_alt000001"}, + "StorageAccountName1": {"value": "crossrgp5wppipax4z7o6e6w"}, "StorageAccountName2": + {"value": "crossrgzvmoqv4i6g5qorlsx"}}, "mode": "Incremental"}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment validate] + Connection: [keep-alive] + Content-Length: ['1523'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.7+dev] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Resources/deployments/mock-deployment/validate?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Resources/deployments/deployment_dry_run","name":"deployment_dry_run","properties":{"templateHash":"6460444355167324412","parameters":{"storageAccountName1":{"type":"String","value":"crossrgp5wppipax4z7o6e6w"},"crossRg":{"type":"String","value":"cli_test_cross_rg_alt000001"},"storageAccountName2":{"type":"String","value":"crossrgzvmoqv4i6g5qorlsx"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T22:26:14.8490106Z","duration":"PT0S","correlationId":"7b44a22d-229b-4ee2-9d82-d20752edfcc9","providers":[{"namespace":"Microsoft.Resources","resourceTypes":[{"resourceType":"deployments","locations":[null]}]},{"namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["westus"]}]}],"dependencies":[],"validatedResources":[{"apiVersion":"2015-06-15","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_alt000001/providers/Microsoft.Storage/storageAccounts/crossrgzvmoqv4i6g5qorlsx","name":"crossrgzvmoqv4i6g5qorlsx","type":"Microsoft.Storage/storageAccounts","location":"West + US","properties":{"accountType":"Standard_LRS"}},{"apiVersion":"2015-06-15","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Storage/storageAccounts/crossrgp5wppipax4z7o6e6w","name":"crossrgp5wppipax4z7o6e6w","type":"Microsoft.Storage/storageAccounts","location":"West + US","properties":{"accountType":"Standard_LRS"}}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1787'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 08 Jun 2017 22:26:15 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] + status: {code: 200, message: OK} +- request: + body: 'b''{"properties": {"template": {"parameters": {"StorageAccountName1": {"defaultValue": + "test1ddosdatest72", "type": "string"}, "CrossRg": {"defaultValue": "crossrg5", + "type": "string"}, "StorageAccountName2": {"defaultValue": "test1ddfosatdest73", + "type": "string"}}, "resources": [{"type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", "resourceGroup": "[parameters(\''CrossRg\'')]", + "properties": {"template": {"parameters": {}, "variables": {}, "resources": + [{"location": "West US", "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", + "properties": {"accountType": "Standard_LRS"}, "name": "[parameters(\''StorageAccountName2\'')]"}], + "contentVersion": "1.0.0.0", "outputs": {"result": {"type": "string", "value": + "Hello World"}}, "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"}, + "parameters": {}, "mode": "Incremental"}, "name": "nestedTemplate"}, {"location": + "West US", "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", + "properties": {"accountType": "Standard_LRS"}, "name": "[parameters(\''StorageAccountName1\'')]"}], + "contentVersion": "1.0.0.0", "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "variables": {}}, "parameters": {"CrossRG": {"value": "cli_test_cross_rg_alt000001"}}, + "mode": "Incremental"}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Length: ['1399'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.7+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Resources/deployments/azure-cli-crossrgdeployment","name":"azure-cli-crossrgdeployment","properties":{"templateHash":"6460444355167324412","parameters":{"storageAccountName1":{"type":"String","value":"test1ddosdatest72"},"crossRg":{"type":"String","value":"cli_test_cross_rg_alt000001"},"storageAccountName2":{"type":"String","value":"test1ddfosatdest73"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-06-08T22:26:16.4590461Z","duration":"PT0.1156655S","correlationId":"e34cadc6-f5fe-479f-8a01-44e81bb41b24","providers":[{"namespace":"Microsoft.Resources","resourceTypes":[{"resourceType":"deployments","locations":[null]}]},{"namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["westus"]}]}],"dependencies":[]}}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Resources/deployments/azure-cli-crossrgdeployment/operationStatuses/08587046461091342319?api-version=2017-05-10'] + cache-control: [no-cache] + content-length: ['998'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 08 Jun 2017 22:26:15 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.7+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587046461091342319?api-version=2017-05-10 + response: + body: {string: '{"status":"Running"}'} + headers: + cache-control: [no-cache] + content-length: ['20'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 08 Jun 2017 22:26:46 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.7+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587046461091342319?api-version=2017-05-10 + response: + body: {string: '{"status":"Succeeded"}'} + headers: + cache-control: [no-cache] + content-length: ['22'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 08 Jun 2017 22:27:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.7+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Resources/deployments/azure-cli-crossrgdeployment","name":"azure-cli-crossrgdeployment","properties":{"templateHash":"6460444355167324412","parameters":{"storageAccountName1":{"type":"String","value":"test1ddosdatest72"},"crossRg":{"type":"String","value":"cli_test_cross_rg_alt000001"},"storageAccountName2":{"type":"String","value":"test1ddfosatdest73"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T22:26:47.1155209Z","duration":"PT30.7721403S","correlationId":"e34cadc6-f5fe-479f-8a01-44e81bb41b24","providers":[{"namespace":"Microsoft.Resources","resourceTypes":[{"resourceType":"deployments","locations":[null]}]},{"namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["westus"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_alt000001/providers/Microsoft.Storage/storageAccounts/test1ddfosatdest73"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Storage/storageAccounts/test1ddosdatest72"}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1449'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 08 Jun 2017 22:27:16 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.7+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Resources/deployments/?api-version=2017-05-10 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Resources/deployments/azure-cli-crossrgdeployment","name":"azure-cli-crossrgdeployment","properties":{"templateHash":"6460444355167324412","parameters":{"storageAccountName1":{"type":"String","value":"test1ddosdatest72"},"crossRg":{"type":"String","value":"cli_test_cross_rg_alt000001"},"storageAccountName2":{"type":"String","value":"test1ddfosatdest73"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T22:26:47.1155209Z","duration":"PT30.7721403S","correlationId":"e34cadc6-f5fe-479f-8a01-44e81bb41b24","providers":[{"namespace":"Microsoft.Resources","resourceTypes":[{"resourceType":"deployments","locations":[null]}]},{"namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["westus"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_alt000001/providers/Microsoft.Storage/storageAccounts/test1ddfosatdest73"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Storage/storageAccounts/test1ddosdatest72"}]}}]}'} + headers: + cache-control: [no-cache] + content-length: ['1461'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 08 Jun 2017 22:27:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.7+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Resources/deployments/azure-cli-crossrgdeployment","name":"azure-cli-crossrgdeployment","properties":{"templateHash":"6460444355167324412","parameters":{"storageAccountName1":{"type":"String","value":"test1ddosdatest72"},"crossRg":{"type":"String","value":"cli_test_cross_rg_alt000001"},"storageAccountName2":{"type":"String","value":"test1ddfosatdest73"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T22:26:47.1155209Z","duration":"PT30.7721403S","correlationId":"e34cadc6-f5fe-479f-8a01-44e81bb41b24","providers":[{"namespace":"Microsoft.Resources","resourceTypes":[{"resourceType":"deployments","locations":[null]}]},{"namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["westus"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_alt000001/providers/Microsoft.Storage/storageAccounts/test1ddfosatdest73"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Storage/storageAccounts/test1ddosdatest72"}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1449'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 08 Jun 2017 22:27:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment operation list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.7+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cross_rg_deploy000002/deployments/mock-deployment/operations?api-version=2017-05-10 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Resources/deployments/azure-cli-crossrgdeployment/operations/6B3E905A350A7C59","operationId":"6B3E905A350A7C59","properties":{"provisioningOperation":"Create","provisioningState":"Succeeded","timestamp":"2017-06-08T22:26:37.0270964Z","duration":"PT20.0283016S","trackingId":"172cb8bd-7886-49e3-877a-e5ef6d9a8c4a","serviceRequestId":"e34cadc6-f5fe-479f-8a01-44e81bb41b24","statusCode":"OK","targetResource":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Storage/storageAccounts/test1ddosdatest72","resourceType":"Microsoft.Storage/storageAccounts","resourceName":"test1ddosdatest72"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Resources/deployments/azure-cli-crossrgdeployment/operations/CF64EB70E9F337E6","operationId":"CF64EB70E9F337E6","properties":{"provisioningOperation":"Create","provisioningState":"Succeeded","timestamp":"2017-06-08T22:26:46.9225479Z","duration":"PT29.9159043S","trackingId":"87c6f252-6875-4502-a74a-fda6f82dd85b","serviceRequestId":"093012e3-2474-4196-8031-cfae3b4b2220","statusCode":"OK","targetResource":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_alt000001/providers/Microsoft.Resources/deployments/nestedTemplate","resourceType":"Microsoft.Resources/deployments","resourceName":"nestedTemplate"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cross_rg_deploy000002/providers/Microsoft.Resources/deployments/azure-cli-crossrgdeployment/operations/08587046461091342319","operationId":"08587046461091342319","properties":{"provisioningOperation":"EvaluateDeploymentOutput","provisioningState":"Succeeded","timestamp":"2017-06-08T22:26:47.0894745Z","duration":"PT0.1183607S","trackingId":"f2549d7d-9ae3-424a-b604-6774cdd45af2","statusCode":"OK","statusMessage":null}}]}'} + headers: + cache-control: [no-cache] + content-length: ['2306'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 08 Jun 2017 22:27:18 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.7+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cross_rg_deploy000002?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 08 Jun 2017 22:27:18 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGQ1JPU1M6NUZSRzo1RkRFUExPWUhFSFJRVFlaWDZZWlk2Nnw5MDFFNjIyODI1NUZDNkFGLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + retry-after: ['15'] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.7+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_cross_rg_alt000001?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 08 Jun 2017 22:27:20 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGQ1JPU1M6NUZSRzo1RkFMVFNWV1YzWTZHRVZLT1JBUUVDS3xEOTNDMjc4QTZCOENERjFDLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + retry-after: ['15'] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-resource/tests/recordings/latest/test_crossrgdeployment.yaml b/src/command_modules/azure-cli-resource/tests/recordings/latest/test_crossrgdeployment.yaml deleted file mode 100644 index 5d855dc2b..000000000 --- a/src/command_modules/azure-cli-resource/tests/recordings/latest/test_crossrgdeployment.yaml +++ /dev/null @@ -1,290 +0,0 @@ -interactions: -- request: - body: '{"location": "westus", "tags": {"use": "az-test"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [group create] - Connection: [keep-alive] - Content-Length: ['50'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.4.3 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 - resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.5+dev] - accept-language: [en-US] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} - headers: - cache-control: [no-cache] - content-length: ['328'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 09 May 2017 00:08:59 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - status: {code: 201, message: Created} -- request: - body: '{"properties": {"mode": "Incremental", "parameters": {"CrossRg": {"value": - "crossrg5"}}, "template": {"resources": [{"resourceGroup": "[parameters(''CrossRg'')]", - "name": "nestedTemplate", "apiVersion": "2017-05-10", "type": "Microsoft.Resources/deployments", - "properties": {"mode": "Incremental", "parameters": {}, "template": {"contentVersion": - "1.0.0.0", "resources": [{"name": "[parameters(''StorageAccountName2'')]", "location": - "West US", "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", - "properties": {"accountType": "Standard_LRS"}}], "parameters": {}, "variables": - {}, "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "outputs": {"result": {"value": "Hello World", "type": "string"}}}}}, {"name": - "[parameters(''StorageAccountName1'')]", "location": "West US", "apiVersion": - "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "properties": {"accountType": - "Standard_LRS"}}], "parameters": {"StorageAccountName2": {"defaultValue": "test1ddfosatdest73", - "type": "string"}, "CrossRg": {"defaultValue": "crossrg5", "type": "string"}, - "StorageAccountName1": {"defaultValue": "test1ddosdatest72", "type": "string"}}, - "contentVersion": "1.0.0.0", "variables": {}, "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"}}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [group deployment validate] - Connection: [keep-alive] - Content-Length: ['1332'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.4.3 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 - resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.5+dev] - accept-language: [en-US] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment/validate?api-version=2017-05-10 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Resources/deployments/deployment_dry_run","name":"deployment_dry_run","properties":{"templateHash":"15881258606218895679","parameters":{"storageAccountName2":{"type":"String","value":"test1ddfosatdest73"},"crossRg":{"type":"String","value":"crossrg5"},"storageAccountName1":{"type":"String","value":"test1ddosdatest72"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-05-09T00:09:01.5553623Z","duration":"PT0S","correlationId":"55b7baef-a55c-40d9-9194-2478bb6e9842","providers":[{"namespace":"Microsoft.Resources","resourceTypes":[{"resourceType":"deployments","locations":[null]}]},{"namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["westus"]}]}],"dependencies":[],"validatedResources":[{"apiVersion":"2015-06-15","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/crossrg5/providers/Microsoft.Storage/storageAccounts/test1ddfosatdest73","name":"test1ddfosatdest73","type":"Microsoft.Storage/storageAccounts","location":"West - US","properties":{"accountType":"Standard_LRS"}},{"apiVersion":"2015-06-15","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/test1ddosdatest72","name":"test1ddosdatest72","type":"Microsoft.Storage/storageAccounts","location":"West - US","properties":{"accountType":"Standard_LRS"}}]}}'} - headers: - cache-control: [no-cache] - content-length: ['1615'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 09 May 2017 00:09:02 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - status: {code: 200, message: OK} -- request: - body: '{"properties": {"mode": "Incremental", "parameters": {"CrossRg": {"value": - "crossrg5"}}, "template": {"resources": [{"resourceGroup": "[parameters(''CrossRg'')]", - "name": "nestedTemplate", "apiVersion": "2017-05-10", "type": "Microsoft.Resources/deployments", - "properties": {"mode": "Incremental", "parameters": {}, "template": {"contentVersion": - "1.0.0.0", "resources": [{"name": "[parameters(''StorageAccountName2'')]", "location": - "West US", "apiVersion": "2015-06-15", "type": "Microsoft.Storage/storageAccounts", - "properties": {"accountType": "Standard_LRS"}}], "parameters": {}, "variables": - {}, "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "outputs": {"result": {"value": "Hello World", "type": "string"}}}}}, {"name": - "[parameters(''StorageAccountName1'')]", "location": "West US", "apiVersion": - "2015-06-15", "type": "Microsoft.Storage/storageAccounts", "properties": {"accountType": - "Standard_LRS"}}], "parameters": {"StorageAccountName2": {"defaultValue": "test1ddfosatdest73", - "type": "string"}, "CrossRg": {"defaultValue": "crossrg5", "type": "string"}, - "StorageAccountName1": {"defaultValue": "test1ddosdatest72", "type": "string"}}, - "contentVersion": "1.0.0.0", "variables": {}, "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"}}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [group deployment create] - Connection: [keep-alive] - Content-Length: ['1332'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.4.3 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 - resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.5+dev] - accept-language: [en-US] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Resources/deployments/azure-cli-crossrgdeployment","name":"azure-cli-crossrgdeployment","properties":{"templateHash":"15881258606218895679","parameters":{"storageAccountName2":{"type":"String","value":"test1ddfosatdest73"},"crossRg":{"type":"String","value":"crossrg5"},"storageAccountName1":{"type":"String","value":"test1ddosdatest72"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-05-09T00:09:03.6324823Z","duration":"PT0.1641726S","correlationId":"945b9424-c962-48d6-a889-95c77673a85b","providers":[{"namespace":"Microsoft.Resources","resourceTypes":[{"resourceType":"deployments","locations":[null]}]},{"namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["westus"]}]}],"dependencies":[]}}'} - headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/azure-cli-crossrgdeployment/operationStatuses/08587073183420093176?api-version=2017-05-10'] - cache-control: [no-cache] - content-length: ['932'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 09 May 2017 00:09:03 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1194'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [group deployment create] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.4.3 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 - resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.5+dev] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587073183420093176?api-version=2017-05-10 - response: - body: {string: '{"status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['20'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 09 May 2017 00:09:33 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [group deployment create] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.4.3 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 - resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.5+dev] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587073183420093176?api-version=2017-05-10 - response: - body: {string: '{"status":"Succeeded"}'} - headers: - cache-control: [no-cache] - content-length: ['22'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 09 May 2017 00:10:03 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [group deployment create] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.4.3 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 - resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.5+dev] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Resources/deployments/azure-cli-crossrgdeployment","name":"azure-cli-crossrgdeployment","properties":{"templateHash":"15881258606218895679","parameters":{"storageAccountName2":{"type":"String","value":"test1ddfosatdest73"},"crossRg":{"type":"String","value":"crossrg5"},"storageAccountName1":{"type":"String","value":"test1ddosdatest72"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-05-09T00:09:39.4989341Z","duration":"PT36.0306244S","correlationId":"945b9424-c962-48d6-a889-95c77673a85b","providers":[{"namespace":"Microsoft.Resources","resourceTypes":[{"resourceType":"deployments","locations":[null]}]},{"namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["westus"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/test1ddosdatest72"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/crossrg5/providers/Microsoft.Storage/storageAccounts/test1ddfosatdest73"}]}}'} - headers: - cache-control: [no-cache] - content-length: ['1316'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 09 May 2017 00:10:03 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [group deployment list] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.4.3 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 - resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.5+dev] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/?api-version=2017-05-10 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Resources/deployments/azure-cli-crossrgdeployment","name":"azure-cli-crossrgdeployment","properties":{"templateHash":"15881258606218895679","parameters":{"storageAccountName2":{"type":"String","value":"test1ddfosatdest73"},"crossRg":{"type":"String","value":"crossrg5"},"storageAccountName1":{"type":"String","value":"test1ddosdatest72"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-05-09T00:09:39.4989341Z","duration":"PT36.0306244S","correlationId":"945b9424-c962-48d6-a889-95c77673a85b","providers":[{"namespace":"Microsoft.Resources","resourceTypes":[{"resourceType":"deployments","locations":[null]}]},{"namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["westus"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/test1ddosdatest72"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/crossrg5/providers/Microsoft.Storage/storageAccounts/test1ddfosatdest73"}]}}]}'} - headers: - cache-control: [no-cache] - content-length: ['1328'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 09 May 2017 00:10:05 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [group deployment show] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.4.3 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 - resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.5+dev] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Resources/deployments/azure-cli-crossrgdeployment","name":"azure-cli-crossrgdeployment","properties":{"templateHash":"15881258606218895679","parameters":{"storageAccountName2":{"type":"String","value":"test1ddfosatdest73"},"crossRg":{"type":"String","value":"crossrg5"},"storageAccountName1":{"type":"String","value":"test1ddosdatest72"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-05-09T00:09:39.4989341Z","duration":"PT36.0306244S","correlationId":"945b9424-c962-48d6-a889-95c77673a85b","providers":[{"namespace":"Microsoft.Resources","resourceTypes":[{"resourceType":"deployments","locations":[null]}]},{"namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["westus"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/test1ddosdatest72"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/crossrg5/providers/Microsoft.Storage/storageAccounts/test1ddfosatdest73"}]}}'} - headers: - cache-control: [no-cache] - content-length: ['1316'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 09 May 2017 00:10:05 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [group deployment operation list] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.4.3 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 - resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.5+dev] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/deployments/mock-deployment/operations?api-version=2017-05-10 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Resources/deployments/azure-cli-crossrgdeployment/operations/A342124B645FB82B","operationId":"A342124B645FB82B","properties":{"provisioningOperation":"Create","provisioningState":"Succeeded","timestamp":"2017-05-09T00:09:29.4790792Z","duration":"PT25.4957973S","trackingId":"8ed1b6ed-3209-4800-8f07-04593e24f558","serviceRequestId":"945b9424-c962-48d6-a889-95c77673a85b","statusCode":"OK","targetResource":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/test1ddosdatest72","resourceType":"Microsoft.Storage/storageAccounts","resourceName":"test1ddosdatest72"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Resources/deployments/azure-cli-crossrgdeployment/operations/8B56071B2BB8A55C","operationId":"8B56071B2BB8A55C","properties":{"provisioningOperation":"Create","provisioningState":"Succeeded","timestamp":"2017-05-09T00:09:37.1004512Z","duration":"PT33.119443S","trackingId":"7bf79e18-9ef7-4cc3-bfae-688a63a76343","serviceRequestId":"685e1760-40fa-49f0-a170-0fbc4945bce3","statusCode":"OK","targetResource":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/crossrg5/providers/Microsoft.Resources/deployments/nestedTemplate","resourceType":"Microsoft.Resources/deployments","resourceName":"nestedTemplate"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Resources/deployments/azure-cli-crossrgdeployment/operations/08587073183420093176","operationId":"08587073183420093176","properties":{"provisioningOperation":"EvaluateDeploymentOutput","provisioningState":"Succeeded","timestamp":"2017-05-09T00:09:39.2608113Z","duration":"PT1.5100056S","trackingId":"b930c4d4-1174-4258-a7a0-fc01c721198e","statusCode":"OK","statusMessage":null}}]}'} - headers: - cache-control: [no-cache] - content-length: ['2238'] - content-type: [application/json; charset=utf-8] - date: ['Tue, 09 May 2017 00:10:06 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [group delete] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.4.3 (Windows-8-6.2.9200) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 - resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/2.0.5+dev] - accept-language: [en-US] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2017-05-10 - response: - body: {string: ''} - headers: - cache-control: [no-cache] - content-length: ['0'] - date: ['Tue, 09 May 2017 00:10:06 GMT'] - expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdPTlhZTEY3QkJDWFpUSEFTTFVOSFJJUVpaN0FKS0xGRVZJWnwyMTMzNjk4MUIyQTRERUVDLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] - pragma: [no-cache] - retry-after: ['15'] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - status: {code: 202, message: Accepted} -version: 1 diff --git a/src/command_modules/azure-cli-resource/tests/recordings/latest/test_group_deployment.yaml b/src/command_modules/azure-cli-resource/tests/recordings/latest/test_group_deployment.yaml index 66d6e1d6a..5e8b598db 100644 --- a/src/command_modules/azure-cli-resource/tests/recordings/latest/test_group_deployment.yaml +++ b/src/command_modules/azure-cli-resource/tests/recordings/latest/test_group_deployment.yaml @@ -1,102 +1,221 @@ interactions: - request: - body: !!binary | - eyJwcm9wZXJ0aWVzIjogeyJwYXJhbWV0ZXJzIjogeyJsb2NhdGlvbiI6IHsidmFsdWUiOiAid2Vz - dHVzIn0sICJuYW1lIjogeyJ2YWx1ZSI6ICJhenVyZS1jbGktZGVwbG95LXRlc3QtbnNnMSJ9fSwg - InRlbXBsYXRlIjogeyJ2YXJpYWJsZXMiOiB7fSwgIiRzY2hlbWEiOiAiaHR0cHM6Ly9zY2hlbWEu - bWFuYWdlbWVudC5henVyZS5jb20vc2NoZW1hcy8yMDE1LTAxLTAxL2RlcGxveW1lbnRUZW1wbGF0 - ZS5qc29uIyIsICJyZXNvdXJjZXMiOiBbeyJuYW1lIjogIltwYXJhbWV0ZXJzKCduYW1lJyldIiwg - ImRlcGVuZHNPbiI6IFtdLCAidHlwZSI6ICJNaWNyb3NvZnQuTmV0d29yay9uZXR3b3JrU2VjdXJp - dHlHcm91cHMiLCAicHJvcGVydGllcyI6IHsic2VjdXJpdHlSdWxlcyI6IFtdfSwgImxvY2F0aW9u - IjogIltwYXJhbWV0ZXJzKCdsb2NhdGlvbicpXSIsICJhcGlWZXJzaW9uIjogIjIwMTUtMDYtMTUi - fV0sICJjb250ZW50VmVyc2lvbiI6ICIxLjAuMC4wIiwgInBhcmFtZXRlcnMiOiB7ImxvY2F0aW9u - IjogeyJtZXRhZGF0YSI6IHsiZGVzY3JpcHRpb24iOiAiTG9jYXRpb24gZm9yIHRoZSBuZXR3b3Jr - IHNlY3VyaXR5IGdyb3VwLiJ9LCAiZGVmYXVsdFZhbHVlIjogIltyZXNvdXJjZUdyb3VwKCkubG9j - YXRpb25dIiwgInR5cGUiOiAic3RyaW5nIn0sICJuYW1lIjogeyJtZXRhZGF0YSI6IHsiZGVzY3Jp - cHRpb24iOiAiTmFtZSBvZiB0aGUgbmV0d29yayBzZWN1cml0eSBncm91cC4ifSwgInR5cGUiOiAi - c3RyaW5nIn19LCAib3V0cHV0cyI6IHsiTmV3TlNHIjogeyJ2YWx1ZSI6ICJbcmVmZXJlbmNlKHBh - cmFtZXRlcnMoJ25hbWUnKSldIiwgInR5cGUiOiAib2JqZWN0In19fSwgIm1vZGUiOiAiSW5jcmVt - ZW50YWwifX0= + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.7+dev] + accept-language: [en-US] + x-ms-client-request-id: [984358f0-4c90-11e7-8df4-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test","name":"azure-cli-deployment-test","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 08 Jun 2017 21:22:36 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Vary: [Accept-Encoding] + content-length: ['240'] + status: {code: 200, message: OK} +- request: + body: '{"location": "westus", "properties": {"dhcpOptions": {}, "subnets": [{"properties": + {"addressPrefix": "10.0.0.0/24"}, "name": "subnet1"}], "addressSpace": {"addressPrefixes": + ["10.0.0.0/16"]}}, "tags": {}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['205'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.7+dev] + accept-language: [en-US] + x-ms-client-request-id: [9864d83e-4c90-11e7-a276-a0b3ccf7272a] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1?api-version=2017-03-01 + response: + body: {string: "{\r\n \"name\": \"vnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1\"\ + ,\r\n \"etag\": \"W/\\\"afaa273d-fae6-4176-8e47-5f3f865704fe\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\"\ + ,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\":\ + \ \"Updating\",\r\n \"resourceGuid\": \"240e9c40-73c7-4893-83a0-d30f69019829\"\ + ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"\ + 10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\"\ + : []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"\ + ,\r\n \"etag\": \"W/\\\"afaa273d-fae6-4176-8e47-5f3f865704fe\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ + ,\r\n \"addressPrefix\": \"10.0.0.0/24\"\r\n }\r\n }\r\ + \n ],\r\n \"virtualNetworkPeerings\": []\r\n }\r\n}"} + headers: + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/8c6d54b6-72de-49cb-87be-4a6bb7702d08?api-version=2017-03-01'] + Cache-Control: [no-cache] + Content-Length: ['1072'] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 08 Jun 2017 21:22:36 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Retry-After: ['3'] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1195'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.7+dev] + accept-language: [en-US] + x-ms-client-request-id: [9864d83e-4c90-11e7-a276-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/8c6d54b6-72de-49cb-87be-4a6bb7702d08?api-version=2017-03-01 + response: + body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 08 Jun 2017 21:22:40 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['29'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/TEST/2.0.7+dev] + accept-language: [en-US] + x-ms-client-request-id: [9864d83e-4c90-11e7-a276-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1?api-version=2017-03-01 + response: + body: {string: "{\r\n \"name\": \"vnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1\"\ + ,\r\n \"etag\": \"W/\\\"8a5432ce-5584-4583-be8a-b322c796f079\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\"\ + ,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\":\ + \ \"Succeeded\",\r\n \"resourceGuid\": \"240e9c40-73c7-4893-83a0-d30f69019829\"\ + ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"\ + 10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\"\ + : []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"\ + ,\r\n \"etag\": \"W/\\\"8a5432ce-5584-4583-be8a-b322c796f079\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"addressPrefix\": \"10.0.0.0/24\"\r\n }\r\n }\r\ + \n ],\r\n \"virtualNetworkPeerings\": []\r\n }\r\n}"} + headers: + Cache-Control: [no-cache] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 08 Jun 2017 21:22:41 GMT'] + ETag: [W/"8a5432ce-5584-4583-be8a-b322c796f079"] + Expires: ['-1'] + Pragma: [no-cache] + Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] + Vary: [Accept-Encoding] + content-length: ['1074'] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"mode": "Incremental", "template": {"resources": [{"dependsOn": + [], "properties": {"backendAddressPools": "[parameters(''backendAddressPools'')]", + "frontendIPConfigurations": [{"properties": {"privateIPAllocationMethod": "[parameters(''privateIPAllocationMethod'')]", + "subnet": {"id": "[parameters(''subnetId'')]"}}, "name": "LoadBalancerFrontEnd"}]}, + "name": "[parameters(''name'')]", "location": "[parameters(''location'')]", + "apiVersion": "2016-03-30", "type": "Microsoft.Network/loadBalancers"}], "contentVersion": + "1.0.0.0", "parameters": {"location": {"type": "string"}, "privateIPAllocationMethod": + {"type": "string"}, "backendAddressPools": {"type": "array"}, "name": {"type": + "string"}, "subnetId": {"type": "string"}}, "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"}, + "parameters": {"location": {"value": "westus"}, "privateIPAllocationMethod": + {"value": "Dynamic"}, "backendAddressPools": {"value": [{"name": "bepool1"}, + {"name": "bepool2"}]}, "name": {"value": "test-lb"}, "subnetId": {"value": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}}}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['863'] + Content-Length: ['1228'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.3 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.0b8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [390fb6ac-a631-11e6-aef4-f4b7e2e85440] + x-ms-client-request-id: [9ad7925e-4c90-11e7-9479-a0b3ccf7272a] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/mock-deployment/validate?api-version=2017-05-10 response: - body: - string: !!binary | - H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcpl - VmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xR8Xs - o0cf3W3Wk2ZaF6u2qJbN3Z3J7vmn+w92t3cn5zvb+7NZtp3l03vb08nDvQd75zsP7z/cuVvnTbWu - p/nndbVeNXezH6zrfHtaFtuzfFVW14t82W63edPeXdXVZTHL6+buF8W0rprqvB2/0pebu661//vv - P6uvf/96vfxo9NEyW+SEYvQ7Ar3K67bIm48e/eKPVllNbVvqCX+V1TTDcPB7e70CjNdtXSwv6L3L - rFzjgyvCb9189EtML8Mtu8PjoW0vm4vdj34Jvb6oZmh1tpzWOXDMSnqXsLssGkKBQL1usxYtjqfT - fNXmM/q6LRYEI1us6OO9nd1Pt3d3t3cevtnZf7Sz+2h/b/zg4f7D/d2fopazda1D+ejlm53X9Mm0 - quu85A/PMIH5bJJ/+mD2YPv+3uz+9v6nu5Pth3t7B9sP789ms/18Jzs/uE+vMUaYio8efe8X85ib - VTYFXm5qXuTtVVW/pdZmht8QTeQN/xN6aSlNX+fTdV2018IJ9KIhPV4yNP7+L6H/aCj5Kl/O8uWU - 5+x79AlRuJgRcWaWJ+jzX/xRtip+khAlKNQRkef+9g5RCIP4ueFYJcvd6Jh7sBiOsIfhrU0sRMwg - FL1lf/SCoTG9pBTm6fXEodFXXq1LfPC97/8SmoJf8v8Aj69MlPIDAAA= + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/deployment_dry_run","name":"deployment_dry_run","properties":{"templateHash":"18048340065001902796","parameters":{"location":{"type":"String","value":"westus"},"privateIPAllocationMethod":{"type":"String","value":"Dynamic"},"backendAddressPools":{"type":"Array","value":[{"name":"bepool1"},{"name":"bepool2"}]},"name":{"type":"String","value":"test-lb"},"subnetId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T21:22:42.0844954Z","duration":"PT0S","correlationId":"522bdd66-c165-41e3-8913-93f10b835055","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"loadBalancers","locations":["westus"]}]}],"dependencies":[],"validatedResources":[{"apiVersion":"2016-03-30","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/loadBalancers/test-lb","name":"test-lb","type":"Microsoft.Network/loadBalancers","location":"westus","properties":{"backendAddressPools":[{"name":"bepool1"},{"name":"bepool2"}],"frontendIPConfigurations":[{"properties":{"privateIPAllocationMethod":"Dynamic","subnet":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"name":"LoadBalancerFrontEnd"}]}}]}}'} headers: Cache-Control: [no-cache] - Content-Encoding: [gzip] - Content-Length: ['611'] Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 09 Nov 2016 04:01:42 GMT'] + Date: ['Thu, 08 Jun 2017 21:22:41 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] + Transfer-Encoding: [chunked] Vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + content-length: ['1676'] + x-ms-ratelimit-remaining-subscription-writes: ['1195'] status: {code: 200, message: OK} - request: - body: !!binary | - eyJwcm9wZXJ0aWVzIjogeyJwYXJhbWV0ZXJzIjogeyJsb2NhdGlvbiI6IHsidmFsdWUiOiAid2Vz - dHVzIn0sICJuYW1lIjogeyJ2YWx1ZSI6ICJhenVyZS1jbGktZGVwbG95LXRlc3QtbnNnMSJ9fSwg - InRlbXBsYXRlIjogeyJ2YXJpYWJsZXMiOiB7fSwgIiRzY2hlbWEiOiAiaHR0cHM6Ly9zY2hlbWEu - bWFuYWdlbWVudC5henVyZS5jb20vc2NoZW1hcy8yMDE1LTAxLTAxL2RlcGxveW1lbnRUZW1wbGF0 - ZS5qc29uIyIsICJyZXNvdXJjZXMiOiBbeyJuYW1lIjogIltwYXJhbWV0ZXJzKCduYW1lJyldIiwg - ImRlcGVuZHNPbiI6IFtdLCAidHlwZSI6ICJNaWNyb3NvZnQuTmV0d29yay9uZXR3b3JrU2VjdXJp - dHlHcm91cHMiLCAicHJvcGVydGllcyI6IHsic2VjdXJpdHlSdWxlcyI6IFtdfSwgImxvY2F0aW9u - IjogIltwYXJhbWV0ZXJzKCdsb2NhdGlvbicpXSIsICJhcGlWZXJzaW9uIjogIjIwMTUtMDYtMTUi - fV0sICJjb250ZW50VmVyc2lvbiI6ICIxLjAuMC4wIiwgInBhcmFtZXRlcnMiOiB7ImxvY2F0aW9u - IjogeyJtZXRhZGF0YSI6IHsiZGVzY3JpcHRpb24iOiAiTG9jYXRpb24gZm9yIHRoZSBuZXR3b3Jr - IHNlY3VyaXR5IGdyb3VwLiJ9LCAiZGVmYXVsdFZhbHVlIjogIltyZXNvdXJjZUdyb3VwKCkubG9j - YXRpb25dIiwgInR5cGUiOiAic3RyaW5nIn0sICJuYW1lIjogeyJtZXRhZGF0YSI6IHsiZGVzY3Jp - cHRpb24iOiAiTmFtZSBvZiB0aGUgbmV0d29yayBzZWN1cml0eSBncm91cC4ifSwgInR5cGUiOiAi - c3RyaW5nIn19LCAib3V0cHV0cyI6IHsiTmV3TlNHIjogeyJ2YWx1ZSI6ICJbcmVmZXJlbmNlKHBh - cmFtZXRlcnMoJ25hbWUnKSldIiwgInR5cGUiOiAib2JqZWN0In19fSwgIm1vZGUiOiAiSW5jcmVt - ZW50YWwifX0= + body: '{"properties": {"mode": "Incremental", "template": {"resources": [{"dependsOn": + [], "properties": {"backendAddressPools": "[parameters(''backendAddressPools'')]", + "frontendIPConfigurations": [{"properties": {"privateIPAllocationMethod": "[parameters(''privateIPAllocationMethod'')]", + "subnet": {"id": "[parameters(''subnetId'')]"}}, "name": "LoadBalancerFrontEnd"}]}, + "name": "[parameters(''name'')]", "location": "[parameters(''location'')]", + "apiVersion": "2016-03-30", "type": "Microsoft.Network/loadBalancers"}], "contentVersion": + "1.0.0.0", "parameters": {"location": {"type": "string"}, "privateIPAllocationMethod": + {"type": "string"}, "backendAddressPools": {"type": "array"}, "name": {"type": + "string"}, "subnetId": {"type": "string"}}, "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"}, + "parameters": {"location": {"value": "westus"}, "privateIPAllocationMethod": + {"value": "Dynamic"}, "backendAddressPools": {"value": [{"name": "bepool1"}, + {"name": "bepool2"}]}, "name": {"value": "test-lb"}, "subnetId": {"value": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}}}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['863'] + Content-Length: ['1228'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.3 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.0b8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [398ced0a-a631-11e6-af10-f4b7e2e85440] + x-ms-client-request-id: [9b58cf52-4c90-11e7-9b16-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 response: - body: {string: '{"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"parameters":{"location":{"type":"String","value":"westus"},"name":{"type":"String","value":"azure-cli-deploy-test-nsg1"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2016-11-09T04:01:43.629944Z","duration":"PT0.1645357S","correlationId":"cbe97827-5a27-47bc-b9cb-241d4a2bc49f","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]}]}],"dependencies":[]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"templateHash":"18048340065001902796","parameters":{"location":{"type":"String","value":"westus"},"privateIPAllocationMethod":{"type":"String","value":"Dynamic"},"backendAddressPools":{"type":"Array","value":[{"name":"bepool1"},{"name":"bepool2"}]},"name":{"type":"String","value":"test-lb"},"subnetId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-06-08T21:22:43.2188091Z","duration":"PT0.2770006S","correlationId":"c18f33be-ece9-4c12-96b9-eabd6fd111ff","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"loadBalancers","locations":["westus"]}]}],"dependencies":[]}}'} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment/operationStatuses/08587229427820122645?api-version=2017-05-10'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment/operationStatuses/08587046499225358060?api-version=2017-05-10'] Cache-Control: [no-cache] - Content-Length: ['655'] + Content-Length: ['1028'] Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 09 Nov 2016 04:01:43 GMT'] + Date: ['Thu, 08 Jun 2017 21:22:42 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 201, message: Created} - request: body: null @@ -105,28 +224,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.3 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.0b8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [398ced0a-a631-11e6-af10-f4b7e2e85440] + x-ms-client-request-id: [9b58cf52-4c90-11e7-9b16-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587229427820122645?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587046499225358060?api-version=2017-05-10 response: - body: - string: !!binary | - H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcpl - VmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xR02b - tevmo0cfvV5Pp3k+y2cf/ZL/ByCIe+QWAAAA + body: {string: '{"status":"Succeeded"}'} headers: Cache-Control: [no-cache] - Content-Encoding: [gzip] - Content-Length: ['141'] Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 09 Nov 2016 04:02:13 GMT'] + Date: ['Thu, 08 Jun 2017 21:23:13 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] + content-length: ['22'] status: {code: 200, message: OK} - request: body: null @@ -135,45 +250,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.3 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.0b8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [398ced0a-a631-11e6-af10-f4b7e2e85440] + x-ms-client-request-id: [9b58cf52-4c90-11e7-9b16-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 response: - body: - string: !!binary | - H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcpl - VmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xR8Xs - o0cf3W3Wk2ZaF6u2qJbN3Z3J7vmn+w92t3cn5zvb+7NZtp3l03vb08nDvQd75zsP7z/cuVvnTbWu - p/nndbVeNXezH6zrfHtaFtuzfFVW14t82W63edPeXdXVZTHL6+buF8W0rprqvB2/0pebu651HMZH - o4+W2SInJAe+JfCrvG6LvPno0S/+aJXV1Lql3vBXWU0zDAm/t9crQHnd1sXygt67zMo1PrgiHNfN - R7/E9DPcsosAD2972VzsfvRL6PVFNUOrs+W0zoFbVtK7hN1l0RAKBOp1m7Vo8Xo9neb5LJ/R922x - ICDZYkWf7+3sfrq9u7u98/DNzv6jnd1H9x+O93f373+6//CnqOlsXetgPnr5Zvf++OH+w937n376 - mr6aVnWdl/ztGeZzOskfPjjYe7B9P6N/9h9MptuTh9PJ9t7+7mw/25tM9x+e02uMHGbmo0ff+8U8 - /GaVTYGim6kXeXtV1W+ptZnwN0QeecP/hF5aStPX+XRdF+21MAa9aGYBLxlyf/+X0H80pnyVL2f5 - csrT9z36pFq3q3VLfxBC+dWL15/jN52RLyc/nU8x5zojNN0YwQbyGgw/XzOf59l073z3nCYxf/Bw - e5/YfPvgHvH5ZPrpjGg22b2/e0BvNTqCV+vSoDXLz7N12ZqxmW8IyQxM89FxWVZXP0kUOFs+qdZL - 9M093v1hS5bO111CBT8NwgOwGA6zMAlif4R3I8PK2+yCBvbdu7/vR3vZA6LaLnHYQ2Lb/dnuwfbD - B/Rbdv5wL9892H/w4H72+35E7xCivowC7Q2TNsstxegbRiEtlhP0n7Z1dn5eTNPzulqkWVmmP/lF - Q1+mP/ni9A29SqDbalqV9N636E+h48uqbl9lywv0g08JflssmSW7X8kLx7MZzUHzss7Pi3f0zU8W - dbvOSiUtNfMg3Ng2o4E1NG4ZCH2wqosKFP7o0af3d3Z2CFpRE1sTLGp0JuOEQgl56xgz97zKZk+y - MltO89rNyP9vGG3DGP/fxHXAMi0JzXSieNLrBP5ngfN6FKGWHpBucwC6gd92CcAN/PY0X17Ty474 - /39gsN6gftgcBQRYYxVCcsNU1JAA/SzwDr7xXop9bXkFyNHfPqsQr9D7N7AKUVTsw5fr1hD2/w/c - EhvXD5thGIeU/CEmu2EX1UHER7B8bWV//f+RESSi85j7rHa2JNc+nJb/37BbZGz/L2U5gym9T/B/ - FngN33gvdb/2+r+BsTrWjkjLIwsYC7qP3qbvDNn//8BS/VH9sJkJGDDXdPmJWhKkHz7b4GvLL8CO - /vbZhfiF3o+zy/d/CbHMRzQSCk5t8oIDQGaWD5/Fj9DF/wOany5SjxEAAA== + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"templateHash":"18048340065001902796","parameters":{"location":{"type":"String","value":"westus"},"privateIPAllocationMethod":{"type":"String","value":"Dynamic"},"backendAddressPools":{"type":"Array","value":[{"name":"bepool1"},{"name":"bepool2"}]},"name":{"type":"String","value":"test-lb"},"subnetId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T21:22:51.7379575Z","duration":"PT8.796149S","correlationId":"c18f33be-ece9-4c12-96b9-eabd6fd111ff","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"loadBalancers","locations":["westus"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/loadBalancers/test-lb"}]}}'} headers: Cache-Control: [no-cache] - Content-Encoding: [gzip] - Content-Length: ['1126'] Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 09 Nov 2016 04:02:14 GMT'] + Date: ['Thu, 08 Jun 2017 21:23:13 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] + content-length: ['1206'] status: {code: 200, message: OK} - request: body: null @@ -182,45 +276,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.3 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.0b8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [4cb064fe-a631-11e6-a719-f4b7e2e85440] + x-ms-client-request-id: [ae78895c-4c90-11e7-adda-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/?api-version=2017-05-10 response: - body: - string: !!binary | - H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcpl - VmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xR5dZ - uc4/evS9X/xRMfvo0Ud3m/WkmdbFqi2qZXN3Z7J7/un+g93t3cn5zvb+bJZtZ/n03vZ08nDvwd75 - zsP7D3fu1nlTretp/nldrVfN3ewH6zrfnpbF9ixfldX1Il+2223etHdXdXVZzPK6uftFMa2rpjpv - x6/05eauax2H8dHoo2W2IFw/GviWwK/yui3y5qNHv/ijVVZT65Z6w19lNc0wJPzeXq8A5XVbF8sL - ek9J8NEV4bhuPvolpp/hll0EeHjby+Zi96NfQq8vqhlanS2ndQ7cspLeJewui4ZQIFCv26xFi9fr - 6TTPZ/mMvm+LBQHJFiv6fG9n99Pt3d3tnYdvdvYf7ew+uv9wvL+7f//T/Yc/RU1n61oH89HLN7v3 - xw/3H+7e//TT1/TVtKrrvORvzzCf00n+8MHB3oPt+xn9s/9gMt2ePJxOtvf2d2f72d5kuv/wnF5j - 5DAzzAkYfrPKpkDRzdSLvL2q6rfU2kz4GyKPvOF/Qi8tpenrfLqui/ZaGINeNLOAlwy5v/9L6D8a - U77Kl7N8OeXp+x59Uq3b1bqlPwih/OrF68/xm87Il5OfzqeYc50Rmm6MYAN5DYafr5nP82y6d757 - TpOYP3i4vU9svn1wj/h8Mv10RjSb7N7fPaC3Gh3Bq3Vp0Jrl59m6bM3YzDeEZAam+ei4LKurnyQK - nC2fVOsl+uYe7/6wJUvn6y6hgp8G4QFYDIdZmASxP8K7kWHlbXZBA/vu3d/3o73sAVFtlzjsIbHt - /mz3YPvhA/otO3+4l+8e7D94cD/7fT+idwhRX0aB9oZJm+WWYvQNo5AWywn6T9s6Oz8vpul5XS3S - rCzTn/yioS/Tn3xx+oZeJdBtNa1Keu9b9KfQ8WVVt6+y5QX6wacEvy2WzJLdr+SF49mM5qB5Wefn - xTv65ieLul1npZKWmnkQbmyb0cAaGrcMhD5Y1UUFCn/06NP7Ozs7BK2oia0JFjU6k3FCoYS8dYyZ - e15lsydZmS2nee1m5P83jLZhjP9v4jpgmZaEZjpRPOl1Av+zwHk9ilBLD0i3OQDdwG+7BOAGfnua - L6/pZUf8/z8wWG9QP2yOAgKssQohuWEqakiAfhZ4B994L8W+trwC5Ohvn1WIV+j9G1iFKCr24ct1 - awj7/wduiY3rh80wjENK/hCT3bCL6iDiI1i+trK//v/ICBLRecx9VjtbkmsfTsv/b9gtMrb/l7Kc - wZTeJ/g/C7yGb7yXul97/d/AWB1rR6TlkQWMBd1Hb9N3huz/f2Cp/qh+2MwEDJhruvxELQnSD59t - 8LXlF2BHf/vsQvxC78fZ5fu/hFjmIxoJBac2ecEBIDPLh8/iR+ji+7/k/wE7X9EtmxEAAA== + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"templateHash":"18048340065001902796","parameters":{"location":{"type":"String","value":"westus"},"privateIPAllocationMethod":{"type":"String","value":"Dynamic"},"backendAddressPools":{"type":"Array","value":[{"name":"bepool1"},{"name":"bepool2"}]},"name":{"type":"String","value":"test-lb"},"subnetId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T21:22:51.7379575Z","duration":"PT8.796149S","correlationId":"c18f33be-ece9-4c12-96b9-eabd6fd111ff","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"loadBalancers","locations":["westus"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/loadBalancers/test-lb"}]}}]}'} headers: Cache-Control: [no-cache] - Content-Encoding: [gzip] - Content-Length: ['1135'] Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 09 Nov 2016 04:02:14 GMT'] + Date: ['Thu, 08 Jun 2017 21:23:14 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] + content-length: ['1218'] status: {code: 200, message: OK} - request: body: null @@ -229,45 +302,24 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.3 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.0b8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [4cde65da-a631-11e6-b336-f4b7e2e85440] + x-ms-client-request-id: [aeb3b476-4c90-11e7-ba4f-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 response: - body: - string: !!binary | - H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcpl - VmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xR8Xs - o0cf3W3Wk2ZaF6u2qJbN3Z3J7vmn+w92t3cn5zvb+7NZtp3l03vb08nDvQd75zsP7z/cuVvnTbWu - p/nndbVeNXezH6zrfHtaFtuzfFVW14t82W63edPeXdXVZTHL6+buF8W0rprqvB2/0pebu651HMZH - o4+W2SInJAe+JfCrvG6LvPno0S/+aJXV1Lql3vBXWU0zDAm/t9crQHnd1sXygt67zMo1PrgiHNfN - R7/E9DPcsosAD2972VzsfvRL6PVFNUOrs+W0zoFbVtK7hN1l0RAKBOp1m7Vo8Xo9neb5LJ/R922x - ICDZYkWf7+3sfrq9u7u98/DNzv6jnd1H9x+O93f373+6//CnqOlsXetgPnr5Zvf++OH+w937n376 - mr6aVnWdl/ztGeZzOskfPjjYe7B9P6N/9h9MptuTh9PJ9t7+7mw/25tM9x+e02uMHGbmo0ff+8U8 - /GaVTYGim6kXeXtV1W+ptZnwN0QeecP/hF5aStPX+XRdF+21MAa9aGYBLxlyf/+X0H80pnyVL2f5 - csrT9z36pFq3q3VLfxBC+dWL15/jN52RLyc/nU8x5zojNN0YwQbyGgw/XzOf59l073z3nCYxf/Bw - e5/YfPvgHvH5ZPrpjGg22b2/e0BvNTqCV+vSoDXLz7N12ZqxmW8IyQxM89FxWVZXP0kUOFs+qdZL - 9M093v1hS5bO111CBT8NwgOwGA6zMAlif4R3I8PK2+yCBvbdu7/vR3vZA6LaLnHYQ2Lb/dnuwfbD - B/Rbdv5wL9892H/w4H72+35E7xCivowC7Q2TNsstxegbRiEtlhP0n7Z1dn5eTNPzulqkWVmmP/lF - Q1+mP/ni9A29SqDbalqV9N636E+h48uqbl9lywv0g08JflssmSW7X8kLx7MZzUHzss7Pi3f0zU8W - dbvOSiUtNfMg3Ng2o4E1NG4ZCH2wqosKFP7o0af3d3Z2CFpRE1sTLGp0JuOEQgl56xgz97zKZk+y - MltO89rNyP9vGG3DGP/fxHXAMi0JzXSieNLrBP5ngfN6FKGWHpBucwC6gd92CcAN/PY0X17Ty474 - /39gsN6gftgcBQRYYxVCcsNU1JAA/SzwDr7xXop9bXkFyNHfPqsQr9D7N7AKUVTsw5fr1hD2/w/c - EhvXD5thGIeU/CEmu2EX1UHER7B8bWV//f+RESSi85j7rHa2JNc+nJb/37BbZGz/L2U5gym9T/B/ - FngN33gvdb/2+r+BsTrWjkjLIwsYC7qP3qbvDNn//8BS/VH9sJkJGDDXdPmJWhKkHz7b4GvLL8CO - /vbZhfiF3o+zy/d/CbHMRzQSCk5t8oIDQGaWD5/Fj9DF/wOany5SjxEAAA== + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"templateHash":"18048340065001902796","parameters":{"location":{"type":"String","value":"westus"},"privateIPAllocationMethod":{"type":"String","value":"Dynamic"},"backendAddressPools":{"type":"Array","value":[{"name":"bepool1"},{"name":"bepool2"}]},"name":{"type":"String","value":"test-lb"},"subnetId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T21:22:51.7379575Z","duration":"PT8.796149S","correlationId":"c18f33be-ece9-4c12-96b9-eabd6fd111ff","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"loadBalancers","locations":["westus"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/loadBalancers/test-lb"}]}}'} headers: Cache-Control: [no-cache] - Content-Encoding: [gzip] - Content-Length: ['1126'] Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 09 Nov 2016 04:02:15 GMT'] + Date: ['Thu, 08 Jun 2017 21:23:14 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] + content-length: ['1206'] status: {code: 200, message: OK} - request: body: null @@ -276,37 +328,23 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.10586) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.3 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.0b8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [4d158cd8-a631-11e6-92db-f4b7e2e85440] + x-ms-client-request-id: [aeea1dd2-4c90-11e7-a097-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/deployments/mock-deployment/operations?api-version=2017-05-10 response: - body: - string: !!binary | - H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcpl - VmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xR5dZ - uc4/evS9X/xRMfvo0Ud3m/WkmdbFqi2qZXN3Z7J7/un+g93t3cn5zvb+bJZtZ/n03vZ08nDvwd75 - zsP7D3fu1nlTretp/nldrVfN3ewH6zrfnpbF9ixfldX1Il+2223etHdXdXVZzPK6uftFMa2rpjpv - x6/05eauax2Hcbda5XUmeN3/9MH+w2c7B88OHu4+ebp3/NHoI/vtGcYRaUC9U5O2yJuPHv1i/HVZ - NNS8WF58SZ/zq/TiSZ1nbS7NbYPXLT579NHr9XSa57N8Rt+3xYLGlC1W9Pnezu6n27u72zsP3+zs - P9rZfXT/YPzg4ae79+/v/RQ1na0t+JdvdvfHu0S3e3v3X9NXbZ1N31IPjHSeT/PdB7sPtiez2f3t - /d3pp9vZ3t7e9t69/NN8bz+b5Pfv0TtNXl8W0/xV/ovWhAG/uTvN7u3em+xu39+fTbf3HxxMtic5 - vX6e7d7be/jw4V6+cx9v0jjWzUk1w2C+/L3okzarL/LWTAII83PDBi/y9qqq395dys/X+XRdF+31 - ACyGs71sLnZpCKbfN9crGsBHt4TpvfgiW+DFDZ38kl/yS0Y/V5Qxc/N+ArJzcP/gwd7ew/29BwfE - nXt7n+6DAWwL5pqBRoQFNbtJUE6hOUgsntr+v1y3q3UrAOwr7y86D8f3Dh7cO7jXk5yd8f29T/d2 - HvQFh4R8en/v/NPtyV4+o1nId7YPHj68t/1wdjDb2d/LH+5Mdugd6rPD/vLJF3nTZBf04XJdlr/k - l3z/l/w/15afSBcFAAA= + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment/operations/62E23BA3072F9A59","operationId":"62E23BA3072F9A59","properties":{"provisioningOperation":"Create","provisioningState":"Succeeded","timestamp":"2017-06-08T21:22:49.7320302Z","duration":"PT3.1487534S","trackingId":"25239975-d954-465b-897a-708ab8de526f","serviceRequestId":"1d49c05c-2558-47e1-84ac-d104ba980e53","statusCode":"Created","targetResource":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":"Microsoft.Network/loadBalancers","resourceName":"test-lb"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment/operations/08587046499225358060","operationId":"08587046499225358060","properties":{"provisioningOperation":"EvaluateDeploymentOutput","provisioningState":"Succeeded","timestamp":"2017-06-08T21:22:51.4958641Z","duration":"PT1.3552308S","trackingId":"52533323-6355-43b1-b5ca-d54f37c55fea","statusCode":"OK","statusMessage":null}}]}'} headers: Cache-Control: [no-cache] - Content-Encoding: [gzip] - Content-Length: ['698'] Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 09 Nov 2016 04:02:15 GMT'] + Date: ['Thu, 08 Jun 2017 21:23:14 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] + content-length: ['1272'] status: {code: 200, message: OK} version: 1 diff --git a/src/command_modules/azure-cli-resource/tests/recordings/latest/test_group_deployment_no_wait.yaml b/src/command_modules/azure-cli-resource/tests/recordings/latest/test_group_deployment_no_wait.yaml index 0ccaacd4d..b204c5dcd 100644 --- a/src/command_modules/azure-cli-resource/tests/recordings/latest/test_group_deployment_no_wait.yaml +++ b/src/command_modules/azure-cli-resource/tests/recordings/latest/test_group_deployment_no_wait.yaml @@ -1,39 +1,40 @@ interactions: - request: - body: '{"properties": {"parameters": {"name": {"value": "azure-cli-deploy-test-nsg1"}, - "location": {"value": "westus"}}, "mode": "Incremental", "template": {"contentVersion": - "1.0.0.0", "outputs": {"NewNSG": {"type": "object", "value": "[reference(parameters(''name''))]"}}, - "resources": [{"apiVersion": "2015-06-15", "name": "[parameters(''name'')]", - "dependsOn": [], "properties": {"securityRules": []}, "location": "[parameters(''location'')]", - "type": "Microsoft.Network/networkSecurityGroups"}], "variables": {}, "parameters": - {"name": {"metadata": {"description": "Name of the network security group."}, - "type": "string"}, "location": {"metadata": {"description": "Location for the - network security group."}, "defaultValue": "[resourceGroup().location]", "type": - "string"}}, "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"}}}' + body: '{"properties": {"mode": "Incremental", "template": {"variables": {}, "parameters": + {"location": {"metadata": {"description": "Location for the network security + group."}, "type": "string", "defaultValue": "[resourceGroup().location]"}, "name": + {"metadata": {"description": "Name of the network security group."}, "type": + "string"}}, "resources": [{"dependsOn": [], "properties": {"securityRules": + []}, "name": "[parameters(''name'')]", "location": "[parameters(''location'')]", + "apiVersion": "2015-06-15", "type": "Microsoft.Network/networkSecurityGroups"}], + "outputs": {"NewNSG": {"value": "[reference(parameters(''name''))]", "type": + "object"}}, "contentVersion": "1.0.0.0", "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"}, + "parameters": {"location": {"value": "westus"}, "name": {"value": "azure-cli-deploy-test-nsg1"}}}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['863'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.3 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.0b10] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [a850e48a-b742-11e6-8e81-64510658e3b3] + x-ms-client-request-id: [e13d2610-4c90-11e7-82c0-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"parameters":{"name":{"type":"String","value":"azure-cli-deploy-test-nsg1"},"location":{"type":"String","value":"westus"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2016-11-30T21:19:24.1179296Z","duration":"PT0.6497169S","correlationId":"03126bac-629c-4bb9-ac9c-8265ae96e2fa","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]}]}],"dependencies":[]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"templateHash":"3550658671258663593","parameters":{"location":{"type":"String","value":"westus"},"name":{"type":"String","value":"azure-cli-deploy-test-nsg1"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-06-08T21:24:40.8557652Z","duration":"PT0.5740685S","correlationId":"1b0c61d7-cc95-4fb0-aedf-8e3b3b348968","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]}]}],"dependencies":[]}}'} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment/operationStatuses/08587210661220094393?api-version=2017-05-10'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment/operationStatuses/08587046498051959183?api-version=2017-05-10'] Cache-Control: [no-cache] - Content-Length: ['656'] + Content-Length: ['699'] Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 30 Nov 2016 21:19:24 GMT'] + Date: ['Thu, 08 Jun 2017 21:24:40 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: null @@ -42,23 +43,25 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.3 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.0b10] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [b12e74d4-b742-11e6-9c32-64510658e3b3] + x-ms-client-request-id: [e280db8a-4c90-11e7-ac9d-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"parameters":{"name":{"type":"String","value":"azure-cli-deploy-test-nsg1"},"location":{"type":"String","value":"westus"}},"mode":"Incremental","provisioningState":"Running","timestamp":"2016-11-30T21:19:24.7626283Z","duration":"PT1.2944156S","correlationId":"03126bac-629c-4bb9-ac9c-8265ae96e2fa","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]}]}],"dependencies":[]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"templateHash":"3550658671258663593","parameters":{"location":{"type":"String","value":"westus"},"name":{"type":"String","value":"azure-cli-deploy-test-nsg1"}},"mode":"Incremental","provisioningState":"Running","timestamp":"2017-06-08T21:24:41.5345896Z","duration":"PT1.2528929S","correlationId":"1b0c61d7-cc95-4fb0-aedf-8e3b3b348968","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]}]}],"dependencies":[]}}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 30 Nov 2016 21:19:34 GMT'] + Date: ['Thu, 08 Jun 2017 21:24:41 GMT'] Expires: ['-1'] Pragma: [no-cache] + Retry-After: ['5'] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] - content-length: ['655'] + content-length: ['698'] status: {code: 200, message: OK} - request: body: null @@ -67,29 +70,30 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.3 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.0b10] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [c37219ba-b742-11e6-871c-64510658e3b3] + x-ms-client-request-id: [f49aa2c0-4c90-11e7-9a02-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"parameters":{"name":{"type":"String","value":"azure-cli-deploy-test-nsg1"},"location":{"type":"String","value":"westus"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2016-11-30T21:19:41.0645299Z","duration":"PT17.5963172S","correlationId":"03126bac-629c-4bb9-ac9c-8265ae96e2fa","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]}]}],"dependencies":[],"outputs":{"newNSG":{"type":"Object","value":{"provisioningState":"Succeeded","resourceGuid":"2bdf11b3-367f-4bdc-a1af-7e98197a2b2e","securityRules":[],"defaultSecurityRules":[{"name":"AllowVnetInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowVnetInBound","etag":"W/\"8a782b4c-6ea8-4138-ac17-e1ef4170b1a7\"","properties":{"provisioningState":"Succeeded","description":"Allow - inbound traffic from all VMs in VNET","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"VirtualNetwork","destinationAddressPrefix":"VirtualNetwork","access":"Allow","priority":65000,"direction":"Inbound"}},{"name":"AllowAzureLoadBalancerInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowAzureLoadBalancerInBound","etag":"W/\"8a782b4c-6ea8-4138-ac17-e1ef4170b1a7\"","properties":{"provisioningState":"Succeeded","description":"Allow - inbound traffic from azure load balancer","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"AzureLoadBalancer","destinationAddressPrefix":"*","access":"Allow","priority":65001,"direction":"Inbound"}},{"name":"DenyAllInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/DenyAllInBound","etag":"W/\"8a782b4c-6ea8-4138-ac17-e1ef4170b1a7\"","properties":{"provisioningState":"Succeeded","description":"Deny - all inbound traffic","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"*","access":"Deny","priority":65500,"direction":"Inbound"}},{"name":"AllowVnetOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowVnetOutBound","etag":"W/\"8a782b4c-6ea8-4138-ac17-e1ef4170b1a7\"","properties":{"provisioningState":"Succeeded","description":"Allow - outbound traffic from all VMs to all VMs in VNET","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"VirtualNetwork","destinationAddressPrefix":"VirtualNetwork","access":"Allow","priority":65000,"direction":"Outbound"}},{"name":"AllowInternetOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowInternetOutBound","etag":"W/\"8a782b4c-6ea8-4138-ac17-e1ef4170b1a7\"","properties":{"provisioningState":"Succeeded","description":"Allow - outbound traffic from all VMs to Internet","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"Internet","access":"Allow","priority":65001,"direction":"Outbound"}},{"name":"DenyAllOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/DenyAllOutBound","etag":"W/\"8a782b4c-6ea8-4138-ac17-e1ef4170b1a7\"","properties":{"provisioningState":"Succeeded","description":"Deny - all outbound traffic","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"*","access":"Deny","priority":65500,"direction":"Outbound"}}]}}},"outputResources":[{"id":"Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"templateHash":"3550658671258663593","parameters":{"location":{"type":"String","value":"westus"},"name":{"type":"String","value":"azure-cli-deploy-test-nsg1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T21:24:54.0359729Z","duration":"PT13.7542762S","correlationId":"1b0c61d7-cc95-4fb0-aedf-8e3b3b348968","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]}]}],"dependencies":[],"outputs":{"newNSG":{"type":"Object","value":{"provisioningState":"Succeeded","resourceGuid":"89520818-a2bd-43ee-93ba-5408df6a5106","securityRules":[],"defaultSecurityRules":[{"name":"AllowVnetInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowVnetInBound","etag":"W/\"c0f5e666-9d3b-41c2-a26d-b0818aeabbbb\"","properties":{"provisioningState":"Succeeded","description":"Allow + inbound traffic from all VMs in VNET","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"VirtualNetwork","destinationAddressPrefix":"VirtualNetwork","access":"Allow","priority":65000,"direction":"Inbound"}},{"name":"AllowAzureLoadBalancerInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowAzureLoadBalancerInBound","etag":"W/\"c0f5e666-9d3b-41c2-a26d-b0818aeabbbb\"","properties":{"provisioningState":"Succeeded","description":"Allow + inbound traffic from azure load balancer","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"AzureLoadBalancer","destinationAddressPrefix":"*","access":"Allow","priority":65001,"direction":"Inbound"}},{"name":"DenyAllInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/DenyAllInBound","etag":"W/\"c0f5e666-9d3b-41c2-a26d-b0818aeabbbb\"","properties":{"provisioningState":"Succeeded","description":"Deny + all inbound traffic","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"*","access":"Deny","priority":65500,"direction":"Inbound"}},{"name":"AllowVnetOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowVnetOutBound","etag":"W/\"c0f5e666-9d3b-41c2-a26d-b0818aeabbbb\"","properties":{"provisioningState":"Succeeded","description":"Allow + outbound traffic from all VMs to all VMs in VNET","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"VirtualNetwork","destinationAddressPrefix":"VirtualNetwork","access":"Allow","priority":65000,"direction":"Outbound"}},{"name":"AllowInternetOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowInternetOutBound","etag":"W/\"c0f5e666-9d3b-41c2-a26d-b0818aeabbbb\"","properties":{"provisioningState":"Succeeded","description":"Allow + outbound traffic from all VMs to Internet","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"Internet","access":"Allow","priority":65001,"direction":"Outbound"}},{"name":"DenyAllOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/DenyAllOutBound","etag":"W/\"c0f5e666-9d3b-41c2-a26d-b0818aeabbbb\"","properties":{"provisioningState":"Succeeded","description":"Deny + all outbound traffic","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"*","access":"Deny","priority":65500,"direction":"Outbound"}}]}}},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1"}]}}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 30 Nov 2016 21:20:05 GMT'] + Date: ['Thu, 08 Jun 2017 21:25:12 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] - content-length: ['4495'] + content-length: ['4683'] status: {code: 200, message: OK} - request: body: null @@ -98,28 +102,29 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.0 (Windows-10.0.14393) requests/2.9.1 msrest/0.4.4 msrest_azure/0.4.3 - resourcemanagementclient/0.30.2 Azure-SDK-For-Python AZURECLI/TEST/0.1.0b10] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [cb076a38-b742-11e6-a5d5-64510658e3b3] + x-ms-client-request-id: [f4cc42ca-4c90-11e7-aca5-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"parameters":{"name":{"type":"String","value":"azure-cli-deploy-test-nsg1"},"location":{"type":"String","value":"westus"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2016-11-30T21:19:41.0645299Z","duration":"PT17.5963172S","correlationId":"03126bac-629c-4bb9-ac9c-8265ae96e2fa","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]}]}],"dependencies":[],"outputs":{"newNSG":{"type":"Object","value":{"provisioningState":"Succeeded","resourceGuid":"2bdf11b3-367f-4bdc-a1af-7e98197a2b2e","securityRules":[],"defaultSecurityRules":[{"name":"AllowVnetInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowVnetInBound","etag":"W/\"8a782b4c-6ea8-4138-ac17-e1ef4170b1a7\"","properties":{"provisioningState":"Succeeded","description":"Allow - inbound traffic from all VMs in VNET","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"VirtualNetwork","destinationAddressPrefix":"VirtualNetwork","access":"Allow","priority":65000,"direction":"Inbound"}},{"name":"AllowAzureLoadBalancerInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowAzureLoadBalancerInBound","etag":"W/\"8a782b4c-6ea8-4138-ac17-e1ef4170b1a7\"","properties":{"provisioningState":"Succeeded","description":"Allow - inbound traffic from azure load balancer","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"AzureLoadBalancer","destinationAddressPrefix":"*","access":"Allow","priority":65001,"direction":"Inbound"}},{"name":"DenyAllInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/DenyAllInBound","etag":"W/\"8a782b4c-6ea8-4138-ac17-e1ef4170b1a7\"","properties":{"provisioningState":"Succeeded","description":"Deny - all inbound traffic","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"*","access":"Deny","priority":65500,"direction":"Inbound"}},{"name":"AllowVnetOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowVnetOutBound","etag":"W/\"8a782b4c-6ea8-4138-ac17-e1ef4170b1a7\"","properties":{"provisioningState":"Succeeded","description":"Allow - outbound traffic from all VMs to all VMs in VNET","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"VirtualNetwork","destinationAddressPrefix":"VirtualNetwork","access":"Allow","priority":65000,"direction":"Outbound"}},{"name":"AllowInternetOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowInternetOutBound","etag":"W/\"8a782b4c-6ea8-4138-ac17-e1ef4170b1a7\"","properties":{"provisioningState":"Succeeded","description":"Allow - outbound traffic from all VMs to Internet","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"Internet","access":"Allow","priority":65001,"direction":"Outbound"}},{"name":"DenyAllOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/DenyAllOutBound","etag":"W/\"8a782b4c-6ea8-4138-ac17-e1ef4170b1a7\"","properties":{"provisioningState":"Succeeded","description":"Deny - all outbound traffic","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"*","access":"Deny","priority":65500,"direction":"Outbound"}}]}}},"outputResources":[{"id":"Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"templateHash":"3550658671258663593","parameters":{"location":{"type":"String","value":"westus"},"name":{"type":"String","value":"azure-cli-deploy-test-nsg1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T21:24:54.0359729Z","duration":"PT13.7542762S","correlationId":"1b0c61d7-cc95-4fb0-aedf-8e3b3b348968","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]}]}],"dependencies":[],"outputs":{"newNSG":{"type":"Object","value":{"provisioningState":"Succeeded","resourceGuid":"89520818-a2bd-43ee-93ba-5408df6a5106","securityRules":[],"defaultSecurityRules":[{"name":"AllowVnetInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowVnetInBound","etag":"W/\"c0f5e666-9d3b-41c2-a26d-b0818aeabbbb\"","properties":{"provisioningState":"Succeeded","description":"Allow + inbound traffic from all VMs in VNET","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"VirtualNetwork","destinationAddressPrefix":"VirtualNetwork","access":"Allow","priority":65000,"direction":"Inbound"}},{"name":"AllowAzureLoadBalancerInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowAzureLoadBalancerInBound","etag":"W/\"c0f5e666-9d3b-41c2-a26d-b0818aeabbbb\"","properties":{"provisioningState":"Succeeded","description":"Allow + inbound traffic from azure load balancer","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"AzureLoadBalancer","destinationAddressPrefix":"*","access":"Allow","priority":65001,"direction":"Inbound"}},{"name":"DenyAllInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/DenyAllInBound","etag":"W/\"c0f5e666-9d3b-41c2-a26d-b0818aeabbbb\"","properties":{"provisioningState":"Succeeded","description":"Deny + all inbound traffic","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"*","access":"Deny","priority":65500,"direction":"Inbound"}},{"name":"AllowVnetOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowVnetOutBound","etag":"W/\"c0f5e666-9d3b-41c2-a26d-b0818aeabbbb\"","properties":{"provisioningState":"Succeeded","description":"Allow + outbound traffic from all VMs to all VMs in VNET","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"VirtualNetwork","destinationAddressPrefix":"VirtualNetwork","access":"Allow","priority":65000,"direction":"Outbound"}},{"name":"AllowInternetOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowInternetOutBound","etag":"W/\"c0f5e666-9d3b-41c2-a26d-b0818aeabbbb\"","properties":{"provisioningState":"Succeeded","description":"Allow + outbound traffic from all VMs to Internet","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"Internet","access":"Allow","priority":65001,"direction":"Outbound"}},{"name":"DenyAllOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/DenyAllOutBound","etag":"W/\"c0f5e666-9d3b-41c2-a26d-b0818aeabbbb\"","properties":{"provisioningState":"Succeeded","description":"Deny + all outbound traffic","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"*","access":"Deny","priority":65500,"direction":"Outbound"}}]}}},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1"}]}}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Wed, 30 Nov 2016 21:20:18 GMT'] + Date: ['Thu, 08 Jun 2017 21:25:11 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] Vary: [Accept-Encoding] - content-length: ['4495'] + content-length: ['4683'] status: {code: 200, message: OK} version: 1 diff --git a/src/command_modules/azure-cli-resource/tests/recordings/latest/test_group_deployment_thru_uri.yaml b/src/command_modules/azure-cli-resource/tests/recordings/latest/test_group_deployment_thru_uri.yaml index 6c3e0101a..73fe2108e 100644 --- a/src/command_modules/azure-cli-resource/tests/recordings/latest/test_group_deployment_thru_uri.yaml +++ b/src/command_modules/azure-cli-resource/tests/recordings/latest/test_group_deployment_thru_uri.yaml @@ -30,9 +30,9 @@ interactions: Content-Length: ['918'] Content-Security-Policy: [default-src 'none'; style-src 'unsafe-inline'] Content-Type: [text/plain; charset=utf-8] - Date: ['Thu, 08 Jun 2017 17:04:48 GMT'] + Date: ['Thu, 08 Jun 2017 21:23:17 GMT'] ETag: ['"f35114273a8c086d7190c66b2f904666791ad088"'] - Expires: ['Thu, 08 Jun 2017 17:09:48 GMT'] + Expires: ['Thu, 08 Jun 2017 21:28:17 GMT'] Source-Age: ['0'] Strict-Transport-Security: [max-age=31536000] Vary: ['Authorization,Accept-Encoding'] @@ -40,43 +40,43 @@ interactions: X-Cache: [MISS] X-Cache-Hits: ['0'] X-Content-Type-Options: [nosniff] - X-Fastly-Request-ID: [949f2cf8eb9367de6223da2a64471022e1eca46c] + X-Fastly-Request-ID: [640255d5343ea951b7f1280a9037fbad0434ee15] X-Frame-Options: [deny] X-Geo-Block-List: [''] - X-GitHub-Request-Id: ['5DB8:2F9C:447C6D:472F5E:593983B0'] - X-Served-By: [cache-dfw1845-DFW] - X-Timer: ['S1496941489.712248,VS0,VE77'] + X-GitHub-Request-Id: ['624C:2F9B:1A8A68:1BAC0F:5939C044'] + X-Served-By: [cache-dfw1829-DFW] + X-Timer: ['S1496956997.219948,VS0,VE75'] X-XSS-Protection: [1; mode=block] status: {code: 200, message: OK} - request: - body: '{"properties": {"parameters": {"location": {"value": "westus"}, "name": - {"value": "azure-cli-deploy-test-nsg1"}}, "mode": "Incremental", "templateLink": - {"uri": "https://raw.githubusercontent.com/Azure/azure-cli/master/src/command_modules/azure-cli-resource/tests/simple_deploy.json"}}}' + body: '{"properties": {"templateLink": {"uri": "https://raw.githubusercontent.com/Azure/azure-cli/master/src/command_modules/azure-cli-resource/tests/simple_deploy.json"}, + "mode": "Incremental", "parameters": {"location": {"value": "westus"}, "name": + {"value": "azure-cli-deploy-test-nsg1"}}}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['286'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [9455660a-4c6c-11e7-99f9-985fd3386693] + x-ms-client-request-id: [b038fb68-4c90-11e7-bd3d-a0b3ccf7272a] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-uri-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Resources/deployments/simple_deploy","name":"simple_deploy","properties":{"templateLink":{"uri":"https://raw.githubusercontent.com/Azure/azure-cli/master/src/command_modules/azure-cli-resource/tests/simple_deploy.json","contentVersion":"1.0.0.0"},"templateHash":"3550658671258663593","parameters":{"location":{"type":"String","value":"westus"},"name":{"type":"String","value":"azure-cli-deploy-test-nsg1"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-06-08T17:04:50.5771758Z","duration":"PT0.2385447S","correlationId":"d58a557e-4bfd-4952-93a0-af907222dc8c","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]}]}],"dependencies":[]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Resources/deployments/simple_deploy","name":"simple_deploy","properties":{"templateLink":{"uri":"https://raw.githubusercontent.com/Azure/azure-cli/master/src/command_modules/azure-cli-resource/tests/simple_deploy.json","contentVersion":"1.0.0.0"},"templateHash":"3550658671258663593","parameters":{"location":{"type":"String","value":"westus"},"name":{"type":"String","value":"azure-cli-deploy-test-nsg1"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-06-08T21:23:18.8662612Z","duration":"PT0.5096614S","correlationId":"4df72875-101b-46fe-8274-6bf4a65f63c1","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]}]}],"dependencies":[]}}'} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/ae43b1e3-c35d-4c8c-bc0d-f148b4c52b78/resourcegroups/azure-cli-deployment-uri-test/providers/Microsoft.Resources/deployments/simple_deploy/operationStatuses/08587046653951389853?api-version=2017-05-10'] + Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/azure-cli-deployment-uri-test/providers/Microsoft.Resources/deployments/simple_deploy/operationStatuses/08587046498871210207?api-version=2017-05-10'] Cache-Control: [no-cache] Content-Length: ['862'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Jun 2017 17:04:49 GMT'] + Date: ['Thu, 08 Jun 2017 21:23:18 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1195'] status: {code: 201, message: Created} - request: body: null @@ -85,19 +85,19 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [9455660a-4c6c-11e7-99f9-985fd3386693] + x-ms-client-request-id: [b038fb68-4c90-11e7-bd3d-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-uri-test/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587046653951389853?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-uri-test/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587046498871210207?api-version=2017-05-10 response: body: {string: '{"status":"Succeeded"}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Jun 2017 17:05:20 GMT'] + Date: ['Thu, 08 Jun 2017 21:23:48 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -111,25 +111,25 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [9455660a-4c6c-11e7-99f9-985fd3386693] + x-ms-client-request-id: [b038fb68-4c90-11e7-bd3d-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-uri-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Resources/deployments/simple_deploy","name":"simple_deploy","properties":{"templateLink":{"uri":"https://raw.githubusercontent.com/Azure/azure-cli/master/src/command_modules/azure-cli-resource/tests/simple_deploy.json","contentVersion":"1.0.0.0"},"templateHash":"3550658671258663593","parameters":{"location":{"type":"String","value":"westus"},"name":{"type":"String","value":"azure-cli-deploy-test-nsg1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T17:05:02.3027397Z","duration":"PT11.9641086S","correlationId":"d58a557e-4bfd-4952-93a0-af907222dc8c","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]}]}],"dependencies":[],"outputs":{"newNSG":{"type":"Object","value":{"provisioningState":"Succeeded","resourceGuid":"fca6843c-35f6-4c7b-9be9-54dc3316e246","securityRules":[],"defaultSecurityRules":[{"name":"AllowVnetInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowVnetInBound","etag":"W/\"e17c9599-4f83-4c84-8bd2-8cf8ffa39079\"","properties":{"provisioningState":"Succeeded","description":"Allow - inbound traffic from all VMs in VNET","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"VirtualNetwork","destinationAddressPrefix":"VirtualNetwork","access":"Allow","priority":65000,"direction":"Inbound"}},{"name":"AllowAzureLoadBalancerInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowAzureLoadBalancerInBound","etag":"W/\"e17c9599-4f83-4c84-8bd2-8cf8ffa39079\"","properties":{"provisioningState":"Succeeded","description":"Allow - inbound traffic from azure load balancer","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"AzureLoadBalancer","destinationAddressPrefix":"*","access":"Allow","priority":65001,"direction":"Inbound"}},{"name":"DenyAllInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/DenyAllInBound","etag":"W/\"e17c9599-4f83-4c84-8bd2-8cf8ffa39079\"","properties":{"provisioningState":"Succeeded","description":"Deny - all inbound traffic","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"*","access":"Deny","priority":65500,"direction":"Inbound"}},{"name":"AllowVnetOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowVnetOutBound","etag":"W/\"e17c9599-4f83-4c84-8bd2-8cf8ffa39079\"","properties":{"provisioningState":"Succeeded","description":"Allow - outbound traffic from all VMs to all VMs in VNET","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"VirtualNetwork","destinationAddressPrefix":"VirtualNetwork","access":"Allow","priority":65000,"direction":"Outbound"}},{"name":"AllowInternetOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowInternetOutBound","etag":"W/\"e17c9599-4f83-4c84-8bd2-8cf8ffa39079\"","properties":{"provisioningState":"Succeeded","description":"Allow - outbound traffic from all VMs to Internet","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"Internet","access":"Allow","priority":65001,"direction":"Outbound"}},{"name":"DenyAllOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/DenyAllOutBound","etag":"W/\"e17c9599-4f83-4c84-8bd2-8cf8ffa39079\"","properties":{"provisioningState":"Succeeded","description":"Deny + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Resources/deployments/simple_deploy","name":"simple_deploy","properties":{"templateLink":{"uri":"https://raw.githubusercontent.com/Azure/azure-cli/master/src/command_modules/azure-cli-resource/tests/simple_deploy.json","contentVersion":"1.0.0.0"},"templateHash":"3550658671258663593","parameters":{"location":{"type":"String","value":"westus"},"name":{"type":"String","value":"azure-cli-deploy-test-nsg1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T21:23:42.0167355Z","duration":"PT23.6601357S","correlationId":"4df72875-101b-46fe-8274-6bf4a65f63c1","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]}]}],"dependencies":[],"outputs":{"newNSG":{"type":"Object","value":{"provisioningState":"Succeeded","resourceGuid":"2f751d8f-968d-4a0d-ae29-80f88ac79f8f","securityRules":[],"defaultSecurityRules":[{"name":"AllowVnetInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowVnetInBound","etag":"W/\"60b1f29f-2d32-479a-ade4-6cf7900a8b6e\"","properties":{"provisioningState":"Succeeded","description":"Allow + inbound traffic from all VMs in VNET","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"VirtualNetwork","destinationAddressPrefix":"VirtualNetwork","access":"Allow","priority":65000,"direction":"Inbound"}},{"name":"AllowAzureLoadBalancerInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowAzureLoadBalancerInBound","etag":"W/\"60b1f29f-2d32-479a-ade4-6cf7900a8b6e\"","properties":{"provisioningState":"Succeeded","description":"Allow + inbound traffic from azure load balancer","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"AzureLoadBalancer","destinationAddressPrefix":"*","access":"Allow","priority":65001,"direction":"Inbound"}},{"name":"DenyAllInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/DenyAllInBound","etag":"W/\"60b1f29f-2d32-479a-ade4-6cf7900a8b6e\"","properties":{"provisioningState":"Succeeded","description":"Deny + all inbound traffic","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"*","access":"Deny","priority":65500,"direction":"Inbound"}},{"name":"AllowVnetOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowVnetOutBound","etag":"W/\"60b1f29f-2d32-479a-ade4-6cf7900a8b6e\"","properties":{"provisioningState":"Succeeded","description":"Allow + outbound traffic from all VMs to all VMs in VNET","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"VirtualNetwork","destinationAddressPrefix":"VirtualNetwork","access":"Allow","priority":65000,"direction":"Outbound"}},{"name":"AllowInternetOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowInternetOutBound","etag":"W/\"60b1f29f-2d32-479a-ade4-6cf7900a8b6e\"","properties":{"provisioningState":"Succeeded","description":"Allow + outbound traffic from all VMs to Internet","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"Internet","access":"Allow","priority":65001,"direction":"Outbound"}},{"name":"DenyAllOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/DenyAllOutBound","etag":"W/\"60b1f29f-2d32-479a-ade4-6cf7900a8b6e\"","properties":{"provisioningState":"Succeeded","description":"Deny all outbound traffic","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"*","access":"Deny","priority":65500,"direction":"Outbound"}}]}}},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1"}]}}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Jun 2017 17:05:21 GMT'] + Date: ['Thu, 08 Jun 2017 21:23:48 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -143,25 +143,25 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [a8c58ee8-4c6c-11e7-93a7-985fd3386693] + x-ms-client-request-id: [c3f07b82-4c90-11e7-920e-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-uri-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Resources/deployments/simple_deploy","name":"simple_deploy","properties":{"templateLink":{"uri":"https://raw.githubusercontent.com/Azure/azure-cli/master/src/command_modules/azure-cli-resource/tests/simple_deploy.json","contentVersion":"1.0.0.0"},"templateHash":"3550658671258663593","parameters":{"location":{"type":"String","value":"westus"},"name":{"type":"String","value":"azure-cli-deploy-test-nsg1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T17:05:02.3027397Z","duration":"PT11.9641086S","correlationId":"d58a557e-4bfd-4952-93a0-af907222dc8c","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]}]}],"dependencies":[],"outputs":{"newNSG":{"type":"Object","value":{"provisioningState":"Succeeded","resourceGuid":"fca6843c-35f6-4c7b-9be9-54dc3316e246","securityRules":[],"defaultSecurityRules":[{"name":"AllowVnetInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowVnetInBound","etag":"W/\"e17c9599-4f83-4c84-8bd2-8cf8ffa39079\"","properties":{"provisioningState":"Succeeded","description":"Allow - inbound traffic from all VMs in VNET","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"VirtualNetwork","destinationAddressPrefix":"VirtualNetwork","access":"Allow","priority":65000,"direction":"Inbound"}},{"name":"AllowAzureLoadBalancerInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowAzureLoadBalancerInBound","etag":"W/\"e17c9599-4f83-4c84-8bd2-8cf8ffa39079\"","properties":{"provisioningState":"Succeeded","description":"Allow - inbound traffic from azure load balancer","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"AzureLoadBalancer","destinationAddressPrefix":"*","access":"Allow","priority":65001,"direction":"Inbound"}},{"name":"DenyAllInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/DenyAllInBound","etag":"W/\"e17c9599-4f83-4c84-8bd2-8cf8ffa39079\"","properties":{"provisioningState":"Succeeded","description":"Deny - all inbound traffic","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"*","access":"Deny","priority":65500,"direction":"Inbound"}},{"name":"AllowVnetOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowVnetOutBound","etag":"W/\"e17c9599-4f83-4c84-8bd2-8cf8ffa39079\"","properties":{"provisioningState":"Succeeded","description":"Allow - outbound traffic from all VMs to all VMs in VNET","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"VirtualNetwork","destinationAddressPrefix":"VirtualNetwork","access":"Allow","priority":65000,"direction":"Outbound"}},{"name":"AllowInternetOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowInternetOutBound","etag":"W/\"e17c9599-4f83-4c84-8bd2-8cf8ffa39079\"","properties":{"provisioningState":"Succeeded","description":"Allow - outbound traffic from all VMs to Internet","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"Internet","access":"Allow","priority":65001,"direction":"Outbound"}},{"name":"DenyAllOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/DenyAllOutBound","etag":"W/\"e17c9599-4f83-4c84-8bd2-8cf8ffa39079\"","properties":{"provisioningState":"Succeeded","description":"Deny + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Resources/deployments/simple_deploy","name":"simple_deploy","properties":{"templateLink":{"uri":"https://raw.githubusercontent.com/Azure/azure-cli/master/src/command_modules/azure-cli-resource/tests/simple_deploy.json","contentVersion":"1.0.0.0"},"templateHash":"3550658671258663593","parameters":{"location":{"type":"String","value":"westus"},"name":{"type":"String","value":"azure-cli-deploy-test-nsg1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T21:23:42.0167355Z","duration":"PT23.6601357S","correlationId":"4df72875-101b-46fe-8274-6bf4a65f63c1","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]}]}],"dependencies":[],"outputs":{"newNSG":{"type":"Object","value":{"provisioningState":"Succeeded","resourceGuid":"2f751d8f-968d-4a0d-ae29-80f88ac79f8f","securityRules":[],"defaultSecurityRules":[{"name":"AllowVnetInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowVnetInBound","etag":"W/\"60b1f29f-2d32-479a-ade4-6cf7900a8b6e\"","properties":{"provisioningState":"Succeeded","description":"Allow + inbound traffic from all VMs in VNET","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"VirtualNetwork","destinationAddressPrefix":"VirtualNetwork","access":"Allow","priority":65000,"direction":"Inbound"}},{"name":"AllowAzureLoadBalancerInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowAzureLoadBalancerInBound","etag":"W/\"60b1f29f-2d32-479a-ade4-6cf7900a8b6e\"","properties":{"provisioningState":"Succeeded","description":"Allow + inbound traffic from azure load balancer","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"AzureLoadBalancer","destinationAddressPrefix":"*","access":"Allow","priority":65001,"direction":"Inbound"}},{"name":"DenyAllInBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/DenyAllInBound","etag":"W/\"60b1f29f-2d32-479a-ade4-6cf7900a8b6e\"","properties":{"provisioningState":"Succeeded","description":"Deny + all inbound traffic","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"*","access":"Deny","priority":65500,"direction":"Inbound"}},{"name":"AllowVnetOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowVnetOutBound","etag":"W/\"60b1f29f-2d32-479a-ade4-6cf7900a8b6e\"","properties":{"provisioningState":"Succeeded","description":"Allow + outbound traffic from all VMs to all VMs in VNET","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"VirtualNetwork","destinationAddressPrefix":"VirtualNetwork","access":"Allow","priority":65000,"direction":"Outbound"}},{"name":"AllowInternetOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/AllowInternetOutBound","etag":"W/\"60b1f29f-2d32-479a-ade4-6cf7900a8b6e\"","properties":{"provisioningState":"Succeeded","description":"Allow + outbound traffic from all VMs to Internet","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"Internet","access":"Allow","priority":65001,"direction":"Outbound"}},{"name":"DenyAllOutBound","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1/defaultSecurityRules/DenyAllOutBound","etag":"W/\"60b1f29f-2d32-479a-ade4-6cf7900a8b6e\"","properties":{"provisioningState":"Succeeded","description":"Deny all outbound traffic","protocol":"*","sourcePortRange":"*","destinationPortRange":"*","sourceAddressPrefix":"*","destinationAddressPrefix":"*","access":"Deny","priority":65500,"direction":"Outbound"}}]}}},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-uri-test/providers/Microsoft.Network/networkSecurityGroups/azure-cli-deploy-test-nsg1"}]}}'} headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Jun 2017 17:05:22 GMT'] + Date: ['Thu, 08 Jun 2017 21:23:50 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -176,11 +176,11 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [a909d53a-4c6c-11e7-9433-985fd3386693] + x-ms-client-request-id: [c4178fec-4c90-11e7-abf6-a0b3ccf7272a] method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-uri-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 response: @@ -188,13 +188,13 @@ interactions: headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Thu, 08 Jun 2017 17:05:24 GMT'] + Date: ['Thu, 08 Jun 2017 21:23:50 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/ae43b1e3-c35d-4c8c-bc0d-f148b4c52b78/operationresults/eyJqb2JJZCI6IkRlcGxveW1lbnREZWxldGlvbkpvYi1HTlMtQVpVUkU6MkRDTEk6MkRERVBMT1lNRU5UOjJEVVJJOjJEVEVTVDo1RjU2WjI6NUYtU0lNUExFOjVGREVQTE9ZLSIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/operationresults/eyJqb2JJZCI6IkRlcGxveW1lbnREZWxldGlvbkpvYi1HTlMtQVpVUkU6MkRDTEk6MkRERVBMT1lNRU5UOjJEVVJJOjJEVEVTVDo1RlhVQzA6NUYtU0lNUExFOjVGREVQTE9ZLSIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] Pragma: [no-cache] Retry-After: ['15'] Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 202, message: Accepted} - request: body: null @@ -203,21 +203,21 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [a909d53a-4c6c-11e7-9433-985fd3386693] + x-ms-client-request-id: [c4178fec-4c90-11e7-abf6-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IkRlcGxveW1lbnREZWxldGlvbkpvYi1HTlMtQVpVUkU6MkRDTEk6MkRERVBMT1lNRU5UOjJEVVJJOjJEVEVTVDo1RjU2WjI6NUYtU0lNUExFOjVGREVQTE9ZLSIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IkRlcGxveW1lbnREZWxldGlvbkpvYi1HTlMtQVpVUkU6MkRDTEk6MkRERVBMT1lNRU5UOjJEVVJJOjJEVEVTVDo1RlhVQzA6NUYtU0lNUExFOjVGREVQTE9ZLSIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10 response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Thu, 08 Jun 2017 17:05:39 GMT'] + Date: ['Thu, 08 Jun 2017 21:24:06 GMT'] Expires: ['-1'] - Location: ['https://management.azure.com/subscriptions/ae43b1e3-c35d-4c8c-bc0d-f148b4c52b78/operationresults/eyJqb2JJZCI6IkRlcGxveW1lbnREZWxldGlvbkpvYi1HTlMtQVpVUkU6MkRDTEk6MkRERVBMT1lNRU5UOjJEVVJJOjJEVEVTVDo1RjU2WjI6NUYtU0lNUExFOjVGREVQTE9ZLSIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/operationresults/eyJqb2JJZCI6IkRlcGxveW1lbnREZWxldGlvbkpvYi1HTlMtQVpVUkU6MkRDTEk6MkRERVBMT1lNRU5UOjJEVVJJOjJEVEVTVDo1RlhVQzA6NUYtU0lNUExFOjVGREVQTE9ZLSIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] Pragma: [no-cache] Retry-After: ['15'] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -229,18 +229,44 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [a909d53a-4c6c-11e7-9433-985fd3386693] + x-ms-client-request-id: [c4178fec-4c90-11e7-abf6-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IkRlcGxveW1lbnREZWxldGlvbkpvYi1HTlMtQVpVUkU6MkRDTEk6MkRERVBMT1lNRU5UOjJEVVJJOjJEVEVTVDo1RjU2WjI6NUYtU0lNUExFOjVGREVQTE9ZLSIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IkRlcGxveW1lbnREZWxldGlvbkpvYi1HTlMtQVpVUkU6MkRDTEk6MkRERVBMT1lNRU5UOjJEVVJJOjJEVEVTVDo1RlhVQzA6NUYtU0lNUExFOjVGREVQTE9ZLSIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10 response: body: {string: ''} headers: Cache-Control: [no-cache] - Date: ['Thu, 08 Jun 2017 17:05:54 GMT'] + Content-Length: ['0'] + Date: ['Thu, 08 Jun 2017 21:24:21 GMT'] + Expires: ['-1'] + Location: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/operationresults/eyJqb2JJZCI6IkRlcGxveW1lbnREZWxldGlvbkpvYi1HTlMtQVpVUkU6MkRDTEk6MkRERVBMT1lNRU5UOjJEVVJJOjJEVEVTVDo1RlhVQzA6NUYtU0lNUExFOjVGREVQTE9ZLSIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + Pragma: [no-cache] + Retry-After: ['15'] + Strict-Transport-Security: [max-age=31536000; includeSubDomains] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/TEST/2.0.7+dev] + accept-language: [en-US] + x-ms-client-request-id: [c4178fec-4c90-11e7-abf6-a0b3ccf7272a] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IkRlcGxveW1lbnREZWxldGlvbkpvYi1HTlMtQVpVUkU6MkRDTEk6MkRERVBMT1lNRU5UOjJEVVJJOjJEVEVTVDo1RlhVQzA6NUYtU0lNUExFOjVGREVQTE9ZLSIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10 + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Date: ['Thu, 08 Jun 2017 21:24:35 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] @@ -252,11 +278,11 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python AZURECLI/TEST/2.0.7+dev] accept-language: [en-US] - x-ms-client-request-id: [bcdd1a3e-4c6c-11e7-bb23-985fd3386693] + x-ms-client-request-id: [e0002888-4c90-11e7-a096-a0b3ccf7272a] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-uri-test/providers/Microsoft.Resources/deployments/?api-version=2017-05-10 response: @@ -264,7 +290,7 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Jun 2017 17:05:56 GMT'] + Date: ['Thu, 08 Jun 2017 21:24:37 GMT'] Expires: ['-1'] Pragma: [no-cache] Strict-Transport-Security: [max-age=31536000; includeSubDomains] diff --git a/src/command_modules/azure-cli-resource/tests/simple_deploy_parameters.json b/src/command_modules/azure-cli-resource/tests/simple_deploy_parameters.json index 5542aec0e..40c143fbf 100644 --- a/src/command_modules/azure-cli-resource/tests/simple_deploy_parameters.json +++ b/src/command_modules/azure-cli-resource/tests/simple_deploy_parameters.json @@ -1,8 +1,10 @@ { - "location": { - "value": "westus" - }, - "name": { - "value": "azure-cli-deploy-test-nsg1" + "parameters": { + "location": { + "value": "westus" + }, + "name": { + "value": "azure-cli-deploy-test-nsg1" + } } } \ No newline at end of file diff --git a/src/command_modules/azure-cli-resource/tests/test-object.json b/src/command_modules/azure-cli-resource/tests/test-object.json new file mode 100644 index 000000000..64799c0ed --- /dev/null +++ b/src/command_modules/azure-cli-resource/tests/test-object.json @@ -0,0 +1,8 @@ +[ + { + "name": "bepool1" + }, + { + "name": "bepool2" + } +] \ No newline at end of file diff --git a/src/command_modules/azure-cli-resource/tests/test-params.json b/src/command_modules/azure-cli-resource/tests/test-params.json new file mode 100644 index 000000000..d393e2593 --- /dev/null +++ b/src/command_modules/azure-cli-resource/tests/test-params.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "value": "test-lb" + }, + "location": { + "value": "westus" + }, + "privateIPAllocationMethod": { + "value": "Dynamic" + } + } +} \ No newline at end of file diff --git a/src/command_modules/azure-cli-resource/tests/test-template.json b/src/command_modules/azure-cli-resource/tests/test-template.json new file mode 100644 index 000000000..8e5a5d5da --- /dev/null +++ b/src/command_modules/azure-cli-resource/tests/test-template.json @@ -0,0 +1,44 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "type": "string" + }, + "location": { + "type": "string" + }, + "subnetId": { + "type": "string" + }, + "privateIPAllocationMethod": { + "type": "string" + }, + "backendAddressPools": { + "type": "array" + } + }, + "resources": [ + { + "apiVersion": "2016-03-30", + "dependsOn": [ ], + "location": "[parameters('location')]", + "name": "[parameters('name')]", + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerFrontEnd", + "properties": { + "privateIPAllocationMethod": "[parameters('privateIPAllocationMethod')]", + "subnet": { + "id": "[parameters('subnetId')]" + } + } + } + ], + "backendAddressPools": "[parameters('backendAddressPools')]" + }, + "type": "Microsoft.Network/loadBalancers" + } + ] +} \ No newline at end of file diff --git a/src/command_modules/azure-cli-resource/tests/test_custom.py b/src/command_modules/azure-cli-resource/tests/test_custom.py index fda9edf9b..6ef0754a4 100644 --- a/src/command_modules/azure-cli-resource/tests/test_custom.py +++ b/src/command_modules/azure-cli-resource/tests/test_custom.py @@ -6,11 +6,12 @@ import unittest from azure.cli.command_modules.resource.custom import ( - _merge_parameters, _get_missing_parameters, _extract_lock_params ) +from azure.cli.command_modules.resource._validators import validate_deployment_parameters + class TestCustom(unittest.TestCase): def test_extract_parameters(self): @@ -158,29 +159,32 @@ class TestCustom(unittest.TestCase): self.assertDictEqual(out_params, expected) - def test_resource_merge_parameters(self): + def test_deployment_parameters(self): tests = [ { "parameter_list": [], - "expected": None, + "expected": {}, }, { - "parameter_list": ['{"foo": "bar"}'], + "parameter_list": [['{"foo": "bar"}']], "expected": {"foo": "bar"}, }, { - "parameter_list": ['{"foo": "bar"}', '{"baz": "blat"}'], + "parameter_list": [['{"foo": "bar"}', '{"baz": "blat"}']], "expected": {"foo": "bar", "baz": "blat"}, }, { - "parameter_list": ['{"foo": "bar"}', '{"foo": "baz"}'], + "parameter_list": [['{"foo": "bar"}', '{"foo": "baz"}']], "expected": {"foo": "baz"}, }, ] for test in tests: - output = _merge_parameters(test['parameter_list']) - self.assertEqual(output, test['expected']) + from argparse import Namespace + namespace = Namespace() + namespace.parameters = test['parameter_list'] + validate_deployment_parameters(namespace) + self.assertEqual(namespace.parameters, test['expected']) if __name__ == '__main__': diff --git a/src/command_modules/azure-cli-resource/tests/test_resource.py b/src/command_modules/azure-cli-resource/tests/test_resource.py index 303ce2b46..7c310420d 100644 --- a/src/command_modules/azure-cli-resource/tests/test_resource.py +++ b/src/command_modules/azure-cli-resource/tests/test_resource.py @@ -7,7 +7,7 @@ import os import time import unittest -from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer, JMESPathCheck as JCheck) +from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer, JMESPathCheck as JCheck, create_random_name) # AZURE CLI RESOURCE TEST DEFINITIONS from azure.cli.testsdk.vcr_test_base import (VCRTestBase, JMESPathCheck, NoneCheck, BooleanCheck, @@ -320,20 +320,24 @@ class DeploymentTest(ResourceGroupVCRTestBase): def body(self): curr_dir = os.path.dirname(os.path.realpath(__file__)) - template_file = os.path.join(curr_dir, 'simple_deploy.json').replace('\\', '\\\\') - parameters_file = os.path.join(curr_dir, 'simple_deploy_parameters.json').replace('\\', - '\\\\') + template_file = os.path.join(curr_dir, 'test-template.json').replace('\\', '\\\\') + parameters_file = os.path.join(curr_dir, 'test-params.json').replace('\\', '\\\\') + object_file = os.path.join(curr_dir, 'test-object.json').replace('\\', '\\\\') deployment_name = 'azure-cli-deployment' - self.cmd('group deployment validate -g {} --template-file {} --parameters @{}'.format( - self.resource_group, template_file, parameters_file), checks=[ - JMESPathCheck('properties.provisioningState', 'Accepted') + subnet_id = self.cmd('network vnet create -g {} -n vnet1 --subnet-name subnet1'.format(self.resource_group))['newVNet']['subnets'][0]['id'] + + self.cmd('group deployment validate -g {} --template-file {} --parameters @"{}" --parameters subnetId="{}" --parameters backendAddressPools=@"{}"'.format( + self.resource_group, template_file, parameters_file, subnet_id, object_file), checks=[ + JMESPathCheck('properties.provisioningState', 'Succeeded') ]) - self.cmd('group deployment create -g {} -n {} --template-file {} --parameters @{}'.format( - self.resource_group, deployment_name, template_file, parameters_file), checks=[ + + self.cmd('group deployment create -g {} -n {} --template-file {} --parameters @"{}" --parameters subnetId="{}" --parameters backendAddressPools=@"{}"'.format( + self.resource_group, deployment_name, template_file, parameters_file, subnet_id, object_file), checks=[ JMESPathCheck('properties.provisioningState', 'Succeeded'), JMESPathCheck('resourceGroup', self.resource_group), ]) + self.cmd('group deployment list -g {}'.format(self.resource_group), checks=[ JMESPathCheck('[0].name', deployment_name), JMESPathCheck('[0].resourceGroup', self.resource_group) @@ -655,20 +659,22 @@ class ManagedAppScenarioTest(ScenarioTest): class CrossRGDeploymentScenarioTest(ScenarioTest): - @ResourceGroupPreparer() - def test_crossrgdeployment(self, resource_group): + + @ResourceGroupPreparer(name_prefix='cli_test_cross_rg_alt', parameter_name='resource_group_cross') + @ResourceGroupPreparer(name_prefix='cli_test_cross_rg_deploy') + def test_crossrg_deployment(self, resource_group, resource_group_cross): curr_dir = os.path.dirname(os.path.realpath(__file__)) template_file = os.path.join(curr_dir, 'crossrg_deploy.json').replace('\\', '\\\\') - parameters_file = os.path.join(curr_dir, 'crossrg_deploy_parameters.json').replace('\\', - '\\\\') deployment_name = 'azure-cli-crossrgdeployment' + storage_account_1 = create_random_name(prefix='crossrg') + storage_account_2 = create_random_name(prefix='crossrg') - self.cmd('group deployment validate -g {} --template-file {} --parameters @{}'.format( - resource_group, template_file, parameters_file), checks=[ + self.cmd('group deployment validate -g {} --template-file {} --parameters CrossRG={} StorageAccountName1={} StorageAccountName2={}'.format( + resource_group, template_file, resource_group_cross, storage_account_1, storage_account_2), checks=[ JCheck('properties.provisioningState', 'Succeeded') ]) - self.cmd('group deployment create -g {} -n {} --template-file {} --parameters @{}'.format( - resource_group, deployment_name, template_file, parameters_file), checks=[ + self.cmd('group deployment create -g {} -n {} --template-file {} --parameters CrossRG={}'.format( + resource_group, deployment_name, template_file, resource_group_cross), checks=[ JCheck('properties.provisioningState', 'Succeeded'), JCheck('resourceGroup', resource_group), ]) @@ -676,20 +682,15 @@ class CrossRGDeploymentScenarioTest(ScenarioTest): JCheck('[0].name', deployment_name), JCheck('[0].resourceGroup', resource_group) ]) - self.cmd('group deployment show -g {} -n {}'.format(resource_group, deployment_name), - checks=[ - JCheck('name', deployment_name), - JCheck('resourceGroup', resource_group) - ]) - self.cmd('group deployment operation list -g {} -n {}'.format(resource_group, - deployment_name), checks=[ + self.cmd('group deployment show -g {} -n {}'.format(resource_group, deployment_name), checks=[ + JCheck('name', deployment_name), + JCheck('resourceGroup', resource_group) + ]) + self.cmd('group deployment operation list -g {} -n {}'.format(resource_group, deployment_name), checks=[ JCheck('length([])', 3), JCheck('[0].resourceGroup', resource_group) ]) - def tear_down(self): - self.cmd('group delete --name {} --no-wait --yes'.format('crossrg5')) - if __name__ == '__main__': unittest.main() diff --git a/src/command_modules/azure-cli-resource/tests/test_resource_validators.py b/src/command_modules/azure-cli-resource/tests/test_resource_validators.py index eea7b941b..9ef089c86 100644 --- a/src/command_modules/azure-cli-resource/tests/test_resource_validators.py +++ b/src/command_modules/azure-cli-resource/tests/test_resource_validators.py @@ -10,7 +10,7 @@ from six import StringIO from azure.cli.core.util import CLIError from azure.cli.command_modules.resource._validators import ( - validate_deployment_name, + _validate_deployment_name, validate_lock_parameters, ) @@ -120,14 +120,14 @@ class Test_resource_validators(unittest.TestCase): namespace.template_uri = 'https://templates/template123.json?foo=bar' namespace.template_file = None namespace.deployment_name = None - validate_deployment_name(namespace) + _validate_deployment_name(namespace) self.assertEqual('template123', namespace.deployment_name) namespace = mock.MagicMock() namespace.template_file = __file__ namespace.template_uri = None namespace.deployment_name = None - validate_deployment_name(namespace) + _validate_deployment_name(namespace) file_base_name = os.path.basename(__file__) file_base_name = file_base_name[:str.find(file_base_name, '.')] @@ -138,7 +138,7 @@ class Test_resource_validators(unittest.TestCase): namespace.template_file = '{"foo":"bar"}' namespace.template_uri = None namespace.deployment_name = None - validate_deployment_name(namespace) + _validate_deployment_name(namespace) self.assertEqual('deployment1', namespace.deployment_name) diff --git a/test-object.json b/test-object.json new file mode 100644 index 000000000..64799c0ed --- /dev/null +++ b/test-object.json @@ -0,0 +1,8 @@ +[ + { + "name": "bepool1" + }, + { + "name": "bepool2" + } +] \ No newline at end of file diff --git a/test-params.json b/test-params.json new file mode 100644 index 000000000..7d14aa51f --- /dev/null +++ b/test-params.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "value": "test-lb" + }, + "location": { + "value": "westus" + }, + "subnetId": { + "value": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/tjp-arm/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" + } + } +} \ No newline at end of file diff --git a/test-template.json b/test-template.json new file mode 100644 index 000000000..8e5a5d5da --- /dev/null +++ b/test-template.json @@ -0,0 +1,44 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "type": "string" + }, + "location": { + "type": "string" + }, + "subnetId": { + "type": "string" + }, + "privateIPAllocationMethod": { + "type": "string" + }, + "backendAddressPools": { + "type": "array" + } + }, + "resources": [ + { + "apiVersion": "2016-03-30", + "dependsOn": [ ], + "location": "[parameters('location')]", + "name": "[parameters('name')]", + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerFrontEnd", + "properties": { + "privateIPAllocationMethod": "[parameters('privateIPAllocationMethod')]", + "subnet": { + "id": "[parameters('subnetId')]" + } + } + } + ], + "backendAddressPools": "[parameters('backendAddressPools')]" + }, + "type": "Microsoft.Network/loadBalancers" + } + ] +} \ No newline at end of file
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": -1, "issue_text_score": 0, "test_score": -1 }, "num_modified_files": 9 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==2.11.7 attrs==22.2.0 autopep8==2.0.4 azure-batch==3.0.0 -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_billing&subdirectory=src/command_modules/azure-cli-billing -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_cdn&subdirectory=src/command_modules/azure-cli-cdn -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_cognitiveservices&subdirectory=src/command_modules/azure-cli-cognitiveservices -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_consumption&subdirectory=src/command_modules/azure-cli-consumption -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_cosmosdb&subdirectory=src/command_modules/azure-cli-cosmosdb -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_interactive&subdirectory=src/command_modules/azure-cli-interactive -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_rdbms&subdirectory=src/command_modules/azure-cli-rdbms -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_sf&subdirectory=src/command_modules/azure-cli-sf -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@fb9f2e795d88105549c8552dd7a38136a3fdfda0#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.9 azure-graphrbac==0.30.0rc6 azure-keyvault==0.3.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==4.0.0 azure-mgmt-billing==0.1.0 azure-mgmt-cdn==0.30.2 azure-mgmt-cognitiveservices==1.0.0 azure-mgmt-compute==1.0.0rc1 azure-mgmt-consumption==0.1.0 azure-mgmt-containerregistry==0.2.1 azure-mgmt-datalake-analytics==0.1.4 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.4 azure-mgmt-devtestlabs==2.0.0 azure-mgmt-dns==1.0.1 azure-mgmt-documentdb==0.1.3 azure-mgmt-iothub==0.2.2 azure-mgmt-keyvault==0.31.0 azure-mgmt-monitor==0.2.1 azure-mgmt-network==1.0.0rc3 azure-mgmt-nspkg==1.0.0 azure-mgmt-rdbms==0.1.0 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.1.0rc1 azure-mgmt-sql==0.5.1 azure-mgmt-storage==1.0.0rc1 azure-mgmt-trafficmanager==0.30.0 azure-mgmt-web==0.32.0 azure-monitor==0.3.0 azure-multiapi-storage==0.1.0 azure-nspkg==1.0.0 azure-servicefabric==5.6.130 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 coverage==6.2 cryptography==40.0.2 flake8==5.0.4 futures==3.1.1 humanfriendly==2.4 idna==3.10 importlib-metadata==4.2.0 iniconfig==1.1.1 isodate==0.7.0 isort==5.10.1 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.7.0 mock==5.2.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pluggy==1.0.0 prompt-toolkit==3.0.36 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.10.0 pycparser==2.21 pydocumentdb==2.3.5 pyflakes==2.5.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.7.1 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 pytz==2025.2 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.7 tomli==1.2.3 typed-ast==1.5.5 typing-extensions==4.1.1 urllib3==1.26.20 urllib3-secure-extra==0.1.0 vcrpy==1.10.3 vsts-cd-manager==1.0.2 wcwidth==0.2.13 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==2.11.7 - attrs==22.2.0 - autopep8==2.0.4 - azure-batch==3.0.0 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.9 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.3.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==4.0.0 - azure-mgmt-billing==0.1.0 - azure-mgmt-cdn==0.30.2 - azure-mgmt-cognitiveservices==1.0.0 - azure-mgmt-compute==1.0.0rc1 - azure-mgmt-consumption==0.1.0 - azure-mgmt-containerregistry==0.2.1 - azure-mgmt-datalake-analytics==0.1.4 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.4 - azure-mgmt-devtestlabs==2.0.0 - azure-mgmt-dns==1.0.1 - azure-mgmt-documentdb==0.1.3 - azure-mgmt-iothub==0.2.2 - azure-mgmt-keyvault==0.31.0 - azure-mgmt-monitor==0.2.1 - azure-mgmt-network==1.0.0rc3 - azure-mgmt-nspkg==1.0.0 - azure-mgmt-rdbms==0.1.0 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.1.0rc1 - azure-mgmt-sql==0.5.1 - azure-mgmt-storage==1.0.0rc1 - azure-mgmt-trafficmanager==0.30.0 - azure-mgmt-web==0.32.0 - azure-monitor==0.3.0 - azure-multiapi-storage==0.1.0 - azure-nspkg==1.0.0 - azure-servicefabric==5.6.130 - cffi==1.15.1 - colorama==0.3.7 - coverage==6.2 - cryptography==40.0.2 - flake8==5.0.4 - futures==3.1.1 - humanfriendly==2.4 - idna==3.10 - importlib-metadata==4.2.0 - iniconfig==1.1.1 - isodate==0.7.0 - isort==5.10.1 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.7.0 - mock==5.2.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pip==9.0.1 - pluggy==1.0.0 - prompt-toolkit==3.0.36 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.10.0 - pycparser==2.21 - pydocumentdb==2.3.5 - pyflakes==2.5.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.7.1 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pytz==2025.2 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.7 - tomli==1.2.3 - typed-ast==1.5.5 - typing-extensions==4.1.1 - urllib3==1.26.20 - urllib3-secure-extra==0.1.0 - vcrpy==1.10.3 - vsts-cd-manager==1.0.2 - wcwidth==0.2.13 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-resource/tests/test_custom.py::TestCustom::test_deployment_parameters", "src/command_modules/azure-cli-resource/tests/test_custom.py::TestCustom::test_extract_parameters", "src/command_modules/azure-cli-resource/tests/test_custom.py::TestCustom::test_resource_missing_parameters", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceGroupScenarioTest::test_resource_group", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceGroupNoWaitScenarioTest::test_resource_group_no_wait", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceScenarioTest::test_resource_scenario", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceIDScenarioTest::test_resource_id_scenario", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceCreateScenarioTest::test_resource_create", "src/command_modules/azure-cli-resource/tests/test_resource.py::TagScenarioTest::test_tag_scenario", "src/command_modules/azure-cli-resource/tests/test_resource.py::ProviderRegistrationTest::test_provider_registration", "src/command_modules/azure-cli-resource/tests/test_resource.py::ProviderOperationTest::test_provider_operation", "src/command_modules/azure-cli-resource/tests/test_resource.py::DeploymentTest::test_group_deployment", "src/command_modules/azure-cli-resource/tests/test_resource.py::DeploymentnoWaitTest::test_group_deployment_no_wait", "src/command_modules/azure-cli-resource/tests/test_resource.py::DeploymentThruUriTest::test_group_deployment_thru_uri", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceMoveScenarioTest::test_resource_move", "src/command_modules/azure-cli-resource/tests/test_resource.py::FeatureScenarioTest::test_feature_list", "src/command_modules/azure-cli-resource/tests/test_resource.py::PolicyScenarioTest::test_resource_policy", "src/command_modules/azure-cli-resource/tests/test_resource_validators.py::Test_resource_validators::test_generate_deployment_name_from_file", "src/command_modules/azure-cli-resource/tests/test_resource_validators.py::Test_resource_validators::test_validate_lock_params", "src/command_modules/azure-cli-resource/tests/test_resource_validators.py::Test_resource_validators::test_validate_lock_params_invalid" ]
[ "src/command_modules/azure-cli-resource/tests/test_resource.py::ManagedAppDefinitionScenarioTest::test_managedappdef", "src/command_modules/azure-cli-resource/tests/test_resource.py::ManagedAppScenarioTest::test_managedapp", "src/command_modules/azure-cli-resource/tests/test_resource.py::CrossRGDeploymentScenarioTest::test_crossrg_deployment" ]
[]
[]
MIT License
null
Azure__azure-cli-3743
e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec
2017-06-15 20:19:26
eb12ac454cbe1ddb59c86cdf2045e1912660e750
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3743?src=pr&el=h1) Report > Merging [#3743](https://codecov.io/gh/Azure/azure-cli/pull/3743?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/ff20840c0278a29204adbb2c23c50d92feaa799f?src=pr&el=desc) will **not change** coverage. > The diff coverage is `50%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/3743/graphs/tree.svg?src=pr&token=2pog0TKvF8&width=650&height=150)](https://codecov.io/gh/Azure/azure-cli/pull/3743?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #3743 +/- ## ======================================= Coverage 72.09% 72.09% ======================================= Files 422 422 Lines 26259 26259 Branches 3995 3995 ======================================= Hits 18932 18932 Misses 6099 6099 Partials 1228 1228 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/3743?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [.../azure/cli/command\_modules/resource/\_validators.py](https://codecov.io/gh/Azure/azure-cli/pull/3743?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcmVzb3VyY2UvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9yZXNvdXJjZS9fdmFsaWRhdG9ycy5weQ==) | `71.95% <50%> (ø)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3743?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3743?src=pr&el=footer). Last update [ff20840...2d89597](https://codecov.io/gh/Azure/azure-cli/pull/3743?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/azure-cli.pyproj b/azure-cli.pyproj index ea34c0dd2..842d462d2 100644 --- a/azure-cli.pyproj +++ b/azure-cli.pyproj @@ -616,8 +616,6 @@ <Compile Include="command_modules\azure-cli-sf\azure\cli\command_modules\sf\_params.py" /> <Compile Include="command_modules\azure-cli-sf\azure\cli\command_modules\sf\__init__.py" /> <Compile Include="command_modules\azure-cli-sf\setup.py" /> - <Compile Include="command_modules\azure-cli-sf\tests\manual_scenario_sf_commands.py" /> - <Compile Include="command_modules\azure-cli-sf\tests\manual_sf_commands.py" /> <Compile Include="command_modules\azure-cli-sql\azure\cli\command_modules\sql\commands.py" /> <Compile Include="command_modules\azure-cli-sql\azure\cli\command_modules\sql\custom.py" /> <Compile Include="command_modules\azure-cli-sql\azure\cli\command_modules\sql\help.py" /> @@ -937,12 +935,10 @@ <Folder Include="command_modules\azure-cli-redis\azure\cli\command_modules\" /> <Folder Include="command_modules\azure-cli-redis\azure\cli\command_modules\redis\" /> <Folder Include="command_modules\azure-cli-redis\tests\" /> - <Folder Include="command_modules\azure-cli-resource\azure\cli\command_modules\resource\tests\" /> <Folder Include="command_modules\azure-cli-resource\tests\" /> <Folder Include="command_modules\azure-cli-role\tests\" /> <Folder Include="command_modules\azure-cli-redis\azure\cli\command_modules\redis\tests\" /> <Folder Include="command_modules\azure-cli-role\tests\" /> - <Folder Include="command_modules\azure-cli-role\tests\recordings\" /> <Folder Include="command_modules\azure-cli-sf\" /> <Folder Include="command_modules\azure-cli-sf\azure\" /> <Folder Include="command_modules\azure-cli-sf\azure\cli\" /> @@ -1122,6 +1118,9 @@ <Content Include="command_modules\azure-cli-resource\tests\crossrg_deploy.json" /> <Content Include="command_modules\azure-cli-resource\tests\simple_deploy.json" /> <Content Include="command_modules\azure-cli-resource\tests\simple_deploy_parameters.json" /> + <Content Include="command_modules\azure-cli-resource\tests\test-object.json" /> + <Content Include="command_modules\azure-cli-resource\tests\test-params.json" /> + <Content Include="command_modules\azure-cli-resource\tests\test-template.json" /> <Content Include="command_modules\azure-cli-role\HISTORY.rst" /> <Content Include="command_modules\azure-cli-sf\HISTORY.rst" /> <Content Include="command_modules\azure-cli-sql\HISTORY.rst" /> @@ -1138,11 +1137,6 @@ <Content Include="command_modules\azure-cli-vm\tests\sample-public.json" /> <Content Include="command_modules\azure-cli-vm\tests\vmss_create_test_plan.md" /> <Content Include="command_modules\azure-cli-vm\tests\vm_create_test_plan.md" /> - <Content Include="command_modules\azure-cli-role\tests\recordings\test_application_set_scenario.yaml" /> - <Content Include="command_modules\azure-cli-role\tests\recordings\test_create_for_rbac_with_secret.yaml" /> - <Content Include="command_modules\azure-cli-role\tests\recordings\test_role_assignment_scenario.yaml" /> - <Content Include="command_modules\azure-cli-role\tests\recordings\test_role_create_scenario.yaml" /> - <Content Include="command_modules\azure-cli-role\tests\recordings\test_sp_create_scenario.yaml" /> </ItemGroup> <ItemGroup> <Interpreter Include="..\env\"> diff --git a/src/command_modules/azure-cli-resource/HISTORY.rst b/src/command_modules/azure-cli-resource/HISTORY.rst index eb2eb204b..7713c8e11 100644 --- a/src/command_modules/azure-cli-resource/HISTORY.rst +++ b/src/command_modules/azure-cli-resource/HISTORY.rst @@ -1,9 +1,16 @@ .. :changelog: Release History + =============== + +unreleased +++++++++++++++++++ +* `group deployment create`: Fixes issue where some parameter files were no longer recognized using @<file> syntax. + + 2.0.8 (2017-06-13) -^^^^^^^^^^^^^^^^^^ +++++++++++++++++++ * Fix up some parsing and error messages. (#3584) * Fix various pylint disable rules * Fix --resource-type parsing for the lock command to accept <resource-namespace>/<resource-type> diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_validators.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_validators.py index fd6531210..c97a2867f 100644 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_validators.py +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_validators.py @@ -62,11 +62,11 @@ def validate_deployment_parameters(namespace): parameters = {} for params in namespace.parameters or []: for item in params: - if not _try_parse_key_value_object(parameters, item): - param_obj = _try_load_file_object(item) or _try_parse_json_object(item) - if not param_obj: - raise CLIError('Unable to parse parameter: {}'.format(item)) + param_obj = _try_load_file_object(item) or _try_parse_json_object(item) + if param_obj: parameters.update(param_obj) + elif not _try_parse_key_value_object(parameters, item): + raise CLIError('Unable to parse parameter: {}'.format(item)) namespace.parameters = parameters
Parameters file values not being read during deployment create ### Description When using `az group deployment create` with the newest version of the Azure CLI it no longer respects the `--parameters @<file>` contents and prompts me to type out each value in the command line. Tested same template/parameters JSON files on another machine with an older version of Azure CLI without issue. --- ### Environment summary **Install Method:** How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly) Answer here: Linux install using curl -L <url> | bash **CLI Version:** What version of the CLI and modules are installed? (Use `az --version`) Answer here: azure-cli (2.0.8) acr (2.0.6) acs (2.0.8) appservice (0.1.8) batch (3.0.1) billing (0.1.1) cdn (0.0.4) cloud (2.0.4) cognitiveservices (0.1.4) command-modules-nspkg (2.0.0) component (2.0.5) configure (2.0.8) consumption (0.1.1) core (2.0.9) cosmosdb (0.1.8) dla (0.0.8) dls (0.0.8) feedback (2.0.4) find (0.2.4) interactive (0.3.4) iot (0.1.7) keyvault (2.0.6) lab (0.0.6) monitor (0.0.6) network (2.0.8) nspkg (3.0.0) profile (2.0.6) rdbms (0.0.3) redis (0.2.5) resource (2.0.8) role (2.0.6) sf (1.0.3) sql (2.0.5) storage (2.0.8) vm (2.0.8) Python (Linux) 2.7.5 (default, Feb 10 2017, 17:36:50) [GCC 4.9.2 20141101 (Red Hat 4.9.2-1)] Python location '/home/jayden/lib/azure-cli/bin/python' **OS Version:** What OS and version are you using? Answer here: Modified Fedora 18 **Shell Type:** What shell are you using? (e.g. bash, cmd.exe, Bash on Windows) Answer here: bash
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-resource/tests/recordings/latest/test_group_deployment.yaml b/src/command_modules/azure-cli-resource/tests/recordings/latest/test_group_deployment.yaml index 5e8b598db..36ac195af 100644 --- a/src/command_modules/azure-cli-resource/tests/recordings/latest/test_group_deployment.yaml +++ b/src/command_modules/azure-cli-resource/tests/recordings/latest/test_group_deployment.yaml @@ -1,350 +1,1070 @@ interactions: +- request: + body: '{"tags": {"use": "az-test"}, "location": "westus"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001?api-version=2017-05-10 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001","name":"cli_test_deployment000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:13 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet create] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.7+dev] + AZURECLI/2.0.9+dev] accept-language: [en-US] - x-ms-client-request-id: [984358f0-4c90-11e7-8df4-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001?api-version=2017-05-10 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test","name":"azure-cli-deployment-test","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001","name":"cli_test_deployment000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Jun 2017 21:22:36 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - content-length: ['240'] + cache-control: [no-cache] + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:14 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: - body: '{"location": "westus", "properties": {"dhcpOptions": {}, "subnets": [{"properties": - {"addressPrefix": "10.0.0.0/24"}, "name": "subnet1"}], "addressSpace": {"addressPrefixes": - ["10.0.0.0/16"]}}, "tags": {}}' + body: '{"tags": {}, "location": "westus", "properties": {"addressSpace": {"addressPrefixes": + ["10.0.0.0/16"]}, "dhcpOptions": {}, "subnets": [{"properties": {"addressPrefix": + "10.0.0.0/24"}, "name": "subnet1"}]}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet create] Connection: [keep-alive] Content-Length: ['205'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python - AZURECLI/TEST/2.0.7+dev] + AZURECLI/2.0.9+dev] accept-language: [en-US] - x-ms-client-request-id: [9864d83e-4c90-11e7-a276-a0b3ccf7272a] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1?api-version=2017-03-01 response: - body: {string: "{\r\n \"name\": \"vnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1\"\ - ,\r\n \"etag\": \"W/\\\"afaa273d-fae6-4176-8e47-5f3f865704fe\\\"\",\r\n \ + body: {string: "{\r\n \"name\": \"vnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1\"\ + ,\r\n \"etag\": \"W/\\\"2e8849fc-07a0-48ba-8b8a-b03fb20355de\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\"\ ,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\":\ - \ \"Updating\",\r\n \"resourceGuid\": \"240e9c40-73c7-4893-83a0-d30f69019829\"\ + \ \"Updating\",\r\n \"resourceGuid\": \"d09ae1e7-9c02-4ca6-a4aa-e763eb6f73c1\"\ ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"\ 10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\"\ : []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"\ - ,\r\n \"etag\": \"W/\\\"afaa273d-fae6-4176-8e47-5f3f865704fe\\\"\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"\ + ,\r\n \"etag\": \"W/\\\"2e8849fc-07a0-48ba-8b8a-b03fb20355de\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ ,\r\n \"addressPrefix\": \"10.0.0.0/24\"\r\n }\r\n }\r\ \n ],\r\n \"virtualNetworkPeerings\": []\r\n }\r\n}"} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Network/locations/westus/operations/8c6d54b6-72de-49cb-87be-4a6bb7702d08?api-version=2017-03-01'] - Cache-Control: [no-cache] - Content-Length: ['1072'] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Jun 2017 21:22:36 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Retry-After: ['3'] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1195'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ad102992-75fc-4bfa-adfa-ced6b93b3a71?api-version=2017-03-01'] + cache-control: [no-cache] + content-length: ['1160'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:14 GMT'] + expires: ['-1'] + pragma: [no-cache] + retry-after: ['3'] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet create] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python - AZURECLI/TEST/2.0.7+dev] + AZURECLI/2.0.9+dev] accept-language: [en-US] - x-ms-client-request-id: [9864d83e-4c90-11e7-a276-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/8c6d54b6-72de-49cb-87be-4a6bb7702d08?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ad102992-75fc-4bfa-adfa-ced6b93b3a71?api-version=2017-03-01 response: body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Jun 2017 21:22:40 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['29'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] + CommandName: [network vnet create] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python - AZURECLI/TEST/2.0.7+dev] + AZURECLI/2.0.9+dev] accept-language: [en-US] - x-ms-client-request-id: [9864d83e-4c90-11e7-a276-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1?api-version=2017-03-01 response: - body: {string: "{\r\n \"name\": \"vnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1\"\ - ,\r\n \"etag\": \"W/\\\"8a5432ce-5584-4583-be8a-b322c796f079\\\"\",\r\n \ + body: {string: "{\r\n \"name\": \"vnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1\"\ + ,\r\n \"etag\": \"W/\\\"f3010535-1488-4c62-9947-dc69cccdd1c7\\\"\",\r\n \ \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\"\ ,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\":\ - \ \"Succeeded\",\r\n \"resourceGuid\": \"240e9c40-73c7-4893-83a0-d30f69019829\"\ + \ \"Succeeded\",\r\n \"resourceGuid\": \"d09ae1e7-9c02-4ca6-a4aa-e763eb6f73c1\"\ ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"\ 10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\"\ : []\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnet1\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"\ - ,\r\n \"etag\": \"W/\\\"8a5432ce-5584-4583-be8a-b322c796f079\\\"\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"\ + ,\r\n \"etag\": \"W/\\\"f3010535-1488-4c62-9947-dc69cccdd1c7\\\"\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"addressPrefix\": \"10.0.0.0/24\"\r\n }\r\n }\r\ \n ],\r\n \"virtualNetworkPeerings\": []\r\n }\r\n}"} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Jun 2017 21:22:41 GMT'] - ETag: [W/"8a5432ce-5584-4583-be8a-b322c796f079"] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1074'] + cache-control: [no-cache] + content-length: ['1162'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:17 GMT'] + etag: [W/"f3010535-1488-4c62-9947-dc69cccdd1c7"] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: - body: '{"properties": {"mode": "Incremental", "template": {"resources": [{"dependsOn": - [], "properties": {"backendAddressPools": "[parameters(''backendAddressPools'')]", - "frontendIPConfigurations": [{"properties": {"privateIPAllocationMethod": "[parameters(''privateIPAllocationMethod'')]", - "subnet": {"id": "[parameters(''subnetId'')]"}}, "name": "LoadBalancerFrontEnd"}]}, - "name": "[parameters(''name'')]", "location": "[parameters(''location'')]", - "apiVersion": "2016-03-30", "type": "Microsoft.Network/loadBalancers"}], "contentVersion": - "1.0.0.0", "parameters": {"location": {"type": "string"}, "privateIPAllocationMethod": - {"type": "string"}, "backendAddressPools": {"type": "array"}, "name": {"type": - "string"}, "subnetId": {"type": "string"}}, "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"}, - "parameters": {"location": {"value": "westus"}, "privateIPAllocationMethod": - {"value": "Dynamic"}, "backendAddressPools": {"value": [{"name": "bepool1"}, - {"name": "bepool2"}]}, "name": {"value": "test-lb"}, "subnetId": {"value": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}}}}' + body: 'b''{"properties": {"template": {"contentVersion": "1.0.0.0", "parameters": + {"location": {"type": "string"}, "tags": {"type": "object"}, "privateIPAllocationMethod": + {"type": "string"}, "name": {"type": "string"}, "backendAddressPools": {"type": + "array"}, "subnetId": {"type": "string"}}, "resources": [{"dependsOn": [], "location": + "[parameters(\''location\'')]", "tags": "[parameters(\''tags\'')]", "name": + "[parameters(\''name\'')]", "properties": {"backendAddressPools": "[parameters(\''backendAddressPools\'')]", + "frontendIPConfigurations": [{"name": "LoadBalancerFrontEnd", "properties": + {"privateIPAllocationMethod": "[parameters(\''privateIPAllocationMethod\'')]", + "subnet": {"id": "[parameters(\''subnetId\'')]"}}}]}, "type": "Microsoft.Network/loadBalancers", + "apiVersion": "2016-03-30"}], "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"}, + "parameters": {"location": {"value": "westus"}, "tags": {"value": {"key": "super=value"}}, + "privateIPAllocationMethod": {"value": "Dynamic"}, "name": {"value": "test-lb"}, + "subnetId": {"value": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}, + "backendAddressPools": {"value": [{"name": "bepool1"}, {"name": "bepool2"}]}}, + "mode": "Incremental"}}''' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment validate] Connection: [keep-alive] - Content-Length: ['1228'] + Content-Length: ['1375'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.7+dev] + AZURECLI/2.0.9+dev] accept-language: [en-US] - x-ms-client-request-id: [9ad7925e-4c90-11e7-9479-a0b3ccf7272a] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/mock-deployment/validate?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/mock-deployment/validate?api-version=2017-05-10 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/deployment_dry_run","name":"deployment_dry_run","properties":{"templateHash":"18048340065001902796","parameters":{"location":{"type":"String","value":"westus"},"privateIPAllocationMethod":{"type":"String","value":"Dynamic"},"backendAddressPools":{"type":"Array","value":[{"name":"bepool1"},{"name":"bepool2"}]},"name":{"type":"String","value":"test-lb"},"subnetId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T21:22:42.0844954Z","duration":"PT0S","correlationId":"522bdd66-c165-41e3-8913-93f10b835055","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"loadBalancers","locations":["westus"]}]}],"dependencies":[],"validatedResources":[{"apiVersion":"2016-03-30","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/loadBalancers/test-lb","name":"test-lb","type":"Microsoft.Network/loadBalancers","location":"westus","properties":{"backendAddressPools":[{"name":"bepool1"},{"name":"bepool2"}],"frontendIPConfigurations":[{"properties":{"privateIPAllocationMethod":"Dynamic","subnet":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"name":"LoadBalancerFrontEnd"}]}}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/deployment_dry_run","name":"deployment_dry_run","properties":{"templateHash":"6408713692666354622","parameters":{"location":{"type":"String","value":"westus"},"tags":{"type":"Object","value":{"key":"super=value"}},"privateIPAllocationMethod":{"type":"String","value":"Dynamic"},"name":{"type":"String","value":"test-lb"},"backendAddressPools":{"type":"Array","value":[{"name":"bepool1"},{"name":"bepool2"}]},"subnetId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-15T20:10:19.3122369Z","duration":"PT0S","correlationId":"d30de1dd-6b13-4d1c-843e-158c7ed0317c","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"loadBalancers","locations":["westus"]}]}],"dependencies":[],"validatedResources":[{"apiVersion":"2016-03-30","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb","name":"test-lb","type":"Microsoft.Network/loadBalancers","location":"westus","tags":{"key":"super=value"},"properties":{"backendAddressPools":[{"name":"bepool1"},{"name":"bepool2"}],"frontendIPConfigurations":[{"name":"LoadBalancerFrontEnd","properties":{"privateIPAllocationMethod":"Dynamic","subnet":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}}}]}}]}}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Jun 2017 21:22:41 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['1676'] - x-ms-ratelimit-remaining-subscription-writes: ['1195'] + cache-control: [no-cache] + content-length: ['1935'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: - body: '{"properties": {"mode": "Incremental", "template": {"resources": [{"dependsOn": - [], "properties": {"backendAddressPools": "[parameters(''backendAddressPools'')]", - "frontendIPConfigurations": [{"properties": {"privateIPAllocationMethod": "[parameters(''privateIPAllocationMethod'')]", - "subnet": {"id": "[parameters(''subnetId'')]"}}, "name": "LoadBalancerFrontEnd"}]}, - "name": "[parameters(''name'')]", "location": "[parameters(''location'')]", - "apiVersion": "2016-03-30", "type": "Microsoft.Network/loadBalancers"}], "contentVersion": - "1.0.0.0", "parameters": {"location": {"type": "string"}, "privateIPAllocationMethod": - {"type": "string"}, "backendAddressPools": {"type": "array"}, "name": {"type": - "string"}, "subnetId": {"type": "string"}}, "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"}, - "parameters": {"location": {"value": "westus"}, "privateIPAllocationMethod": - {"value": "Dynamic"}, "backendAddressPools": {"value": [{"name": "bepool1"}, - {"name": "bepool2"}]}, "name": {"value": "test-lb"}, "subnetId": {"value": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}}}}' + body: 'b''{"properties": {"template": {"contentVersion": "1.0.0.0", "parameters": + {"location": {"type": "string"}, "tags": {"type": "object"}, "privateIPAllocationMethod": + {"type": "string"}, "name": {"type": "string"}, "backendAddressPools": {"type": + "array"}, "subnetId": {"type": "string"}}, "resources": [{"dependsOn": [], "location": + "[parameters(\''location\'')]", "tags": "[parameters(\''tags\'')]", "name": + "[parameters(\''name\'')]", "properties": {"backendAddressPools": "[parameters(\''backendAddressPools\'')]", + "frontendIPConfigurations": [{"name": "LoadBalancerFrontEnd", "properties": + {"privateIPAllocationMethod": "[parameters(\''privateIPAllocationMethod\'')]", + "subnet": {"id": "[parameters(\''subnetId\'')]"}}}]}, "type": "Microsoft.Network/loadBalancers", + "apiVersion": "2016-03-30"}], "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"}, + "parameters": {"location": {"value": "westus"}, "tags": {"value": {"key": "super=value"}}, + "privateIPAllocationMethod": {"value": "Dynamic"}, "name": {"value": "test-lb"}, + "subnetId": {"value": "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}, + "backendAddressPools": {"value": [{"name": "bepool1"}, {"name": "bepool2"}]}}, + "mode": "Incremental"}}''' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] Connection: [keep-alive] - Content-Length: ['1228'] + Content-Length: ['1375'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.7+dev] + AZURECLI/2.0.9+dev] accept-language: [en-US] - x-ms-client-request-id: [9b58cf52-4c90-11e7-9b16-a0b3ccf7272a] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"templateHash":"18048340065001902796","parameters":{"location":{"type":"String","value":"westus"},"privateIPAllocationMethod":{"type":"String","value":"Dynamic"},"backendAddressPools":{"type":"Array","value":[{"name":"bepool1"},{"name":"bepool2"}]},"name":{"type":"String","value":"test-lb"},"subnetId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-06-08T21:22:43.2188091Z","duration":"PT0.2770006S","correlationId":"c18f33be-ece9-4c12-96b9-eabd6fd111ff","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"loadBalancers","locations":["westus"]}]}],"dependencies":[]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"templateHash":"6408713692666354622","parameters":{"location":{"type":"String","value":"westus"},"tags":{"type":"Object","value":{"key":"super=value"}},"privateIPAllocationMethod":{"type":"String","value":"Dynamic"},"name":{"type":"String","value":"test-lb"},"backendAddressPools":{"type":"Array","value":[{"name":"bepool1"},{"name":"bepool2"}]},"subnetId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2017-06-15T20:10:20.2470721Z","duration":"PT0.2383683S","correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"loadBalancers","locations":["westus"]}]}],"dependencies":[]}}'} headers: - Azure-AsyncOperation: ['https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment/operationStatuses/08587046499225358060?api-version=2017-05-10'] - Cache-Control: [no-cache] - Content-Length: ['1028'] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Jun 2017 21:22:42 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/operationStatuses/08587040494654689172?api-version=2017-05-10'] + cache-control: [no-cache] + content-length: ['1170'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 201, message: Created} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A20Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:20 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A22Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:22 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A23Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:24 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A25Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:25 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A27Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A28Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:28 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A30Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:30 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A31Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:31 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A33Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:33 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A35Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:34 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A36Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[]}'} + headers: + cache-control: [no-cache] + content-length: ['12'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:36 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A38Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"89d46fa2-00f4-4e20-acb3-92aeac6f8d3e","eventName":{"value":"BeginRequest","localizedValue":"Begin + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"a79b3190-5206-11e7-b4af-a0b3ccf7272a","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/89d46fa2-00f4-4e20-acb3-92aeac6f8d3e/ticks/636331542194986937","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"b8232cfd-5846-4949-a2b5-60475b16d780","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"status":{"value":"Started","localizedValue":"Started"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:19.4986937Z","submissionTimestamp":"2017-06-15T20:10:30.6284676Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}]}'} + headers: + cache-control: [no-cache] + content-length: ['3477'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:38 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A39Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"89d46fa2-00f4-4e20-acb3-92aeac6f8d3e","eventName":{"value":"BeginRequest","localizedValue":"Begin + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"a79b3190-5206-11e7-b4af-a0b3ccf7272a","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/89d46fa2-00f4-4e20-acb3-92aeac6f8d3e/ticks/636331542194986937","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"b8232cfd-5846-4949-a2b5-60475b16d780","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"status":{"value":"Started","localizedValue":"Started"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:19.4986937Z","submissionTimestamp":"2017-06-15T20:10:30.6284676Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}]}'} + headers: + cache-control: [no-cache] + content-length: ['3477'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:39 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A41Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"74a75f6d-5f5d-4a25-99f5-34381d6dedae","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/74a75f6d-5f5d-4a25-99f5-34381d6dedae/ticks/636331542214496826","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"5504e6a1-ff15-47b0-8cb8-cf4cf0e4321a","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"status":{"value":"Succeeded","localizedValue":"Succeeded"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:21.4496826Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Network/loadBalancers/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"8c76c4e6-ab23-4f0f-9e72-45dcf55fbb95","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"f6b7e036-afe7-451f-8002-f7050a3f24c3","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/events/8c76c4e6-ab23-4f0f-9e72-45dcf55fbb95/ticks/636331542212153096","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Network","localizedValue":"Microsoft.Network"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":{"value":"Microsoft.Network/loadBalancers","localizedValue":"Microsoft.Network/loadBalancers"},"operationId":"739eb912-937c-4fed-a9be-2bb7934d4d41","operationName":{"value":"Microsoft.Network/loadBalancers/write","localizedValue":"Microsoft.Network/loadBalancers/write"},"properties":{"statusCode":"Created","serviceRequestId":"f01a0be4-f105-42e3-af90-e63ad09c45fb","responseBody":"{\"name\":\"test-lb\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"type\":\"Microsoft.Network/loadBalancers\",\"location\":\"westus\",\"tags\":{\"key\":\"super=value\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"5dfd3e9a-ce5b-431e-be12-87e156d8ea66\",\"frontendIPConfigurations\":[{\"name\":\"LoadBalancerFrontEnd\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/frontendIPConfigurations/LoadBalancerFrontEnd\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateIPAddress\":\"10.0.0.4\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"}}}],\"backendAddressPools\":[{\"name\":\"bepool1\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/backendAddressPools/bepool1\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\"}},{\"name\":\"bepool2\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/backendAddressPools/bepool2\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\"}}],\"loadBalancingRules\":[],\"probes\":[],\"inboundNatRules\":[],\"outboundNatRules\":[],\"inboundNatPools\":[]}}"},"status":{"value":"Succeeded","localizedValue":"Succeeded"},"subStatus":{"value":"Created","localizedValue":"Created + (HTTP Status Code: 201)"},"eventTimestamp":"2017-06-15T20:10:21.2153096Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Network/loadBalancers/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"59544866-db93-4a1c-a670-4188f831748f","eventName":{"value":"BeginRequest","localizedValue":"Begin + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"f6b7e036-afe7-451f-8002-f7050a3f24c3","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/events/59544866-db93-4a1c-a670-4188f831748f/ticks/636331542209653184","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Network","localizedValue":"Microsoft.Network"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":{"value":"Microsoft.Network/loadBalancers","localizedValue":"Microsoft.Network/loadBalancers"},"operationId":"739eb912-937c-4fed-a9be-2bb7934d4d41","operationName":{"value":"Microsoft.Network/loadBalancers/write","localizedValue":"Microsoft.Network/loadBalancers/write"},"properties":{"requestbody":"{\"location\":\"westus\",\"tags\":{\"key\":\"super=value\"},\"properties\":{\"backendAddressPools\":[{\"name\":\"bepool1\"},{\"name\":\"bepool2\"}],\"frontendIPConfigurations\":[{\"name\":\"LoadBalancerFrontEnd\",\"properties\":{\"privateIPAllocationMethod\":\"Dynamic\",\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"}}}]}}"},"status":{"value":"Started","localizedValue":"Started"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:20.9653184Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"89d46fa2-00f4-4e20-acb3-92aeac6f8d3e","eventName":{"value":"BeginRequest","localizedValue":"Begin + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"a79b3190-5206-11e7-b4af-a0b3ccf7272a","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/89d46fa2-00f4-4e20-acb3-92aeac6f8d3e/ticks/636331542194986937","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"b8232cfd-5846-4949-a2b5-60475b16d780","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"status":{"value":"Started","localizedValue":"Started"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:19.4986937Z","submissionTimestamp":"2017-06-15T20:10:30.6284676Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}]}'} + headers: + cache-control: [no-cache] + content-length: ['16465'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:41 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A42Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"74a75f6d-5f5d-4a25-99f5-34381d6dedae","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/74a75f6d-5f5d-4a25-99f5-34381d6dedae/ticks/636331542214496826","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"5504e6a1-ff15-47b0-8cb8-cf4cf0e4321a","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"status":{"value":"Succeeded","localizedValue":"Succeeded"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:21.4496826Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Network/loadBalancers/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"8c76c4e6-ab23-4f0f-9e72-45dcf55fbb95","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"f6b7e036-afe7-451f-8002-f7050a3f24c3","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/events/8c76c4e6-ab23-4f0f-9e72-45dcf55fbb95/ticks/636331542212153096","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Network","localizedValue":"Microsoft.Network"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":{"value":"Microsoft.Network/loadBalancers","localizedValue":"Microsoft.Network/loadBalancers"},"operationId":"739eb912-937c-4fed-a9be-2bb7934d4d41","operationName":{"value":"Microsoft.Network/loadBalancers/write","localizedValue":"Microsoft.Network/loadBalancers/write"},"properties":{"statusCode":"Created","serviceRequestId":"f01a0be4-f105-42e3-af90-e63ad09c45fb","responseBody":"{\"name\":\"test-lb\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"type\":\"Microsoft.Network/loadBalancers\",\"location\":\"westus\",\"tags\":{\"key\":\"super=value\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"5dfd3e9a-ce5b-431e-be12-87e156d8ea66\",\"frontendIPConfigurations\":[{\"name\":\"LoadBalancerFrontEnd\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/frontendIPConfigurations/LoadBalancerFrontEnd\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateIPAddress\":\"10.0.0.4\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"}}}],\"backendAddressPools\":[{\"name\":\"bepool1\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/backendAddressPools/bepool1\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\"}},{\"name\":\"bepool2\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/backendAddressPools/bepool2\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\"}}],\"loadBalancingRules\":[],\"probes\":[],\"inboundNatRules\":[],\"outboundNatRules\":[],\"inboundNatPools\":[]}}"},"status":{"value":"Succeeded","localizedValue":"Succeeded"},"subStatus":{"value":"Created","localizedValue":"Created + (HTTP Status Code: 201)"},"eventTimestamp":"2017-06-15T20:10:21.2153096Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Network/loadBalancers/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"59544866-db93-4a1c-a670-4188f831748f","eventName":{"value":"BeginRequest","localizedValue":"Begin + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"f6b7e036-afe7-451f-8002-f7050a3f24c3","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/events/59544866-db93-4a1c-a670-4188f831748f/ticks/636331542209653184","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Network","localizedValue":"Microsoft.Network"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":{"value":"Microsoft.Network/loadBalancers","localizedValue":"Microsoft.Network/loadBalancers"},"operationId":"739eb912-937c-4fed-a9be-2bb7934d4d41","operationName":{"value":"Microsoft.Network/loadBalancers/write","localizedValue":"Microsoft.Network/loadBalancers/write"},"properties":{"requestbody":"{\"location\":\"westus\",\"tags\":{\"key\":\"super=value\"},\"properties\":{\"backendAddressPools\":[{\"name\":\"bepool1\"},{\"name\":\"bepool2\"}],\"frontendIPConfigurations\":[{\"name\":\"LoadBalancerFrontEnd\",\"properties\":{\"privateIPAllocationMethod\":\"Dynamic\",\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"}}}]}}"},"status":{"value":"Started","localizedValue":"Started"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:20.9653184Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"89d46fa2-00f4-4e20-acb3-92aeac6f8d3e","eventName":{"value":"BeginRequest","localizedValue":"Begin + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"a79b3190-5206-11e7-b4af-a0b3ccf7272a","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/89d46fa2-00f4-4e20-acb3-92aeac6f8d3e/ticks/636331542194986937","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"b8232cfd-5846-4949-a2b5-60475b16d780","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"status":{"value":"Started","localizedValue":"Started"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:19.4986937Z","submissionTimestamp":"2017-06-15T20:10:30.6284676Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}]}'} + headers: + cache-control: [no-cache] + content-length: ['16465'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:43 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A44Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"74a75f6d-5f5d-4a25-99f5-34381d6dedae","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/74a75f6d-5f5d-4a25-99f5-34381d6dedae/ticks/636331542214496826","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"5504e6a1-ff15-47b0-8cb8-cf4cf0e4321a","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"status":{"value":"Succeeded","localizedValue":"Succeeded"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:21.4496826Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Network/loadBalancers/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"8c76c4e6-ab23-4f0f-9e72-45dcf55fbb95","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"f6b7e036-afe7-451f-8002-f7050a3f24c3","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/events/8c76c4e6-ab23-4f0f-9e72-45dcf55fbb95/ticks/636331542212153096","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Network","localizedValue":"Microsoft.Network"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":{"value":"Microsoft.Network/loadBalancers","localizedValue":"Microsoft.Network/loadBalancers"},"operationId":"739eb912-937c-4fed-a9be-2bb7934d4d41","operationName":{"value":"Microsoft.Network/loadBalancers/write","localizedValue":"Microsoft.Network/loadBalancers/write"},"properties":{"statusCode":"Created","serviceRequestId":"f01a0be4-f105-42e3-af90-e63ad09c45fb","responseBody":"{\"name\":\"test-lb\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"type\":\"Microsoft.Network/loadBalancers\",\"location\":\"westus\",\"tags\":{\"key\":\"super=value\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"5dfd3e9a-ce5b-431e-be12-87e156d8ea66\",\"frontendIPConfigurations\":[{\"name\":\"LoadBalancerFrontEnd\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/frontendIPConfigurations/LoadBalancerFrontEnd\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateIPAddress\":\"10.0.0.4\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"}}}],\"backendAddressPools\":[{\"name\":\"bepool1\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/backendAddressPools/bepool1\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\"}},{\"name\":\"bepool2\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/backendAddressPools/bepool2\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\"}}],\"loadBalancingRules\":[],\"probes\":[],\"inboundNatRules\":[],\"outboundNatRules\":[],\"inboundNatPools\":[]}}"},"status":{"value":"Succeeded","localizedValue":"Succeeded"},"subStatus":{"value":"Created","localizedValue":"Created + (HTTP Status Code: 201)"},"eventTimestamp":"2017-06-15T20:10:21.2153096Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Network/loadBalancers/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"59544866-db93-4a1c-a670-4188f831748f","eventName":{"value":"BeginRequest","localizedValue":"Begin + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"f6b7e036-afe7-451f-8002-f7050a3f24c3","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/events/59544866-db93-4a1c-a670-4188f831748f/ticks/636331542209653184","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Network","localizedValue":"Microsoft.Network"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":{"value":"Microsoft.Network/loadBalancers","localizedValue":"Microsoft.Network/loadBalancers"},"operationId":"739eb912-937c-4fed-a9be-2bb7934d4d41","operationName":{"value":"Microsoft.Network/loadBalancers/write","localizedValue":"Microsoft.Network/loadBalancers/write"},"properties":{"requestbody":"{\"location\":\"westus\",\"tags\":{\"key\":\"super=value\"},\"properties\":{\"backendAddressPools\":[{\"name\":\"bepool1\"},{\"name\":\"bepool2\"}],\"frontendIPConfigurations\":[{\"name\":\"LoadBalancerFrontEnd\",\"properties\":{\"privateIPAllocationMethod\":\"Dynamic\",\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"}}}]}}"},"status":{"value":"Started","localizedValue":"Started"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:20.9653184Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"b73560a9-5d20-4dce-8bdf-538b84e5aea1","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"a79b3190-5206-11e7-b4af-a0b3ccf7272a","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/b73560a9-5d20-4dce-8bdf-538b84e5aea1/ticks/636331542203426587","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"b8232cfd-5846-4949-a2b5-60475b16d780","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"properties":{"statusCode":"Created","serviceRequestId":null},"status":{"value":"Accepted","localizedValue":"Accepted"},"subStatus":{"value":"Created","localizedValue":"Created + (HTTP Status Code: 201)"},"eventTimestamp":"2017-06-15T20:10:20.3426587Z","submissionTimestamp":"2017-06-15T20:10:41.3300109Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"89d46fa2-00f4-4e20-acb3-92aeac6f8d3e","eventName":{"value":"BeginRequest","localizedValue":"Begin + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"a79b3190-5206-11e7-b4af-a0b3ccf7272a","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/89d46fa2-00f4-4e20-acb3-92aeac6f8d3e/ticks/636331542194986937","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"b8232cfd-5846-4949-a2b5-60475b16d780","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"status":{"value":"Started","localizedValue":"Started"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:19.4986937Z","submissionTimestamp":"2017-06-15T20:10:30.6284676Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}]}'} + headers: + cache-control: [no-cache] + content-length: ['20029'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:43 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A45Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"74a75f6d-5f5d-4a25-99f5-34381d6dedae","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/74a75f6d-5f5d-4a25-99f5-34381d6dedae/ticks/636331542214496826","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"5504e6a1-ff15-47b0-8cb8-cf4cf0e4321a","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"status":{"value":"Succeeded","localizedValue":"Succeeded"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:21.4496826Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Network/loadBalancers/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"8c76c4e6-ab23-4f0f-9e72-45dcf55fbb95","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"f6b7e036-afe7-451f-8002-f7050a3f24c3","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/events/8c76c4e6-ab23-4f0f-9e72-45dcf55fbb95/ticks/636331542212153096","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Network","localizedValue":"Microsoft.Network"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":{"value":"Microsoft.Network/loadBalancers","localizedValue":"Microsoft.Network/loadBalancers"},"operationId":"739eb912-937c-4fed-a9be-2bb7934d4d41","operationName":{"value":"Microsoft.Network/loadBalancers/write","localizedValue":"Microsoft.Network/loadBalancers/write"},"properties":{"statusCode":"Created","serviceRequestId":"f01a0be4-f105-42e3-af90-e63ad09c45fb","responseBody":"{\"name\":\"test-lb\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"type\":\"Microsoft.Network/loadBalancers\",\"location\":\"westus\",\"tags\":{\"key\":\"super=value\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"5dfd3e9a-ce5b-431e-be12-87e156d8ea66\",\"frontendIPConfigurations\":[{\"name\":\"LoadBalancerFrontEnd\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/frontendIPConfigurations/LoadBalancerFrontEnd\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateIPAddress\":\"10.0.0.4\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"}}}],\"backendAddressPools\":[{\"name\":\"bepool1\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/backendAddressPools/bepool1\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\"}},{\"name\":\"bepool2\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/backendAddressPools/bepool2\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\"}}],\"loadBalancingRules\":[],\"probes\":[],\"inboundNatRules\":[],\"outboundNatRules\":[],\"inboundNatPools\":[]}}"},"status":{"value":"Succeeded","localizedValue":"Succeeded"},"subStatus":{"value":"Created","localizedValue":"Created + (HTTP Status Code: 201)"},"eventTimestamp":"2017-06-15T20:10:21.2153096Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Network/loadBalancers/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"59544866-db93-4a1c-a670-4188f831748f","eventName":{"value":"BeginRequest","localizedValue":"Begin + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"f6b7e036-afe7-451f-8002-f7050a3f24c3","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/events/59544866-db93-4a1c-a670-4188f831748f/ticks/636331542209653184","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Network","localizedValue":"Microsoft.Network"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":{"value":"Microsoft.Network/loadBalancers","localizedValue":"Microsoft.Network/loadBalancers"},"operationId":"739eb912-937c-4fed-a9be-2bb7934d4d41","operationName":{"value":"Microsoft.Network/loadBalancers/write","localizedValue":"Microsoft.Network/loadBalancers/write"},"properties":{"requestbody":"{\"location\":\"westus\",\"tags\":{\"key\":\"super=value\"},\"properties\":{\"backendAddressPools\":[{\"name\":\"bepool1\"},{\"name\":\"bepool2\"}],\"frontendIPConfigurations\":[{\"name\":\"LoadBalancerFrontEnd\",\"properties\":{\"privateIPAllocationMethod\":\"Dynamic\",\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"}}}]}}"},"status":{"value":"Started","localizedValue":"Started"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:20.9653184Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"b73560a9-5d20-4dce-8bdf-538b84e5aea1","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"a79b3190-5206-11e7-b4af-a0b3ccf7272a","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/b73560a9-5d20-4dce-8bdf-538b84e5aea1/ticks/636331542203426587","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"b8232cfd-5846-4949-a2b5-60475b16d780","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"properties":{"statusCode":"Created","serviceRequestId":null},"status":{"value":"Accepted","localizedValue":"Accepted"},"subStatus":{"value":"Created","localizedValue":"Created + (HTTP Status Code: 201)"},"eventTimestamp":"2017-06-15T20:10:20.3426587Z","submissionTimestamp":"2017-06-15T20:10:41.3300109Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"89d46fa2-00f4-4e20-acb3-92aeac6f8d3e","eventName":{"value":"BeginRequest","localizedValue":"Begin + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"a79b3190-5206-11e7-b4af-a0b3ccf7272a","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/89d46fa2-00f4-4e20-acb3-92aeac6f8d3e/ticks/636331542194986937","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"b8232cfd-5846-4949-a2b5-60475b16d780","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"status":{"value":"Started","localizedValue":"Started"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:19.4986937Z","submissionTimestamp":"2017-06-15T20:10:30.6284676Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}]}'} + headers: + cache-control: [no-cache] + content-length: ['20029'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:44 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A46Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"74a75f6d-5f5d-4a25-99f5-34381d6dedae","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/74a75f6d-5f5d-4a25-99f5-34381d6dedae/ticks/636331542214496826","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"5504e6a1-ff15-47b0-8cb8-cf4cf0e4321a","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"status":{"value":"Succeeded","localizedValue":"Succeeded"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:21.4496826Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Network/loadBalancers/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"8c76c4e6-ab23-4f0f-9e72-45dcf55fbb95","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"f6b7e036-afe7-451f-8002-f7050a3f24c3","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/events/8c76c4e6-ab23-4f0f-9e72-45dcf55fbb95/ticks/636331542212153096","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Network","localizedValue":"Microsoft.Network"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":{"value":"Microsoft.Network/loadBalancers","localizedValue":"Microsoft.Network/loadBalancers"},"operationId":"739eb912-937c-4fed-a9be-2bb7934d4d41","operationName":{"value":"Microsoft.Network/loadBalancers/write","localizedValue":"Microsoft.Network/loadBalancers/write"},"properties":{"statusCode":"Created","serviceRequestId":"f01a0be4-f105-42e3-af90-e63ad09c45fb","responseBody":"{\"name\":\"test-lb\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"type\":\"Microsoft.Network/loadBalancers\",\"location\":\"westus\",\"tags\":{\"key\":\"super=value\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"5dfd3e9a-ce5b-431e-be12-87e156d8ea66\",\"frontendIPConfigurations\":[{\"name\":\"LoadBalancerFrontEnd\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/frontendIPConfigurations/LoadBalancerFrontEnd\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateIPAddress\":\"10.0.0.4\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"}}}],\"backendAddressPools\":[{\"name\":\"bepool1\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/backendAddressPools/bepool1\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\"}},{\"name\":\"bepool2\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/backendAddressPools/bepool2\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\"}}],\"loadBalancingRules\":[],\"probes\":[],\"inboundNatRules\":[],\"outboundNatRules\":[],\"inboundNatPools\":[]}}"},"status":{"value":"Succeeded","localizedValue":"Succeeded"},"subStatus":{"value":"Created","localizedValue":"Created + (HTTP Status Code: 201)"},"eventTimestamp":"2017-06-15T20:10:21.2153096Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Network/loadBalancers/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"59544866-db93-4a1c-a670-4188f831748f","eventName":{"value":"BeginRequest","localizedValue":"Begin + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"f6b7e036-afe7-451f-8002-f7050a3f24c3","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/events/59544866-db93-4a1c-a670-4188f831748f/ticks/636331542209653184","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Network","localizedValue":"Microsoft.Network"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":{"value":"Microsoft.Network/loadBalancers","localizedValue":"Microsoft.Network/loadBalancers"},"operationId":"739eb912-937c-4fed-a9be-2bb7934d4d41","operationName":{"value":"Microsoft.Network/loadBalancers/write","localizedValue":"Microsoft.Network/loadBalancers/write"},"properties":{"requestbody":"{\"location\":\"westus\",\"tags\":{\"key\":\"super=value\"},\"properties\":{\"backendAddressPools\":[{\"name\":\"bepool1\"},{\"name\":\"bepool2\"}],\"frontendIPConfigurations\":[{\"name\":\"LoadBalancerFrontEnd\",\"properties\":{\"privateIPAllocationMethod\":\"Dynamic\",\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"}}}]}}"},"status":{"value":"Started","localizedValue":"Started"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:20.9653184Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"b73560a9-5d20-4dce-8bdf-538b84e5aea1","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"a79b3190-5206-11e7-b4af-a0b3ccf7272a","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/b73560a9-5d20-4dce-8bdf-538b84e5aea1/ticks/636331542203426587","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"b8232cfd-5846-4949-a2b5-60475b16d780","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"properties":{"statusCode":"Created","serviceRequestId":null},"status":{"value":"Accepted","localizedValue":"Accepted"},"subStatus":{"value":"Created","localizedValue":"Created + (HTTP Status Code: 201)"},"eventTimestamp":"2017-06-15T20:10:20.3426587Z","submissionTimestamp":"2017-06-15T20:10:41.3300109Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"89d46fa2-00f4-4e20-acb3-92aeac6f8d3e","eventName":{"value":"BeginRequest","localizedValue":"Begin + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"a79b3190-5206-11e7-b4af-a0b3ccf7272a","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/89d46fa2-00f4-4e20-acb3-92aeac6f8d3e/ticks/636331542194986937","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"b8232cfd-5846-4949-a2b5-60475b16d780","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"status":{"value":"Started","localizedValue":"Started"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:19.4986937Z","submissionTimestamp":"2017-06-15T20:10:30.6284676Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}]}'} + headers: + cache-control: [no-cache] + content-length: ['20029'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:47 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A48Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"74a75f6d-5f5d-4a25-99f5-34381d6dedae","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/74a75f6d-5f5d-4a25-99f5-34381d6dedae/ticks/636331542214496826","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"5504e6a1-ff15-47b0-8cb8-cf4cf0e4321a","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"status":{"value":"Succeeded","localizedValue":"Succeeded"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:21.4496826Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Network/loadBalancers/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"8c76c4e6-ab23-4f0f-9e72-45dcf55fbb95","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"f6b7e036-afe7-451f-8002-f7050a3f24c3","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/events/8c76c4e6-ab23-4f0f-9e72-45dcf55fbb95/ticks/636331542212153096","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Network","localizedValue":"Microsoft.Network"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":{"value":"Microsoft.Network/loadBalancers","localizedValue":"Microsoft.Network/loadBalancers"},"operationId":"739eb912-937c-4fed-a9be-2bb7934d4d41","operationName":{"value":"Microsoft.Network/loadBalancers/write","localizedValue":"Microsoft.Network/loadBalancers/write"},"properties":{"statusCode":"Created","serviceRequestId":"f01a0be4-f105-42e3-af90-e63ad09c45fb","responseBody":"{\"name\":\"test-lb\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"type\":\"Microsoft.Network/loadBalancers\",\"location\":\"westus\",\"tags\":{\"key\":\"super=value\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"5dfd3e9a-ce5b-431e-be12-87e156d8ea66\",\"frontendIPConfigurations\":[{\"name\":\"LoadBalancerFrontEnd\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/frontendIPConfigurations/LoadBalancerFrontEnd\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateIPAddress\":\"10.0.0.4\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"}}}],\"backendAddressPools\":[{\"name\":\"bepool1\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/backendAddressPools/bepool1\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\"}},{\"name\":\"bepool2\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/backendAddressPools/bepool2\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\"}}],\"loadBalancingRules\":[],\"probes\":[],\"inboundNatRules\":[],\"outboundNatRules\":[],\"inboundNatPools\":[]}}"},"status":{"value":"Succeeded","localizedValue":"Succeeded"},"subStatus":{"value":"Created","localizedValue":"Created + (HTTP Status Code: 201)"},"eventTimestamp":"2017-06-15T20:10:21.2153096Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Network/loadBalancers/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"59544866-db93-4a1c-a670-4188f831748f","eventName":{"value":"BeginRequest","localizedValue":"Begin + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"f6b7e036-afe7-451f-8002-f7050a3f24c3","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/events/59544866-db93-4a1c-a670-4188f831748f/ticks/636331542209653184","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Network","localizedValue":"Microsoft.Network"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":{"value":"Microsoft.Network/loadBalancers","localizedValue":"Microsoft.Network/loadBalancers"},"operationId":"739eb912-937c-4fed-a9be-2bb7934d4d41","operationName":{"value":"Microsoft.Network/loadBalancers/write","localizedValue":"Microsoft.Network/loadBalancers/write"},"properties":{"requestbody":"{\"location\":\"westus\",\"tags\":{\"key\":\"super=value\"},\"properties\":{\"backendAddressPools\":[{\"name\":\"bepool1\"},{\"name\":\"bepool2\"}],\"frontendIPConfigurations\":[{\"name\":\"LoadBalancerFrontEnd\",\"properties\":{\"privateIPAllocationMethod\":\"Dynamic\",\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"}}}]}}"},"status":{"value":"Started","localizedValue":"Started"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:20.9653184Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"b73560a9-5d20-4dce-8bdf-538b84e5aea1","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"a79b3190-5206-11e7-b4af-a0b3ccf7272a","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/b73560a9-5d20-4dce-8bdf-538b84e5aea1/ticks/636331542203426587","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"b8232cfd-5846-4949-a2b5-60475b16d780","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"properties":{"statusCode":"Created","serviceRequestId":null},"status":{"value":"Accepted","localizedValue":"Accepted"},"subStatus":{"value":"Created","localizedValue":"Created + (HTTP Status Code: 201)"},"eventTimestamp":"2017-06-15T20:10:20.3426587Z","submissionTimestamp":"2017-06-15T20:10:41.3300109Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"89d46fa2-00f4-4e20-acb3-92aeac6f8d3e","eventName":{"value":"BeginRequest","localizedValue":"Begin + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"a79b3190-5206-11e7-b4af-a0b3ccf7272a","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/89d46fa2-00f4-4e20-acb3-92aeac6f8d3e/ticks/636331542194986937","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"b8232cfd-5846-4949-a2b5-60475b16d780","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"status":{"value":"Started","localizedValue":"Started"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:19.4986937Z","submissionTimestamp":"2017-06-15T20:10:30.6284676Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}]}'} + headers: + cache-control: [no-cache] + content-length: ['20029'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:48 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 monitorclient/0.3.0 Azure-SDK-For-Python AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%202017-05-05T04%3A10%3A49Z%20and%20correlationId%20eq%20%27b8232cfd-5846-4949-a2b5-60475b16d780%27&api-version=2015-04-01 + response: + body: {string: '{"value":[{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"74a75f6d-5f5d-4a25-99f5-34381d6dedae","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/74a75f6d-5f5d-4a25-99f5-34381d6dedae/ticks/636331542214496826","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"5504e6a1-ff15-47b0-8cb8-cf4cf0e4321a","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"status":{"value":"Succeeded","localizedValue":"Succeeded"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:21.4496826Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Network/loadBalancers/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"8c76c4e6-ab23-4f0f-9e72-45dcf55fbb95","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"f6b7e036-afe7-451f-8002-f7050a3f24c3","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/events/8c76c4e6-ab23-4f0f-9e72-45dcf55fbb95/ticks/636331542212153096","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Network","localizedValue":"Microsoft.Network"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":{"value":"Microsoft.Network/loadBalancers","localizedValue":"Microsoft.Network/loadBalancers"},"operationId":"739eb912-937c-4fed-a9be-2bb7934d4d41","operationName":{"value":"Microsoft.Network/loadBalancers/write","localizedValue":"Microsoft.Network/loadBalancers/write"},"properties":{"statusCode":"Created","serviceRequestId":"f01a0be4-f105-42e3-af90-e63ad09c45fb","responseBody":"{\"name\":\"test-lb\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"type\":\"Microsoft.Network/loadBalancers\",\"location\":\"westus\",\"tags\":{\"key\":\"super=value\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"5dfd3e9a-ce5b-431e-be12-87e156d8ea66\",\"frontendIPConfigurations\":[{\"name\":\"LoadBalancerFrontEnd\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/frontendIPConfigurations/LoadBalancerFrontEnd\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateIPAddress\":\"10.0.0.4\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"}}}],\"backendAddressPools\":[{\"name\":\"bepool1\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/backendAddressPools/bepool1\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\"}},{\"name\":\"bepool2\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/backendAddressPools/bepool2\",\"etag\":\"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\"properties\":{\"provisioningState\":\"Succeeded\"}}],\"loadBalancingRules\":[],\"probes\":[],\"inboundNatRules\":[],\"outboundNatRules\":[],\"inboundNatPools\":[]}}"},"status":{"value":"Succeeded","localizedValue":"Succeeded"},"subStatus":{"value":"Created","localizedValue":"Created + (HTTP Status Code: 201)"},"eventTimestamp":"2017-06-15T20:10:21.2153096Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Network/loadBalancers/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"59544866-db93-4a1c-a670-4188f831748f","eventName":{"value":"BeginRequest","localizedValue":"Begin + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"f6b7e036-afe7-451f-8002-f7050a3f24c3","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/events/59544866-db93-4a1c-a670-4188f831748f/ticks/636331542209653184","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Network","localizedValue":"Microsoft.Network"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":{"value":"Microsoft.Network/loadBalancers","localizedValue":"Microsoft.Network/loadBalancers"},"operationId":"739eb912-937c-4fed-a9be-2bb7934d4d41","operationName":{"value":"Microsoft.Network/loadBalancers/write","localizedValue":"Microsoft.Network/loadBalancers/write"},"properties":{"requestbody":"{\"location\":\"westus\",\"tags\":{\"key\":\"super=value\"},\"properties\":{\"backendAddressPools\":[{\"name\":\"bepool1\"},{\"name\":\"bepool2\"}],\"frontendIPConfigurations\":[{\"name\":\"LoadBalancerFrontEnd\",\"properties\":{\"privateIPAllocationMethod\":\"Dynamic\",\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"}}}]}}"},"status":{"value":"Started","localizedValue":"Started"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:20.9653184Z","submissionTimestamp":"2017-06-15T20:10:40.24568Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"b73560a9-5d20-4dce-8bdf-538b84e5aea1","eventName":{"value":"EndRequest","localizedValue":"End + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"a79b3190-5206-11e7-b4af-a0b3ccf7272a","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/b73560a9-5d20-4dce-8bdf-538b84e5aea1/ticks/636331542203426587","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"b8232cfd-5846-4949-a2b5-60475b16d780","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"properties":{"statusCode":"Created","serviceRequestId":null},"status":{"value":"Accepted","localizedValue":"Accepted"},"subStatus":{"value":"Created","localizedValue":"Created + (HTTP Status Code: 201)"},"eventTimestamp":"2017-06-15T20:10:20.3426587Z","submissionTimestamp":"2017-06-15T20:10:41.3300109Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},{"authorization":{"action":"Microsoft.Resources/deployments/write","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment"},"caller":"admin2@AzureSDKTeam.onmicrosoft.com","channels":"Operation","claims":{"aud":"https://management.core.windows.net/","iss":"https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/","iat":"1497556604","nbf":"1497556604","exp":"1497560504","http://schemas.microsoft.com/claims/authnclassreference":"1","aio":"Y2ZgYHCpMd2zJSHh9sHaqmOLfZk6DMyjWdwmHe1d2/0hNSkhmAkA","http://schemas.microsoft.com/claims/authnmethodsreferences":"pwd","appid":"04b07795-8ddb-461a-bbee-02f9e1bf7b46","appidacr":"0","e_exp":"262800","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname":"Admin2","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname":"Admin2","groups":"e4bb0b56-1014-40f8-88ab-3d8a8cb0e086,d758a069-52cc-47f6-bc00-961cea17be39","ipaddr":"167.220.0.229","name":"Admin2","http://schemas.microsoft.com/identity/claims/objectidentifier":"5963f50c-7c43-405c-af7e-53294de76abd","platf":"14","puid":"1003BFFD959F8423","http://schemas.microsoft.com/identity/claims/scope":"user_impersonation","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"sDgexRwCNIfY-hzQjjCDvZT7Izdfo4Syrr4x0dDNzR4","http://schemas.microsoft.com/identity/claims/tenantid":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"admin2@AzureSDKTeam.onmicrosoft.com","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn":"admin2@AzureSDKTeam.onmicrosoft.com","ver":"1.0","wids":"62e90394-69f5-4237-9190-012177145e10"},"correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","description":"","eventDataId":"89d46fa2-00f4-4e20-acb3-92aeac6f8d3e","eventName":{"value":"BeginRequest","localizedValue":"Begin + request"},"category":{"value":"Administrative","localizedValue":"Administrative"},"httpRequest":{"clientRequestId":"a79b3190-5206-11e7-b4af-a0b3ccf7272a","clientIpAddress":"167.220.1.229","method":"PUT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/events/89d46fa2-00f4-4e20-acb3-92aeac6f8d3e/ticks/636331542194986937","level":"Informational","resourceGroupName":"cli_test_deployment000001","resourceProviderName":{"value":"Microsoft.Resources","localizedValue":"Microsoft + Resources"},"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","resourceType":{"value":"Microsoft.Resources/deployments","localizedValue":"Microsoft.Resources/deployments"},"operationId":"b8232cfd-5846-4949-a2b5-60475b16d780","operationName":{"value":"Microsoft.Resources/deployments/write","localizedValue":"Microsoft.Resources/deployments/write"},"status":{"value":"Started","localizedValue":"Started"},"subStatus":{"value":"","localizedValue":""},"eventTimestamp":"2017-06-15T20:10:19.4986937Z","submissionTimestamp":"2017-06-15T20:10:30.6284676Z","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}]}'} + headers: + cache-control: [no-cache] + content-length: ['20029'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:49 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.5] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.7+dev] + AZURECLI/2.0.9+dev] accept-language: [en-US] - x-ms-client-request-id: [9b58cf52-4c90-11e7-9b16-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587046499225358060?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08587040494654689172?api-version=2017-05-10 response: body: {string: '{"status":"Succeeded"}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Jun 2017 21:23:13 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] + cache-control: [no-cache] content-length: ['22'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:49 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment create] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.7+dev] + AZURECLI/2.0.9+dev] accept-language: [en-US] - x-ms-client-request-id: [9b58cf52-4c90-11e7-9b16-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"templateHash":"18048340065001902796","parameters":{"location":{"type":"String","value":"westus"},"privateIPAllocationMethod":{"type":"String","value":"Dynamic"},"backendAddressPools":{"type":"Array","value":[{"name":"bepool1"},{"name":"bepool2"}]},"name":{"type":"String","value":"test-lb"},"subnetId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T21:22:51.7379575Z","duration":"PT8.796149S","correlationId":"c18f33be-ece9-4c12-96b9-eabd6fd111ff","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"loadBalancers","locations":["westus"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/loadBalancers/test-lb"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"templateHash":"6408713692666354622","parameters":{"location":{"type":"String","value":"westus"},"tags":{"type":"Object","value":{"key":"super=value"}},"privateIPAllocationMethod":{"type":"String","value":"Dynamic"},"name":{"type":"String","value":"test-lb"},"backendAddressPools":{"type":"Array","value":[{"name":"bepool1"},{"name":"bepool2"}]},"subnetId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-15T20:10:21.4099596Z","duration":"PT1.4012558S","correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"loadBalancers","locations":["westus"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"}]}}'} headers: - Cache-Control: [no-cache] + cache-control: [no-cache] + content-length: ['1393'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:50 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [network lb show] + Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Jun 2017 21:23:13 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - content-length: ['1206'] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 networkmanagementclient/1.0.0rc3 Azure-SDK-For-Python + AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb?api-version=2017-03-01 + response: + body: {string: "{\r\n \"name\": \"test-lb\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb\"\ + ,\r\n \"etag\": \"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"westus\"\ + ,\r\n \"tags\": {\r\n \"key\": \"super=value\"\r\n },\r\n \"properties\"\ + : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\":\ + \ \"5dfd3e9a-ce5b-431e-be12-87e156d8ea66\",\r\n \"frontendIPConfigurations\"\ + : [\r\n {\r\n \"name\": \"LoadBalancerFrontEnd\",\r\n \"\ + id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/frontendIPConfigurations/LoadBalancerFrontEnd\"\ + ,\r\n \"etag\": \"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ + : \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1\"\ + \r\n }\r\n }\r\n }\r\n ],\r\n \"backendAddressPools\"\ + : [\r\n {\r\n \"name\": \"bepool1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/backendAddressPools/bepool1\"\ + ,\r\n \"etag\": \"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + \r\n }\r\n },\r\n {\r\n \"name\": \"bepool2\",\r\n\ + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb/backendAddressPools/bepool2\"\ + ,\r\n \"etag\": \"W/\\\"deb1081f-8468-4ee2-89a3-00e28114da5d\\\"\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + \r\n }\r\n }\r\n ],\r\n \"loadBalancingRules\": [],\r\n\ + \ \"probes\": [],\r\n \"inboundNatRules\": [],\r\n \"outboundNatRules\"\ + : [],\r\n \"inboundNatPools\": []\r\n }\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['2420'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:50 GMT'] + etag: [W/"deb1081f-8468-4ee2-89a3-00e28114da5d"] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment list] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.7+dev] + AZURECLI/2.0.9+dev] accept-language: [en-US] - x-ms-client-request-id: [ae78895c-4c90-11e7-adda-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/?api-version=2017-05-10 response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"templateHash":"18048340065001902796","parameters":{"location":{"type":"String","value":"westus"},"privateIPAllocationMethod":{"type":"String","value":"Dynamic"},"backendAddressPools":{"type":"Array","value":[{"name":"bepool1"},{"name":"bepool2"}]},"name":{"type":"String","value":"test-lb"},"subnetId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T21:22:51.7379575Z","duration":"PT8.796149S","correlationId":"c18f33be-ece9-4c12-96b9-eabd6fd111ff","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"loadBalancers","locations":["westus"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/loadBalancers/test-lb"}]}}]}'} + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"templateHash":"6408713692666354622","parameters":{"location":{"type":"String","value":"westus"},"tags":{"type":"Object","value":{"key":"super=value"}},"privateIPAllocationMethod":{"type":"String","value":"Dynamic"},"name":{"type":"String","value":"test-lb"},"backendAddressPools":{"type":"Array","value":[{"name":"bepool1"},{"name":"bepool2"}]},"subnetId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-15T20:10:21.4099596Z","duration":"PT1.4012558S","correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"loadBalancers","locations":["westus"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"}]}}]}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Jun 2017 21:23:14 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - content-length: ['1218'] + cache-control: [no-cache] + content-length: ['1405'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:50 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment show] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.7+dev] + AZURECLI/2.0.9+dev] accept-language: [en-US] - x-ms-client-request-id: [aeb3b476-4c90-11e7-ba4f-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2017-05-10 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"templateHash":"18048340065001902796","parameters":{"location":{"type":"String","value":"westus"},"privateIPAllocationMethod":{"type":"String","value":"Dynamic"},"backendAddressPools":{"type":"Array","value":[{"name":"bepool1"},{"name":"bepool2"}]},"name":{"type":"String","value":"test-lb"},"subnetId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-08T21:22:51.7379575Z","duration":"PT8.796149S","correlationId":"c18f33be-ece9-4c12-96b9-eabd6fd111ff","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"loadBalancers","locations":["westus"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/loadBalancers/test-lb"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment","name":"azure-cli-deployment","properties":{"templateHash":"6408713692666354622","parameters":{"location":{"type":"String","value":"westus"},"tags":{"type":"Object","value":{"key":"super=value"}},"privateIPAllocationMethod":{"type":"String","value":"Dynamic"},"name":{"type":"String","value":"test-lb"},"backendAddressPools":{"type":"Array","value":[{"name":"bepool1"},{"name":"bepool2"}]},"subnetId":{"type":"String","value":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2017-06-15T20:10:21.4099596Z","duration":"PT1.4012558S","correlationId":"b8232cfd-5846-4949-a2b5-60475b16d780","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"loadBalancers","locations":["westus"]}]}],"dependencies":[],"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb"}]}}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Jun 2017 21:23:14 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - content-length: ['1206'] + cache-control: [no-cache] + content-length: ['1393'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:51 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] + CommandName: [group deployment operation list] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python - AZURECLI/TEST/2.0.7+dev] + AZURECLI/2.0.9+dev] accept-language: [en-US] - x-ms-client-request-id: [aeea1dd2-4c90-11e7-a097-a0b3ccf7272a] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azure-cli-deployment-test/deployments/mock-deployment/operations?api-version=2017-05-10 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001/deployments/mock-deployment/operations?api-version=2017-05-10 response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment/operations/62E23BA3072F9A59","operationId":"62E23BA3072F9A59","properties":{"provisioningOperation":"Create","provisioningState":"Succeeded","timestamp":"2017-06-08T21:22:49.7320302Z","duration":"PT3.1487534S","trackingId":"25239975-d954-465b-897a-708ab8de526f","serviceRequestId":"1d49c05c-2558-47e1-84ac-d104ba980e53","statusCode":"Created","targetResource":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":"Microsoft.Network/loadBalancers","resourceName":"test-lb"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-deployment-test/providers/Microsoft.Resources/deployments/azure-cli-deployment/operations/08587046499225358060","operationId":"08587046499225358060","properties":{"provisioningOperation":"EvaluateDeploymentOutput","provisioningState":"Succeeded","timestamp":"2017-06-08T21:22:51.4958641Z","duration":"PT1.3552308S","trackingId":"52533323-6355-43b1-b5ca-d54f37c55fea","statusCode":"OK","statusMessage":null}}]}'} + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/operations/BDF6DEB6CF066808","operationId":"BDF6DEB6CF066808","properties":{"provisioningOperation":"Create","provisioningState":"Succeeded","timestamp":"2017-06-15T20:10:21.2323261Z","duration":"PT0.4173229S","trackingId":"54c6f4d1-3680-4636-a172-e3a85ddb5f91","serviceRequestId":"f01a0be4-f105-42e3-af90-e63ad09c45fb","statusCode":"Created","targetResource":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Network/loadBalancers/test-lb","resourceType":"Microsoft.Network/loadBalancers","resourceName":"test-lb"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_deployment000001/providers/Microsoft.Resources/deployments/azure-cli-deployment/operations/08587040494654689172","operationId":"08587040494654689172","properties":{"provisioningOperation":"EvaluateDeploymentOutput","provisioningState":"Succeeded","timestamp":"2017-06-15T20:10:21.3811157Z","duration":"PT0.1108897S","trackingId":"5504e6a1-ff15-47b0-8cb8-cf4cf0e4321a","statusCode":"OK","statusMessage":null}}]}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Jun 2017 21:23:14 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Vary: [Accept-Encoding] - content-length: ['1272'] + cache-control: [no-cache] + content-length: ['1404'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 15 Jun 2017 20:10:51 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.1 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.7 + msrest_azure/0.4.7 resourcemanagementclient/1.1.0rc1 Azure-SDK-For-Python + AZURECLI/2.0.9+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_deployment000001?api-version=2017-05-10 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 15 Jun 2017 20:10:52 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGREVQTE9ZTUVOVFAzQzdCQlVVNUVPU0tPV0ZNMlE0QzRLTXxGQTIwQkM5MDBBMzBFRDFCLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10'] + pragma: [no-cache] + retry-after: ['15'] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 202, message: Accepted} version: 1 diff --git a/src/command_modules/azure-cli-resource/tests/test-params.json b/src/command_modules/azure-cli-resource/tests/test-params.json index d393e2593..ef8b30fdc 100644 --- a/src/command_modules/azure-cli-resource/tests/test-params.json +++ b/src/command_modules/azure-cli-resource/tests/test-params.json @@ -10,6 +10,11 @@ }, "privateIPAllocationMethod": { "value": "Dynamic" + }, + "tags": { + "value": { + "key": "super=value" + } } } } \ No newline at end of file diff --git a/src/command_modules/azure-cli-resource/tests/test-template.json b/src/command_modules/azure-cli-resource/tests/test-template.json index 8e5a5d5da..cdd7f5a8b 100644 --- a/src/command_modules/azure-cli-resource/tests/test-template.json +++ b/src/command_modules/azure-cli-resource/tests/test-template.json @@ -16,6 +16,9 @@ }, "backendAddressPools": { "type": "array" + }, + "tags": { + "type": "object" } }, "resources": [ @@ -38,6 +41,7 @@ ], "backendAddressPools": "[parameters('backendAddressPools')]" }, + "tags": "[parameters('tags')]", "type": "Microsoft.Network/loadBalancers" } ] diff --git a/src/command_modules/azure-cli-resource/tests/test_custom.py b/src/command_modules/azure-cli-resource/tests/test_custom.py index 6ef0754a4..877a0fa8a 100644 --- a/src/command_modules/azure-cli-resource/tests/test_custom.py +++ b/src/command_modules/azure-cli-resource/tests/test_custom.py @@ -176,7 +176,7 @@ class TestCustom(unittest.TestCase): { "parameter_list": [['{"foo": "bar"}', '{"foo": "baz"}']], "expected": {"foo": "baz"}, - }, + } ] for test in tests: diff --git a/src/command_modules/azure-cli-resource/tests/test_resource.py b/src/command_modules/azure-cli-resource/tests/test_resource.py index 7c310420d..debe7e4a6 100644 --- a/src/command_modules/azure-cli-resource/tests/test_resource.py +++ b/src/command_modules/azure-cli-resource/tests/test_resource.py @@ -310,47 +310,43 @@ class ProviderOperationTest(VCRTestBase): ]) -class DeploymentTest(ResourceGroupVCRTestBase): - def __init__(self, test_method): - super(DeploymentTest, self).__init__(__file__, test_method, - resource_group='azure-cli-deployment-test') - - def test_group_deployment(self): - self.execute() +class DeploymentTest(ScenarioTest): - def body(self): + @ResourceGroupPreparer(name_prefix='cli_test_deployment') + def test_group_deployment(self, resource_group): curr_dir = os.path.dirname(os.path.realpath(__file__)) template_file = os.path.join(curr_dir, 'test-template.json').replace('\\', '\\\\') parameters_file = os.path.join(curr_dir, 'test-params.json').replace('\\', '\\\\') object_file = os.path.join(curr_dir, 'test-object.json').replace('\\', '\\\\') deployment_name = 'azure-cli-deployment' - subnet_id = self.cmd('network vnet create -g {} -n vnet1 --subnet-name subnet1'.format(self.resource_group))['newVNet']['subnets'][0]['id'] + subnet_id = self.cmd('network vnet create -g {} -n vnet1 --subnet-name subnet1'.format(resource_group)).get_output_in_json()['newVNet']['subnets'][0]['id'] self.cmd('group deployment validate -g {} --template-file {} --parameters @"{}" --parameters subnetId="{}" --parameters backendAddressPools=@"{}"'.format( - self.resource_group, template_file, parameters_file, subnet_id, object_file), checks=[ - JMESPathCheck('properties.provisioningState', 'Succeeded') + resource_group, template_file, parameters_file, subnet_id, object_file), checks=[ + JCheck('properties.provisioningState', 'Succeeded') ]) self.cmd('group deployment create -g {} -n {} --template-file {} --parameters @"{}" --parameters subnetId="{}" --parameters backendAddressPools=@"{}"'.format( - self.resource_group, deployment_name, template_file, parameters_file, subnet_id, object_file), checks=[ - JMESPathCheck('properties.provisioningState', 'Succeeded'), - JMESPathCheck('resourceGroup', self.resource_group), + resource_group, deployment_name, template_file, parameters_file, subnet_id, object_file), checks=[ + JCheck('properties.provisioningState', 'Succeeded'), + JCheck('resourceGroup', resource_group), + ]) + self.cmd('network lb show -g {} -n test-lb'.format(resource_group), checks=[ + JCheck('tags', {'key': 'super=value'}) ]) - self.cmd('group deployment list -g {}'.format(self.resource_group), checks=[ - JMESPathCheck('[0].name', deployment_name), - JMESPathCheck('[0].resourceGroup', self.resource_group) + self.cmd('group deployment list -g {}'.format(resource_group), checks=[ + JCheck('[0].name', deployment_name), + JCheck('[0].resourceGroup', resource_group) ]) - self.cmd('group deployment show -g {} -n {}'.format(self.resource_group, deployment_name), - checks=[ - JMESPathCheck('name', deployment_name), - JMESPathCheck('resourceGroup', self.resource_group) - ]) - self.cmd('group deployment operation list -g {} -n {}'.format(self.resource_group, - deployment_name), checks=[ - JMESPathCheck('length([])', 2), - JMESPathCheck('[0].resourceGroup', self.resource_group) + self.cmd('group deployment show -g {} -n {}'.format(resource_group, deployment_name), checks=[ + JCheck('name', deployment_name), + JCheck('resourceGroup', resource_group) + ]) + self.cmd('group deployment operation list -g {} -n {}'.format(resource_group, deployment_name), checks=[ + JCheck('length([])', 2), + JCheck('[0].resourceGroup', resource_group) ])
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": -1, "issue_text_score": 0, "test_score": -1 }, "num_modified_files": 3 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==2.11.7 attrs==22.2.0 autopep8==2.0.4 azure-batch==3.0.0 -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_billing&subdirectory=src/command_modules/azure-cli-billing -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_cdn&subdirectory=src/command_modules/azure-cli-cdn -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_cognitiveservices&subdirectory=src/command_modules/azure-cli-cognitiveservices -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_consumption&subdirectory=src/command_modules/azure-cli-consumption -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_cosmosdb&subdirectory=src/command_modules/azure-cli-cosmosdb -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_interactive&subdirectory=src/command_modules/azure-cli-interactive -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_rdbms&subdirectory=src/command_modules/azure-cli-rdbms -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_sf&subdirectory=src/command_modules/azure-cli-sf -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@e80e204a01bf4f32c17d8f89a955c3dd49eaa7ec#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.9 azure-devtools==1.2.0 azure-graphrbac==0.30.0rc6 azure-keyvault==0.3.0 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==4.0.0 azure-mgmt-billing==0.1.0 azure-mgmt-cdn==0.30.2 azure-mgmt-cognitiveservices==1.0.0 azure-mgmt-compute==1.0.0rc1 azure-mgmt-consumption==0.1.0 azure-mgmt-containerregistry==0.2.1 azure-mgmt-datalake-analytics==0.1.4 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.4 azure-mgmt-devtestlabs==2.0.0 azure-mgmt-dns==1.0.1 azure-mgmt-documentdb==0.1.3 azure-mgmt-iothub==0.2.2 azure-mgmt-keyvault==0.31.0 azure-mgmt-monitor==0.2.1 azure-mgmt-network==1.0.0rc3 azure-mgmt-nspkg==1.0.0 azure-mgmt-rdbms==0.1.0 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.1.0rc1 azure-mgmt-sql==0.5.1 azure-mgmt-storage==1.0.0rc1 azure-mgmt-trafficmanager==0.30.0 azure-mgmt-web==0.32.0 azure-monitor==0.3.0 azure-multiapi-storage==0.1.0 azure-nspkg==1.0.0 azure-servicefabric==5.6.130 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 ConfigArgParse==1.7 coverage==6.2 cryptography==40.0.2 flake8==5.0.4 futures==3.1.1 humanfriendly==2.4 idna==3.10 importlib-metadata==4.2.0 iniconfig==1.1.1 isodate==0.7.0 isort==5.10.1 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.7.0 mock==5.2.0 msrest==0.4.29 msrestazure==0.4.34 multidict==5.2.0 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pluggy==1.0.0 prompt-toolkit==3.0.36 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.10.0 pycparser==2.21 pydocumentdb==2.3.5 pyflakes==2.5.0 Pygments==2.1.3 PyJWT==2.4.0 pylint==1.7.1 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 pytz==2025.2 PyYAML==3.11 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.7 tomli==1.2.3 typed-ast==1.5.5 typing-extensions==4.1.1 urllib3==1.26.20 urllib3-secure-extra==0.1.0 vcrpy==1.10.3 vsts-cd-manager==1.0.2 wcwidth==0.2.13 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 yarl==1.7.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==2.11.7 - attrs==22.2.0 - autopep8==2.0.4 - azure-batch==3.0.0 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.9 - azure-devtools==1.2.0 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.3.0 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==4.0.0 - azure-mgmt-billing==0.1.0 - azure-mgmt-cdn==0.30.2 - azure-mgmt-cognitiveservices==1.0.0 - azure-mgmt-compute==1.0.0rc1 - azure-mgmt-consumption==0.1.0 - azure-mgmt-containerregistry==0.2.1 - azure-mgmt-datalake-analytics==0.1.4 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.4 - azure-mgmt-devtestlabs==2.0.0 - azure-mgmt-dns==1.0.1 - azure-mgmt-documentdb==0.1.3 - azure-mgmt-iothub==0.2.2 - azure-mgmt-keyvault==0.31.0 - azure-mgmt-monitor==0.2.1 - azure-mgmt-network==1.0.0rc3 - azure-mgmt-nspkg==1.0.0 - azure-mgmt-rdbms==0.1.0 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.1.0rc1 - azure-mgmt-sql==0.5.1 - azure-mgmt-storage==1.0.0rc1 - azure-mgmt-trafficmanager==0.30.0 - azure-mgmt-web==0.32.0 - azure-monitor==0.3.0 - azure-multiapi-storage==0.1.0 - azure-nspkg==1.0.0 - azure-servicefabric==5.6.130 - cffi==1.15.1 - colorama==0.3.7 - configargparse==1.7 - coverage==6.2 - cryptography==40.0.2 - flake8==5.0.4 - futures==3.1.1 - humanfriendly==2.4 - idna==3.10 - importlib-metadata==4.2.0 - iniconfig==1.1.1 - isodate==0.7.0 - isort==5.10.1 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.7.0 - mock==5.2.0 - msrest==0.4.29 - msrestazure==0.4.34 - multidict==5.2.0 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pip==9.0.1 - pluggy==1.0.0 - prompt-toolkit==3.0.36 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.10.0 - pycparser==2.21 - pydocumentdb==2.3.5 - pyflakes==2.5.0 - pygments==2.1.3 - pyjwt==2.4.0 - pylint==1.7.1 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pytz==2025.2 - pyyaml==3.11 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.7 - tomli==1.2.3 - typed-ast==1.5.5 - typing-extensions==4.1.1 - urllib3==1.26.20 - urllib3-secure-extra==0.1.0 - vcrpy==1.10.3 - vsts-cd-manager==1.0.2 - wcwidth==0.2.13 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - yarl==1.7.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-resource/tests/test_resource.py::DeploymentTest::test_group_deployment" ]
[]
[ "src/command_modules/azure-cli-resource/tests/test_custom.py::TestCustom::test_deployment_parameters", "src/command_modules/azure-cli-resource/tests/test_custom.py::TestCustom::test_extract_parameters", "src/command_modules/azure-cli-resource/tests/test_custom.py::TestCustom::test_resource_missing_parameters", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceGroupScenarioTest::test_resource_group", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceGroupNoWaitScenarioTest::test_resource_group_no_wait", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceScenarioTest::test_resource_scenario", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceIDScenarioTest::test_resource_id_scenario", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceCreateScenarioTest::test_resource_create", "src/command_modules/azure-cli-resource/tests/test_resource.py::TagScenarioTest::test_tag_scenario", "src/command_modules/azure-cli-resource/tests/test_resource.py::ProviderRegistrationTest::test_provider_registration", "src/command_modules/azure-cli-resource/tests/test_resource.py::ProviderOperationTest::test_provider_operation", "src/command_modules/azure-cli-resource/tests/test_resource.py::DeploymentnoWaitTest::test_group_deployment_no_wait", "src/command_modules/azure-cli-resource/tests/test_resource.py::DeploymentThruUriTest::test_group_deployment_thru_uri", "src/command_modules/azure-cli-resource/tests/test_resource.py::ResourceMoveScenarioTest::test_resource_move", "src/command_modules/azure-cli-resource/tests/test_resource.py::FeatureScenarioTest::test_feature_list", "src/command_modules/azure-cli-resource/tests/test_resource.py::PolicyScenarioTest::test_resource_policy", "src/command_modules/azure-cli-resource/tests/test_resource.py::ManagedAppDefinitionScenarioTest::test_managedappdef", "src/command_modules/azure-cli-resource/tests/test_resource.py::ManagedAppScenarioTest::test_managedapp", "src/command_modules/azure-cli-resource/tests/test_resource.py::CrossRGDeploymentScenarioTest::test_crossrg_deployment" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_azure-cli-3743
Azure__azure-cli-3754
0e10f6fee8807cda08afd61f60fe8e7d7508156e
2017-06-16 20:24:24
eb12ac454cbe1ddb59c86cdf2045e1912660e750
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3754?src=pr&el=h1) Report > Merging [#3754](https://codecov.io/gh/Azure/azure-cli/pull/3754?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/dff725f8bee017b61cf2d6dc5374f9315e52b644?src=pr&el=desc) will **increase** coverage by `<.01%`. > The diff coverage is `100%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/3754/graphs/tree.svg?height=150&width=650&token=2pog0TKvF8&src=pr)](https://codecov.io/gh/Azure/azure-cli/pull/3754?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #3754 +/- ## ========================================== + Coverage 72.14% 72.15% +<.01% ========================================== Files 421 421 Lines 26010 26018 +8 Branches 3943 3945 +2 ========================================== + Hits 18765 18773 +8 - Misses 6026 6029 +3 + Partials 1219 1216 -3 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/3754?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...li-cloud/azure/cli/command\_modules/cloud/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/3754?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktY2xvdWQvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9jbG91ZC9jdXN0b20ucHk=) | `18.18% <ø> (ø)` | :arrow_up: | | [...i-cloud/azure/cli/command\_modules/cloud/\_params.py](https://codecov.io/gh/Azure/azure-cli/pull/3754?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktY2xvdWQvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9jbG91ZC9fcGFyYW1zLnB5) | `93.54% <100%> (+0.21%)` | :arrow_up: | | [...re-cli-vm/azure/cli/command\_modules/vm/\_actions.py](https://codecov.io/gh/Azure/azure-cli/pull/3754?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktdm0vYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy92bS9fYWN0aW9ucy5weQ==) | `76.19% <100%> (+1.19%)` | :arrow_up: | | [src/azure-cli-core/azure/cli/core/cloud.py](https://codecov.io/gh/Azure/azure-cli/pull/3754?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL2Nsb3VkLnB5) | `70.9% <100%> (+0.26%)` | :arrow_up: | | [...zure-cli-vm/azure/cli/command\_modules/vm/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/3754?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktdm0vYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy92bS9jdXN0b20ucHk=) | `77.01% <100%> (ø)` | :arrow_up: | | [src/azure-cli-core/azure/cli/core/util.py](https://codecov.io/gh/Azure/azure-cli/pull/3754?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL3V0aWwucHk=) | `70.06% <0%> (ø)` | :arrow_up: | | [...dback/azure/cli/command\_modules/feedback/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/3754?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktZmVlZGJhY2svYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9mZWVkYmFjay9jdXN0b20ucHk=) | `31.25% <0%> (ø)` | :arrow_up: | | [...nent/azure/cli/command\_modules/component/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/3754?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktY29tcG9uZW50L2F6dXJlL2NsaS9jb21tYW5kX21vZHVsZXMvY29tcG9uZW50L2N1c3RvbS5weQ==) | `16.23% <0%> (ø)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3754?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/3754?src=pr&el=footer). Last update [dff725f...cf59716](https://codecov.io/gh/Azure/azure-cli/pull/3754?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/src/azure-cli-core/azure/cli/core/cloud.py b/src/azure-cli-core/azure/cli/core/cloud.py index 5fb720abd..21eefe782 100644 --- a/src/azure-cli-core/azure/cli/core/cloud.py +++ b/src/azure-cli-core/azure/cli/core/cloud.py @@ -58,7 +58,8 @@ class CloudEndpoints(object): # pylint: disable=too-few-public-methods,too-many gallery=None, active_directory=None, active_directory_resource_id=None, - active_directory_graph_resource_id=None): + active_directory_graph_resource_id=None, + vm_image_alias_doc=None): # Attribute names are significant. They are used when storing/retrieving clouds from config self.management = management self.resource_manager = resource_manager @@ -68,6 +69,7 @@ class CloudEndpoints(object): # pylint: disable=too-few-public-methods,too-many self.active_directory = active_directory self.active_directory_resource_id = active_directory_resource_id self.active_directory_graph_resource_id = active_directory_graph_resource_id + self.vm_image_alias_doc = vm_image_alias_doc def has_endpoint_set(self, endpoint_name): try: @@ -146,7 +148,8 @@ AZURE_PUBLIC_CLOUD = Cloud( gallery='https://gallery.azure.com/', active_directory='https://login.microsoftonline.com', active_directory_resource_id='https://management.core.windows.net/', - active_directory_graph_resource_id='https://graph.windows.net/'), + active_directory_graph_resource_id='https://graph.windows.net/', + vm_image_alias_doc='https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json'), # pylint: disable=line-too-long suffixes=CloudSuffixes( storage_endpoint='core.windows.net', keyvault_dns='.vault.azure.net', @@ -164,7 +167,8 @@ AZURE_CHINA_CLOUD = Cloud( gallery='https://gallery.chinacloudapi.cn/', active_directory='https://login.chinacloudapi.cn', active_directory_resource_id='https://management.core.chinacloudapi.cn/', - active_directory_graph_resource_id='https://graph.chinacloudapi.cn/'), + active_directory_graph_resource_id='https://graph.chinacloudapi.cn/', + vm_image_alias_doc='https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json'), # pylint: disable=line-too-long suffixes=CloudSuffixes( storage_endpoint='core.chinacloudapi.cn', keyvault_dns='.vault.azure.cn', @@ -180,7 +184,8 @@ AZURE_US_GOV_CLOUD = Cloud( gallery='https://gallery.usgovcloudapi.net/', active_directory='https://login.microsoftonline.com', active_directory_resource_id='https://management.core.usgovcloudapi.net/', - active_directory_graph_resource_id='https://graph.windows.net/'), + active_directory_graph_resource_id='https://graph.windows.net/', + vm_image_alias_doc='https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json'), # pylint: disable=line-too-long suffixes=CloudSuffixes( storage_endpoint='core.usgovcloudapi.net', keyvault_dns='.vault.usgovcloudapi.net', @@ -196,7 +201,8 @@ AZURE_GERMAN_CLOUD = Cloud( gallery='https://gallery.cloudapi.de/', active_directory='https://login.microsoftonline.de', active_directory_resource_id='https://management.core.cloudapi.de/', - active_directory_graph_resource_id='https://graph.cloudapi.de/'), + active_directory_graph_resource_id='https://graph.cloudapi.de/', + vm_image_alias_doc='https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json'), # pylint: disable=line-too-long suffixes=CloudSuffixes( storage_endpoint='core.cloudapi.de', keyvault_dns='.vault.microsoftazure.de', diff --git a/src/command_modules/azure-cli-cloud/HISTORY.rst b/src/command_modules/azure-cli-cloud/HISTORY.rst index d432f8da5..cd010407e 100644 --- a/src/command_modules/azure-cli-cloud/HISTORY.rst +++ b/src/command_modules/azure-cli-cloud/HISTORY.rst @@ -2,10 +2,10 @@ Release History =============== - 2.0.5 (unreleased) ++++++++++++++++++ * Provide an option for 'az cloud set' to select the profile while selecting current cloud +* Expose 'endpoint_vm_image_alias_doc' 2.0.4 (2017-06-13) ++++++++++++++++++ diff --git a/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/_params.py b/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/_params.py index ffd0d6f01..ff67ef353 100644 --- a/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/_params.py +++ b/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/_params.py @@ -60,6 +60,8 @@ register_cli_argument('cloud', 'endpoint_active_directory_resource_id', help='The resource ID to obtain AD tokens for') register_cli_argument('cloud', 'endpoint_active_directory_graph_resource_id', help='The Active Directory resource ID') +register_cli_argument('cloud', 'endpoint_vm_image_alias_doc', + help='The uri of the document which caches commonly used virtual machine images') register_cli_argument('cloud', 'suffix_sql_server_hostname', help='The dns suffix for sql servers') register_cli_argument('cloud', 'suffix_storage_endpoint', diff --git a/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/custom.py b/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/custom.py index 33b366154..be4732918 100644 --- a/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/custom.py +++ b/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/custom.py @@ -58,6 +58,7 @@ def register_cloud(cloud_name, endpoint_active_directory=None, endpoint_active_directory_resource_id=None, endpoint_active_directory_graph_resource_id=None, + endpoint_vm_image_alias_doc=None, suffix_sql_server_hostname=None, suffix_storage_endpoint=None, suffix_keyvault_dns=None, @@ -81,6 +82,7 @@ def modify_cloud(cloud_name=None, endpoint_active_directory=None, endpoint_active_directory_resource_id=None, endpoint_active_directory_graph_resource_id=None, + endpoint_vm_image_alias_doc=None, suffix_sql_server_hostname=None, suffix_storage_endpoint=None, suffix_keyvault_dns=None, diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_actions.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_actions.py index cf259d63b..623039c5b 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_actions.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_actions.py @@ -72,8 +72,13 @@ def load_images_thru_services(publisher, offer, sku, location): def load_images_from_aliases_doc(publisher=None, offer=None, sku=None): - target_url = ('https://raw.githubusercontent.com/Azure/azure-rest-api-specs/' - 'master/arm-compute/quickstart-templates/aliases.json') + from azure.cli.core.cloud import get_active_cloud, CloudEndpointNotSetException + cloud = get_active_cloud() + try: + target_url = cloud.endpoints.vm_image_alias_doc + except CloudEndpointNotSetException: + raise CLIError("'endpoint_vm_image_alias_doc' isn't configured. Please invoke 'az cloud update' to configure " + "it or use '--all' to retrieve images from server") txt = urlopen(target_url).read() dic = json.loads(txt.decode()) try: diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py index 2833b3512..a3180d0c9 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py @@ -213,9 +213,9 @@ def list_vm_images(image_location=None, publisher_name=None, offer=None, sku=Non "is supported.") all_images = load_images_thru_services(publisher_name, offer, sku, image_location) else: + all_images = load_images_from_aliases_doc(publisher_name, offer, sku) logger.warning( 'You are viewing an offline list of images, use --all to retrieve an up-to-date list') - all_images = load_images_from_aliases_doc(publisher_name, offer, sku) for i in all_images: i['urn'] = ':'.join([i['publisher'], i['offer'], i['sku'], i['version']])
AzureStack: images aliases is not applicable for azurestack ### Description CLI has a set of aliases for the images referred from the following location https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json These aliases makes the assumption that these images are available in all the clouds and matches the definition like below "UbuntuLTS":{ "publisher":"Canonical", "offer":"UbuntuServer", "sku":"16.04-LTS", "version":"latest" } In azure stack , the alias does not make much sense as the admin may not have uploaded the same image in azure stack the Ubuntu server sku could be 14.04.3 instead of 16.04-LTS luckily , the image parameter can be specified with the whole urn like below and this is what being used in azurestack Canonical:UbuntuServer:14.04.3-LTS:1.0.0 All the public documentation is referring to the use of aliases and the aliases most likely wont work against azurestack unless the admin chooses to upload image matching the azure definitions
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-vm/tests/test_vm_image.py b/src/command_modules/azure-cli-vm/tests/test_vm_image.py index f3b661c14..9c2eb1f0d 100644 --- a/src/command_modules/azure-cli-vm/tests/test_vm_image.py +++ b/src/command_modules/azure-cli-vm/tests/test_vm_image.py @@ -8,6 +8,8 @@ import unittest import mock import azure.cli.core.application as application +from azure.cli.core.util import CLIError +from azure.cli.core.cloud import CloudEndpointNotSetException class TestVMImage(unittest.TestCase): @@ -42,6 +44,17 @@ class TestVMImage(unittest.TestCase): self.assertEqual(parts[2], ubuntu_image['sku']) self.assertEqual(parts[3], ubuntu_image['version']) + @mock.patch('azure.cli.core.cloud.get_active_cloud', autospec=True) + def test_when_alias_doc_is_missing(self, mock_get_active_cloud): + from azure.cli.command_modules.vm._actions import load_images_from_aliases_doc + p = mock.PropertyMock(side_effect=CloudEndpointNotSetException) + mock_cloud = mock.MagicMock() + type(mock_cloud.endpoints).vm_image_alias_doc = p + mock_get_active_cloud.return_value = mock_cloud + # assert + with self.assertRaises(CLIError): + load_images_from_aliases_doc() + if __name__ == '__main__': unittest.main()
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 1, "test_score": 3 }, "num_modified_files": 6 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==2.11.7 attrs==22.2.0 autopep8==2.0.4 azure-batch==3.0.0 -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_billing&subdirectory=src/command_modules/azure-cli-billing -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_cdn&subdirectory=src/command_modules/azure-cli-cdn -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_cognitiveservices&subdirectory=src/command_modules/azure-cli-cognitiveservices -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_consumption&subdirectory=src/command_modules/azure-cli-consumption -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_cosmosdb&subdirectory=src/command_modules/azure-cli-cosmosdb -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_interactive&subdirectory=src/command_modules/azure-cli-interactive -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_rdbms&subdirectory=src/command_modules/azure-cli-rdbms -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_sf&subdirectory=src/command_modules/azure-cli-sf -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@0e10f6fee8807cda08afd61f60fe8e7d7508156e#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.9 azure-devtools==1.2.0 azure-graphrbac==0.30.0rc6 azure-keyvault==0.3.4 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==4.0.0 azure-mgmt-billing==0.1.0 azure-mgmt-cdn==0.30.2 azure-mgmt-cognitiveservices==1.0.0 azure-mgmt-compute==1.0.0rc1 azure-mgmt-consumption==0.1.0 azure-mgmt-containerregistry==0.2.1 azure-mgmt-datalake-analytics==0.1.4 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.4 azure-mgmt-devtestlabs==2.0.0 azure-mgmt-dns==1.0.1 azure-mgmt-documentdb==0.1.3 azure-mgmt-iothub==0.2.2 azure-mgmt-keyvault==0.40.0 azure-mgmt-monitor==0.2.1 azure-mgmt-network==1.0.0rc3 azure-mgmt-nspkg==1.0.0 azure-mgmt-rdbms==0.1.0 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.1.0rc1 azure-mgmt-sql==0.5.1 azure-mgmt-storage==1.0.0rc1 azure-mgmt-trafficmanager==0.30.0 azure-mgmt-web==0.32.0 azure-monitor==0.3.0 azure-multiapi-storage==0.1.0 azure-nspkg==1.0.0 azure-servicefabric==5.6.130 bleach==4.1.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 ConfigArgParse==1.7 coverage==6.2 cryptography==40.0.2 docutils==0.18.1 flake8==5.0.4 futures==3.1.1 humanfriendly==2.4 idna==3.10 importlib-metadata==4.2.0 iniconfig==1.1.1 isodate==0.7.0 isort==5.10.1 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.7.0 mock==5.2.0 msrest==0.4.29 msrestazure==0.4.34 multidict==5.2.0 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pluggy==1.0.0 prompt-toolkit==3.0.36 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.10.0 pycparser==2.21 pydocumentdb==2.3.5 pyflakes==2.5.0 Pygments==2.14.0 PyJWT==2.4.0 pylint==1.7.1 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 pytz==2025.2 PyYAML==3.11 readme-renderer==34.0 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.7 tomli==1.2.3 typed-ast==1.5.5 typing-extensions==4.1.1 urllib3==1.26.20 urllib3-secure-extra==0.1.0 vcrpy==1.10.3 vsts-cd-manager==1.0.2 wcwidth==0.2.13 webencodings==0.5.1 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 yarl==1.7.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==2.11.7 - attrs==22.2.0 - autopep8==2.0.4 - azure-batch==3.0.0 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.9 - azure-devtools==1.2.0 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.3.4 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==4.0.0 - azure-mgmt-billing==0.1.0 - azure-mgmt-cdn==0.30.2 - azure-mgmt-cognitiveservices==1.0.0 - azure-mgmt-compute==1.0.0rc1 - azure-mgmt-consumption==0.1.0 - azure-mgmt-containerregistry==0.2.1 - azure-mgmt-datalake-analytics==0.1.4 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.4 - azure-mgmt-devtestlabs==2.0.0 - azure-mgmt-dns==1.0.1 - azure-mgmt-documentdb==0.1.3 - azure-mgmt-iothub==0.2.2 - azure-mgmt-keyvault==0.40.0 - azure-mgmt-monitor==0.2.1 - azure-mgmt-network==1.0.0rc3 - azure-mgmt-nspkg==1.0.0 - azure-mgmt-rdbms==0.1.0 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.1.0rc1 - azure-mgmt-sql==0.5.1 - azure-mgmt-storage==1.0.0rc1 - azure-mgmt-trafficmanager==0.30.0 - azure-mgmt-web==0.32.0 - azure-monitor==0.3.0 - azure-multiapi-storage==0.1.0 - azure-nspkg==1.0.0 - azure-servicefabric==5.6.130 - bleach==4.1.0 - cffi==1.15.1 - colorama==0.3.7 - configargparse==1.7 - coverage==6.2 - cryptography==40.0.2 - docutils==0.18.1 - flake8==5.0.4 - futures==3.1.1 - humanfriendly==2.4 - idna==3.10 - importlib-metadata==4.2.0 - iniconfig==1.1.1 - isodate==0.7.0 - isort==5.10.1 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.7.0 - mock==5.2.0 - msrest==0.4.29 - msrestazure==0.4.34 - multidict==5.2.0 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pip==9.0.1 - pluggy==1.0.0 - prompt-toolkit==3.0.36 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.10.0 - pycparser==2.21 - pydocumentdb==2.3.5 - pyflakes==2.5.0 - pygments==2.14.0 - pyjwt==2.4.0 - pylint==1.7.1 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pytz==2025.2 - pyyaml==3.11 - readme-renderer==34.0 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.7 - tomli==1.2.3 - typed-ast==1.5.5 - typing-extensions==4.1.1 - urllib3==1.26.20 - urllib3-secure-extra==0.1.0 - vcrpy==1.10.3 - vsts-cd-manager==1.0.2 - wcwidth==0.2.13 - webencodings==0.5.1 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - yarl==1.7.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-vm/tests/test_vm_image.py::TestVMImage::test_when_alias_doc_is_missing" ]
[ "src/command_modules/azure-cli-vm/tests/test_vm_image.py::TestVMImage::test_read_images_from_alias_doc" ]
[]
[]
MIT License
null
Azure__azure-cli-4047
dd91433b36f95e9c849cbbcecccb0f610a8f0a3c
2017-07-19 03:10:04
eb12ac454cbe1ddb59c86cdf2045e1912660e750
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/4047?src=pr&el=h1) Report > Merging [#4047](https://codecov.io/gh/Azure/azure-cli/pull/4047?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/dd91433b36f95e9c849cbbcecccb0f610a8f0a3c?src=pr&el=desc) will **not change** coverage. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/4047/graphs/tree.svg?height=150&width=650&token=2pog0TKvF8&src=pr)](https://codecov.io/gh/Azure/azure-cli/pull/4047?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #4047 +/- ## ======================================= Coverage 70.61% 70.61% ======================================= Files 428 428 Lines 27871 27871 Branches 4267 4267 ======================================= Hits 19680 19680 - Misses 6915 6919 +4 + Partials 1276 1272 -4 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/4047?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...zure-cli-vm/azure/cli/command\_modules/vm/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/4047?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktdm0vYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy92bS9jdXN0b20ucHk=) | `75.45% <ø> (ø)` | :arrow_up: | | [src/azure-cli-core/azure/cli/core/util.py](https://codecov.io/gh/Azure/azure-cli/pull/4047?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL3V0aWwucHk=) | `70.66% <0%> (ø)` | :arrow_up: | | [...dback/azure/cli/command\_modules/feedback/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/4047?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktZmVlZGJhY2svYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9mZWVkYmFjay9jdXN0b20ucHk=) | `31.25% <0%> (ø)` | :arrow_up: | | [...nent/azure/cli/command\_modules/component/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/4047?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktY29tcG9uZW50L2F6dXJlL2NsaS9jb21tYW5kX21vZHVsZXMvY29tcG9uZW50L2N1c3RvbS5weQ==) | `16.23% <0%> (ø)` | :arrow_up: | | [...li-cloud/azure/cli/command\_modules/cloud/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/4047?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktY2xvdWQvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9jbG91ZC9jdXN0b20ucHk=) | `14.45% <0%> (ø)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/4047?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/4047?src=pr&el=footer). Last update [dd91433...18754a5](https://codecov.io/gh/Azure/azure-cli/pull/4047?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py index a0e2fe027..4f08c5271 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py @@ -751,7 +751,7 @@ def _get_extension_instance_name(instance_view, publisher, extension_type_name, full_type_name = '.'.join([publisher, extension_type_name]) if instance_view.extensions: ext = next((x for x in instance_view.extensions - if x.type.lower() == full_type_name.lower()), None) + if x.type and (x.type.lower() == full_type_name.lower())), None) if ext: extension_instance_name = ext.name return extension_instance_name
Misleading error message when resetting SSH key on a VM ### Description The following command works on all my VMs except for one particular one show below. NOTE: `az` is an alias to `docker run --rm -v /Users/$(whoami):/root -it azuresdk/azure-cli-python az` ```sh $ az vm user update -u moody -g myGroup -n myVM --ssh-key-value "$(cat ~/.ssh/id_rsa.pub)"="" 'NoneType' object has no attribute 'lower' Traceback (most recent call last): File "/usr/local/lib/python3.5/site-packages/azure/cli/main.py", line 36, in main cmd_result = APPLICATION.execute(args) File "/usr/local/lib/python3.5/site-packages/azure/cli/core/application.py", line 211, in execute result = expanded_arg.func(params) File "/usr/local/lib/python3.5/site-packages/azure/cli/core/commands/__init__.py", line 351, in __call__ return self.handler(*args, **kwargs) File "/usr/local/lib/python3.5/site-packages/azure/cli/core/commands/__init__.py", line 550, in _execute_command reraise(*sys.exc_info()) File "/usr/local/lib/python3.5/site-packages/six.py", line 686, in reraise raise value File "/usr/local/lib/python3.5/site-packages/azure/cli/core/commands/__init__.py", line 527, in _execute_command result = op(client, **kwargs) if client else op(**kwargs) File "/usr/local/lib/python3.5/site-packages/azure/cli/command_modules/vm/custom.py", line 619, in set_user return _set_linux_user(vm, resource_group_name, username, password, ssh_key_value, no_wait) File "/usr/local/lib/python3.5/site-packages/azure/cli/command_modules/vm/custom.py", line 676, in _set_linux_user protected_settings) File "/usr/local/lib/python3.5/site-packages/azure/cli/command_modules/vm/custom.py", line 727, in _update_linux_access_extension _ACCESS_EXT_HANDLER_NAME) File "/usr/local/lib/python3.5/site-packages/azure/cli/command_modules/vm/custom.py", line 751, in _get_extension_instance_name if x.type.lower() == full_type_name.lower()), None) File "/usr/local/lib/python3.5/site-packages/azure/cli/command_modules/vm/custom.py", line 751, in <genexpr> if x.type.lower() == full_type_name.lower()), None) AttributeError: 'NoneType' object has no attribute 'lower' ``` I tried checking the Azure console and found the following message on this particular VM when resetting SSH key ``` The VM agent is either unavailable, or not installed, which may prevent VMAccess from running. ``` Screenshot ![screen shot 2017-07-10 at 2 21 44 pm](https://user-images.githubusercontent.com/29459870/28033152-250c7f6c-657b-11e7-8098-eede273c66ef.png) _It would be a lot more useful to see that error in the CLI as well instead of a python dump._ --- ### Environment summary **Install Method:** How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly) Answer here: Docker **CLI Version:** What version of the CLI and modules are installed? (Use `az --version`) Answer here: ``` azure-cli (2.0.10+dev) acr (2.0.8+dev) acs (2.0.10+dev) appservice (0.1.10+dev) batch (3.0.3+dev) billing (0.1.3+dev) cdn (0.0.6+dev) cloud (2.0.6+dev) cognitiveservices (0.1.6+dev) command-modules-nspkg (2.0.1+dev) component (2.0.6+dev) configure (2.0.10+dev) consumption (0.1.3+dev) core (2.0.11+dev) cosmosdb (0.1.10+dev) dla (0.0.10+dev) dls (0.0.10+dev) feedback (2.0.6+dev) find (0.2.6+dev) interactive (0.3.6+dev) iot (0.1.9+dev) keyvault (2.0.8+dev) lab (0.0.8+dev) monitor (0.0.8+dev) network (2.0.10+dev) nspkg (3.0.1+dev) profile (2.0.8+dev) rdbms (0.0.5+dev) redis (0.2.7+dev) resource (2.0.10+dev) role (2.0.8+dev) sf (1.0.5+dev) sql (2.0.7+dev) storage (2.0.10+dev) taskhelp (0.1.5+dev) vm (2.0.10+dev) Python (Linux) 3.5.2 (default, Dec 27 2016, 21:33:11) [GCC 5.3.0] Python location '/usr/local/bin/python' ``` **OS Version:** What OS and version are you using? Answer here: macOS Sierra 10.12.5 (16F2104) **Shell Type:** What shell are you using? (e.g. bash, cmd.exe, Bash on Windows) Answer here: zsh
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py index 3ddcc7996..58d51f6d9 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py @@ -356,6 +356,18 @@ class Test_Vm_Custom(unittest.TestCase): # assert self.assertEqual(result, 'extension1') + def test_get_extension_instance_name_when_type_none(self): + instance_view = mock.MagicMock() + extension = mock.MagicMock() + extension.type = None + instance_view.extensions = [extension] + + # action + result = _get_extension_instance_name(instance_view, 'na', 'extension-name') + + # assert + self.assertEqual(result, 'extension-name') + class FakedVM(object): # pylint: disable=too-few-public-methods def __init__(self, nics=None, disks=None, os_disk=None):
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_media" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 0, "test_score": 0 }, "num_modified_files": 1 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==2.11.7 attrs==22.2.0 autopep8==2.0.4 azure-batch==3.0.0 -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_billing&subdirectory=src/command_modules/azure-cli-billing -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_cdn&subdirectory=src/command_modules/azure-cli-cdn -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_cognitiveservices&subdirectory=src/command_modules/azure-cli-cognitiveservices -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_consumption&subdirectory=src/command_modules/azure-cli-consumption -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_cosmosdb&subdirectory=src/command_modules/azure-cli-cosmosdb -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_interactive&subdirectory=src/command_modules/azure-cli-interactive -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_rdbms&subdirectory=src/command_modules/azure-cli-rdbms -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_sf&subdirectory=src/command_modules/azure-cli-sf -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@dd91433b36f95e9c849cbbcecccb0f610a8f0a3c#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.12 azure-devtools==0.4.3 azure-graphrbac==0.30.0rc6 azure-keyvault==0.3.4 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==4.0.0 azure-mgmt-billing==0.1.0 azure-mgmt-cdn==0.30.2 azure-mgmt-cognitiveservices==1.0.0 azure-mgmt-compute==2.0.0 azure-mgmt-consumption==0.1.0 azure-mgmt-containerregistry==0.3.1 azure-mgmt-datalake-analytics==0.1.6 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.6 azure-mgmt-devtestlabs==2.0.0 azure-mgmt-dns==1.0.1 azure-mgmt-documentdb==0.1.3 azure-mgmt-iothub==0.2.2 azure-mgmt-keyvault==0.40.0 azure-mgmt-monitor==0.2.1 azure-mgmt-network==1.2.0 azure-mgmt-nspkg==1.0.0 azure-mgmt-rdbms==0.1.0 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.1.0 azure-mgmt-sql==0.6.0 azure-mgmt-storage==1.1.0 azure-mgmt-trafficmanager==0.30.0 azure-mgmt-web==0.32.0 azure-monitor==0.3.0 azure-multiapi-storage==0.1.0 azure-nspkg==1.0.0 azure-servicefabric==5.6.130 bleach==4.1.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 ConfigArgParse==1.7 coverage==6.2 cryptography==40.0.2 docutils==0.18.1 flake8==5.0.4 futures==3.1.1 humanfriendly==2.4 idna==3.10 importlib-metadata==4.2.0 iniconfig==1.1.1 isodate==0.7.0 isort==5.10.1 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.7.0 mock==5.2.0 msrest==0.4.29 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pluggy==1.0.0 prompt-toolkit==3.0.36 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.10.0 pycparser==2.21 pydocumentdb==2.3.5 pyflakes==2.5.0 Pygments==2.14.0 PyJWT==2.4.0 pylint==1.7.1 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 pytz==2025.2 PyYAML==3.11 readme-renderer==34.0 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.7 tomli==1.2.3 typed-ast==1.5.5 typing-extensions==4.1.1 urllib3==1.26.20 urllib3-secure-extra==0.1.0 vcrpy==1.10.3 vsts-cd-manager==1.0.2 wcwidth==0.2.13 webencodings==0.5.1 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==2.11.7 - attrs==22.2.0 - autopep8==2.0.4 - azure-batch==3.0.0 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.12 - azure-devtools==0.4.3 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.3.4 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==4.0.0 - azure-mgmt-billing==0.1.0 - azure-mgmt-cdn==0.30.2 - azure-mgmt-cognitiveservices==1.0.0 - azure-mgmt-compute==2.0.0 - azure-mgmt-consumption==0.1.0 - azure-mgmt-containerregistry==0.3.1 - azure-mgmt-datalake-analytics==0.1.6 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.6 - azure-mgmt-devtestlabs==2.0.0 - azure-mgmt-dns==1.0.1 - azure-mgmt-documentdb==0.1.3 - azure-mgmt-iothub==0.2.2 - azure-mgmt-keyvault==0.40.0 - azure-mgmt-monitor==0.2.1 - azure-mgmt-network==1.2.0 - azure-mgmt-nspkg==1.0.0 - azure-mgmt-rdbms==0.1.0 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.1.0 - azure-mgmt-sql==0.6.0 - azure-mgmt-storage==1.1.0 - azure-mgmt-trafficmanager==0.30.0 - azure-mgmt-web==0.32.0 - azure-monitor==0.3.0 - azure-multiapi-storage==0.1.0 - azure-nspkg==1.0.0 - azure-servicefabric==5.6.130 - bleach==4.1.0 - cffi==1.15.1 - colorama==0.3.7 - configargparse==1.7 - coverage==6.2 - cryptography==40.0.2 - docutils==0.18.1 - flake8==5.0.4 - futures==3.1.1 - humanfriendly==2.4 - idna==3.10 - importlib-metadata==4.2.0 - iniconfig==1.1.1 - isodate==0.7.0 - isort==5.10.1 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.7.0 - mock==5.2.0 - msrest==0.4.29 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pip==9.0.1 - pluggy==1.0.0 - prompt-toolkit==3.0.36 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.10.0 - pycparser==2.21 - pydocumentdb==2.3.5 - pyflakes==2.5.0 - pygments==2.14.0 - pyjwt==2.4.0 - pylint==1.7.1 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pytz==2025.2 - pyyaml==3.11 - readme-renderer==34.0 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.7 - tomli==1.2.3 - typed-ast==1.5.5 - typing-extensions==4.1.1 - urllib3==1.26.20 - urllib3-secure-extra==0.1.0 - vcrpy==1.10.3 - vsts-cd-manager==1.0.2 - wcwidth==0.2.13 - webencodings==0.5.1 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_get_extension_instance_name_when_type_none" ]
[]
[ "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_attach_existing_datadisk_on_vm", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_attach_new_datadisk_custom_on_vm", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_attach_new_datadisk_default_on_vm", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_deattach_disk_on_vm", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_disable_boot_diagnostics_on_vm", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_disable_encryption_error_cases_handling", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_enable_boot_diagnostics_on_vm_never_enabled", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_enable_boot_diagnostics_skip_when_enabled_already", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_enable_encryption_error_cases_handling", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_encryption_distro_check", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_get_access_extension_upgrade_info", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_get_extension_instance_name", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_merge_secrets", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_show_vmss_instance_view" ]
[]
MIT License
null
Azure__azure-cli-4091
24667566ff4732ad325da0ddcf0eb143f0650c84
2017-07-28 18:30:26
eb12ac454cbe1ddb59c86cdf2045e1912660e750
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=h1) Report > Merging [#4091](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/b3c613ff92ce7bfc40caed5c86fb508c7e7d3710?src=pr&el=desc) will **increase** coverage by `<.01%`. > The diff coverage is `79.03%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/4091/graphs/tree.svg?token=2pog0TKvF8&src=pr&height=150&width=650)](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #4091 +/- ## ========================================== + Coverage 70.49% 70.49% +<.01% ========================================== Files 437 437 Lines 28086 28132 +46 Branches 4300 4314 +14 ========================================== + Hits 19800 19833 +33 - Misses 7004 7017 +13 Partials 1282 1282 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...ofile/azure/cli/command\_modules/profile/\_params.py](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcHJvZmlsZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3Byb2ZpbGUvX3BhcmFtcy5weQ==) | `68.42% <100%> (+1.75%)` | :arrow_up: | | [...rofile/azure/cli/command\_modules/profile/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcHJvZmlsZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3Byb2ZpbGUvY3VzdG9tLnB5) | `37.07% <60%> (-0.86%)` | :arrow_down: | | [src/azure-cli-core/azure/cli/core/\_profile.py](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL19wcm9maWxlLnB5) | `86.44% <80.35%> (-0.96%)` | :arrow_down: | | [...li-cloud/azure/cli/command\_modules/cloud/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktY2xvdWQvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9jbG91ZC9jdXN0b20ucHk=) | `13.79% <0%> (ø)` | :arrow_up: | | [...nent/azure/cli/command\_modules/component/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktY29tcG9uZW50L2F6dXJlL2NsaS9jb21tYW5kX21vZHVsZXMvY29tcG9uZW50L2N1c3RvbS5weQ==) | `16.23% <0%> (ø)` | :arrow_up: | | [...dback/azure/cli/command\_modules/feedback/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktZmVlZGJhY2svYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9mZWVkYmFjay9jdXN0b20ucHk=) | `31.25% <0%> (ø)` | :arrow_up: | | [src/azure-cli-core/azure/cli/core/util.py](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL3V0aWwucHk=) | `70.66% <0%> (ø)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=footer). Last update [b3c613f...8ef9ee8](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/src/azure-cli-core/azure/cli/core/_profile.py b/src/azure-cli-core/azure/cli/core/_profile.py index 1d12fd835..7200ab600 100644 --- a/src/azure-cli-core/azure/cli/core/_profile.py +++ b/src/azure-cli-core/azure/cli/core/_profile.py @@ -57,6 +57,7 @@ _CLIENT_ID = '04b07795-8ddb-461a-bbee-02f9e1bf7b46' _COMMON_TENANT = 'common' _MSI_ACCOUNT_NAME = 'MSI' +_TENANT_LEVEL_ACCOUNT_NAME = 'N/A(tenant level account)' def _authentication_context_factory(tenant, cache): @@ -235,7 +236,7 @@ class Profile(object): s.id = '/subscriptions/' + t s.subscription = t s.tenant_id = t - s.display_name = 'N/A(tenant level account)' + s.display_name = _TENANT_LEVEL_ACCOUNT_NAME result.append(s) return result @@ -263,7 +264,7 @@ class Profile(object): # use deepcopy as we don't want to persist these changes to file. return deepcopy(consolidated) - def _set_subscriptions(self, new_subscriptions): + def _set_subscriptions(self, new_subscriptions, merge=True): existing_ones = self.load_cached_subscriptions(all_clouds=True) active_one = next((x for x in existing_ones if x.get(_IS_DEFAULT_SUBSCRIPTION)), None) active_subscription_id = active_one[_SUBSCRIPTION_ID] if active_one else None @@ -271,27 +272,31 @@ class Profile(object): default_sub_id = None # merge with existing ones - dic = collections.OrderedDict((x[_SUBSCRIPTION_ID], x) for x in existing_ones) + if merge: + dic = collections.OrderedDict((x[_SUBSCRIPTION_ID], x) for x in existing_ones) + else: + dic = collections.OrderedDict() + dic.update((x[_SUBSCRIPTION_ID], x) for x in new_subscriptions) subscriptions = list(dic.values()) + if subscriptions: + if active_one: + new_active_one = next( + (x for x in new_subscriptions if x[_SUBSCRIPTION_ID] == active_subscription_id), + None) - if active_one: - new_active_one = next( - (x for x in new_subscriptions if x[_SUBSCRIPTION_ID] == active_subscription_id), - None) + for s in subscriptions: + s[_IS_DEFAULT_SUBSCRIPTION] = False - for s in subscriptions: - s[_IS_DEFAULT_SUBSCRIPTION] = False - - if not new_active_one: + if not new_active_one: + new_active_one = Profile._pick_working_subscription(new_subscriptions) + else: new_active_one = Profile._pick_working_subscription(new_subscriptions) - else: - new_active_one = Profile._pick_working_subscription(new_subscriptions) - new_active_one[_IS_DEFAULT_SUBSCRIPTION] = True - default_sub_id = new_active_one[_SUBSCRIPTION_ID] + new_active_one[_IS_DEFAULT_SUBSCRIPTION] = True + default_sub_id = new_active_one[_SUBSCRIPTION_ID] - set_cloud_subscription(active_cloud.name, default_sub_id) + set_cloud_subscription(active_cloud.name, default_sub_id) self._storage[_SUBSCRIPTIONS] = subscriptions @staticmethod @@ -422,6 +427,57 @@ class Profile(object): str(account[_SUBSCRIPTION_ID]), str(account[_TENANT_ID])) + def refresh_accounts(self, subscription_finder=None): + subscriptions = self.load_cached_subscriptions() + to_refresh = [s for s in subscriptions if s[_SUBSCRIPTION_NAME] != _MSI_ACCOUNT_NAME] + not_to_refresh = [s for s in subscriptions if s not in to_refresh] + + from azure.cli.core._debug import allow_debug_adal_connection + allow_debug_adal_connection() + subscription_finder = subscription_finder or SubscriptionFinder(self.auth_ctx_factory, + self._creds_cache.adal_token_cache) + refreshed_list = set() + result = [] + for s in to_refresh: + user_name = s[_USER_ENTITY][_USER_NAME] + if user_name in refreshed_list: + continue + refreshed_list.add(user_name) + is_service_principal = (s[_USER_ENTITY][_USER_TYPE] == _SERVICE_PRINCIPAL) + tenant = s[_TENANT_ID] + subscriptions = [] + try: + if is_service_principal: + sp_auth = ServicePrincipalAuth(self._creds_cache.retrieve_secret_of_service_principal(user_name)) + subscriptions = subscription_finder.find_from_service_principal_id(user_name, sp_auth, tenant, + self._ad_resource_uri) + else: + subscriptions = subscription_finder.find_from_user_account(user_name, None, None, + self._ad_resource_uri) + except Exception as ex: # pylint: disable=broad-except + logger.warning("Refreshing for '%s' failed with an error '%s'. The existing accounts were not " + "modified. You can run 'az login' later to explictly refresh them", user_name, ex) + result += deepcopy([r for r in to_refresh if r[_USER_ENTITY][_USER_NAME] == user_name]) + continue + + if not subscriptions: + if s[_SUBSCRIPTION_NAME] == _TENANT_LEVEL_ACCOUNT_NAME: + subscriptions = Profile._build_tenant_level_accounts([s[_TENANT_ID]]) + + if not subscriptions: + continue + + consolidated = Profile._normalize_properties(subscription_finder.user_id, + subscriptions, + is_service_principal) + result += consolidated + + if self._creds_cache.adal_token_cache.has_state_changed: + self._creds_cache.persist_cached_creds() + + result = result + not_to_refresh + self._set_subscriptions(result, merge=False) + def get_sp_auth_info(self, subscription_id=None, name=None, password=None, cert_file=None): from collections import OrderedDict account = self.get_subscription(subscription_id) @@ -561,11 +617,11 @@ class SubscriptionFinder(object): def find_from_user_account(self, username, password, tenant, resource): context = self._create_auth_context(tenant) - token_entry = context.acquire_token_with_username_password( - resource, - username, - password, - _CLIENT_ID) + if password: + token_entry = context.acquire_token_with_username_password(resource, username, password, _CLIENT_ID) + else: # when refresh account, we will leverage local cached tokens + token_entry = context.acquire_token(resource, username, _CLIENT_ID) + self.user_id = token_entry[_TOKEN_ENTRY_USER_ID] if tenant is None: diff --git a/src/command_modules/azure-cli-profile/HISTORY.rst b/src/command_modules/azure-cli-profile/HISTORY.rst index 6d886b09f..a0d2c4d77 100644 --- a/src/command_modules/azure-cli-profile/HISTORY.rst +++ b/src/command_modules/azure-cli-profile/HISTORY.rst @@ -2,6 +2,10 @@ Release History =============== +(unreleased) ++++++++++++++++++++ +* account list: add `--refresh` to sycn up the latest subscriptions from server + 2.0.9 (2017-07-27) ++++++++++++++++++ support login inside a VM with a managed identity diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py index 4c2475a03..8a8b2eb98 100644 --- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py +++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py @@ -27,4 +27,5 @@ register_cli_argument('logout', 'username', help='account user, if missing, logo register_cli_argument('account', 'subscription', options_list=('--subscription', '-s'), help='Name or ID of subscription.', completer=get_subscription_id_list) register_cli_argument('account list', 'all', help="List all subscriptions, rather just 'Enabled' ones", action='store_true') +register_cli_argument('account list', 'refresh', help="retrieve up to date subscriptions from server", action='store_true') register_cli_argument('account show', 'show_auth_for_sdk', options_list=('--sdk-auth',), action='store_true', help='output result in compatible with Azure SDK auth file') diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py index cbb7845dc..177be9eaf 100644 --- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py +++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py @@ -14,15 +14,17 @@ from azure.cli.core.cloud import get_active_cloud logger = get_az_logger(__name__) -def load_subscriptions(all_clouds=False): +def load_subscriptions(all_clouds=False, refresh=False): profile = Profile() + if refresh: + subscriptions = profile.refresh_accounts() subscriptions = profile.load_cached_subscriptions(all_clouds) return subscriptions -def list_subscriptions(all=False): # pylint: disable=redefined-builtin +def list_subscriptions(all=False, refresh=False): # pylint: disable=redefined-builtin """List the imported subscriptions.""" - subscriptions = load_subscriptions(all_clouds=all) + subscriptions = load_subscriptions(all_clouds=all, refresh=refresh) if not subscriptions: logger.warning('Please run "az login" to access your accounts.') for sub in subscriptions:
Proposal: az account refresh Sometimes I have new subscriptions associated to my account that did not exist when I did `azure login` so I have to do `azure login` again and go through the interactive login flow to get the new subscriptions I have show up on my local CLI. Since CLI already has my working credentials, perhaps a new `az account refresh` can re-download my subscriptions list?
Azure/azure-cli
diff --git a/src/azure-cli-core/azure/cli/core/tests/test_profile.py b/src/azure-cli-core/azure/cli/core/tests/test_profile.py index e65acb739..4a4d5fa91 100644 --- a/src/azure-cli-core/azure/cli/core/tests/test_profile.py +++ b/src/azure-cli-core/azure/cli/core/tests/test_profile.py @@ -9,6 +9,8 @@ import os import unittest import mock +from copy import deepcopy + from adal import AdalError from azure.mgmt.resource.subscriptions.models import (SubscriptionState, Subscription, SubscriptionPolicies, SpendingLimit) @@ -880,6 +882,81 @@ class Test_Profile(unittest.TestCase): mock_auth_context.acquire_token_with_client_certificate.assert_called_once_with( mgmt_resource, 'my app', mock.ANY, mock.ANY) + @mock.patch('adal.AuthenticationContext', autospec=True) + def test_refresh_accounts_one_user_account(self, mock_auth_context): + storage_mock = {'subscriptions': None} + profile = Profile(storage_mock, use_global_creds_cache=False) + consolidated = Profile._normalize_properties(self.user1, deepcopy([self.subscription1]), False) + profile._set_subscriptions(consolidated) + mock_auth_context.acquire_token_with_username_password.return_value = self.token_entry1 + mock_auth_context.acquire_token.return_value = self.token_entry1 + mock_arm_client = mock.MagicMock() + mock_arm_client.tenants.list.return_value = [TenantStub(self.tenant_id)] + mock_arm_client.subscriptions.list.return_value = deepcopy([self.subscription1, self.subscription2]) + finder = SubscriptionFinder(lambda _, _2: mock_auth_context, + None, + lambda _: mock_arm_client) + # action + profile.refresh_accounts(finder) + + # assert + result = storage_mock['subscriptions'] + self.assertEqual(2, len(result)) + self.assertEqual(self.id1.split('/')[-1], result[0]['id']) + self.assertEqual(self.id2.split('/')[-1], result[1]['id']) + self.assertTrue(result[0]['isDefault']) + + @mock.patch('adal.AuthenticationContext', autospec=True) + def test_refresh_accounts_one_user_account_one_sp_account(self, mock_auth_context): + storage_mock = {'subscriptions': None} + profile = Profile(storage_mock, use_global_creds_cache=False) + sp_subscription1 = SubscriptionStub('sp-sub/3', 'foo-subname', self.state1, 'foo_tenant.onmicrosoft.com') + consolidated = Profile._normalize_properties(self.user1, deepcopy([self.subscription1]), False) + consolidated += Profile._normalize_properties('http://foo', [sp_subscription1], True) + profile._set_subscriptions(consolidated) + mock_auth_context.acquire_token_with_username_password.return_value = self.token_entry1 + mock_auth_context.acquire_token.return_value = self.token_entry1 + mock_auth_context.acquire_token_with_client_credentials.return_value = self.token_entry1 + mock_arm_client = mock.MagicMock() + mock_arm_client.tenants.list.return_value = [TenantStub(self.tenant_id)] + mock_arm_client.subscriptions.list.side_effect = deepcopy([[self.subscription1], [self.subscription2, sp_subscription1]]) + finder = SubscriptionFinder(lambda _, _2: mock_auth_context, + None, + lambda _: mock_arm_client) + profile._creds_cache.retrieve_secret_of_service_principal = lambda _: 'verySecret' + profile._creds_cache.flush_to_disk = lambda _: '' + # action + profile.refresh_accounts(finder) + + # assert + result = storage_mock['subscriptions'] + self.assertEqual(3, len(result)) + self.assertEqual(self.id1.split('/')[-1], result[0]['id']) + self.assertEqual(self.id2.split('/')[-1], result[1]['id']) + self.assertEqual('3', result[2]['id']) + self.assertTrue(result[0]['isDefault']) + + @mock.patch('adal.AuthenticationContext', autospec=True) + def test_refresh_accounts_with_nothing(self, mock_auth_context): + storage_mock = {'subscriptions': None} + profile = Profile(storage_mock, use_global_creds_cache=False) + consolidated = Profile._normalize_properties(self.user1, deepcopy([self.subscription1]), False) + profile._set_subscriptions(consolidated) + mock_auth_context.acquire_token_with_username_password.return_value = self.token_entry1 + mock_auth_context.acquire_token.return_value = self.token_entry1 + mock_arm_client = mock.MagicMock() + mock_arm_client.tenants.list.return_value = [TenantStub(self.tenant_id)] + mock_arm_client.subscriptions.list.return_value = [] + finder = SubscriptionFinder(lambda _, _2: mock_auth_context, + None, + lambda _: mock_arm_client) + # action + profile.refresh_accounts(finder) + + # assert + result = storage_mock['subscriptions'] + self.assertEqual(0, len(result)) + @mock.patch('azure.cli.core._profile._load_tokens_from_file', autospec=True) def test_credscache_load_tokens_and_sp_creds_with_secret(self, mock_read_file): test_sp = {
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 2, "test_score": 3 }, "num_modified_files": 4 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==2.11.7 attrs==22.2.0 autopep8==2.0.4 azure-batch==3.0.0 -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_billing&subdirectory=src/command_modules/azure-cli-billing -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_cdn&subdirectory=src/command_modules/azure-cli-cdn -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_cognitiveservices&subdirectory=src/command_modules/azure-cli-cognitiveservices -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_consumption&subdirectory=src/command_modules/azure-cli-consumption -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_cosmosdb&subdirectory=src/command_modules/azure-cli-cosmosdb -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_interactive&subdirectory=src/command_modules/azure-cli-interactive -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_rdbms&subdirectory=src/command_modules/azure-cli-rdbms -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_sf&subdirectory=src/command_modules/azure-cli-sf -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.12 azure-devtools==0.4.3 azure-graphrbac==0.30.0rc6 azure-keyvault==0.3.4 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==4.0.0 azure-mgmt-billing==0.1.0 azure-mgmt-cdn==0.30.2 azure-mgmt-cognitiveservices==1.0.0 azure-mgmt-compute==2.0.0 azure-mgmt-consumption==0.1.0 azure-mgmt-containerinstance==9.2.0 azure-mgmt-containerregistry==0.3.1 azure-mgmt-core==1.3.2 azure-mgmt-datalake-analytics==0.1.6 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.6 azure-mgmt-devtestlabs==2.0.0 azure-mgmt-dns==1.0.1 azure-mgmt-documentdb==0.1.3 azure-mgmt-iothub==0.2.2 azure-mgmt-keyvault==0.40.0 azure-mgmt-monitor==0.2.1 azure-mgmt-network==1.3.0 azure-mgmt-nspkg==1.0.0 azure-mgmt-rdbms==0.1.0 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.1.0 azure-mgmt-sql==0.6.0 azure-mgmt-storage==1.1.0 azure-mgmt-trafficmanager==0.30.0 azure-mgmt-web==0.32.0 azure-monitor==0.3.0 azure-multiapi-storage==0.1.0 azure-nspkg==1.0.0 azure-servicefabric==5.6.130 bleach==4.1.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 ConfigArgParse==1.7 coverage==6.2 cryptography==40.0.2 docutils==0.18.1 flake8==5.0.4 futures==3.1.1 humanfriendly==2.4 idna==3.10 importlib-metadata==4.2.0 iniconfig==1.1.1 isodate==0.7.0 isort==5.10.1 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.7.0 mock==5.2.0 msrest==0.7.1 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pluggy==1.0.0 prompt-toolkit==3.0.36 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.10.0 pycparser==2.21 pydocumentdb==2.3.5 pyflakes==2.5.0 Pygments==2.14.0 PyJWT==2.4.0 pylint==1.7.1 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 pytz==2025.2 PyYAML==3.11 readme-renderer==34.0 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.7 tomli==1.2.3 typed-ast==1.5.5 typing-extensions==4.1.1 urllib3==1.26.20 urllib3-secure-extra==0.1.0 vcrpy==1.10.3 vsts-cd-manager==1.0.2 wcwidth==0.2.13 webencodings==0.5.1 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==2.11.7 - attrs==22.2.0 - autopep8==2.0.4 - azure-batch==3.0.0 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.12 - azure-devtools==0.4.3 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.3.4 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==4.0.0 - azure-mgmt-billing==0.1.0 - azure-mgmt-cdn==0.30.2 - azure-mgmt-cognitiveservices==1.0.0 - azure-mgmt-compute==2.0.0 - azure-mgmt-consumption==0.1.0 - azure-mgmt-containerinstance==9.2.0 - azure-mgmt-containerregistry==0.3.1 - azure-mgmt-core==1.3.2 - azure-mgmt-datalake-analytics==0.1.6 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.6 - azure-mgmt-devtestlabs==2.0.0 - azure-mgmt-dns==1.0.1 - azure-mgmt-documentdb==0.1.3 - azure-mgmt-iothub==0.2.2 - azure-mgmt-keyvault==0.40.0 - azure-mgmt-monitor==0.2.1 - azure-mgmt-network==1.3.0 - azure-mgmt-nspkg==1.0.0 - azure-mgmt-rdbms==0.1.0 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.1.0 - azure-mgmt-sql==0.6.0 - azure-mgmt-storage==1.1.0 - azure-mgmt-trafficmanager==0.30.0 - azure-mgmt-web==0.32.0 - azure-monitor==0.3.0 - azure-multiapi-storage==0.1.0 - azure-nspkg==1.0.0 - azure-servicefabric==5.6.130 - bleach==4.1.0 - cffi==1.15.1 - colorama==0.3.7 - configargparse==1.7 - coverage==6.2 - cryptography==40.0.2 - docutils==0.18.1 - flake8==5.0.4 - futures==3.1.1 - humanfriendly==2.4 - idna==3.10 - importlib-metadata==4.2.0 - iniconfig==1.1.1 - isodate==0.7.0 - isort==5.10.1 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.7.0 - mock==5.2.0 - msrest==0.7.1 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pip==9.0.1 - pluggy==1.0.0 - prompt-toolkit==3.0.36 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.10.0 - pycparser==2.21 - pydocumentdb==2.3.5 - pyflakes==2.5.0 - pygments==2.14.0 - pyjwt==2.4.0 - pylint==1.7.1 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pytz==2025.2 - pyyaml==3.11 - readme-renderer==34.0 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.7 - tomli==1.2.3 - typed-ast==1.5.5 - typing-extensions==4.1.1 - urllib3==1.26.20 - urllib3-secure-extra==0.1.0 - vcrpy==1.10.3 - vsts-cd-manager==1.0.2 - wcwidth==0.2.13 - webencodings==0.5.1 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_refresh_accounts_one_user_account", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_refresh_accounts_one_user_account_one_sp_account", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_refresh_accounts_with_nothing" ]
[ "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_cloud_console_login", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_using_cert", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_service_principal_auth_client_cert" ]
[ "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_create_account_without_subscriptions_thru_common_tenant", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_create_account_without_subscriptions_thru_service_principal", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_create_account_without_subscriptions_without_tenant", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_create_token_cache", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_add_new_sp_creds", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_add_preexisting_sp_creds", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds_with_cert", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds_with_secret", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_new_token_added_by_adal", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_remove_creds", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_default_active_subscription_to_non_disabled_one", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_do_nothing_if_not_in_msi_env", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_particular_tenent", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_id", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_interactive_from_particular_tenent", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_through_interactive_flow", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password_adfs", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password_with_account_disabled", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_auth_info_fail_on_user_account", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_auth_info_for_logged_in_service_principal", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_auth_info_for_newly_created_service_principal", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_current_account_user", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_login_credentials", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_login_credentials_for_data_lake_client", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_login_credentials_for_graph_client", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_login_credentials_msi", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_raw_token", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_subscription", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_init_if_in_msi_env", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_load_cached_tokens", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_logout", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_logout_all", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_msi_token_request_retries", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_normalize", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_service_principal_auth_client_secret", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_set_active_subscription", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_subscription_finder_constructor", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_update_add_two_different_subscriptions", "src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_update_with_same_subscription_added_twice" ]
[]
MIT License
null
Azure__azure-cli-4265
85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b
2017-08-18 19:52:45
eb12ac454cbe1ddb59c86cdf2045e1912660e750
codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/4265?src=pr&el=h1) Report > Merging [#4265](https://codecov.io/gh/Azure/azure-cli/pull/4265?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b?src=pr&el=desc) will **increase** coverage by `<.01%`. > The diff coverage is `86.66%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/4265/graphs/tree.svg?src=pr&token=2pog0TKvF8&width=650&height=150)](https://codecov.io/gh/Azure/azure-cli/pull/4265?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #4265 +/- ## ========================================== + Coverage 70.08% 70.09% +<.01% ========================================== Files 475 475 Lines 29636 29639 +3 Branches 4542 4542 ========================================== + Hits 20771 20774 +3 - Misses 7419 7423 +4 + Partials 1446 1442 -4 ``` | [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/4265?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...cli-vm/azure/cli/command\_modules/vm/\_validators.py](https://codecov.io/gh/Azure/azure-cli/pull/4265?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktdm0vYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy92bS9fdmFsaWRhdG9ycy5weQ==) | `78.48% <86.66%> (+0.1%)` | :arrow_up: | | [...dback/azure/cli/command\_modules/feedback/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/4265?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktZmVlZGJhY2svYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9mZWVkYmFjay9jdXN0b20ucHk=) | `31.25% <0%> (ø)` | :arrow_up: | | [...nent/azure/cli/command\_modules/component/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/4265?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktY29tcG9uZW50L2F6dXJlL2NsaS9jb21tYW5kX21vZHVsZXMvY29tcG9uZW50L2N1c3RvbS5weQ==) | `16.26% <0%> (ø)` | :arrow_up: | | [...li-cloud/azure/cli/command\_modules/cloud/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/4265?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktY2xvdWQvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9jbG91ZC9jdXN0b20ucHk=) | `13.79% <0%> (ø)` | :arrow_up: | | [src/azure-cli-core/azure/cli/core/util.py](https://codecov.io/gh/Azure/azure-cli/pull/4265?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL3V0aWwucHk=) | `69.73% <0%> (ø)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/4265?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/4265?src=pr&el=footer). Last update [85c0e4c...5cf8abf](https://codecov.io/gh/Azure/azure-cli/pull/4265?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/packaged_releases/debian/debian_build.sh b/packaged_releases/debian/debian_build.sh index cac900add..1d59a1ffd 100644 --- a/packaged_releases/debian/debian_build.sh +++ b/packaged_releases/debian/debian_build.sh @@ -55,6 +55,9 @@ $source_dir/python_env/bin/pip3 install wheel for d in $source_dir/src/azure-cli $source_dir/src/azure-cli-core $source_dir/src/azure-cli-nspkg $source_dir/src/azure-cli-command_modules-nspkg $source_dir/src/command_modules/azure-cli-*/; do cd $d; $source_dir/python_env/bin/python3 setup.py bdist_wheel -d $tmp_pkg_dir; cd -; done; $source_dir/python_env/bin/pip3 install azure-cli --find-links $tmp_pkg_dir $source_dir/python_env/bin/pip3 install --force-reinstall --upgrade azure-nspkg azure-mgmt-nspkg +# WORKAROUND: Newer versions of cryptography do not work on Bash on Windows / WSL - see https://github.com/Azure/azure-cli/issues/4154 +# If you *have* to use a newer version of cryptography in the future, verify that it works on WSL also. +$source_dir/python_env/bin/pip3 install cryptography==2.0 # Add the debian files mkdir $source_dir/debian # Create temp dir for the debian/ directory used for CLI build. diff --git a/scripts/releaser/HISTORY.rst b/scripts/releaser/HISTORY.rst index a89636c31..563fff31d 100644 --- a/scripts/releaser/HISTORY.rst +++ b/scripts/releaser/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +0.1.3 (2017-08-18) +++++++++++++++++++ + +* Fix 'packaged release archive' creation step. We now clone the repo again after pushing tags so we can use the new tags. + 0.1.2 (2017-08-15) ++++++++++++++++++ diff --git a/scripts/releaser/release.py b/scripts/releaser/release.py index 4e671b353..c65460c6e 100644 --- a/scripts/releaser/release.py +++ b/scripts/releaser/release.py @@ -365,5 +365,8 @@ if __name__ == "__main__": give_chance_to_cancel('Create GitHub releases and tags') run_create_github_release(release_commitish_list, release_assets_dir_map) give_chance_to_cancel('Create Packaged Release archive') + # We need to clone the repo again as we've now pushed the git tags and we need them to create the packaged release. + # (we could do 'git pull' but this is easier and uses a clean directory just to be safe) + cli_repo_dir = set_up_cli_repo_dir() run_create_packaged_release(cli_repo_dir) print_status('Done.') diff --git a/src/command_modules/azure-cli-vm/HISTORY.rst b/src/command_modules/azure-cli-vm/HISTORY.rst index ad0fe2f37..0f9a6ccf6 100644 --- a/src/command_modules/azure-cli-vm/HISTORY.rst +++ b/src/command_modules/azure-cli-vm/HISTORY.rst @@ -4,6 +4,7 @@ Release History =============== unreleased +++++++++++++++++++ +* `vm/vmss create`: fix issue where the command would throw an error if unable to extract plan information from an image. * `vmss create`: fix a crash when create a scaleset with an internal LB * `vm availability-set create`: Fix issue where --no-wait argument did not work. diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py index f1de4fb21..8e9abcc1d 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py @@ -157,32 +157,36 @@ def _parse_image_argument(namespace): namespace.os_offer = urn_match.group(2) namespace.os_sku = urn_match.group(3) namespace.os_version = urn_match.group(4) - compute_client = _compute_client_factory() - if namespace.os_version.lower() == 'latest': - top_one = compute_client.virtual_machine_images.list(namespace.location, - namespace.os_publisher, - namespace.os_offer, - namespace.os_sku, - top=1, - orderby='name desc') - if not top_one: - raise CLIError("Can't resolve the vesion of '{}'".format(namespace.image)) - - image_version = top_one[0].name - else: - image_version = namespace.os_version - - image = compute_client.virtual_machine_images.get(namespace.location, - namespace.os_publisher, - namespace.os_offer, - namespace.os_sku, - image_version) - - # pylint: disable=no-member - if image.plan: - namespace.plan_name = image.plan.name - namespace.plan_product = image.plan.product - namespace.plan_publisher = image.plan.publisher + try: + compute_client = _compute_client_factory() + if namespace.os_version.lower() == 'latest': + top_one = compute_client.virtual_machine_images.list(namespace.location, + namespace.os_publisher, + namespace.os_offer, + namespace.os_sku, + top=1, + orderby='name desc') + if not top_one: + raise CLIError("Can't resolve the vesion of '{}'".format(namespace.image)) + + image_version = top_one[0].name + else: + image_version = namespace.os_version + + image = compute_client.virtual_machine_images.get(namespace.location, + namespace.os_publisher, + namespace.os_offer, + namespace.os_sku, + image_version) + + # pylint: disable=no-member + if image.plan: + namespace.plan_name = image.plan.name + namespace.plan_product = image.plan.product + namespace.plan_publisher = image.plan.publisher + except CloudError as ex: + logger.warning("Querying the image of '%s' failed for an error '%s'. Configuring plan settings " + "will be skipped", namespace.image, ex.message) return 'urn' # 4 - check if a fully-qualified ID (assumes it is an image ID)
vm/vmss create: don't throw when tries to retrieve image to extract the plan information The context is some images are still being staged and not yet published, hence image API won't go through. Instead of fail (therefore block the create), the suggested change is to warn. I am fine with it, as using market place image with plan is a minority scenario. The code to wrap inside a try-catch is [here](https://github.com/Azure/azure-cli/blob/master/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py#L160-L185)
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py index 068c40722..0475ec9e3 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py @@ -8,6 +8,7 @@ import tempfile import unittest import mock +from msrestazure.azure_exceptions import CloudError from azure.cli.core.util import CLIError from azure.cli.core.commands.validators import DefaultStr from azure.cli.core.keys import is_valid_ssh_rsa_public_key @@ -172,6 +173,29 @@ class TestActions(unittest.TestCase): self.assertEqual('product1', np.plan_product) self.assertEqual('publisher1', np.plan_publisher) + @mock.patch('azure.cli.command_modules.vm._validators._compute_client_factory', autospec=True) + @mock.patch('azure.cli.command_modules.vm._validators.logger.warning', autospec=True) + def test_parse_staging_image_argument(self, logger_mock, client_factory_mock): + compute_client = mock.MagicMock() + resp = mock.MagicMock() + resp.status_code = 404 + resp.text = '{"Message": "Not Found"}' + + compute_client.virtual_machine_images.get.side_effect = CloudError(resp, error='image not found') + client_factory_mock.return_value = compute_client + + np = mock.MagicMock() + np.location = 'some region' + np.image = 'publisher1:offer1:sku1:1.0.0' + + # action + _parse_image_argument(np) + + # assert + logger_mock.assert_called_with("Querying the image of '%s' failed for an error '%s'. " + "Configuring plan settings will be skipped", 'publisher1:offer1:sku1:1.0.0', + 'image not found') + def test_get_next_subnet_addr_suffix(self): result = _get_next_subnet_addr_suffix('10.0.0.0/16', '10.0.0.0/24', 24) self.assertEqual(result, '10.0.1.0/24')
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 0, "test_score": 3 }, "num_modified_files": 5 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==2.11.7 attrs==22.2.0 autopep8==2.0.4 azure-batch==3.1.0 -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_billing&subdirectory=src/command_modules/azure-cli-billing -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_cdn&subdirectory=src/command_modules/azure-cli-cdn -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_cognitiveservices&subdirectory=src/command_modules/azure-cli-cognitiveservices -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_consumption&subdirectory=src/command_modules/azure-cli-consumption -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_cosmosdb&subdirectory=src/command_modules/azure-cli-cosmosdb -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_eventgrid&subdirectory=src/command_modules/azure-cli-eventgrid -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_interactive&subdirectory=src/command_modules/azure-cli-interactive -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_rdbms&subdirectory=src/command_modules/azure-cli-rdbms -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_sf&subdirectory=src/command_modules/azure-cli-sf -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@85c0e4c8fb21e26a4984cad3b21a5e22a6a8b92b#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.15 azure-devtools==0.4.3 azure-graphrbac==0.30.0rc6 azure-keyvault==0.3.4 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==4.1.0 azure-mgmt-billing==0.1.0 azure-mgmt-cdn==0.30.2 azure-mgmt-cognitiveservices==1.0.0 azure-mgmt-compute==2.0.0 azure-mgmt-consumption==0.1.0 azure-mgmt-containerinstance==9.2.0 azure-mgmt-containerregistry==0.3.1 azure-mgmt-containerservice==1.0.0 azure-mgmt-core==1.3.2 azure-mgmt-datalake-analytics==0.1.6 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.6 azure-mgmt-devtestlabs==2.0.0 azure-mgmt-dns==1.0.1 azure-mgmt-documentdb==0.1.3 azure-mgmt-iothub==0.2.2 azure-mgmt-keyvault==0.40.0 azure-mgmt-monitor==0.2.1 azure-mgmt-network==1.3.0 azure-mgmt-nspkg==1.0.0 azure-mgmt-rdbms==0.1.0 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.1.0 azure-mgmt-sql==0.6.0 azure-mgmt-storage==1.2.0 azure-mgmt-trafficmanager==0.30.0 azure-mgmt-web==0.32.0 azure-monitor==0.3.0 azure-multiapi-storage==0.1.2 azure-nspkg==1.0.0 azure-servicefabric==5.6.130 bleach==4.1.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 ConfigArgParse==1.7 coverage==6.2 cryptography==40.0.2 docutils==0.18.1 flake8==5.0.4 futures==3.1.1 humanfriendly==2.4 idna==3.10 importlib-metadata==4.2.0 iniconfig==1.1.1 isodate==0.7.0 isort==5.10.1 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.7.0 mock==5.2.0 msrest==0.7.1 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pluggy==1.0.0 prompt-toolkit==3.0.36 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.10.0 pycparser==2.21 pydocumentdb==2.3.5 pyflakes==2.5.0 Pygments==2.14.0 PyJWT==2.4.0 pylint==1.7.1 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 pytz==2025.2 PyYAML==3.11 readme-renderer==34.0 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.7 tomli==1.2.3 typed-ast==1.5.5 typing-extensions==4.1.1 urllib3==1.26.20 urllib3-secure-extra==0.1.0 vcrpy==1.10.3 vsts-cd-manager==0.118.0 wcwidth==0.2.13 webencodings==0.5.1 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==2.11.7 - attrs==22.2.0 - autopep8==2.0.4 - azure-batch==3.1.0 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.15 - azure-devtools==0.4.3 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.3.4 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==4.1.0 - azure-mgmt-billing==0.1.0 - azure-mgmt-cdn==0.30.2 - azure-mgmt-cognitiveservices==1.0.0 - azure-mgmt-compute==2.0.0 - azure-mgmt-consumption==0.1.0 - azure-mgmt-containerinstance==9.2.0 - azure-mgmt-containerregistry==0.3.1 - azure-mgmt-containerservice==1.0.0 - azure-mgmt-core==1.3.2 - azure-mgmt-datalake-analytics==0.1.6 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.6 - azure-mgmt-devtestlabs==2.0.0 - azure-mgmt-dns==1.0.1 - azure-mgmt-documentdb==0.1.3 - azure-mgmt-iothub==0.2.2 - azure-mgmt-keyvault==0.40.0 - azure-mgmt-monitor==0.2.1 - azure-mgmt-network==1.3.0 - azure-mgmt-nspkg==1.0.0 - azure-mgmt-rdbms==0.1.0 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.1.0 - azure-mgmt-sql==0.6.0 - azure-mgmt-storage==1.2.0 - azure-mgmt-trafficmanager==0.30.0 - azure-mgmt-web==0.32.0 - azure-monitor==0.3.0 - azure-multiapi-storage==0.1.2 - azure-nspkg==1.0.0 - azure-servicefabric==5.6.130 - bleach==4.1.0 - cffi==1.15.1 - colorama==0.3.7 - configargparse==1.7 - coverage==6.2 - cryptography==40.0.2 - docutils==0.18.1 - flake8==5.0.4 - futures==3.1.1 - humanfriendly==2.4 - idna==3.10 - importlib-metadata==4.2.0 - iniconfig==1.1.1 - isodate==0.7.0 - isort==5.10.1 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.7.0 - mock==5.2.0 - msrest==0.7.1 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pip==9.0.1 - pluggy==1.0.0 - prompt-toolkit==3.0.36 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.10.0 - pycparser==2.21 - pydocumentdb==2.3.5 - pyflakes==2.5.0 - pygments==2.14.0 - pyjwt==2.4.0 - pylint==1.7.1 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pytz==2025.2 - pyyaml==3.11 - readme-renderer==34.0 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.7 - tomli==1.2.3 - typed-ast==1.5.5 - typing-extensions==4.1.1 - urllib3==1.26.20 - urllib3-secure-extra==0.1.0 - vcrpy==1.10.3 - vsts-cd-manager==0.118.0 - wcwidth==0.2.13 - webencodings==0.5.1 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py::TestActions::test_parse_staging_image_argument" ]
[]
[ "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py::TestActions::test_figure_out_storage_source", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py::TestActions::test_generate_specfied_ssh_key_files", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py::TestActions::test_get_next_subnet_addr_suffix", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py::TestActions::test_parse_image_argument", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py::TestActions::test_source_storage_account_err_case", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py::TestActions::test_validate_admin_password_linux", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py::TestActions::test_validate_admin_password_windows", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py::TestActions::test_validate_admin_username_linux", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py::TestActions::test_validate_admin_username_windows", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py::TestActions::test_validate_msi_on_assign_identity_command", "src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py::TestActions::test_validate_msi_on_create" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_azure-cli-4265
Azure__azure-cli-4272
966cbaa94a8eba13f89a220fb1fe73bed3e2244b
2017-08-18 23:54:34
eb12ac454cbe1ddb59c86cdf2045e1912660e750
diff --git a/src/command_modules/azure-cli-storage/HISTORY.rst b/src/command_modules/azure-cli-storage/HISTORY.rst index 3a69e8aa3..51989b349 100644 --- a/src/command_modules/azure-cli-storage/HISTORY.rst +++ b/src/command_modules/azure-cli-storage/HISTORY.rst @@ -3,6 +3,12 @@ Release History =============== +unreleased +++++++++++ +* Enable service encryption by customer managed key +* Breaking change: rename --encryption option to --encryption-services for az storage account create and az storage account update command. +* Fix #4220: az storage account update encryption - syntax mismatch + 2.0.12 (2017-08-11) +++++++++++++++++++ * Enable create storage account with system assigned identity diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_params.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_params.py index 0e159c576..157a5d77f 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_params.py +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_params.py @@ -19,7 +19,7 @@ from azure.cli.core.commands import (register_cli_argument, register_extra_cli_a from azure.common import AzureMissingResourceHttpError -from azure.cli.core.profiles import get_sdk, ResourceType +from azure.cli.core.profiles import get_sdk, ResourceType, supported_api_version from ._factory import get_storage_data_service_client from ._validators import \ @@ -30,8 +30,8 @@ from ._validators import \ validate_custom_domain, validate_public_access, process_blob_upload_batch_parameters, process_blob_download_batch_parameters, process_file_upload_batch_parameters, process_file_download_batch_parameters, - get_content_setting_validator, validate_encryption, validate_accept, - validate_key, storage_account_key_options, + get_content_setting_validator, validate_encryption_services, validate_accept, + validate_key, storage_account_key_options, validate_encryption_source, process_file_download_namespace, process_metric_update_namespace, process_blob_copy_batch_namespace, get_source_file_or_blob_service_client, process_blob_source_uri, @@ -112,7 +112,6 @@ class CommandContext(object): max_api = kwargs.pop('max_api', None) min_api = kwargs.pop('min_api', None) if resource_type and (max_api or min_api): - from azure.cli.core.profiles import supported_api_version return supported_api_version(resource_type, min_api=min_api, max_api=max_api) return True @@ -286,7 +285,6 @@ register_cli_argument('storage', 'if_match', arg_group='Pre-condition') register_cli_argument('storage', 'if_none_match', arg_group='Pre-condition') register_cli_argument('storage', 'container_name', container_name_type) - for item in ['check-name', 'delete', 'list', 'show', 'show-usage', 'update', 'keys']: register_cli_argument('storage account {}'.format(item), 'account_name', account_name_type, options_list=('--name', '-n')) @@ -300,21 +298,35 @@ for item in ['blob', 'file', 'queue', 'table']: def register_common_storage_account_options(context): context.reg_arg('https_only', help='Allows https traffic only to storage service.', **three_state_flag()) context.reg_arg('sku', help='The storage account SKU.', **model_choice_list(ResourceType.MGMT_STORAGE, 'SkuName')) - context.reg_arg('assign_identity', help='Generate and assign a new Storage Account Identity for this storage ' - 'account for use with key management services like Azure KeyVault.', - action='store_true', resource_type=ResourceType.MGMT_STORAGE, min_api='2017-06-01') context.reg_arg('access_tier', help='The access tier used for billing StandardBlob accounts. Cannot be set for ' 'StandardLRS, StandardGRS, StandardRAGRS, or PremiumLRS account types. It is ' 'required for StandardBlob accounts during creation', **model_choice_list(ResourceType.MGMT_STORAGE, 'AccessTier')) - encryption_services_model = get_sdk(ResourceType.MGMT_STORAGE, 'models#EncryptionServices') - if encryption_services_model: - encryption_choices = list(encryption_services_model._attribute_map.keys()) # pylint: disable=protected-access - context.reg_arg('encryption', nargs='+', help='Specifies which service(s) to encrypt.', - validator=validate_encryption, - resource_type=ResourceType.MGMT_STORAGE, min_api='2016-12-01', - **enum_choice_list(encryption_choices)) + # after API 2016-12-01 + if supported_api_version(resource_type=ResourceType.MGMT_STORAGE, min_api='2016-12-01'): + encryption_services_model = get_sdk(ResourceType.MGMT_STORAGE, 'models#EncryptionServices') + if encryption_services_model: + + encryption_choices = [] + for attribute in encryption_services_model._attribute_map.keys(): # pylint: disable=protected-access + if not encryption_services_model._validation.get(attribute, {}).get('readonly'): # pylint: disable=protected-access + # skip readonly attributes, which are not for input + encryption_choices.append(attribute) + + context.reg_arg('encryption_services', nargs='+', help='Specifies which service(s) to encrypt.', + validator=validate_encryption_services, **enum_choice_list(encryption_choices)) + + # after API 2017-06-01 + if supported_api_version(resource_type=ResourceType.MGMT_STORAGE, min_api='2017-06-01'): + context.reg_arg('assign_identity', action='store_true', + help='Generate and assign a new Storage Account Identity for this storage account for use with ' + 'key management services like Azure KeyVault.') + + # the options of encryption key sources are hardcoded since there isn't a enum represents them in the SDK. + context.reg_arg('encryption_key_source', help='The encryption keySource (provider). Default: Microsoft.Storage', + validator=validate_encryption_source, + **enum_choice_list(['Microsoft.Storage', 'Microsoft.Keyvault'])) with CommandContext('storage account create') as c: @@ -338,6 +350,15 @@ with CommandContext('storage account update') as c: **enum_choice_list(['true', 'false'])) c.reg_arg('tags', tags_type, default=None) + # after API 2017-06-01 + if supported_api_version(resource_type=ResourceType.MGMT_STORAGE, min_api='2017-06-01'): + c.reg_arg('encryption_key_vault_properties', ignore_type) + + with c.arg_group('Customer managed key') as g: + g.reg_extra_arg('encryption_key_name', help='The name of the KeyVault key.') + g.reg_extra_arg('encryption_key_vault', help='The Uri of the KeyVault') + g.reg_extra_arg('encryption_key_version', help='The version of the KeyVault key') + register_cli_argument('storage account keys renew', 'key_name', options_list=('--key',), help='The key to regenerate.', validator=validate_key, **enum_choice_list(list(storage_account_key_options.keys()))) register_cli_argument('storage account keys renew', 'account_name', account_name_type, id_part=None) diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_validators.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_validators.py index ffaddd11d..eb8363060 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_validators.py +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_validators.py @@ -371,17 +371,43 @@ def validate_custom_domain(namespace): raise ValueError('usage error: --custom-domain DOMAIN [--use-subdomain]') -def validate_encryption(namespace): - ''' Builds up the encryption object for storage account operations based on the - list of services passed in. ''' - if namespace.encryption: - Encryption, EncryptionServices, EncryptionService = get_sdk(ResourceType.MGMT_STORAGE, - 'Encryption', - 'EncryptionServices', - 'EncryptionService', - mod='models') - services = {service: EncryptionService(True) for service in namespace.encryption} - namespace.encryption = Encryption(EncryptionServices(**services)) +def validate_encryption_services(namespace): + """ + Builds up the encryption services object for storage account operations based on the list of services passed in. + """ + if namespace.encryption_services: + EncryptionServices, EncryptionService = get_sdk( + ResourceType.MGMT_STORAGE, 'EncryptionServices', 'EncryptionService', mod='models') + services = {service: EncryptionService(True) for service in namespace.encryption_services} + + namespace.encryption_services = EncryptionServices(**services) + + +def validate_encryption_source(namespace): + ns = vars(namespace) + if namespace.encryption_key_source: + allowed_options = ['Microsoft.Storage', 'Microsoft.Keyvault'] + if namespace.encryption_key_source not in allowed_options: + raise ValueError('--encryption-key-source allows to values: {}'.format(', '.join(allowed_options))) + + key_name = ns.pop('encryption_key_name', None) + key_version = ns.pop('encryption_key_version', None) + key_vault_uri = ns.pop('encryption_key_vault', None) + + if namespace.encryption_key_source == 'Microsoft.Keyvault' and not (key_name and key_version and key_vault_uri): + raise ValueError('--encryption-key-name, --encryption-key-vault, and --encryption-key-version are required ' + 'when --encryption-key-source=Microsoft.Keyvault is specified.') + + if key_name or key_version or key_vault_uri: + if namespace.encryption_key_source != 'Microsoft.Keyvault': + raise ValueError('--encryption-key-name, --encryption-key-vault, and --encryption-key-version are not ' + 'applicable when --encryption-key-source=Microsoft.Keyvault is not specified.') + KeyVaultProperties = get_sdk(ResourceType.MGMT_STORAGE, 'KeyVaultProperties', mod='models') + if not KeyVaultProperties: + return + + kv_prop = KeyVaultProperties(key_name, key_version, key_vault_uri) + namespace.encryption_key_vault_properties = kv_prop def validate_entity(namespace): diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py index 8ce90a73a..273fabe5c 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py @@ -40,8 +40,8 @@ def _update_progress(current, total): # CUSTOM METHODS def create_storage_account(resource_group_name, account_name, sku, assign_identity=False, location=None, kind=None, - tags=None, custom_domain=None, encryption=None, access_tier=None, https_only=None): - StorageAccountCreateParameters, Kind, Sku, CustomDomain, AccessTier, Identity = get_sdk( + encryption_services=None, tags=None, custom_domain=None, access_tier=None, https_only=None): + StorageAccountCreateParameters, Kind, Sku, CustomDomain, AccessTier, Identity, Encryption = get_sdk( ResourceType.MGMT_STORAGE, 'StorageAccountCreateParameters', 'Kind', @@ -49,13 +49,14 @@ def create_storage_account(resource_group_name, account_name, sku, assign_identi 'CustomDomain', 'AccessTier', 'Identity', + 'Encryption', mod='models') scf = storage_client_factory() params = StorageAccountCreateParameters(sku=Sku(sku), kind=Kind(kind), location=location, tags=tags) if custom_domain: params.custom_domain = CustomDomain(custom_domain, None) - if encryption: - params.encryption = encryption + if encryption_services: + params.encryption = Encryption(services=encryption_services) if access_tier: params.access_tier = AccessTier(access_tier) if assign_identity: @@ -77,15 +78,17 @@ def create_storage_account_with_account_type(resource_group_name, account_name, return scf.storage_accounts.create(resource_group_name, account_name, params) -def update_storage_account(instance, sku=None, tags=None, custom_domain=None, use_subdomain=None, encryption=None, +def update_storage_account(instance, sku=None, tags=None, custom_domain=None, use_subdomain=None, + encryption_services=None, encryption_key_source=None, encryption_key_vault_properties=None, access_tier=None, https_only=None, assign_identity=False): - StorageAccountUpdateParameters, Sku, CustomDomain, AccessTier, Identity = get_sdk( + StorageAccountUpdateParameters, Sku, CustomDomain, AccessTier, Identity, Encryption = get_sdk( ResourceType.MGMT_STORAGE, 'StorageAccountUpdateParameters', 'Sku', 'CustomDomain', 'AccessTier', 'Identity', + 'Encryption', mod='models') domain = instance.custom_domain if custom_domain is not None: @@ -93,11 +96,19 @@ def update_storage_account(instance, sku=None, tags=None, custom_domain=None, us if use_subdomain is not None: domain.name = use_subdomain == 'true' + encryption = instance.encryption or Encryption() + if encryption_services: + encryption.services = encryption_services + if encryption_key_source: + encryption.key_source = encryption_key_source + if encryption_key_vault_properties: + encryption.key_vault_properties = encryption_key_vault_properties + params = StorageAccountUpdateParameters( sku=Sku(sku) if sku is not None else instance.sku, tags=tags if tags is not None else instance.tags, custom_domain=domain, - encryption=encryption if encryption is not None else instance.encryption, + encryption=encryption, access_tier=AccessTier(access_tier) if access_tier is not None else instance.access_tier, enable_https_traffic_only=https_only if https_only is not None else instance.enable_https_traffic_only )
az storage account update encryption - syntax mismatch? ### Description `az storage account update \ --name ${storageacct} --resource-group ${res_group} \ --encryption queue table blob file` based on this in usage: `[--encryption {queue,table,blob,file} [{queue,table,blob,file} ...]]` results in `az storage account update: error: __init__() got an unexpected keyword argument 'queue'` issueing them one at a time appears to work. --- ### Environment summary **Install Method:** nightly **CLI Version:** azure-cli (2.0.12+1.dev20170808) **OS Version:** Ubuntu 16.04 x64 **Shell Type:** bash
Azure/azure-cli
diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage_validators.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage_validators.py index cfd57ca27..92da19ef3 100644 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage_validators.py +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage_validators.py @@ -6,14 +6,14 @@ import unittest from argparse import Namespace from six import StringIO -from azure.cli.command_modules.storage._validators import ( - get_permission_validator, get_datetime_type, datetime, ipv4_range_type, resource_type_type, services_type, - process_blob_source_uri, get_char_options_validator) + +from azure.cli.command_modules.storage._validators import (get_permission_validator, get_datetime_type, datetime, + ipv4_range_type, resource_type_type, services_type, + process_blob_source_uri, get_char_options_validator) from azure.cli.core.profiles import get_sdk, ResourceType from azure.cli.testsdk import api_version_constraint -@api_version_constraint(ResourceType.MGMT_STORAGE, min_api='2016-12-01') class TestStorageValidators(unittest.TestCase): def setUp(self): self.io = StringIO() @@ -116,5 +116,59 @@ class TestStorageValidators(unittest.TestCase): self.assertEqual(result, set('ab')) +@api_version_constraint(resource_type=ResourceType.MGMT_STORAGE, min_api='2016-12-01') +class TestEncryptionValidators(unittest.TestCase): + def test_validate_encryption_services(self): + from azure.cli.command_modules.storage._validators import validate_encryption_services + + ns = Namespace(encryption_services=['blob']) + validate_encryption_services(ns) + self.assertIsNotNone(ns.encryption_services.blob) + self.assertTrue(ns.encryption_services.blob.enabled) + self.assertIsNone(ns.encryption_services.file) + + ns = Namespace(encryption_services=['file']) + validate_encryption_services(ns) + self.assertIsNotNone(ns.encryption_services.file) + self.assertTrue(ns.encryption_services.file.enabled) + self.assertIsNone(ns.encryption_services.blob) + + ns = Namespace(encryption_services=['blob', 'file']) + validate_encryption_services(ns) + self.assertIsNotNone(ns.encryption_services.blob) + self.assertTrue(ns.encryption_services.blob.enabled) + self.assertIsNotNone(ns.encryption_services.file) + self.assertTrue(ns.encryption_services.file.enabled) + + def test_validate_encryption_source(self): + from azure.cli.command_modules.storage._validators import validate_encryption_source + + with self.assertRaises(ValueError): + validate_encryption_source(Namespace(encryption_key_source='Notanoption')) + + with self.assertRaises(ValueError): + validate_encryption_source(Namespace(encryption_key_source='Microsoft.Keyvault')) + + with self.assertRaises(ValueError): + validate_encryption_source(Namespace(encryption_key_source='Microsoft.Storage', + encryption_key_name='key_name', + encryption_key_version='key_version', + encryption_key_vault='https://example.com/key_uri')) + + ns = Namespace(encryption_key_source='Microsoft.Keyvault', + encryption_key_name='key_name', + encryption_key_version='key_version', + encryption_key_vault='https://example.com/key_uri') + validate_encryption_source(ns) + self.assertFalse(hasattr(ns, 'encryption_key_name')) + self.assertFalse(hasattr(ns, 'encryption_key_version')) + self.assertFalse(hasattr(ns, 'encryption_key_uri')) + + properties = ns.encryption_key_vault_properties + self.assertEqual(properties.key_name, 'key_name') + self.assertEqual(properties.key_version, 'key_version') + self.assertEqual(properties.key_vault_uri, 'https://example.com/key_uri') + + if __name__ == '__main__': unittest.main()
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 3, "issue_text_score": 0, "test_score": 3 }, "num_modified_files": 4 }
2.0
{ "env_vars": null, "env_yml_path": null, "install": "python scripts/dev_setup.py", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libssl-dev libffi-dev" ], "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.3 applicationinsights==0.10.0 argcomplete==1.8.0 astroid==2.11.7 attrs==22.2.0 autopep8==2.0.4 azure-batch==3.1.0 -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli&subdirectory=src/azure-cli -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_billing&subdirectory=src/command_modules/azure-cli-billing -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_cdn&subdirectory=src/command_modules/azure-cli-cdn -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_cognitiveservices&subdirectory=src/command_modules/azure-cli-cognitiveservices -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_consumption&subdirectory=src/command_modules/azure-cli-consumption -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_core&subdirectory=src/azure-cli-core -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_cosmosdb&subdirectory=src/command_modules/azure-cli-cosmosdb -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_eventgrid&subdirectory=src/command_modules/azure-cli-eventgrid -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_interactive&subdirectory=src/command_modules/azure-cli-interactive -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_rdbms&subdirectory=src/command_modules/azure-cli-rdbms -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_sf&subdirectory=src/command_modules/azure-cli-sf -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_utility_automation&subdirectory=scripts -e git+https://github.com/Azure/azure-cli.git@966cbaa94a8eba13f89a220fb1fe73bed3e2244b#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm azure-common==1.1.28 azure-core==1.24.2 azure-datalake-store==0.0.15 azure-devtools==0.4.3 azure-graphrbac==0.30.0rc6 azure-keyvault==0.3.4 azure-mgmt-authorization==0.30.0rc6 azure-mgmt-batch==4.1.0 azure-mgmt-billing==0.1.0 azure-mgmt-cdn==0.30.2 azure-mgmt-cognitiveservices==1.0.0 azure-mgmt-compute==2.0.0 azure-mgmt-consumption==0.1.0 azure-mgmt-containerinstance==9.2.0 azure-mgmt-containerregistry==0.3.1 azure-mgmt-containerservice==1.0.0 azure-mgmt-core==1.3.2 azure-mgmt-datalake-analytics==0.1.6 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.1.6 azure-mgmt-devtestlabs==2.0.0 azure-mgmt-dns==1.0.1 azure-mgmt-documentdb==0.1.3 azure-mgmt-iothub==0.2.2 azure-mgmt-keyvault==0.40.0 azure-mgmt-monitor==0.2.1 azure-mgmt-network==1.3.0 azure-mgmt-nspkg==1.0.0 azure-mgmt-rdbms==0.1.0 azure-mgmt-redis==1.0.0 azure-mgmt-resource==1.1.0 azure-mgmt-sql==0.6.0 azure-mgmt-storage==1.2.0 azure-mgmt-trafficmanager==0.30.0 azure-mgmt-web==0.32.0 azure-monitor==0.3.0 azure-multiapi-storage==0.1.2 azure-nspkg==1.0.0 azure-servicefabric==5.6.130 bleach==4.1.0 certifi==2021.5.30 cffi==1.15.1 colorama==0.3.7 ConfigArgParse==1.7 coverage==6.2 cryptography==40.0.2 docutils==0.18.1 flake8==5.0.4 futures==3.1.1 humanfriendly==2.4 idna==3.10 importlib-metadata==4.2.0 iniconfig==1.1.1 isodate==0.7.0 isort==5.10.1 jeepney==0.7.1 jmespath==0.10.0 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.7.0 mock==5.2.0 msrest==0.7.1 msrestazure==0.4.34 nose==1.3.7 oauthlib==3.2.2 packaging==21.3 paramiko==2.0.2 pbr==6.1.1 pluggy==1.0.0 prompt-toolkit==3.0.36 py==1.11.0 pyasn1==0.5.1 pycodestyle==2.10.0 pycparser==2.21 pydocumentdb==2.3.5 pyflakes==2.5.0 Pygments==2.14.0 PyJWT==2.4.0 pylint==1.7.1 pyOpenSSL==16.2.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 pytz==2025.2 PyYAML==3.11 readme-renderer==34.0 requests==2.9.1 requests-oauthlib==2.0.0 scp==0.15.0 SecretStorage==3.3.3 six==1.10.0 sshtunnel==0.4.0 tabulate==0.7.7 tomli==1.2.3 typed-ast==1.5.5 typing-extensions==4.1.1 urllib3==1.26.20 urllib3-secure-extra==0.1.0 vcrpy==1.10.3 vsts-cd-manager==0.118.0 wcwidth==0.2.13 webencodings==0.5.1 Whoosh==2.7.4 wrapt==1.16.0 xmltodict==0.14.2 zipp==3.6.0
name: azure-cli channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.3 - applicationinsights==0.10.0 - argcomplete==1.8.0 - astroid==2.11.7 - attrs==22.2.0 - autopep8==2.0.4 - azure-batch==3.1.0 - azure-common==1.1.28 - azure-core==1.24.2 - azure-datalake-store==0.0.15 - azure-devtools==0.4.3 - azure-graphrbac==0.30.0rc6 - azure-keyvault==0.3.4 - azure-mgmt-authorization==0.30.0rc6 - azure-mgmt-batch==4.1.0 - azure-mgmt-billing==0.1.0 - azure-mgmt-cdn==0.30.2 - azure-mgmt-cognitiveservices==1.0.0 - azure-mgmt-compute==2.0.0 - azure-mgmt-consumption==0.1.0 - azure-mgmt-containerinstance==9.2.0 - azure-mgmt-containerregistry==0.3.1 - azure-mgmt-containerservice==1.0.0 - azure-mgmt-core==1.3.2 - azure-mgmt-datalake-analytics==0.1.6 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.1.6 - azure-mgmt-devtestlabs==2.0.0 - azure-mgmt-dns==1.0.1 - azure-mgmt-documentdb==0.1.3 - azure-mgmt-iothub==0.2.2 - azure-mgmt-keyvault==0.40.0 - azure-mgmt-monitor==0.2.1 - azure-mgmt-network==1.3.0 - azure-mgmt-nspkg==1.0.0 - azure-mgmt-rdbms==0.1.0 - azure-mgmt-redis==1.0.0 - azure-mgmt-resource==1.1.0 - azure-mgmt-sql==0.6.0 - azure-mgmt-storage==1.2.0 - azure-mgmt-trafficmanager==0.30.0 - azure-mgmt-web==0.32.0 - azure-monitor==0.3.0 - azure-multiapi-storage==0.1.2 - azure-nspkg==1.0.0 - azure-servicefabric==5.6.130 - bleach==4.1.0 - cffi==1.15.1 - colorama==0.3.7 - configargparse==1.7 - coverage==6.2 - cryptography==40.0.2 - docutils==0.18.1 - flake8==5.0.4 - futures==3.1.1 - humanfriendly==2.4 - idna==3.10 - importlib-metadata==4.2.0 - iniconfig==1.1.1 - isodate==0.7.0 - isort==5.10.1 - jeepney==0.7.1 - jmespath==0.10.0 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.7.0 - mock==5.2.0 - msrest==0.7.1 - msrestazure==0.4.34 - nose==1.3.7 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.0.2 - pbr==6.1.1 - pip==9.0.1 - pluggy==1.0.0 - prompt-toolkit==3.0.36 - py==1.11.0 - pyasn1==0.5.1 - pycodestyle==2.10.0 - pycparser==2.21 - pydocumentdb==2.3.5 - pyflakes==2.5.0 - pygments==2.14.0 - pyjwt==2.4.0 - pylint==1.7.1 - pyopenssl==16.2.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pytz==2025.2 - pyyaml==3.11 - readme-renderer==34.0 - requests==2.9.1 - requests-oauthlib==2.0.0 - scp==0.15.0 - secretstorage==3.3.3 - setuptools==30.4.0 - six==1.10.0 - sshtunnel==0.4.0 - tabulate==0.7.7 - tomli==1.2.3 - typed-ast==1.5.5 - typing-extensions==4.1.1 - urllib3==1.26.20 - urllib3-secure-extra==0.1.0 - vcrpy==1.10.3 - vsts-cd-manager==0.118.0 - wcwidth==0.2.13 - webencodings==0.5.1 - whoosh==2.7.4 - wrapt==1.16.0 - xmltodict==0.14.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-cli
[ "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage_validators.py::TestEncryptionValidators::test_validate_encryption_services", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage_validators.py::TestEncryptionValidators::test_validate_encryption_source" ]
[]
[ "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage_validators.py::TestStorageValidators::test_datetime_string_type", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage_validators.py::TestStorageValidators::test_datetime_type", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage_validators.py::TestStorageValidators::test_ipv4_range_type", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage_validators.py::TestStorageValidators::test_permission_validator", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage_validators.py::TestStorageValidators::test_resource_types_type", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage_validators.py::TestStorageValidators::test_services_type", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage_validators.py::TestStorageValidators::test_storage_get_char_options_validator", "src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/test_storage_validators.py::TestStorageValidators::test_storage_process_blob_source_uri_redundent_parameter" ]
[]
MIT License
null
Azure__azure-data-lake-store-python-76
46645c61e903d76585c410baadb1f49885fdbb2e
2016-09-21 18:16:23
46645c61e903d76585c410baadb1f49885fdbb2e
jbcrail: All benchmarks completed without errors: ``` [bench_upload_1_100gb] starting... [bench_upload_1_100gb] finished in 612.4005s [bench_download_1_100gb] starting... [bench_download_1_100gb] finished in 1234.5771s [bench_upload_100_1gb] starting... [bench_upload_100_1gb] finished in 762.1828s [bench_download_100_1gb] starting... [bench_download_100_1gb] finished in 1207.7382s ``` jbcrail: Updated benchmark results: ``` [bench_upload_1_50gb] starting... local file : D:\ingress\50gbfile.txt local file size : 52425000000 remote file : joseph/50gbfile.txt remote file size: 52425000000 [bench_upload_1_50gb] finished in 263.0346s [bench_download_1_50gb] starting... local file : D:\ingress\50gbfile.txt.out local file size : 52425000000 remote file : joseph/50gbfile.txt remote file size: 52425000000 [bench_download_1_50gb] finished in 397.7892s >>> md5sum('D:\\ingress\\50gbfile.txt') '60f5fba5f5eb30ab75f84214e184acae' >>> md5sum('D:\\ingress\\50gbfile.txt.out') '6c37bf52d23560df955d36b6d32b822a' ``` jbcrail: Updated benchmark results: ``` md5sum('D:\ingress\50gbfile.txt') = 60f5fba5f5eb30ab75f84214e184acae [bench_upload_1_50gb] starting... local file : D:\ingress\50gbfile.txt local file size : 52425000000 remote file : joseph/50gbfile.txt remote file size: 52425000000 [bench_upload_1_50gb] finished in 281.7676s [bench_download_1_50gb] starting... local file : D:\ingress\50gbfile.txt.out local file size : 52425000000 remote file : joseph/50gbfile.txt remote file size: 52425000000 [bench_download_1_50gb] finished in 466.3828s md5sum('D:\ingress\50gbfile.txt.out') = 60f5fba5f5eb30ab75f84214e184acae ``` begoldsm: Thank you for the updated benchmark test @jbcrail!
diff --git a/adlfs/cli.py b/adlfs/cli.py index 0c6c2ca..f8d2a1f 100644 --- a/adlfs/cli.py +++ b/adlfs/cli.py @@ -179,7 +179,7 @@ class AzureDataLakeFSCommand(cmd.Cmd, object): parser = argparse.ArgumentParser(prog="get", add_help=False) parser.add_argument('remote_path', type=str) parser.add_argument('local_path', type=str, nargs='?', default='.') - parser.add_argument('-b', '--chunksize', type=int, default=2**22) + parser.add_argument('-b', '--chunksize', type=int, default=2**28) parser.add_argument('-c', '--threads', type=int, default=None) args = parser.parse_args(line.split()) @@ -303,7 +303,7 @@ class AzureDataLakeFSCommand(cmd.Cmd, object): parser = argparse.ArgumentParser(prog="put", add_help=False) parser.add_argument('local_path', type=str) parser.add_argument('remote_path', type=str, nargs='?', default='.') - parser.add_argument('-b', '--chunksize', type=int, default=2**22) + parser.add_argument('-b', '--chunksize', type=int, default=2**28) parser.add_argument('-c', '--threads', type=int, default=None) args = parser.parse_args(line.split()) diff --git a/adlfs/core.py b/adlfs/core.py index b36944c..a803176 100644 --- a/adlfs/core.py +++ b/adlfs/core.py @@ -24,7 +24,7 @@ import time # local imports from .lib import DatalakeRESTInterface, auth, refresh_token -from .utils import FileNotFoundError, PY2, ensure_writable, read_block +from .utils import FileNotFoundError, PermissionError, PY2, ensure_writable, read_block if sys.version_info >= (3, 4): import pathlib @@ -619,10 +619,12 @@ class AzureDLFile(object): if self.mode in {'wb', 'ab'} and not self.closed: if self.buffer.tell() == 0: if force and self.first_write: - self.azure.azure.call('CREATE', - path=self.path.as_posix(), - overwrite='true', - write='true') + _put_data(self.azure.azure, + 'CREATE', + path=self.path.as_posix(), + data=None, + overwrite='true', + write='true') self.first_write = False return self.buffer.seek(0) @@ -636,37 +638,44 @@ class AzureDLFile(object): else: limit = place + len(self.delimiter) if self.first_write: - out = self.azure.azure.call('CREATE', - path=self.path.as_posix(), - data=data[:limit], - overwrite='true', - write='true') + out = _put_data(self.azure.azure, + 'CREATE', + path=self.path.as_posix(), + data=data[:limit], + overwrite='true', + write='true') self.first_write = False else: - out = self.azure.azure.call('APPEND', - path=self.path.as_posix(), - data=data[:limit], - append='true') + out = _put_data(self.azure.azure, + 'APPEND', + path=self.path.as_posix(), + data=data[:limit], + append='true') logger.debug('Wrote %d bytes to %s' % (limit, self)) data = data[limit:] self.buffer = io.BytesIO(data) self.buffer.seek(0, 2) if not self.delimiter or force: + zero_offset = self.tell() - len(data) offsets = range(0, len(data), self.blocksize) for o in offsets: + offset = zero_offset + o d2 = data[o:o+self.blocksize] if self.first_write: - out = self.azure.azure.call('CREATE', - path=self.path.as_posix(), - data=d2, - overwrite='true', - write='true') + out = _put_data(self.azure.azure, + 'CREATE', + path=self.path.as_posix(), + data=d2, + overwrite='true', + write='true') self.first_write = False else: - out = self.azure.azure.call('APPEND', - path=self.path.as_posix(), - data=d2, - append='true') + out = _put_data(self.azure.azure, + 'APPEND', + path=self.path.as_posix(), + data=d2, + offset=offset, + append='true') logger.debug('Wrote %d bytes to %s' % (len(d2), self)) self.buffer = io.BytesIO() return out @@ -725,6 +734,20 @@ def _fetch_range(rest, path, start, end, max_attempts=10): raise RuntimeError("Max number of ADL retries exceeded") +def _put_data(rest, op, path, data, max_attempts=10, **kwargs): + logger.debug("Put: %s %s, %s", op, path, kwargs) + for i in range(max_attempts): + try: + resp = rest.call(op, path=path, data=data, **kwargs) + return resp + except (PermissionError, FileNotFoundError): + raise + except Exception as e: + logger.debug('Exception %s on ADL upload, retrying', e, + exc_info=True) + raise RuntimeError("Max number of ADL retries exceeded") + + class AzureDLPath(type(pathlib.PurePath())): """ Subclass of native object-oriented filesystem path. diff --git a/adlfs/lib.py b/adlfs/lib.py index fac6e4f..862a42f 100644 --- a/adlfs/lib.py +++ b/adlfs/lib.py @@ -25,6 +25,8 @@ import time import adal import azure +from .utils import FileNotFoundError, PermissionError + client_id = "1950a258-227b-4e31-a9cf-717495945fc2" logger = logging.getLogger(__name__) @@ -181,7 +183,7 @@ class DatalakeRESTInterface: ends = { # OP: (HTTP method, required fields, allowed fields) - 'APPEND': ('post', set(), {'append'}), + 'APPEND': ('post', set(), {'append', 'offset'}), 'CHECKACCESS': ('get', set(), {'fsaction'}), 'CONCAT': ('post', {'sources'}, {'sources'}), 'MSCONCAT': ('post', set(), {'deleteSourceDirectory'}), @@ -246,7 +248,11 @@ class DatalakeRESTInterface: r = func(url, params=params, headers=self.head, data=data) except requests.exceptions.RequestException as e: raise DatalakeRESTException('HTTP error: %s', str(e)) - if r.status_code >= 400: + if r.status_code == 403: + raise PermissionError(path) + elif r.status_code == 404: + raise FileNotFoundError(path) + elif r.status_code >= 400: raise DatalakeRESTException("Data-lake REST exception: %s, %s, %s" % (op, r.status_code, r.content.decode())) if r.content: diff --git a/adlfs/multithread.py b/adlfs/multithread.py index aceb05e..7f6997a 100644 --- a/adlfs/multithread.py +++ b/adlfs/multithread.py @@ -135,7 +135,7 @@ class ADLDownloader(object): with open(dst, 'wb'): pass - self.client.run(nthreads, monitor, before_scatter=touch) + self.client.run(nthreads, monitor, before_start=touch) @staticmethod def load(): @@ -160,6 +160,7 @@ def get_chunk(adlfs, src, dst, offset, size, blocksize, retries=MAXRETRIES, Internal function used by `download`. """ + nbytes = 0 with adlfs.open(src, 'rb') as fin: end = offset + size miniblock = min(size, blocksize) @@ -168,21 +169,23 @@ def get_chunk(adlfs, src, dst, offset, size, blocksize, retries=MAXRETRIES, fin.seek(offset) for o in range(offset, end, miniblock): if shutdown_event and shutdown_event.is_set(): - return + return nbytes, None tries = 0 while True: try: - fout.write(fin.read(miniblock)) + data = fin.read(miniblock) + nbytes += fout.write(data) break except Exception as e: # TODO : only some exceptions should be retriable logger.debug('Download failed %s, byte offset %s; %s, %s', dst, - o, e, e.args) + o, e, e.args) tries += 1 if tries >= retries: logger.debug('Aborting %s, byte offset %s', dst, o) - raise + return nbytes, str(e) logger.debug('Downloaded to %s, byte offset %s', dst, offset) + return nbytes, None class ADLUploader(object): @@ -306,17 +309,19 @@ def put_chunk(adlfs, src, dst, offset, size, blocksize, retries=MAXRETRIES, Internal function used by `upload`. """ + nbytes = 0 with adlfs.open(dst, 'wb', delimiter=delimiter) as fout: end = offset + size miniblock = min(size, blocksize) with open(src, 'rb') as fin: for o in range(offset, end, miniblock): if shutdown_event and shutdown_event.is_set(): - return False + return nbytes, None tries = 0 while True: try: - fout.write(read_block(fin, o, miniblock, delimiter)) + data = read_block(fin, o, miniblock, delimiter) + nbytes += fout.write(data) break except Exception as e: # TODO : only some exceptions should be retriable @@ -325,9 +330,9 @@ def put_chunk(adlfs, src, dst, offset, size, blocksize, retries=MAXRETRIES, tries += 1 if tries >= retries: logger.debug('Aborting %s, byte offset %s', src, o) - raise + return nbytes, str(e) logger.debug('Uploaded from %s, byte offset %s', src, offset) - return True + return nbytes, None def merge_chunks(adlfs, outfile, files, shutdown_event=None): diff --git a/adlfs/transfer.py b/adlfs/transfer.py index b1c938a..07f1aeb 100644 --- a/adlfs/transfer.py +++ b/adlfs/transfer.py @@ -102,8 +102,8 @@ class StateManager(object): # Named tuples used to serialize client progress -File = namedtuple('File', 'src dst state nbytes start stop chunks') -Chunk = namedtuple('Chunk', 'name state offset retries') +File = namedtuple('File', 'src dst state length start stop chunks') +Chunk = namedtuple('Chunk', 'name state offset retries expected actual exception') class ADLTransferClient(object): @@ -157,8 +157,7 @@ class ADLTransferClient(object): When a merge step is available, the client will write chunks to temporary files before merging. The exact temporary file is dependent upon on two parameters (`tmp_path`, `tmp_unique`). Given those values, the full - temporary file can be accessed via the `temporary_path` property and looks - like this in pseudo-BNF: + temporary file looks like this in pseudo-BNF: >>> # /{tmp_path}[/{unique_str}]/{basename}_{offset} @@ -175,7 +174,8 @@ class ADLTransferClient(object): and destination of the respective file transfer. `offset` is the location in `src` to read `size` bytes from. `blocksize` is the number of bytes in a chunk to write at one time. `retries` is the number of time an Azure query - will be tried. + will be tried. The callable should return an integer representing the + number of bytes written. The `merge` callable has the function signature, `fn(adlfs, outfile, files, delete_source, shutdown_event)`. `adlfs` is @@ -187,13 +187,37 @@ class ADLTransferClient(object): The event will be set when a shutdown is requested. It is good practice to listen for this. + Internal State + -------------- + + self._fstates: StateManager + This captures the current state of each transferred file. + self._files: dict + Using a tuple of the file source/destination as the key, this + dictionary stores the file metadata and all chunk states. The + dictionary key is `(src, dst)` and the value is + `dict(length, start, stop, cstates)`. + self._chunks: dict + Using a tuple of the chunk name/offset as the key, this dictionary + stores the chunk metadata and has a reference to the chunk's parent + file. The dictionary key is `(name, offset)` and the value is + `dict(parent=(src, dst), retries, expected, actual, exception)`. + self._ffutures: dict + Using a Future object as the key, this dictionary provides a reverse + lookup for the file associated with the given future. The returned + value is the file's primary key, `(src, dst)`. + self._cfutures: dict + Using a Future object as the key, this dictionary provides a reverse + lookup for the chunk associated with the given future. The returned + value is the chunk's primary key, `(name, offset)`. + See Also -------- adlfs.multithread.ADLDownloader adlfs.multithread.ADLUploader """ - DEFAULT_TMP_PATH = os.path.join(os.path.sep, 'tmp') + DEFAULT_TMP_PATH = 'tmp' def __init__(self, adlfs, name, transfer, merge=None, nthreads=None, chunksize=2**28, blocksize=2**25, tmp_path=DEFAULT_TMP_PATH, @@ -211,54 +235,74 @@ class ADLTransferClient(object): self._persist_path = persist_path self._pool = ThreadPoolExecutor(self._nthreads) self._shutdown_event = threading.Event() + + # Internal state tracking files/chunks/futures self._files = {} + self._chunks = {} + self._ffutures = {} + self._cfutures = {} self._fstates = StateManager( 'pending', 'transferring', 'merging', 'finished', 'cancelled', 'errored') - def submit(self, src, dst, nbytes): + def submit(self, src, dst, length): """ - All submitted files start in the `pending` state until `run()` is - called. + Split a given file into chunks. + + All submitted files/chunks start in the `pending` state until `run()` + is called. """ - self._fstates[(src, dst)] = 'pending' - self._files[(src, dst)] = dict( - nbytes=nbytes, - start=None, - stop=None, - chunks={}, - cstates=StateManager('running', 'finished', 'cancelled', 'errored'), - merge=None) + cstates = StateManager( + 'pending', 'running', 'finished', 'cancelled', 'errored') - def _submit(self, fn, *args, **kwargs): - kwargs['shutdown_event'] = self._shutdown_event - return self._pool.submit(fn, *args, **kwargs) + # Create unique temporary directory for each file + if self._tmp_unique and self._tmp_path: + tmpdir = os.path.join(self._tmp_path, uuid.uuid4().hex) + else: + tmpdir = self._tmp_path - def _scatter(self, src, dst, transfer): - """ Split a given file into chunks """ - dic = self._files[(src, dst)] - self._fstates[(src, dst)] = 'transferring' - offsets = list(range(0, dic['nbytes'], self._chunksize)) + offsets = list(range(0, length, self._chunksize)) for offset in offsets: if self._tmp_path and len(offsets) > 1: name = os.path.join( - self.temporary_path, + os.path.sep, + tmpdir, dst.name + '_' + str(offset)) else: name = dst - logger.debug("Submitted %s, byte offset %d", name, offset) - dic['cstates'][name] = 'running' - dic['chunks'][name] = dict( - future=self._submit(transfer, self._adlfs, src, name, offset, - self._chunksize, self._blocksize), + cstates[(name, offset)] = 'pending' + self._chunks[(name, offset)] = dict( + parent=(src, dst), retries=self._chunkretries, - offset=offset) + expected=min(length - offset, self._chunksize), + actual=0, + exception=None) + logger.debug("Submitted %s, byte offset %d", name, offset) - @property - def temporary_path(self): - """ Return temporary path used to store chunks before merging """ - subdir = uuid.uuid1().hex[:10] if self._tmp_unique else '' - return os.path.join(self._tmp_path, subdir) + self._fstates[(src, dst)] = 'pending' + self._files[(src, dst)] = dict( + length=length, + start=None, + stop=None, + cstates=cstates) + + def _submit(self, fn, *args, **kwargs): + kwargs['shutdown_event'] = self._shutdown_event + future = self._pool.submit(fn, *args, **kwargs) + future.add_done_callback(self._update) + return future + + def _start(self, src, dst): + key = (src, dst) + self._fstates[key] = 'transferring' + self._files[key]['start'] = time.time() + for obj in self._files[key]['cstates'].objects: + name, offset = obj + self._files[key]['cstates'][obj] = 'running' + future = self._submit( + self._transfer, self._adlfs, src, name, offset, + self._chunksize, self._blocksize) + self._cfutures[future] = obj @property def progress(self): @@ -267,110 +311,110 @@ class ADLTransferClient(object): for key in self._files: src, dst = key chunks = [] - for name in self._files[key]['chunks']: + for obj in self._files[key]['cstates'].objects: + name, offset = obj chunks.append(Chunk( name=name, - state=self._files[key]['cstates'][name], - offset=self._files[key]['chunks'][name]['offset'], - retries=self._files[key]['chunks'][name]['retries'])) + offset=offset, + state=self._files[key]['cstates'][obj], + retries=self._chunks[obj]['retries'], + expected=self._chunks[obj]['expected'], + actual=self._chunks[obj]['actual'], + exception=self._chunks[obj]['exception'])) files.append(File( src=src, dst=dst, state=self._fstates[key], - nbytes=self._files[key]['nbytes'], + length=self._files[key]['length'], start=self._files[key]['start'], stop=self._files[key]['stop'], chunks=chunks)) return files - def _status(self, src, dst, nbytes, start, stop): - elapsed = stop - start - rate = nbytes / elapsed / 1024 / 1024 + def _status(self, src, dst): + dic = self._files[(src, dst)] + elapsed = dic['stop'] - dic['start'] + rate = dic['length'] / elapsed / 1024 / 1024 logger.info("Transferred %s -> %s in %f seconds at %f MB/s", src, dst, elapsed, rate) - def _update(self): - for (src, dst), dic in self._files.items(): - if self._fstates[(src, dst)] == 'transferring': - for name in list(dic['chunks']): - future = dic['chunks'][name]['future'] - if not future.done(): - continue - if future.cancelled(): - dic['cstates'][name] = 'cancelled' - elif future.exception(): - dic['cstates'][name] = 'errored' - else: - dic['cstates'][name] = 'finished' - if dic['cstates'].contains_all('finished'): - logger.debug("Chunks transferred") - chunks = list(dic['chunks']) - if self._merge and len(chunks) > 1: - logger.debug("Merging file: %s", self._fstates[(src, dst)]) - self._fstates[(src, dst)] = 'merging' - dic['merge'] = self._submit(self._merge, self._adlfs, - dst, chunks) - else: - dic['stop'] = time.time() - self._fstates[(src, dst)] = 'finished' - self._status(src, dst, dic['nbytes'], dic['start'], dic['stop']) - elif dic['cstates'].contains_none('running'): - logger.debug("Transfer failed: %s", dic['cstates']) - self._fstates[(src, dst)] = 'errored' + def _update(self, future): + if future in self._cfutures: + obj = self._cfutures[future] + parent = self._chunks[obj]['parent'] + cstates = self._files[parent]['cstates'] + + if future.cancelled(): + cstates[obj] = 'cancelled' + elif future.exception(): + cstates[obj] = 'errored' + else: + nbytes, exception = future.result() + self._chunks[obj]['actual'] = nbytes + self._chunks[obj]['exception'] = exception + if exception: + cstates[obj] = 'errored' + elif self._chunks[obj]['expected'] != nbytes: + cstates[obj] = 'errored' else: - logger.debug("Transferring chunks: %s", dic['cstates']) - elif self._fstates[(src, dst)] == 'merging': - future = dic['merge'] - if not future.done(): - continue - if future.cancelled(): - self._fstates[(src, dst)] = 'cancelled' - elif future.exception(): - self._fstates[(src, dst)] = 'errored' + cstates[obj] = 'finished' + + if cstates.contains_all('finished'): + logger.debug("Chunks transferred") + src, dst = parent + if self._merge and len(cstates.objects) > 1: + logger.debug("Merging file: %s", self._fstates[parent]) + self._fstates[parent] = 'merging' + merge_future = self._submit( + self._merge, self._adlfs, dst, + [name for name, _ in sorted(cstates.objects, + key=lambda obj: obj[1])]) + self._ffutures[merge_future] = parent else: - dic['stop'] = time.time() - self._fstates[(src, dst)] = 'finished' - self._status(src, dst, dic['nbytes'], dic['start'], dic['stop']) + self._fstates[parent] = 'finished' + self._files[parent]['stop'] = time.time() + self._status(src, dst) + elif cstates.contains_none('running'): + logger.debug("Transfer failed: %s", cstates) + self._fstates[parent] = 'errored' + elif future in self._ffutures: + src, dst = self._ffutures[future] + + if future.cancelled(): + self._fstates[(src, dst)] = 'cancelled' + elif future.exception(): + self._fstates[(src, dst)] = 'errored' + else: + result = future.result() + self._fstates[(src, dst)] = 'finished' + self._files[(src, dst)]['stop'] = time.time() + self._status(src, dst) self.save() - def run(self, nthreads=None, monitor=True, before_scatter=None): + def run(self, nthreads=None, monitor=True, before_start=None): self._nthreads = nthreads or self._nthreads for src, dst in self._files: - self._files[(src, dst)]['start'] = time.time() - self._fstates[(src, dst)] = 'transferring' - if before_scatter: - before_scatter(self._adlfs, src, dst) - self._scatter(src, dst, self._transfer) + if before_start: + before_start(self._adlfs, src, dst) + self._start(src, dst) if monitor: self.monitor() - def _cancel(self): - for dic in self._files.values(): - for transfer in dic['chunks'].values(): - transfer['future'].cancel() - if dic['merge']: - dic['merge'].cancel() - def _wait(self, poll=0.1, timeout=0): start = time.time() while not self._fstates.contains_none('pending', 'transferring', 'merging'): if timeout > 0 and time.time() - start > timeout: break time.sleep(poll) - self._update() def _clear(self): - for dic in self._files.values(): - for name in dic['chunks']: - dic['chunks'][name]['future'] = None - dic['merge'] = None + self._cfutures = {} + self._ffutures = {} self._pool = None def shutdown(self): self._shutdown_event.set() - self._cancel() self._pool.shutdown(wait=True) - self._update() def monitor(self, poll=0.1, timeout=0): """ Wait for download to happen """ @@ -384,20 +428,16 @@ class ADLTransferClient(object): def __getstate__(self): dic2 = self.__dict__.copy() + dic2.pop('_cfutures', None) + dic2.pop('_ffutures', None) dic2.pop('_transfer', None) dic2.pop('_merge', None) dic2.pop('_pool', None) dic2.pop('_shutdown_event', None) + dic2['_files'] = dic2.get('_files', {}).copy() - for k, v in list(dic2['_files'].items()): - v = v.copy() - v['chunks'] = v['chunks'].copy() - for ck, cv in list(v['chunks'].items()): - cv = cv.copy() - cv['future'] = None - v['chunks'][ck] = cv - v['merge'] = None - dic2['_files'][k] = v + dic2['_chunks'] = dic2.get('_chunks', {}).copy() + return dic2 @staticmethod diff --git a/adlfs/utils.py b/adlfs/utils.py index 89b8327..a295f24 100644 --- a/adlfs/utils.py +++ b/adlfs/utils.py @@ -21,6 +21,12 @@ except NameError: class FileNotFoundError(IOError): pass +try: + PermissionError = PermissionError +except NameError: + class PermissionError(OSError): + pass + WIN = platform.platform() == 'Windows' if WIN:
PRI 0: Use the Offset parameter in append to ensure we are always appending at the offset we expect The append API allows for a query parameter called offset, which allows you to specify where you think the end of the file is to append data to. This is very useful for us, since it allows us to submit an append call where we "think" the file should currently be. If data has already been uploaded at that location, you will receive a 400 error with a BadOffsetException, which you can catch. This will indicate that data is already at that location and we can move on to the next 4mb chunk to upload. This will help preserve the uploaded file and ensure that its final length is the same as the source file. Here is a sample request/response where the offset is not the end of the file (meaning there is already data at or ahead of the offset specified): **Request:** POST https://adlspysample01.azuredatalakestore.net/webhdfs/v1/sample.txt?op=APPEND&append=true&**offset=4**&api-version=2015-10-01-preview HTTP/1.1 x-ms-client-request-id: 33401497-4ac0-451e-ab13-eccd305e3706 accept-language: en-US Authorization: User-Agent: Microsoft.Azure.Management.DataLake.Store.DataLakeStoreFileSystemManagementClient/0.12.6-preview AzurePowershell/v2.1.0.0 CommandName: Add-AzureRmDataLakeStoreItemContent ParameterSetName: __AllParameterSets Content-Type: application/octet-stream Host: adlspysample01.azuredatalakestore.net Content-Length: 4 Expect: 100-continue test **Response** HTTP/1.1 400 Bad Request Cache-Control: no-cache Pragma: no-cache Content-Length: 260 Content-Type: application/json; charset=utf-8 Expires: -1 x-ms-request-id: a8b65992-21f3-4c5d-8fe0-f0b49d0320f1 Server-Perf: [a8b65992-21f3-4c5d-8fe0-f0b49d0320f1][ AuthTime::0::PostAuthTime::0 ][S-FsOpenStream :: 00:00:010 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:000 ms]%0a[S-FsAppendStream :: 00:00:036 ms]%0a[S-FsCloseHandle :: 00:00:001 ms]%0a[APPEND :: 00:00:269 ms]%0a x-ms-webhdfs-version: 16.07.18.01 Status: 0x83090015 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=15724800; includeSubDomains Date: Thu, 15 Sep 2016 01:21:15 GMT **{"RemoteException":{"exception":"BadOffsetException","message":"FsAppendStream failed with error 0x83090015 (Bad offset). [a8b65992-21f3-4c5d-8fe0-f0b49d0320f1][2016-09-14T18:21:16.0457431-07:00]","javaClassName":"org.apache.hadoop.fs.adl.BadOffsetException"}}**
Azure/azure-data-lake-store-python
diff --git a/tests/recordings/test_core/test_append.yaml b/tests/recordings/test_core/test_append.yaml index 8dca3db..cd71edc 100644 --- a/tests/recordings/test_core/test_append.yaml +++ b/tests/recordings/test_core/test_append.yaml @@ -14,15 +14,15 @@ interactions: Cache-Control: [no-cache] Content-Length: ['34'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:02:42 GMT'] + Date: ['Thu, 22 Sep 2016 17:25:10 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[5930a2bd-5921-4aec-9001-0ba8a7d0368f][ AuthTime::0::PostAuthTime::0 - ][S-HdfsListStatus :: 00:00:006 ms]%0a[LISTSTATUS :: 00:00:006 ms]%0a'] + Server-Perf: ['[52cdd20a-6dfe-4a2d-8199-952ced0c7fa7][ AuthTime::937.845196953906::PostAuthTime::226.228959958329 + ][S-HdfsListStatus :: 00:00:007 ms]%0a[LISTSTATUS :: 00:00:008 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [5930a2bd-5921-4aec-9001-0ba8a7d0368f] + x-ms-request-id: [52cdd20a-6dfe-4a2d-8199-952ced0c7fa7] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -34,27 +34,27 @@ interactions: Content-Length: ['3'] User-Agent: [python-requests/2.11.1] method: PUT - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=CREATE&overwrite=true&write=true + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=CREATE&write=true&overwrite=true response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] ContentLength: ['0'] - Date: ['Thu, 15 Sep 2016 22:02:42 GMT'] + Date: ['Thu, 22 Sep 2016 17:25:10 GMT'] Expires: ['-1'] - Location: ['https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=CREATE&overwrite=true&write=true'] + Location: ['https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=CREATE&write=true&overwrite=true'] Pragma: [no-cache] - Server-Perf: ['[9d3585ce-4e6b-4245-ace6-b30cf3b1a9ea][ AuthTime::0::PostAuthTime::0 - ][S-HdfsGetFileStatusV2 :: 00:00:006 ms]%0a[S-HdfsCheckAccess :: 00:00:002 - ms]%0a[S-FsDelete :: 00:00:006 ms]%0a[S-FsOpenStream :: 00:00:049 ms]%0a[S-FsAppendStream - :: 00:00:171 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:171 - ms]%0a[S-FsAppendStream :: 00:00:033 ms]%0a[S-FsCloseHandle :: 00:00:001 - ms]%0a[CREATE :: 00:00:274 ms]%0a'] + Server-Perf: ['[eff4ebee-c325-4c1c-b1ee-ed76c8a75c2e][ AuthTime::948.536952313994::PostAuthTime::210.405852361806 + ][S-HdfsGetFileStatusV2 :: 00:00:006 ms]%0a[S-HdfsCheckAccess :: 00:00:003 + ms]%0a[S-FsDelete :: 00:00:006 ms]%0a[S-FsOpenStream :: 00:00:027 ms]%0a[S-FsAppendStream + :: 00:00:130 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:130 + ms]%0a[S-FsAppendStream :: 00:00:017 ms]%0a[S-FsCloseHandle :: 00:00:001 + ms]%0a[CREATE :: 00:00:208 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [9d3585ce-4e6b-4245-ace6-b30cf3b1a9ea] + x-ms-request-id: [eff4ebee-c325-4c1c-b1ee-ed76c8a75c2e] x-ms-webhdfs-version: [16.07.18.01] status: {code: 201, message: Created} - request: @@ -67,20 +67,20 @@ interactions: method: GET uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir?OP=LISTSTATUS response: - body: {string: '{"FileStatuses":{"FileStatus":[{"length":3,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1473976962773,"modificationTime":1473976962904,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} + body: {string: '{"FileStatuses":{"FileStatus":[{"length":3,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1474565111424,"modificationTime":1474565111521,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} headers: Cache-Control: [no-cache] Content-Length: ['288'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:02:42 GMT'] + Date: ['Thu, 22 Sep 2016 17:25:12 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[5b52049c-f4f0-4479-8e11-eb50537eb7b0][ AuthTime::0::PostAuthTime::0 - ][S-HdfsListStatus :: 00:00:046 ms]%0a[LISTSTATUS :: 00:00:046 ms]%0a'] + Server-Perf: ['[bc6ebbcd-e407-4f40-ad36-acfd494cf87d][ AuthTime::977.615345567353::PostAuthTime::212.971322000237 + ][S-HdfsListStatus :: 00:00:012 ms]%0a[LISTSTATUS :: 00:00:013 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [5b52049c-f4f0-4479-8e11-eb50537eb7b0] + x-ms-request-id: [bc6ebbcd-e407-4f40-ad36-acfd494cf87d] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -92,24 +92,23 @@ interactions: Content-Length: ['3'] User-Agent: [python-requests/2.11.1] method: POST - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=APPEND&append=true + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?append=true&OP=APPEND&offset=3 response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Thu, 15 Sep 2016 22:02:43 GMT'] + Date: ['Thu, 22 Sep 2016 17:25:11 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[c63a6917-9a87-405b-a5a0-b315ec85f2ae][ AuthTime::0::PostAuthTime::0 - ][S-FsOpenStream :: 00:00:010 ms]%0a[S-FsGetStreamLength :: 00:00:010 ms]%0a[S-FsAppendStream - :: 00:00:064 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:064 - ms]%0a[S-FsAppendStream :: 00:00:033 ms]%0a[S-FsCloseHandle :: 00:00:001 - ms]%0a[APPEND :: 00:00:122 ms]%0a'] + Server-Perf: ['[2f5f6b4b-7509-4883-a773-cc1333a6ee89][ AuthTime::942.122542644623::PostAuthTime::206.129398799232 + ][S-FsOpenStream :: 00:00:011 ms]%0a[S-FsAppendStream :: 00:00:072 ms]%0a[BufferingTime + :: 00:00:000 ms]%0a[WriteTime :: 00:00:072 ms]%0a[S-FsAppendStream :: 00:00:033 + ms]%0a[S-FsCloseHandle :: 00:00:001 ms]%0a[APPEND :: 00:00:119 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [c63a6917-9a87-405b-a5a0-b315ec85f2ae] + x-ms-request-id: [2f5f6b4b-7509-4883-a773-cc1333a6ee89] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -122,20 +121,20 @@ interactions: method: GET uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir?OP=LISTSTATUS response: - body: {string: '{"FileStatuses":{"FileStatus":[{"length":6,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1473976962773,"modificationTime":1473976963576,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} + body: {string: '{"FileStatuses":{"FileStatus":[{"length":6,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1474565111424,"modificationTime":1474565112724,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} headers: Cache-Control: [no-cache] Content-Length: ['288'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:02:43 GMT'] + Date: ['Thu, 22 Sep 2016 17:25:12 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[aaa54e80-7ec5-4bc1-80d8-50ccf2a87678][ AuthTime::0::PostAuthTime::0 - ][S-HdfsListStatus :: 00:00:012 ms]%0a[LISTSTATUS :: 00:00:012 ms]%0a'] + Server-Perf: ['[1e1a7931-76f2-4c24-b35a-4bcf15af8df2][ AuthTime::903.63287786758::PostAuthTime::201.425028620743 + ][S-HdfsListStatus :: 00:00:011 ms]%0a[LISTSTATUS :: 00:00:011 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [aaa54e80-7ec5-4bc1-80d8-50ccf2a87678] + x-ms-request-id: [1e1a7931-76f2-4c24-b35a-4bcf15af8df2] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -146,23 +145,23 @@ interactions: Connection: [keep-alive] User-Agent: [python-requests/2.11.1] method: GET - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=OPEN&offset=0&read=true&length=6 + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?length=6&OP=OPEN&offset=0&read=true response: body: {string: '123456'} headers: Cache-Control: [no-cache] Content-Type: [application/octet-stream] - Date: ['Thu, 15 Sep 2016 22:02:44 GMT'] + Date: ['Thu, 22 Sep 2016 17:25:13 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[d7c1f8b4-11bc-4813-b034-7c6e8b74306f][ AuthTime::0::PostAuthTime::0 - ][S-FsOpenStream :: 00:00:013 ms]%0a[S-FsReadStream :: 00:00:013 ms]%0a[OPEN - :: 00:00:027 ms]%0a'] + Server-Perf: ['[8dbd408c-30b1-4e62-8fcf-569331323d72][ AuthTime::841.62520906988::PostAuthTime::163.364242817426 + ][S-FsOpenStream :: 00:00:013 ms]%0a[S-FsReadStream :: 00:00:024 ms]%0a[OPEN + :: 00:00:037 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] Transfer-Encoding: [chunked] X-Content-Type-Options: [nosniff] - x-ms-request-id: [d7c1f8b4-11bc-4813-b034-7c6e8b74306f] + x-ms-request-id: [8dbd408c-30b1-4e62-8fcf-569331323d72] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -174,24 +173,23 @@ interactions: Content-Length: ['3'] User-Agent: [python-requests/2.11.1] method: POST - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=APPEND&append=true + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?append=true&OP=APPEND&offset=6 response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Thu, 15 Sep 2016 22:02:44 GMT'] + Date: ['Thu, 22 Sep 2016 17:25:13 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[2ca0ce0a-1e25-477d-8b75-1b677810687d][ AuthTime::0::PostAuthTime::0 - ][S-FsOpenStream :: 00:00:010 ms]%0a[S-FsGetStreamLength :: 00:00:289 ms]%0a[S-FsAppendStream - :: 00:00:085 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:085 - ms]%0a[S-FsAppendStream :: 00:00:033 ms]%0a[S-FsCloseHandle :: 00:00:001 - ms]%0a[APPEND :: 00:00:420 ms]%0a'] + Server-Perf: ['[80b029d9-208d-4038-9a74-05870958c31e][ AuthTime::920.311776997166::PostAuthTime::209.550544018872 + ][S-FsOpenStream :: 00:00:010 ms]%0a[S-FsAppendStream :: 00:00:064 ms]%0a[BufferingTime + :: 00:00:000 ms]%0a[WriteTime :: 00:00:064 ms]%0a[S-FsAppendStream :: 00:00:017 + ms]%0a[S-FsCloseHandle :: 00:00:001 ms]%0a[APPEND :: 00:00:095 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [2ca0ce0a-1e25-477d-8b75-1b677810687d] + x-ms-request-id: [80b029d9-208d-4038-9a74-05870958c31e] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -204,20 +202,20 @@ interactions: method: GET uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir?OP=LISTSTATUS response: - body: {string: '{"FileStatuses":{"FileStatus":[{"length":9,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1473976962773,"modificationTime":1473976964701,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} + body: {string: '{"FileStatuses":{"FileStatus":[{"length":9,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1474565111424,"modificationTime":1474565113506,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} headers: Cache-Control: [no-cache] Content-Length: ['288'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:02:44 GMT'] + Date: ['Thu, 22 Sep 2016 17:25:13 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[b6aed1e4-4108-4244-9853-dd9edede0711][ AuthTime::0::PostAuthTime::0 - ][S-HdfsListStatus :: 00:00:067 ms]%0a[LISTSTATUS :: 00:00:067 ms]%0a'] + Server-Perf: ['[e12c453b-93b0-490e-9714-0584cb4521b3][ AuthTime::939.985476839493::PostAuthTime::221.097584861701 + ][S-HdfsListStatus :: 00:00:012 ms]%0a[LISTSTATUS :: 00:00:013 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [b6aed1e4-4108-4244-9853-dd9edede0711] + x-ms-request-id: [e12c453b-93b0-490e-9714-0584cb4521b3] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -228,23 +226,23 @@ interactions: Connection: [keep-alive] User-Agent: [python-requests/2.11.1] method: GET - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=OPEN&offset=0&read=true&length=9 + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?length=9&OP=OPEN&offset=0&read=true response: body: {string: '123456789'} headers: Cache-Control: [no-cache] Content-Type: [application/octet-stream] - Date: ['Thu, 15 Sep 2016 22:02:44 GMT'] + Date: ['Thu, 22 Sep 2016 17:25:13 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[63bbb4da-931c-4d5e-9fb5-9f4eae28ff7b][ AuthTime::0::PostAuthTime::0 - ][S-FsOpenStream :: 00:00:015 ms]%0a[S-FsReadStream :: 00:00:018 ms]%0a[OPEN - :: 00:00:034 ms]%0a'] + Server-Perf: ['[5e8456e5-2bbd-421f-9184-0f636f035774][ AuthTime::1365.07386666154::PostAuthTime::247.184428236331 + ][S-FsOpenStream :: 00:00:013 ms]%0a[S-FsReadStream :: 00:00:017 ms]%0a[OPEN + :: 00:00:031 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] Transfer-Encoding: [chunked] X-Content-Type-Options: [nosniff] - x-ms-request-id: [63bbb4da-931c-4d5e-9fb5-9f4eae28ff7b] + x-ms-request-id: [5e8456e5-2bbd-421f-9184-0f636f035774] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -256,22 +254,22 @@ interactions: Content-Length: ['0'] User-Agent: [python-requests/2.11.1] method: DELETE - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=DELETE&recursive=True + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?recursive=True&OP=DELETE response: body: {string: '{"boolean":true}'} headers: Cache-Control: [no-cache] Content-Length: ['16'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:02:45 GMT'] + Date: ['Thu, 22 Sep 2016 17:25:13 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[fe69bdb6-aa91-4547-850a-46a3d7574db8][ AuthTime::0::PostAuthTime::0 - ][S-FsDelete :: 00:00:094 ms]%0a[DELETE :: 00:00:095 ms]%0a'] + Server-Perf: ['[201d5c1f-bbcb-445f-95bd-22f9979c565a][ AuthTime::938.702913571335::PostAuthTime::216.393473470203 + ][S-FsDelete :: 00:00:046 ms]%0a[DELETE :: 00:00:053 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [fe69bdb6-aa91-4547-850a-46a3d7574db8] + x-ms-request-id: [201d5c1f-bbcb-445f-95bd-22f9979c565a] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} version: 1 diff --git a/tests/recordings/test_core/test_chmod.yaml b/tests/recordings/test_core/test_chmod.yaml index 32bbc8c..26d47a4 100644 --- a/tests/recordings/test_core/test_chmod.yaml +++ b/tests/recordings/test_core/test_chmod.yaml @@ -8,26 +8,26 @@ interactions: Content-Length: ['0'] User-Agent: [python-requests/2.11.1] method: PUT - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=CREATE&overwrite=true&write=true + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?overwrite=true&OP=CREATE&write=true response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] ContentLength: ['0'] - Date: ['Thu, 15 Sep 2016 22:03:04 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:17 GMT'] Expires: ['-1'] - Location: ['https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=CREATE&overwrite=true&write=true'] + Location: ['https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?overwrite=true&OP=CREATE&write=true'] Pragma: [no-cache] - Server-Perf: ['[4f7ad0b4-6bf9-4b83-be33-d2dedfb0ad94][ AuthTime::0::PostAuthTime::0 - ][S-HdfsGetFileStatusV2 :: 00:00:010 ms]%0a[S-HdfsCheckAccess :: 00:00:006 + Server-Perf: ['[99ddd83c-d47d-4cbf-b60a-ea3f27a1dd4b][ AuthTime::9475.11797924592::PostAuthTime::235.210096072633 + ][S-HdfsGetFileStatusV2 :: 00:00:009 ms]%0a[S-HdfsCheckAccess :: 00:00:004 ms]%0a[S-FsDelete :: 00:00:008 ms]%0a[S-FsOpenStream :: 00:00:052 ms]%0a[BufferingTime - :: 00:00:000 ms]%0a[WriteTime :: 00:00:000 ms]%0a[S-FsAppendStream :: 00:00:038 - ms]%0a[S-FsCloseHandle :: 00:00:006 ms]%0a[CREATE :: 00:00:129 ms]%0a'] + :: 00:00:000 ms]%0a[WriteTime :: 00:00:000 ms]%0a[S-FsAppendStream :: 00:00:043 + ms]%0a[S-FsCloseHandle :: 00:00:002 ms]%0a[CREATE :: 00:00:188 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [4f7ad0b4-6bf9-4b83-be33-d2dedfb0ad94] + x-ms-request-id: [99ddd83c-d47d-4cbf-b60a-ea3f27a1dd4b] x-ms-webhdfs-version: [16.07.18.01] status: {code: 201, message: Created} - request: @@ -40,20 +40,20 @@ interactions: method: GET uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir?OP=LISTSTATUS response: - body: {string: '{"FileStatuses":{"FileStatus":[{"length":0,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1473976984965,"modificationTime":1473976984965,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} + body: {string: '{"FileStatuses":{"FileStatus":[{"length":0,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1474565178086,"modificationTime":1474565178086,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} headers: Cache-Control: [no-cache] Content-Length: ['288'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:03:04 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:18 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[af7f71ad-8204-4f92-9d07-75ac8d809809][ AuthTime::0::PostAuthTime::0 - ][S-HdfsListStatus :: 00:00:049 ms]%0a[LISTSTATUS :: 00:00:049 ms]%0a'] + Server-Perf: ['[5eeffd1b-395f-417f-9740-806cf8844706][ AuthTime::1194.86677705856::PostAuthTime::287.383849027685 + ][S-HdfsListStatus :: 00:00:014 ms]%0a[LISTSTATUS :: 00:00:014 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [af7f71ad-8204-4f92-9d07-75ac8d809809] + x-ms-request-id: [5eeffd1b-395f-417f-9740-806cf8844706] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -65,21 +65,21 @@ interactions: Content-Length: ['0'] User-Agent: [python-requests/2.11.1] method: PUT - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=SETPERMISSION&permission=0555 + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?permission=0555&OP=SETPERMISSION response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Thu, 15 Sep 2016 22:03:04 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:19 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[c785adfb-1572-4463-8a5e-0e32124cab1a][ AuthTime::0::PostAuthTime::0 - ][S-HdfsSetPermission :: 00:00:031 ms]%0a[SETPERMISSION :: 00:00:033 ms]%0a'] + Server-Perf: ['[8789f155-60af-4551-82ee-8685e2f3f9eb][ AuthTime::934.852018827047::PostAuthTime::213.827085733542 + ][S-HdfsSetPermission :: 00:00:021 ms]%0a[SETPERMISSION :: 00:00:024 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [c785adfb-1572-4463-8a5e-0e32124cab1a] + x-ms-request-id: [8789f155-60af-4551-82ee-8685e2f3f9eb] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -92,20 +92,20 @@ interactions: method: GET uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir?OP=LISTSTATUS response: - body: {string: '{"FileStatuses":{"FileStatus":[{"length":0,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1473976984965,"modificationTime":1473976984965,"replication":1,"permission":"555","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} + body: {string: '{"FileStatuses":{"FileStatus":[{"length":0,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1474565178086,"modificationTime":1474565178086,"replication":1,"permission":"555","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} headers: Cache-Control: [no-cache] Content-Length: ['288'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:03:05 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:19 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[5c6f6fef-a28e-4305-a62e-42828c244ea1][ AuthTime::0::PostAuthTime::0 - ][S-HdfsListStatus :: 00:00:052 ms]%0a[LISTSTATUS :: 00:00:053 ms]%0a'] + Server-Perf: ['[510632c1-841e-4fde-a741-4697cd290e00][ AuthTime::1052.4569159805::PostAuthTime::279.258173968006 + ][S-HdfsListStatus :: 00:00:070 ms]%0a[LISTSTATUS :: 00:00:071 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [5c6f6fef-a28e-4305-a62e-42828c244ea1] + x-ms-request-id: [510632c1-841e-4fde-a741-4697cd290e00] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -117,24 +117,24 @@ interactions: Content-Length: ['4'] User-Agent: [python-requests/2.11.1] method: POST - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=APPEND&append=true + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?offset=0&append=true&OP=APPEND response: body: {string: '{"RemoteException":{"exception":"AccessControlException","message":"Operation failed. failed with error 0x83090aa2 (Either the resource does not exist or - the current user is not authorized to perform the requested operation). [3d881627-792b-4b62-ab4a-8885703a0873][2016-09-15T15:03:06.1254451-07:00]","javaClassName":"org.apache.hadoop.security.AccessControlException"}}'} + the current user is not authorized to perform the requested operation). [ed9b7720-b939-45d5-99dd-76fc051c6076][2016-09-22T10:26:20.1195352-07:00]","javaClassName":"org.apache.hadoop.security.AccessControlException"}}'} headers: Cache-Control: [no-cache] Content-Length: ['370'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:03:05 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:19 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[3d881627-792b-4b62-ab4a-8885703a0873][ AuthTime::0::PostAuthTime::0 - ][S-FsOpenStream :: 00:00:005 ms]%0a[APPEND :: 00:00:009 ms]%0a'] + Server-Perf: ['[ed9b7720-b939-45d5-99dd-76fc051c6076][ AuthTime::9665.85198442482::PostAuthTime::215.110324226426 + ][S-FsOpenStream :: 00:00:007 ms]%0a[APPEND :: 00:00:022 ms]%0a'] Status: ['0x83090AA2'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [3d881627-792b-4b62-ab4a-8885703a0873] + x-ms-request-id: [ed9b7720-b939-45d5-99dd-76fc051c6076] x-ms-webhdfs-version: [16.07.18.01] status: {code: 403, message: Forbidden} - request: @@ -146,21 +146,21 @@ interactions: Content-Length: ['0'] User-Agent: [python-requests/2.11.1] method: PUT - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=SETPERMISSION&permission=0770 + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?permission=0770&OP=SETPERMISSION response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Thu, 15 Sep 2016 22:03:05 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:19 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[3ca631ca-8e42-467e-88ab-b4054392613d][ AuthTime::0::PostAuthTime::0 - ][S-HdfsSetPermission :: 00:00:023 ms]%0a[SETPERMISSION :: 00:00:025 ms]%0a'] + Server-Perf: ['[dd9f3644-d08d-4e85-9583-b52efe1ecd96][ AuthTime::916.891719963136::PostAuthTime::210.833777025105 + ][S-HdfsSetPermission :: 00:00:018 ms]%0a[SETPERMISSION :: 00:00:035 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [3ca631ca-8e42-467e-88ab-b4054392613d] + x-ms-request-id: [dd9f3644-d08d-4e85-9583-b52efe1ecd96] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -173,20 +173,20 @@ interactions: method: GET uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir?OP=LISTSTATUS response: - body: {string: '{"FileStatuses":{"FileStatus":[{"length":0,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1473976984965,"modificationTime":1473976984965,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} + body: {string: '{"FileStatuses":{"FileStatus":[{"length":0,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1474565178086,"modificationTime":1474565178086,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} headers: Cache-Control: [no-cache] Content-Length: ['288'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:03:05 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:19 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[f70b977f-3503-46fb-a15b-507e05125840][ AuthTime::0::PostAuthTime::0 - ][S-HdfsListStatus :: 00:00:013 ms]%0a[LISTSTATUS :: 00:00:013 ms]%0a'] + Server-Perf: ['[85d4d9c9-8049-48aa-bcb0-aaff876ce422][ AuthTime::1884.67435162199::PostAuthTime::712.900418460144 + ][S-HdfsListStatus :: 00:00:013 ms]%0a[LISTSTATUS :: 00:00:014 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [f70b977f-3503-46fb-a15b-507e05125840] + x-ms-request-id: [85d4d9c9-8049-48aa-bcb0-aaff876ce422] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -198,22 +198,22 @@ interactions: Content-Length: ['0'] User-Agent: [python-requests/2.11.1] method: DELETE - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=DELETE&recursive=False + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?recursive=False&OP=DELETE response: body: {string: '{"boolean":true}'} headers: Cache-Control: [no-cache] Content-Length: ['16'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:03:06 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:20 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[9feb7979-fdf9-4c6f-9a21-87e12f89b642][ AuthTime::0::PostAuthTime::0 - ][S-FsDelete :: 00:00:121 ms]%0a[DELETE :: 00:00:122 ms]%0a'] + Server-Perf: ['[5221fe20-3a45-4f68-a2d3-9c9f5839b47e][ AuthTime::929.720566368321::PostAuthTime::221.952609910376 + ][S-FsDelete :: 00:00:070 ms]%0a[DELETE :: 00:00:078 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [9feb7979-fdf9-4c6f-9a21-87e12f89b642] + x-ms-request-id: [5221fe20-3a45-4f68-a2d3-9c9f5839b47e] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -232,15 +232,15 @@ interactions: Cache-Control: [no-cache] Content-Length: ['16'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:03:06 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:21 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[0e93781c-14b2-46c0-bc5c-24a1e7b1a4e5][ AuthTime::0::PostAuthTime::0 - ][S-HdfsMkdirs :: 00:00:033 ms]%0a[MKDIRS :: 00:00:034 ms]%0a'] + Server-Perf: ['[d865f65d-9de6-4092-8921-cbd6f0c600e3][ AuthTime::949.393478693173::PostAuthTime::219.386871427747 + ][S-HdfsMkdirs :: 00:00:009 ms]%0a[MKDIRS :: 00:00:013 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [0e93781c-14b2-46c0-bc5c-24a1e7b1a4e5] + x-ms-request-id: [d865f65d-9de6-4092-8921-cbd6f0c600e3] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -252,26 +252,26 @@ interactions: Content-Length: ['0'] User-Agent: [python-requests/2.11.1] method: PUT - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/deep/file?OP=CREATE&overwrite=true&write=true + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/deep/file?overwrite=true&OP=CREATE&write=true response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] ContentLength: ['0'] - Date: ['Thu, 15 Sep 2016 22:03:07 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:21 GMT'] Expires: ['-1'] - Location: ['https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/deep/file?OP=CREATE&overwrite=true&write=true'] + Location: ['https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/deep/file?overwrite=true&OP=CREATE&write=true'] Pragma: [no-cache] - Server-Perf: ['[3f44fdb7-1afa-46b3-bedc-32c71cc564f0][ AuthTime::0::PostAuthTime::0 + Server-Perf: ['[1d663c6e-dd1a-4dda-a667-5e044e420d90][ AuthTime::929.294899099016::PostAuthTime::210.834047517632 ][S-HdfsGetFileStatusV2 :: 00:00:006 ms]%0a[S-HdfsCheckAccess :: 00:00:002 - ms]%0a[S-FsDelete :: 00:00:005 ms]%0a[S-FsOpenStream :: 00:00:056 ms]%0a[BufferingTime - :: 00:00:000 ms]%0a[WriteTime :: 00:00:000 ms]%0a[S-FsAppendStream :: 00:00:031 - ms]%0a[S-FsCloseHandle :: 00:00:001 ms]%0a[CREATE :: 00:00:109 ms]%0a'] + ms]%0a[S-FsDelete :: 00:00:005 ms]%0a[S-FsOpenStream :: 00:00:332 ms]%0a[BufferingTime + :: 00:00:000 ms]%0a[WriteTime :: 00:00:000 ms]%0a[S-FsAppendStream :: 00:00:034 + ms]%0a[S-FsCloseHandle :: 00:00:001 ms]%0a[CREATE :: 00:00:393 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [3f44fdb7-1afa-46b3-bedc-32c71cc564f0] + x-ms-request-id: [1d663c6e-dd1a-4dda-a667-5e044e420d90] x-ms-webhdfs-version: [16.07.18.01] status: {code: 201, message: Created} - request: @@ -283,21 +283,21 @@ interactions: Content-Length: ['0'] User-Agent: [python-requests/2.11.1] method: PUT - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/deep?OP=SETPERMISSION&permission=660 + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/deep?permission=660&OP=SETPERMISSION response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Thu, 15 Sep 2016 22:03:07 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:21 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[d9a27143-a1fe-4c67-b96c-c2f70ac473a0][ AuthTime::0::PostAuthTime::0 - ][S-HdfsSetPermission :: 00:00:012 ms]%0a[SETPERMISSION :: 00:00:015 ms]%0a'] + Server-Perf: ['[2c34850d-954b-4f73-8193-9fb9abbd73e8][ AuthTime::909.619644705218::PostAuthTime::209.122710983005 + ][S-HdfsSetPermission :: 00:00:007 ms]%0a[SETPERMISSION :: 00:00:010 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [d9a27143-a1fe-4c67-b96c-c2f70ac473a0] + x-ms-request-id: [2c34850d-954b-4f73-8193-9fb9abbd73e8] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -312,22 +312,22 @@ interactions: response: body: {string: '{"RemoteException":{"exception":"AccessControlException","message":"ListStatus failed with error 0x83090aa2 (Either the resource does not exist or the current - user is not authorized to perform the requested operation). [1fe99c01-cb00-4ac3-818a-955349707d41][2016-09-15T15:03:09.3105410-07:00]","javaClassName":"org.apache.hadoop.security.AccessControlException"}}'} + user is not authorized to perform the requested operation). [9a329262-c9d9-4de2-8126-ef83b7926934][2016-09-22T10:26:23.4072586-07:00]","javaClassName":"org.apache.hadoop.security.AccessControlException"}}'} headers: Cache-Control: [no-cache] Content-Length: ['363'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:03:09 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:23 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[1fe99c01-cb00-4ac3-818a-955349707d41][ AuthTime::0::PostAuthTime::0 + Server-Perf: ['[9a329262-c9d9-4de2-8126-ef83b7926934][ AuthTime::903.63287786758::PostAuthTime::185.601831043318 ][S-HdfsListStatus :: 00:00:006 ms]%0a[S-HdfsListStatus :: 00:00:006 ms]%0a[S-HdfsListStatus :: 00:00:006 ms]%0a[S-HdfsListStatus :: 00:00:006 ms]%0a[S-HdfsListStatus - :: 00:00:005 ms]%0a[LISTSTATUS :: 00:01:248 ms]%0a'] + :: 00:00:006 ms]%0a[LISTSTATUS :: 00:01:257 ms]%0a'] Status: ['0x83090AA2'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [1fe99c01-cb00-4ac3-818a-955349707d41] + x-ms-request-id: [9a329262-c9d9-4de2-8126-ef83b7926934] x-ms-webhdfs-version: [16.07.18.01] status: {code: 403, message: Forbidden} - request: @@ -339,21 +339,21 @@ interactions: Content-Length: ['0'] User-Agent: [python-requests/2.11.1] method: PUT - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/deep?OP=SETPERMISSION&permission=770 + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/deep?permission=770&OP=SETPERMISSION response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Thu, 15 Sep 2016 22:03:09 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:23 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[dc6427a9-3bec-4738-af07-08b83c791316][ AuthTime::0::PostAuthTime::0 - ][S-HdfsSetPermission :: 00:00:027 ms]%0a[SETPERMISSION :: 00:00:027 ms]%0a'] + Server-Perf: ['[ea2a2969-823f-4cf3-806b-b5500a71bbe1][ AuthTime::0::PostAuthTime::0 + ][S-HdfsSetPermission :: 00:00:021 ms]%0a[SETPERMISSION :: 00:00:021 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [dc6427a9-3bec-4738-af07-08b83c791316] + x-ms-request-id: [ea2a2969-823f-4cf3-806b-b5500a71bbe1] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -366,20 +366,20 @@ interactions: method: GET uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir?OP=LISTSTATUS response: - body: {string: '{"FileStatuses":{"FileStatus":[{"length":0,"pathSuffix":"deep","type":"DIRECTORY","blockSize":0,"accessTime":1473976987201,"modificationTime":1473976987526,"replication":0,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} + body: {string: '{"FileStatuses":{"FileStatus":[{"length":0,"pathSuffix":"deep","type":"DIRECTORY","blockSize":0,"accessTime":1474565181120,"modificationTime":1474565181660,"replication":0,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} headers: Cache-Control: [no-cache] Content-Length: ['288'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:03:09 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:23 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[03ffce62-9926-4c59-8df5-60fb90aac6ad][ AuthTime::0::PostAuthTime::0 - ][S-HdfsListStatus :: 00:00:007 ms]%0a[LISTSTATUS :: 00:00:008 ms]%0a'] + Server-Perf: ['[6339da02-e518-4824-8046-c97be79a312c][ AuthTime::853.169342353978::PostAuthTime::182.180521224458 + ][S-HdfsListStatus :: 00:00:006 ms]%0a[LISTSTATUS :: 00:00:007 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [03ffce62-9926-4c59-8df5-60fb90aac6ad] + x-ms-request-id: [6339da02-e518-4824-8046-c97be79a312c] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -391,22 +391,22 @@ interactions: Content-Length: ['0'] User-Agent: [python-requests/2.11.1] method: DELETE - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/deep?OP=DELETE&recursive=True + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/deep?recursive=True&OP=DELETE response: body: {string: '{"boolean":true}'} headers: Cache-Control: [no-cache] Content-Length: ['16'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:03:09 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:23 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[2b7efbfb-a6cc-4dc6-b959-0e4a8a82c533][ AuthTime::0::PostAuthTime::0 - ][S-FsDelete :: 00:00:045 ms]%0a[DELETE :: 00:00:046 ms]%0a'] + Server-Perf: ['[05164205-0afa-4669-aebf-aec027f48737][ AuthTime::935.281272906266::PostAuthTime::224.946478988887 + ][S-FsDelete :: 00:00:054 ms]%0a[DELETE :: 00:00:064 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [2b7efbfb-a6cc-4dc6-b959-0e4a8a82c533] + x-ms-request-id: [05164205-0afa-4669-aebf-aec027f48737] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -418,23 +418,23 @@ interactions: Content-Length: ['4'] User-Agent: [python-requests/2.11.1] method: POST - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=APPEND&append=true + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?offset=0&append=true&OP=APPEND response: body: {string: '{"RemoteException":{"exception":"FileNotFoundException","message":"Operation - failed. failed with error 0x8309000a (Stream not found). [7f0e5641-29ef-4a67-87f9-97c8b72f4e51][2016-09-15T15:03:10.3712624-07:00]","javaClassName":"java.io.FileNotFoundException"}}'} + failed. failed with error 0x8309000a (Stream not found). [3cbc2496-6cc2-4875-a41b-e8fa6a30e142][2016-09-22T10:26:24.2909766-07:00]","javaClassName":"java.io.FileNotFoundException"}}'} headers: Cache-Control: [no-cache] Content-Length: ['258'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:03:09 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:23 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[7f0e5641-29ef-4a67-87f9-97c8b72f4e51][ AuthTime::0::PostAuthTime::0 - ][S-FsOpenStream :: 00:00:006 ms]%0a[APPEND :: 00:00:006 ms]%0a'] + Server-Perf: ['[3cbc2496-6cc2-4875-a41b-e8fa6a30e142][ AuthTime::829.223211578505::PostAuthTime::157.377071614693 + ][S-FsOpenStream :: 00:00:006 ms]%0a[APPEND :: 00:00:011 ms]%0a'] Status: ['0x8309000A'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [7f0e5641-29ef-4a67-87f9-97c8b72f4e51] + x-ms-request-id: [3cbc2496-6cc2-4875-a41b-e8fa6a30e142] x-ms-webhdfs-version: [16.07.18.01] status: {code: 404, message: Not Found} version: 1 diff --git a/tests/recordings/test_core/test_delimiters_dash.yaml b/tests/recordings/test_core/test_delimiters_dash.yaml index a27f46d..6dbaeda 100644 --- a/tests/recordings/test_core/test_delimiters_dash.yaml +++ b/tests/recordings/test_core/test_delimiters_dash.yaml @@ -8,27 +8,27 @@ interactions: Content-Length: ['5'] User-Agent: [python-requests/2.11.1] method: PUT - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=CREATE&overwrite=true&write=true + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?overwrite=true&OP=CREATE&write=true response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] ContentLength: ['0'] - Date: ['Thu, 15 Sep 2016 22:03:02 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:59 GMT'] Expires: ['-1'] - Location: ['https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=CREATE&overwrite=true&write=true'] + Location: ['https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?overwrite=true&OP=CREATE&write=true'] Pragma: [no-cache] - Server-Perf: ['[5b95c94d-a0fe-4769-9a4f-701b33318388][ AuthTime::0::PostAuthTime::0 - ][S-HdfsGetFileStatusV2 :: 00:00:006 ms]%0a[S-HdfsCheckAccess :: 00:00:002 - ms]%0a[S-FsDelete :: 00:00:005 ms]%0a[S-FsOpenStream :: 00:00:072 ms]%0a[S-FsAppendStream - :: 00:00:450 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:450 + Server-Perf: ['[8a0b505d-7508-4a84-b926-3b7a09a80771][ AuthTime::1069.13634310895::PostAuthTime::274.981867447621 + ][S-HdfsGetFileStatusV2 :: 00:00:007 ms]%0a[S-HdfsCheckAccess :: 00:00:003 + ms]%0a[S-FsDelete :: 00:00:006 ms]%0a[S-FsOpenStream :: 00:00:058 ms]%0a[S-FsAppendStream + :: 00:00:121 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:121 ms]%0a[S-FsAppendStream :: 00:00:033 ms]%0a[S-FsCloseHandle :: 00:00:001 - ms]%0a[CREATE :: 00:00:576 ms]%0a'] + ms]%0a[CREATE :: 00:00:236 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [5b95c94d-a0fe-4769-9a4f-701b33318388] + x-ms-request-id: [8a0b505d-7508-4a84-b926-3b7a09a80771] x-ms-webhdfs-version: [16.07.18.01] status: {code: 201, message: Created} - request: @@ -41,20 +41,20 @@ interactions: method: GET uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir?OP=LISTSTATUS response: - body: {string: '{"FileStatuses":{"FileStatus":[{"length":5,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1473976982129,"modificationTime":1473976982572,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} + body: {string: '{"FileStatuses":{"FileStatus":[{"length":5,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1474565219213,"modificationTime":1474565219310,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} headers: Cache-Control: [no-cache] Content-Length: ['288'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:03:02 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:58 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[09e96669-fa51-4e9a-a192-6cfbf35e1489][ AuthTime::0::PostAuthTime::0 - ][S-HdfsListStatus :: 00:00:011 ms]%0a[LISTSTATUS :: 00:00:011 ms]%0a'] + Server-Perf: ['[9640250c-6808-425c-a434-c44713249df4][ AuthTime::970.347315058815::PostAuthTime::232.643869278094 + ][S-HdfsListStatus :: 00:00:012 ms]%0a[LISTSTATUS :: 00:00:012 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [09e96669-fa51-4e9a-a192-6cfbf35e1489] + x-ms-request-id: [9640250c-6808-425c-a434-c44713249df4] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -65,23 +65,23 @@ interactions: Connection: [keep-alive] User-Agent: [python-requests/2.11.1] method: GET - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=OPEN&offset=0&read=true&length=5 + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?length=5&read=true&OP=OPEN&offset=0 response: body: {string: 123--} headers: Cache-Control: [no-cache] Content-Type: [application/octet-stream] - Date: ['Thu, 15 Sep 2016 22:03:03 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:58 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[2bd0f359-622e-43a7-87b5-dc7ba9e36aa2][ AuthTime::0::PostAuthTime::0 - ][S-FsOpenStream :: 00:00:014 ms]%0a[S-FsReadStream :: 00:00:040 ms]%0a[OPEN - :: 00:00:055 ms]%0a'] + Server-Perf: ['[1220fd48-2d7b-4ad4-b082-6c68c91bf557][ AuthTime::1488.23778960765::PostAuthTime::219.814432143199 + ][S-FsOpenStream :: 00:00:014 ms]%0a[S-FsReadStream :: 00:00:017 ms]%0a[OPEN + :: 00:00:031 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] Transfer-Encoding: [chunked] X-Content-Type-Options: [nosniff] - x-ms-request-id: [2bd0f359-622e-43a7-87b5-dc7ba9e36aa2] + x-ms-request-id: [1220fd48-2d7b-4ad4-b082-6c68c91bf557] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -93,24 +93,24 @@ interactions: Content-Length: ['5'] User-Agent: [python-requests/2.11.1] method: POST - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=APPEND&append=true + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?append=true&OP=APPEND response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Thu, 15 Sep 2016 22:03:03 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:59 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[e65fe050-b000-4cd9-992a-46f072d5c8a1][ AuthTime::0::PostAuthTime::0 - ][S-FsOpenStream :: 00:00:010 ms]%0a[S-FsGetStreamLength :: 00:00:009 ms]%0a[S-FsAppendStream - :: 00:00:066 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:066 - ms]%0a[S-FsAppendStream :: 00:00:017 ms]%0a[S-FsCloseHandle :: 00:00:001 - ms]%0a[APPEND :: 00:00:106 ms]%0a'] + Server-Perf: ['[e7302618-0532-49e4-8dc1-b3cc85facbee][ AuthTime::1259.01549606878::PostAuthTime::295.937066331385 + ][S-FsOpenStream :: 00:00:013 ms]%0a[S-FsGetStreamLength :: 00:00:009 ms]%0a[S-FsAppendStream + :: 00:00:377 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:377 + ms]%0a[S-FsAppendStream :: 00:00:033 ms]%0a[S-FsCloseHandle :: 00:00:001 + ms]%0a[APPEND :: 00:00:437 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [e65fe050-b000-4cd9-992a-46f072d5c8a1] + x-ms-request-id: [e7302618-0532-49e4-8dc1-b3cc85facbee] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -122,24 +122,23 @@ interactions: Content-Length: ['3'] User-Agent: [python-requests/2.11.1] method: POST - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=APPEND&append=true + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?append=true&OP=APPEND&offset=10 response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Thu, 15 Sep 2016 22:03:03 GMT'] + Date: ['Thu, 22 Sep 2016 17:27:00 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[2a43de68-405f-4bb3-8eec-1201c2033dbe][ AuthTime::0::PostAuthTime::0 - ][S-FsOpenStream :: 00:00:010 ms]%0a[S-FsGetStreamLength :: 00:00:009 ms]%0a[S-FsAppendStream - :: 00:00:063 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:063 - ms]%0a[S-FsAppendStream :: 00:00:017 ms]%0a[S-FsCloseHandle :: 00:00:001 - ms]%0a[APPEND :: 00:00:104 ms]%0a'] + Server-Perf: ['[3bba5c29-27ce-4dbf-bcb7-a340ea65cf90][ AuthTime::982.749706308372::PostAuthTime::233.926931832324 + ][S-FsOpenStream :: 00:00:011 ms]%0a[S-FsAppendStream :: 00:00:066 ms]%0a[BufferingTime + :: 00:00:000 ms]%0a[WriteTime :: 00:00:067 ms]%0a[S-FsAppendStream :: 00:00:033 + ms]%0a[S-FsCloseHandle :: 00:00:001 ms]%0a[APPEND :: 00:00:115 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [2a43de68-405f-4bb3-8eec-1201c2033dbe] + x-ms-request-id: [3bba5c29-27ce-4dbf-bcb7-a340ea65cf90] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -152,20 +151,20 @@ interactions: method: GET uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir?OP=LISTSTATUS response: - body: {string: '{"FileStatuses":{"FileStatus":[{"length":13,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1473976982129,"modificationTime":1473976983807,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} + body: {string: '{"FileStatuses":{"FileStatus":[{"length":13,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1474565219213,"modificationTime":1474565220998,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} headers: Cache-Control: [no-cache] Content-Length: ['289'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:03:03 GMT'] + Date: ['Thu, 22 Sep 2016 17:27:01 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[c78e2edb-17ec-407f-a375-c2379e5e8334][ AuthTime::0::PostAuthTime::0 - ][S-HdfsListStatus :: 00:00:012 ms]%0a[LISTSTATUS :: 00:00:013 ms]%0a'] + Server-Perf: ['[7f1fb1e4-95fd-43cf-9045-02b31f05c754][ AuthTime::925.870489321484::PostAuthTime::212.543941428535 + ][S-HdfsListStatus :: 00:00:012 ms]%0a[LISTSTATUS :: 00:00:012 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [c78e2edb-17ec-407f-a375-c2379e5e8334] + x-ms-request-id: [7f1fb1e4-95fd-43cf-9045-02b31f05c754] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -176,23 +175,23 @@ interactions: Connection: [keep-alive] User-Agent: [python-requests/2.11.1] method: GET - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=OPEN&offset=0&read=true&length=13 + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?length=13&read=true&OP=OPEN&offset=0 response: body: {string: 123--456--789} headers: Cache-Control: [no-cache] Content-Type: [application/octet-stream] - Date: ['Thu, 15 Sep 2016 22:03:03 GMT'] + Date: ['Thu, 22 Sep 2016 17:27:01 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[ab167687-47a9-4d73-99b4-609357e6dd70][ AuthTime::0::PostAuthTime::0 - ][S-FsOpenStream :: 00:00:013 ms]%0a[S-FsReadStream :: 00:00:020 ms]%0a[OPEN - :: 00:00:034 ms]%0a'] + Server-Perf: ['[7480abfc-e2db-486b-b5de-2b470cebcadb][ AuthTime::1024.65983303519::PostAuthTime::264.290390991547 + ][S-FsOpenStream :: 00:00:015 ms]%0a[S-FsReadStream :: 00:00:043 ms]%0a[OPEN + :: 00:00:060 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] Transfer-Encoding: [chunked] X-Content-Type-Options: [nosniff] - x-ms-request-id: [ab167687-47a9-4d73-99b4-609357e6dd70] + x-ms-request-id: [7480abfc-e2db-486b-b5de-2b470cebcadb] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -211,15 +210,15 @@ interactions: Cache-Control: [no-cache] Content-Length: ['16'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:03:04 GMT'] + Date: ['Thu, 22 Sep 2016 17:27:01 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[5a14e236-e946-4444-b6c7-4f59a12b607f][ AuthTime::0::PostAuthTime::0 - ][S-FsDelete :: 00:00:094 ms]%0a[DELETE :: 00:00:095 ms]%0a'] + Server-Perf: ['[23d05587-c727-4452-bef5-871b7523b3fa][ AuthTime::1038.34388426999::PostAuthTime::250.605237307337 + ][S-FsDelete :: 00:00:070 ms]%0a[DELETE :: 00:00:070 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [5a14e236-e946-4444-b6c7-4f59a12b607f] + x-ms-request-id: [23d05587-c727-4452-bef5-871b7523b3fa] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} version: 1 diff --git a/tests/recordings/test_core/test_delimiters_newline.yaml b/tests/recordings/test_core/test_delimiters_newline.yaml index 5aa0e59..61a6b54 100644 --- a/tests/recordings/test_core/test_delimiters_newline.yaml +++ b/tests/recordings/test_core/test_delimiters_newline.yaml @@ -10,27 +10,27 @@ interactions: Content-Length: ['4'] User-Agent: [python-requests/2.11.1] method: PUT - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=CREATE&overwrite=true&write=true + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?overwrite=true&OP=CREATE&write=true response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] ContentLength: ['0'] - Date: ['Thu, 15 Sep 2016 22:02:59 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:47 GMT'] Expires: ['-1'] - Location: ['https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=CREATE&overwrite=true&write=true'] + Location: ['https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?overwrite=true&OP=CREATE&write=true'] Pragma: [no-cache] - Server-Perf: ['[3468f47f-3a22-4b3c-b8ab-c0bd8351ed34][ AuthTime::0::PostAuthTime::0 - ][S-HdfsGetFileStatusV2 :: 00:00:006 ms]%0a[S-HdfsCheckAccess :: 00:00:002 - ms]%0a[S-FsDelete :: 00:00:005 ms]%0a[S-FsOpenStream :: 00:00:066 ms]%0a[S-FsAppendStream - :: 00:00:422 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:422 - ms]%0a[S-FsAppendStream :: 00:00:033 ms]%0a[S-FsCloseHandle :: 00:00:001 - ms]%0a[CREATE :: 00:00:542 ms]%0a'] + Server-Perf: ['[b4ff5326-06a7-49db-9d87-262f3302232c][ AuthTime::1427.93911052095::PostAuthTime::403.278401084532 + ][S-HdfsGetFileStatusV2 :: 00:00:008 ms]%0a[S-HdfsCheckAccess :: 00:00:003 + ms]%0a[S-FsDelete :: 00:00:008 ms]%0a[S-FsOpenStream :: 00:00:048 ms]%0a[S-FsAppendStream + :: 00:00:138 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:140 + ms]%0a[S-FsAppendStream :: 00:00:030 ms]%0a[S-FsCloseHandle :: 00:00:002 + ms]%0a[CREATE :: 00:00:257 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [3468f47f-3a22-4b3c-b8ab-c0bd8351ed34] + x-ms-request-id: [b4ff5326-06a7-49db-9d87-262f3302232c] x-ms-webhdfs-version: [16.07.18.01] status: {code: 201, message: Created} - request: @@ -43,20 +43,20 @@ interactions: method: GET uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir?OP=LISTSTATUS response: - body: {string: '{"FileStatuses":{"FileStatus":[{"length":4,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1473976978898,"modificationTime":1473976979178,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} + body: {string: '{"FileStatuses":{"FileStatus":[{"length":4,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1474565207746,"modificationTime":1474565207873,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} headers: Cache-Control: [no-cache] Content-Length: ['288'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:02:59 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:47 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[df0820eb-e785-44cb-b196-00a2c0d1b896][ AuthTime::0::PostAuthTime::0 - ][S-HdfsListStatus :: 00:00:043 ms]%0a[LISTSTATUS :: 00:00:043 ms]%0a'] + Server-Perf: ['[4bd98882-2c80-414b-aad6-a7cb03d6c1d1][ AuthTime::869.422417841078::PostAuthTime::205.702008352956 + ][S-HdfsListStatus :: 00:00:023 ms]%0a[LISTSTATUS :: 00:00:023 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [df0820eb-e785-44cb-b196-00a2c0d1b896] + x-ms-request-id: [4bd98882-2c80-414b-aad6-a7cb03d6c1d1] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -67,7 +67,7 @@ interactions: Connection: [keep-alive] User-Agent: [python-requests/2.11.1] method: GET - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=OPEN&offset=0&read=true&length=4 + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?read=true&length=4&OP=OPEN&offset=0 response: body: {string: '123 @@ -75,17 +75,18 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/octet-stream] - Date: ['Thu, 15 Sep 2016 22:02:59 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:47 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[b66716fb-47e0-4665-9019-e938c4505793][ AuthTime::0::PostAuthTime::0 - ][S-FsOpenStream :: 00:00:012 ms]%0a[S-FsReadStream :: 00:00:032 ms]%0a[OPEN - :: 00:00:045 ms]%0a'] + Server-Perf: ['[84be60d5-353b-41ee-9ee9-bee7a748f054][ AuthTime::945.11612312511::PostAuthTime::209.978287988429 + ][S-FsReadStream :: 00:00:004 ms]%0a[S-FsCloseHandle :: 00:00:001 ms]%0a[S-FsOpenStream + :: 00:00:013 ms]%0a[S-FsReadStream :: 00:00:014 ms]%0a[OPEN :: 00:00:033 + ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] Transfer-Encoding: [chunked] X-Content-Type-Options: [nosniff] - x-ms-request-id: [b66716fb-47e0-4665-9019-e938c4505793] + x-ms-request-id: [84be60d5-353b-41ee-9ee9-bee7a748f054] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -105,18 +106,18 @@ interactions: headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Thu, 15 Sep 2016 22:02:59 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:49 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[f0c87027-d206-44f2-81b0-9764fbff65b5][ AuthTime::0::PostAuthTime::0 - ][S-FsOpenStream :: 00:00:010 ms]%0a[S-FsGetStreamLength :: 00:00:038 ms]%0a[S-FsAppendStream - :: 00:00:076 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:076 - ms]%0a[S-FsAppendStream :: 00:00:033 ms]%0a[S-FsCloseHandle :: 00:00:001 - ms]%0a[APPEND :: 00:00:161 ms]%0a'] + Server-Perf: ['[d3120b12-1e1c-4dd9-8dab-e234a934b51a][ AuthTime::939.983868884652::PostAuthTime::217.248319105279 + ][S-FsOpenStream :: 00:00:010 ms]%0a[S-FsGetStreamLength :: 00:00:009 ms]%0a[S-FsAppendStream + :: 00:00:059 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:059 + ms]%0a[S-FsAppendStream :: 00:00:034 ms]%0a[S-FsCloseHandle :: 00:00:001 + ms]%0a[APPEND :: 00:00:116 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [f0c87027-d206-44f2-81b0-9764fbff65b5] + x-ms-request-id: [d3120b12-1e1c-4dd9-8dab-e234a934b51a] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -128,24 +129,23 @@ interactions: Content-Length: ['3'] User-Agent: [python-requests/2.11.1] method: POST - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=APPEND&append=true + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?offset=8&OP=APPEND&append=true response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Thu, 15 Sep 2016 22:03:00 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:49 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[77837b1a-c9de-4720-8fd3-f9a7aad83bad][ AuthTime::0::PostAuthTime::0 - ][S-FsOpenStream :: 00:00:011 ms]%0a[S-FsGetStreamLength :: 00:00:009 ms]%0a[S-FsAppendStream - :: 00:00:202 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:202 - ms]%0a[S-FsAppendStream :: 00:00:033 ms]%0a[S-FsCloseHandle :: 00:00:001 - ms]%0a[APPEND :: 00:00:258 ms]%0a'] + Server-Perf: ['[915ea582-8aaf-48b1-825a-8907e22849ae][ AuthTime::0::PostAuthTime::0 + ][S-FsOpenStream :: 00:00:012 ms]%0a[S-FsAppendStream :: 00:00:067 ms]%0a[BufferingTime + :: 00:00:000 ms]%0a[WriteTime :: 00:00:067 ms]%0a[S-FsAppendStream :: 00:00:033 + ms]%0a[S-FsCloseHandle :: 00:00:003 ms]%0a[APPEND :: 00:00:120 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [77837b1a-c9de-4720-8fd3-f9a7aad83bad] + x-ms-request-id: [915ea582-8aaf-48b1-825a-8907e22849ae] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -158,20 +158,20 @@ interactions: method: GET uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir?OP=LISTSTATUS response: - body: {string: '{"FileStatuses":{"FileStatus":[{"length":11,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1473976978898,"modificationTime":1473976980788,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} + body: {string: '{"FileStatuses":{"FileStatus":[{"length":11,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1474565207746,"modificationTime":1474565209358,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} headers: Cache-Control: [no-cache] Content-Length: ['289'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:03:01 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:48 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[1aa2d082-7c23-4438-9da0-af2d9978cee2][ AuthTime::0::PostAuthTime::0 - ][S-HdfsListStatus :: 00:00:142 ms]%0a[LISTSTATUS :: 00:00:142 ms]%0a'] + Server-Perf: ['[6599b907-b64c-46cb-9f3a-72670ca12a59][ AuthTime::897.219219137027::PostAuthTime::196.293432594802 + ][S-HdfsListStatus :: 00:00:012 ms]%0a[LISTSTATUS :: 00:00:012 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [1aa2d082-7c23-4438-9da0-af2d9978cee2] + x-ms-request-id: [6599b907-b64c-46cb-9f3a-72670ca12a59] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -182,7 +182,7 @@ interactions: Connection: [keep-alive] User-Agent: [python-requests/2.11.1] method: GET - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=OPEN&offset=0&read=true&length=11 + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?read=true&length=11&OP=OPEN&offset=0 response: body: {string: '123 @@ -192,17 +192,17 @@ interactions: headers: Cache-Control: [no-cache] Content-Type: [application/octet-stream] - Date: ['Thu, 15 Sep 2016 22:03:01 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:49 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[881a9734-496b-4d27-aa99-fa2dc5efb037][ AuthTime::0::PostAuthTime::0 - ][S-FsOpenStream :: 00:00:012 ms]%0a[S-FsReadStream :: 00:00:015 ms]%0a[OPEN - :: 00:00:027 ms]%0a'] + Server-Perf: ['[b8c119f4-2fa0-46af-a71f-cce6b98ee32a][ AuthTime::942.979867700566::PostAuthTime::224.091360850384 + ][S-FsOpenStream :: 00:00:013 ms]%0a[S-FsReadStream :: 00:00:026 ms]%0a[OPEN + :: 00:00:039 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] Transfer-Encoding: [chunked] X-Content-Type-Options: [nosniff] - x-ms-request-id: [881a9734-496b-4d27-aa99-fa2dc5efb037] + x-ms-request-id: [b8c119f4-2fa0-46af-a71f-cce6b98ee32a] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -221,15 +221,15 @@ interactions: Cache-Control: [no-cache] Content-Length: ['16'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:03:01 GMT'] + Date: ['Thu, 22 Sep 2016 17:26:49 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[019b2891-2e07-491d-82d2-268961387631][ AuthTime::0::PostAuthTime::0 - ][S-FsDelete :: 00:00:071 ms]%0a[DELETE :: 00:00:073 ms]%0a'] + Server-Perf: ['[8362c403-6b73-4a79-9b72-d47331d2480d][ AuthTime::0::PostAuthTime::0 + ][S-FsDelete :: 00:00:082 ms]%0a[DELETE :: 00:00:090 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [019b2891-2e07-491d-82d2-268961387631] + x-ms-request-id: [8362c403-6b73-4a79-9b72-d47331d2480d] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} version: 1 diff --git a/tests/recordings/test_core/test_write_blocks.yaml b/tests/recordings/test_core/test_write_blocks.yaml index cfdc502..8c684d5 100644 --- a/tests/recordings/test_core/test_write_blocks.yaml +++ b/tests/recordings/test_core/test_write_blocks.yaml @@ -15,20 +15,20 @@ interactions: Cache-Control: [no-cache] Content-Length: ['0'] ContentLength: ['0'] - Date: ['Thu, 15 Sep 2016 22:02:46 GMT'] + Date: ['Thu, 22 Sep 2016 17:25:36 GMT'] Expires: ['-1'] Location: ['https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=CREATE&overwrite=true&write=true'] Pragma: [no-cache] - Server-Perf: ['[f4145160-ca39-4c02-b9f0-a23d0b1a4f69][ AuthTime::0::PostAuthTime::0 - ][S-HdfsGetFileStatusV2 :: 00:00:007 ms]%0a[S-HdfsCheckAccess :: 00:00:002 - ms]%0a[S-FsDelete :: 00:00:006 ms]%0a[S-FsOpenStream :: 00:00:075 ms]%0a[S-FsAppendStream - :: 00:00:216 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:216 - ms]%0a[S-FsAppendStream :: 00:00:033 ms]%0a[S-FsCloseHandle :: 00:00:001 - ms]%0a[CREATE :: 00:00:346 ms]%0a'] + Server-Perf: ['[c8fad1e0-4391-40ec-96c7-611833aa59b3][ AuthTime::839.912433569299::PostAuthTime::165.502093580101 + ][S-HdfsGetFileStatusV2 :: 00:00:006 ms]%0a[S-HdfsCheckAccess :: 00:00:002 + ms]%0a[S-FsDelete :: 00:00:006 ms]%0a[S-FsOpenStream :: 00:00:047 ms]%0a[S-FsAppendStream + :: 00:00:169 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:169 + ms]%0a[S-FsAppendStream :: 00:00:032 ms]%0a[S-FsCloseHandle :: 00:00:001 + ms]%0a[CREATE :: 00:00:276 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [f4145160-ca39-4c02-b9f0-a23d0b1a4f69] + x-ms-request-id: [c8fad1e0-4391-40ec-96c7-611833aa59b3] x-ms-webhdfs-version: [16.07.18.01] status: {code: 201, message: Created} - request: @@ -40,24 +40,23 @@ interactions: Content-Length: ['1'] User-Agent: [python-requests/2.11.1] method: POST - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=APPEND&append=true + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=APPEND&offset=5&append=true response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Thu, 15 Sep 2016 22:02:47 GMT'] + Date: ['Thu, 22 Sep 2016 17:25:36 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[ad6da152-dfc0-4d7e-9d05-90a98fe7cf81][ AuthTime::0::PostAuthTime::0 - ][S-FsOpenStream :: 00:00:014 ms]%0a[S-FsGetStreamLength :: 00:00:282 ms]%0a[S-FsAppendStream - :: 00:00:187 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:188 - ms]%0a[S-FsAppendStream :: 00:00:033 ms]%0a[S-FsCloseHandle :: 00:00:006 - ms]%0a[APPEND :: 00:00:528 ms]%0a'] + Server-Perf: ['[598dfe00-2b91-42d6-b81d-d4e3dee406fc][ AuthTime::921.168661106583::PostAuthTime::214.68276131639 + ][S-FsOpenStream :: 00:00:010 ms]%0a[S-FsAppendStream :: 00:00:061 ms]%0a[BufferingTime + :: 00:00:000 ms]%0a[WriteTime :: 00:00:061 ms]%0a[S-FsAppendStream :: 00:00:033 + ms]%0a[S-FsCloseHandle :: 00:00:001 ms]%0a[APPEND :: 00:00:107 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [ad6da152-dfc0-4d7e-9d05-90a98fe7cf81] + x-ms-request-id: [598dfe00-2b91-42d6-b81d-d4e3dee406fc] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -69,24 +68,23 @@ interactions: Content-Length: ['3'] User-Agent: [python-requests/2.11.1] method: POST - uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=APPEND&append=true + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=APPEND&offset=6&append=true response: body: {string: ''} headers: Cache-Control: [no-cache] Content-Length: ['0'] - Date: ['Thu, 15 Sep 2016 22:02:47 GMT'] + Date: ['Thu, 22 Sep 2016 17:25:36 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[8fdbd508-a9ce-4190-b57b-ff2075f9ad56][ AuthTime::0::PostAuthTime::0 - ][S-FsOpenStream :: 00:00:010 ms]%0a[S-FsGetStreamLength :: 00:00:009 ms]%0a[S-FsAppendStream - :: 00:00:062 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:063 - ms]%0a[S-FsAppendStream :: 00:00:033 ms]%0a[S-FsCloseHandle :: 00:00:001 - ms]%0a[APPEND :: 00:00:119 ms]%0a'] + Server-Perf: ['[ac0cefa5-5596-48c6-b74c-2c6d1684477c][ AuthTime::0::PostAuthTime::0 + ][S-FsOpenStream :: 00:00:010 ms]%0a[S-FsAppendStream :: 00:00:053 ms]%0a[BufferingTime + :: 00:00:000 ms]%0a[WriteTime :: 00:00:054 ms]%0a[S-FsAppendStream :: 00:00:032 + ms]%0a[S-FsCloseHandle :: 00:00:001 ms]%0a[APPEND :: 00:00:098 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [8fdbd508-a9ce-4190-b57b-ff2075f9ad56] + x-ms-request-id: [ac0cefa5-5596-48c6-b74c-2c6d1684477c] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -99,20 +97,20 @@ interactions: method: GET uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=LISTSTATUS response: - body: {string: '{"FileStatuses":{"FileStatus":[{"length":9,"pathSuffix":"","type":"FILE","blockSize":268435456,"accessTime":1473976967207,"modificationTime":1473976968639,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} + body: {string: '{"FileStatuses":{"FileStatus":[{"length":9,"pathSuffix":"","type":"FILE","blockSize":268435456,"accessTime":1474565136602,"modificationTime":1474565137580,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} headers: Cache-Control: [no-cache] Content-Length: ['287'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:02:48 GMT'] + Date: ['Thu, 22 Sep 2016 17:25:37 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[ed6d9f2e-67f0-4b8e-a690-add553e8f1a0][ AuthTime::0::PostAuthTime::0 - ][S-HdfsListStatus :: 00:00:009 ms]%0a[LISTSTATUS :: 00:00:010 ms]%0a'] + Server-Perf: ['[e58f478b-92bd-4414-b49e-ff80d0013040][ AuthTime::1122.16550572715::PostAuthTime::246.329013452301 + ][S-HdfsListStatus :: 00:00:065 ms]%0a[LISTSTATUS :: 00:00:065 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [ed6d9f2e-67f0-4b8e-a690-add553e8f1a0] + x-ms-request-id: [e58f478b-92bd-4414-b49e-ff80d0013040] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -125,20 +123,20 @@ interactions: method: GET uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir?OP=LISTSTATUS response: - body: {string: '{"FileStatuses":{"FileStatus":[{"length":9,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1473976967207,"modificationTime":1473976968639,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} + body: {string: '{"FileStatuses":{"FileStatus":[{"length":9,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1474565136602,"modificationTime":1474565137580,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} headers: Cache-Control: [no-cache] Content-Length: ['288'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:02:48 GMT'] + Date: ['Thu, 22 Sep 2016 17:25:37 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[45f65a84-9f70-4b9c-a721-17a33b27b91a][ AuthTime::0::PostAuthTime::0 - ][S-HdfsListStatus :: 00:00:012 ms]%0a[LISTSTATUS :: 00:00:012 ms]%0a'] + Server-Perf: ['[1f4fb44e-035d-4792-9999-793bf9653f40][ AuthTime::880.539185918215::PostAuthTime::201.424942480563 + ][S-HdfsListStatus :: 00:00:011 ms]%0a[LISTSTATUS :: 00:00:012 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [45f65a84-9f70-4b9c-a721-17a33b27b91a] + x-ms-request-id: [1f4fb44e-035d-4792-9999-793bf9653f40] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} - request: @@ -157,15 +155,15 @@ interactions: Cache-Control: [no-cache] Content-Length: ['16'] Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 15 Sep 2016 22:02:49 GMT'] + Date: ['Thu, 22 Sep 2016 17:25:38 GMT'] Expires: ['-1'] Pragma: [no-cache] - Server-Perf: ['[f1cf1b88-499d-4925-8802-08e7f76501ec][ AuthTime::0::PostAuthTime::0 - ][S-FsDelete :: 00:00:098 ms]%0a[DELETE :: 00:00:099 ms]%0a'] + Server-Perf: ['[53d291bc-b35b-4c98-b65f-2263b4815167][ AuthTime::1484.81718829851::PostAuthTime::505.060224475963 + ][S-FsDelete :: 00:00:078 ms]%0a[DELETE :: 00:00:087 ms]%0a'] Status: ['0x0'] Strict-Transport-Security: [max-age=15724800; includeSubDomains] X-Content-Type-Options: [nosniff] - x-ms-request-id: [f1cf1b88-499d-4925-8802-08e7f76501ec] + x-ms-request-id: [53d291bc-b35b-4c98-b65f-2263b4815167] x-ms-webhdfs-version: [16.07.18.01] status: {code: 200, message: OK} version: 1 diff --git a/tests/test_transfer.py b/tests/test_transfer.py index 0474ae0..f160380 100644 --- a/tests/test_transfer.py +++ b/tests/test_transfer.py @@ -6,11 +6,13 @@ # license information. # -------------------------------------------------------------------------- +import os import pytest import time -from tests.testing import azure, posix +from adlfs.core import AzureDLPath from adlfs.transfer import ADLTransferClient +from tests.testing import azure, posix @pytest.mark.skipif(True, reason="skip until resolve timing issue") @@ -18,6 +20,7 @@ def test_interrupt(azure): def transfer(adlfs, src, dst, offset, size, retries=5, shutdown_event=None): while shutdown_event and not shutdown_event.is_set(): time.sleep(0.1) + return size, None client = ADLTransferClient(azure, 'foobar', transfer=transfer, chunksize=1, tmp_path=None) @@ -30,9 +33,45 @@ def test_interrupt(azure): assert client.progress[0].state != 'finished' +def test_submit_and_run(azure): + def transfer(adlfs, src, dst, offset, size, retries=5, shutdown_event=None): + time.sleep(0.1) + return size, None + + client = ADLTransferClient(azure, 'foobar', transfer=transfer, chunksize=8, + tmp_path=None) + + client.submit('foo', 'bar', 16) + client.submit('abc', '123', 8) + + nfiles = len(client.progress) + assert nfiles == 2 + assert len([client.progress[i].chunks for i in range(nfiles)]) + + assert all([client.progress[i].state == 'pending' for i in range(nfiles)]) + assert all([chunk.state == 'pending' for f in client.progress + for chunk in f.chunks]) + + expected = {('bar', 0), ('bar', 8), ('123', 0)} + assert {(chunk.name, chunk.offset) for f in client.progress + for chunk in f.chunks} == expected + + client.run() + + assert all([client.progress[i].state == 'finished' for i in range(nfiles)]) + assert all([chunk.state == 'finished' for f in client.progress + for chunk in f.chunks]) + assert all([chunk.expected == chunk.actual for f in client.progress + for chunk in f.chunks]) + + def test_temporary_path(azure): def transfer(adlfs, src, dst, offset, size): - pass + time.sleep(0.1) + return size, None + + client = ADLTransferClient(azure, 'foobar', transfer=transfer, chunksize=8, + tmp_unique=False) + client.submit('foo', AzureDLPath('bar'), 16) - client = ADLTransferClient(azure, 'foobar', transfer=transfer, tmp_unique=False) - assert posix(client.temporary_path) == '/tmp' + assert os.path.dirname(posix(client.progress[0].chunks[0].name)) == '/tmp'
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 0, "test_score": 2 }, "num_modified_files": 6 }
unknown
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": null, "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 -e git+https://github.com/Azure/azure-data-lake-store-python.git@46645c61e903d76585c410baadb1f49885fdbb2e#egg=adlfs attrs==22.2.0 azure==4.0.0 azure-applicationinsights==0.1.1 azure-batch==4.1.3 azure-common==1.1.28 azure-core==1.24.2 azure-cosmosdb-nspkg==2.0.2 azure-cosmosdb-table==1.0.6 azure-datalake-store==0.0.53 azure-eventgrid==1.3.0 azure-graphrbac==0.40.0 azure-keyvault==1.1.0 azure-loganalytics==0.1.1 azure-mgmt==4.0.0 azure-mgmt-advisor==1.0.1 azure-mgmt-applicationinsights==0.1.1 azure-mgmt-authorization==0.50.0 azure-mgmt-batch==5.0.1 azure-mgmt-batchai==2.0.0 azure-mgmt-billing==0.2.0 azure-mgmt-cdn==3.1.0 azure-mgmt-cognitiveservices==3.0.0 azure-mgmt-commerce==1.0.1 azure-mgmt-compute==4.6.2 azure-mgmt-consumption==2.0.0 azure-mgmt-containerinstance==1.5.0 azure-mgmt-containerregistry==2.8.0 azure-mgmt-containerservice==4.4.0 azure-mgmt-cosmosdb==0.4.1 azure-mgmt-datafactory==0.6.0 azure-mgmt-datalake-analytics==0.6.0 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.5.0 azure-mgmt-datamigration==1.0.0 azure-mgmt-devspaces==0.1.0 azure-mgmt-devtestlabs==2.2.0 azure-mgmt-dns==2.1.0 azure-mgmt-eventgrid==1.0.0 azure-mgmt-eventhub==2.6.0 azure-mgmt-hanaonazure==0.1.1 azure-mgmt-iotcentral==0.1.0 azure-mgmt-iothub==0.5.0 azure-mgmt-iothubprovisioningservices==0.2.0 azure-mgmt-keyvault==1.1.0 azure-mgmt-loganalytics==0.2.0 azure-mgmt-logic==3.0.0 azure-mgmt-machinelearningcompute==0.4.1 azure-mgmt-managementgroups==0.1.0 azure-mgmt-managementpartner==0.1.1 azure-mgmt-maps==0.1.0 azure-mgmt-marketplaceordering==0.1.0 azure-mgmt-media==1.0.1 azure-mgmt-monitor==0.5.2 azure-mgmt-msi==0.2.0 azure-mgmt-network==2.7.0 azure-mgmt-notificationhubs==2.1.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-policyinsights==0.1.0 azure-mgmt-powerbiembedded==2.0.0 azure-mgmt-rdbms==1.9.0 azure-mgmt-recoveryservices==0.3.0 azure-mgmt-recoveryservicesbackup==0.3.0 azure-mgmt-redis==5.0.0 azure-mgmt-relay==0.1.0 azure-mgmt-reservations==0.2.1 azure-mgmt-resource==2.2.0 azure-mgmt-scheduler==2.0.0 azure-mgmt-search==2.1.0 azure-mgmt-servicebus==0.5.3 azure-mgmt-servicefabric==0.2.0 azure-mgmt-signalr==0.1.1 azure-mgmt-sql==0.9.1 azure-mgmt-storage==2.0.0 azure-mgmt-subscription==0.2.0 azure-mgmt-trafficmanager==0.50.0 azure-mgmt-web==0.35.0 azure-nspkg==3.0.2 azure-servicebus==0.21.1 azure-servicefabric==6.3.0.0 azure-servicemanagement-legacy==0.20.8 azure-storage-blob==1.5.0 azure-storage-common==1.4.2 azure-storage-file==1.4.0 azure-storage-queue==1.4.0 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 cryptography==40.0.2 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.6.1 msal==1.27.0 msrest==0.7.1 msrestazure==0.6.4.post1 multidict==5.2.0 oauthlib==3.2.2 packaging==21.3 pathlib2==2.3.7.post1 pluggy==1.0.0 py==1.11.0 pycparser==2.21 PyJWT==2.4.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==6.0.1 requests==2.27.1 requests-oauthlib==2.0.0 six==1.17.0 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.26.20 vcrpy==4.1.1 wrapt==1.16.0 yarl==1.7.2 zipp==3.6.0
name: azure-data-lake-store-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - attrs==22.2.0 - azure==4.0.0 - azure-applicationinsights==0.1.1 - azure-batch==4.1.3 - azure-common==1.1.28 - azure-core==1.24.2 - azure-cosmosdb-nspkg==2.0.2 - azure-cosmosdb-table==1.0.6 - azure-datalake-store==0.0.53 - azure-eventgrid==1.3.0 - azure-graphrbac==0.40.0 - azure-keyvault==1.1.0 - azure-loganalytics==0.1.1 - azure-mgmt==4.0.0 - azure-mgmt-advisor==1.0.1 - azure-mgmt-applicationinsights==0.1.1 - azure-mgmt-authorization==0.50.0 - azure-mgmt-batch==5.0.1 - azure-mgmt-batchai==2.0.0 - azure-mgmt-billing==0.2.0 - azure-mgmt-cdn==3.1.0 - azure-mgmt-cognitiveservices==3.0.0 - azure-mgmt-commerce==1.0.1 - azure-mgmt-compute==4.6.2 - azure-mgmt-consumption==2.0.0 - azure-mgmt-containerinstance==1.5.0 - azure-mgmt-containerregistry==2.8.0 - azure-mgmt-containerservice==4.4.0 - azure-mgmt-cosmosdb==0.4.1 - azure-mgmt-datafactory==0.6.0 - azure-mgmt-datalake-analytics==0.6.0 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.5.0 - azure-mgmt-datamigration==1.0.0 - azure-mgmt-devspaces==0.1.0 - azure-mgmt-devtestlabs==2.2.0 - azure-mgmt-dns==2.1.0 - azure-mgmt-eventgrid==1.0.0 - azure-mgmt-eventhub==2.6.0 - azure-mgmt-hanaonazure==0.1.1 - azure-mgmt-iotcentral==0.1.0 - azure-mgmt-iothub==0.5.0 - azure-mgmt-iothubprovisioningservices==0.2.0 - azure-mgmt-keyvault==1.1.0 - azure-mgmt-loganalytics==0.2.0 - azure-mgmt-logic==3.0.0 - azure-mgmt-machinelearningcompute==0.4.1 - azure-mgmt-managementgroups==0.1.0 - azure-mgmt-managementpartner==0.1.1 - azure-mgmt-maps==0.1.0 - azure-mgmt-marketplaceordering==0.1.0 - azure-mgmt-media==1.0.1 - azure-mgmt-monitor==0.5.2 - azure-mgmt-msi==0.2.0 - azure-mgmt-network==2.7.0 - azure-mgmt-notificationhubs==2.1.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-policyinsights==0.1.0 - azure-mgmt-powerbiembedded==2.0.0 - azure-mgmt-rdbms==1.9.0 - azure-mgmt-recoveryservices==0.3.0 - azure-mgmt-recoveryservicesbackup==0.3.0 - azure-mgmt-redis==5.0.0 - azure-mgmt-relay==0.1.0 - azure-mgmt-reservations==0.2.1 - azure-mgmt-resource==2.2.0 - azure-mgmt-scheduler==2.0.0 - azure-mgmt-search==2.1.0 - azure-mgmt-servicebus==0.5.3 - azure-mgmt-servicefabric==0.2.0 - azure-mgmt-signalr==0.1.1 - azure-mgmt-sql==0.9.1 - azure-mgmt-storage==2.0.0 - azure-mgmt-subscription==0.2.0 - azure-mgmt-trafficmanager==0.50.0 - azure-mgmt-web==0.35.0 - azure-nspkg==3.0.2 - azure-servicebus==0.21.1 - azure-servicefabric==6.3.0.0 - azure-servicemanagement-legacy==0.20.8 - azure-storage-blob==1.5.0 - azure-storage-common==1.4.2 - azure-storage-file==1.4.0 - azure-storage-queue==1.4.0 - cffi==1.15.1 - charset-normalizer==2.0.12 - cryptography==40.0.2 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.6.1 - msal==1.27.0 - msrest==0.7.1 - msrestazure==0.6.4.post1 - multidict==5.2.0 - oauthlib==3.2.2 - packaging==21.3 - pathlib2==2.3.7.post1 - pluggy==1.0.0 - py==1.11.0 - pycparser==2.21 - pyjwt==2.4.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==6.0.1 - requests==2.27.1 - requests-oauthlib==2.0.0 - six==1.17.0 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.26.20 - vcrpy==4.1.1 - wrapt==1.16.0 - yarl==1.7.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-data-lake-store-python
[ "tests/test_transfer.py::test_submit_and_run", "tests/test_transfer.py::test_temporary_path" ]
[]
[]
[]
MIT License
null
Azure__azure-data-lake-store-python-83
9143406b26b3dc695c325b4fbf563c2093e9982f
2016-09-29 04:13:44
9143406b26b3dc695c325b4fbf563c2093e9982f
diff --git a/adlfs/cli.py b/adlfs/cli.py index f8d2a1f..320033f 100644 --- a/adlfs/cli.py +++ b/adlfs/cli.py @@ -91,13 +91,13 @@ class AzureDataLakeFSCommand(cmd.Cmd, object): def _parse_ownership(self, ownership): if ':' in ownership: - user, group = ownership.split(':') - if not user: - user = None + owner, group = ownership.split(':') + if not owner: + owner = None else: - user = ownership + owner = ownership group = None - return user, group + return owner, group def do_chown(self, line): parser = argparse.ArgumentParser(prog="chown", add_help=False) @@ -105,10 +105,10 @@ class AzureDataLakeFSCommand(cmd.Cmd, object): parser.add_argument('files', type=str, nargs='+') args = parser.parse_args(line.split()) - user, group = self._parse_ownership(args.ownership) + owner, group = self._parse_ownership(args.ownership) for f in args.files: - self._fs.chown(f, user=user, group=group) + self._fs.chown(f, owner=owner, group=group) def help_chown(self): print("chown owner[:group] file ...")
SetOwner and SetPermission are now supported, need tests Please add tests and recordings for these two APIs now that they are supported
Azure/azure-data-lake-store-python
diff --git a/tests/recordings/test_cli/test_chgrp.yaml b/tests/recordings/test_cli/test_chgrp.yaml new file mode 100644 index 0000000..5a4b97d --- /dev/null +++ b/tests/recordings/test_cli/test_chgrp.yaml @@ -0,0 +1,113 @@ +interactions: +- request: + body: '123456' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['6'] + User-Agent: [python-requests/2.11.1] + method: PUT + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/foo/bar?overwrite=true&write=true&OP=CREATE + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + ContentLength: ['0'] + Date: ['Thu, 29 Sep 2016 04:09:35 GMT'] + Expires: ['-1'] + Location: ['https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/foo/bar?overwrite=true&write=true&OP=CREATE'] + Pragma: [no-cache] + Server-Perf: ['[bd1d8cd5-2d95-4f5f-8a53-2c3d201e18a6][ AuthTime::916.891327850232::PostAuthTime::207.840105100379 + ][S-HdfsGetFileStatusV2 :: 00:00:005 ms]%0a[S-HdfsCheckAccess :: 00:00:002 + ms]%0a[S-FsDelete :: 00:00:005 ms]%0a[S-FsOpenStream :: 00:00:061 ms]%0a[S-FsAppendStream + :: 00:00:147 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:147 + ms]%0a[S-FsAppendStream :: 00:00:034 ms]%0a[S-FsCloseHandle :: 00:00:001 + ms]%0a[CREATE :: 00:00:268 ms]%0a'] + Status: ['0x0'] + Strict-Transport-Security: [max-age=15724800; includeSubDomains] + X-Content-Type-Options: [nosniff] + x-ms-request-id: [bd1d8cd5-2d95-4f5f-8a53-2c3d201e18a6] + x-ms-webhdfs-version: [16.07.18.01] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [python-requests/2.11.1] + method: PUT + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/foo/bar?group=foo&OP=SETOWNER + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Thu, 29 Sep 2016 04:09:35 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server-Perf: ['[ad84325f-4c08-46a9-bb80-de4087dec9c1][ AuthTime::862.151547083054::PostAuthTime::171.917123971919 + ][SETOWNER :: 00:00:000 ms]%0a'] + Status: ['0x0'] + Strict-Transport-Security: [max-age=15724800; includeSubDomains] + X-Content-Type-Options: [nosniff] + x-ms-request-id: [ad84325f-4c08-46a9-bb80-de4087dec9c1] + x-ms-webhdfs-version: [16.07.18.01] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.11.1] + method: GET + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/foo?OP=LISTSTATUS + response: + body: {string: '{"FileStatuses":{"FileStatus":[{"length":6,"pathSuffix":"bar","type":"FILE","blockSize":268435456,"accessTime":1475122175622,"modificationTime":1475122175761,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['290'] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 29 Sep 2016 04:09:35 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server-Perf: ['[886a16e5-6b2d-4dc4-ae05-51f0e7426d8a][ AuthTime::990.876410298956::PostAuthTime::215.538071122432 + ][S-HdfsListStatus :: 00:00:031 ms]%0a[LISTSTATUS :: 00:00:031 ms]%0a'] + Status: ['0x0'] + Strict-Transport-Security: [max-age=15724800; includeSubDomains] + X-Content-Type-Options: [nosniff] + x-ms-request-id: [886a16e5-6b2d-4dc4-ae05-51f0e7426d8a] + x-ms-webhdfs-version: [16.07.18.01] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [python-requests/2.11.1] + method: DELETE + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/foo/bar?recursive=False&OP=DELETE + response: + body: {string: '{"boolean":true}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['16'] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 29 Sep 2016 04:09:36 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server-Perf: ['[ba03af52-3d38-43d3-b915-87fe720fe72b][ AuthTime::844.619155876924::PostAuthTime::280.969511600577 + ][S-FsDelete :: 00:00:083 ms]%0a[DELETE :: 00:00:091 ms]%0a'] + Status: ['0x0'] + Strict-Transport-Security: [max-age=15724800; includeSubDomains] + X-Content-Type-Options: [nosniff] + x-ms-request-id: [ba03af52-3d38-43d3-b915-87fe720fe72b] + x-ms-webhdfs-version: [16.07.18.01] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/recordings/test_cli/test_chown.yaml b/tests/recordings/test_cli/test_chown.yaml new file mode 100644 index 0000000..9b1b17c --- /dev/null +++ b/tests/recordings/test_cli/test_chown.yaml @@ -0,0 +1,165 @@ +interactions: +- request: + body: '123456' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['6'] + User-Agent: [python-requests/2.11.1] + method: PUT + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/foo/bar?overwrite=true&write=true&OP=CREATE + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + ContentLength: ['0'] + Date: ['Thu, 29 Sep 2016 04:09:36 GMT'] + Expires: ['-1'] + Location: ['https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/foo/bar?overwrite=true&write=true&OP=CREATE'] + Pragma: [no-cache] + Server-Perf: ['[a70cb23e-2849-41d0-92d6-ecd4f18309d6][ AuthTime::982.749286031361::PostAuthTime::208.26758150447 + ][S-HdfsGetFileStatusV2 :: 00:00:006 ms]%0a[S-HdfsCheckAccess :: 00:00:002 + ms]%0a[S-FsDelete :: 00:00:005 ms]%0a[S-FsOpenStream :: 00:00:036 ms]%0a[S-FsAppendStream + :: 00:00:196 ms]%0a[BufferingTime :: 00:00:000 ms]%0a[WriteTime :: 00:00:196 + ms]%0a[S-FsAppendStream :: 00:00:033 ms]%0a[S-FsCloseHandle :: 00:00:001 + ms]%0a[CREATE :: 00:00:296 ms]%0a'] + Status: ['0x0'] + Strict-Transport-Security: [max-age=15724800; includeSubDomains] + X-Content-Type-Options: [nosniff] + x-ms-request-id: [a70cb23e-2849-41d0-92d6-ecd4f18309d6] + x-ms-webhdfs-version: [16.07.18.01] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [python-requests/2.11.1] + method: PUT + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/foo/bar?owner=foo&OP=SETOWNER + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Thu, 29 Sep 2016 04:09:37 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server-Perf: ['[87b33574-03ce-45bb-97fd-5c35cae5c524][ AuthTime::945.117335675742::PostAuthTime::220.66992995868 + ][SETOWNER :: 00:00:000 ms]%0a'] + Status: ['0x0'] + Strict-Transport-Security: [max-age=15724800; includeSubDomains] + X-Content-Type-Options: [nosniff] + x-ms-request-id: [87b33574-03ce-45bb-97fd-5c35cae5c524] + x-ms-webhdfs-version: [16.07.18.01] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [python-requests/2.11.1] + method: PUT + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/foo/bar?group=foo&OP=SETOWNER + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Thu, 29 Sep 2016 04:09:37 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server-Perf: ['[bfe54b19-e547-4b94-a69d-f8bcee43e4c8][ AuthTime::932.288884678858::PostAuthTime::213.400070392087 + ][SETOWNER :: 00:00:000 ms]%0a'] + Status: ['0x0'] + Strict-Transport-Security: [max-age=15724800; includeSubDomains] + X-Content-Type-Options: [nosniff] + x-ms-request-id: [bfe54b19-e547-4b94-a69d-f8bcee43e4c8] + x-ms-webhdfs-version: [16.07.18.01] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [python-requests/2.11.1] + method: PUT + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/foo/bar?group=foo&owner=foo&OP=SETOWNER + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Thu, 29 Sep 2016 04:09:37 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server-Perf: ['[bba612c2-e2c2-480f-b7f9-4883970dc590][ AuthTime::1009.26643436432::PostAuthTime::203.13625267926 + ][SETOWNER :: 00:00:000 ms]%0a'] + Status: ['0x0'] + Strict-Transport-Security: [max-age=15724800; includeSubDomains] + X-Content-Type-Options: [nosniff] + x-ms-request-id: [bba612c2-e2c2-480f-b7f9-4883970dc590] + x-ms-webhdfs-version: [16.07.18.01] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.11.1] + method: GET + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/foo?OP=LISTSTATUS + response: + body: {string: '{"FileStatuses":{"FileStatus":[{"length":6,"pathSuffix":"bar","type":"FILE","blockSize":268435456,"accessTime":1475122177420,"modificationTime":1475122177607,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['290'] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 29 Sep 2016 04:09:38 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server-Perf: ['[590d1d73-6cab-46a8-b06f-559563296587][ AuthTime::907.482928030873::PostAuthTime::203.563559727943 + ][S-HdfsListStatus :: 00:00:011 ms]%0a[LISTSTATUS :: 00:00:012 ms]%0a'] + Status: ['0x0'] + Strict-Transport-Security: [max-age=15724800; includeSubDomains] + X-Content-Type-Options: [nosniff] + x-ms-request-id: [590d1d73-6cab-46a8-b06f-559563296587] + x-ms-webhdfs-version: [16.07.18.01] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [python-requests/2.11.1] + method: DELETE + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/foo/bar?recursive=False&OP=DELETE + response: + body: {string: '{"boolean":true}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['16'] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 29 Sep 2016 04:09:38 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server-Perf: ['[83093651-8421-45c0-a12d-468c16ec2267][ AuthTime::990.019830332411::PostAuthTime::239.058784084587 + ][S-FsDelete :: 00:00:095 ms]%0a[DELETE :: 00:00:103 ms]%0a'] + Status: ['0x0'] + Strict-Transport-Security: [max-age=15724800; includeSubDomains] + X-Content-Type-Options: [nosniff] + x-ms-request-id: [83093651-8421-45c0-a12d-468c16ec2267] + x-ms-webhdfs-version: [16.07.18.01] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/recordings/test_core/test_chown.yaml b/tests/recordings/test_core/test_chown.yaml new file mode 100644 index 0000000..aa4693e --- /dev/null +++ b/tests/recordings/test_core/test_chown.yaml @@ -0,0 +1,164 @@ +interactions: +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [python-requests/2.11.1] + method: PUT + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=CREATE&overwrite=true&write=true + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + ContentLength: ['0'] + Date: ['Thu, 29 Sep 2016 03:59:59 GMT'] + Expires: ['-1'] + Location: ['https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=CREATE&overwrite=true&write=true'] + Pragma: [no-cache] + Server-Perf: ['[d869d515-b22a-4605-ac9e-4e0f7c5b6d8c][ AuthTime::897.647641440444::PostAuthTime::207.840282868059 + ][S-HdfsGetFileStatusV2 :: 00:00:006 ms]%0a[S-HdfsCheckAccess :: 00:00:002 + ms]%0a[S-FsDelete :: 00:00:006 ms]%0a[S-FsOpenStream :: 00:00:044 ms]%0a[BufferingTime + :: 00:00:000 ms]%0a[WriteTime :: 00:00:000 ms]%0a[S-FsAppendStream :: 00:00:027 + ms]%0a[S-FsCloseHandle :: 00:00:001 ms]%0a[CREATE :: 00:00:096 ms]%0a'] + Status: ['0x0'] + Strict-Transport-Security: [max-age=15724800; includeSubDomains] + X-Content-Type-Options: [nosniff] + x-ms-request-id: [d869d515-b22a-4605-ac9e-4e0f7c5b6d8c] + x-ms-webhdfs-version: [16.07.18.01] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.11.1] + method: GET + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir?OP=LISTSTATUS + response: + body: {string: '{"FileStatuses":{"FileStatus":[{"length":0,"pathSuffix":"a","type":"FILE","blockSize":268435456,"accessTime":1475121600130,"modificationTime":1475121600130,"replication":1,"permission":"770","owner":"49b2f9ec-818a-49ca-9424-249e1f19f7d7","group":"49b2f9ec-818a-49ca-9424-249e1f19f7d7"}]}}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['288'] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 29 Sep 2016 04:00:00 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server-Perf: ['[b7c2f7c8-7e37-46e8-8332-33364ce07654][ AuthTime::909.193157359269::PostAuthTime::209.122979279719 + ][S-HdfsListStatus :: 00:00:011 ms]%0a[LISTSTATUS :: 00:00:012 ms]%0a'] + Status: ['0x0'] + Strict-Transport-Security: [max-age=15724800; includeSubDomains] + X-Content-Type-Options: [nosniff] + x-ms-request-id: [b7c2f7c8-7e37-46e8-8332-33364ce07654] + x-ms-webhdfs-version: [16.07.18.01] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [python-requests/2.11.1] + method: PUT + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=SETOWNER&owner=foo + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Thu, 29 Sep 2016 04:00:00 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server-Perf: ['[c9893c0b-74c5-4731-9d7e-30d5438e89bb][ AuthTime::1052.88411988168::PostAuthTime::266.856088873341 + ][SETOWNER :: 00:00:000 ms]%0a'] + Status: ['0x0'] + Strict-Transport-Security: [max-age=15724800; includeSubDomains] + X-Content-Type-Options: [nosniff] + x-ms-request-id: [c9893c0b-74c5-4731-9d7e-30d5438e89bb] + x-ms-webhdfs-version: [16.07.18.01] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [python-requests/2.11.1] + method: PUT + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=SETOWNER&group=bar + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Thu, 29 Sep 2016 04:00:00 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server-Perf: ['[9847e1b4-5dbd-42ca-974e-9dd95db3f30a][ AuthTime::0::PostAuthTime::0 + ][SETOWNER :: 00:00:000 ms]%0a'] + Status: ['0x0'] + Strict-Transport-Security: [max-age=15724800; includeSubDomains] + X-Content-Type-Options: [nosniff] + x-ms-request-id: [9847e1b4-5dbd-42ca-974e-9dd95db3f30a] + x-ms-webhdfs-version: [16.07.18.01] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [python-requests/2.11.1] + method: PUT + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=SETOWNER&owner=foo&group=bar + response: + body: {string: ''} + headers: + Cache-Control: [no-cache] + Content-Length: ['0'] + Date: ['Thu, 29 Sep 2016 04:00:01 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server-Perf: ['[5e3ddf51-8148-4d3b-a582-5f48a8ba63a9][ AuthTime::946.399490920039::PostAuthTime::216.393195845251 + ][SETOWNER :: 00:00:000 ms]%0a'] + Status: ['0x0'] + Strict-Transport-Security: [max-age=15724800; includeSubDomains] + X-Content-Type-Options: [nosniff] + x-ms-request-id: [5e3ddf51-8148-4d3b-a582-5f48a8ba63a9] + x-ms-webhdfs-version: [16.07.18.01] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [python-requests/2.11.1] + method: DELETE + uri: https://fakestore.azuredatalakestore.net/webhdfs/v1/azure_test_dir/a?OP=DELETE&recursive=True + response: + body: {string: '{"boolean":true}'} + headers: + Cache-Control: [no-cache] + Content-Length: ['16'] + Content-Type: [application/json; charset=utf-8] + Date: ['Thu, 29 Sep 2016 04:00:01 GMT'] + Expires: ['-1'] + Pragma: [no-cache] + Server-Perf: ['[b928f672-0d84-4a07-9932-55e7b00d2e3f][ AuthTime::1142.69292351484::PostAuthTime::316.892012097492 + ][S-FsDelete :: 00:00:073 ms]%0a[DELETE :: 00:00:082 ms]%0a'] + Status: ['0x0'] + Strict-Transport-Security: [max-age=15724800; includeSubDomains] + X-Content-Type-Options: [nosniff] + x-ms-request-id: [b928f672-0d84-4a07-9932-55e7b00d2e3f] + x-ms-webhdfs-version: [16.07.18.01] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/test_cli.py b/tests/test_cli.py index 20b84f3..1b14260 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -55,6 +55,13 @@ def test_cat(capsys, azure, client): assert read_stdout(capsys) == '123456' +@my_vcr.use_cassette +def test_chgrp(capsys, azure, client): + with setup_file(azure) as azurefile: + client.onecmd('chgrp foo ' + azurefile) + assert not read_stdout(capsys) + + @my_vcr.use_cassette def test_chmod(capsys, azure, client): with setup_file(azure) as azurefile: @@ -68,6 +75,19 @@ def test_chmod(capsys, azure, client): assert 'permission = 550' in read_stdout(capsys) +@my_vcr.use_cassette +def test_chown(capsys, azure, client): + with setup_file(azure) as azurefile: + client.onecmd('chown foo ' + azurefile) + assert not read_stdout(capsys) + + client.onecmd('chown :foo ' + azurefile) + assert not read_stdout(capsys) + + client.onecmd('chown foo:foo ' + azurefile) + assert not read_stdout(capsys) + + @my_vcr.use_cassette def test_df(capsys, azure, client): client.onecmd('df') diff --git a/tests/test_core.py b/tests/test_core.py index 8c6216f..a986219 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -605,6 +605,27 @@ def test_chmod(azure): azure.chmod(test_dir / 'deep', '770') +@my_vcr.use_cassette +def test_chown(azure): + with azure_teardown(azure): + azure.touch(a) + + # Account doesn't have permission to change owner + owner = azure.info(a)['owner'] + azure.chown(a, owner='foo') + assert owner == azure.info(a)['owner'] + + # Account doesn't have permission to change group + group = azure.info(a)['group'] + azure.chown(a, group='bar') + assert group == azure.info(a)['group'] + + # Account doesn't have permission to change owner/group + azure.chown(a, owner='foo', group='bar') + assert owner == azure.info(a)['owner'] + assert group == azure.info(a)['group'] + + @pytest.mark.skipif(sys.platform != 'win32', reason="requires windows") def test_backslash(): from adlfs.core import AzureDLPath
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_short_problem_statement" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 2, "test_score": 0 }, "num_modified_files": 1 }
unknown
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest", "vcrpy" ], "pre_install": null, "python": "3.5", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 -e git+https://github.com/Azure/azure-data-lake-store-python.git@9143406b26b3dc695c325b4fbf563c2093e9982f#egg=adlfs attrs==22.2.0 azure==4.0.0 azure-applicationinsights==0.1.1 azure-batch==4.1.3 azure-common==1.1.28 azure-core==1.24.2 azure-cosmosdb-nspkg==2.0.2 azure-cosmosdb-table==1.0.6 azure-datalake-store==0.0.53 azure-eventgrid==1.3.0 azure-graphrbac==0.40.0 azure-keyvault==1.1.0 azure-loganalytics==0.1.1 azure-mgmt==4.0.0 azure-mgmt-advisor==1.0.1 azure-mgmt-applicationinsights==0.1.1 azure-mgmt-authorization==0.50.0 azure-mgmt-batch==5.0.1 azure-mgmt-batchai==2.0.0 azure-mgmt-billing==0.2.0 azure-mgmt-cdn==3.1.0 azure-mgmt-cognitiveservices==3.0.0 azure-mgmt-commerce==1.0.1 azure-mgmt-compute==4.6.2 azure-mgmt-consumption==2.0.0 azure-mgmt-containerinstance==1.5.0 azure-mgmt-containerregistry==2.8.0 azure-mgmt-containerservice==4.4.0 azure-mgmt-cosmosdb==0.4.1 azure-mgmt-datafactory==0.6.0 azure-mgmt-datalake-analytics==0.6.0 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.5.0 azure-mgmt-datamigration==1.0.0 azure-mgmt-devspaces==0.1.0 azure-mgmt-devtestlabs==2.2.0 azure-mgmt-dns==2.1.0 azure-mgmt-eventgrid==1.0.0 azure-mgmt-eventhub==2.6.0 azure-mgmt-hanaonazure==0.1.1 azure-mgmt-iotcentral==0.1.0 azure-mgmt-iothub==0.5.0 azure-mgmt-iothubprovisioningservices==0.2.0 azure-mgmt-keyvault==1.1.0 azure-mgmt-loganalytics==0.2.0 azure-mgmt-logic==3.0.0 azure-mgmt-machinelearningcompute==0.4.1 azure-mgmt-managementgroups==0.1.0 azure-mgmt-managementpartner==0.1.1 azure-mgmt-maps==0.1.0 azure-mgmt-marketplaceordering==0.1.0 azure-mgmt-media==1.0.1 azure-mgmt-monitor==0.5.2 azure-mgmt-msi==0.2.0 azure-mgmt-network==2.7.0 azure-mgmt-notificationhubs==2.1.0 azure-mgmt-nspkg==3.0.2 azure-mgmt-policyinsights==0.1.0 azure-mgmt-powerbiembedded==2.0.0 azure-mgmt-rdbms==1.9.0 azure-mgmt-recoveryservices==0.3.0 azure-mgmt-recoveryservicesbackup==0.3.0 azure-mgmt-redis==5.0.0 azure-mgmt-relay==0.1.0 azure-mgmt-reservations==0.2.1 azure-mgmt-resource==2.2.0 azure-mgmt-scheduler==2.0.0 azure-mgmt-search==2.1.0 azure-mgmt-servicebus==0.5.3 azure-mgmt-servicefabric==0.2.0 azure-mgmt-signalr==0.1.1 azure-mgmt-sql==0.9.1 azure-mgmt-storage==2.0.0 azure-mgmt-subscription==0.2.0 azure-mgmt-trafficmanager==0.50.0 azure-mgmt-web==0.35.0 azure-nspkg==3.0.2 azure-servicebus==0.21.1 azure-servicefabric==6.3.0.0 azure-servicemanagement-legacy==0.20.8 azure-storage-blob==1.5.0 azure-storage-common==1.4.2 azure-storage-file==1.4.0 azure-storage-queue==1.4.0 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 cryptography==40.0.2 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.6.1 msal==1.27.0 msrest==0.7.1 msrestazure==0.6.4.post1 multidict==5.2.0 oauthlib==3.2.2 packaging==21.3 pathlib2==2.3.7.post1 pluggy==1.0.0 py==1.11.0 pycparser==2.21 PyJWT==2.4.0 pyparsing==3.1.4 pytest==7.0.1 python-dateutil==2.9.0.post0 PyYAML==6.0.1 requests==2.27.1 requests-oauthlib==2.0.0 six==1.17.0 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.26.20 vcrpy==4.1.1 wrapt==1.16.0 yarl==1.7.2 zipp==3.6.0
name: azure-data-lake-store-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - attrs==22.2.0 - azure==4.0.0 - azure-applicationinsights==0.1.1 - azure-batch==4.1.3 - azure-common==1.1.28 - azure-core==1.24.2 - azure-cosmosdb-nspkg==2.0.2 - azure-cosmosdb-table==1.0.6 - azure-datalake-store==0.0.53 - azure-eventgrid==1.3.0 - azure-graphrbac==0.40.0 - azure-keyvault==1.1.0 - azure-loganalytics==0.1.1 - azure-mgmt==4.0.0 - azure-mgmt-advisor==1.0.1 - azure-mgmt-applicationinsights==0.1.1 - azure-mgmt-authorization==0.50.0 - azure-mgmt-batch==5.0.1 - azure-mgmt-batchai==2.0.0 - azure-mgmt-billing==0.2.0 - azure-mgmt-cdn==3.1.0 - azure-mgmt-cognitiveservices==3.0.0 - azure-mgmt-commerce==1.0.1 - azure-mgmt-compute==4.6.2 - azure-mgmt-consumption==2.0.0 - azure-mgmt-containerinstance==1.5.0 - azure-mgmt-containerregistry==2.8.0 - azure-mgmt-containerservice==4.4.0 - azure-mgmt-cosmosdb==0.4.1 - azure-mgmt-datafactory==0.6.0 - azure-mgmt-datalake-analytics==0.6.0 - azure-mgmt-datalake-nspkg==3.0.1 - azure-mgmt-datalake-store==0.5.0 - azure-mgmt-datamigration==1.0.0 - azure-mgmt-devspaces==0.1.0 - azure-mgmt-devtestlabs==2.2.0 - azure-mgmt-dns==2.1.0 - azure-mgmt-eventgrid==1.0.0 - azure-mgmt-eventhub==2.6.0 - azure-mgmt-hanaonazure==0.1.1 - azure-mgmt-iotcentral==0.1.0 - azure-mgmt-iothub==0.5.0 - azure-mgmt-iothubprovisioningservices==0.2.0 - azure-mgmt-keyvault==1.1.0 - azure-mgmt-loganalytics==0.2.0 - azure-mgmt-logic==3.0.0 - azure-mgmt-machinelearningcompute==0.4.1 - azure-mgmt-managementgroups==0.1.0 - azure-mgmt-managementpartner==0.1.1 - azure-mgmt-maps==0.1.0 - azure-mgmt-marketplaceordering==0.1.0 - azure-mgmt-media==1.0.1 - azure-mgmt-monitor==0.5.2 - azure-mgmt-msi==0.2.0 - azure-mgmt-network==2.7.0 - azure-mgmt-notificationhubs==2.1.0 - azure-mgmt-nspkg==3.0.2 - azure-mgmt-policyinsights==0.1.0 - azure-mgmt-powerbiembedded==2.0.0 - azure-mgmt-rdbms==1.9.0 - azure-mgmt-recoveryservices==0.3.0 - azure-mgmt-recoveryservicesbackup==0.3.0 - azure-mgmt-redis==5.0.0 - azure-mgmt-relay==0.1.0 - azure-mgmt-reservations==0.2.1 - azure-mgmt-resource==2.2.0 - azure-mgmt-scheduler==2.0.0 - azure-mgmt-search==2.1.0 - azure-mgmt-servicebus==0.5.3 - azure-mgmt-servicefabric==0.2.0 - azure-mgmt-signalr==0.1.1 - azure-mgmt-sql==0.9.1 - azure-mgmt-storage==2.0.0 - azure-mgmt-subscription==0.2.0 - azure-mgmt-trafficmanager==0.50.0 - azure-mgmt-web==0.35.0 - azure-nspkg==3.0.2 - azure-servicebus==0.21.1 - azure-servicefabric==6.3.0.0 - azure-servicemanagement-legacy==0.20.8 - azure-storage-blob==1.5.0 - azure-storage-common==1.4.2 - azure-storage-file==1.4.0 - azure-storage-queue==1.4.0 - cffi==1.15.1 - charset-normalizer==2.0.12 - cryptography==40.0.2 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.6.1 - msal==1.27.0 - msrest==0.7.1 - msrestazure==0.6.4.post1 - multidict==5.2.0 - oauthlib==3.2.2 - packaging==21.3 - pathlib2==2.3.7.post1 - pluggy==1.0.0 - py==1.11.0 - pycparser==2.21 - pyjwt==2.4.0 - pyparsing==3.1.4 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - pyyaml==6.0.1 - requests==2.27.1 - requests-oauthlib==2.0.0 - six==1.17.0 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.26.20 - vcrpy==4.1.1 - wrapt==1.16.0 - yarl==1.7.2 - zipp==3.6.0 prefix: /opt/conda/envs/azure-data-lake-store-python
[ "tests/test_cli.py::test_chown" ]
[ "tests/test_core.py::test_ls_touch", "tests/test_core.py::test_rm", "tests/test_core.py::test_bad_open", "tests/test_core.py::test_info", "tests/test_core.py::test_exists", "tests/test_core.py::test_read_delimited_block" ]
[ "tests/test_cli.py::test_cat", "tests/test_cli.py::test_chgrp", "tests/test_cli.py::test_chmod", "tests/test_cli.py::test_df", "tests/test_cli.py::test_du", "tests/test_cli.py::test_exists", "tests/test_cli.py::test_get", "tests/test_cli.py::test_head", "tests/test_cli.py::test_head_bytes", "tests/test_cli.py::test_info", "tests/test_cli.py::test_ls", "tests/test_cli.py::test_ls_detailed", "tests/test_cli.py::test_mkdir_and_rmdir", "tests/test_cli.py::test_mv", "tests/test_cli.py::test_put", "tests/test_cli.py::test_tail", "tests/test_cli.py::test_tail_bytes", "tests/test_cli.py::test_touch_and_rm", "tests/test_core.py::test_simple", "tests/test_core.py::test_idempotent_connect", "tests/test_core.py::test_pickle", "tests/test_core.py::test_seek", "tests/test_core.py::test_concat", "tests/test_core.py::test_errors", "tests/test_core.py::test_glob_walk", "tests/test_core.py::test_df", "tests/test_core.py::test_move", "tests/test_core.py::test_cat", "tests/test_core.py::test_full_read", "tests/test_core.py::test_tail_head", "tests/test_core.py::test_readline", "tests/test_core.py::test_touch_exists", "tests/test_core.py::test_write_in_read_mode", "tests/test_core.py::test_readlines", "tests/test_core.py::test_put", "tests/test_core.py::test_get", "tests/test_core.py::test_du", "tests/test_core.py::test_text_bytes", "tests/test_core.py::test_append", "tests/test_core.py::test_write_empty", "tests/test_core.py::test_write_blocks", "tests/test_core.py::test_gzip", "tests/test_core.py::test_fooable", "tests/test_core.py::test_closed", "tests/test_core.py::test_TextIOWrapper", "tests/test_core.py::test_array", "tests/test_core.py::test_delimiters_newline", "tests/test_core.py::test_delimiters_dash", "tests/test_core.py::test_chmod", "tests/test_core.py::test_chown", "tests/test_core.py::test_forward_slash" ]
[]
MIT License
null
Azure__azure-functions-durable-python-494
354ace05d704ae63f9a6488bd6a228adb949e2b2
2024-04-18 20:59:18
74d918127ed998dac15e5a7a82da3765a11df30a
cgillum: It seems to me that this is a breaking change. Previously we serialized `str` as JSON, whereas with this PR, we won't serialize it anymore. To avoid breaking users that depend on the existing behavior, should we add an opt-in flag value indicating whether `str` content should be serialized? Here's an example that introduces an optional `is_raw_str` parameter, controlling the behavior of `str` serialization. ```python def call_http(self, method: str, uri: str, content: Optional[str] = None, headers: Optional[Dict[str, str]] = None, token_source: TokenSource = None, is_raw_str: bool = False) -> TaskBase: if content is not None: if isinstance(content, str) and is_raw_str: # don't serialize the str value - use it as the raw HTTP request payload json_content = content else: json_content = json.dumps(content) ``` nytian: > Hi @nytian, what are your thoughts about my suggestion to avoid a breaking change? > > Even if we decide that a breaking change is the right thing to do, it would be good to add my suggested parameter (we can just change the default value) so that in the 1% chance that a customer is relying on `str` being serialized, they have a way to access the old behavior. Thanks, @cgillum ! It's good to me as we don't want to break customer. My hesitation is around what we want to take here—whether we should leave the string as-is or serialize it into a JSON string. That's why I haven't addressed this feedback yet haha. But I will make the changes.
diff --git a/azure/durable_functions/models/DurableOrchestrationContext.py b/azure/durable_functions/models/DurableOrchestrationContext.py index df10100..01ec900 100644 --- a/azure/durable_functions/models/DurableOrchestrationContext.py +++ b/azure/durable_functions/models/DurableOrchestrationContext.py @@ -214,7 +214,8 @@ class DurableOrchestrationContext: def call_http(self, method: str, uri: str, content: Optional[str] = None, headers: Optional[Dict[str, str]] = None, - token_source: TokenSource = None) -> TaskBase: + token_source: TokenSource = None, + is_raw_str: bool = False) -> TaskBase: """Schedule a durable HTTP call to the specified endpoint. Parameters @@ -229,6 +230,9 @@ class DurableOrchestrationContext: The HTTP request headers. token_source: TokenSource The source of OAuth token to add to the request. + is_raw_str: bool, optional + If True, send string content as-is. + If False (default), serialize content to JSON. Returns ------- @@ -236,10 +240,21 @@ class DurableOrchestrationContext: The durable HTTP request to schedule. """ json_content: Optional[str] = None - if content and content is not isinstance(content, str): - json_content = json.dumps(content) - else: - json_content = content + + # validate parameters + if (not isinstance(content, str)) and is_raw_str: + raise TypeError( + "Invalid use of 'is_raw_str' parameter: 'is_raw_str' is " + "set to 'True' but 'content' is not an instance of type 'str'. " + "Either set 'is_raw_str' to 'False', or ensure your 'content' " + "is of type 'str'.") + + if content is not None: + if isinstance(content, str) and is_raw_str: + # don't serialize the str value - use it as the raw HTTP request payload + json_content = content + else: + json_content = json.dumps(content) request = DurableHttpRequest(method, uri, json_content, headers, token_source) action = CallHttpAction(request)
`call_http` json serializes regular `str` content. <!-- Please read. Before posting, please be sure to review whether your issue matches the description of a known regression by using [this](https://github.com/Azure/azure-functions-durable-python/issues?q=is%3Aissue+is%3Aopen+label%3Aknown-regression) query. If your issue corresponds to a known regression, please try the suggested workarounds listed in the issue before filing an issue. Thanks! --> 🐛 **Describe the bug** The `call_http` method of `DurableOrchestrationContext` json serializes regular `str` content. 🤔 **Expected behavior** It should NOT json serialize regular `str` content, as the code suggests ☕ **Steps to reproduce** > What Durable Functions patterns are you using, if any? N/A > Any minimal reproducer we can use? See: https://github.com/Azure/azure-functions-durable-python/blob/dev/azure/durable_functions/models/DurableOrchestrationContext.py#L239 The interesting block looks like: ```python def call_http(self, method: str, uri: str, content: Optional[str] = None, ... if content and content is not isinstance(content, str): json_content = json.dumps(content) else: json_content = content ``` and this does not seem to be quite right. If `content = "foo"` the conditions after the `if` will evaluate as follows: ``` content and (content (is not) isinstance(content, str)) # "is not" binds stronger than "and" Truthy (and "foo" (is not) True ) True and ("foo" (is not) True) True and True True ``` I guess what you wanted was: ```python if content and not isinstance(content, str): json_content = json.dumps(content) else: json_content = content ``` But if `content = []` this will result in `json_content = []` (in oposition to `json_content = "[]"`), not sure if you would want that (at least I wouldnt). You might want to use something like this, instead: ```python if not isinstance(content, str): try: json_content = json.dumps(content) except TypeError: json_content = content ``` Since `None` and `[]` might be desirable to put in content and are all json serializable (as `null` and `[]` resp.). > Are you running this locally or on Azure? Both ⚡**If deployed to Azure** > We have access to a lot of telemetry that can help with investigations. Please provide as much of the following information as you can to help us investigate! N/A > DF Version v1.2.8
Azure/azure-functions-durable-python
diff --git a/tests/orchestrator/test_call_http.py b/tests/orchestrator/test_call_http.py index be46d87..b42b36c 100644 --- a/tests/orchestrator/test_call_http.py +++ b/tests/orchestrator/test_call_http.py @@ -1,5 +1,6 @@ from azure.durable_functions.models.ReplaySchema import ReplaySchema import json +import pytest from typing import Dict from azure.durable_functions.constants import HTTP_ACTION_NAME @@ -174,3 +175,61 @@ def test_post_completed_state(): # assert_valid_schema(result) assert_orchestration_state_equals(expected, result) validate_result_http_request(result) + +@pytest.mark.parametrize("content, expected_content, is_raw_str", [ + (None, None, False), + ("string data", '"string data"', False), + ('{"key": "value"}', '"{\\"key\\": \\"value\\"}"', False), + ('["list", "content"]', '"[\\"list\\", \\"content\\"]"', False), + ('[]', '"[]"', False), + ('42', '"42"', False), + ('true', '"true"', False), + # Cases that test actual behavior (not strictly adhering to Optional[str]) + ({"key": "value"}, '{"key": "value"}', False), + (["list", "content"], '["list", "content"]', False), + ([], '[]', False), + (42, '42', False), + (True, 'true', False), + # Cases when is_raw_str is True + ("string data", "string data", True), + ('{"key": "value"}', '{"key": "value"}', True), + ('[]', '[]', True), +]) +def test_call_http_content_handling(content, expected_content, is_raw_str): + def orchestrator_function(context): + yield context.call_http("POST", TEST_URI, content, is_raw_str=is_raw_str) + + context_builder = ContextBuilder('test_call_http_content_handling') + result = get_orchestration_state_result(context_builder, orchestrator_function) + + assert len(result['actions']) == 1 + http_action = result['actions'][0][0]['httpRequest'] + + assert http_action['method'] == "POST" + assert http_action['uri'] == TEST_URI + assert http_action['content'] == expected_content + +# Test that call_http raises a TypeError when is_raw_str is True but content is not a string +def test_call_http_non_string_content_with_raw_str(): + def orchestrator_function(context): + yield context.call_http("POST", TEST_URI, {"key": "value"}, is_raw_str=True) + + context_builder = ContextBuilder('test_call_http_non_string_content_with_raw_str') + + try: + result = get_orchestration_state_result(context_builder, orchestrator_function) + assert False + except Exception as e: + error_label = "\n\n$OutOfProcData$:" + error_str = str(e) + + expected_state = base_expected_state() + error_msg = "Invalid use of 'is_raw_str' parameter: 'is_raw_str' is "\ + "set to 'True' but 'content' is not an instance of type 'str'. "\ + "Either set 'is_raw_str' to 'False', or ensure your 'content' "\ + "is of type 'str'." + expected_state._error = error_msg + state_str = expected_state.to_json_string() + + expected_error_str = f"{error_msg}{error_label}{state_str}" + assert expected_error_str == error_str \ No newline at end of file
{ "commit_name": "merge_commit", "failed_lite_validators": [], "has_test_patch": true, "is_lite": true, "llm_score": { "difficulty_score": 2, "issue_text_score": 1, "test_score": 3 }, "num_modified_files": 1 }
1.2
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest", "pytest-asyncio" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.8", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
aiohttp==3.7.4 argcomplete==1.12.3 async-timeout==3.0.1 attrs==25.3.0 autopep8==1.5.2 azure-functions==1.23.0b3 -e git+https://github.com/Azure/azure-functions-durable-python.git@354ace05d704ae63f9a6488bd6a228adb949e2b2#egg=azure_functions_durable certifi==2025.1.31 chardet==3.0.4 colorlog==4.8.0 distlib==0.3.9 entrypoints==0.3 filelock==3.16.1 flake8==3.7.8 flake8-docstrings==1.5.0 furl==2.1.0 idna==2.8 iniconfig==2.1.0 jsonschema==3.2.0 MarkupSafe==2.1.5 mccabe==0.6.1 multidict==6.1.0 nox==2019.11.9 orderedmultidict==1.0.1 packaging==24.2 platformdirs==4.3.6 pluggy==1.5.0 propcache==0.2.0 py==1.11.0 pycodestyle==2.5.0 pydocstyle==6.3.0 pyflakes==2.1.1 pyrsistent==0.20.0 pytest==7.1.2 pytest-asyncio==0.20.2 python-dateutil==2.8.0 requests==2.22.0 six==1.17.0 snowballstemmer==2.2.0 tomli==2.2.1 types-python-dateutil==2.9.0.20241206 typing_extensions==4.13.0 urllib3==1.25.11 virtualenv==20.29.3 Werkzeug==3.0.6 yarl==1.15.2
name: azure-functions-durable-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=24.2=py38h06a4308_0 - python=3.8.20=he870216_0 - readline=8.2=h5eee18b_0 - setuptools=75.1.0=py38h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.44.0=py38h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - aiohttp==3.7.4 - argcomplete==1.12.3 - async-timeout==3.0.1 - attrs==25.3.0 - autopep8==1.5.2 - azure-functions==1.23.0b3 - certifi==2025.1.31 - chardet==3.0.4 - colorlog==4.8.0 - distlib==0.3.9 - entrypoints==0.3 - filelock==3.16.1 - flake8==3.7.8 - flake8-docstrings==1.5.0 - furl==2.1.0 - idna==2.8 - iniconfig==2.1.0 - jsonschema==3.2.0 - markupsafe==2.1.5 - mccabe==0.6.1 - multidict==6.1.0 - nox==2019.11.9 - orderedmultidict==1.0.1 - packaging==24.2 - platformdirs==4.3.6 - pluggy==1.5.0 - propcache==0.2.0 - py==1.11.0 - pycodestyle==2.5.0 - pydocstyle==6.3.0 - pyflakes==2.1.1 - pyrsistent==0.20.0 - pytest==7.1.2 - pytest-asyncio==0.20.2 - python-dateutil==2.8.0 - requests==2.22.0 - six==1.17.0 - snowballstemmer==2.2.0 - tomli==2.2.1 - types-python-dateutil==2.9.0.20241206 - typing-extensions==4.13.0 - urllib3==1.25.11 - virtualenv==20.29.3 - werkzeug==3.0.6 - yarl==1.15.2 prefix: /opt/conda/envs/azure-functions-durable-python
[ "tests/orchestrator/test_call_http.py::test_call_http_content_handling[None-None-False]", "tests/orchestrator/test_call_http.py::test_call_http_content_handling[string", "tests/orchestrator/test_call_http.py::test_call_http_content_handling[{\"key\":", "tests/orchestrator/test_call_http.py::test_call_http_content_handling[[\"list\",", "tests/orchestrator/test_call_http.py::test_call_http_content_handling[[]-\"[]\"-False]", "tests/orchestrator/test_call_http.py::test_call_http_content_handling[42-\"42\"-False]", "tests/orchestrator/test_call_http.py::test_call_http_content_handling[true-\"true\"-False]", "tests/orchestrator/test_call_http.py::test_call_http_content_handling[content7-{\"key\":", "tests/orchestrator/test_call_http.py::test_call_http_content_handling[content8-[\"list\",", "tests/orchestrator/test_call_http.py::test_call_http_content_handling[content9-[]-False]", "tests/orchestrator/test_call_http.py::test_call_http_content_handling[42-42-False]", "tests/orchestrator/test_call_http.py::test_call_http_content_handling[True-true-False]", "tests/orchestrator/test_call_http.py::test_call_http_content_handling[[]-[]-True]", "tests/orchestrator/test_call_http.py::test_call_http_non_string_content_with_raw_str" ]
[]
[ "tests/orchestrator/test_call_http.py::test_initial_orchestration_state", "tests/orchestrator/test_call_http.py::test_completed_state", "tests/orchestrator/test_call_http.py::test_failed_state", "tests/orchestrator/test_call_http.py::test_initial_post_state", "tests/orchestrator/test_call_http.py::test_post_completed_state" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_azure-functions-durable-python-494
Azure__azure-functions-python-library-172
fa064842f214f962612fccb9a5bcee502eac6c55
2023-02-25 05:20:20
fa064842f214f962612fccb9a5bcee502eac6c55
codecov[bot]: # [Codecov](https://codecov.io/gh/Azure/azure-functions-python-library/pull/172?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) Report > Merging [#172](https://codecov.io/gh/Azure/azure-functions-python-library/pull/172?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) (f7b7044) into [dev](https://codecov.io/gh/Azure/azure-functions-python-library/commit/cc3fd5d13770244bdcc1030be608c81d50df1ad2?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) (cc3fd5d) will **increase** coverage by `0.00%`. > The diff coverage is `100.00%`. ```diff @@ Coverage Diff @@ ## dev #172 +/- ## ======================================= Coverage 90.25% 90.25% ======================================= Files 51 51 Lines 2995 2996 +1 Branches 796 796 ======================================= + Hits 2703 2704 +1 Misses 215 215 Partials 77 77 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `90.22% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/Azure/azure-functions-python-library/pull/172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | Coverage Δ | | |---|---|---| | [azure/functions/decorators/function\_app.py](https://codecov.io/gh/Azure/azure-functions-python-library/pull/172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure#diff-YXp1cmUvZnVuY3Rpb25zL2RlY29yYXRvcnMvZnVuY3Rpb25fYXBwLnB5) | `99.44% <100.00%> (+<0.01%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) gavin-aguiar: We would need to update all our public docs too with this name alternative. cc: @shreyabatra4
diff --git a/azure/functions/decorators/function_app.py b/azure/functions/decorators/function_app.py index ac06b36..deb9054 100644 --- a/azure/functions/decorators/function_app.py +++ b/azure/functions/decorators/function_app.py @@ -399,14 +399,14 @@ class TriggerApi(DecoratorApi, ABC): return wrap - def schedule(self, - arg_name: str, - schedule: str, - run_on_startup: Optional[bool] = None, - use_monitor: Optional[bool] = None, - data_type: Optional[Union[DataType, str]] = None, - **kwargs: Any) -> Callable[..., Any]: - """The schedule decorator adds :class:`TimerTrigger` to the + def timer_trigger(self, + arg_name: str, + schedule: str, + run_on_startup: Optional[bool] = None, + use_monitor: Optional[bool] = None, + data_type: Optional[Union[DataType, str]] = None, + **kwargs: Any) -> Callable[..., Any]: + """The schedule or timer decorator adds :class:`TimerTrigger` to the :class:`FunctionBuilder` object for building :class:`Function` object used in worker function indexing model. This is equivalent to defining TimerTrigger @@ -448,6 +448,8 @@ class TriggerApi(DecoratorApi, ABC): return wrap + schedule = timer_trigger + def service_bus_queue_trigger( self, arg_name: str,
[FeatureRequest] Add timer trigger for Python Programming Model V2 Add an alias for schedule.
Azure/azure-functions-python-library
diff --git a/tests/decorators/test_decorators.py b/tests/decorators/test_decorators.py index c613721..5dea1c2 100644 --- a/tests/decorators/test_decorators.py +++ b/tests/decorators/test_decorators.py @@ -65,7 +65,7 @@ class TestFunctionsApp(unittest.TestCase): self.assertTrue(isinstance(func.get_trigger(), HttpTrigger)) self.assertTrue(func.get_trigger().route, "dummy") - def test_timer_trigger_default_args(self): + def test_schedule_trigger_default_args(self): app = self.func_app @app.schedule(arg_name="req", schedule="dummy_schedule") @@ -86,7 +86,7 @@ class TestFunctionsApp(unittest.TestCase): ] }) - def test_timer_trigger_full_args(self): + def test_schedule_trigger_full_args(self): app = self.func_app @app.schedule(arg_name="req", schedule="dummy_schedule", @@ -112,6 +112,53 @@ class TestFunctionsApp(unittest.TestCase): ] }) + def test_timer_trigger_default_args(self): + app = self.func_app + + @app.timer_trigger(arg_name="req", schedule="dummy_schedule") + def dummy_func(): + pass + + func = self._get_user_function(app) + self.assertEqual(func.get_function_name(), "dummy_func") + assert_json(self, func, { + "scriptFile": "function_app.py", + "bindings": [ + { + "name": "req", + "type": TIMER_TRIGGER, + "direction": BindingDirection.IN, + "schedule": "dummy_schedule" + } + ] + }) + + def test_timer_trigger_full_args(self): + app = self.func_app + + @app.timer_trigger(arg_name="req", schedule="dummy_schedule", + run_on_startup=False, use_monitor=False, + data_type=DataType.STRING, dummy_field='dummy') + def dummy(): + pass + + func = self._get_user_function(app) + assert_json(self, func, { + "scriptFile": "function_app.py", + "bindings": [ + { + "name": "req", + "type": TIMER_TRIGGER, + "dataType": DataType.STRING, + "direction": BindingDirection.IN, + 'dummyField': 'dummy', + "schedule": "dummy_schedule", + "runOnStartup": False, + "useMonitor": False + } + ] + }) + def test_route_default_args(self): app = self.func_app
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_short_problem_statement" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 2, "test_score": 1 }, "num_modified_files": 1 }
1.13
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": null, "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.9", "reqs_path": [ "requirements/base.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
-e git+https://github.com/Azure/azure-functions-python-library.git@fa064842f214f962612fccb9a5bcee502eac6c55#egg=azure_functions certifi==2025.1.31 charset-normalizer==3.4.1 coverage==7.8.0 exceptiongroup==1.2.2 flake8==4.0.1 idna==3.10 iniconfig==2.1.0 mccabe==0.6.1 mypy==1.15.0 mypy-extensions==1.0.0 packaging==24.2 pluggy==1.5.0 pycodestyle==2.8.0 pyflakes==2.4.0 pytest==8.3.5 pytest-cov==6.0.0 requests==2.32.3 tomli==2.2.1 typing_extensions==4.13.0 urllib3==2.3.0
name: azure-functions-python-library channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tzdata=2025a=h04d1e81_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - certifi==2025.1.31 - charset-normalizer==3.4.1 - coverage==7.8.0 - exceptiongroup==1.2.2 - flake8==4.0.1 - idna==3.10 - iniconfig==2.1.0 - mccabe==0.6.1 - mypy==1.15.0 - mypy-extensions==1.0.0 - packaging==24.2 - pluggy==1.5.0 - pycodestyle==2.8.0 - pyflakes==2.4.0 - pytest==8.3.5 - pytest-cov==6.0.0 - requests==2.32.3 - tomli==2.2.1 - typing-extensions==4.13.0 - urllib3==2.3.0 prefix: /opt/conda/envs/azure-functions-python-library
[ "tests/decorators/test_decorators.py::TestFunctionsApp::test_timer_trigger_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_timer_trigger_full_args" ]
[]
[ "tests/decorators/test_decorators.py::TestFunctionsApp::test_blob_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_blob_input_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_blob_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_blob_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_cosmosdb_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_cosmosdb_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_cosmosdb_input_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_cosmosdb_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_cosmosdb_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_custom_binding_with_excluded_params", "tests/decorators/test_decorators.py::TestFunctionsApp::test_custom_http_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_custom_input_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_custom_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_custom_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_event_grid_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_event_grid_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_event_grid_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_event_grid_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_event_hub_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_event_hub_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_event_hub_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_event_hub_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_mixed_custom_and_supported_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_multiple_input_bindings", "tests/decorators/test_decorators.py::TestFunctionsApp::test_multiple_triggers", "tests/decorators/test_decorators.py::TestFunctionsApp::test_no_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_not_http_function", "tests/decorators/test_decorators.py::TestFunctionsApp::test_queue_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_queue_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_queue_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_queue_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_route_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_route_is_custom", "tests/decorators/test_decorators.py::TestFunctionsApp::test_route_is_function_name", "tests/decorators/test_decorators.py::TestFunctionsApp::test_route_is_python_function_name", "tests/decorators/test_decorators.py::TestFunctionsApp::test_route_with_all_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_schedule_trigger_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_schedule_trigger_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_service_bus_queue_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_service_bus_queue_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_service_bus_queue_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_service_bus_queue_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_service_bus_topic_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_service_bus_topic_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_service_bus_topic_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_service_bus_topic_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_set_auth_level_for_http_functions", "tests/decorators/test_decorators.py::TestFunctionsApp::test_table_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_table_input_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_table_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_table_with_all_args" ]
[]
MIT License
null
Azure__azure-functions-python-library-196
3a0797131fa87424ee912b225f60624785f98999
2023-12-12 23:24:10
3a0797131fa87424ee912b225f60624785f98999
codecov[bot]: ## [Codecov](https://app.codecov.io/gh/Azure/azure-functions-python-library/pull/196?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) Report All modified and coverable lines are covered by tests :white_check_mark: > Comparison is base [(`0ca53b3`)](https://app.codecov.io/gh/Azure/azure-functions-python-library/commit/0ca53b35491ce22569f012d485c9973050ea3227?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) 92.97% compared to head [(`4fb1400`)](https://app.codecov.io/gh/Azure/azure-functions-python-library/pull/196?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) 92.98%. <details><summary>Additional details and impacted files</summary> ```diff @@ Coverage Diff @@ ## dev #196 +/- ## ========================================== + Coverage 92.97% 92.98% +0.01% ========================================== Files 56 56 Lines 3187 3193 +6 Branches 649 649 ========================================== + Hits 2963 2969 +6 Misses 137 137 Partials 87 87 ``` | [Flag](https://app.codecov.io/gh/Azure/azure-functions-python-library/pull/196/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/Azure/azure-functions-python-library/pull/196/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | `92.95% <100.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure#carryforward-flags-in-the-pull-request-comment) to find out more. </details> [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/Azure/azure-functions-python-library/pull/196?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure). :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure). codecov-commenter: ## [Codecov](https://app.codecov.io/gh/Azure/azure-functions-python-library/pull/196?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) Report All modified and coverable lines are covered by tests :white_check_mark: > Project coverage is 93.11%. Comparing base [(`b85eb7a`)](https://app.codecov.io/gh/Azure/azure-functions-python-library/commit/b85eb7a7909198de93fd974dd8225aa9d9cbdbc5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) to head [(`ef5323b`)](https://app.codecov.io/gh/Azure/azure-functions-python-library/pull/196?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure). > :exclamation: Current head ef5323b differs from pull request most recent head 9b44ae5. Consider uploading reports for the commit 9b44ae5 to get more accurate results <details><summary>Additional details and impacted files</summary> ```diff @@ Coverage Diff @@ ## dev #196 +/- ## ========================================== + Coverage 93.10% 93.11% +0.01% ========================================== Files 56 56 Lines 3247 3253 +6 Branches 666 666 ========================================== + Hits 3023 3029 +6 Misses 137 137 Partials 87 87 ``` | [Flag](https://app.codecov.io/gh/Azure/azure-functions-python-library/pull/196/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/Azure/azure-functions-python-library/pull/196/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | `93.08% <100.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure#carryforward-flags-in-the-pull-request-comment) to find out more. </details> [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/Azure/azure-functions-python-library/pull/196?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure). :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure).
diff --git a/azure/functions/__init__.py b/azure/functions/__init__.py index 4a35da6..15cf667 100644 --- a/azure/functions/__init__.py +++ b/azure/functions/__init__.py @@ -10,7 +10,7 @@ from .decorators import (FunctionApp, Function, Blueprint, DecoratorApi, DataType, AuthLevel, Cardinality, AccessRights, HttpMethod, AsgiFunctionApp, WsgiFunctionApp, - ExternalHttpFunctionApp) + ExternalHttpFunctionApp, BlobSource) from ._durable_functions import OrchestrationContext, EntityContext from .decorators.function_app import (FunctionRegister, TriggerApi, BindingApi, SettingsApi) @@ -94,7 +94,8 @@ __all__ = ( 'AuthLevel', 'Cardinality', 'AccessRights', - 'HttpMethod' + 'HttpMethod', + 'BlobSource' ) __version__ = '1.20.0b2' diff --git a/azure/functions/decorators/__init__.py b/azure/functions/decorators/__init__.py index 90ff9ac..be7ff99 100644 --- a/azure/functions/decorators/__init__.py +++ b/azure/functions/decorators/__init__.py @@ -3,7 +3,8 @@ from .core import Cardinality, AccessRights from .function_app import FunctionApp, Function, DecoratorApi, DataType, \ AuthLevel, Blueprint, ExternalHttpFunctionApp, AsgiFunctionApp, \ - WsgiFunctionApp, FunctionRegister, TriggerApi, BindingApi, SettingsApi + WsgiFunctionApp, FunctionRegister, TriggerApi, BindingApi, \ + SettingsApi, BlobSource from .http import HttpMethod __all__ = [ @@ -22,5 +23,6 @@ __all__ = [ 'AuthLevel', 'Cardinality', 'AccessRights', - 'HttpMethod' + 'HttpMethod', + 'BlobSource' ] diff --git a/azure/functions/decorators/blob.py b/azure/functions/decorators/blob.py index 35d5678..0f38603 100644 --- a/azure/functions/decorators/blob.py +++ b/azure/functions/decorators/blob.py @@ -3,8 +3,8 @@ from typing import Optional from azure.functions.decorators.constants import BLOB_TRIGGER, BLOB -from azure.functions.decorators.core import Trigger, OutputBinding, DataType, \ - InputBinding +from azure.functions.decorators.core import BlobSource, Trigger, \ + OutputBinding, DataType, InputBinding class BlobTrigger(Trigger): @@ -12,10 +12,12 @@ class BlobTrigger(Trigger): name: str, path: str, connection: str, + source: BlobSource, data_type: Optional[DataType] = None, **kwargs): self.path = path self.connection = connection + self.source = source super().__init__(name=name, data_type=data_type) @staticmethod diff --git a/azure/functions/decorators/core.py b/azure/functions/decorators/core.py index 81e2ff9..7aa9d12 100644 --- a/azure/functions/decorators/core.py +++ b/azure/functions/decorators/core.py @@ -65,6 +65,14 @@ class AccessRights(StringifyEnum): and all related message handling. """ +class BlobSource(StringifyEnum): + """Source of the blob trigger.""" + EVENT_GRID = "EventGrid" + """Event Grid is the source of the blob trigger.""" + LOGS_AND_CONTAINER_SCAN = "LogsAndContainerScan" + """Standard polling mechanism to detect changes in the container.""" + + class Binding(ABC): """Abstract binding class which captures common attributes and functions. :meth:`get_dict_repr` can auto generate the function.json for diff --git a/azure/functions/decorators/function_app.py b/azure/functions/decorators/function_app.py index fe17ceb..3807c67 100644 --- a/azure/functions/decorators/function_app.py +++ b/azure/functions/decorators/function_app.py @@ -11,7 +11,7 @@ from typing import Any, Callable, Dict, List, Optional, Union, \ from azure.functions.decorators.blob import BlobTrigger, BlobInput, BlobOutput from azure.functions.decorators.core import Binding, Trigger, DataType, \ - AuthLevel, SCRIPT_FILE_NAME, Cardinality, AccessRights, Setting + AuthLevel, SCRIPT_FILE_NAME, Cardinality, AccessRights, Setting, BlobSource from azure.functions.decorators.cosmosdb import CosmosDBTrigger, \ CosmosDBOutput, CosmosDBInput, CosmosDBTriggerV3, CosmosDBInputV3, \ CosmosDBOutputV3 @@ -1114,6 +1114,8 @@ class TriggerApi(DecoratorApi, ABC): arg_name: str, path: str, connection: str, + source: BlobSource = + BlobSource.LOGS_AND_CONTAINER_SCAN, data_type: Optional[DataType] = None, **kwargs) -> Callable[..., Any]: """ @@ -1131,6 +1133,12 @@ class TriggerApi(DecoratorApi, ABC): :param path: The path to the blob. :param connection: The name of an app setting or setting collection that specifies how to connect to Azure Blobs. + :param source: Sets the source of the triggering event. + Use EventGrid for an Event Grid-based blob trigger, + which provides much lower latency. + The default is LogsAndContainerScan, + which uses the standard polling mechanism to detect changes + in the container. :param data_type: Defines how Functions runtime should treat the parameter value. :param kwargs: Keyword arguments for specifying additional binding @@ -1147,6 +1155,7 @@ class TriggerApi(DecoratorApi, ABC): name=arg_name, path=path, connection=connection, + source=source, data_type=parse_singular_param_to_enum(data_type, DataType), **kwargs)) diff --git a/docs/ProgModelSpec.pyi b/docs/ProgModelSpec.pyi index a01d816..14fe202 100644 --- a/docs/ProgModelSpec.pyi +++ b/docs/ProgModelSpec.pyi @@ -4,7 +4,7 @@ from abc import ABC from typing import Callable, Dict, List, Optional, Union, Iterable from azure.functions import AsgiMiddleware, WsgiMiddleware -from azure.functions.decorators.core import Binding, Trigger, DataType, \ +from azure.functions.decorators.core import Binding, BlobSource, Trigger, DataType, \ AuthLevel, Cardinality, AccessRights, Setting from azure.functions.decorators.function_app import FunctionBuilder, SettingsApi from azure.functions.decorators.http import HttpMethod @@ -495,6 +495,7 @@ class TriggerApi(DecoratorApi, ABC): arg_name: str, path: str, connection: str, + source: BlobSource = BlobSource.LOGS_AND_CONTAINER_SCAN, data_type: Optional[DataType] = None, **kwargs) -> Callable: """ @@ -512,6 +513,12 @@ class TriggerApi(DecoratorApi, ABC): :param path: The path to the blob. :param connection: The name of an app setting or setting collection that specifies how to connect to Azure Blobs. + :param source: Sets the source of the triggering event. + Use EventGrid for an Event Grid-based blob trigger, + which provides much lower latency. + The default is LogsAndContainerScan, + which uses the standard polling mechanism to detect changes + in the container. :param data_type: Defines how Functions runtime should treat the parameter value. :param kwargs: Keyword arguments for specifying additional binding
[FeatureRequest] Add EventGrid source option for blob_trigger This is already documented [here](https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger#decorators): > - source: Sets the source of the triggering event. Use EventGrid for an Event Grid-based blob trigger, which provides much lower latency. The default is LogsAndContainerScan, which uses the standard polling mechanism to detect changes in the container. But [blob_trigger](https://github.com/Azure/azure-functions-python-library/blob/ded84af5910aa2333568c144f8349502e4d6c338/azure/functions/decorators/function_app.py#L991) has no such argument and [BlobTrigger](https://github.com/Azure/azure-functions-python-library/blob/ded84af5910aa2333568c144f8349502e4d6c338/azure/functions/decorators/blob.py#L10) ignores the `kwargs`.
Azure/azure-functions-python-library
diff --git a/tests/decorators/test_blob.py b/tests/decorators/test_blob.py index 9d6154e..f77f731 100644 --- a/tests/decorators/test_blob.py +++ b/tests/decorators/test_blob.py @@ -3,14 +3,16 @@ import unittest from azure.functions.decorators.blob import BlobTrigger, BlobOutput, BlobInput -from azure.functions.decorators.core import BindingDirection, DataType +from azure.functions.decorators.core import BindingDirection, BlobSource, \ + DataType class TestBlob(unittest.TestCase): - def test_blob_trigger_valid_creation(self): + def test_blob_trigger_creation_with_source_as_string(self): trigger = BlobTrigger(name="req", path="dummy_path", connection="dummy_connection", + source=BlobSource.EVENT_GRID, data_type=DataType.UNDEFINED, dummy_field="dummy") @@ -22,6 +24,27 @@ class TestBlob(unittest.TestCase): "name": "req", "dataType": DataType.UNDEFINED, "path": "dummy_path", + 'source': BlobSource.EVENT_GRID, + "connection": "dummy_connection" + }) + + def test_blob_trigger_creation_with_source_as_enum(self): + trigger = BlobTrigger(name="req", + path="dummy_path", + connection="dummy_connection", + source=BlobSource.EVENT_GRID, + data_type=DataType.UNDEFINED, + dummy_field="dummy") + + self.assertEqual(trigger.get_binding_name(), "blobTrigger") + self.assertEqual(trigger.get_dict_repr(), { + "type": "blobTrigger", + "direction": BindingDirection.IN, + 'dummyField': 'dummy', + "name": "req", + "dataType": DataType.UNDEFINED, + "path": "dummy_path", + 'source': BlobSource.EVENT_GRID, "connection": "dummy_connection" }) diff --git a/tests/decorators/test_decorators.py b/tests/decorators/test_decorators.py index f31a42b..115c857 100644 --- a/tests/decorators/test_decorators.py +++ b/tests/decorators/test_decorators.py @@ -8,7 +8,7 @@ from azure.functions.decorators.constants import TIMER_TRIGGER, HTTP_TRIGGER, \ BLOB_TRIGGER, EVENT_GRID_TRIGGER, EVENT_GRID, TABLE, WARMUP_TRIGGER, \ SQL, SQL_TRIGGER, ORCHESTRATION_TRIGGER, ACTIVITY_TRIGGER, \ ENTITY_TRIGGER, DURABLE_CLIENT -from azure.functions.decorators.core import DataType, AuthLevel, \ +from azure.functions.decorators.core import BlobSource, DataType, AuthLevel, \ BindingDirection, AccessRights, Cardinality from azure.functions.decorators.function_app import FunctionApp from azure.functions.decorators.http import HttpTrigger, HttpMethod @@ -1569,6 +1569,8 @@ class TestFunctionsApp(unittest.TestCase): "type": BLOB_TRIGGER, "name": "req", "path": "dummy_path", + "source": + BlobSource.LOGS_AND_CONTAINER_SCAN, "connection": "dummy_conn" }]}) @@ -1593,6 +1595,7 @@ class TestFunctionsApp(unittest.TestCase): "type": BLOB_TRIGGER, "name": "req", "path": "dummy_path", + "source": BlobSource.LOGS_AND_CONTAINER_SCAN, "connection": "dummy_conn" }) @@ -1601,6 +1604,7 @@ class TestFunctionsApp(unittest.TestCase): @app.blob_trigger(arg_name="req", path="dummy_path", data_type=DataType.STRING, + source=BlobSource.EVENT_GRID, connection="dummy_conn") @app.blob_input(arg_name="file", path="dummy_in_path", connection="dummy_in_conn", @@ -1622,6 +1626,7 @@ class TestFunctionsApp(unittest.TestCase): "type": BLOB_TRIGGER, "name": "req", "path": "dummy_path", + "source": BlobSource.EVENT_GRID, "connection": "dummy_conn" }) @@ -1660,6 +1665,7 @@ class TestFunctionsApp(unittest.TestCase): "type": BLOB_TRIGGER, "name": "req", "path": "dummy_path", + "source": BlobSource.LOGS_AND_CONTAINER_SCAN, "connection": "dummy_conn" })
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 1, "test_score": 0 }, "num_modified_files": 6 }
1.20
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": null, "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.9", "reqs_path": [ "requirements/base.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
aiohappyeyeballs==2.6.1 aiohttp==3.11.14 aiosignal==1.3.2 async-timeout==5.0.1 attrs==25.3.0 -e git+https://github.com/Azure/azure-functions-python-library.git@3a0797131fa87424ee912b225f60624785f98999#egg=azure_functions azure-functions-durable==1.2.10 certifi==2025.1.31 charset-normalizer==3.4.1 coverage==7.8.0 exceptiongroup==1.2.2 flake8==4.0.1 flake8-logging-format==2024.24.12 frozenlist==1.5.0 furl==2.1.4 idna==3.10 iniconfig==2.1.0 mccabe==0.6.1 multidict==6.2.0 mypy==1.15.0 mypy-extensions==1.0.0 orderedmultidict==1.0.1 packaging==24.2 pluggy==1.5.0 propcache==0.3.1 pycodestyle==2.8.0 pyflakes==2.4.0 pytest==8.3.5 pytest-cov==6.0.0 python-dateutil==2.9.0.post0 requests==2.32.3 six==1.17.0 tomli==2.2.1 typing_extensions==4.13.0 urllib3==2.3.0 yarl==1.18.3
name: azure-functions-python-library channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tzdata=2025a=h04d1e81_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - aiohappyeyeballs==2.6.1 - aiohttp==3.11.14 - aiosignal==1.3.2 - async-timeout==5.0.1 - attrs==25.3.0 - azure-functions-durable==1.2.10 - certifi==2025.1.31 - charset-normalizer==3.4.1 - coverage==7.8.0 - exceptiongroup==1.2.2 - flake8==4.0.1 - flake8-logging-format==2024.24.12 - frozenlist==1.5.0 - furl==2.1.4 - idna==3.10 - iniconfig==2.1.0 - mccabe==0.6.1 - multidict==6.2.0 - mypy==1.15.0 - mypy-extensions==1.0.0 - orderedmultidict==1.0.1 - packaging==24.2 - pluggy==1.5.0 - propcache==0.3.1 - pycodestyle==2.8.0 - pyflakes==2.4.0 - pytest==8.3.5 - pytest-cov==6.0.0 - python-dateutil==2.9.0.post0 - requests==2.32.3 - six==1.17.0 - tomli==2.2.1 - typing-extensions==4.13.0 - urllib3==2.3.0 - yarl==1.18.3 prefix: /opt/conda/envs/azure-functions-python-library
[ "tests/decorators/test_blob.py::TestBlob::test_blob_input_valid_creation", "tests/decorators/test_blob.py::TestBlob::test_blob_output_valid_creation", "tests/decorators/test_blob.py::TestBlob::test_blob_trigger_creation_with_source_as_enum", "tests/decorators/test_blob.py::TestBlob::test_blob_trigger_creation_with_source_as_string", "tests/decorators/test_decorators.py::TestFunctionsApp::test_activity_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_blob_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_blob_input_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_blob_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_blob_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_cosmosdb_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_cosmosdb_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_cosmosdb_input_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_cosmosdb_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_cosmosdb_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_cosmosdb_v3_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_cosmosdb_v3_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_cosmosdb_v3_input_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_cosmosdb_v3_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_cosmosdb_v3_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_custom_binding_with_excluded_params", "tests/decorators/test_decorators.py::TestFunctionsApp::test_custom_http_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_custom_input_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_custom_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_custom_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_durable_client", "tests/decorators/test_decorators.py::TestFunctionsApp::test_entity_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_event_grid_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_event_grid_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_event_grid_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_event_grid_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_event_hub_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_event_hub_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_event_hub_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_event_hub_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_function_app_full_bindings_metadata_key_order", "tests/decorators/test_decorators.py::TestFunctionsApp::test_function_app_generic_http_trigger_metadata_key_order", "tests/decorators/test_decorators.py::TestFunctionsApp::test_function_app_retry_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_mixed_custom_and_supported_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_multiple_input_bindings", "tests/decorators/test_decorators.py::TestFunctionsApp::test_multiple_triggers", "tests/decorators/test_decorators.py::TestFunctionsApp::test_no_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_not_http_function", "tests/decorators/test_decorators.py::TestFunctionsApp::test_orchestration_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_queue_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_queue_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_queue_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_queue_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_route_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_route_is_custom", "tests/decorators/test_decorators.py::TestFunctionsApp::test_route_is_function_name", "tests/decorators/test_decorators.py::TestFunctionsApp::test_route_is_python_function_name", "tests/decorators/test_decorators.py::TestFunctionsApp::test_route_with_all_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_schedule_trigger_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_schedule_trigger_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_service_bus_queue_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_service_bus_queue_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_service_bus_queue_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_service_bus_queue_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_service_bus_topic_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_service_bus_topic_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_service_bus_topic_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_service_bus_topic_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_set_auth_level_for_http_functions", "tests/decorators/test_decorators.py::TestFunctionsApp::test_sql_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_sql_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_sql_input_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_sql_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_sql_trigger", "tests/decorators/test_decorators.py::TestFunctionsApp::test_table_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_table_input_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_table_output_binding", "tests/decorators/test_decorators.py::TestFunctionsApp::test_table_with_all_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_timer_trigger_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_timer_trigger_full_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_warmup_trigger_default_args", "tests/decorators/test_decorators.py::TestFunctionsApp::test_warmup_trigger_full_args" ]
[]
[]
[]
MIT License
null
Azure__azure-functions-python-worker-1166
d7e5c84ca57d4dd35c03efb611044c46a68137d7
2023-01-23 21:02:49
5b3a930cad712cc560f242351703c419aff2a057
codecov[bot]: # [Codecov](https://codecov.io/gh/Azure/azure-functions-python-worker/pull/1166?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) Report > Merging [#1166](https://codecov.io/gh/Azure/azure-functions-python-worker/pull/1166?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) (b94fa91) into [dev](https://codecov.io/gh/Azure/azure-functions-python-worker/commit/052b416ef65b6a404d3cf12d0504fc854646281b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) (052b416) will **increase** coverage by `0.19%`. > The diff coverage is `100.00%`. ```diff @@ Coverage Diff @@ ## dev #1166 +/- ## ========================================== + Coverage 83.71% 83.90% +0.19% ========================================== Files 34 34 Lines 1885 1889 +4 Branches 276 363 +87 ========================================== + Hits 1578 1585 +7 + Misses 236 233 -3 Partials 71 71 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `83.85% <100.00%> (+0.19%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/Azure/azure-functions-python-worker/pull/1166?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | Coverage Δ | | |---|---|---| | [azure\_functions\_worker/protos/\_\_init\_\_.py](https://codecov.io/gh/Azure/azure-functions-python-worker/pull/1166?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure#diff-YXp1cmVfZnVuY3Rpb25zX3dvcmtlci9wcm90b3MvX19pbml0X18ucHk=) | `100.00% <ø> (ø)` | | | [azure\_functions\_worker/dispatcher.py](https://codecov.io/gh/Azure/azure-functions-python-worker/pull/1166?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure#diff-YXp1cmVfZnVuY3Rpb25zX3dvcmtlci9kaXNwYXRjaGVyLnB5) | `88.97% <100.00%> (+0.11%)` | :arrow_up: | | [.../shared\_memory\_data\_transfer/file\_accessor\_unix.py](https://codecov.io/gh/Azure/azure-functions-python-worker/pull/1166?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure#diff-YXp1cmVfZnVuY3Rpb25zX3dvcmtlci9iaW5kaW5ncy9zaGFyZWRfbWVtb3J5X2RhdGFfdHJhbnNmZXIvZmlsZV9hY2Nlc3Nvcl91bml4LnB5) | `77.45% <0.00%> (+2.94%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) YunchuWang: https://github.com/Azure/azure-functions-python-worker/issues/1057
diff --git a/azure_functions_worker/dispatcher.py b/azure_functions_worker/dispatcher.py index 24c25ec..1e60917 100644 --- a/azure_functions_worker/dispatcher.py +++ b/azure_functions_worker/dispatcher.py @@ -9,6 +9,7 @@ import asyncio import concurrent.futures import logging import os +import platform import queue import sys import threading @@ -24,7 +25,8 @@ from .constants import (PYTHON_THREADPOOL_THREAD_COUNT, PYTHON_THREADPOOL_THREAD_COUNT_DEFAULT, PYTHON_THREADPOOL_THREAD_COUNT_MAX_37, PYTHON_THREADPOOL_THREAD_COUNT_MIN, - PYTHON_ENABLE_DEBUG_LOGGING, SCRIPT_FILE_NAME) + PYTHON_ENABLE_DEBUG_LOGGING, SCRIPT_FILE_NAME, + PYTHON_LANGUAGE_RUNTIME) from .extension import ExtensionManager from .logging import disable_console_logging, enable_console_logging from .logging import enable_debug_logging_recommendation @@ -93,6 +95,16 @@ class Dispatcher(metaclass=DispatcherMeta): self._grpc_thread: threading.Thread = threading.Thread( name='grpc-thread', target=self.__poll_grpc) + @staticmethod + def get_worker_metadata(): + return protos.WorkerMetadata( + runtime_name=PYTHON_LANGUAGE_RUNTIME, + runtime_version=f"{sys.version_info.major}." + f"{sys.version_info.minor}", + worker_version=VERSION, + worker_bitness=platform.machine(), + custom_properties={}) + def get_sync_tp_workers_set(self): """We don't know the exact value of the threadcount set for the Python 3.9 scenarios (as we'll start passing only None by default), and we @@ -280,6 +292,7 @@ class Dispatcher(metaclass=DispatcherMeta): request_id=self.request_id, worker_init_response=protos.WorkerInitResponse( capabilities=capabilities, + worker_metadata=self.get_worker_metadata(), result=protos.StatusResult( status=protos.StatusResult.Success))) @@ -552,6 +565,8 @@ class Dispatcher(metaclass=DispatcherMeta): func_env_reload_request.function_app_directory) success_response = protos.FunctionEnvironmentReloadResponse( + capabilities={}, + worker_metadata=self.get_worker_metadata(), result=protos.StatusResult( status=protos.StatusResult.Success)) diff --git a/azure_functions_worker/protos/__init__.py b/azure_functions_worker/protos/__init__.py index 45c31d3..8e74b5c 100644 --- a/azure_functions_worker/protos/__init__.py +++ b/azure_functions_worker/protos/__init__.py @@ -31,7 +31,8 @@ from .FunctionRpc_pb2 import ( # NoQA CloseSharedMemoryResourcesRequest, CloseSharedMemoryResourcesResponse, FunctionsMetadataRequest, - FunctionMetadataResponse) + FunctionMetadataResponse, + WorkerMetadata) from .shared.NullableTypes_pb2 import ( NullableString, diff --git a/azure_functions_worker/protos/_src/src/proto/FunctionRpc.proto b/azure_functions_worker/protos/_src/src/proto/FunctionRpc.proto index 155af60..f5cc48b 100644 --- a/azure_functions_worker/protos/_src/src/proto/FunctionRpc.proto +++ b/azure_functions_worker/protos/_src/src/proto/FunctionRpc.proto @@ -238,6 +238,13 @@ message FunctionEnvironmentReloadRequest { } message FunctionEnvironmentReloadResponse { + // After specialization, worker sends capabilities & metadata. + // Worker metadata captured for telemetry purposes + WorkerMetadata worker_metadata = 1; + + // A map of worker supported features/capabilities + map<string, string> capabilities = 2; + // Status of the response StatusResult result = 3; } @@ -431,6 +438,7 @@ message TypedData { CollectionDouble collection_double = 10; CollectionSInt64 collection_sint64 = 11; ModelBindingData model_binding_data = 12; + CollectionModelBindingData collection_model_binding_data = 13; } } @@ -668,4 +676,9 @@ message ModelBindingData // The binding data content bytes content = 4; +} + +// Used to encapsulate collection model_binding_data +message CollectionModelBindingData { + repeated ModelBindingData model_binding_data = 1; } \ No newline at end of file
Populate WorkerMetadata in WorkerInitResponse message The protobuf has been updated to include a `WorkerMetadata` property within the `WorkerInitResponse` message. The worker should include `WorkerMetadata` when sending the `WorkerInitResponse` to the host. [PR](https://github.com/Azure/azure-functions-language-worker-protobuf/pull/76) for reference on how to fill in the fields. You will need to pull in the latest protobuf version first (this [doc](https://dev.azure.com/msazure/One/_git/AAPT-Antares-Docs?path=/TeamDocs/FunctionTeamDocs/EngineeringProcesses/ReleaseProcesses/ProtobufReleaseProcess.md&version=GBmaster&_a=preview) may help). ```proto message WorkerMetadata { // The runtime/stack name string runtime_name = 1; // The version of the runtime/stack string runtime_version = 2; // The version of the worker or worker SDK string worker_version = 3; // The worker bitness/architecture string worker_bitness = 4; // Optional additional custom properties map<string, string> custom_properties = 5; } ```
Azure/azure-functions-python-worker
diff --git a/tests/unittests/test_dispatcher.py b/tests/unittests/test_dispatcher.py index 5aab8d3..4c8b058 100644 --- a/tests/unittests/test_dispatcher.py +++ b/tests/unittests/test_dispatcher.py @@ -8,6 +8,7 @@ from typing import Optional, Tuple from unittest.mock import patch from azure_functions_worker import protos +from azure_functions_worker.version import VERSION from tests.utils import testutils from azure_functions_worker.constants import PYTHON_THREADPOOL_THREAD_COUNT, \ PYTHON_THREADPOOL_THREAD_COUNT_DEFAULT, \ @@ -62,6 +63,27 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): async with self._ctrl as host: r = await host.init_worker('3.0.12345') self.assertIsInstance(r.response, protos.WorkerInitResponse) + self.assertIsInstance(r.response.worker_metadata, + protos.WorkerMetadata) + self.assertEquals(r.response.worker_metadata.runtime_name, + "python") + self.assertEquals(r.response.worker_metadata.worker_version, + VERSION) + + async def test_dispatcher_environment_reload(self): + """Test function environment reload response + """ + async with self._ctrl as host: + # Reload environment variable on specialization + r = await host.reload_environment(environment={}) + self.assertIsInstance(r.response, + protos.FunctionEnvironmentReloadResponse) + self.assertIsInstance(r.response.worker_metadata, + protos.WorkerMetadata) + self.assertEquals(r.response.worker_metadata.runtime_name, + "python") + self.assertEquals(r.response.worker_metadata.worker_version, + VERSION) async def test_dispatcher_initialize_worker_logging(self): """Test if the dispatcher's log can be flushed out during worker
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 1, "test_score": 2 }, "num_modified_files": 3 }
4.10
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.9", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
aiohappyeyeballs==2.6.1 aiohttp==3.11.14 aiosignal==1.3.2 anyio==4.9.0 async-timeout==5.0.1 attrs==25.3.0 azure-core==1.32.0 azure-eventhub==5.7.0 azure-functions==1.13.0b1 azure-functions-durable==1.2.10 -e git+https://github.com/Azure/azure-functions-python-worker.git@d7e5c84ca57d4dd35c03efb611044c46a68137d7#egg=azure_functions_worker blinker==1.9.0 certifi==2025.1.31 charset-normalizer==3.4.1 click==8.1.8 coverage==7.8.0 exceptiongroup==1.2.2 execnet==2.1.1 fastapi==0.85.2 flake8==4.0.1 Flask==3.1.0 frozenlist==1.5.0 furl==2.1.4 grpcio==1.43.0 grpcio-tools==1.43.0 idna==3.10 importlib_metadata==8.6.1 iniconfig==2.1.0 itsdangerous==2.2.0 Jinja2==3.1.6 joblib==1.4.2 MarkupSafe==3.0.2 mccabe==0.6.1 multidict==6.2.0 mypy==1.15.0 mypy-extensions==1.0.0 narwhals==1.32.0 numpy==2.0.2 opencv-python==4.11.0.86 orderedmultidict==1.0.1 packaging==24.2 pandas==2.2.3 plotly==6.0.1 pluggy==1.5.0 propcache==0.3.1 protobuf==3.19.6 ptvsd==4.3.2 pycodestyle==2.8.0 pycryptodome==3.10.4 pydantic==1.10.21 pyflakes==2.4.0 pytest==8.3.5 pytest-cov==6.0.0 pytest-instafail==0.5.0 pytest-randomly==3.16.0 pytest-rerunfailures==15.0 pytest-sugar==1.0.0 pytest-xdist==3.6.1 python-dateutil==2.8.2 python-dotenv==1.1.0 pytz==2025.2 requests==2.32.3 scikit-learn==1.6.1 scipy==1.13.1 six==1.17.0 sniffio==1.3.1 starlette==0.20.4 termcolor==3.0.0 threadpoolctl==3.6.0 tomli==2.2.1 typing_extensions==4.13.0 tzdata==2025.2 uamqp==1.6.11 urllib3==2.3.0 Werkzeug==3.1.3 yarl==1.18.3 zipp==3.21.0
name: azure-functions-python-worker channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - aiohappyeyeballs==2.6.1 - aiohttp==3.11.14 - aiosignal==1.3.2 - anyio==4.9.0 - async-timeout==5.0.1 - attrs==25.3.0 - azure-core==1.32.0 - azure-eventhub==5.7.0 - azure-functions==1.13.0b1 - azure-functions-durable==1.2.10 - blinker==1.9.0 - certifi==2025.1.31 - charset-normalizer==3.4.1 - click==8.1.8 - coverage==7.8.0 - exceptiongroup==1.2.2 - execnet==2.1.1 - fastapi==0.85.2 - flake8==4.0.1 - flask==3.1.0 - frozenlist==1.5.0 - furl==2.1.4 - grpcio==1.43.0 - grpcio-tools==1.43.0 - idna==3.10 - importlib-metadata==8.6.1 - iniconfig==2.1.0 - itsdangerous==2.2.0 - jinja2==3.1.6 - joblib==1.4.2 - markupsafe==3.0.2 - mccabe==0.6.1 - multidict==6.2.0 - mypy==1.15.0 - mypy-extensions==1.0.0 - narwhals==1.32.0 - numpy==2.0.2 - opencv-python==4.11.0.86 - orderedmultidict==1.0.1 - packaging==24.2 - pandas==2.2.3 - plotly==6.0.1 - pluggy==1.5.0 - propcache==0.3.1 - protobuf==3.19.6 - ptvsd==4.3.2 - pycodestyle==2.8.0 - pycryptodome==3.10.4 - pydantic==1.10.21 - pyflakes==2.4.0 - pytest==8.3.5 - pytest-cov==6.0.0 - pytest-instafail==0.5.0 - pytest-randomly==3.16.0 - pytest-rerunfailures==15.0 - pytest-sugar==1.0.0 - pytest-xdist==3.6.1 - python-dateutil==2.8.2 - python-dotenv==1.1.0 - pytz==2025.2 - requests==2.32.3 - scikit-learn==1.6.1 - scipy==1.13.1 - six==1.17.0 - sniffio==1.3.1 - starlette==0.20.4 - termcolor==3.0.0 - threadpoolctl==3.6.0 - tomli==2.2.1 - typing-extensions==4.13.0 - tzdata==2025.2 - uamqp==1.6.11 - urllib3==2.3.0 - werkzeug==3.1.3 - yarl==1.18.3 - zipp==3.21.0 prefix: /opt/conda/envs/azure-functions-python-worker
[ "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_initialize_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_initialize_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_initialize_worker" ]
[ "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_environment_reload", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_environment_reload", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_environment_reload" ]
[ "tests/unittests/test_dispatcher.py::TestDispatcherSteinLegacyFallback::test_dispatcher_functions_metadata_request_legacy_fallback", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_sync_threadpool_set_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_sync_threadpool_below_min_setting", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_sync_invocation_request_log_in_placeholder_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_async_invocation_request_log", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_sync_threadpool_in_placeholder", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_sync_invocation_request_log_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_sync_threadpool_exceed_max_setting", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_send_worker_request", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_async_invocation_request_log_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_sync_threadpool_default_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_sync_invocation_request_log", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_sync_threadpool_in_placeholder_below_min", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_async_invocation_request_log_in_placeholder_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_sync_threadpool_in_placeholder_above_max", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_sync_threadpool_invalid_worker_count", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_sync_threadpool_in_placeholder_invalid", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_environment_reload_logging", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_initialize_worker_logging", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_in_placeholder_invalid", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_environment_reload_logging", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_invalid_worker_count", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_sync_invocation_request_log_in_placeholder_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_below_min_setting", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_async_invocation_request_log", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_sync_invocation_request_log", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_in_placeholder_below_min", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_send_worker_request", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_initialize_worker_logging", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_set_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_async_invocation_request_log_in_placeholder_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_in_placeholder_above_max", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_async_invocation_request_log_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_sync_invocation_request_log_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_default_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_exceed_max_setting", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_in_placeholder", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_sync_invocation_request_log_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_async_invocation_request_log_in_placeholder_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_sync_threadpool_in_placeholder_invalid", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_sync_threadpool_in_placeholder_below_min", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_environment_reload_logging", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_sync_threadpool_in_placeholder", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_sync_threadpool_exceed_max_setting", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_initialize_worker_logging", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_sync_threadpool_default_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_sync_threadpool_below_min_setting", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_sync_threadpool_in_placeholder_above_max", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_sync_threadpool_set_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_send_worker_request", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_async_invocation_request_log_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_sync_invocation_request_log", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_async_invocation_request_log", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_sync_invocation_request_log_in_placeholder_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_sync_threadpool_invalid_worker_count", "tests/unittests/test_dispatcher.py::TestDispatcherStein::test_dispatcher_functions_metadata_request" ]
[]
MIT License
null
Azure__azure-functions-python-worker-1318
d0135b091e8df03f8ac131894e0ec66f780de049
2023-09-18 18:23:19
d0135b091e8df03f8ac131894e0ec66f780de049
codecov[bot]: ## [Codecov](https://app.codecov.io/gh/Azure/azure-functions-python-worker/pull/1318?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) Report > Merging [#1318](https://app.codecov.io/gh/Azure/azure-functions-python-worker/pull/1318?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) (a306a7b) into [dev](https://app.codecov.io/gh/Azure/azure-functions-python-worker/commit/d0135b091e8df03f8ac131894e0ec66f780de049?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) (d0135b0) will **decrease** coverage by `52.62%`. > The diff coverage is `0.00%`. > :exclamation: Current head a306a7b differs from pull request most recent head b8e579a. Consider uploading reports for the commit b8e579a to get more accurate results ```diff @@ Coverage Diff @@ ## dev #1318 +/- ## =========================================== - Coverage 84.70% 32.08% -52.62% =========================================== Files 34 34 Lines 1922 1926 +4 Branches 366 365 -1 =========================================== - Hits 1628 618 -1010 - Misses 224 1307 +1083 + Partials 70 1 -69 ``` | [Flag](https://app.codecov.io/gh/Azure/azure-functions-python-worker/pull/1318/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/Azure/azure-functions-python-worker/pull/1318/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | `32.08% <0.00%> (-52.57%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/Azure/azure-functions-python-worker/pull/1318?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | Coverage Δ | | |---|---|---| | [azure\_functions\_worker/main.py](https://app.codecov.io/gh/Azure/azure-functions-python-worker/pull/1318?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure#diff-YXp1cmVfZnVuY3Rpb25zX3dvcmtlci9tYWluLnB5) | `0.00% <0.00%> (ø)` | | ... and [23 files with indirect coverage changes](https://app.codecov.io/gh/Azure/azure-functions-python-worker/pull/1318/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure)
diff --git a/azure_functions_worker/main.py b/azure_functions_worker/main.py index 3edf284..4e1f70a 100644 --- a/azure_functions_worker/main.py +++ b/azure_functions_worker/main.py @@ -2,7 +2,6 @@ # Licensed under the MIT License. """Main entrypoint.""" - import argparse @@ -26,6 +25,18 @@ def parse_args(): 'syslog, or a file path') parser.add_argument('--grpcMaxMessageLength', type=int, dest='grpc_max_msg_len') + parser.add_argument('--functions-uri', dest='functions_uri', type=str, + help='URI with IP Address and Port used to' + ' connect to the Host via gRPC.') + parser.add_argument('--functions-request-id', dest='functions_request_id', + type=str, help='Request ID used for gRPC communication ' + 'with the Host.') + parser.add_argument('--functions-worker-id', + dest='functions_worker_id', type=str, + help='Worker ID assigned to this language worker.') + parser.add_argument('--functions-grpc-max-message-length', type=int, + dest='functions_grpc_max_msg_len', + help='Max grpc message length for Functions') return parser.parse_args()
Update python language worker to support handling new command line arguments with functions- prefix The command-line arguments that the language worker receives from the Functions Host have generic names (such as 'host' and 'port'). This can cause conflicts with other environment variables in certain environments. To address this issue, the Functions Host will now send a new set of arguments prefixed with `functions-<argumentname>`. This will be in addition to the existing arguments. With the new planned host change, host code will send command line arguments like below. > -host 127.0.0.1 --port 50821 --workerId e9efd817-47a1-45dc-9e20-e6f975d7a025 --requestId cbef5957-cdb3-4462-9ee7-ac9f91be0a51 --grpcMaxMessageLength 2147483647 --functions-uri http://127.0.0.1:50821 --functions-workerid e9efd817-47a1-45dc-9e20-e6f975d7a025 --functions-requestid cbef5957-cdb3-4462-9ee7-ac9f91be0a51 --functions-grpcmaxmessagelength 2147483647 The new arguments sent are: 1. functions-uri 2. functions-request-id 3. functions-worker-id 4. functions-grpc-max-message-length Initial sanity testing showed that python worker fails to start when the new arguments are sent. We need to fix the python worker to handle these new arguments. #### Expected behavior with the fix: 1. Use the new arguments (the one with "functions-" prefix). 2. If the new arguments are not present, use the old ones (PORT, HOST etc..) See https://github.com/Azure/azure-functions-host/issues/9504 for more details.
Azure/azure-functions-python-worker
diff --git a/tests/unittests/test_main.py b/tests/unittests/test_main.py new file mode 100644 index 0000000..2fe29c8 --- /dev/null +++ b/tests/unittests/test_main.py @@ -0,0 +1,79 @@ +import unittest +import sys +from unittest.mock import patch +from azure_functions_worker.main import parse_args + + +class TestMain(unittest.TestCase): + + @patch.object(sys, 'argv', + ['xxx', '--host', '127.0.0.1', + '--port', '50821', + '--workerId', 'e9efd817-47a1-45dc-9e20-e6f975d7a025', + '--requestId', 'cbef5957-cdb3-4462-9ee7-ac9f91be0a51', + '--grpcMaxMessageLength', '2147483647', + '--functions-uri', 'http://127.0.0.1:50821', + '--functions-worker-id', + 'e9efd817-47a1-45dc-9e20-e6f975d7a025', + '--functions-request-id', + 'cbef5957-cdb3-4462-9ee7-ac9f91be0a51', + '--functions-grpc-max-message-length', '2147483647']) + def test_all_args(self): + args = parse_args() + self.assertEqual(args.host, '127.0.0.1') + self.assertEqual(args.port, 50821) + self.assertEqual(args.worker_id, + 'e9efd817-47a1-45dc-9e20-e6f975d7a025') + self.assertEqual(args.request_id, + 'cbef5957-cdb3-4462-9ee7-ac9f91be0a51') + self.assertEqual(args.grpc_max_msg_len, 2147483647) + self.assertEqual(args.functions_uri, 'http://127.0.0.1:50821') + self.assertEqual(args.functions_worker_id, + 'e9efd817-47a1-45dc-9e20-e6f975d7a025') + self.assertEqual(args.functions_request_id, + 'cbef5957-cdb3-4462-9ee7-ac9f91be0a51') + self.assertEqual(args.functions_grpc_max_msg_len, 2147483647) + + @patch.object(sys, 'argv', + ['xxx', '--host', '127.0.0.1', + '--port', '50821', + '--workerId', 'e9efd817-47a1-45dc-9e20-e6f975d7a025', + '--requestId', 'cbef5957-cdb3-4462-9ee7-ac9f91be0a51', + '--grpcMaxMessageLength', '2147483647']) + def test_old_args(self): + args = parse_args() + self.assertEqual(args.host, '127.0.0.1') + self.assertEqual(args.port, 50821) + self.assertEqual(args.worker_id, + 'e9efd817-47a1-45dc-9e20-e6f975d7a025') + self.assertEqual(args.request_id, + 'cbef5957-cdb3-4462-9ee7-ac9f91be0a51') + self.assertEqual(args.grpc_max_msg_len, 2147483647) + self.assertIsNone(args.functions_uri) + self.assertIsNone(args.functions_worker_id) + self.assertIsNone(args.functions_request_id) + self.assertIsNone(args.functions_grpc_max_msg_len) + + @patch.object(sys, 'argv', + ['xxx', '--functions-uri', 'http://127.0.0.1:50821', + '--functions-worker-id', + 'e9efd817-47a1-45dc-9e20-e6f975d7a025', + '--functions-request-id', + 'cbef5957-cdb3-4462-9ee7-ac9f91be0a51', + '--functions-grpc-max-message-length', '2147483647']) + def test_new_args(self): + args = parse_args() + self.assertEqual(args.functions_uri, 'http://127.0.0.1:50821') + self.assertEqual(args.functions_worker_id, + 'e9efd817-47a1-45dc-9e20-e6f975d7a025') + self.assertEqual(args.functions_request_id, + 'cbef5957-cdb3-4462-9ee7-ac9f91be0a51') + self.assertEqual(args.functions_grpc_max_msg_len, 2147483647) + + @patch.object(sys, 'argv', ['xxx', '--host', 'dummy_host', + '--port', '12345', + '--invalid-arg', 'invalid_value']) + def test_invalid_args(self): + with self.assertRaises(SystemExit) as context: + parse_args() + self.assertEqual(context.exception.code, 2)
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 1, "test_score": 2 }, "num_modified_files": 1 }
4.17
{ "env_vars": null, "env_yml_path": [], "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [], "python": "3.9", "reqs_path": [], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
aiohappyeyeballs==2.6.1 aiohttp==3.11.14 aiosignal==1.3.2 anyio==4.9.0 async-timeout==5.0.1 attrs==25.3.0 azure-core==1.32.0 azure-eventhub==5.7.0 azure-functions==1.16.0 azure-functions-durable==1.2.10 -e git+https://github.com/Azure/azure-functions-python-worker.git@d0135b091e8df03f8ac131894e0ec66f780de049#egg=azure_functions_worker blinker==1.9.0 certifi==2025.1.31 charset-normalizer==3.4.1 click==8.1.8 coverage==7.8.0 exceptiongroup==1.2.2 execnet==2.1.1 fastapi==0.85.2 flake8==4.0.1 Flask==3.1.0 frozenlist==1.5.0 furl==2.1.4 grpcio==1.54.3 grpcio-tools==1.54.3 idna==3.10 importlib_metadata==8.6.1 iniconfig==2.1.0 itsdangerous==2.2.0 Jinja2==3.1.6 joblib==1.4.2 MarkupSafe==3.0.2 mccabe==0.6.1 multidict==6.2.0 mypy==1.15.0 mypy-extensions==1.0.0 narwhals==1.32.0 numpy==2.0.2 opencv-python==4.11.0.86 orderedmultidict==1.0.1 packaging==24.2 pandas==2.2.3 plotly==6.0.1 pluggy==1.5.0 propcache==0.3.1 protobuf==4.22.5 ptvsd==4.3.2 pycodestyle==2.8.0 pycryptodome==3.10.4 pydantic==1.10.21 pyflakes==2.4.0 pytest==8.3.5 pytest-cov==6.0.0 pytest-instafail==0.5.0 pytest-randomly==3.16.0 pytest-rerunfailures==15.0 pytest-sugar==1.0.0 pytest-xdist==3.6.1 python-dateutil==2.8.2 python-dotenv==1.1.0 pytz==2025.2 requests==2.32.3 scikit-learn==1.6.1 scipy==1.13.1 six==1.17.0 sniffio==1.3.1 starlette==0.20.4 termcolor==3.0.0 threadpoolctl==3.6.0 tomli==2.2.1 typing_extensions==4.13.0 tzdata==2025.2 uamqp==1.6.11 urllib3==2.3.0 Werkzeug==3.1.3 yarl==1.18.3 zipp==3.21.0
name: azure-functions-python-worker channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - aiohappyeyeballs==2.6.1 - aiohttp==3.11.14 - aiosignal==1.3.2 - anyio==4.9.0 - async-timeout==5.0.1 - attrs==25.3.0 - azure-core==1.32.0 - azure-eventhub==5.7.0 - azure-functions==1.16.0 - azure-functions-durable==1.2.10 - blinker==1.9.0 - certifi==2025.1.31 - charset-normalizer==3.4.1 - click==8.1.8 - coverage==7.8.0 - exceptiongroup==1.2.2 - execnet==2.1.1 - fastapi==0.85.2 - flake8==4.0.1 - flask==3.1.0 - frozenlist==1.5.0 - furl==2.1.4 - grpcio==1.54.3 - grpcio-tools==1.54.3 - idna==3.10 - importlib-metadata==8.6.1 - iniconfig==2.1.0 - itsdangerous==2.2.0 - jinja2==3.1.6 - joblib==1.4.2 - markupsafe==3.0.2 - mccabe==0.6.1 - multidict==6.2.0 - mypy==1.15.0 - mypy-extensions==1.0.0 - narwhals==1.32.0 - numpy==2.0.2 - opencv-python==4.11.0.86 - orderedmultidict==1.0.1 - packaging==24.2 - pandas==2.2.3 - plotly==6.0.1 - pluggy==1.5.0 - propcache==0.3.1 - protobuf==4.22.5 - ptvsd==4.3.2 - pycodestyle==2.8.0 - pycryptodome==3.10.4 - pydantic==1.10.21 - pyflakes==2.4.0 - pytest==8.3.5 - pytest-cov==6.0.0 - pytest-instafail==0.5.0 - pytest-randomly==3.16.0 - pytest-rerunfailures==15.0 - pytest-sugar==1.0.0 - pytest-xdist==3.6.1 - python-dateutil==2.8.2 - python-dotenv==1.1.0 - pytz==2025.2 - requests==2.32.3 - scikit-learn==1.6.1 - scipy==1.13.1 - six==1.17.0 - sniffio==1.3.1 - starlette==0.20.4 - termcolor==3.0.0 - threadpoolctl==3.6.0 - tomli==2.2.1 - typing-extensions==4.13.0 - tzdata==2025.2 - uamqp==1.6.11 - urllib3==2.3.0 - werkzeug==3.1.3 - yarl==1.18.3 - zipp==3.21.0 prefix: /opt/conda/envs/azure-functions-python-worker
[ "tests/unittests/test_main.py::TestMain::test_old_args", "tests/unittests/test_main.py::TestMain::test_new_args", "tests/unittests/test_main.py::TestMain::test_all_args" ]
[]
[ "tests/unittests/test_main.py::TestMain::test_invalid_args" ]
[]
MIT License
null
Azure__azure-functions-python-worker-1378
f269c09764da25e70cad4c6f4bd785cd86221c12
2023-12-06 22:31:30
f269c09764da25e70cad4c6f4bd785cd86221c12
codecov[bot]: ## [Codecov](https://app.codecov.io/gh/Azure/azure-functions-python-worker/pull/1378?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) Report All modified and coverable lines are covered by tests :white_check_mark: > Comparison is base [(`f269c09`)](https://app.codecov.io/gh/Azure/azure-functions-python-worker/commit/f269c09764da25e70cad4c6f4bd785cd86221c12?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) 85.81% compared to head [(`512a37e`)](https://app.codecov.io/gh/Azure/azure-functions-python-worker/pull/1378?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) 85.11%. <details><summary>Additional details and impacted files</summary> ```diff @@ Coverage Diff @@ ## dev #1378 +/- ## ========================================== - Coverage 85.81% 85.11% -0.71% ========================================== Files 35 35 Lines 1953 1955 +2 Branches 370 370 ========================================== - Hits 1676 1664 -12 - Misses 208 217 +9 - Partials 69 74 +5 ``` | [Flag](https://app.codecov.io/gh/Azure/azure-functions-python-worker/pull/1378/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/Azure/azure-functions-python-worker/pull/1378/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | `85.06% <100.00%> (-0.71%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure#carryforward-flags-in-the-pull-request-comment) to find out more. </details> [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/Azure/azure-functions-python-worker/pull/1378?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure). :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure).
diff --git a/azure_functions_worker/dispatcher.py b/azure_functions_worker/dispatcher.py index 625397f..a0ac974 100644 --- a/azure_functions_worker/dispatcher.py +++ b/azure_functions_worker/dispatcher.py @@ -16,6 +16,7 @@ import threading from asyncio import BaseEventLoop from logging import LogRecord from typing import List, Optional +from datetime import datetime import grpc @@ -431,6 +432,7 @@ class Dispatcher(metaclass=DispatcherMeta): exception=self._serialize_exception(ex)))) async def _handle__invocation_request(self, request): + invocation_time = datetime.utcnow() invoc_request = request.invocation_request invocation_id = invoc_request.invocation_id function_id = invoc_request.function_id @@ -452,7 +454,8 @@ class Dispatcher(metaclass=DispatcherMeta): f'function ID: {function_id}', f'function name: {fi.name}', f'invocation ID: {invocation_id}', - f'function type: {"async" if fi.is_async else "sync"}' + f'function type: {"async" if fi.is_async else "sync"}', + f'timestamp (UTC): {invocation_time}' ] if not fi.is_async: function_invocation_logs.append(
[FeatureRequest] Add timestamp in the received invocation logs **Describe the request: A clear and concise description.** Adding a utcnow time stamp that is added to the ReceivedInvocationRequest
Azure/azure-functions-python-worker
diff --git a/tests/unittests/test_dispatcher.py b/tests/unittests/test_dispatcher.py index 43df881..0605a7d 100644 --- a/tests/unittests/test_dispatcher.py +++ b/tests/unittests/test_dispatcher.py @@ -304,15 +304,20 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): await self._check_if_function_is_ok(host) ) - mock_logger.info.assert_any_call( - 'Received FunctionInvocationRequest, ' - f'request ID: {request_id}, ' - f'function ID: {func_id}, ' - f'function name: {func_name}, ' - f'invocation ID: {invoke_id}, ' - 'function type: sync, ' - f'sync threadpool max workers: {self._default_workers}' - ) + logs, _ = mock_logger.info.call_args + self.assertRegex(logs[0], + 'Received FunctionInvocationRequest, ' + f'request ID: {request_id}, ' + f'function ID: {func_id}, ' + f'function name: {func_name}, ' + f'invocation ID: {invoke_id}, ' + 'function type: sync, ' + r'timestamp \(UTC\): ' + r'(\d{4}-\d{2}-\d{2} ' + r'\d{2}:\d{2}:\d{2}.\d{6}), ' + 'sync threadpool max workers: ' + f'{self._default_workers}' + ) async def test_async_invocation_request_log(self): with patch('azure_functions_worker.dispatcher.logger') as mock_logger: @@ -323,14 +328,18 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): await self._check_if_async_function_is_ok(host) ) - mock_logger.info.assert_any_call( - 'Received FunctionInvocationRequest, ' - f'request ID: {request_id}, ' - f'function ID: {func_id}, ' - f'function name: {func_name}, ' - f'invocation ID: {invoke_id}, ' - 'function type: async' - ) + logs, _ = mock_logger.info.call_args + self.assertRegex(logs[0], + 'Received FunctionInvocationRequest, ' + f'request ID: {request_id}, ' + f'function ID: {func_id}, ' + f'function name: {func_name}, ' + f'invocation ID: {invoke_id}, ' + 'function type: async, ' + r'timestamp \(UTC\): ' + r'(\d{4}-\d{2}-\d{2} ' + r'\d{2}:\d{2}:\d{2}.\d{6})' + ) async def test_sync_invocation_request_log_threads(self): os.environ.update({PYTHON_THREADPOOL_THREAD_COUNT: '5'}) @@ -342,15 +351,19 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): await self._check_if_function_is_ok(host) ) - mock_logger.info.assert_any_call( - 'Received FunctionInvocationRequest, ' - f'request ID: {request_id}, ' - f'function ID: {func_id}, ' - f'function name: {func_name}, ' - f'invocation ID: {invoke_id}, ' - 'function type: sync, ' - 'sync threadpool max workers: 5' - ) + logs, _ = mock_logger.info.call_args + self.assertRegex(logs[0], + 'Received FunctionInvocationRequest, ' + f'request ID: {request_id}, ' + f'function ID: {func_id}, ' + f'function name: {func_name}, ' + f'invocation ID: {invoke_id}, ' + 'function type: sync, ' + r'timestamp \(UTC\): ' + r'(\d{4}-\d{2}-\d{2} ' + r'\d{2}:\d{2}:\d{2}.\d{6}), ' + 'sync threadpool max workers: 5' + ) async def test_async_invocation_request_log_threads(self): os.environ.update({PYTHON_THREADPOOL_THREAD_COUNT: '4'}) @@ -362,14 +375,18 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): await self._check_if_async_function_is_ok(host) ) - mock_logger.info.assert_any_call( - 'Received FunctionInvocationRequest, ' - f'request ID: {request_id}, ' - f'function ID: {func_id}, ' - f'function name: {func_name}, ' - f'invocation ID: {invoke_id}, ' - 'function type: async' - ) + logs, _ = mock_logger.info.call_args + self.assertRegex(logs[0], + 'Received FunctionInvocationRequest, ' + f'request ID: {request_id}, ' + f'function ID: {func_id}, ' + f'function name: {func_name}, ' + f'invocation ID: {invoke_id}, ' + 'function type: async, ' + r'timestamp \(UTC\): ' + r'(\d{4}-\d{2}-\d{2} ' + r'\d{2}:\d{2}:\d{2}.\d{6})' + ) async def test_sync_invocation_request_log_in_placeholder_threads(self): with patch('azure_functions_worker.dispatcher.logger') as mock_logger: @@ -383,15 +400,19 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): await self._check_if_function_is_ok(host) ) - mock_logger.info.assert_any_call( - 'Received FunctionInvocationRequest, ' - f'request ID: {request_id}, ' - f'function ID: {func_id}, ' - f'function name: {func_name}, ' - f'invocation ID: {invoke_id}, ' - 'function type: sync, ' - 'sync threadpool max workers: 5' - ) + logs, _ = mock_logger.info.call_args + self.assertRegex(logs[0], + 'Received FunctionInvocationRequest, ' + f'request ID: {request_id}, ' + f'function ID: {func_id}, ' + f'function name: {func_name}, ' + f'invocation ID: {invoke_id}, ' + 'function type: sync, ' + r'timestamp \(UTC\): ' + r'(\d{4}-\d{2}-\d{2} ' + r'\d{2}:\d{2}:\d{2}.\d{6}), ' + 'sync threadpool max workers: 5' + ) async def test_async_invocation_request_log_in_placeholder_threads(self): with patch('azure_functions_worker.dispatcher.logger') as mock_logger: @@ -405,14 +426,18 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): await self._check_if_async_function_is_ok(host) ) - mock_logger.info.assert_any_call( - 'Received FunctionInvocationRequest, ' - f'request ID: {request_id}, ' - f'function ID: {func_id}, ' - f'function name: {func_name}, ' - f'invocation ID: {invoke_id}, ' - 'function type: async' - ) + logs, _ = mock_logger.info.call_args + self.assertRegex(logs[0], + 'Received FunctionInvocationRequest, ' + f'request ID: {request_id}, ' + f'function ID: {func_id}, ' + f'function name: {func_name}, ' + f'invocation ID: {invoke_id}, ' + 'function type: async, ' + r'timestamp \(UTC\): ' + r'(\d{4}-\d{2}-\d{2} ' + r'\d{2}:\d{2}:\d{2}.\d{6})' + ) async def _assert_workers_threadpool(self, ctrl, host, expected_worker_count):
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_short_problem_statement" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 3, "test_score": 2 }, "num_modified_files": 1 }
4.22
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": null, "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.9", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
aiohappyeyeballs==2.6.1 aiohttp==3.11.14 aiosignal==1.3.2 anyio==4.9.0 async-timeout==5.0.1 attrs==25.3.0 azure-core==1.32.0 azure-eventhub==5.7.0 azure-functions==1.18.0b4 azure-functions-durable==1.2.10 -e git+https://github.com/Azure/azure-functions-python-worker.git@f269c09764da25e70cad4c6f4bd785cd86221c12#egg=azure_functions_worker blinker==1.9.0 certifi==2025.1.31 charset-normalizer==3.4.1 click==8.1.8 coverage==7.8.0 exceptiongroup==1.2.2 execnet==2.1.1 fastapi==0.85.2 flake8==4.0.1 Flask==3.1.0 frozenlist==1.5.0 furl==2.1.4 grpcio==1.54.3 grpcio-tools==1.54.3 idna==3.10 importlib_metadata==8.6.1 iniconfig==2.1.0 itsdangerous==2.2.0 Jinja2==3.1.6 joblib==1.4.2 MarkupSafe==3.0.2 mccabe==0.6.1 multidict==6.2.0 mypy==1.15.0 mypy-extensions==1.0.0 narwhals==1.32.0 numpy==2.0.2 opencv-python==4.11.0.86 orderedmultidict==1.0.1 packaging==24.2 pandas==2.2.3 plotly==6.0.1 pluggy==1.5.0 propcache==0.3.1 protobuf==4.22.5 ptvsd==4.3.2 pycodestyle==2.8.0 pycryptodome==3.10.4 pydantic==1.10.21 pyflakes==2.4.0 pytest==8.3.5 pytest-cov==6.0.0 pytest-instafail==0.5.0 pytest-randomly==3.16.0 pytest-rerunfailures==15.0 pytest-sugar==1.0.0 pytest-xdist==3.6.1 python-dateutil==2.8.2 python-dotenv==1.1.0 pytz==2025.2 requests==2.32.3 scikit-learn==1.6.1 scipy==1.13.1 six==1.17.0 sniffio==1.3.1 starlette==0.20.4 swebench_matterhorn @ file:///swebench_matterhorn termcolor==3.0.0 threadpoolctl==3.6.0 tomli==2.2.1 typing_extensions==4.13.0 tzdata==2025.2 uamqp==1.6.11 urllib3==2.3.0 Werkzeug==3.1.3 yarl==1.18.3 zipp==3.21.0
name: azure-functions-python-worker channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - aiohappyeyeballs==2.6.1 - aiohttp==3.11.14 - aiosignal==1.3.2 - anyio==4.9.0 - async-timeout==5.0.1 - attrs==25.3.0 - azure-core==1.32.0 - azure-eventhub==5.7.0 - azure-functions==1.18.0b4 - azure-functions-durable==1.2.10 - blinker==1.9.0 - certifi==2025.1.31 - charset-normalizer==3.4.1 - click==8.1.8 - coverage==7.8.0 - exceptiongroup==1.2.2 - execnet==2.1.1 - fastapi==0.85.2 - flake8==4.0.1 - flask==3.1.0 - frozenlist==1.5.0 - furl==2.1.4 - grpcio==1.54.3 - grpcio-tools==1.54.3 - idna==3.10 - importlib-metadata==8.6.1 - iniconfig==2.1.0 - itsdangerous==2.2.0 - jinja2==3.1.6 - joblib==1.4.2 - markupsafe==3.0.2 - mccabe==0.6.1 - multidict==6.2.0 - mypy==1.15.0 - mypy-extensions==1.0.0 - narwhals==1.32.0 - numpy==2.0.2 - opencv-python==4.11.0.86 - orderedmultidict==1.0.1 - packaging==24.2 - pandas==2.2.3 - plotly==6.0.1 - pluggy==1.5.0 - propcache==0.3.1 - protobuf==4.22.5 - ptvsd==4.3.2 - pycodestyle==2.8.0 - pycryptodome==3.10.4 - pydantic==1.10.21 - pyflakes==2.4.0 - pytest==8.3.5 - pytest-cov==6.0.0 - pytest-instafail==0.5.0 - pytest-randomly==3.16.0 - pytest-rerunfailures==15.0 - pytest-sugar==1.0.0 - pytest-xdist==3.6.1 - python-dateutil==2.8.2 - python-dotenv==1.1.0 - pytz==2025.2 - requests==2.32.3 - scikit-learn==1.6.1 - scipy==1.13.1 - six==1.17.0 - sniffio==1.3.1 - starlette==0.20.4 - swebench-matterhorn==0.0.0 - termcolor==3.0.0 - threadpoolctl==3.6.0 - tomli==2.2.1 - typing-extensions==4.13.0 - tzdata==2025.2 - uamqp==1.6.11 - urllib3==2.3.0 - werkzeug==3.1.3 - yarl==1.18.3 - zipp==3.21.0 prefix: /opt/conda/envs/azure-functions-python-worker
[ "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_sync_invocation_request_log_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_sync_invocation_request_log", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_async_invocation_request_log_in_placeholder_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_sync_invocation_request_log_in_placeholder_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_async_invocation_request_log", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_async_invocation_request_log_threads" ]
[]
[ "tests/unittests/test_dispatcher.py::TestDispatcherInitRequest::test_dispatcher_load_modules_con_placeholder_enabled", "tests/unittests/test_dispatcher.py::TestDispatcherInitRequest::test_dispatcher_load_modules_dedicated_app", "tests/unittests/test_dispatcher.py::TestDispatcherInitRequest::test_dispatcher_load_modules_con_app_placeholder_disabled", "tests/unittests/test_dispatcher.py::TestDispatcherInitRequest::test_dispatcher_load_azfunc_in_init", "tests/unittests/test_dispatcher.py::TestDispatcherStein::test_dispatcher_functions_metadata_request_with_retry", "tests/unittests/test_dispatcher.py::TestDispatcherStein::test_dispatcher_functions_metadata_request", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_initialize_worker_logging", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_in_placeholder", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_in_placeholder_above_max", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_set_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_send_worker_request", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_environment_reload_logging", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_environment_reload_settings_logs", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_invalid_worker_count", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_in_placeholder_invalid", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_environment_reload", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_in_placeholder_below_min", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_below_min_setting", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_default_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_initialize_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_initialize_worker_settings_logs", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_exceed_max_setting", "tests/unittests/test_dispatcher.py::TestDispatcherSteinLegacyFallback::test_dispatcher_functions_metadata_request_legacy_fallback" ]
[]
MIT License
null
Azure__azure-functions-python-worker-875
e4adb351e5454c093fcefbf0fb84f200af32f386
2021-07-20 18:27:12
5e522fc610088efec21a1f067e41c9327a69965d
vrdmr: @AnatoliB - Yes, that's the plan - to remove the code and the unit tests. I wanted to get this change in sooner to unblock the perf testing work and get this part of the next week's release.
diff --git a/azure_functions_worker/constants.py b/azure_functions_worker/constants.py index b64b70e..08f464e 100644 --- a/azure_functions_worker/constants.py +++ b/azure_functions_worker/constants.py @@ -1,6 +1,8 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. +import sys + # Capabilities RAW_HTTP_BODY_BYTES = "RawHttpBodyBytes" TYPED_DATA_COLLECTION = "TypedDataCollection" @@ -36,7 +38,7 @@ UNIX_SHARED_MEMORY_DIRECTORIES = "FUNCTIONS_UNIX_SHARED_MEMORY_DIRECTORIES" # Setting Defaults PYTHON_THREADPOOL_THREAD_COUNT_DEFAULT = 1 PYTHON_THREADPOOL_THREAD_COUNT_MIN = 1 -PYTHON_THREADPOOL_THREAD_COUNT_MAX = 32 +PYTHON_THREADPOOL_THREAD_COUNT_MAX = sys.maxsize PYTHON_ISOLATE_WORKER_DEPENDENCIES_DEFAULT = False PYTHON_ISOLATE_WORKER_DEPENDENCIES_DEFAULT_39 = True PYTHON_ENABLE_WORKER_EXTENSIONS_DEFAULT = False diff --git a/azure_functions_worker/dispatcher.py b/azure_functions_worker/dispatcher.py index 2849598..e8a7b24 100644 --- a/azure_functions_worker/dispatcher.py +++ b/azure_functions_worker/dispatcher.py @@ -570,7 +570,9 @@ class Dispatcher(metaclass=DispatcherMeta): if int_value < PYTHON_THREADPOOL_THREAD_COUNT_MIN or ( int_value > PYTHON_THREADPOOL_THREAD_COUNT_MAX): logger.warning(f'{PYTHON_THREADPOOL_THREAD_COUNT} must be set ' - 'to a value between 1 and 32. ' + f'to a value between ' + f'{PYTHON_THREADPOOL_THREAD_COUNT_MIN} and ' + f'{PYTHON_THREADPOOL_THREAD_COUNT_MAX}. ' 'Reverting to default value for max_workers') return False
Allow specifying PYTHON_THREADPOOL_THREAD_COUNT larger than 32 Currently, the worker limits the maximum value of `PYTHON_THREADPOOL_THREAD_COUNT` to 32. Any value larger than that is ignored. There is no good reason for this in general case: if someone/something decided a larger number works better for a specific use case, this should be respected.
Azure/azure-functions-python-worker
diff --git a/tests/unittests/test_dispatcher.py b/tests/unittests/test_dispatcher.py index b9c4303..cb90ab8 100644 --- a/tests/unittests/test_dispatcher.py +++ b/tests/unittests/test_dispatcher.py @@ -10,7 +10,9 @@ from unittest.mock import patch from azure_functions_worker import protos from azure_functions_worker import testutils from azure_functions_worker.constants import PYTHON_THREADPOOL_THREAD_COUNT, \ - PYTHON_THREADPOOL_THREAD_COUNT_DEFAULT + PYTHON_THREADPOOL_THREAD_COUNT_DEFAULT, \ + PYTHON_THREADPOOL_THREAD_COUNT_MAX, \ + PYTHON_THREADPOOL_THREAD_COUNT_MIN SysVersionInfo = col.namedtuple("VersionInfo", ["major", "minor", "micro", "releaselevel", "serial"]) @@ -35,6 +37,7 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): script_root=DISPATCHER_FUNCTIONS_DIR) self._default_workers: Optional[ int] = PYTHON_THREADPOOL_THREAD_COUNT_DEFAULT + self._allowed_max_workers: int = 100000 self._pre_env = dict(os.environ) self.mock_version_info = patch( 'azure_functions_worker.dispatcher.sys.version_info', @@ -87,10 +90,12 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): """Test if the sync threadpool maximum worker can be set """ # Configure thread pool max worker - os.environ.update({PYTHON_THREADPOOL_THREAD_COUNT: '5'}) + os.environ.update({PYTHON_THREADPOOL_THREAD_COUNT: + f'{self._allowed_max_workers}'}) async with self._ctrl as host: await self._check_if_function_is_ok(host) - await self._assert_workers_threadpool(self._ctrl, host, 5) + await self._assert_workers_threadpool(self._ctrl, host, + self._allowed_max_workers) async def test_dispatcher_sync_threadpool_invalid_worker_count(self): """Test when sync threadpool maximum worker is set to an invalid value, @@ -124,15 +129,20 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): self._default_workers) mock_logger.warning.assert_any_call( f'{PYTHON_THREADPOOL_THREAD_COUNT} must be set to a value ' - 'between 1 and 32. Reverting to default value for max_workers') + f'between {PYTHON_THREADPOOL_THREAD_COUNT_MIN} and ' + f'{PYTHON_THREADPOOL_THREAD_COUNT_MAX}. Reverting to default ' + f'value for max_workers') + @unittest.skip("We no more check any max limit. This is up to the customer," + " how ever high int they want to set") async def test_dispatcher_sync_threadpool_exceed_max_setting(self): """Test if the sync threadpool will pick up default value when the setting is above maximum """ with patch('azure_functions_worker.dispatcher.logger') as mock_logger: # Configure thread pool max worker to an invalid value - os.environ.update({PYTHON_THREADPOOL_THREAD_COUNT: '33'}) + os.environ.update({PYTHON_THREADPOOL_THREAD_COUNT: + f'{self._over_max_workers}'}) async with self._ctrl as host: await self._check_if_function_is_ok(host) @@ -142,8 +152,9 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): mock_logger.warning.assert_any_call( f'{PYTHON_THREADPOOL_THREAD_COUNT} must be set to a value ' - 'between 1 and 32. ' - 'Reverting to default value for max_workers') + f'between {PYTHON_THREADPOOL_THREAD_COUNT_MIN} and ' + f'{PYTHON_THREADPOOL_THREAD_COUNT_MAX}. Reverting to default ' + f'value for max_workers') async def test_dispatcher_sync_threadpool_in_placeholder(self): """Test if the sync threadpool will pick up app setting in placeholder @@ -154,10 +165,10 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): # Reload environment variable on specialization await host.reload_environment(environment={ - PYTHON_THREADPOOL_THREAD_COUNT: '3' + PYTHON_THREADPOOL_THREAD_COUNT: f'{self._allowed_max_workers}' }) - # Ensure the dispatcher sync threadpool should fallback to 1 - await self._assert_workers_threadpool(self._ctrl, host, 3) + await self._assert_workers_threadpool(self._ctrl, host, + self._allowed_max_workers) async def test_dispatcher_sync_threadpool_in_placeholder_invalid(self): """Test if the sync threadpool will use the default setting when the @@ -178,6 +189,8 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): mock_logger.warning.assert_any_call( f'{PYTHON_THREADPOOL_THREAD_COUNT} must be an integer') + @unittest.skip("We no more check any max limit. This is up to the customer," + " how ever high int they want to set") async def test_dispatcher_sync_threadpool_in_placeholder_above_max(self): """Test if the sync threadpool will use the default setting when the app setting is above maximum @@ -188,7 +201,7 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): # Reload environment variable on specialization await host.reload_environment(environment={ - PYTHON_THREADPOOL_THREAD_COUNT: '33' + PYTHON_THREADPOOL_THREAD_COUNT: f'{self._over_max_workers}' }) await self._assert_workers_threadpool(self._ctrl, host, self._default_workers) @@ -196,7 +209,7 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): mock_logger.warning.assert_any_call( f'{PYTHON_THREADPOOL_THREAD_COUNT} must be set to a ' f'value ' - 'between 1 and 32. ' + 'between 1 and 1024. ' 'Reverting to default value for max_workers') async def test_dispatcher_sync_threadpool_in_placeholder_below_min(self): @@ -216,10 +229,10 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): self._default_workers) mock_logger.warning.assert_any_call( - f'{PYTHON_THREADPOOL_THREAD_COUNT} must be set to a ' - f'value ' - 'between 1 and 32. ' - 'Reverting to default value for max_workers') + f'{PYTHON_THREADPOOL_THREAD_COUNT} must be set to a value ' + f'between {PYTHON_THREADPOOL_THREAD_COUNT_MIN} and ' + f'{PYTHON_THREADPOOL_THREAD_COUNT_MAX}. Reverting to ' + f'default value for max_workers') async def test_sync_invocation_request_log(self): with patch('azure_functions_worker.dispatcher.logger') as mock_logger: @@ -346,7 +359,7 @@ class TestThreadPoolSettingsPython37(testutils.AsyncTestCase): # Check if the dispatcher still function await self._check_if_function_is_ok(host) - async def _check_if_function_is_ok(self, host) -> Tuple[str, str]: + async def _check_if_function_is_ok(self, host) -> Tuple[str, str, str]: # Ensure the function can be properly loaded function_name = "show_context" func_id, load_r = await host.load_function(function_name)
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 1, "test_score": 2 }, "num_modified_files": 2 }
1.2
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio", "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.9", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
azure-core==1.32.0 azure-eventhub==5.1.0 azure-functions==1.7.2 -e git+https://github.com/Azure/azure-functions-python-worker.git@e4adb351e5454c093fcefbf0fb84f200af32f386#egg=azure_functions_worker certifi==2025.1.31 charset-normalizer==3.4.1 coverage==7.8.0 entrypoints==0.3 exceptiongroup==1.2.2 execnet==2.1.1 flake8==3.7.9 grpcio==1.33.2 grpcio-tools==1.33.2 idna==3.10 importlib_metadata==8.6.1 iniconfig==2.1.0 mccabe==0.6.1 mypy==1.15.0 mypy-extensions==1.0.0 packaging==24.2 pluggy==1.5.0 protobuf==3.20.3 ptvsd==4.3.2 pycodestyle==2.5.0 pyflakes==2.1.1 pytest==8.3.5 pytest-asyncio==0.26.0 pytest-cov==6.0.0 pytest-instafail==0.5.0 pytest-mock==3.14.0 pytest-randomly==3.16.0 pytest-rerunfailures==15.0 pytest-sugar==1.0.0 pytest-xdist==3.6.1 python-dateutil==2.8.2 requests==2.32.3 six==1.17.0 swebench_matterhorn @ file:///swebench_matterhorn termcolor==3.0.0 tomli==2.2.1 typing_extensions==4.13.0 uamqp==1.6.11 urllib3==2.3.0 zipp==3.21.0
name: azure-functions-python-worker channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tzdata=2025a=h04d1e81_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - azure-core==1.32.0 - azure-eventhub==5.1.0 - azure-functions==1.7.2 - certifi==2025.1.31 - charset-normalizer==3.4.1 - coverage==7.8.0 - entrypoints==0.3 - exceptiongroup==1.2.2 - execnet==2.1.1 - flake8==3.7.9 - grpcio==1.33.2 - grpcio-tools==1.33.2 - idna==3.10 - importlib-metadata==8.6.1 - iniconfig==2.1.0 - mccabe==0.6.1 - mypy==1.15.0 - mypy-extensions==1.0.0 - packaging==24.2 - pluggy==1.5.0 - protobuf==3.20.3 - ptvsd==4.3.2 - pycodestyle==2.5.0 - pyflakes==2.1.1 - pytest==8.3.5 - pytest-asyncio==0.26.0 - pytest-cov==6.0.0 - pytest-instafail==0.5.0 - pytest-mock==3.14.0 - pytest-randomly==3.16.0 - pytest-rerunfailures==15.0 - pytest-sugar==1.0.0 - pytest-xdist==3.6.1 - python-dateutil==2.8.2 - requests==2.32.3 - six==1.17.0 - swebench-matterhorn==0.0.0 - termcolor==3.0.0 - tomli==2.2.1 - typing-extensions==4.13.0 - uamqp==1.6.11 - urllib3==2.3.0 - zipp==3.21.0 prefix: /opt/conda/envs/azure-functions-python-worker
[ "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_sync_threadpool_in_placeholder", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_sync_threadpool_set_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_set_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_in_placeholder", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_sync_threadpool_in_placeholder", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_sync_threadpool_set_worker" ]
[]
[ "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_initialize_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_sync_threadpool_in_placeholder_below_min", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_sync_threadpool_below_min_setting", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_async_invocation_request_log", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_sync_invocation_request_log_in_placeholder_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_sync_threadpool_in_placeholder_invalid", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_send_worker_request", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_initialize_worker_logging", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_sync_invocation_request_log_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_sync_threadpool_default_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_async_invocation_request_log_in_placeholder_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_sync_invocation_request_log", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_async_invocation_request_log_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython39::test_dispatcher_sync_threadpool_invalid_worker_count", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_in_placeholder_below_min", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_default_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_sync_invocation_request_log_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_in_placeholder_invalid", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_async_invocation_request_log", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_initialize_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_send_worker_request", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_async_invocation_request_log_in_placeholder_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_below_min_setting", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_invalid_worker_count", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_sync_invocation_request_log", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_initialize_worker_logging", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_sync_invocation_request_log_in_placeholder_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_async_invocation_request_log_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_initialize_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_sync_threadpool_in_placeholder_below_min", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_sync_threadpool_invalid_worker_count", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_sync_invocation_request_log_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_async_invocation_request_log_in_placeholder_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_sync_threadpool_below_min_setting", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_sync_invocation_request_log", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_sync_invocation_request_log_in_placeholder_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_send_worker_request", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_sync_threadpool_in_placeholder_invalid", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_async_invocation_request_log", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_sync_threadpool_default_worker", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_async_invocation_request_log_threads", "tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython38::test_dispatcher_initialize_worker_logging" ]
[]
MIT License
null
Azure__iotedgedev-173
ce59bad1286bf650d442b2b7fbe16a3db676a497
2018-05-16 17:52:55
a22c7b0c59505964c5aeab6f8ff859842783c236
diff --git a/iotedgedev/azurecli.py b/iotedgedev/azurecli.py index c5bce70..6bce331 100644 --- a/iotedgedev/azurecli.py +++ b/iotedgedev/azurecli.py @@ -226,10 +226,10 @@ class AzureCli: return result - def apply_configuration(self, deviceId, connection_string, config): - self.output.status(f("Deploying '{config}' to '{deviceId}'...")) + def apply_configuration(self, device_id, connection_string, hub_name, config): + self.output.status(f("Deploying '{config}' to '{device_id}'...")) - return self.invoke_az_cli_outproc(["iot", "hub", "apply-configuration", "-d", deviceId, "-k", config, "-l", connection_string], error_message=f("Failed to deploy '{config}' to '{deviceId}'..."), suppress_output=True) + return self.invoke_az_cli_outproc(["iot", "hub", "apply-configuration", "-d", device_id, "-n", hub_name, "-k", config, "-l", connection_string], error_message=f("Failed to deploy '{config}' to '{device_id}'..."), suppress_output=True) def get_free_iothub(self): with output_io_cls() as io: diff --git a/iotedgedev/connectionstring.py b/iotedgedev/connectionstring.py index cc29b68..2c8c19e 100644 --- a/iotedgedev/connectionstring.py +++ b/iotedgedev/connectionstring.py @@ -1,10 +1,10 @@ class ConnectionString: def __init__(self, value): - self.value = value + self.ConnectionString = value self.data = dict() - if self.value: - parts = value.split(';') + if self.ConnectionString: + parts = self.ConnectionString.split(';') if len(parts) > 0: for part in parts: subpart = part.split('=', 1) @@ -13,6 +13,8 @@ class ConnectionString: if self.data: self.HostName = self["hostname"] + if self.HostName: + self.HubName = self.HostName.split('.')[0] self.SharedAccessKey = self["sharedaccesskey"] def __getitem__(self, key): @@ -23,7 +25,7 @@ class IoTHubConnectionString(ConnectionString): def __init__(self, value): ConnectionString.__init__(self, value) - if self.value: + if self.ConnectionString: self.SharedAccessKeyName = self["sharedaccesskeyname"] @@ -31,5 +33,5 @@ class DeviceConnectionString(ConnectionString): def __init__(self, value): ConnectionString.__init__(self, value) - if self.value: + if self.ConnectionString: self.DeviceId = self["deviceid"] diff --git a/iotedgedev/edge.py b/iotedgedev/edge.py index 6e71ba0..4d20943 100644 --- a/iotedgedev/edge.py +++ b/iotedgedev/edge.py @@ -10,11 +10,11 @@ class Edge: self.output.header("DEPLOYING CONFIGURATION") - self.envvars.verify_envvar_has_val("IOTHUB_CONNECTION_STRING", self.envvars.IOTHUB_CONNECTION_STRING) - self.envvars.verify_envvar_has_val("DEVICE_CONNECTION_STRING", self.envvars.DEVICE_CONNECTION_STRING) + self.envvars.verify_envvar_has_val("IOTHUB_CONNECTION_INFO", self.envvars.IOTHUB_CONNECTION_INFO) + self.envvars.verify_envvar_has_val("DEVICE_CONNECTION_INFO", self.envvars.DEVICE_CONNECTION_INFO) self.envvars.verify_envvar_has_val("DEPLOYMENT_CONFIG_FILE", self.envvars.DEPLOYMENT_CONFIG_FILE) - self.azure_cli.apply_configuration(self.envvars.DEVICE_CONNECTION_INFO.DeviceId, self.envvars.IOTHUB_CONNECTION_STRING, self.envvars.DEPLOYMENT_CONFIG_FILE_PATH) + self.azure_cli.apply_configuration(self.envvars.DEVICE_CONNECTION_INFO.DeviceId, self.envvars.IOTHUB_CONNECTION_INFO.ConnectionString, self.envvars.IOTHUB_CONNECTION_INFO.HubName, self.envvars.DEPLOYMENT_CONFIG_FILE_PATH) self.output.footer("DEPLOYMENT COMPLETE") \ No newline at end of file
AZ IOT HUB apply-configuration needs hubname. If user has old version of az cli iot extension installed they get this: `az iot hub apply-configuration: error: argument --hub-name/-n is required ` - add the -n parameter to the apply-configuration call. you can get it in IOTHUB_CONNECTION_INFO.HostName apply-configuration might need ONLY hubname, but HostName has [name].azuredevices.net. Therefore, You might have to split the ConnectionString.HostName property and add a new property to that class called HubName.
Azure/iotedgedev
diff --git a/tests/test_connectionstring.py b/tests/test_connectionstring.py new file mode 100644 index 0000000..21d0dc9 --- /dev/null +++ b/tests/test_connectionstring.py @@ -0,0 +1,78 @@ +import os +import pytest +from dotenv import load_dotenv +from iotedgedev.connectionstring import ConnectionString, IoTHubConnectionString, DeviceConnectionString + +emptystring = "" +valid_connectionstring = "HostName=testhub.azure-devices.net;SharedAccessKey=gibberish" +valid_iothub_connectionstring = "HostName=testhub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=moregibberish" +valid_device_connectionstring = "HostName=testhub.azure-devices.net;DeviceId=testdevice;SharedAccessKey=othergibberish" +invalid_connectionstring = "HostName=azure-devices.net;SharedAccessKey=gibberish" +invalid_iothub_connectionstring = "HostName=testhub.azure-devices.net;SharedAccessKey=moregibberish" +invalid_device_connectionstring = "HostName=testhub.azure-devices.net;DeviceId=;SharedAccessKey=othergibberish" + +def test_empty_connectionstring(): + connectionstring = ConnectionString(emptystring) + assert not connectionstring.data + +def test_empty_iothub_connectionstring(): + connectionstring = IoTHubConnectionString(emptystring) + assert not connectionstring.data + +def test_empty_device_connectionstring(): + connectionstring = DeviceConnectionString(emptystring) + assert not connectionstring.data + +def test_valid_connectionstring(): + connectionstring = ConnectionString(valid_connectionstring) + assert connectionstring.HostName == "testhub.azure-devices.net" + assert connectionstring.HubName == "testhub" + assert connectionstring.SharedAccessKey == "gibberish" + +def test_valid_iothub_connectionstring(): + connectionstring = IoTHubConnectionString(valid_iothub_connectionstring) + assert connectionstring.HostName == "testhub.azure-devices.net" + assert connectionstring.HubName == "testhub" + assert connectionstring.SharedAccessKeyName == "iothubowner" + assert connectionstring.SharedAccessKey == "moregibberish" + +def test_valid_devicehub_connectionstring(): + connectionstring = DeviceConnectionString(valid_device_connectionstring) + assert connectionstring.HostName == "testhub.azure-devices.net" + assert connectionstring.HubName == "testhub" + assert connectionstring.DeviceId == "testdevice" + assert connectionstring.SharedAccessKey == "othergibberish" + +def test_invalid_connectionstring(): + connectionstring = ConnectionString(invalid_connectionstring) + assert connectionstring.HubName != "testhub" + +def test_invalid_iothub_connectionstring(): + with pytest.raises(KeyError): + IoTHubConnectionString(invalid_iothub_connectionstring) + +def test_invalid_devicehub_connectionstring(): + connectionstring = DeviceConnectionString(invalid_device_connectionstring) + assert connectionstring.HostName == "testhub.azure-devices.net" + assert connectionstring.HubName == "testhub" + assert not connectionstring.DeviceId + assert connectionstring.SharedAccessKey == "othergibberish" + +def test_valid_env_iothub_connectionstring(): + load_dotenv(".env") + env_iothub_connectionstring = os.getenv("IOTHUB_CONNECTION_STRING") + connectionstring = IoTHubConnectionString(env_iothub_connectionstring) + assert connectionstring.HostName + assert connectionstring.HubName + assert connectionstring.SharedAccessKey + assert connectionstring.SharedAccessKeyName + +def test_valid_env_device_connectionstring(): + load_dotenv(".env") + env_device_connectionstring = os.getenv("DEVICE_CONNECTION_STRING") + connectionstring = DeviceConnectionString(env_device_connectionstring) + assert connectionstring.HostName + assert connectionstring.HubName + assert connectionstring.SharedAccessKey + assert connectionstring.DeviceId + \ No newline at end of file diff --git a/tests/test_iotedgedev.py b/tests/test_iotedgedev.py index 2d08bad..c809c15 100644 --- a/tests/test_iotedgedev.py +++ b/tests/test_iotedgedev.py @@ -153,7 +153,7 @@ def test_monitor(request, capfd): print (err) print (result.output) - assert 'application properties' in out + assert 'timeCreated' in out @pytest.fixture
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 1, "test_score": 1 }, "num_modified_files": 3 }
0.79
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.6", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 applicationinsights==0.11.10 argcomplete==1.12.3 attrs==22.2.0 azure-cli==2.40.0 azure-cli-cloud==2.1.1 azure-cli-command-modules-nspkg==2.0.3 azure-cli-configure==2.0.24 azure-cli-core==2.40.0 azure-cli-extension==0.2.5 azure-cli-iot==0.3.11 azure-cli-nspkg==3.0.4 azure-cli-profile==2.1.5 azure-cli-resource==2.1.16 azure-cli-telemetry==1.0.8 azure-common==1.1.28 azure-core==1.24.2 azure-iot-edge-runtime-ctl==1.0.0rc22 azure-mgmt-authorization==0.50.0 azure-mgmt-core==1.3.2 azure-mgmt-iothub==0.8.2 azure-mgmt-iothubprovisioningservices==0.2.0 azure-mgmt-managementgroups==0.1.0 azure-mgmt-nspkg==3.0.2 azure-nspkg==3.0.2 bcrypt==4.0.1 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 click==8.0.4 cryptography==39.0.2 docker==3.0.0 docker-pycreds==0.4.0 enum34==1.1.10 fstrings==0.1.0 humanfriendly==10.0 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 -e git+https://github.com/Azure/iotedgedev.git@ce59bad1286bf650d442b2b7fbe16a3db676a497#egg=iotedgedev isodate==0.6.1 jmespath==0.10.0 knack==0.10.1 msal==1.18.0b1 msal-extensions==1.0.0 msrest==0.7.1 msrestazure==0.6.4.post1 oauthlib==3.2.2 packaging==21.3 paramiko==2.12.0 pkginfo==1.10.0 pluggy==1.0.0 portalocker==2.7.0 psutil==5.9.8 py==1.11.0 pycparser==2.21 Pygments==2.14.0 PyJWT==2.4.0 PyNaCl==1.5.0 pyOpenSSL==23.2.0 pyparsing==3.1.4 PySocks==1.7.1 pytest==7.0.1 python-dateutil==2.9.0.post0 python-dotenv==0.20.0 PyYAML==6.0.1 requests==2.27.1 requests-oauthlib==2.0.0 six==1.17.0 tabulate==0.8.10 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.26.20 websocket-client==1.3.1 zipp==3.6.0
name: iotedgedev channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - applicationinsights==0.11.10 - argcomplete==1.12.3 - attrs==22.2.0 - azure-cli==2.40.0 - azure-cli-cloud==2.1.1 - azure-cli-command-modules-nspkg==2.0.3 - azure-cli-configure==2.0.24 - azure-cli-core==2.40.0 - azure-cli-extension==0.2.5 - azure-cli-iot==0.3.11 - azure-cli-nspkg==3.0.4 - azure-cli-profile==2.1.5 - azure-cli-resource==2.1.16 - azure-cli-telemetry==1.0.8 - azure-common==1.1.28 - azure-core==1.24.2 - azure-iot-edge-runtime-ctl==1.0.0rc22 - azure-mgmt-authorization==0.50.0 - azure-mgmt-core==1.3.2 - azure-mgmt-iothub==0.8.2 - azure-mgmt-iothubprovisioningservices==0.2.0 - azure-mgmt-managementgroups==0.1.0 - azure-mgmt-nspkg==3.0.2 - azure-nspkg==3.0.2 - bcrypt==4.0.1 - cffi==1.15.1 - charset-normalizer==2.0.12 - click==8.0.4 - cryptography==39.0.2 - docker==3.0.0 - docker-pycreds==0.4.0 - enum34==1.1.10 - fstrings==0.1.0 - humanfriendly==10.0 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.6.1 - jmespath==0.10.0 - knack==0.10.1 - msal==1.18.0b1 - msal-extensions==1.0.0 - msrest==0.7.1 - msrestazure==0.6.4.post1 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.12.0 - pkginfo==1.10.0 - pluggy==1.0.0 - portalocker==2.7.0 - psutil==5.9.8 - py==1.11.0 - pycparser==2.21 - pygments==2.14.0 - pyjwt==2.4.0 - pynacl==1.5.0 - pyopenssl==23.2.0 - pyparsing==3.1.4 - pysocks==1.7.1 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - python-dotenv==0.20.0 - pyyaml==6.0.1 - requests==2.27.1 - requests-oauthlib==2.0.0 - six==1.17.0 - tabulate==0.8.10 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.26.20 - websocket-client==1.3.1 - zipp==3.6.0 prefix: /opt/conda/envs/iotedgedev
[ "tests/test_connectionstring.py::test_valid_connectionstring", "tests/test_connectionstring.py::test_valid_iothub_connectionstring", "tests/test_connectionstring.py::test_valid_devicehub_connectionstring", "tests/test_connectionstring.py::test_invalid_connectionstring", "tests/test_connectionstring.py::test_invalid_devicehub_connectionstring" ]
[ "tests/test_connectionstring.py::test_valid_env_iothub_connectionstring", "tests/test_connectionstring.py::test_valid_env_device_connectionstring" ]
[ "tests/test_connectionstring.py::test_empty_connectionstring", "tests/test_connectionstring.py::test_empty_iothub_connectionstring", "tests/test_connectionstring.py::test_empty_device_connectionstring", "tests/test_connectionstring.py::test_invalid_iothub_connectionstring" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_iotedgedev-173
Azure__iotedgedev-211
31d6219f41caf9401f5c49263a963e3a748e69bf
2018-07-27 12:11:04
a22c7b0c59505964c5aeab6f8ff859842783c236
diff --git a/iotedgedev/modules.py b/iotedgedev/modules.py index d36367e..8b058ba 100644 --- a/iotedgedev/modules.py +++ b/iotedgedev/modules.py @@ -84,31 +84,30 @@ class Modules: tags_to_build = set() for module in os.listdir(self.envvars.MODULES_PATH): - if module not in bypass_modules: - module_dir = os.path.join(self.envvars.MODULES_PATH, module) - module_json = Module(self.output, self.utility, os.path.join(module_dir, "module.json")) - for platform in module_json.platforms: - # get the Dockerfile from module.json - dockerfile = os.path.abspath(os.path.join(module_dir, module_json.get_dockerfile_by_platform(platform))) - container_tag = "" if self.envvars.CONTAINER_TAG == "" else "-" + self.envvars.CONTAINER_TAG - tag = "{0}:{1}{2}-{3}".format(module_json.repository, module_json.tag_version, container_tag, platform).lower() - image_tag_map[(module, platform)] = tag - tag_dockerfile_map[tag] = (module, dockerfile) - tag_build_options_map[tag] = module_json.build_options - if len(active_platform) > 0 and (active_platform[0] == "*" or platform in active_platform): - tags_to_build.add(tag) + module_dir = os.path.join(self.envvars.MODULES_PATH, module) + module_json = Module(self.output, self.utility, os.path.join(module_dir, "module.json")) + for platform in module_json.platforms: + # get the Dockerfile from module.json + dockerfile = os.path.abspath(os.path.join(module_dir, module_json.get_dockerfile_by_platform(platform))) + container_tag = "" if self.envvars.CONTAINER_TAG == "" else "-" + self.envvars.CONTAINER_TAG + tag = "{0}:{1}{2}-{3}".format(module_json.repository, module_json.tag_version, container_tag, platform).lower() + image_tag_map[(module, platform)] = tag + tag_dockerfile_map[tag] = (module, dockerfile) + tag_build_options_map[tag] = module_json.build_options + if not self.utility.in_asterisk_list(module, bypass_modules) and self.utility.in_asterisk_list(platform, active_platform): + tags_to_build.add(tag) deployment_manifest = DeploymentManifest(self.envvars, self.output, self.utility, self.envvars.DEPLOYMENT_CONFIG_TEMPLATE_FILE, True) modules_to_process = deployment_manifest.get_modules_to_process() replacements = {} for module, platform in modules_to_process: - if module not in bypass_modules: - key = (module, platform) - if key in image_tag_map: - tag = image_tag_map.get(key) + key = (module, platform) + if key in image_tag_map: + tag = image_tag_map.get(key) + replacements["${{MODULES.{0}.{1}}}".format(module, platform)] = tag + if not self.utility.in_asterisk_list(module, bypass_modules): tags_to_build.add(tag) - replacements["${{MODULES.{0}.{1}}}".format(module, platform)] = tag for tag in tags_to_build: if tag in tag_dockerfile_map: diff --git a/iotedgedev/utility.py b/iotedgedev/utility.py index 13fc09b..d55f55f 100644 --- a/iotedgedev/utility.py +++ b/iotedgedev/utility.py @@ -103,6 +103,9 @@ class Utility: def get_active_docker_platform(self): return [platform.strip() for platform in self.envvars.ACTIVE_DOCKER_PLATFORMS.split(",") if platform] + def in_asterisk_list(self, item, asterisk_list): + return len(asterisk_list) > 0 and (asterisk_list[0] == "*" or item in asterisk_list) + def get_modules_in_config(self, moduleType): modules_config = json.load(open(self.envvars.DEPLOYMENT_CONFIG_FILE_PATH))
Image placeholder is not expanded when the module is in BYPASS_MODULES
Azure/iotedgedev
diff --git a/tests/test_utility.py b/tests/test_utility.py index 6786256..8242b6d 100644 --- a/tests/test_utility.py +++ b/tests/test_utility.py @@ -42,3 +42,15 @@ def test_copy_template_expand_env(utility, tmpdir): dest = tmpdir.join("deployment_template_2.dest.json").strpath utility.copy_template(test_file_1, dest, replacements=replacements, expand_env=True) assert_json_file_equal(test_file_2, dest) + + +def test_in_asterisk_list(utility): + assert utility.in_asterisk_list("filtermodule", "pipemodule, filtermodule") + + +def test_in_asterisk_list_empty(utility): + assert not utility.in_asterisk_list("filtermodule", "") + + +def test_in_asterisk_list_asterisk(utility): + assert utility.in_asterisk_list("filtermodule", "*")
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 3, "issue_text_score": 2, "test_score": 3 }, "num_modified_files": 2 }
0.79
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": null, "python": "3.6", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 applicationinsights==0.11.10 argcomplete==1.12.3 attrs==22.2.0 azure-cli==2.40.0 azure-cli-cloud==2.1.1 azure-cli-command-modules-nspkg==2.0.3 azure-cli-configure==2.0.24 azure-cli-core==2.40.0 azure-cli-extension==0.2.5 azure-cli-iot==0.3.11 azure-cli-nspkg==3.0.4 azure-cli-profile==2.1.5 azure-cli-resource==2.1.16 azure-cli-telemetry==1.0.8 azure-common==1.1.28 azure-core==1.24.2 azure-mgmt-authorization==0.50.0 azure-mgmt-core==1.3.2 azure-mgmt-iothub==0.8.2 azure-mgmt-iothubprovisioningservices==0.2.0 azure-mgmt-managementgroups==0.1.0 azure-mgmt-nspkg==3.0.2 azure-nspkg==3.0.2 bcrypt==4.0.1 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 click==8.0.4 cryptography==39.0.2 docker==5.0.3 fstrings==0.1.0 humanfriendly==10.0 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 -e git+https://github.com/Azure/iotedgedev.git@31d6219f41caf9401f5c49263a963e3a748e69bf#egg=iotedgedev isodate==0.6.1 jmespath==0.10.0 knack==0.10.1 msal==1.18.0b1 msal-extensions==1.0.0 msrest==0.7.1 msrestazure==0.6.4.post1 oauthlib==3.2.2 packaging==21.3 paramiko==2.12.0 pkginfo==1.10.0 pluggy==1.0.0 portalocker==2.7.0 psutil==5.9.8 py==1.11.0 pycparser==2.21 Pygments==2.14.0 PyJWT==2.4.0 PyNaCl==1.5.0 pyOpenSSL==23.2.0 pyparsing==3.1.4 PySocks==1.7.1 pytest==7.0.1 python-dateutil==2.9.0.post0 python-dotenv==0.20.0 PyYAML==6.0.1 requests==2.27.1 requests-oauthlib==2.0.0 six==1.17.0 tabulate==0.8.10 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.26.20 websocket-client==1.3.1 zipp==3.6.0
name: iotedgedev channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - applicationinsights==0.11.10 - argcomplete==1.12.3 - attrs==22.2.0 - azure-cli==2.40.0 - azure-cli-cloud==2.1.1 - azure-cli-command-modules-nspkg==2.0.3 - azure-cli-configure==2.0.24 - azure-cli-core==2.40.0 - azure-cli-extension==0.2.5 - azure-cli-iot==0.3.11 - azure-cli-nspkg==3.0.4 - azure-cli-profile==2.1.5 - azure-cli-resource==2.1.16 - azure-cli-telemetry==1.0.8 - azure-common==1.1.28 - azure-core==1.24.2 - azure-mgmt-authorization==0.50.0 - azure-mgmt-core==1.3.2 - azure-mgmt-iothub==0.8.2 - azure-mgmt-iothubprovisioningservices==0.2.0 - azure-mgmt-managementgroups==0.1.0 - azure-mgmt-nspkg==3.0.2 - azure-nspkg==3.0.2 - bcrypt==4.0.1 - cffi==1.15.1 - charset-normalizer==2.0.12 - click==8.0.4 - cryptography==39.0.2 - docker==5.0.3 - fstrings==0.1.0 - humanfriendly==10.0 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.6.1 - jmespath==0.10.0 - knack==0.10.1 - msal==1.18.0b1 - msal-extensions==1.0.0 - msrest==0.7.1 - msrestazure==0.6.4.post1 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.12.0 - pkginfo==1.10.0 - pluggy==1.0.0 - portalocker==2.7.0 - psutil==5.9.8 - py==1.11.0 - pycparser==2.21 - pygments==2.14.0 - pyjwt==2.4.0 - pynacl==1.5.0 - pyopenssl==23.2.0 - pyparsing==3.1.4 - pysocks==1.7.1 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - python-dotenv==0.20.0 - pyyaml==6.0.1 - requests==2.27.1 - requests-oauthlib==2.0.0 - six==1.17.0 - tabulate==0.8.10 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.26.20 - websocket-client==1.3.1 - zipp==3.6.0 prefix: /opt/conda/envs/iotedgedev
[ "tests/test_utility.py::test_in_asterisk_list", "tests/test_utility.py::test_in_asterisk_list_empty", "tests/test_utility.py::test_in_asterisk_list_asterisk" ]
[]
[ "tests/test_utility.py::test_copy_template", "tests/test_utility.py::test_copy_template_expand_env" ]
[]
MIT License
null
Azure__iotedgedev-232
79bcd51b6ac99381fa0ab624f88ef173d4bccff9
2018-08-06 07:53:08
a22c7b0c59505964c5aeab6f8ff859842783c236
diff --git a/iotedgedev/args.py b/iotedgedev/args.py index a24e2cc..80ce565 100644 --- a/iotedgedev/args.py +++ b/iotedgedev/args.py @@ -1,12 +1,13 @@ import sys -# We had to implement this custom arg parsing class because Click doesn't have a handler to detect command before any arguments are parsed, which we need for the dotenv load command. We don't want to load dotenv for some commands and we terse output for other commands. +# We had to implement this custom arg parsing class because Click doesn't have a handler to detect command before any arguments are parsed, +# which we need for the dotenv load command. We don't want to load dotenv for some commands and we terse output for other commands. class Args(): def get_current_command(self): if sys.argv and len(sys.argv) > 1 and not self.is_info_command(): - return sys.argv[1] + return ' '.join(sys.argv[1:]).strip() else: return '' diff --git a/iotedgedev/envvars.py b/iotedgedev/envvars.py index def4ca2..861acb5 100644 --- a/iotedgedev/envvars.py +++ b/iotedgedev/envvars.py @@ -15,13 +15,15 @@ class EnvVars: def __init__(self, output): self.output = output self.loaded = False - self.args = Args() - self.current_command = self.args.get_current_command() - self.terse_commands = ['', 'azure'] - self.bypass_dotenv_load_commands = ['init', 'e2e'] + current_command = Args().get_current_command() + # for some commands we don't want to load dotenv + # TODO: temporary hack. A more grace solution would be a decorator on the command to indicate whether to bypass env + self.bypass_dotenv_load_commands = ['solution init', 'solution e2e', 'solution create', 'create', 'simulator stop', 'simulator modulecred'] + self.bypass = self.is_bypass_command(current_command) # for some commands we don't want verbose dotenv load output - self.verbose = self.current_command not in self.terse_commands + self.terse_commands = ['', 'iothub setup'] + self.verbose = not self.is_terse_command(current_command) def clean(self): """docker-py had py2 issues with shelling out to docker api if unicode characters are in any environment variable. This will convert to utf-8 if py2.""" @@ -40,7 +42,7 @@ class EnvVars: environment[k] = environment[k].encode('utf-8') clean_enviro[key] = environment[k] - + os.environ = clean_enviro def backup_dotenv(self): @@ -86,7 +88,7 @@ class EnvVars: def load(self, force=False): # for some commands we don't want to load dotenv - if self.current_command in self.bypass_dotenv_load_commands and not force: + if self.bypass and not force: return if not self.loaded or force: @@ -174,7 +176,6 @@ class EnvVars: self.loaded = True - def __getattribute__(self, name): try: return object.__getattribute__(self, name) @@ -248,3 +249,24 @@ class EnvVars: def is_posix(self): plat = platform.system().lower() return plat == "linux" or plat == "darwin" + + def is_bypass_command(self, command): + return self.in_command_list(command, self.bypass_dotenv_load_commands) + + def is_terse_command(self, command): + return self.in_command_list(command, self.terse_commands) + + def in_command_list(self, command, command_list): + for cmd in command_list: + if cmd == '': + if command == '': + return True + else: + continue + + if command.startswith(cmd): + if len(command) == len(cmd) or command[len(cmd)] == ' ': + return True + else: + continue + return False
Add solution create to env check exclude list (venv) C:\temp>iotedgedev solution create monitortest ======================================= ======== ENVIRONMENT VARIABLES ======== ======================================= .env file not found on disk. Without a file on disk, you must specify all Environment Variables at the system level. (C:\temp\.env)
Azure/iotedgedev
diff --git a/tests/test_envvars.py b/tests/test_envvars.py index 12bbfc0..a2a336a 100644 --- a/tests/test_envvars.py +++ b/tests/test_envvars.py @@ -1,6 +1,8 @@ import os import sys + import pytest + from iotedgedev.envvars import EnvVars from iotedgedev.output import Output @@ -61,10 +63,88 @@ def test_set_envvar(): def test_envvar_clean(): output = Output() envvars = EnvVars(output) - envvar_clean_name = u'IOTEDGEDEV_ENVVAR_CLEAN_TEST' - os.environ[envvar_clean_name] = u'test unicode string' + envvar_clean_name = u"IOTEDGEDEV_ENVVAR_CLEAN_TEST" + os.environ[envvar_clean_name] = u"test unicode string" envvars.clean() if not (sys.version_info > (3, 0)): assert isinstance(os.environ[envvar_clean_name], str) + + +def test_in_command_list_true_1(): + output = Output() + envvars = EnvVars(output) + assert envvars.in_command_list("solution create test_solution", ["init", "e2e", "solution create", "create", "simulator stop"]) + + +def test_in_command_list_true_2(): + output = Output() + envvars = EnvVars(output) + assert envvars.in_command_list("solution create", ["init", "e2e", "solution create", "create", "simulator stop"]) + + +def test_in_command_list_false_1(): + output = Output() + envvars = EnvVars(output) + assert not envvars.in_command_list("solution add filtermodule", ["init", "e2e", "solution create", "create", "simulator stop"]) + + +def test_in_command_list_false_2(): + output = Output() + envvars = EnvVars(output) + assert not envvars.in_command_list("solution addotherstuff filtermodule", ["init", "e2e", "solution add", "create", "simulator stop"]) + + +def test_in_command_list_empty_1(): + output = Output() + envvars = EnvVars(output) + assert not envvars.in_command_list("", ["init", "e2e", "solution create", "create", "simulator stop"]) + + +def test_in_command_list_empty_2(): + output = Output() + envvars = EnvVars(output) + assert not envvars.in_command_list("solution create test_solution", ["init", "e2e", "", "create", "simulator stop"]) + + +def test_in_command_list_empty_3(): + output = Output() + envvars = EnvVars(output) + assert envvars.in_command_list("", ["init", "e2e", "", "create", "simulator stop"]) + + +def test_is_bypass_command_true(): + output = Output() + envvars = EnvVars(output) + assert envvars.is_bypass_command("solution create EdgeSolution") + + +def test_is_bypass_command_false(): + output = Output() + envvars = EnvVars(output) + assert not envvars.is_bypass_command("solution add") + + +def test_is_bypass_command_empty(): + output = Output() + envvars = EnvVars(output) + assert not envvars.is_bypass_command("") + + +def test_is_terse_command_true(): + output = Output() + envvars = EnvVars(output) + assert envvars.is_terse_command("iothub setup --update-dotenv") + + +def test_is_terse_command_false(): + output = Output() + envvars = EnvVars(output) + assert not envvars.is_terse_command("solution create") + + +def test_is_terse_command_empty(): + output = Output() + envvars = EnvVars(output) + assert envvars.is_terse_command("")
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 1, "test_score": 3 }, "num_modified_files": 2 }
0.79
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest", "pytest-cov", "pytest-xdist", "pytest-mock", "pytest-asyncio" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.6", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 applicationinsights==0.11.10 argcomplete==1.12.3 attrs==22.2.0 azure-cli==2.40.0 azure-cli-cloud==2.1.1 azure-cli-command-modules-nspkg==2.0.3 azure-cli-configure==2.0.24 azure-cli-core==2.40.0 azure-cli-extension==0.2.5 azure-cli-iot==0.3.11 azure-cli-nspkg==3.0.4 azure-cli-profile==2.1.5 azure-cli-resource==2.1.16 azure-cli-telemetry==1.0.8 azure-common==1.1.28 azure-core==1.24.2 azure-mgmt-authorization==0.50.0 azure-mgmt-core==1.3.2 azure-mgmt-iothub==0.8.2 azure-mgmt-iothubprovisioningservices==0.2.0 azure-mgmt-managementgroups==0.1.0 azure-mgmt-nspkg==3.0.2 azure-nspkg==3.0.2 bcrypt==4.0.1 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 click==8.0.4 coverage==6.2 cryptography==39.0.2 docker==5.0.3 execnet==1.9.0 fstrings==0.1.0 humanfriendly==10.0 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 -e git+https://github.com/Azure/iotedgedev.git@79bcd51b6ac99381fa0ab624f88ef173d4bccff9#egg=iotedgedev isodate==0.6.1 jmespath==0.10.0 knack==0.10.1 msal==1.18.0b1 msal-extensions==1.0.0 msrest==0.7.1 msrestazure==0.6.4.post1 oauthlib==3.2.2 packaging==21.3 paramiko==2.12.0 pkginfo==1.10.0 pluggy==1.0.0 portalocker==2.7.0 psutil==5.9.8 py==1.11.0 pycparser==2.21 Pygments==2.14.0 PyJWT==2.4.0 PyNaCl==1.5.0 pyOpenSSL==23.2.0 pyparsing==3.1.4 PySocks==1.7.1 pytest==7.0.1 pytest-asyncio==0.16.0 pytest-cov==4.0.0 pytest-mock==3.6.1 pytest-xdist==3.0.2 python-dateutil==2.9.0.post0 python-dotenv==0.20.0 PyYAML==6.0.1 requests==2.27.1 requests-oauthlib==2.0.0 six==1.17.0 tabulate==0.8.10 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.26.20 websocket-client==1.3.1 zipp==3.6.0
name: iotedgedev channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - applicationinsights==0.11.10 - argcomplete==1.12.3 - attrs==22.2.0 - azure-cli==2.40.0 - azure-cli-cloud==2.1.1 - azure-cli-command-modules-nspkg==2.0.3 - azure-cli-configure==2.0.24 - azure-cli-core==2.40.0 - azure-cli-extension==0.2.5 - azure-cli-iot==0.3.11 - azure-cli-nspkg==3.0.4 - azure-cli-profile==2.1.5 - azure-cli-resource==2.1.16 - azure-cli-telemetry==1.0.8 - azure-common==1.1.28 - azure-core==1.24.2 - azure-mgmt-authorization==0.50.0 - azure-mgmt-core==1.3.2 - azure-mgmt-iothub==0.8.2 - azure-mgmt-iothubprovisioningservices==0.2.0 - azure-mgmt-managementgroups==0.1.0 - azure-mgmt-nspkg==3.0.2 - azure-nspkg==3.0.2 - bcrypt==4.0.1 - cffi==1.15.1 - charset-normalizer==2.0.12 - click==8.0.4 - coverage==6.2 - cryptography==39.0.2 - docker==5.0.3 - execnet==1.9.0 - fstrings==0.1.0 - humanfriendly==10.0 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.6.1 - jmespath==0.10.0 - knack==0.10.1 - msal==1.18.0b1 - msal-extensions==1.0.0 - msrest==0.7.1 - msrestazure==0.6.4.post1 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.12.0 - pkginfo==1.10.0 - pluggy==1.0.0 - portalocker==2.7.0 - psutil==5.9.8 - py==1.11.0 - pycparser==2.21 - pygments==2.14.0 - pyjwt==2.4.0 - pynacl==1.5.0 - pyopenssl==23.2.0 - pyparsing==3.1.4 - pysocks==1.7.1 - pytest==7.0.1 - pytest-asyncio==0.16.0 - pytest-cov==4.0.0 - pytest-mock==3.6.1 - pytest-xdist==3.0.2 - python-dateutil==2.9.0.post0 - python-dotenv==0.20.0 - pyyaml==6.0.1 - requests==2.27.1 - requests-oauthlib==2.0.0 - six==1.17.0 - tabulate==0.8.10 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.26.20 - websocket-client==1.3.1 - zipp==3.6.0 prefix: /opt/conda/envs/iotedgedev
[ "tests/test_envvars.py::test_in_command_list_true_1", "tests/test_envvars.py::test_in_command_list_true_2", "tests/test_envvars.py::test_in_command_list_false_1", "tests/test_envvars.py::test_in_command_list_false_2", "tests/test_envvars.py::test_in_command_list_empty_1", "tests/test_envvars.py::test_in_command_list_empty_2", "tests/test_envvars.py::test_in_command_list_empty_3", "tests/test_envvars.py::test_is_bypass_command_true", "tests/test_envvars.py::test_is_bypass_command_false", "tests/test_envvars.py::test_is_bypass_command_empty", "tests/test_envvars.py::test_is_terse_command_true", "tests/test_envvars.py::test_is_terse_command_false", "tests/test_envvars.py::test_is_terse_command_empty" ]
[]
[ "tests/test_envvars.py::test_valid_get_envvar", "tests/test_envvars.py::test_invalid_get_envvar", "tests/test_envvars.py::test_valid_load", "tests/test_envvars.py::test_valid_verify_envvar_has_val", "tests/test_envvars.py::test_valid_get_envvar_key_if_val", "tests/test_envvars.py::test_invalid_get_envvar_key_if_val", "tests/test_envvars.py::test_set_envvar", "tests/test_envvars.py::test_envvar_clean" ]
[]
MIT License
null
Azure__iotedgedev-267
3b26b6495293607b3752f83fe412c84d7da4fc23
2018-08-20 06:58:26
a22c7b0c59505964c5aeab6f8ff859842783c236
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..76cd57b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,16 @@ +--- +name: Bug report +about: Create a issue to help us improve +--- + +<!-- Fill in the information needed --> +- iotedgedev Version: +- Python Version: +- Pip Version: +- Development machine OS Version: +- IoT Edge device OS Version: + +Steps to Reproduce: + +1. +2. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..de27153 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,7 @@ +--- +name: Feature request +about: Suggest an idea for IoT Edge and IoT Edge development tools + +--- + +<!-- Describe the feature you'd like. --> \ No newline at end of file diff --git a/iotedgedev/cli.py b/iotedgedev/cli.py index 2fe5b45..c85aa25 100644 --- a/iotedgedev/cli.py +++ b/iotedgedev/cli.py @@ -85,13 +85,13 @@ def docker(): type=click.Choice(["csharp", "nodejs", "python", "csharpfunction"]), help="Specify the template used to create the default module") @with_telemetry -def create(name, module, template): +def new(name, module, template): utility = Utility(envvars, output) sol = Solution(output, utility) sol.create(name, module, template) -main.add_command(create) +main.add_command(new) @solution.command(context_settings=CONTEXT_SETTINGS, @@ -103,7 +103,7 @@ def init(): utility = Utility(envvars, output) if len(os.listdir(os.getcwd())) == 0: - solcmd = "iotedgedev solution create ." + solcmd = "iotedgedev new ." output.header(solcmd) utility.call_proc(solcmd.split()) diff --git a/iotedgedev/envvars.py b/iotedgedev/envvars.py index f180959..5c44f7c 100644 --- a/iotedgedev/envvars.py +++ b/iotedgedev/envvars.py @@ -20,7 +20,7 @@ class EnvVars: current_command = Args().get_current_command() # for some commands we don't want to load dotenv # TODO: temporary hack. A more grace solution would be a decorator on the command to indicate whether to bypass env - self.bypass_dotenv_load_commands = ['solution init', 'solution e2e', 'solution create', 'create', 'simulator stop', 'simulator modulecred'] + self.bypass_dotenv_load_commands = ['solution init', 'solution e2e', 'solution new', 'new', 'simulator stop', 'simulator modulecred'] self.bypass = self.is_bypass_command(current_command) # for some commands we don't want verbose dotenv load output self.terse_commands = ['', 'iothub setup'] @@ -151,7 +151,7 @@ class EnvVars: else: self.DOCKER_HOST = None except Exception as ex: - msg = "Environment variables not configured correctly. Run `iotedgedev solution create` to create a new solution with sample .env file. " + msg = "Environment variables not configured correctly. Run `iotedgedev new` to create a new solution with sample .env file. " "Please see README for variable configuration options. Tip: You might just need to restart your command prompt to refresh your Environment Variables. " "Variable that caused exception: {0}".format(str(ex)) raise ValueError(msg)
Renaming `iotedgedev create` to `iotedgedev new` I am thinking about renaming the command `iotedgedev create` to `iotedgedev new` for the sake of simplicity and aligning with common practices (as how the command to create new projects is called in VS and VS Code). @jongio, do you think this is a good idea?
Azure/iotedgedev
diff --git a/tests/test_envvars.py b/tests/test_envvars.py index 038da27..49be0f3 100644 --- a/tests/test_envvars.py +++ b/tests/test_envvars.py @@ -75,49 +75,49 @@ def test_envvar_clean(): def test_in_command_list_true_1(): output = Output() envvars = EnvVars(output) - assert envvars.in_command_list("solution create test_solution", ["init", "e2e", "solution create", "create", "simulator stop"]) + assert envvars.in_command_list("solution new test_solution", ["init", "e2e", "solution new", "new", "simulator stop"]) def test_in_command_list_true_2(): output = Output() envvars = EnvVars(output) - assert envvars.in_command_list("solution create", ["init", "e2e", "solution create", "create", "simulator stop"]) + assert envvars.in_command_list("solution new", ["init", "e2e", "solution new", "new", "simulator stop"]) def test_in_command_list_false_1(): output = Output() envvars = EnvVars(output) - assert not envvars.in_command_list("solution add filtermodule", ["init", "e2e", "solution create", "create", "simulator stop"]) + assert not envvars.in_command_list("solution add filtermodule", ["init", "e2e", "solution new", "new", "simulator stop"]) def test_in_command_list_false_2(): output = Output() envvars = EnvVars(output) - assert not envvars.in_command_list("solution addotherstuff filtermodule", ["init", "e2e", "solution add", "create", "simulator stop"]) + assert not envvars.in_command_list("solution addotherstuff filtermodule", ["init", "e2e", "solution add", "new", "simulator stop"]) def test_in_command_list_empty_1(): output = Output() envvars = EnvVars(output) - assert not envvars.in_command_list("", ["init", "e2e", "solution create", "create", "simulator stop"]) + assert not envvars.in_command_list("", ["init", "e2e", "solution new", "new", "simulator stop"]) def test_in_command_list_empty_2(): output = Output() envvars = EnvVars(output) - assert not envvars.in_command_list("solution create test_solution", ["init", "e2e", "", "create", "simulator stop"]) + assert not envvars.in_command_list("solution new test_solution", ["init", "e2e", "", "new", "simulator stop"]) def test_in_command_list_empty_3(): output = Output() envvars = EnvVars(output) - assert envvars.in_command_list("", ["init", "e2e", "", "create", "simulator stop"]) + assert envvars.in_command_list("", ["init", "e2e", "", "new", "simulator stop"]) def test_is_bypass_command_true(): output = Output() envvars = EnvVars(output) - assert envvars.is_bypass_command("solution create EdgeSolution") + assert envvars.is_bypass_command("solution new EdgeSolution") def test_is_bypass_command_false(): @@ -141,7 +141,7 @@ def test_is_terse_command_true(): def test_is_terse_command_false(): output = Output() envvars = EnvVars(output) - assert not envvars.is_terse_command("solution create") + assert not envvars.is_terse_command("solution new") def test_is_terse_command_empty(): diff --git a/tests/test_iotedgedev.py b/tests/test_iotedgedev.py index c436ca8..60d7f06 100644 --- a/tests/test_iotedgedev.py +++ b/tests/test_iotedgedev.py @@ -36,7 +36,7 @@ def create_solution(request): runner = CliRunner() os.chdir(tests_dir) - result = runner.invoke(cli.main, ['solution', 'create', test_solution]) + result = runner.invoke(cli.main, ['solution', 'new', test_solution]) print(result.output) assert 'AZURE IOT EDGE SOLUTION CREATED' in result.output @@ -58,7 +58,7 @@ def test_solution_create_in_non_empty_current_path(request): cli = __import__("iotedgedev.cli", fromlist=['main']) runner = CliRunner() - result = runner.invoke(cli.main, ['solution', 'create', '.']) + result = runner.invoke(cli.main, ['solution', 'new', '.']) print(result.output) assert "Directory is not empty" in result.output @@ -75,7 +75,7 @@ def test_solution_create_in_empty_current_path(request): cli = __import__("iotedgedev.cli", fromlist=['main']) runner = CliRunner() - result = runner.invoke(cli.main, ['solution', 'create', '.']) + result = runner.invoke(cli.main, ['solution', 'new', '.']) print(result.output) assert 'AZURE IOT EDGE SOLUTION CREATED' in result.output @@ -88,7 +88,7 @@ def test_solution_create_in_non_empty_dir(request): cli = __import__("iotedgedev.cli", fromlist=['main']) runner = CliRunner() - result = runner.invoke(cli.main, ['solution', 'create', test_solution]) + result = runner.invoke(cli.main, ['solution', 'new', test_solution]) print(result.output) assert "Directory is not empty" in result.output @@ -104,7 +104,7 @@ def test_solution_create_in_empty_child_dir(request): cli = __import__("iotedgedev.cli", fromlist=['main']) runner = CliRunner() - result = runner.invoke(cli.main, ['solution', 'create', dirname]) + result = runner.invoke(cli.main, ['solution', 'new', dirname]) print(result.output) assert 'AZURE IOT EDGE SOLUTION CREATED' in result.output diff --git a/tests/test_simulator.py b/tests/test_simulator.py index 5ba1e56..38849d6 100644 --- a/tests/test_simulator.py +++ b/tests/test_simulator.py @@ -26,7 +26,7 @@ def create_solution(request): runner = CliRunner() os.chdir(tests_dir) - result = runner.invoke(cli.main, ['solution', 'create', test_solution]) + result = runner.invoke(cli.main, ['solution', 'new', test_solution]) print(result.output) assert 'AZURE IOT EDGE SOLUTION CREATED' in result.output
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_added_files", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 1, "test_score": 2 }, "num_modified_files": 2 }
0.79
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": null, "python": "3.6", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 applicationinsights==0.11.9 argcomplete==1.12.3 attrs==22.2.0 azure-cli==2.40.0 azure-cli-cloud==2.1.1 azure-cli-command-modules-nspkg==2.0.3 azure-cli-configure==2.0.24 azure-cli-core==2.31.0 azure-cli-extension==0.2.5 azure-cli-iot==0.3.11 azure-cli-nspkg==3.0.4 azure-cli-profile==2.1.5 azure-cli-resource==2.1.16 azure-cli-telemetry==1.0.6 azure-common==1.1.28 azure-core==1.24.2 azure-mgmt-authorization==0.50.0 azure-mgmt-core==1.3.2 azure-mgmt-iothub==0.8.2 azure-mgmt-iothubprovisioningservices==0.2.0 azure-mgmt-managementgroups==0.1.0 azure-mgmt-nspkg==3.0.2 azure-nspkg==3.0.2 bcrypt==4.0.1 cached-property==1.5.2 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 click==8.0.4 commentjson==0.9.0 cryptography==40.0.2 decorator==5.1.1 distro==1.9.0 docker==5.0.3 docker-compose==1.29.1 dockerpty==0.4.1 docopt==0.6.2 fstrings==0.1.0 humanfriendly==10.0 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 -e git+https://github.com/Azure/iotedgedev.git@3b26b6495293607b3752f83fe412c84d7da4fc23#egg=iotedgedev iotedgehubdev==0.14.18 isodate==0.6.1 jeepney==0.7.1 jmespath==0.10.0 jsonpath-rw==1.4.0 jsonschema==3.2.0 keyring==23.4.1 knack==0.9.0 lark-parser==0.7.8 msal==1.27.0 msal-extensions==0.3.1 msrest==0.7.1 msrestazure==0.4.34 oauthlib==3.2.2 packaging==21.3 paramiko==2.12.0 pkginfo==1.10.0 pluggy==1.0.0 ply==3.11 portalocker==1.7.1 psutil==5.9.8 py==1.11.0 pycparser==2.21 Pygments==2.14.0 PyJWT==2.4.0 PyNaCl==1.5.0 pyOpenSSL==22.0.0 pyparsing==3.1.4 pyrsistent==0.18.0 PySocks==1.7.1 pytest==7.0.1 python-dateutil==2.9.0.post0 python-dotenv==0.20.0 PyYAML==5.4.1 regex==2023.8.8 requests==2.27.1 requests-oauthlib==2.0.0 SecretStorage==3.3.3 six==1.17.0 tabulate==0.8.10 texttable==1.7.0 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.26.20 websocket-client==0.59.0 zipp==3.6.0
name: iotedgedev channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - applicationinsights==0.11.9 - argcomplete==1.12.3 - attrs==22.2.0 - azure-cli==2.40.0 - azure-cli-cloud==2.1.1 - azure-cli-command-modules-nspkg==2.0.3 - azure-cli-configure==2.0.24 - azure-cli-core==2.31.0 - azure-cli-extension==0.2.5 - azure-cli-iot==0.3.11 - azure-cli-nspkg==3.0.4 - azure-cli-profile==2.1.5 - azure-cli-resource==2.1.16 - azure-cli-telemetry==1.0.6 - azure-common==1.1.28 - azure-core==1.24.2 - azure-mgmt-authorization==0.50.0 - azure-mgmt-core==1.3.2 - azure-mgmt-iothub==0.8.2 - azure-mgmt-iothubprovisioningservices==0.2.0 - azure-mgmt-managementgroups==0.1.0 - azure-mgmt-nspkg==3.0.2 - azure-nspkg==3.0.2 - bcrypt==4.0.1 - cached-property==1.5.2 - cffi==1.15.1 - charset-normalizer==2.0.12 - click==8.0.4 - commentjson==0.9.0 - cryptography==40.0.2 - decorator==5.1.1 - distro==1.9.0 - docker==5.0.3 - docker-compose==1.29.1 - dockerpty==0.4.1 - docopt==0.6.2 - fstrings==0.1.0 - humanfriendly==10.0 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - iotedgehubdev==0.14.18 - isodate==0.6.1 - jeepney==0.7.1 - jmespath==0.10.0 - jsonpath-rw==1.4.0 - jsonschema==3.2.0 - keyring==23.4.1 - knack==0.9.0 - lark-parser==0.7.8 - msal==1.27.0 - msal-extensions==0.3.1 - msrest==0.7.1 - msrestazure==0.4.34 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.12.0 - pkginfo==1.10.0 - pluggy==1.0.0 - ply==3.11 - portalocker==1.7.1 - psutil==5.9.8 - py==1.11.0 - pycparser==2.21 - pygments==2.14.0 - pyjwt==2.4.0 - pynacl==1.5.0 - pyopenssl==22.0.0 - pyparsing==3.1.4 - pyrsistent==0.18.0 - pysocks==1.7.1 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - python-dotenv==0.20.0 - pyyaml==5.4.1 - regex==2023.8.8 - requests==2.27.1 - requests-oauthlib==2.0.0 - secretstorage==3.3.3 - six==1.17.0 - tabulate==0.8.10 - texttable==1.7.0 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.26.20 - websocket-client==0.59.0 - zipp==3.6.0 prefix: /opt/conda/envs/iotedgedev
[ "tests/test_envvars.py::test_is_bypass_command_true" ]
[ "tests/test_envvars.py::test_default_container_registry_server_key_exists", "tests/test_envvars.py::test_container_registry_map_has_val" ]
[ "tests/test_envvars.py::test_valid_get_envvar", "tests/test_envvars.py::test_invalid_get_envvar", "tests/test_envvars.py::test_valid_load", "tests/test_envvars.py::test_valid_verify_envvar_has_val", "tests/test_envvars.py::test_valid_get_envvar_key_if_val", "tests/test_envvars.py::test_invalid_get_envvar_key_if_val", "tests/test_envvars.py::test_set_envvar", "tests/test_envvars.py::test_envvar_clean", "tests/test_envvars.py::test_in_command_list_true_1", "tests/test_envvars.py::test_in_command_list_true_2", "tests/test_envvars.py::test_in_command_list_false_1", "tests/test_envvars.py::test_in_command_list_false_2", "tests/test_envvars.py::test_in_command_list_empty_1", "tests/test_envvars.py::test_in_command_list_empty_2", "tests/test_envvars.py::test_in_command_list_empty_3", "tests/test_envvars.py::test_is_bypass_command_false", "tests/test_envvars.py::test_is_bypass_command_empty", "tests/test_envvars.py::test_is_terse_command_true", "tests/test_envvars.py::test_is_terse_command_false", "tests/test_envvars.py::test_is_terse_command_empty", "tests/test_envvars.py::test_default_container_registry_server_value_exists", "tests/test_envvars.py::test_default_container_registry_username_value_exists_or_returns_empty_string", "tests/test_envvars.py::test_default_container_registry_password_value_exists_or_returns_empty_string", "tests/test_envvars.py::test_container_registry_server_key_missing_sys_exit", "tests/test_envvars.py::test_container_registry_server_value_missing_sys_exit", "tests/test_envvars.py::test_unique_container_registry_server_tokens", "tests/test_envvars.py::test_unique_container_registry_username_tokens", "tests/test_envvars.py::test_unique_container_registry_password_tokens", "tests/test_envvars.py::test_additional_container_registry_server_has_val", "tests/test_envvars.py::test_additional_container_registry_username_has_val", "tests/test_envvars.py::test_additional_container_registry_password_has_val" ]
[]
MIT License
null
Azure__iotedgedev-270
3b26b6495293607b3752f83fe412c84d7da4fc23
2018-08-20 12:19:29
a22c7b0c59505964c5aeab6f8ff859842783c236
diff --git a/.env.tmp b/.env.tmp index b3e3f5c..76b8120 100644 --- a/.env.tmp +++ b/.env.tmp @@ -9,22 +9,23 @@ DEVICE_CONNECTION_STRING="" # # CONTAINER REGISTRY # - # Settings for your container registry, set CONTAINER_REGISTRY_SERVER to the following as the default registry: - # Local Registry: "localhost:5000" - USERNAME/PASSWORD not required. - # Azure Container Registry: "jong.azurecr.io", Also set USERNAME/PASSWORD - # Docker Hub: "jongallant" - Your Docker hub username. Enter your Docker hub username into the CONTAINER_REGISTRY_USERNAME setting. Also set the PASSWORD. + # Settings for your default container registry. + # Set CONTAINER_REGISTRY_SERVER to the following: + # - Local Registry: "localhost:5000" - USERNAME/PASSWORD not required (Windows container not supported) + # - Azure Container Registry: "jong.azurecr.io", Also set USERNAME/PASSWORD + # - Docker Hub: "jongallant" - Your Docker hub username. Enter your Docker hub username into the CONTAINER_REGISTRY_USERNAME setting. Also set the PASSWORD. CONTAINER_REGISTRY_SERVER="localhost:5000" CONTAINER_REGISTRY_USERNAME="" CONTAINER_REGISTRY_PASSWORD="" - # To specify additional container registries ensure the prefix is CONTAINER_REGISTRY_SERVER, CONTAINER_REGISTRY_USERNAME, CONTAINER_REGISTRY_PASSWORD + # To specify additional container registries ensure the prefix is CONTAINER_REGISTRY_SERVER_, CONTAINER_REGISTRY_USERNAME_, CONTAINER_REGISTRY_PASSWORD_ # And the token following the prefix uniquely associates the SERVER/USERNAME/PASSWORD # Token can be any string of alphanumeric characters -# CONTAINER_REGISTRY_SERVER2="" -# CONTAINER_REGISTRY_USERNAME2="" -# CONTAINER_REGISTRY_PASSWORD2="" +# CONTAINER_REGISTRY_SERVER_2="" +# CONTAINER_REGISTRY_USERNAME_2="" +# CONTAINER_REGISTRY_PASSWORD_2="" # # HOST diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..76cd57b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,16 @@ +--- +name: Bug report +about: Create a issue to help us improve +--- + +<!-- Fill in the information needed --> +- iotedgedev Version: +- Python Version: +- Pip Version: +- Development machine OS Version: +- IoT Edge device OS Version: + +Steps to Reproduce: + +1. +2. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..de27153 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,7 @@ +--- +name: Feature request +about: Suggest an idea for IoT Edge and IoT Edge development tools + +--- + +<!-- Describe the feature you'd like. --> \ No newline at end of file diff --git a/iotedgedev/azurecli.py b/iotedgedev/azurecli.py index ca3c104..f2501df 100644 --- a/iotedgedev/azurecli.py +++ b/iotedgedev/azurecli.py @@ -278,10 +278,12 @@ class AzureCli: self.output.status(f("Deploying '{config}' to '{device_id}'...")) config = os.path.join(os.getcwd(), config) - return self.invoke_az_cli_outproc(["iot", "edge", "set-modules", "-d", device_id, "-n", hub_name, "-k", config, "-l", connection_string], error_message=f("Failed to deploy '{config}' to '{device_id}'..."), suppress_output=True) + return self.invoke_az_cli_outproc(["iot", "edge", "set-modules", "-d", device_id, "-n", hub_name, "-k", config, "-l", connection_string], + error_message=f("Failed to deploy '{config}' to '{device_id}'..."), suppress_output=True) def monitor_events(self, device_id, connection_string, hub_name, timeout=300): - return self.invoke_az_cli_outproc(["iot", "hub", "monitor-events", "-d", device_id, "-n", hub_name, "-l", connection_string, '-t', str(timeout), '-y'], error_message=f("Failed to start monitoring events."), suppress_output=False, timeout=timeout) + return self.invoke_az_cli_outproc(["iot", "hub", "monitor-events", "-d", device_id, "-n", hub_name, "-l", connection_string, '-t', str(timeout), '-y'], + error_message=f("Failed to start monitoring events."), suppress_output=False, timeout=timeout) def get_free_iothub(self): with output_io_cls() as io: @@ -312,7 +314,8 @@ class AzureCli: self.output.header("IOT HUB") self.output.status(f("Retrieving IoT Hubs in '{resource_group}'...")) - return self.invoke_az_cli_outproc(["iot", "hub", "list", "--resource-group", resource_group, "--query", "[].{\"IoT Hub\":name}", "--out", "table"], f("Could not list the IoT Hubs in {resource_group}.")) + return self.invoke_az_cli_outproc(["iot", "hub", "list", "--resource-group", resource_group, "--query", "[].{\"IoT Hub\":name}", "--out", "table"], + f("Could not list the IoT Hubs in {resource_group}.")) def iothub_exists(self, value, resource_group): self.output.status( diff --git a/iotedgedev/cli.py b/iotedgedev/cli.py index 2fe5b45..c85aa25 100644 --- a/iotedgedev/cli.py +++ b/iotedgedev/cli.py @@ -85,13 +85,13 @@ def docker(): type=click.Choice(["csharp", "nodejs", "python", "csharpfunction"]), help="Specify the template used to create the default module") @with_telemetry -def create(name, module, template): +def new(name, module, template): utility = Utility(envvars, output) sol = Solution(output, utility) sol.create(name, module, template) -main.add_command(create) +main.add_command(new) @solution.command(context_settings=CONTEXT_SETTINGS, @@ -103,7 +103,7 @@ def init(): utility = Utility(envvars, output) if len(os.listdir(os.getcwd())) == 0: - solcmd = "iotedgedev solution create ." + solcmd = "iotedgedev new ." output.header(solcmd) utility.call_proc(solcmd.split()) diff --git a/iotedgedev/dockercls.py b/iotedgedev/dockercls.py index c55f4d4..8c308a7 100644 --- a/iotedgedev/dockercls.py +++ b/iotedgedev/dockercls.py @@ -1,6 +1,5 @@ import json import os -import sys import zipfile import docker diff --git a/iotedgedev/envvars.py b/iotedgedev/envvars.py index f180959..9662159 100644 --- a/iotedgedev/envvars.py +++ b/iotedgedev/envvars.py @@ -1,6 +1,5 @@ import os import platform -import sys from shutil import copyfile from dotenv import load_dotenv, set_key @@ -20,7 +19,7 @@ class EnvVars: current_command = Args().get_current_command() # for some commands we don't want to load dotenv # TODO: temporary hack. A more grace solution would be a decorator on the command to indicate whether to bypass env - self.bypass_dotenv_load_commands = ['solution init', 'solution e2e', 'solution create', 'create', 'simulator stop', 'simulator modulecred'] + self.bypass_dotenv_load_commands = ['solution init', 'solution e2e', 'solution new', 'new', 'simulator stop', 'simulator modulecred'] self.bypass = self.is_bypass_command(current_command) # for some commands we don't want verbose dotenv load output self.terse_commands = ['', 'iothub setup'] @@ -151,7 +150,7 @@ class EnvVars: else: self.DOCKER_HOST = None except Exception as ex: - msg = "Environment variables not configured correctly. Run `iotedgedev solution create` to create a new solution with sample .env file. " + msg = "Environment variables not configured correctly. Run `iotedgedev new` to create a new solution with sample .env file. " "Please see README for variable configuration options. Tip: You might just need to restart your command prompt to refresh your Environment Variables. " "Variable that caused exception: {0}".format(str(ex)) raise ValueError(msg) @@ -216,33 +215,12 @@ class EnvVars: raise IOError(f("Could not update the environment variable {key} in file {dotenv_path}")) def get_registries(self): - registries = {} self.CONTAINER_REGISTRY_MAP = {} - length_container_registry_server = len('container_registry_server') - length_container_registry_username_or_password = len('container_registry_username') - length_container_registry = len('container_registry_') - # loops through .env file for key matching container_registry_server, container_registry_username, container_registry_password + subkeys = ['server', 'username', 'password'] + # loops through os.environ for key matching container_registry_server, container_registry_username, container_registry_password for key in os.environ: - key = key.upper() - # get token for container_registry_server key - if key.startswith('CONTAINER_REGISTRY_SERVER'): - token = key[length_container_registry_server:] - # if the token doesn't already exist as an item in the dictionary, add it. if it does, add the server value - if token not in registries: - registries[token] = {'username': '', 'password': ''} - registries[token]['server'] = self.get_envvar(key, required=True) - # get token for container_registry_username or container_registry_password key and get subkey (username or password) - elif key.startswith(('CONTAINER_REGISTRY_USERNAME', 'CONTAINER_REGISTRY_PASSWORD')): - token = key[length_container_registry_username_or_password:] - subkey = key[length_container_registry:length_container_registry_username_or_password] - # if the token doesn't already exist as an item in the dictionary, add it. if it does, add the subkey(username/password) value - if token not in registries: - registries[token] = {'username': '', 'password': ''} - registries[token][subkey] = self.get_envvar(key) - - # store parsed values as a dictionary of containerregistry objects - for key, value in registries.items(): - self.CONTAINER_REGISTRY_MAP[key] = ContainerRegistry(value['server'], value['username'], value['password']) + for subkey in subkeys: + self._set_registry_map(key, subkey) def is_posix(self): plat = platform.system().lower() @@ -268,3 +246,23 @@ class EnvVars: else: continue return False + + def _set_registry_map(self, env_key, subkey): + registry_key_prefix = 'CONTAINER_REGISTRY_' + default_key_prefix = registry_key_prefix + subkey.upper() + + # The prefix for additional registries has an additional underscore + add_key_prefix = default_key_prefix + '_' + add_key_prefix_length = len(add_key_prefix) + + if env_key.startswith(default_key_prefix): + if env_key == default_key_prefix: + token = '' + elif env_key.startswith(add_key_prefix): + token = env_key[add_key_prefix_length:] + else: + return + + if token not in self.CONTAINER_REGISTRY_MAP: + self.CONTAINER_REGISTRY_MAP[token] = ContainerRegistry('', '', '') + setattr(self.CONTAINER_REGISTRY_MAP[token], subkey.lower(), self.get_envvar(env_key)) diff --git a/iotedgedev/modules.py b/iotedgedev/modules.py index c0f44c9..bb25df5 100644 --- a/iotedgedev/modules.py +++ b/iotedgedev/modules.py @@ -152,7 +152,7 @@ class Modules: registry_key = key break if registry_key is None: - self.output.error("Could not find registry server with name {0}. Please make sure your envvar is set.".format(tag.split('/')[0].lower())) + raise ValueError("Could not find registry server with name {0}. Please make sure your envvar is set.".format(tag.split('/')[0].lower())) self.output.info("module json reading {0}".format(tag)) response = docker.docker_client.images.push(repository=tag, stream=True, auth_config={ diff --git a/iotedgedev/template/.env.tmp b/iotedgedev/template/.env.tmp index b3e3f5c..76b8120 100644 --- a/iotedgedev/template/.env.tmp +++ b/iotedgedev/template/.env.tmp @@ -9,22 +9,23 @@ DEVICE_CONNECTION_STRING="" # # CONTAINER REGISTRY # - # Settings for your container registry, set CONTAINER_REGISTRY_SERVER to the following as the default registry: - # Local Registry: "localhost:5000" - USERNAME/PASSWORD not required. - # Azure Container Registry: "jong.azurecr.io", Also set USERNAME/PASSWORD - # Docker Hub: "jongallant" - Your Docker hub username. Enter your Docker hub username into the CONTAINER_REGISTRY_USERNAME setting. Also set the PASSWORD. + # Settings for your default container registry. + # Set CONTAINER_REGISTRY_SERVER to the following: + # - Local Registry: "localhost:5000" - USERNAME/PASSWORD not required (Windows container not supported) + # - Azure Container Registry: "jong.azurecr.io", Also set USERNAME/PASSWORD + # - Docker Hub: "jongallant" - Your Docker hub username. Enter your Docker hub username into the CONTAINER_REGISTRY_USERNAME setting. Also set the PASSWORD. CONTAINER_REGISTRY_SERVER="localhost:5000" CONTAINER_REGISTRY_USERNAME="" CONTAINER_REGISTRY_PASSWORD="" - # To specify additional container registries ensure the prefix is CONTAINER_REGISTRY_SERVER, CONTAINER_REGISTRY_USERNAME, CONTAINER_REGISTRY_PASSWORD + # To specify additional container registries ensure the prefix is CONTAINER_REGISTRY_SERVER_, CONTAINER_REGISTRY_USERNAME_, CONTAINER_REGISTRY_PASSWORD_ # And the token following the prefix uniquely associates the SERVER/USERNAME/PASSWORD # Token can be any string of alphanumeric characters -# CONTAINER_REGISTRY_SERVER2="" -# CONTAINER_REGISTRY_USERNAME2="" -# CONTAINER_REGISTRY_PASSWORD2="" +# CONTAINER_REGISTRY_SERVER_2="" +# CONTAINER_REGISTRY_USERNAME_2="" +# CONTAINER_REGISTRY_PASSWORD_2="" # # HOST
Push fails with authentication error Reported by @michaeljqzq: Met below error when `iotedgedev push`: ``` {"errorDetail":{"message":"unauthorized: authentication required"},"error":"unauthorized: authentication required"}} ERROR: Error: unauthorized: authentication required ``` .env: ``` <snipped> # # CONTAINER REGISTRY # # Settings for your container registry, set CONTAINER_REGISTRY_SERVER to the following: # Local Registry: "localhost:5000" - USERNAME/PASSWORD not required. # Azure Container Registry: "jong.azurecr.io", Also set USERNAME/PASSWORD # Docker Hub: "jongallant" - Your Docker hub username. Enter your Docker hub username into the CONTAINER_REGISTRY_USERNAME setting. Also set the PASSWORD. CONTAINER_REGISTRY_SERVER="myregistry.azurecr.io" CONTAINER_REGISTRY_USERNAME="<snipped>" CONTAINER_REGISTRY_PASSWORD="<snipped>" <snipped> ```
Azure/iotedgedev
diff --git a/tests/test_envvars.py b/tests/test_envvars.py index 038da27..03c41ad 100644 --- a/tests/test_envvars.py +++ b/tests/test_envvars.py @@ -75,49 +75,49 @@ def test_envvar_clean(): def test_in_command_list_true_1(): output = Output() envvars = EnvVars(output) - assert envvars.in_command_list("solution create test_solution", ["init", "e2e", "solution create", "create", "simulator stop"]) + assert envvars.in_command_list("solution new test_solution", ["init", "e2e", "solution new", "new", "simulator stop"]) def test_in_command_list_true_2(): output = Output() envvars = EnvVars(output) - assert envvars.in_command_list("solution create", ["init", "e2e", "solution create", "create", "simulator stop"]) + assert envvars.in_command_list("solution new", ["init", "e2e", "solution new", "new", "simulator stop"]) def test_in_command_list_false_1(): output = Output() envvars = EnvVars(output) - assert not envvars.in_command_list("solution add filtermodule", ["init", "e2e", "solution create", "create", "simulator stop"]) + assert not envvars.in_command_list("solution add filtermodule", ["init", "e2e", "solution new", "new", "simulator stop"]) def test_in_command_list_false_2(): output = Output() envvars = EnvVars(output) - assert not envvars.in_command_list("solution addotherstuff filtermodule", ["init", "e2e", "solution add", "create", "simulator stop"]) + assert not envvars.in_command_list("solution addotherstuff filtermodule", ["init", "e2e", "solution add", "new", "simulator stop"]) def test_in_command_list_empty_1(): output = Output() envvars = EnvVars(output) - assert not envvars.in_command_list("", ["init", "e2e", "solution create", "create", "simulator stop"]) + assert not envvars.in_command_list("", ["init", "e2e", "solution new", "new", "simulator stop"]) def test_in_command_list_empty_2(): output = Output() envvars = EnvVars(output) - assert not envvars.in_command_list("solution create test_solution", ["init", "e2e", "", "create", "simulator stop"]) + assert not envvars.in_command_list("solution new test_solution", ["init", "e2e", "", "new", "simulator stop"]) def test_in_command_list_empty_3(): output = Output() envvars = EnvVars(output) - assert envvars.in_command_list("", ["init", "e2e", "", "create", "simulator stop"]) + assert envvars.in_command_list("", ["init", "e2e", "", "new", "simulator stop"]) def test_is_bypass_command_true(): output = Output() envvars = EnvVars(output) - assert envvars.is_bypass_command("solution create EdgeSolution") + assert envvars.is_bypass_command("solution new EdgeSolution") def test_is_bypass_command_false(): @@ -141,7 +141,7 @@ def test_is_terse_command_true(): def test_is_terse_command_false(): output = Output() envvars = EnvVars(output) - assert not envvars.is_terse_command("solution create") + assert not envvars.is_terse_command("solution new") def test_is_terse_command_empty(): @@ -182,29 +182,26 @@ def test_container_registry_server_key_missing_sys_exit(): output = Output() envvars = EnvVars(output) with pytest.raises(ValueError): - envvars.get_envvar("CONTAINER_REGISTRY_SERVERUNITTEST", required=True) + envvars.get_envvar("CONTAINER_REGISTRY_SERVER_UNITTEST", required=True) @pytest.fixture def setup_test_env(request): output = Output() envvars = EnvVars(output) - envvars.set_envvar("CONTAINER_REGISTRY_SERVERUNITTEST", '') + envvars.set_envvar("CONTAINER_REGISTRY_SERVER_UNITTEST", 'unittest.azurecr.io') + envvars.set_envvar("CONTAINER_REGISTRY_USERNAME_UNITTEST", 'username') + envvars.set_envvar("CONTAINER_REGISTRY_PASSWORD_UNITTEST", 'password') def clean(): - os.environ.pop("CONTAINER_REGISTRY_SERVERUNITTEST") + os.environ.pop("CONTAINER_REGISTRY_SERVER_UNITTEST") + os.environ.pop("CONTAINER_REGISTRY_USERNAME_UNITTEST") + os.environ.pop("CONTAINER_REGISTRY_PASSWORD_UNITTEST") request.addfinalizer(clean) return -def test_container_registry_server_value_missing_sys_exit(setup_test_env): - output = Output() - envvars = EnvVars(output) - with pytest.raises(ValueError): - envvars.get_envvar("CONTAINER_REGISTRY_SERVERUNITTEST", required=True) - - def test_unique_container_registry_server_tokens(): unique = set() length_container_registry_server = len('container_registry_server') @@ -259,45 +256,12 @@ def test_unique_container_registry_password_tokens(): assert is_unique -def test_container_registry_map_has_val(): - output = Output() - envvars = EnvVars(output) - envvars.load() - result = envvars.verify_envvar_has_val("CONTAINER_REGISTRY_MAP", envvars.CONTAINER_REGISTRY_MAP) - assert not result - - -def test_additional_container_registry_server_has_val(): - output = Output() - envvars = EnvVars(output) - envvars.load() - if len(envvars.CONTAINER_REGISTRY_MAP) > 1: - keys = envvars.CONTAINER_REGISTRY_MAP.keys() - for key in keys: - if key != '': - token = key - assert envvars.CONTAINER_REGISTRY_MAP[token].server is not None - - -def test_additional_container_registry_username_has_val(): - output = Output() - envvars = EnvVars(output) - envvars.load() - if len(envvars.CONTAINER_REGISTRY_MAP) > 1: - keys = envvars.CONTAINER_REGISTRY_MAP.keys() - for key in keys: - if key != '': - token = key - assert envvars.CONTAINER_REGISTRY_MAP[token].username is not None - - -def test_additional_container_registry_password_has_val(): +def test_additional_container_registry_map_has_val(setup_test_env): output = Output() envvars = EnvVars(output) envvars.load() - if len(envvars.CONTAINER_REGISTRY_MAP) > 1: - keys = envvars.CONTAINER_REGISTRY_MAP.keys() - for key in keys: - if key != '': - token = key - assert envvars.CONTAINER_REGISTRY_MAP[token].password is not None + assert len(envvars.CONTAINER_REGISTRY_MAP) == 2 + assert 'UNITTEST' in envvars.CONTAINER_REGISTRY_MAP.keys() + assert envvars.CONTAINER_REGISTRY_MAP['UNITTEST'].server == 'unittest.azurecr.io' + assert envvars.CONTAINER_REGISTRY_MAP['UNITTEST'].username == 'username' + assert envvars.CONTAINER_REGISTRY_MAP['UNITTEST'].password == 'password' diff --git a/tests/test_iotedgedev.py b/tests/test_iotedgedev.py index c436ca8..60d7f06 100644 --- a/tests/test_iotedgedev.py +++ b/tests/test_iotedgedev.py @@ -36,7 +36,7 @@ def create_solution(request): runner = CliRunner() os.chdir(tests_dir) - result = runner.invoke(cli.main, ['solution', 'create', test_solution]) + result = runner.invoke(cli.main, ['solution', 'new', test_solution]) print(result.output) assert 'AZURE IOT EDGE SOLUTION CREATED' in result.output @@ -58,7 +58,7 @@ def test_solution_create_in_non_empty_current_path(request): cli = __import__("iotedgedev.cli", fromlist=['main']) runner = CliRunner() - result = runner.invoke(cli.main, ['solution', 'create', '.']) + result = runner.invoke(cli.main, ['solution', 'new', '.']) print(result.output) assert "Directory is not empty" in result.output @@ -75,7 +75,7 @@ def test_solution_create_in_empty_current_path(request): cli = __import__("iotedgedev.cli", fromlist=['main']) runner = CliRunner() - result = runner.invoke(cli.main, ['solution', 'create', '.']) + result = runner.invoke(cli.main, ['solution', 'new', '.']) print(result.output) assert 'AZURE IOT EDGE SOLUTION CREATED' in result.output @@ -88,7 +88,7 @@ def test_solution_create_in_non_empty_dir(request): cli = __import__("iotedgedev.cli", fromlist=['main']) runner = CliRunner() - result = runner.invoke(cli.main, ['solution', 'create', test_solution]) + result = runner.invoke(cli.main, ['solution', 'new', test_solution]) print(result.output) assert "Directory is not empty" in result.output @@ -104,7 +104,7 @@ def test_solution_create_in_empty_child_dir(request): cli = __import__("iotedgedev.cli", fromlist=['main']) runner = CliRunner() - result = runner.invoke(cli.main, ['solution', 'create', dirname]) + result = runner.invoke(cli.main, ['solution', 'new', dirname]) print(result.output) assert 'AZURE IOT EDGE SOLUTION CREATED' in result.output diff --git a/tests/test_simulator.py b/tests/test_simulator.py index 5ba1e56..38849d6 100644 --- a/tests/test_simulator.py +++ b/tests/test_simulator.py @@ -26,7 +26,7 @@ def create_solution(request): runner = CliRunner() os.chdir(tests_dir) - result = runner.invoke(cli.main, ['solution', 'create', test_solution]) + result = runner.invoke(cli.main, ['solution', 'new', test_solution]) print(result.output) assert 'AZURE IOT EDGE SOLUTION CREATED' in result.output
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_added_files", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 3, "issue_text_score": 2, "test_score": 0 }, "num_modified_files": 7 }
0.79
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.6", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 applicationinsights==0.11.9 argcomplete==1.12.3 attrs==22.2.0 azure-cli==2.40.0 azure-cli-cloud==2.1.1 azure-cli-command-modules-nspkg==2.0.3 azure-cli-configure==2.0.24 azure-cli-core==2.31.0 azure-cli-extension==0.2.5 azure-cli-iot==0.3.11 azure-cli-nspkg==3.0.4 azure-cli-profile==2.1.5 azure-cli-resource==2.1.16 azure-cli-telemetry==1.0.6 azure-common==1.1.28 azure-core==1.24.2 azure-mgmt-authorization==0.50.0 azure-mgmt-core==1.3.2 azure-mgmt-iothub==0.8.2 azure-mgmt-iothubprovisioningservices==0.2.0 azure-mgmt-managementgroups==0.1.0 azure-mgmt-nspkg==3.0.2 azure-nspkg==3.0.2 bcrypt==4.0.1 cached-property==1.5.2 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 click==8.0.4 commentjson==0.9.0 cryptography==40.0.2 decorator==5.1.1 distro==1.9.0 docker==5.0.3 docker-compose==1.29.1 dockerpty==0.4.1 docopt==0.6.2 fstrings==0.1.0 humanfriendly==10.0 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 -e git+https://github.com/Azure/iotedgedev.git@3b26b6495293607b3752f83fe412c84d7da4fc23#egg=iotedgedev iotedgehubdev==0.14.18 isodate==0.6.1 jeepney==0.7.1 jmespath==0.10.0 jsonpath-rw==1.4.0 jsonschema==3.2.0 keyring==23.4.1 knack==0.9.0 lark-parser==0.7.8 msal==1.27.0 msal-extensions==0.3.1 msrest==0.7.1 msrestazure==0.4.34 oauthlib==3.2.2 packaging==21.3 paramiko==2.12.0 pkginfo==1.10.0 pluggy==1.0.0 ply==3.11 portalocker==1.7.1 psutil==5.9.8 py==1.11.0 pycparser==2.21 Pygments==2.14.0 PyJWT==2.4.0 PyNaCl==1.5.0 pyOpenSSL==22.0.0 pyparsing==3.1.4 pyrsistent==0.18.0 PySocks==1.7.1 pytest==7.0.1 python-dateutil==2.9.0.post0 python-dotenv==0.20.0 PyYAML==5.4.1 regex==2023.8.8 requests==2.27.1 requests-oauthlib==2.0.0 SecretStorage==3.3.3 six==1.17.0 tabulate==0.8.10 texttable==1.7.0 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.26.20 websocket-client==0.59.0 zipp==3.6.0
name: iotedgedev channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - applicationinsights==0.11.9 - argcomplete==1.12.3 - attrs==22.2.0 - azure-cli==2.40.0 - azure-cli-cloud==2.1.1 - azure-cli-command-modules-nspkg==2.0.3 - azure-cli-configure==2.0.24 - azure-cli-core==2.31.0 - azure-cli-extension==0.2.5 - azure-cli-iot==0.3.11 - azure-cli-nspkg==3.0.4 - azure-cli-profile==2.1.5 - azure-cli-resource==2.1.16 - azure-cli-telemetry==1.0.6 - azure-common==1.1.28 - azure-core==1.24.2 - azure-mgmt-authorization==0.50.0 - azure-mgmt-core==1.3.2 - azure-mgmt-iothub==0.8.2 - azure-mgmt-iothubprovisioningservices==0.2.0 - azure-mgmt-managementgroups==0.1.0 - azure-mgmt-nspkg==3.0.2 - azure-nspkg==3.0.2 - bcrypt==4.0.1 - cached-property==1.5.2 - cffi==1.15.1 - charset-normalizer==2.0.12 - click==8.0.4 - commentjson==0.9.0 - cryptography==40.0.2 - decorator==5.1.1 - distro==1.9.0 - docker==5.0.3 - docker-compose==1.29.1 - dockerpty==0.4.1 - docopt==0.6.2 - fstrings==0.1.0 - humanfriendly==10.0 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - iotedgehubdev==0.14.18 - isodate==0.6.1 - jeepney==0.7.1 - jmespath==0.10.0 - jsonpath-rw==1.4.0 - jsonschema==3.2.0 - keyring==23.4.1 - knack==0.9.0 - lark-parser==0.7.8 - msal==1.27.0 - msal-extensions==0.3.1 - msrest==0.7.1 - msrestazure==0.4.34 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.12.0 - pkginfo==1.10.0 - pluggy==1.0.0 - ply==3.11 - portalocker==1.7.1 - psutil==5.9.8 - py==1.11.0 - pycparser==2.21 - pygments==2.14.0 - pyjwt==2.4.0 - pynacl==1.5.0 - pyopenssl==22.0.0 - pyparsing==3.1.4 - pyrsistent==0.18.0 - pysocks==1.7.1 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - python-dotenv==0.20.0 - pyyaml==5.4.1 - regex==2023.8.8 - requests==2.27.1 - requests-oauthlib==2.0.0 - secretstorage==3.3.3 - six==1.17.0 - tabulate==0.8.10 - texttable==1.7.0 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.26.20 - websocket-client==0.59.0 - zipp==3.6.0 prefix: /opt/conda/envs/iotedgedev
[ "tests/test_envvars.py::test_is_bypass_command_true" ]
[ "tests/test_envvars.py::test_default_container_registry_server_key_exists", "tests/test_envvars.py::test_additional_container_registry_map_has_val" ]
[ "tests/test_envvars.py::test_valid_get_envvar", "tests/test_envvars.py::test_invalid_get_envvar", "tests/test_envvars.py::test_valid_load", "tests/test_envvars.py::test_valid_verify_envvar_has_val", "tests/test_envvars.py::test_valid_get_envvar_key_if_val", "tests/test_envvars.py::test_invalid_get_envvar_key_if_val", "tests/test_envvars.py::test_set_envvar", "tests/test_envvars.py::test_envvar_clean", "tests/test_envvars.py::test_in_command_list_true_1", "tests/test_envvars.py::test_in_command_list_true_2", "tests/test_envvars.py::test_in_command_list_false_1", "tests/test_envvars.py::test_in_command_list_false_2", "tests/test_envvars.py::test_in_command_list_empty_1", "tests/test_envvars.py::test_in_command_list_empty_2", "tests/test_envvars.py::test_in_command_list_empty_3", "tests/test_envvars.py::test_is_bypass_command_false", "tests/test_envvars.py::test_is_bypass_command_empty", "tests/test_envvars.py::test_is_terse_command_true", "tests/test_envvars.py::test_is_terse_command_false", "tests/test_envvars.py::test_is_terse_command_empty", "tests/test_envvars.py::test_default_container_registry_server_value_exists", "tests/test_envvars.py::test_default_container_registry_username_value_exists_or_returns_empty_string", "tests/test_envvars.py::test_default_container_registry_password_value_exists_or_returns_empty_string", "tests/test_envvars.py::test_container_registry_server_key_missing_sys_exit", "tests/test_envvars.py::test_unique_container_registry_server_tokens", "tests/test_envvars.py::test_unique_container_registry_username_tokens", "tests/test_envvars.py::test_unique_container_registry_password_tokens" ]
[]
MIT License
null
Azure__iotedgedev-349
67c63047b53f7e1749d7d9c3985593deae566699
2018-10-30 09:01:10
67c63047b53f7e1749d7d9c3985593deae566699
diff --git a/.vscode/launch.json b/.vscode/launch.json index 4121a9a..d2519d0 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,20 +5,11 @@ "name": "Python Module", "type": "python", "request": "launch", - "stopOnEntry": true, "module": "iotedgedev.cli", "args": [ - "solution", - "new", - "test_solution" + "push" ], - "debugOptions": [ - "RedirectOutput" - ], - "env": { - "DOTENV_FILE": ".env", - } + "cwd": "${workspaceFolder}/tests/test_solution" } ] -} - \ No newline at end of file +} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4ab12a3..ee1413c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,6 +18,7 @@ Please fork, branch and pull-request any changes you'd like to make. 1. Install **Python 2.7+**, **Python 3.6+**, and **pip** - Windows: [Install from Python's website](https://www.python.org/downloads/) - Linux: `sudo apt-get install python-pip python3-pip` + - macOS: The OpenSSL used by the system built-in Python is old and vulnerable. Please use Python installed with [Homebrew](https://docs.brew.sh/Homebrew-and-Python). 1. Install **[Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest)** diff --git a/iotedgedev/dockercls.py b/iotedgedev/dockercls.py index 99f1a21..7cae0fd 100644 --- a/iotedgedev/dockercls.py +++ b/iotedgedev/dockercls.py @@ -43,7 +43,7 @@ class Docker: raise ValueError("You must specific a port for your local registry server. Expected: 'localhost:5000'. Found: " + local_server) port = parts[1] - ports = {'{0}/tcp'.format(port): int(port)} + ports = {'5000/tcp': int(port)} try: self.output.info("Looking for local 'registry' container") diff --git a/iotedgedev/template/deployment.template.json b/iotedgedev/template/deployment.template.json index 80c1a4b..9e20f5f 100644 --- a/iotedgedev/template/deployment.template.json +++ b/iotedgedev/template/deployment.template.json @@ -7,7 +7,8 @@ "type": "docker", "settings": { "minDockerVersion": "v1.25", - "loggingOptions": "" + "loggingOptions": "", + "registryCredentials": {} } }, "systemModules": {
Failed to push to local registry - iotedgedev Version: 1.0.0rc0 - Python Version: Python2.7 Python3.6 Python3.7 - Pip Version:18.1 - Development machine OS Version: Windows10/Ubuntu18.04/Mac os high sierra 10.13.6 - IoT Edge device OS Version: Windows10/Ubuntu18.04/Mac os high sierra 10.13.6 Steps to Reproduce: 1. iotedgedev new test_solution -m filtermodule -t csharp 2. In .env file, update the CONTAINER_REGISTRY_SERVER with “localhost:5001” 3. Make sure there is no local docker registry in your machine (docker rm -f registry) 4. Run "iotedgedev push" 5. It will throw below error message 1 6. In .env file, update the CONTAINER_REGISTRY_SERVER with “localhost:5000” 7. Run "iotedgedev push" 8. It will throw below error message 2 9. Run "iotedgedev push" 10. It push successfully. error message 1: ``` INITIALIZING CONTAINER REGISTRY REGISTRY: localhost:5001 Looking for local 'registry' container Local 'registry' container not found Looking for local 'registry' image Local 'registry' image not found Pulling 'registry' image Running registry container PUSHING DOCKER IMAGE: localhost:5001/filtermodule:0.0.1-amd64 The push refers to repository [localhost:5001/filtermodule] ERROR: Error: Get http://localhost:5001/v2/: read tcp 127.0.0.1:52290->127.0.0.1:5001: read: connection reset by peer (py36) v-cheye@ubuntu1804-test10:~/csharp/test_solution$ ``` error message 2: ``` INITIALIZING CONTAINER REGISTRY REGISTRY: localhost:5000 Looking for local 'registry' container Local 'registry' container not found Looking for local 'registry' image Local 'registry' image not found Pulling 'registry' image Running registry container PUSHING DOCKER IMAGE: localhost:5000/filtermodule:0.0.1-amd64 The push refers to repository [localhost:5000/filtermodule] ERROR: Error: Get http://localhost:5000/v2/: EOF (py36) v-cheye@ubuntu1804-test10:~/csharp/test_solution$ ```
Azure/iotedgedev
diff --git a/tests/assets/deployment.template_1.json b/tests/assets/deployment.template_1.json index 3dc499e..3d74b31 100644 --- a/tests/assets/deployment.template_1.json +++ b/tests/assets/deployment.template_1.json @@ -7,7 +7,8 @@ "type": "docker", "settings": { "minDockerVersion": "v1.25", - "loggingOptions": "" + "loggingOptions": "", + "registryCredentials": {} } }, "systemModules": { diff --git a/tests/assets/deployment.template_2.json b/tests/assets/deployment.template_2.json index 50fa67d..e1a4fc9 100644 --- a/tests/assets/deployment.template_2.json +++ b/tests/assets/deployment.template_2.json @@ -7,7 +7,8 @@ "type": "docker", "settings": { "minDockerVersion": "v1.25", - "loggingOptions": "" + "loggingOptions": "", + "registryCredentials": {} } }, "systemModules": { diff --git a/tests/assets/deployment.template_3.json b/tests/assets/deployment.template_3.json index 7566fd3..ab7b594 100644 --- a/tests/assets/deployment.template_3.json +++ b/tests/assets/deployment.template_3.json @@ -7,7 +7,8 @@ "type": "docker", "settings": { "minDockerVersion": "v1.25", - "loggingOptions": "" + "loggingOptions": "", + "registryCredentials": {} } }, "systemModules": { diff --git a/tests/assets/deployment.template_4.json b/tests/assets/deployment.template_4.json index 9909350..6a8384e 100644 --- a/tests/assets/deployment.template_4.json +++ b/tests/assets/deployment.template_4.json @@ -7,7 +7,8 @@ "type": "docker", "settings": { "minDockerVersion": "v1.25", - "loggingOptions": "" + "loggingOptions": "", + "registryCredentials": {} } }, "systemModules": {
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 0, "test_score": 3 }, "num_modified_files": 4 }
0.82
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.6", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 applicationinsights==0.11.9 argcomplete==1.12.3 attrs==22.2.0 azure-cli==2.40.0 azure-cli-cloud==2.1.1 azure-cli-command-modules-nspkg==2.0.3 azure-cli-configure==2.0.24 azure-cli-core==2.31.0 azure-cli-extension==0.2.5 azure-cli-iot==0.3.11 azure-cli-nspkg==3.0.4 azure-cli-profile==2.1.5 azure-cli-resource==2.1.16 azure-cli-telemetry==1.0.6 azure-common==1.1.28 azure-core==1.24.2 azure-mgmt-authorization==0.50.0 azure-mgmt-core==1.3.2 azure-mgmt-iothub==0.8.2 azure-mgmt-iothubprovisioningservices==0.2.0 azure-mgmt-managementgroups==0.1.0 azure-mgmt-nspkg==3.0.2 azure-nspkg==3.0.2 bcrypt==4.0.1 cached-property==1.5.2 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 click==8.0.4 commentjson==0.9.0 cryptography==40.0.2 decorator==5.1.1 distro==1.9.0 docker==5.0.3 docker-compose==1.29.1 dockerpty==0.4.1 docopt==0.6.2 fstrings==0.1.0 humanfriendly==10.0 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 -e git+https://github.com/Azure/iotedgedev.git@67c63047b53f7e1749d7d9c3985593deae566699#egg=iotedgedev iotedgehubdev==0.14.18 isodate==0.6.1 jeepney==0.7.1 jmespath==0.10.0 jsonpath-rw==1.4.0 jsonschema==3.2.0 keyring==23.4.1 knack==0.9.0 lark-parser==0.7.8 msal==1.27.0 msal-extensions==0.3.1 msrest==0.7.1 msrestazure==0.4.34 oauthlib==3.2.2 packaging==21.3 paramiko==2.12.0 pkginfo==1.10.0 pluggy==1.0.0 ply==3.11 portalocker==1.7.1 psutil==5.9.8 py==1.11.0 pycparser==2.21 Pygments==2.14.0 PyJWT==2.4.0 PyNaCl==1.5.0 pyOpenSSL==22.0.0 pyparsing==3.1.4 pyrsistent==0.18.0 PySocks==1.7.1 pytest==7.0.1 python-dateutil==2.9.0.post0 python-dotenv==0.20.0 PyYAML==5.4.1 regex==2023.8.8 requests==2.27.1 requests-oauthlib==2.0.0 SecretStorage==3.3.3 six==1.17.0 tabulate==0.8.10 texttable==1.7.0 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.26.20 websocket-client==0.59.0 zipp==3.6.0
name: iotedgedev channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - applicationinsights==0.11.9 - argcomplete==1.12.3 - attrs==22.2.0 - azure-cli==2.40.0 - azure-cli-cloud==2.1.1 - azure-cli-command-modules-nspkg==2.0.3 - azure-cli-configure==2.0.24 - azure-cli-core==2.31.0 - azure-cli-extension==0.2.5 - azure-cli-iot==0.3.11 - azure-cli-nspkg==3.0.4 - azure-cli-profile==2.1.5 - azure-cli-resource==2.1.16 - azure-cli-telemetry==1.0.6 - azure-common==1.1.28 - azure-core==1.24.2 - azure-mgmt-authorization==0.50.0 - azure-mgmt-core==1.3.2 - azure-mgmt-iothub==0.8.2 - azure-mgmt-iothubprovisioningservices==0.2.0 - azure-mgmt-managementgroups==0.1.0 - azure-mgmt-nspkg==3.0.2 - azure-nspkg==3.0.2 - bcrypt==4.0.1 - cached-property==1.5.2 - cffi==1.15.1 - charset-normalizer==2.0.12 - click==8.0.4 - commentjson==0.9.0 - cryptography==40.0.2 - decorator==5.1.1 - distro==1.9.0 - docker==5.0.3 - docker-compose==1.29.1 - dockerpty==0.4.1 - docopt==0.6.2 - fstrings==0.1.0 - humanfriendly==10.0 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - iotedgehubdev==0.14.18 - isodate==0.6.1 - jeepney==0.7.1 - jmespath==0.10.0 - jsonpath-rw==1.4.0 - jsonschema==3.2.0 - keyring==23.4.1 - knack==0.9.0 - lark-parser==0.7.8 - msal==1.27.0 - msal-extensions==0.3.1 - msrest==0.7.1 - msrestazure==0.4.34 - oauthlib==3.2.2 - packaging==21.3 - paramiko==2.12.0 - pkginfo==1.10.0 - pluggy==1.0.0 - ply==3.11 - portalocker==1.7.1 - psutil==5.9.8 - py==1.11.0 - pycparser==2.21 - pygments==2.14.0 - pyjwt==2.4.0 - pynacl==1.5.0 - pyopenssl==22.0.0 - pyparsing==3.1.4 - pyrsistent==0.18.0 - pysocks==1.7.1 - pytest==7.0.1 - python-dateutil==2.9.0.post0 - python-dotenv==0.20.0 - pyyaml==5.4.1 - regex==2023.8.8 - requests==2.27.1 - requests-oauthlib==2.0.0 - secretstorage==3.3.3 - six==1.17.0 - tabulate==0.8.10 - texttable==1.7.0 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.26.20 - websocket-client==0.59.0 - zipp==3.6.0 prefix: /opt/conda/envs/iotedgedev
[ "tests/test_utility.py::test_copy_from_template_dir" ]
[ "tests/test_envvars.py::test_default_container_registry_server_key_exists", "tests/test_envvars.py::test_additional_container_registry_map_has_val" ]
[ "tests/test_azurecli.py::test_lowercase_token_should_be_lowercase_for_name_and_id", "tests/test_azurecli.py::test_mixedcase_token_should_be_lowercase_for_id_but_unmodified_for_name", "tests/test_buildoptionsparser.py::test_filter_build_options", "tests/test_buildoptionsparser.py::test_parse_to_dict", "tests/test_buildoptionsparser.py::test_parse_to_list", "tests/test_buildoptionsparser.py::test_parse_val", "tests/test_buildoptionsparser.py::test_parse_container_limits", "tests/test_buildoptionsparser.py::test_parse_flag", "tests/test_buildoptionsparser.py::test_invalid_build_options", "tests/test_buildoptionsparser.py::test_filtered_valid_build_options", "tests/test_config.py::test_firsttime", "tests/test_connectionstring.py::test_empty_connectionstring", "tests/test_connectionstring.py::test_empty_hostname_iothub_connectionstring", "tests/test_connectionstring.py::test_empty_iothub_connectionstring", "tests/test_connectionstring.py::test_empty_device_connectionstring", "tests/test_connectionstring.py::test_valid_connectionstring", "tests/test_connectionstring.py::test_valid_iothub_connectionstring", "tests/test_connectionstring.py::test_valid_devicehub_connectionstring", "tests/test_connectionstring.py::test_invalid_connectionstring", "tests/test_connectionstring.py::test_invalid_iothub_connectionstring", "tests/test_connectionstring.py::test_invalid_devicehub_connectionstring", "tests/test_decorators.py::test_suppress_all_exceptions", "tests/test_decorators.py::test_hash256_result", "tests/test_deploymentmanifest.py::test_get_desired_property", "tests/test_deploymentmanifest.py::test_get_desired_property_nonexistent_module", "tests/test_deploymentmanifest.py::test_get_desired_property_nonexistent_prop", "tests/test_deploymentmanifest.py::test_get_user_modules", "tests/test_deploymentmanifest.py::test_get_system_modules", "tests/test_deploymentmanifest.py::test_get_modules_to_process", "tests/test_deploymentmanifest.py::test_get_modules_to_process_empty", "tests/test_deploymentmanifest.py::test_add_module_template", "tests/test_envvars.py::test_valid_get_envvar", "tests/test_envvars.py::test_invalid_get_envvar", "tests/test_envvars.py::test_valid_load", "tests/test_envvars.py::test_valid_verify_envvar_has_val", "tests/test_envvars.py::test_valid_get_envvar_key_if_val", "tests/test_envvars.py::test_invalid_get_envvar_key_if_val", "tests/test_envvars.py::test_set_envvar", "tests/test_envvars.py::test_envvar_clean", "tests/test_envvars.py::test_in_command_list_true_1", "tests/test_envvars.py::test_in_command_list_true_2", "tests/test_envvars.py::test_in_command_list_false_1", "tests/test_envvars.py::test_in_command_list_false_2", "tests/test_envvars.py::test_in_command_list_empty_1", "tests/test_envvars.py::test_in_command_list_empty_2", "tests/test_envvars.py::test_in_command_list_empty_3", "tests/test_envvars.py::test_is_bypass_command_true", "tests/test_envvars.py::test_is_bypass_command_false", "tests/test_envvars.py::test_is_bypass_command_empty", "tests/test_envvars.py::test_is_terse_command_true", "tests/test_envvars.py::test_is_terse_command_false", "tests/test_envvars.py::test_is_terse_command_empty", "tests/test_envvars.py::test_default_container_registry_server_value_exists", "tests/test_envvars.py::test_default_container_registry_username_value_exists_or_returns_empty_string", "tests/test_envvars.py::test_default_container_registry_password_value_exists_or_returns_empty_string", "tests/test_envvars.py::test_container_registry_server_key_missing_sys_exit", "tests/test_envvars.py::test_unique_container_registry_server_tokens", "tests/test_envvars.py::test_unique_container_registry_username_tokens", "tests/test_envvars.py::test_unique_container_registry_password_tokens", "tests/test_utility.py::test_ensure_dir", "tests/test_utility.py::test_copy_template", "tests/test_utility.py::test_copy_template_expandvars", "tests/test_utility.py::test_in_asterisk_list", "tests/test_utility.py::test_in_asterisk_list_empty", "tests/test_utility.py::test_in_asterisk_list_asterisk", "tests/test_utility.py::test_get_sha256_hash" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_iotedgedev-349
Azure__iotedgehubdev-159
a6fb00a5109860f12bec2b386f368abb20f8d979
2019-01-18 02:06:37
a6fb00a5109860f12bec2b386f368abb20f8d979
LazarusX: @shizn Do you have the detailed messages?
diff --git a/README.md b/README.md index 23ad402..db93bf4 100644 --- a/README.md +++ b/README.md @@ -32,20 +32,42 @@ The following table compares the steps needed to run the solution on the IoT Edg ## Quickstart 1. Setup + + Windows ``` - iotedgehubdev setup -c <edge-device-connection-string> + iotedgehubdev setup -c "<edge-device-connection-string>" + ``` + + Linux/macOS + ``` + sudo iotedgehubdev setup -c "<edge-device-connection-string>" ``` 2. Start/stop an IoT Edge solution in simulator + + Windows ``` - iotedgehubdev start -d <path/to/deployment manifest> + iotedgehubdev start -d <path/to/deployment-manifest> iotedgehubdev stop ``` + Linux/macOS + ``` + sudo iotedgehubdev start -d <path/to/deployment-manifest> + sudo iotedgehubdev stop + ``` + 3. Start and debug a single module natively 1. Start the module with specific input(s) + + Windows ``` - iotedgehubdev start -i <module-inputs> + iotedgehubdev start -i "<module-inputs>" + ``` + + Linux/macOS + ``` + sudo iotedgehubdev start -i "<module-inputs>" ``` For example: `iotedgehubdev start -i "input1,input2"` @@ -61,6 +83,17 @@ The following table compares the steps needed to run the solution on the IoT Edg For example: `curl --header "Content-Type: application/json" --request POST --data '{"inputName": "input1","data": "hello world"}' http://localhost:53000/api/v1/messages` + 5. Stop the simulator + + Windows + ``` + iotedgehubdev stop + ``` + + Linux/macOS + ``` + sudo iotedgehubdev stop + ``` ## Other resources - [Azure IoT Edge for Visual Studio Code](https://github.com/microsoft/vscode-azure-iot-edge) diff --git a/iotedgehubdev/cli.py b/iotedgehubdev/cli.py index e6a4b7c..843cf8a 100644 --- a/iotedgehubdev/cli.py +++ b/iotedgehubdev/cli.py @@ -49,7 +49,7 @@ def _with_telemetry(func): telemetry.flush() return value except Exception as e: - output.error('Error: {0}'.format(str(e))) + output.error(str(e)) telemetry.fail(str(e), 'Command failed') telemetry.flush() sys.exit(1) @@ -57,6 +57,29 @@ def _with_telemetry(func): return _wrapper +def _parse_config_json(): + config_file = HostPlatform.get_config_file_path() + + if not Utils.check_if_file_exists(config_file): + raise ValueError('Cannot find config file. Please run `{0}` first.'.format(_get_setup_command())) + + with open(config_file) as f: + try: + config_json = json.load(f) + + connection_str = config_json[CONN_STR] + cert_path = config_json[CERT_PATH] + gatewayhost = config_json[GATEWAY_HOST] + + return EdgeManager(connection_str, gatewayhost, cert_path) + except (ValueError, KeyError): + raise ValueError('Invalid config file. Please run `{0}` again.'.format(_get_setup_command())) + + +def _get_setup_command(): + return '{0}iotedgehubdev setup -c "<edge-device-connection-string>"'.format('' if os.name == 'nt' else 'sudo ') + + @click.group(context_settings=CONTEXT_SETTINGS, invoke_without_command=True) @click.version_option() def main(): @@ -136,27 +159,13 @@ def setup(connection_string, gateway_host): help='Specify the output file to save the connection string. If the file exists, the content will be overwritten.') @_with_telemetry def modulecred(modules, local, output_file): - configFile = HostPlatform.get_config_file_path() - if Utils.check_if_file_exists(configFile) is not True: - output.error('Cannot find config file. Please run `iotedgehubdev setup` first.') - sys.exit(1) - try: - with open(configFile) as f: - jsonObj = json.load(f) - if CONN_STR in jsonObj and CERT_PATH in jsonObj and GATEWAY_HOST in jsonObj: - connection_str = jsonObj[CONN_STR] - cert_path = jsonObj[CERT_PATH] - gatewayhost = jsonObj[GATEWAY_HOST] - edgeManager = EdgeManager(connection_str, gatewayhost, cert_path) - modules = [module.strip() for module in modules.strip().split('|')] - credential = edgeManager.outputModuleCred(modules, local, output_file) - output.info(credential[0]) - output.info(credential[1]) - else: - output.error('Missing keys in config file. Please run `iotedgehubdev setup` again.') - sys.exit(1) - except Exception as e: - raise e + edge_manager = _parse_config_json() + + if edge_manager: + modules = [module.strip() for module in modules.strip().split('|')] + credential = edge_manager.outputModuleCred(modules, local, output_file) + output.info(credential[0]) + output.info(credential[1]) @click.command(context_settings=CONTEXT_SETTINGS, @@ -189,28 +198,16 @@ def modulecred(modules, local, output_file): help='Docker daemon socket to connect to') @_with_telemetry def start(inputs, port, deployment, verbose, host): - configFile = HostPlatform.get_config_file_path() - try: - with open(configFile) as f: - jsonObj = json.load(f) - if CONN_STR in jsonObj and CERT_PATH in jsonObj and GATEWAY_HOST in jsonObj: - connection_str = jsonObj[CONN_STR] - cert_path = jsonObj[CERT_PATH] - gatewayhost = jsonObj[GATEWAY_HOST] - edgeManager = EdgeManager(connection_str, gatewayhost, cert_path) - if host is not None: - os.environ[DOCKER_HOST] = host - else: - output.error('Missing keys in config file. Please run `iotedgehubdev setup` again.') - sys.exit(1) - except Exception as e: - raise e + edge_manager = _parse_config_json() - hostname_hash, suffix = Utils.hash_connection_str_hostname(connection_str) - telemetry.add_extra_props({'iothubhostname': hostname_hash, 'iothubhostnamesuffix': suffix}) + if edge_manager: + if host is not None: + os.environ[DOCKER_HOST] = host - if inputs is None and deployment is not None: - try: + hostname_hash, suffix = Utils.hash_connection_str_hostname(edge_manager.hostname) + telemetry.add_extra_props({'iothubhostname': hostname_hash, 'iothubhostnamesuffix': suffix}) + + if inputs is None and deployment is not None: with open(deployment) as json_file: json_data = json.load(json_file) if 'modulesContent' in json_data: @@ -222,33 +219,31 @@ def start(inputs, port, deployment, verbose, host): except RegistriesLoginError as e: output.warning(e.message()) telemetry.add_extra_props({'failloginregistries': len(e.registries())}) - edgeManager.start_solution(module_content, verbose) + edge_manager.start_solution(module_content, verbose) if not verbose: output.info('IoT Edge Simulator has been started in solution mode.') - except Exception as e: - raise e - else: - if deployment is not None: - output.info('Deployment manifest is ignored when inputs are present.') - if inputs is None: - input_list = ['input1'] else: - input_list = [input_.strip() for input_ in inputs.strip().split(',')] + if deployment is not None: + output.info('Deployment manifest is ignored when inputs are present.') + if inputs is None: + input_list = ['input1'] + else: + input_list = [input_.strip() for input_ in inputs.strip().split(',')] - edgeManager.start_singlemodule(input_list, port) + edge_manager.start_singlemodule(input_list, port) - data = '--data \'{{"inputName": "{0}","data":"hello world"}}\''.format(input_list[0]) - url = 'http://localhost:{0}/api/v1/messages'.format(port) - curl_msg = ' curl --header "Content-Type: application/json" --request POST {0} {1}'.format(data, url) - output.info('IoT Edge Simulator has been started in single module mode.') - output.info('Please run `iotedgehubdev modulecred` to get credential to connect your module.') - output.info('And send message through:') - output.line() - output.echo(curl_msg, 'green') - output.line() - output.info( - 'Please refer to https://github.com/Azure/iot-edge-testing-utility/blob/master/swagger.json' - ' for detail schema') + data = '--data \'{{"inputName": "{0}","data":"hello world"}}\''.format(input_list[0]) + url = 'http://localhost:{0}/api/v1/messages'.format(port) + curl_msg = ' curl --header "Content-Type: application/json" --request POST {0} {1}'.format(data, url) + output.info('IoT Edge Simulator has been started in single module mode.') + output.info('Please run `iotedgehubdev modulecred` to get credential to connect your module.') + output.info('And send message through:') + output.line() + output.echo(curl_msg, 'green') + output.line() + output.info( + 'Please refer to https://github.com/Azure/iot-edge-testing-utility/blob/master/swagger.json' + ' for detail schema') @click.command(context_settings=CONTEXT_SETTINGS, @@ -259,13 +254,10 @@ def start(inputs, port, deployment, verbose, host): help='Docker daemon socket to connect to') @_with_telemetry def stop(host): - try: - if host is not None: - os.environ[DOCKER_HOST] = host - EdgeManager.stop() - output.info('IoT Edge Simulator has been stopped successfully.') - except Exception as e: - raise e + if host is not None: + os.environ[DOCKER_HOST] = host + EdgeManager.stop() + output.info('IoT Edge Simulator has been stopped successfully.') main.add_command(setup) diff --git a/iotedgehubdev/edgemanager.py b/iotedgehubdev/edgemanager.py index cf0183f..921b52f 100644 --- a/iotedgehubdev/edgemanager.py +++ b/iotedgehubdev/edgemanager.py @@ -42,14 +42,18 @@ class EdgeManager(object): def __init__(self, connection_str, gatewayhost, cert_path): connection_str_dict = Utils.parse_device_connection_str(connection_str) - self.hostname = connection_str_dict[EC.HOSTNAME_KEY] - self.device_id = connection_str_dict[EC.DEVICE_ID_KEY] - self.access_key = connection_str_dict[EC.ACCESS_KEY_KEY] - self.compose_file = None - self.gatewayhost = gatewayhost - self.device_uri = '{0}/devices/{1}'.format(self.hostname, self.device_id) - self.cert_path = cert_path - self.edge_cert = EdgeCert(self.cert_path, self.gatewayhost) + self._hostname = connection_str_dict[EC.HOSTNAME_KEY] + self._device_id = connection_str_dict[EC.DEVICE_ID_KEY] + self._access_key = connection_str_dict[EC.ACCESS_KEY_KEY] + self._compose_file = None + self._gatewayhost = gatewayhost + self._device_uri = '{0}/devices/{1}'.format(self._hostname, self._device_id) + self._cert_path = cert_path + self._edge_cert = EdgeCert(self._cert_path, self._gatewayhost) + + @property + def hostname(self): + return self._hostname @staticmethod def stop(edgedockerclient=None): @@ -117,7 +121,7 @@ class EdgeManager(object): edgedockerclient.copy_file_to_volume( EdgeManager.INPUT, EdgeManager.MODULE_VOLUME, self._device_cert(), module_mount, - self.edge_cert.get_cert_file_path(EC.EDGE_DEVICE_CA)) + self._edge_cert.get_cert_file_path(EC.EDGE_DEVICE_CA)) edgedockerclient.start(inputContainer.get('Id')) def config_solution(self, module_content, target, mount_base): @@ -152,7 +156,7 @@ class EdgeManager(object): network_info = { 'NW_NAME': EdgeManager.NW_NAME, - 'ALIASES': self.gatewayhost + 'ALIASES': self._gatewayhost } compose_project = ComposeProject(module_content) @@ -233,13 +237,13 @@ class EdgeManager(object): edgedockerclient.copy_file_to_volume( EdgeManager.CERT_HELPER, EdgeManager.HUB_VOLUME, EdgeManager._chain_cert(), - hub_mount, self.edge_cert.get_cert_file_path(EC.EDGE_CHAIN_CA)) + hub_mount, self._edge_cert.get_cert_file_path(EC.EDGE_CHAIN_CA)) edgedockerclient.copy_file_to_volume( EdgeManager.CERT_HELPER, EdgeManager.HUB_VOLUME, EdgeManager._hubserver_pfx(), - hub_mount, self.edge_cert.get_pfx_file_path(EC.EDGE_HUB_SERVER)) + hub_mount, self._edge_cert.get_pfx_file_path(EC.EDGE_HUB_SERVER)) edgedockerclient.copy_file_to_volume( EdgeManager.CERT_HELPER, EdgeManager.MODULE_VOLUME, self._device_cert(), - module_mount, self.edge_cert.get_cert_file_path(EC.EDGE_DEVICE_CA)) + module_mount, self._edge_cert.get_cert_file_path(EC.EDGE_DEVICE_CA)) def start(self, modulesDict, routes): return @@ -258,7 +262,7 @@ class EdgeManager(object): def outputModuleCred(self, names, islocal, output_file): connstrENV = 'EdgeHubConnectionString={0}'.format('|'.join([self.getOrAddModule(name, islocal) for name in names])) - deviceCAEnv = 'EdgeModuleCACertificateFile={0}'.format(self.edge_cert.get_cert_file_path(EC.EDGE_DEVICE_CA)) + deviceCAEnv = 'EdgeModuleCACertificateFile={0}'.format(self._edge_cert.get_cert_file_path(EC.EDGE_DEVICE_CA)) cred = [connstrENV, deviceCAEnv] if output_file is not None: @@ -272,7 +276,7 @@ class EdgeManager(object): def getModule(self, name, islocal): moduleUri = self._getModuleReqUri(name) - sas = Utils.get_iot_hub_sas_token(self.device_uri, self.access_key, None) + sas = Utils.get_iot_hub_sas_token(self._device_uri, self._access_key, None) res = requests.get( moduleUri, headers={ @@ -294,7 +298,7 @@ class EdgeManager(object): def updateModule(self, name, etag, islocal): moduleUri = self._getModuleReqUri(name) - sas = Utils.get_iot_hub_sas_token(self.device_uri, self.access_key, None) + sas = Utils.get_iot_hub_sas_token(self._device_uri, self._access_key, None) res = requests.put( moduleUri, headers={ @@ -304,7 +308,7 @@ class EdgeManager(object): }, data=json.dumps({ 'moduleId': name, - 'deviceId': self.device_id, + 'deviceId': self._device_id, 'authentication': { 'type': 'sas' } @@ -316,7 +320,7 @@ class EdgeManager(object): def addModule(self, name, islocal): moduleUri = self._getModuleReqUri(name) - sas = Utils.get_iot_hub_sas_token(self.device_uri, self.access_key, None) + sas = Utils.get_iot_hub_sas_token(self._device_uri, self._access_key, None) res = requests.put( moduleUri, headers={ @@ -325,7 +329,7 @@ class EdgeManager(object): }, data=json.dumps({ 'moduleId': name, - 'deviceId': self.device_id + 'deviceId': self._device_id }) ) if res.ok is not True: @@ -334,7 +338,7 @@ class EdgeManager(object): def _getModuleReqUri(self, name): return "https://{0}/devices/{1}/modules/{2}?api-version=2018-06-30".format( - self.hostname, self.device_id, name) + self._hostname, self._device_id, name) def _generateModuleConnectionStr(self, response, islocal): jsonObj = response.json() @@ -343,13 +347,13 @@ class EdgeManager(object): sasKey = jsonObj['authentication']['symmetricKey']['primaryKey'] hubTemplate = 'HostName={0};DeviceId={1};ModuleId={2};SharedAccessKey={3}' moduleTemplate = 'HostName={0};GatewayHostName={1};DeviceId={2};ModuleId={3};SharedAccessKey={4}' - gatewayhost = self.gatewayhost + gatewayhost = self._gatewayhost if (islocal): gatewayhost = 'localhost' if (moduleId == '$edgeHub'): - return hubTemplate.format(self.hostname, deviceId, moduleId, sasKey) + return hubTemplate.format(self._hostname, deviceId, moduleId, sasKey) else: - return moduleTemplate.format(self.hostname, gatewayhost, deviceId, moduleId, sasKey) + return moduleTemplate.format(self._hostname, gatewayhost, deviceId, moduleId, sasKey) def _generateRoutesEnvFromInputs(self, inputs): routes = [ @@ -368,7 +372,7 @@ class EdgeManager(object): def _start_edge_hub(self, edgedockerclient, edgeHubConnStr, routes, mount_base): edgedockerclient.pull(EdgeManager.EDGEHUB_IMG, None, None) - network_config = edgedockerclient.create_config_for_network(EdgeManager.NW_NAME, aliases=[self.gatewayhost]) + network_config = edgedockerclient.create_config_for_network(EdgeManager.NW_NAME, aliases=[self._gatewayhost]) hub_mount = EdgeManager.HUB_MOUNT.format(mount_base) hub_host_config = edgedockerclient.create_host_config( mounts=[docker.types.Mount(hub_mount, EdgeManager.HUB_VOLUME)], @@ -399,10 +403,10 @@ class EdgeManager(object): edgedockerclient.copy_file_to_volume( EdgeManager.EDGEHUB, EdgeManager.HUB_VOLUME, EdgeManager._chain_cert(), - hub_mount, self.edge_cert.get_cert_file_path(EC.EDGE_CHAIN_CA)) + hub_mount, self._edge_cert.get_cert_file_path(EC.EDGE_CHAIN_CA)) edgedockerclient.copy_file_to_volume( EdgeManager.EDGEHUB, EdgeManager.HUB_VOLUME, EdgeManager._hubserver_pfx(), - hub_mount, self.edge_cert.get_pfx_file_path(EC.EDGE_HUB_SERVER)) + hub_mount, self._edge_cert.get_pfx_file_path(EC.EDGE_HUB_SERVER)) edgedockerclient.start(hubContainer.get('Id')) def _obtain_mount_path(self, edgedockerclient): diff --git a/iotedgehubdev/utils.py b/iotedgehubdev/utils.py index 08a04ad..937b24e 100644 --- a/iotedgehubdev/utils.py +++ b/iotedgehubdev/utils.py @@ -147,14 +147,8 @@ class Utils(object): @staticmethod @suppress_all_exceptions() - def hash_connection_str_hostname(connection_str): + def hash_connection_str_hostname(hostname): """Hash connection string hostname to count distint IoT Hub number""" - try: - connection_str_dict = Utils.parse_device_connection_str(connection_str) - hostname = connection_str_dict[EC.HOSTNAME_KEY] - except Exception: - hostname = None - if not hostname: return ("", "")
Provide more friendly information when starting if the user has not setup From https://github.com/Azure/iotedgedev/pull/233#issuecomment-410917902 > @LazarusX - In start, can you automatically detect if setup hasn't been called and call it for the user? > > In start can you detect that it hasn't been build and let them know. The error wasn't enough to get me there. Thanks, Jon
Azure/iotedgehubdev
diff --git a/tests/test_utils.py b/tests/test_utils.py index f063596..69e1880 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -265,9 +265,9 @@ class TestUtilAPIs(unittest.TestCase): assert Utils.get_sha256_hash("foo") == "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae" def test_hash_connection_str_hostname(self): - connection_str = "HostName=ChaoyiTestIoT.azure-devices.net;DeviceId=edge-device;SharedAccessKey=foobarbazqux=" + hostname = "ChaoyiTestIoT.azure-devices.net" - assert Utils.hash_connection_str_hostname(connection_str) == ( + assert Utils.hash_connection_str_hostname(hostname) == ( '6b8fcfea09003d5f104771e83bd9ff54c592ec2277ec1815df91dd64d1633778', 'azure-devices.net') assert Utils.hash_connection_str_hostname("") == ("", "")
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 2, "test_score": 3 }, "num_modified_files": 4 }
0.6
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest", "pytest-cov", "flake8", "python-dotenv" ], "pre_install": [], "python": "3.6", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
applicationinsights==0.11.10 attrs==22.2.0 autopep8==2.0.4 backports.unittest-mock==1.5.1 bcrypt==4.0.1 cached-property==1.5.2 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 click==8.0.4 coverage==6.2 cryptography==40.0.2 decorator==5.1.1 distlib==0.3.9 distro==1.9.0 docker==5.0.3 docker-compose==1.29.2 dockerpty==0.4.1 docopt==0.6.2 filelock==3.4.1 flake8==2.5.5 idna==3.10 importlib-metadata==4.8.3 importlib-resources==5.4.0 iniconfig==1.1.1 -e git+https://github.com/Azure/iotedgehubdev.git@a6fb00a5109860f12bec2b386f368abb20f8d979#egg=iotedgehubdev jsonpath-rw==1.4.0 jsonschema==3.2.0 mccabe==0.4.0 packaging==21.3 paramiko==3.5.1 pep8==1.7.1 platformdirs==2.4.0 pluggy==1.0.0 ply==3.11 prompt-toolkit==3.0.36 py==1.11.0 pycodestyle==2.10.0 pycparser==2.21 pyflakes==1.0.0 PyNaCl==1.5.0 pyOpenSSL==23.2.0 pyparsing==3.1.4 pyrsistent==0.18.0 pytest==7.0.1 pytest-cov==4.0.0 python-dotenv==0.20.0 PyYAML==5.4.1 requests==2.27.1 rope==1.1.1 six==1.17.0 texttable==1.7.0 toml==0.10.2 tomli==1.2.3 tox==3.28.0 typing_extensions==4.1.1 urllib3==1.26.20 virtualenv==20.17.1 wcwidth==0.2.13 websocket-client==0.59.0 zipp==3.6.0
name: iotedgehubdev channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - applicationinsights==0.11.10 - attrs==22.2.0 - autopep8==2.0.4 - backports-unittest-mock==1.5.1 - bcrypt==4.0.1 - cached-property==1.5.2 - cffi==1.15.1 - charset-normalizer==2.0.12 - click==8.0.4 - coverage==6.2 - cryptography==40.0.2 - decorator==5.1.1 - distlib==0.3.9 - distro==1.9.0 - docker==5.0.3 - docker-compose==1.29.2 - dockerpty==0.4.1 - docopt==0.6.2 - filelock==3.4.1 - flake8==2.5.5 - idna==3.10 - importlib-metadata==4.8.3 - importlib-resources==5.4.0 - iniconfig==1.1.1 - jsonpath-rw==1.4.0 - jsonschema==3.2.0 - mccabe==0.4.0 - packaging==21.3 - paramiko==3.5.1 - pep8==1.7.1 - platformdirs==2.4.0 - pluggy==1.0.0 - ply==3.11 - prompt-toolkit==3.0.36 - py==1.11.0 - pycodestyle==2.10.0 - pycparser==2.21 - pyflakes==1.0.0 - pynacl==1.5.0 - pyopenssl==23.2.0 - pyparsing==3.1.4 - pyrsistent==0.18.0 - pytest==7.0.1 - pytest-cov==4.0.0 - python-dotenv==0.20.0 - pyyaml==5.4.1 - requests==2.27.1 - rope==1.1.1 - six==1.17.0 - texttable==1.7.0 - toml==0.10.2 - tomli==1.2.3 - tox==3.28.0 - typing-extensions==4.1.1 - urllib3==1.26.20 - virtualenv==20.17.1 - wcwidth==0.2.13 - websocket-client==0.59.0 - zipp==3.6.0 prefix: /opt/conda/envs/iotedgehubdev
[ "tests/test_utils.py::TestUtilAPIs::test_hash_connection_str_hostname" ]
[]
[ "tests/test_utils.py::TestUtilAPIs::test_check_if_dir_exists_returns_false_if_exists_returns_false", "tests/test_utils.py::TestUtilAPIs::test_check_if_dir_exists_returns_false_if_isdir_returns_false", "tests/test_utils.py::TestUtilAPIs::test_check_if_dir_exists_returns_false_path_is_none", "tests/test_utils.py::TestUtilAPIs::test_check_if_dir_exists_returns_true", "tests/test_utils.py::TestUtilAPIs::test_check_if_file_exists_returns_false_if_exists_returns_false", "tests/test_utils.py::TestUtilAPIs::test_check_if_file_exists_returns_false_if_isfile_returns_false", "tests/test_utils.py::TestUtilAPIs::test_check_if_file_exists_returns_false_path_is_none", "tests/test_utils.py::TestUtilAPIs::test_check_if_file_exists_returns_true", "tests/test_utils.py::TestUtilAPIs::test_delete_dir_execute_onerror_callback", "tests/test_utils.py::TestUtilAPIs::test_delete_dir_raises_oserror_when_rmtree_fails", "tests/test_utils.py::TestUtilAPIs::test_delete_dir_when_dir_does_not_exist", "tests/test_utils.py::TestUtilAPIs::test_delete_dir_when_dir_exists", "tests/test_utils.py::TestUtilAPIs::test_get_hostname_raises_ioerror_when_getfqdn_raises_ioerror", "tests/test_utils.py::TestUtilAPIs::test_get_hostname_valid", "tests/test_utils.py::TestUtilAPIs::test_get_sha256_hash", "tests/test_utils.py::TestUtilAPIs::test_mkdir_if_needed_raises_oserror_when_mkdir_fails", "tests/test_utils.py::TestUtilAPIs::test_mkdir_if_needed_when_dir_does_not_exist", "tests/test_utils.py::TestUtilAPIs::test_mkdir_if_needed_when_dir_exists" ]
[]
MIT License
null
Azure__msrest-for-python-12
cef4818746df436465cfc810723f79aa3a72da89
2017-01-31 01:03:14
cef4818746df436465cfc810723f79aa3a72da89
diff --git a/msrest/serialization.py b/msrest/serialization.py index ee81c21..6e2eb28 100644 --- a/msrest/serialization.py +++ b/msrest/serialization.py @@ -113,31 +113,38 @@ class Model(object): return base._subtype_map return {} + @classmethod + def _flatten_subtype(cls, key, objects): + if not '_subtype_map' in cls.__dict__: + return {} + result = dict(cls._subtype_map[key]) + for valuetype in cls._subtype_map[key].values(): + result.update(objects[valuetype]._flatten_subtype(key, objects)) + return result + @classmethod def _classify(cls, response, objects): """Check the class _subtype_map for any child classes. - We want to ignore any inheirited _subtype_maps. + We want to ignore any inherited _subtype_maps. + Remove the polymorphic key from the initial data. """ - try: - map = cls.__dict__.get('_subtype_map', {}) + for subtype_key in cls.__dict__.get('_subtype_map', {}).keys(): + subtype_value = None - for _type, _classes in map.items(): - classification = response.get(_type) - try: - return objects[_classes[classification]] - except KeyError: - pass + rest_api_response_key = _decode_attribute_map_key(cls._attribute_map[subtype_key]['key']) + subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None) + if subtype_value: + flatten_mapping_type = cls._flatten_subtype(subtype_key, objects) + return objects[flatten_mapping_type[subtype_value]] + return cls - for c in _classes: - try: - _cls = objects[_classes[c]] - return _cls._classify(response, objects) - except (KeyError, TypeError): - continue - raise TypeError("Object cannot be classified futher.") - except AttributeError: - raise TypeError("Object cannot be classified futher.") +def _decode_attribute_map_key(key): + """This decode a key in an _attribute_map to the actual key we want to look at + inside the received data. + :param str key: A key string from the generated code + """ + return key.replace('\\.', '.') def _convert_to_datatype(data, data_type, localtypes): if data is None: @@ -157,6 +164,7 @@ def _convert_to_datatype(data, data_type, localtypes): elif issubclass(data_obj, Enum): return data elif not isinstance(data, data_obj): + data_obj = data_obj._classify(data, localtypes) result = { key: _convert_to_datatype( data[key], @@ -195,7 +203,7 @@ class Serializer(object): "unique": lambda x, y: len(x) != len(set(x)), "multiple": lambda x, y: x % y != 0 } - flattten = re.compile(r"(?<!\\)\.") + flatten = re.compile(r"(?<!\\)\.") def __init__(self, classes=None): self.serialize_type = { @@ -241,14 +249,12 @@ class Serializer(object): try: attributes = target_obj._attribute_map - self._classify_data(target_obj, class_name, serialized) - for attr, map in attributes.items(): attr_name = attr debug_name = "{}.{}".format(class_name, attr_name) try: - keys = self.flattten.split(map['key']) - keys = [k.replace('\\.', '.') for k in keys] + keys = self.flatten.split(map['key']) + keys = [_decode_attribute_map_key(k) for k in keys] attr_type = map['type'] orig_attr = getattr(target_obj, attr) validation = target_obj._validation.get(attr_name, {}) @@ -278,18 +284,6 @@ class Serializer(object): else: return serialized - def _classify_data(self, target_obj, class_name, serialized): - """Check whether this object is a child and therefor needs to be - classified in the message. - """ - try: - for _type, _classes in target_obj._get_subtype_map().items(): - for ref, name in _classes.items(): - if name == class_name: - serialized[_type] = ref - except AttributeError: - pass # TargetObj has no _subtype_map so we don't need to classify. - def body(self, data, data_type, **kwargs): """Serialize data intended for a request body. @@ -752,9 +746,9 @@ class Deserializer(object): while '.' in key: dict_keys = self.flatten.split(key) if len(dict_keys) == 1: - key = dict_keys[0].replace('\\.', '.') + key = _decode_attribute_map_key(dict_keys[0]) break - working_key = dict_keys[0].replace('\\.', '.') + working_key = _decode_attribute_map_key(dict_keys[0]) working_data = working_data.get(working_key, data) key = '.'.join(dict_keys[1:]) @@ -786,8 +780,8 @@ class Deserializer(object): try: target = target._classify(data, self.dependencies) - except (TypeError, AttributeError): - pass # Target has no subclasses, so can't classify further. + except AttributeError: + pass # Target is not a Model, no classify return target, target.__class__.__name__ def _unpack_content(self, raw_data):
Support building instance from dict with polymorphic object Currently the SDKs can accept a dict instead of a model and transform it to the right model automatically. This is not available if there is at any level a polymorphic object. This should be possible looking at `_subtype_map` to identify the right instance type FYI @annatisch @vishrutshah
Azure/msrest-for-python
diff --git a/test/unittest_serialization.py b/test/unittest_serialization.py index 166a375..4e35926 100644 --- a/test/unittest_serialization.py +++ b/test/unittest_serialization.py @@ -562,51 +562,56 @@ class TestRuntimeSerialized(unittest.TestCase): _attribute_map = { "animals":{"key":"Animals", "type":"[Animal]"}, - } + } - def __init__(self): - self.animals = None + def __init__(self, animals=None): + self.animals = animals class Animal(Model): _attribute_map = { - "name":{"key":"Name", "type":"str"} - } + "name":{"key":"Name", "type":"str"}, + "d_type":{"key":"dType", "type":"str"} + } _subtype_map = { - 'dType': {"cat":"Cat", "dog":"Dog"} - } + 'd_type': {"cat":"Cat", "dog":"Dog"} + } - def __init__(self): - self.name = None + def __init__(self, name=None): + self.name = name class Dog(Animal): _attribute_map = { "name":{"key":"Name", "type":"str"}, - "likes_dog_food":{"key":"likesDogFood","type":"bool"} + "likes_dog_food":{"key":"likesDogFood","type":"bool"}, + "d_type":{"key":"dType", "type":"str"} } - def __init__(self): - self.likes_dog_food = None - super(Dog, self).__init__() + def __init__(self, name=None, likes_dog_food=None): + self.likes_dog_food = likes_dog_food + super(Dog, self).__init__(name) + self.d_type = 'dog' class Cat(Animal): _attribute_map = { "name":{"key":"Name", "type":"str"}, "likes_mice":{"key":"likesMice","type":"bool"}, - "dislikes":{"key":"dislikes","type":"Animal"} + "dislikes":{"key":"dislikes","type":"Animal"}, + "d_type":{"key":"dType", "type":"str"} } _subtype_map = { - "dType":{"siamese":"Siamese"} + "d_type":{"siamese":"Siamese"} } - def __init__(self): - self.likes_mice = None - self.dislikes = None - super(Cat, self).__init__() + def __init__(self, name=None, likes_mice=None, dislikes = None): + self.likes_mice = likes_mice + self.dislikes = dislikes + super(Cat, self).__init__(name) + self.d_type = 'cat' class Siamese(Cat): @@ -614,12 +619,14 @@ class TestRuntimeSerialized(unittest.TestCase): "name":{"key":"Name", "type":"str"}, "likes_mice":{"key":"likesMice","type":"bool"}, "dislikes":{"key":"dislikes","type":"Animal"}, - "color":{"key":"Color", "type":"str"} + "color":{"key":"Color", "type":"str"}, + "d_type":{"key":"dType", "type":"str"} } - def __init__(self): - self.color = None - super(Siamese, self).__init__() + def __init__(self, name=None, likes_mice=None, dislikes = None, color=None): + self.color = color + super(Siamese, self).__init__(name, likes_mice, dislikes) + self.d_type = 'siamese' message = { "Animals": [ @@ -669,6 +676,40 @@ class TestRuntimeSerialized(unittest.TestCase): serialized = self.s._serialize(zoo) self.assertEqual(serialized, message) + old_dependencies = self.s.dependencies + self.s.dependencies = { + 'Zoo': Zoo, + 'Animal': Animal, + 'Dog': Dog, + 'Cat': Cat, + 'Siamese': Siamese + } + + serialized = self.s.body({ + "animals": [{ + "dType": "dog", + "likes_dog_food": True, + "name": "Fido" + },{ + "dType": "cat", + "likes_mice": False, + "dislikes": { + "dType": "dog", + "likes_dog_food": True, + "name": "Angry" + }, + "name": "Felix" + },{ + "dType": "siamese", + "color": "grey", + "likes_mice": True, + "name": "Finch" + }] + }, "Zoo") + self.assertEqual(serialized, message) + + self.s.dependencies = old_dependencies + class TestRuntimeDeserialized(unittest.TestCase): @@ -1100,48 +1141,72 @@ class TestRuntimeDeserialized(unittest.TestCase): _attribute_map = { "animals":{"key":"Animals", "type":"[Animal]"}, - } + } + + def __init__(self, animals=None): + self.animals = animals class Animal(Model): _attribute_map = { - "name":{"key":"Name", "type":"str"} - } - - _test_attr = 123 + "name":{"key":"Name", "type":"str"}, + "d_type":{"key":"dType", "type":"str"} + } _subtype_map = { - 'dType': {"cat":"Cat", "dog":"Dog"} - } + 'd_type': {"cat":"Cat", "dog":"Dog"} + } + + def __init__(self, name=None): + self.name = name class Dog(Animal): _attribute_map = { "name":{"key":"Name", "type":"str"}, - "likes_dog_food":{"key":"likesDogFood","type":"bool"} + "likes_dog_food":{"key":"likesDogFood","type":"bool"}, + "d_type":{"key":"dType", "type":"str"} } + def __init__(self, name=None, likes_dog_food=None): + self.likes_dog_food = likes_dog_food + super(Dog, self).__init__(name) + self.d_type = 'dog' + class Cat(Animal): _attribute_map = { "name":{"key":"Name", "type":"str"}, "likes_mice":{"key":"likesMice","type":"bool"}, - "dislikes":{"key":"dislikes","type":"Animal"} + "dislikes":{"key":"dislikes","type":"Animal"}, + "d_type":{"key":"dType", "type":"str"} } _subtype_map = { - "dType":{"siamese":"Siamese"} + "d_type":{"siamese":"Siamese"} } + def __init__(self, name=None, likes_mice=None, dislikes = None): + self.likes_mice = likes_mice + self.dislikes = dislikes + super(Cat, self).__init__(name) + self.d_type = 'cat' + class Siamese(Cat): _attribute_map = { "name":{"key":"Name", "type":"str"}, "likes_mice":{"key":"likesMice","type":"bool"}, "dislikes":{"key":"dislikes","type":"Animal"}, - "color":{"key":"Color", "type":"str"} + "color":{"key":"Color", "type":"str"}, + "d_type":{"key":"dType", "type":"str"} } + def __init__(self, name=None, likes_mice=None, dislikes = None, color=None): + self.color = color + super(Siamese, self).__init__(name, likes_mice, dislikes) + self.d_type = 'siamese' + message = { "Animals": [ { @@ -1188,5 +1253,49 @@ class TestRuntimeDeserialized(unittest.TestCase): self.assertEqual(animals[2].color, message['Animals'][2]["Color"]) self.assertTrue(animals[2].likes_mice) + def test_polymorphic_deserialization_with_escape(self): + + class Animal(Model): + + _attribute_map = { + "name":{"key":"Name", "type":"str"}, + "d_type":{"key":"odata\\.type", "type":"str"} + } + + _subtype_map = { + 'd_type': {"dog":"Dog"} + } + + def __init__(self, name=None): + self.name = name + + class Dog(Animal): + + _attribute_map = { + "name":{"key":"Name", "type":"str"}, + "likes_dog_food":{"key":"likesDogFood","type":"bool"}, + "d_type":{"key":"odata\\.type", "type":"str"} + } + + def __init__(self, name=None, likes_dog_food=None): + self.likes_dog_food = likes_dog_food + super(Dog, self).__init__(name) + self.d_type = 'dog' + + message = { + "odata.type": "dog", + "likesDogFood": True, + "Name": "Fido" + } + + self.d.dependencies = { + 'Animal':Animal, 'Dog':Dog} + + animal = self.d('Animal', message) + + self.assertIsInstance(animal, Dog) + self.assertTrue(animal.likes_dog_food) + + if __name__ == '__main__': unittest.main()
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 3, "issue_text_score": 2, "test_score": 0 }, "num_modified_files": 1 }
unknown
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest", "coverage", "flake8" ], "pre_install": null, "python": "3.5", "reqs_path": [ "dev_requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs==22.2.0 certifi==2021.5.30 chardet==5.0.0 charset-normalizer==2.0.12 coverage==6.2 flake8==5.0.4 httpretty==1.1.4 idna==3.10 importlib-metadata==4.2.0 iniconfig==1.1.1 isodate==0.6.1 mccabe==0.7.0 -e git+https://github.com/Azure/msrest-for-python.git@cef4818746df436465cfc810723f79aa3a72da89#egg=msrest oauthlib==3.2.2 packaging==21.3 pluggy==1.0.0 py==1.11.0 pycodestyle==2.9.1 pyflakes==2.5.0 pyparsing==3.1.4 pytest==7.0.1 requests==2.27.1 requests-oauthlib==2.0.0 six==1.17.0 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.26.20 zipp==3.6.0
name: msrest-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - attrs==22.2.0 - chardet==5.0.0 - charset-normalizer==2.0.12 - coverage==6.2 - flake8==5.0.4 - httpretty==1.1.4 - idna==3.10 - importlib-metadata==4.2.0 - iniconfig==1.1.1 - isodate==0.6.1 - mccabe==0.7.0 - oauthlib==3.2.2 - packaging==21.3 - pluggy==1.0.0 - py==1.11.0 - pycodestyle==2.9.1 - pyflakes==2.5.0 - pyparsing==3.1.4 - pytest==7.0.1 - requests==2.27.1 - requests-oauthlib==2.0.0 - six==1.17.0 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.26.20 - zipp==3.6.0 prefix: /opt/conda/envs/msrest-for-python
[ "test/unittest_serialization.py::TestRuntimeSerialized::test_polymorphic_serialization", "test/unittest_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization", "test/unittest_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization_with_escape" ]
[]
[ "test/unittest_serialization.py::TestModelDeserialization::test_response", "test/unittest_serialization.py::TestRuntimeSerialized::test_attr_bool", "test/unittest_serialization.py::TestRuntimeSerialized::test_attr_dict_simple", "test/unittest_serialization.py::TestRuntimeSerialized::test_attr_int", "test/unittest_serialization.py::TestRuntimeSerialized::test_attr_list_complex", "test/unittest_serialization.py::TestRuntimeSerialized::test_attr_list_simple", "test/unittest_serialization.py::TestRuntimeSerialized::test_attr_none", "test/unittest_serialization.py::TestRuntimeSerialized::test_attr_sequence", "test/unittest_serialization.py::TestRuntimeSerialized::test_attr_str", "test/unittest_serialization.py::TestRuntimeSerialized::test_empty_list", "test/unittest_serialization.py::TestRuntimeSerialized::test_obj_serialize_none", "test/unittest_serialization.py::TestRuntimeSerialized::test_obj_with_malformed_map", "test/unittest_serialization.py::TestRuntimeSerialized::test_obj_with_mismatched_map", "test/unittest_serialization.py::TestRuntimeSerialized::test_obj_without_attr_map", "test/unittest_serialization.py::TestRuntimeSerialized::test_serialize_datetime", "test/unittest_serialization.py::TestRuntimeSerialized::test_serialize_empty_iter", "test/unittest_serialization.py::TestRuntimeSerialized::test_serialize_json_obj", "test/unittest_serialization.py::TestRuntimeSerialized::test_serialize_object", "test/unittest_serialization.py::TestRuntimeSerialized::test_serialize_primitive_types", "test/unittest_serialization.py::TestRuntimeDeserialized::test_attr_bool", "test/unittest_serialization.py::TestRuntimeDeserialized::test_attr_int", "test/unittest_serialization.py::TestRuntimeDeserialized::test_attr_list_complex", "test/unittest_serialization.py::TestRuntimeDeserialized::test_attr_list_in_list", "test/unittest_serialization.py::TestRuntimeDeserialized::test_attr_list_simple", "test/unittest_serialization.py::TestRuntimeDeserialized::test_attr_none", "test/unittest_serialization.py::TestRuntimeDeserialized::test_attr_str", "test/unittest_serialization.py::TestRuntimeDeserialized::test_deserialize_datetime", "test/unittest_serialization.py::TestRuntimeDeserialized::test_deserialize_object", "test/unittest_serialization.py::TestRuntimeDeserialized::test_non_obj_deserialization", "test/unittest_serialization.py::TestRuntimeDeserialized::test_obj_with_malformed_map", "test/unittest_serialization.py::TestRuntimeDeserialized::test_obj_with_no_attr" ]
[]
MIT License
null
Azure__msrest-for-python-167
c4086bfac4e45b11b6bd4267cff62aa302a51877
2019-07-05 19:26:19
c16e5218fe99742c5bf93d73ce0bb71c9b1c0953
codecov-io: # [Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/167?src=pr&el=h1) Report > Merging [#167](https://codecov.io/gh/Azure/msrest-for-python/pull/167?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/msrest-for-python/commit/c4086bfac4e45b11b6bd4267cff62aa302a51877?src=pr&el=desc) will **increase** coverage by `<.01%`. > The diff coverage is `100%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/msrest-for-python/pull/167/graphs/tree.svg?width=650&token=Lny6ZO1MUF&height=150&src=pr)](https://codecov.io/gh/Azure/msrest-for-python/pull/167?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #167 +/- ## ========================================== + Coverage 87.84% 87.84% +<.01% ========================================== Files 25 25 Lines 2583 2584 +1 ========================================== + Hits 2269 2270 +1 Misses 314 314 ``` | [Impacted Files](https://codecov.io/gh/Azure/msrest-for-python/pull/167?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [msrest/pipeline/universal.py](https://codecov.io/gh/Azure/msrest-for-python/pull/167/diff?src=pr&el=tree#diff-bXNyZXN0L3BpcGVsaW5lL3VuaXZlcnNhbC5weQ==) | `95.09% <100%> (+0.04%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/167?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/167?src=pr&el=footer). Last update [c4086bf...852f412](https://codecov.io/gh/Azure/msrest-for-python/pull/167?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/msrest/pipeline/universal.py b/msrest/pipeline/universal.py index f124ea7..b8dc40c 100644 --- a/msrest/pipeline/universal.py +++ b/msrest/pipeline/universal.py @@ -32,6 +32,7 @@ import os import xml.etree.ElementTree as ET import platform import codecs +import re from typing import Mapping, Any, Optional, AnyStr, Union, IO, cast, TYPE_CHECKING # pylint: disable=unused-import @@ -129,10 +130,9 @@ class HTTPLogger(SansIOHTTPPolicy): class RawDeserializer(SansIOHTTPPolicy): - JSON_MIMETYPES = [ - 'application/json', - 'text/json' # Because we're open minded people... - ] + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r'^(application|text)/([a-z+.]+\+)?json$') + # Name used in context CONTEXT_NAME = "deserialized_data" @@ -165,7 +165,7 @@ class RawDeserializer(SansIOHTTPPolicy): if content_type is None: return data - if content_type in cls.JSON_MIMETYPES: + if cls.JSON_REGEXP.match(content_type): try: return json.loads(data_as_str) except ValueError as err:
Response content type json parser Currently the deserializer only supports a list of content type values like "application/json" and "text/json". Based on HTTP spec, "application/<randomtext>+json" is also json. So we should have a type parser to accept this syntax.
Azure/msrest-for-python
diff --git a/tests/test_universal_pipeline.py b/tests/test_universal_pipeline.py index 2568e34..cd92ca7 100644 --- a/tests/test_universal_pipeline.py +++ b/tests/test_universal_pipeline.py @@ -151,6 +151,12 @@ def test_raw_deserializer(): result = response.context["deserialized_data"] assert result["success"] is True + # Simple JSON with complex content_type + response = build_response(b'{"success": true}', content_type="application/vnd.microsoft.appconfig.kv+json") + raw_deserializer.on_response(None, response, stream=False) + result = response.context["deserialized_data"] + assert result["success"] is True + # JSON with UTF-8 BOM response = build_response(b'\xef\xbb\xbf{"success": true}', content_type="application/json; charset=utf-8") raw_deserializer.on_response(None, response, stream=False)
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_short_problem_statement" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 2, "test_score": 0 }, "num_modified_files": 1 }
0.6
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[async]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest", "pytest-cov", "pytest-asyncio", "httpretty", "mock", "futures", "mypy", "pylint", "trio" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libunwind8-dev" ], "python": "3.6", "reqs_path": [ "requirements/base.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
aiodns==3.2.0 aiohttp==3.8.6 aiosignal==1.2.0 astroid==2.11.7 async-generator==1.10 async-timeout==4.0.2 asynctest==0.13.0 attrs==22.2.0 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 contextvars==2.4 coverage==6.2 dill==0.3.4 frozenlist==1.2.0 futures==2.2.0 httpretty==1.1.4 idna==3.10 idna-ssl==1.1.0 immutables==0.19 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.6.1 isort==5.10.1 lazy-object-proxy==1.7.1 mccabe==0.7.0 mock==5.2.0 -e git+https://github.com/Azure/msrest-for-python.git@c4086bfac4e45b11b6bd4267cff62aa302a51877#egg=msrest multidict==5.2.0 mypy==0.971 mypy-extensions==1.0.0 oauthlib==3.2.2 outcome==1.1.0 packaging==21.3 platformdirs==2.4.0 pluggy==1.0.0 py==1.11.0 pycares==4.3.0 pycparser==2.21 pylint==2.13.9 pyparsing==3.1.4 pytest==7.0.1 pytest-asyncio==0.16.0 pytest-cov==4.0.0 requests==2.27.1 requests-oauthlib==2.0.0 six==1.17.0 sniffio==1.2.0 sortedcontainers==2.4.0 tomli==1.2.3 trio==0.19.0 typed-ast==1.5.5 typing_extensions==4.1.1 urllib3==1.26.20 wrapt==1.16.0 yarl==1.7.2 zipp==3.6.0
name: msrest-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - aiodns==3.2.0 - aiohttp==3.8.6 - aiosignal==1.2.0 - astroid==2.11.7 - async-generator==1.10 - async-timeout==4.0.2 - asynctest==0.13.0 - attrs==22.2.0 - cffi==1.15.1 - charset-normalizer==2.0.12 - contextvars==2.4 - coverage==6.2 - dill==0.3.4 - frozenlist==1.2.0 - futures==2.2.0 - httpretty==1.1.4 - idna==3.10 - idna-ssl==1.1.0 - immutables==0.19 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.6.1 - isort==5.10.1 - lazy-object-proxy==1.7.1 - mccabe==0.7.0 - mock==5.2.0 - multidict==5.2.0 - mypy==0.971 - mypy-extensions==1.0.0 - oauthlib==3.2.2 - outcome==1.1.0 - packaging==21.3 - platformdirs==2.4.0 - pluggy==1.0.0 - py==1.11.0 - pycares==4.3.0 - pycparser==2.21 - pylint==2.13.9 - pyparsing==3.1.4 - pytest==7.0.1 - pytest-asyncio==0.16.0 - pytest-cov==4.0.0 - requests==2.27.1 - requests-oauthlib==2.0.0 - six==1.17.0 - sniffio==1.2.0 - sortedcontainers==2.4.0 - tomli==1.2.3 - trio==0.19.0 - typed-ast==1.5.5 - typing-extensions==4.1.1 - urllib3==1.26.20 - wrapt==1.16.0 - yarl==1.7.2 - zipp==3.6.0 prefix: /opt/conda/envs/msrest-for-python
[ "tests/test_universal_pipeline.py::test_raw_deserializer" ]
[]
[ "tests/test_universal_pipeline.py::test_user_agent", "tests/test_universal_pipeline.py::test_no_log" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_msrest-for-python-167
Azure__msrest-for-python-188
4a0a44ae6d1a0d8a196a7809d54f2a52c2c27479
2019-12-26 21:51:25
c16e5218fe99742c5bf93d73ce0bb71c9b1c0953
codecov-io: # [Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/188?src=pr&el=h1) Report > Merging [#188](https://codecov.io/gh/Azure/msrest-for-python/pull/188?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/msrest-for-python/commit/4a0a44ae6d1a0d8a196a7809d54f2a52c2c27479?src=pr&el=desc) will **increase** coverage by `0.06%`. > The diff coverage is `100%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/msrest-for-python/pull/188/graphs/tree.svg?width=650&token=Lny6ZO1MUF&height=150&src=pr)](https://codecov.io/gh/Azure/msrest-for-python/pull/188?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #188 +/- ## ========================================== + Coverage 87.89% 87.95% +0.06% ========================================== Files 25 25 Lines 2593 2598 +5 ========================================== + Hits 2279 2285 +6 + Misses 314 313 -1 ``` | [Impacted Files](https://codecov.io/gh/Azure/msrest-for-python/pull/188?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [msrest/exceptions.py](https://codecov.io/gh/Azure/msrest-for-python/pull/188/diff?src=pr&el=tree#diff-bXNyZXN0L2V4Y2VwdGlvbnMucHk=) | `98.73% <100%> (+0.08%)` | :arrow_up: | | [msrest/serialization.py](https://codecov.io/gh/Azure/msrest-for-python/pull/188/diff?src=pr&el=tree#diff-bXNyZXN0L3NlcmlhbGl6YXRpb24ucHk=) | `91.22% <0%> (+0.1%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/188?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/188?src=pr&el=footer). Last update [4a0a44a...3832c06](https://codecov.io/gh/Azure/msrest-for-python/pull/188?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/msrest/exceptions.py b/msrest/exceptions.py index 31bedf0..dcd14d2 100644 --- a/msrest/exceptions.py +++ b/msrest/exceptions.py @@ -107,6 +107,13 @@ class ValidationError(ClientException): "type": "must be of type {!r}" } + @staticmethod + def _format_message(rule, reason, value): + if rule == "type" and value.startswith(r"{"): + internal_type = value.strip(r"{}") + value = "dict[str, {}]".format(internal_type) + return reason.format(value) + def __init__(self, rule, target, value, *args, **kwargs): # type: (str, str, str, str, str) -> None self.rule = rule @@ -114,7 +121,7 @@ class ValidationError(ClientException): message = "Parameter {!r} ".format(target) reason = self._messages.get( rule, "failed to meet validation requirement.") - message += reason.format(value) + message += self._format_message(rule, reason, value) super(ValidationError, self).__init__(message, *args, **kwargs)
Improve msrest exception message msrest.exceptions : Parameter 'tags' must be of type '{str}'
Azure/msrest-for-python
diff --git a/tests/test_serialization.py b/tests/test_serialization.py index 399d963..00d253c 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -709,6 +709,10 @@ class TestRuntimeSerialized(unittest.TestCase): with self.assertRaises(SerializationError): self.s._serialize(test_obj) + with pytest.raises(ValidationError) as err: + test_obj.validate() + assert "Parameter 'attr_e' must be of type 'dict[str, float]'" in str(err.value) + test_obj.attr_e = {"value": "NotAFloat"} with self.assertRaises(SerializationError): @@ -1290,7 +1294,7 @@ class TestRuntimeSerialized(unittest.TestCase): long_type = long except NameError: long_type = int - + class TestModel(Model): _attribute_map = {'data': {'key': 'data', 'type': 'object'}}
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_short_problem_statement" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 2, "test_score": 2 }, "num_modified_files": 1 }
0.6
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.9", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
certifi==2025.1.31 charset-normalizer==3.4.1 exceptiongroup==1.2.2 idna==3.10 iniconfig==2.1.0 isodate==0.7.2 -e git+https://github.com/Azure/msrest-for-python.git@4a0a44ae6d1a0d8a196a7809d54f2a52c2c27479#egg=msrest oauthlib==3.2.2 packaging==24.2 pluggy==1.5.0 pytest==8.3.5 requests==2.32.3 requests-oauthlib==2.0.0 tomli==2.2.1 urllib3==2.3.0
name: msrest-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tzdata=2025a=h04d1e81_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - certifi==2025.1.31 - charset-normalizer==3.4.1 - exceptiongroup==1.2.2 - idna==3.10 - iniconfig==2.1.0 - isodate==0.7.2 - oauthlib==3.2.2 - packaging==24.2 - pluggy==1.5.0 - pytest==8.3.5 - requests==2.32.3 - requests-oauthlib==2.0.0 - tomli==2.2.1 - urllib3==2.3.0 prefix: /opt/conda/envs/msrest-for-python
[ "tests/test_serialization.py::TestRuntimeSerialized::test_attr_dict_simple" ]
[]
[ "tests/test_serialization.py::TestModelDeserialization::test_empty_enum_logs", "tests/test_serialization.py::TestModelDeserialization::test_model_kwargs", "tests/test_serialization.py::TestModelDeserialization::test_model_kwargs_logs", "tests/test_serialization.py::TestModelDeserialization::test_response", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_declared", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_manual", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_no_send", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_with_auto_model", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_duration", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_enum", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_int", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_none", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_sequence", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_str", "tests/test_serialization.py::TestRuntimeSerialized::test_empty_list", "tests/test_serialization.py::TestRuntimeSerialized::test_json_with_xml_map", "tests/test_serialization.py::TestRuntimeSerialized::test_key_type", "tests/test_serialization.py::TestRuntimeSerialized::test_long_as_type_object", "tests/test_serialization.py::TestRuntimeSerialized::test_model_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_serialize_none", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_mismatched_map", "tests/test_serialization.py::TestRuntimeSerialized::test_polymorphic_serialization", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_datetime", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_direct_model", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_empty_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_from_dict_datetime", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_int_as_iter_with_div", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_json_obj", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_object", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_primitive_types", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_str_as_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_validation_flag", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_declared", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_flattening", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_not_configured", "tests/test_serialization.py::TestRuntimeDeserialized::test_array_deserialize", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_enum", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_int", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_in_list", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_none", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_str", "tests/test_serialization.py::TestRuntimeDeserialized::test_basic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_cls_method_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_date", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_datetime", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_object", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_storage", "tests/test_serialization.py::TestRuntimeDeserialized::test_invalid_json", "tests/test_serialization.py::TestRuntimeDeserialized::test_long_as_type_object", "tests/test_serialization.py::TestRuntimeDeserialized::test_non_obj_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_no_attr", "tests/test_serialization.py::TestRuntimeDeserialized::test_personalize_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization_with_escape", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_missing_info", "tests/test_serialization.py::TestRuntimeDeserialized::test_robust_deserialization", "tests/test_serialization.py::TestModelInstanceEquality::test_model_instance_equality" ]
[]
MIT License
null
Azure__msrest-for-python-189
c2249d459e8af8912c5da4cd728c8201066b9304
2019-12-26 22:49:23
c16e5218fe99742c5bf93d73ce0bb71c9b1c0953
codecov-io: # [Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/189?src=pr&el=h1) Report > Merging [#189](https://codecov.io/gh/Azure/msrest-for-python/pull/189?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/msrest-for-python/commit/c2249d459e8af8912c5da4cd728c8201066b9304?src=pr&el=desc) will **increase** coverage by `0.02%`. > The diff coverage is `100%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/msrest-for-python/pull/189/graphs/tree.svg?width=650&token=Lny6ZO1MUF&height=150&src=pr)](https://codecov.io/gh/Azure/msrest-for-python/pull/189?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #189 +/- ## ========================================== + Coverage 87.95% 87.97% +0.02% ========================================== Files 25 25 Lines 2598 2603 +5 ========================================== + Hits 2285 2290 +5 Misses 313 313 ``` | [Impacted Files](https://codecov.io/gh/Azure/msrest-for-python/pull/189?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [msrest/serialization.py](https://codecov.io/gh/Azure/msrest-for-python/pull/189/diff?src=pr&el=tree#diff-bXNyZXN0L3NlcmlhbGl6YXRpb24ucHk=) | `91.27% <100%> (+0.04%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/189?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/189?src=pr&el=footer). Last update [c2249d4...45f2597](https://codecov.io/gh/Azure/msrest-for-python/pull/189?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/msrest/serialization.py b/msrest/serialization.py index 1da64ae..7abaf70 100644 --- a/msrest/serialization.py +++ b/msrest/serialization.py @@ -217,6 +217,9 @@ class Model(object): try: debug_name = "{}.{}".format(self.__class__.__name__, attr_name) + # https://github.com/Azure/msrest-for-python/issues/85 + if value is not None and attr_type in Serializer.basic_types.values(): + value = Serializer.serialize_basic(value, attr_type) Serializer.validate(value, debug_name, **self._validation.get(attr_name, {})) except ValidationError as validation_error: validation_result.append(validation_error) @@ -578,6 +581,14 @@ class Serializer(object): raise errors[0] return self._serialize(data, data_type, **kwargs) + def _http_component_validation(self, data, data_type, name, **kwargs): + if self.client_side_validation: + # https://github.com/Azure/msrest-for-python/issues/85 + if data is not None and data_type in self.basic_types.values(): + data = self.serialize_basic(data, data_type, **kwargs) + data = self.validate(data, name, required=True, **kwargs) + return data + def url(self, name, data, data_type, **kwargs): """Serialize data intended for a URL path. @@ -587,8 +598,7 @@ class Serializer(object): :raises: TypeError if serialization fails. :raises: ValueError if data is None """ - if self.client_side_validation: - data = self.validate(data, name, required=True, **kwargs) + data = self._http_component_validation(data, data_type, name, **kwargs) try: output = self.serialize_data(data, data_type, **kwargs) if data_type == 'bool': @@ -612,8 +622,7 @@ class Serializer(object): :raises: TypeError if serialization fails. :raises: ValueError if data is None """ - if self.client_side_validation: - data = self.validate(data, name, required=True, **kwargs) + data = self._http_component_validation(data, data_type, name, **kwargs) try: if data_type in ['[str]']: data = ["" if d is None else d for d in data] @@ -639,8 +648,7 @@ class Serializer(object): :raises: TypeError if serialization fails. :raises: ValueError if data is None """ - if self.client_side_validation: - data = self.validate(data, name, required=True, **kwargs) + data = self._http_component_validation(data, data_type, name, **kwargs) try: if data_type in ['[str]']: data = ["" if d is None else d for d in data] @@ -713,14 +721,16 @@ class Serializer(object): else: return self._serialize(data, **kwargs) - def _get_custom_serializers(self, data_type, **kwargs): + @classmethod + def _get_custom_serializers(cls, data_type, **kwargs): custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) if custom_serializer: return custom_serializer if kwargs.get("is_xml", False): - return self._xml_basic_types_serializers.get(data_type) + return cls._xml_basic_types_serializers.get(data_type) - def serialize_basic(self, data, data_type, **kwargs): + @classmethod + def serialize_basic(cls, data, data_type, **kwargs): """Serialize basic builting data type. Serializes objects to str, int, float or bool. @@ -731,14 +741,15 @@ class Serializer(object): :param data: Object to be serialized. :param str data_type: Type of object in the iterable. """ - custom_serializer = self._get_custom_serializers(data_type, **kwargs) + custom_serializer = cls._get_custom_serializers(data_type, **kwargs) if custom_serializer: return custom_serializer(data) if data_type == 'str': - return self.serialize_unicode(data) + return cls.serialize_unicode(data) return eval(data_type)(data) - def serialize_unicode(self, data): + @classmethod + def serialize_unicode(cls, data): """Special handling for serializing unicode strings in Py2. Encode to UTF-8 if unicode, otherwise handle as a str.
Validation failed if string is valid integer, but minimum/maximum is used. Example from @derekbekoe ```python >>> ExpressRouteCircuitPeering(peer_asn='10002').validate() [ValidationError("Parameter 'ExpressRouteCircuitPeering.peer_asn' failed to meet validation requirement.",)] ``` I see no reason to refuse that, and should take a look
Azure/msrest-for-python
diff --git a/tests/test_serialization.py b/tests/test_serialization.py index 00d253c..46df7f9 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -245,6 +245,32 @@ class TestRuntimeSerialized(unittest.TestCase): self.s = Serializer({'TestObj': self.TestObj}) return super(TestRuntimeSerialized, self).setUp() + def test_validation_type(self): + # https://github.com/Azure/msrest-for-python/issues/85 + s = Serializer() + + s.query("filter", 186, "int", maximum=666) + s.query("filter", "186", "int", maximum=666) + + class TestValidationObj(Model): + + _attribute_map = { + 'attr_a': {'key':'id', 'type':'int'}, + } + _validation = { + 'attr_a': {'maximum': 4294967295, 'minimum': 1}, + } + + + test_obj = TestValidationObj() + test_obj.attr_a = 186 + errors_found = test_obj.validate() + assert not errors_found + + test_obj.attr_a = '186' + errors_found = test_obj.validate() + assert not errors_found + def test_validation_flag(self): s = Serializer() s.client_side_validation = True
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 1, "test_score": 0 }, "num_modified_files": 1 }
0.6
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.9", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
certifi==2025.1.31 charset-normalizer==3.4.1 exceptiongroup==1.2.2 idna==3.10 iniconfig==2.1.0 isodate==0.7.2 -e git+https://github.com/Azure/msrest-for-python.git@c2249d459e8af8912c5da4cd728c8201066b9304#egg=msrest oauthlib==3.2.2 packaging==24.2 pluggy==1.5.0 pytest==8.3.5 requests==2.32.3 requests-oauthlib==2.0.0 tomli==2.2.1 urllib3==2.3.0
name: msrest-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tzdata=2025a=h04d1e81_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - certifi==2025.1.31 - charset-normalizer==3.4.1 - exceptiongroup==1.2.2 - idna==3.10 - iniconfig==2.1.0 - isodate==0.7.2 - oauthlib==3.2.2 - packaging==24.2 - pluggy==1.5.0 - pytest==8.3.5 - requests==2.32.3 - requests-oauthlib==2.0.0 - tomli==2.2.1 - urllib3==2.3.0 prefix: /opt/conda/envs/msrest-for-python
[ "tests/test_serialization.py::TestRuntimeSerialized::test_validation_type" ]
[]
[ "tests/test_serialization.py::TestModelDeserialization::test_empty_enum_logs", "tests/test_serialization.py::TestModelDeserialization::test_model_kwargs", "tests/test_serialization.py::TestModelDeserialization::test_model_kwargs_logs", "tests/test_serialization.py::TestModelDeserialization::test_response", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_declared", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_manual", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_no_send", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_with_auto_model", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_dict_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_duration", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_enum", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_int", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_none", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_sequence", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_str", "tests/test_serialization.py::TestRuntimeSerialized::test_empty_list", "tests/test_serialization.py::TestRuntimeSerialized::test_json_with_xml_map", "tests/test_serialization.py::TestRuntimeSerialized::test_key_type", "tests/test_serialization.py::TestRuntimeSerialized::test_long_as_type_object", "tests/test_serialization.py::TestRuntimeSerialized::test_model_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_serialize_none", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_mismatched_map", "tests/test_serialization.py::TestRuntimeSerialized::test_polymorphic_serialization", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_datetime", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_direct_model", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_empty_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_from_dict_datetime", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_int_as_iter_with_div", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_json_obj", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_object", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_primitive_types", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_str_as_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_validation_flag", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_declared", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_flattening", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_not_configured", "tests/test_serialization.py::TestRuntimeDeserialized::test_array_deserialize", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_enum", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_int", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_in_list", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_none", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_str", "tests/test_serialization.py::TestRuntimeDeserialized::test_basic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_cls_method_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_date", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_datetime", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_object", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_storage", "tests/test_serialization.py::TestRuntimeDeserialized::test_invalid_json", "tests/test_serialization.py::TestRuntimeDeserialized::test_long_as_type_object", "tests/test_serialization.py::TestRuntimeDeserialized::test_non_obj_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_no_attr", "tests/test_serialization.py::TestRuntimeDeserialized::test_personalize_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization_with_escape", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_missing_info", "tests/test_serialization.py::TestRuntimeDeserialized::test_robust_deserialization", "tests/test_serialization.py::TestModelInstanceEquality::test_model_instance_equality" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_msrest-for-python-189
Azure__msrest-for-python-198
df4cea0e45976951700e21d5c192da372754443c
2020-04-07 17:03:45
c16e5218fe99742c5bf93d73ce0bb71c9b1c0953
codecov-io: # [Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/198?src=pr&el=h1) Report > Merging [#198](https://codecov.io/gh/Azure/msrest-for-python/pull/198?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/msrest-for-python/commit/df4cea0e45976951700e21d5c192da372754443c&el=desc) will **decrease** coverage by `0.29%`. > The diff coverage is `100.00%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/msrest-for-python/pull/198/graphs/tree.svg?width=650&height=150&src=pr&token=Lny6ZO1MUF)](https://codecov.io/gh/Azure/msrest-for-python/pull/198?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #198 +/- ## ========================================== - Coverage 87.64% 87.34% -0.30% ========================================== Files 25 25 Lines 2638 2640 +2 ========================================== - Hits 2312 2306 -6 - Misses 326 334 +8 ``` | [Impacted Files](https://codecov.io/gh/Azure/msrest-for-python/pull/198?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [msrest/serialization.py](https://codecov.io/gh/Azure/msrest-for-python/pull/198/diff?src=pr&el=tree#diff-bXNyZXN0L3NlcmlhbGl6YXRpb24ucHk=) | `91.06% <100.00%> (-0.19%)` | :arrow_down: | | [msrest/async\_client.py](https://codecov.io/gh/Azure/msrest-for-python/pull/198/diff?src=pr&el=tree#diff-bXNyZXN0L2FzeW5jX2NsaWVudC5weQ==) | `77.27% <0.00%> (-6.82%)` | :arrow_down: | | [msrest/exceptions.py](https://codecov.io/gh/Azure/msrest-for-python/pull/198/diff?src=pr&el=tree#diff-bXNyZXN0L2V4Y2VwdGlvbnMucHk=) | `97.46% <0.00%> (-1.27%)` | :arrow_down: | | [msrest/pipeline/universal.py](https://codecov.io/gh/Azure/msrest-for-python/pull/198/diff?src=pr&el=tree#diff-bXNyZXN0L3BpcGVsaW5lL3VuaXZlcnNhbC5weQ==) | `94.11% <0.00%> (-0.99%)` | :arrow_down: | | [msrest/universal\_http/requests.py](https://codecov.io/gh/Azure/msrest-for-python/pull/198/diff?src=pr&el=tree#diff-bXNyZXN0L3VuaXZlcnNhbF9odHRwL3JlcXVlc3RzLnB5) | `84.65% <0.00%> (-0.53%)` | :arrow_down: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/198?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/198?src=pr&el=footer). Last update [df4cea0...fe9b944](https://codecov.io/gh/Azure/msrest-for-python/pull/198?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/msrest/serialization.py b/msrest/serialization.py index 27fb7e9..59187e1 100644 --- a/msrest/serialization.py +++ b/msrest/serialization.py @@ -1108,6 +1108,11 @@ def rest_key_extractor(attr, attr_desc, data): break working_key = _decode_attribute_map_key(dict_keys[0]) working_data = working_data.get(working_key, data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + # https://github.com/Azure/msrest-for-python/issues/197 + return None key = '.'.join(dict_keys[1:]) return working_data.get(key) @@ -1123,6 +1128,11 @@ def rest_key_case_insensitive_extractor(attr, attr_desc, data): break working_key = _decode_attribute_map_key(dict_keys[0]) working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + # https://github.com/Azure/msrest-for-python/issues/197 + return None key = '.'.join(dict_keys[1:]) if working_data:
Error when serializing flattened properties with null value as the container object i found the msrest will report error when serializing flattened properties with null value as the container object, could you help to check? I tried to look at the msrest code, and seems the situation when 'data' is null is not handled in the last screenshot below. thanks. ![image](https://user-images.githubusercontent.com/6038235/78621314-e6cf1980-78b4-11ea-9316-58bee4dbbb38.png) ![image](https://user-images.githubusercontent.com/6038235/78621324-ef275480-78b4-11ea-94b3-29b6350b7218.png) ![image](https://user-images.githubusercontent.com/6038235/78621335-f64e6280-78b4-11ea-972b-b062f01efeab.png)
Azure/msrest-for-python
diff --git a/tests/test_serialization.py b/tests/test_serialization.py index 4b3f537..12a0042 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -1527,6 +1527,46 @@ class TestRuntimeDeserialized(unittest.TestCase): obj = TestObj.from_dict({'name': 'ab'}) self.assertEqual('ab', obj.name) + def test_deserialize_flattening(self): + # https://github.com/Azure/msrest-for-python/issues/197 + + json_body = { + "properties" : { + "properties": None + } + } + + class ComputeResource(Model): + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'VirtualMachine'}, + } + + def __init__(self, properties=None, **kwargs): + self.properties = properties + + class VirtualMachine(Model): + + _attribute_map = { + 'virtual_machine_size': {'key': 'properties.virtualMachineSize', 'type': 'str'}, + 'ssh_port': {'key': 'properties.sshPort', 'type': 'int'}, + 'address': {'key': 'properties.address', 'type': 'str'}, + 'administrator_account': {'key': 'properties.administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + } + + def __init__(self, **kwargs): + super(VirtualMachine, self).__init__(**kwargs) + self.virtual_machine_size = kwargs.get('virtual_machine_size', None) + self.ssh_port = kwargs.get('ssh_port', None) + self.address = kwargs.get('address', None) + self.administrator_account = kwargs.get('administrator_account', None) + + d = Deserializer({ + 'ComputeResource': ComputeResource, + 'VirtualMachine': VirtualMachine, + }) + response = d(ComputeResource, json.dumps(json_body), 'application/json') + def test_deserialize_storage(self): StorageAccount = storage_models.StorageAccount
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_media" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 0, "test_score": 2 }, "num_modified_files": 1 }
0.6
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest", "pytest-cov", "pytest-asyncio" ], "pre_install": [ "apt-get update", "apt-get install -y libunwind8-dev" ], "python": "3.9", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
certifi==2025.1.31 charset-normalizer==3.4.1 coverage==7.8.0 exceptiongroup==1.2.2 idna==3.10 iniconfig==2.1.0 isodate==0.7.2 -e git+https://github.com/Azure/msrest-for-python.git@df4cea0e45976951700e21d5c192da372754443c#egg=msrest oauthlib==3.2.2 packaging==24.2 pluggy==1.5.0 pytest==8.3.5 pytest-asyncio==0.26.0 pytest-cov==6.0.0 requests==2.32.3 requests-oauthlib==2.0.0 tomli==2.2.1 typing_extensions==4.13.0 urllib3==2.3.0
name: msrest-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tzdata=2025a=h04d1e81_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - certifi==2025.1.31 - charset-normalizer==3.4.1 - coverage==7.8.0 - exceptiongroup==1.2.2 - idna==3.10 - iniconfig==2.1.0 - isodate==0.7.2 - oauthlib==3.2.2 - packaging==24.2 - pluggy==1.5.0 - pytest==8.3.5 - pytest-asyncio==0.26.0 - pytest-cov==6.0.0 - requests==2.32.3 - requests-oauthlib==2.0.0 - tomli==2.2.1 - typing-extensions==4.13.0 - urllib3==2.3.0 prefix: /opt/conda/envs/msrest-for-python
[ "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_flattening" ]
[]
[ "tests/test_serialization.py::TestModelDeserialization::test_empty_enum_logs", "tests/test_serialization.py::TestModelDeserialization::test_model_kwargs", "tests/test_serialization.py::TestModelDeserialization::test_model_kwargs_logs", "tests/test_serialization.py::TestModelDeserialization::test_response", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_declared", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_manual", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_no_send", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_with_auto_model", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_dict_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_duration", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_enum", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_int", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_none", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_sequence", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_str", "tests/test_serialization.py::TestRuntimeSerialized::test_empty_list", "tests/test_serialization.py::TestRuntimeSerialized::test_json_with_xml_map", "tests/test_serialization.py::TestRuntimeSerialized::test_key_type", "tests/test_serialization.py::TestRuntimeSerialized::test_long_as_type_object", "tests/test_serialization.py::TestRuntimeSerialized::test_model_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_serialize_none", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_mismatched_map", "tests/test_serialization.py::TestRuntimeSerialized::test_polymorphic_serialization", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_datetime", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_direct_model", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_empty_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_from_dict_datetime", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_int_as_iter_with_div", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_json_obj", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_object", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_primitive_types", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_query", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_str_as_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_time", "tests/test_serialization.py::TestRuntimeSerialized::test_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_validation_flag", "tests/test_serialization.py::TestRuntimeSerialized::test_validation_type", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_declared", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_flattening", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_not_configured", "tests/test_serialization.py::TestRuntimeDeserialized::test_array_deserialize", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_enum", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_int", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_in_list", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_none", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_str", "tests/test_serialization.py::TestRuntimeDeserialized::test_basic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_cls_method_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_date", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_datetime", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_object", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_storage", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_time", "tests/test_serialization.py::TestRuntimeDeserialized::test_invalid_json", "tests/test_serialization.py::TestRuntimeDeserialized::test_long_as_type_object", "tests/test_serialization.py::TestRuntimeDeserialized::test_non_obj_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_no_attr", "tests/test_serialization.py::TestRuntimeDeserialized::test_personalize_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization_with_escape", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_missing_info", "tests/test_serialization.py::TestRuntimeDeserialized::test_robust_deserialization", "tests/test_serialization.py::TestModelInstanceEquality::test_model_instance_equality" ]
[]
MIT License
null
Azure__msrest-for-python-201
9e2e6529ac3cc91454a859c01775493872b20e92
2020-05-06 23:57:23
c16e5218fe99742c5bf93d73ce0bb71c9b1c0953
lmazuel: Without the PR, trying to deserialize in a french VM: ```python >>> from msrest.serialization import Deserializer >>> Deserializer.deserialize_rfc("Mon, 20 Nov 1995 19:12:08 -0500") Traceback (most recent call last): File "/home/lmazuel/rfctest/lib/python3.6/site-packages/msrest/serialization.py", line 1818, in deserialize_rfc attr, "%a, %d %b %Y %H:%M:%S %Z") File "/usr/lib/python3.6/_strptime.py", line 565, in _strptime_datetime tt, fraction = _strptime(data_string, format) File "/usr/lib/python3.6/_strptime.py", line 362, in _strptime (data_string, format)) ValueError: time data 'Mon, 20 Nov 1995 19:12:08 -0500' does not match format '%a, %d %b %Y %H:%M:%S %Z' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/lmazuel/rfctest/lib/python3.6/site-packages/msrest/serialization.py", line 1823, in deserialize_rfc raise_with_traceback(DeserializationError, msg, err) File "/home/lmazuel/rfctest/lib/python3.6/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback raise error.with_traceback(exc_traceback) File "/home/lmazuel/rfctest/lib/python3.6/site-packages/msrest/serialization.py", line 1818, in deserialize_rfc attr, "%a, %d %b %Y %H:%M:%S %Z") File "/usr/lib/python3.6/_strptime.py", line 565, in _strptime_datetime tt, fraction = _strptime(data_string, format) File "/usr/lib/python3.6/_strptime.py", line 362, in _strptime (data_string, format)) msrest.exceptions.DeserializationError: Cannot deserialize to rfc datetime object., ValueError: time data 'Mon, 20 Nov 1995 19:12:08 -0500' does not match format '%a, %d %b %Y %H:%M:%S %Z' ``` With the PR: ```python >>> from msrest.serialization import Deserializer >>> Deserializer.deserialize_rfc("Mon, 20 Nov 1995 19:12:08 -0500") datetime.datetime(1995, 11, 20, 19, 12, 8, tzinfo=<FixedOffset -5.0>) ```
diff --git a/msrest/serialization.py b/msrest/serialization.py index 59187e1..0e65d8e 100644 --- a/msrest/serialization.py +++ b/msrest/serialization.py @@ -28,6 +28,7 @@ from base64 import b64decode, b64encode import calendar import datetime import decimal +import email from enum import Enum import json import logging @@ -78,6 +79,26 @@ class UTC(datetime.tzinfo): """No daylight saving for UTC.""" return datetime.timedelta(hours=1) +class _FixedOffset(datetime.tzinfo): + """Fixed offset in minutes east from UTC. + Copy/pasted from Python doc + :param int offset: offset in minutes + """ + + def __init__(self, offset): + self.__offset = datetime.timedelta(minutes=offset) + + def utcoffset(self, dt): + return self.__offset + + def tzname(self, dt): + return str(self.__offset.total_seconds()/3600) + + def __repr__(self): + return "<FixedOffset {}>".format(self.tzname(None)) + + def dst(self, dt): + return datetime.timedelta(0) try: from datetime import timezone @@ -1814,10 +1835,13 @@ class Deserializer(object): if isinstance(attr, ET.Element): attr = attr.text try: - date_obj = datetime.datetime.strptime( - attr, "%a, %d %b %Y %H:%M:%S %Z") + parsed_date = email.utils.parsedate_tz(attr) + date_obj = datetime.datetime( + *parsed_date[:6], + tzinfo=_FixedOffset((parsed_date[9] or 0)/60) + ) if not date_obj.tzinfo: - date_obj = date_obj.replace(tzinfo=TZ_UTC) + date_obj = date_obj.astimezone(tz=TZ_UTC) except ValueError as err: msg = "Cannot deserialize to rfc datetime object." raise_with_traceback(DeserializationError, msg, err)
Parsing RFC date assumes current local is English Example, trying to parse `Fri, 28 Feb 2020 19:04:06 GMT` with a spanish locale will fail, since "Fri" or "Feb" is not spanish. This is because this parser uses `strptime` which is local dependent. Python doesn't support configuration for locale. The only reliable way would be to stop using "strptime", since other solution like [this ](https://stackoverflow.com/a/24070673/4074838)relies on a thread lock and I don't like that.
Azure/msrest-for-python
diff --git a/tests/test_serialization.py b/tests/test_serialization.py index 12a0042..fffd8a9 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -1974,6 +1974,55 @@ class TestRuntimeDeserialized(unittest.TestCase): self.assertEqual(utc.tm_sec, 52) self.assertEqual(a.microsecond, 780000) + def test_deserialize_datetime_rfc(self): + + a = Deserializer.deserialize_rfc("Mon, 20 Nov 1995 19:12:08 -0500") + utc = a.utctimetuple() + + # UTC: 21 Nov, 00:12:08 + self.assertEqual(utc.tm_year, 1995) + self.assertEqual(utc.tm_mon, 11) + self.assertEqual(utc.tm_mday, 21) + self.assertEqual(utc.tm_hour, 0) + self.assertEqual(utc.tm_min, 12) + self.assertEqual(utc.tm_sec, 8) + self.assertEqual(a.microsecond, 0) + + a = Deserializer.deserialize_rfc("Mon, 20 Nov 1995 19:12:08 CDT") + utc = a.utctimetuple() + + # UTC: 21 Nov, 00:12:08 + self.assertEqual(utc.tm_year, 1995) + self.assertEqual(utc.tm_mon, 11) + self.assertEqual(utc.tm_mday, 21) + self.assertEqual(utc.tm_hour, 0) + self.assertEqual(utc.tm_min, 12) + self.assertEqual(utc.tm_sec, 8) + self.assertEqual(a.microsecond, 0) + + a = Deserializer.deserialize_rfc("Mon, 20 Nov 1995 19:12:08") + utc = a.utctimetuple() + + # UTC: No info is considered UTC + self.assertEqual(utc.tm_year, 1995) + self.assertEqual(utc.tm_mon, 11) + self.assertEqual(utc.tm_mday, 20) + self.assertEqual(utc.tm_hour, 19) + self.assertEqual(utc.tm_min, 12) + self.assertEqual(utc.tm_sec, 8) + self.assertEqual(a.microsecond, 0) + + a = Deserializer.deserialize_rfc("Mon, 20 Nov 1995 19:12:08 GMT") + utc = a.utctimetuple() + + self.assertEqual(utc.tm_year, 1995) + self.assertEqual(utc.tm_mon, 11) + self.assertEqual(utc.tm_mday, 20) + self.assertEqual(utc.tm_hour, 19) + self.assertEqual(utc.tm_min, 12) + self.assertEqual(utc.tm_sec, 8) + self.assertEqual(a.microsecond, 0) + def test_polymorphic_deserialization(self): class Zoo(Model):
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 2, "test_score": 0 }, "num_modified_files": 1 }
0.6
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libunwind8-dev" ], "python": "3.9", "reqs_path": [ "requirements/base.txt", "dev_requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
aiohappyeyeballs==2.6.1 aiohttp==3.11.14 aiosignal==1.3.2 astroid==3.3.9 async-timeout==5.0.1 attrs==25.3.0 certifi==2025.1.31 charset-normalizer==3.4.1 coverage==4.5.4 dill==0.3.9 exceptiongroup==1.2.2 frozenlist==1.5.0 httpretty==1.1.4 idna==3.10 iniconfig==2.1.0 isodate==0.7.2 isort==6.0.1 mccabe==0.7.0 -e git+https://github.com/Azure/msrest-for-python.git@9e2e6529ac3cc91454a859c01775493872b20e92#egg=msrest multidict==6.2.0 mypy==1.15.0 mypy-extensions==1.0.0 oauthlib==3.2.2 outcome==1.3.0.post0 packaging==24.2 platformdirs==4.3.7 pluggy==1.5.0 propcache==0.3.1 pylint==3.3.6 pytest==8.3.5 pytest-asyncio==0.26.0 pytest-cov==2.10.1 requests==2.32.3 requests-oauthlib==2.0.0 sniffio==1.3.1 sortedcontainers==2.4.0 tomli==2.2.1 tomlkit==0.13.2 trio==0.29.0 typing_extensions==4.13.0 urllib3==2.3.0 yarl==1.18.3
name: msrest-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tzdata=2025a=h04d1e81_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - aiohappyeyeballs==2.6.1 - aiohttp==3.11.14 - aiosignal==1.3.2 - astroid==3.3.9 - async-timeout==5.0.1 - attrs==25.3.0 - certifi==2025.1.31 - charset-normalizer==3.4.1 - coverage==4.5.4 - dill==0.3.9 - exceptiongroup==1.2.2 - frozenlist==1.5.0 - httpretty==1.1.4 - idna==3.10 - iniconfig==2.1.0 - isodate==0.7.2 - isort==6.0.1 - mccabe==0.7.0 - multidict==6.2.0 - mypy==1.15.0 - mypy-extensions==1.0.0 - oauthlib==3.2.2 - outcome==1.3.0.post0 - packaging==24.2 - platformdirs==4.3.7 - pluggy==1.5.0 - propcache==0.3.1 - pylint==3.3.6 - pytest==8.3.5 - pytest-asyncio==0.26.0 - pytest-cov==2.10.1 - requests==2.32.3 - requests-oauthlib==2.0.0 - sniffio==1.3.1 - sortedcontainers==2.4.0 - tomli==2.2.1 - tomlkit==0.13.2 - trio==0.29.0 - typing-extensions==4.13.0 - urllib3==2.3.0 - yarl==1.18.3 prefix: /opt/conda/envs/msrest-for-python
[ "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_datetime_rfc" ]
[]
[ "tests/test_serialization.py::TestModelDeserialization::test_empty_enum_logs", "tests/test_serialization.py::TestModelDeserialization::test_model_kwargs", "tests/test_serialization.py::TestModelDeserialization::test_model_kwargs_logs", "tests/test_serialization.py::TestModelDeserialization::test_response", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_declared", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_manual", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_no_send", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_with_auto_model", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_dict_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_duration", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_enum", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_int", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_none", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_sequence", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_str", "tests/test_serialization.py::TestRuntimeSerialized::test_empty_list", "tests/test_serialization.py::TestRuntimeSerialized::test_json_with_xml_map", "tests/test_serialization.py::TestRuntimeSerialized::test_key_type", "tests/test_serialization.py::TestRuntimeSerialized::test_long_as_type_object", "tests/test_serialization.py::TestRuntimeSerialized::test_model_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_serialize_none", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_mismatched_map", "tests/test_serialization.py::TestRuntimeSerialized::test_polymorphic_serialization", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_datetime", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_direct_model", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_empty_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_from_dict_datetime", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_int_as_iter_with_div", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_json_obj", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_object", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_primitive_types", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_query", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_str_as_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_time", "tests/test_serialization.py::TestRuntimeSerialized::test_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_validation_flag", "tests/test_serialization.py::TestRuntimeSerialized::test_validation_type", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_declared", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_flattening", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_not_configured", "tests/test_serialization.py::TestRuntimeDeserialized::test_array_deserialize", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_enum", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_int", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_in_list", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_none", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_str", "tests/test_serialization.py::TestRuntimeDeserialized::test_basic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_cls_method_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_date", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_datetime", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_flattening", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_object", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_storage", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_time", "tests/test_serialization.py::TestRuntimeDeserialized::test_invalid_json", "tests/test_serialization.py::TestRuntimeDeserialized::test_long_as_type_object", "tests/test_serialization.py::TestRuntimeDeserialized::test_non_obj_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_no_attr", "tests/test_serialization.py::TestRuntimeDeserialized::test_personalize_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization_with_escape", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_missing_info", "tests/test_serialization.py::TestRuntimeDeserialized::test_robust_deserialization", "tests/test_serialization.py::TestModelInstanceEquality::test_model_instance_equality" ]
[]
MIT License
null
Azure__msrest-for-python-208
053469458820db6a33b2cb55b3f9a5e55a2f9716
2020-06-02 20:55:10
c16e5218fe99742c5bf93d73ce0bb71c9b1c0953
codecov-commenter: # [Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/208?src=pr&el=h1) Report > Merging [#208](https://codecov.io/gh/Azure/msrest-for-python/pull/208?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/msrest-for-python/commit/053469458820db6a33b2cb55b3f9a5e55a2f9716&el=desc) will **increase** coverage by `0.03%`. > The diff coverage is `81.25%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/msrest-for-python/pull/208/graphs/tree.svg?width=650&height=150&src=pr&token=Lny6ZO1MUF)](https://codecov.io/gh/Azure/msrest-for-python/pull/208?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #208 +/- ## ========================================== + Coverage 83.78% 83.81% +0.03% ========================================== Files 25 25 Lines 2664 2669 +5 ========================================== + Hits 2232 2237 +5 Misses 432 432 ``` | [Impacted Files](https://codecov.io/gh/Azure/msrest-for-python/pull/208?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [msrest/serialization.py](https://codecov.io/gh/Azure/msrest-for-python/pull/208/diff?src=pr&el=tree#diff-bXNyZXN0L3NlcmlhbGl6YXRpb24ucHk=) | `84.87% <81.25%> (+0.07%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/208?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/208?src=pr&el=footer). Last update [0534694...31d717a](https://codecov.io/gh/Azure/msrest-for-python/pull/208?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/msrest/serialization.py b/msrest/serialization.py index b3519f1..a8abd9a 100644 --- a/msrest/serialization.py +++ b/msrest/serialization.py @@ -79,26 +79,32 @@ class UTC(datetime.tzinfo): """No daylight saving for UTC.""" return datetime.timedelta(hours=1) -class _FixedOffset(datetime.tzinfo): - """Fixed offset in minutes east from UTC. - Copy/pasted from Python doc - :param int offset: offset in minutes - """ +try: + from datetime import timezone as _FixedOffset +except ImportError: # Python 2.7 + class _FixedOffset(datetime.tzinfo): # type: ignore + """Fixed offset in minutes east from UTC. + Copy/pasted from Python doc + :param datetime.timedelta offset: offset in timedelta format + """ - def __init__(self, offset): - self.__offset = datetime.timedelta(minutes=offset) + def __init__(self, offset): + self.__offset = offset - def utcoffset(self, dt): - return self.__offset + def utcoffset(self, dt): + return self.__offset - def tzname(self, dt): - return str(self.__offset.total_seconds()/3600) + def tzname(self, dt): + return str(self.__offset.total_seconds()/3600) - def __repr__(self): - return "<FixedOffset {}>".format(self.tzname(None)) + def __repr__(self): + return "<FixedOffset {}>".format(self.tzname(None)) - def dst(self, dt): - return datetime.timedelta(0) + def dst(self, dt): + return datetime.timedelta(0) + + def __getinitargs__(self): + return (self.__offset,) try: from datetime import timezone @@ -1868,7 +1874,7 @@ class Deserializer(object): parsed_date = email.utils.parsedate_tz(attr) date_obj = datetime.datetime( *parsed_date[:6], - tzinfo=_FixedOffset((parsed_date[9] or 0)/60) + tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0)/60)) ) if not date_obj.tzinfo: date_obj = date_obj.astimezone(tz=TZ_UTC)
datetime returned by Deserializer.deserialize_rfc() is not picklable ### Repro ```python import pickle from msrest.serialization import Deserializer datetime_rfc = "Mon, 25 May 2020 11:00:00 GMT" datetime1 = Deserializer.deserialize_rfc(datetime_rfc) print("datetime1: %s" % datetime1) pickled = pickle.dumps(datetime1) datetime2 = pickle.loads(pickled) print("datetime2: %s" % datetime2) ``` ### Output (msrest 0.6.13) ``` datetime1: 2020-05-25 11:00:00+00:00 datetime2: 2020-05-25 11:00:00+00:00 ``` ### Output (msrest 0.6.14) ``` datetime1: 2020-05-25 11:00:00+00:00 Traceback (most recent call last): File "d:\__temp\repro\main.py", line 8, in <module> datetime2 = pickle.loads(pickled) TypeError: __init__() missing 1 required positional argument: 'offset' ``` ### Details This regression was introduced in https://github.com/Azure/msrest-for-python/pull/201. After that change, in the example above `timedate1` is not picklable because `timedate1.tzinfo` contains an instance of [`_FixedOffset`](https://github.com/Azure/msrest-for-python/blob/v0.6.14/msrest/serialization.py#L82,L101) which is not picklable itself. `pickle.dumps(datetime1)` invokes `timedate1.tzinfo.__reduce__()`. `_FixedOffset` class doesn't define the [`__reduce__()`](https://docs.python.org/3/library/pickle.html#object.__reduce__) method and the implementation from its parent class is used. [`tzinfo.__reduce__()`](https://github.com/python/cpython/blob/v3.8.3/Lib/datetime.py#L1193,L1207) assumes that the class implements `__getinitargs__()` method. This is true for `datetime.timezone`, but not for `_FixedOffset`. Eventually, `pickle.loads(pickled)` tries to call `_FixedOffset.__init__()` without the required `offset` argument, resulting in a `TypeError`. In practice the issue happens when trying to pickle/unpickle any object containing a `datetime` generated by `Deserializer.deserialize_rfc()`, e.g. with [`multiprocessing`](https://docs.python.org/3/library/multiprocessing.html). ### Potential solutions 1. Implement `_FixedOffset.__getinitargs__()`. 2. Implement `_FixedOffset.__reduce__()`. 2. Make `_FixedOffset` use the default implementation of `__reduce__()`, instead of one inherited from `datetime.tzinfo`: `__reduce__ = object.__reduce__` Once Python 2.7 compatibility is no longer required, `datetime.timezone` can be used instead of `_FixedOffset`.
Azure/msrest-for-python
diff --git a/tests/test_serialization.py b/tests/test_serialization.py index 5991753..cb41372 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -29,6 +29,7 @@ import sys import json import isodate import logging +import pickle from enum import Enum from datetime import datetime, timedelta, date, time import unittest @@ -2058,6 +2059,20 @@ class TestRuntimeDeserialized(unittest.TestCase): self.assertEqual(utc.tm_sec, 8) self.assertEqual(a.microsecond, 0) + def test_rfc_pickable(self): + """Check datetime created by RFC parser are pickable. + + See https://github.com/Azure/msrest-for-python/issues/205 + """ + + datetime_rfc = "Mon, 25 May 2020 11:00:00 GMT" + datetime1 = Deserializer.deserialize_rfc(datetime_rfc) + + pickled = pickle.dumps(datetime1) + datetime2 = pickle.loads(pickled) + + assert datetime1 == datetime2 + def test_polymorphic_deserialization(self): class Zoo(Model):
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 0, "test_score": 2 }, "num_modified_files": 1 }
0.6
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.9", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
certifi==2025.1.31 charset-normalizer==3.4.1 exceptiongroup==1.2.2 idna==3.10 iniconfig==2.1.0 isodate==0.7.2 -e git+https://github.com/Azure/msrest-for-python.git@053469458820db6a33b2cb55b3f9a5e55a2f9716#egg=msrest oauthlib==3.2.2 packaging==24.2 pluggy==1.5.0 pytest==8.3.5 requests==2.32.3 requests-oauthlib==2.0.0 tomli==2.2.1 urllib3==2.3.0
name: msrest-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tzdata=2025a=h04d1e81_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - certifi==2025.1.31 - charset-normalizer==3.4.1 - exceptiongroup==1.2.2 - idna==3.10 - iniconfig==2.1.0 - isodate==0.7.2 - oauthlib==3.2.2 - packaging==24.2 - pluggy==1.5.0 - pytest==8.3.5 - requests==2.32.3 - requests-oauthlib==2.0.0 - tomli==2.2.1 - urllib3==2.3.0 prefix: /opt/conda/envs/msrest-for-python
[ "tests/test_serialization.py::TestRuntimeDeserialized::test_rfc_pickable" ]
[]
[ "tests/test_serialization.py::TestModelDeserialization::test_empty_enum_logs", "tests/test_serialization.py::TestModelDeserialization::test_model_kwargs", "tests/test_serialization.py::TestModelDeserialization::test_model_kwargs_logs", "tests/test_serialization.py::TestModelDeserialization::test_response", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_declared", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_manual", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_no_send", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_with_auto_model", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_dict_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_duration", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_enum", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_int", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_none", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_sequence", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_str", "tests/test_serialization.py::TestRuntimeSerialized::test_empty_list", "tests/test_serialization.py::TestRuntimeSerialized::test_json_with_xml_map", "tests/test_serialization.py::TestRuntimeSerialized::test_key_type", "tests/test_serialization.py::TestRuntimeSerialized::test_long_as_type_object", "tests/test_serialization.py::TestRuntimeSerialized::test_model_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_serialize_none", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_mismatched_map", "tests/test_serialization.py::TestRuntimeSerialized::test_polymorphic_serialization", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_datetime", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_direct_model", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_empty_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_from_dict_datetime", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_int_as_iter_with_div", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_json_obj", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_object", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_primitive_types", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_query", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_str_as_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_time", "tests/test_serialization.py::TestRuntimeSerialized::test_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_validation_flag", "tests/test_serialization.py::TestRuntimeSerialized::test_validation_type", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_declared", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_flattening", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_not_configured", "tests/test_serialization.py::TestRuntimeDeserialized::test_array_deserialize", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_enum", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_int", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_in_list", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_none", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_str", "tests/test_serialization.py::TestRuntimeDeserialized::test_basic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_cls_method_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_date", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_datetime", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_datetime_rfc", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_flattening", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_object", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_storage", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_time", "tests/test_serialization.py::TestRuntimeDeserialized::test_invalid_json", "tests/test_serialization.py::TestRuntimeDeserialized::test_long_as_type_object", "tests/test_serialization.py::TestRuntimeDeserialized::test_non_obj_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_no_attr", "tests/test_serialization.py::TestRuntimeDeserialized::test_personalize_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization_with_escape", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_missing_info", "tests/test_serialization.py::TestRuntimeDeserialized::test_robust_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_twice_key_scenario", "tests/test_serialization.py::TestModelInstanceEquality::test_model_instance_equality" ]
[]
MIT License
null
Azure__msrest-for-python-224
c16e5218fe99742c5bf93d73ce0bb71c9b1c0953
2020-09-21 23:26:48
c16e5218fe99742c5bf93d73ce0bb71c9b1c0953
codecov-commenter: # [Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/224?src=pr&el=h1) Report > Merging [#224](https://codecov.io/gh/Azure/msrest-for-python/pull/224?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/msrest-for-python/commit/98e2ebe7e5ed8a656f333963339ad8d20fc330d3?el=desc) will **decrease** coverage by `4.01%`. > The diff coverage is `100.00%`. [![Impacted file tree graph](https://codecov.io/gh/Azure/msrest-for-python/pull/224/graphs/tree.svg?width=650&height=150&src=pr&token=Lny6ZO1MUF)](https://codecov.io/gh/Azure/msrest-for-python/pull/224?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #224 +/- ## ========================================== - Coverage 86.23% 82.21% -4.02% ========================================== Files 25 16 -9 Lines 2738 2266 -472 ========================================== - Hits 2361 1863 -498 - Misses 377 403 +26 ``` | [Impacted Files](https://codecov.io/gh/Azure/msrest-for-python/pull/224?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [msrest/serialization.py](https://codecov.io/gh/Azure/msrest-for-python/pull/224/diff?src=pr&el=tree#diff-bXNyZXN0L3NlcmlhbGl6YXRpb24ucHk=) | `82.97% <100.00%> (-8.15%)` | :arrow_down: | | [msrest/polling/\_\_init\_\_.py](https://codecov.io/gh/Azure/msrest-for-python/pull/224/diff?src=pr&el=tree#diff-bXNyZXN0L3BvbGxpbmcvX19pbml0X18ucHk=) | `66.66% <0.00%> (-33.34%)` | :arrow_down: | | [msrest/pipeline/universal.py](https://codecov.io/gh/Azure/msrest-for-python/pull/224/diff?src=pr&el=tree#diff-bXNyZXN0L3BpcGVsaW5lL3VuaXZlcnNhbC5weQ==) | `90.19% <0.00%> (-4.04%)` | :arrow_down: | | [msrest/paging.py](https://codecov.io/gh/Azure/msrest-for-python/pull/224/diff?src=pr&el=tree#diff-bXNyZXN0L3BhZ2luZy5weQ==) | `87.71% <0.00%> (-3.81%)` | :arrow_down: | | [msrest/universal\_http/\_\_init\_\_.py](https://codecov.io/gh/Azure/msrest-for-python/pull/224/diff?src=pr&el=tree#diff-bXNyZXN0L3VuaXZlcnNhbF9odHRwL19faW5pdF9fLnB5) | `71.50% <0.00%> (-2.74%)` | :arrow_down: | | [msrest/pipeline/\_\_init\_\_.py](https://codecov.io/gh/Azure/msrest-for-python/pull/224/diff?src=pr&el=tree#diff-bXNyZXN0L3BpcGVsaW5lL19faW5pdF9fLnB5) | `88.00% <0.00%> (-2.63%)` | :arrow_down: | | [msrest/configuration.py](https://codecov.io/gh/Azure/msrest-for-python/pull/224/diff?src=pr&el=tree#diff-bXNyZXN0L2NvbmZpZ3VyYXRpb24ucHk=) | `75.86% <0.00%> (-2.27%)` | :arrow_down: | | [msrest/polling/poller.py](https://codecov.io/gh/Azure/msrest-for-python/pull/224/diff?src=pr&el=tree#diff-bXNyZXN0L3BvbGxpbmcvcG9sbGVyLnB5) | `97.80% <0.00%> (-2.20%)` | :arrow_down: | | [msrest/service\_client.py](https://codecov.io/gh/Azure/msrest-for-python/pull/224/diff?src=pr&el=tree#diff-bXNyZXN0L3NlcnZpY2VfY2xpZW50LnB5) | `79.57% <0.00%> (-2.12%)` | :arrow_down: | | ... and [11 more](https://codecov.io/gh/Azure/msrest-for-python/pull/224/diff?src=pr&el=tree-more) | | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/224?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/224?src=pr&el=footer). Last update [98e2ebe...b5d2aac](https://codecov.io/gh/Azure/msrest-for-python/pull/224?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/msrest/serialization.py b/msrest/serialization.py index f9037b9..378de20 100644 --- a/msrest/serialization.py +++ b/msrest/serialization.py @@ -953,6 +953,16 @@ class Serializer(object): return self.serialize_long(attr) if obj_type is unicode_str: return self.serialize_unicode(attr) + if obj_type is datetime.datetime: + return self.serialize_iso(attr) + if obj_type is datetime.date: + return self.serialize_date(attr) + if obj_type is datetime.time: + return self.serialize_time(attr) + if obj_type is datetime.timedelta: + return self.serialize_duration(attr) + if obj_type is decimal.Decimal: + return self.serialize_decimal(attr) # If it's a model or I know this dependency, serialize as a Model elif obj_type in self.dependencies.values() or isinstance(attr, Model):
Serialization for non-standard types yields incorrect output Hi, I am using the event grid client SDK in python to generate custom events. I have come across an issue I can't seem to solve without going away from the event grid SDK. The problem is that the event grid model serializer does not give me the correct output for when including types that are not the basic types. A simple reproducible example: ``` from azure.eventgrid.models import EventGridEvent import datetime import uuid event=EventGridEvent( topic="test", id=uuid.uuid4(), subject="testUpdated", data={"time":datetime.datetime.now().replace(tzinfo=datetime.timezone.utc)}, event_type="test.test", event_time=datetime.datetime.now().replace(tzinfo=datetime.timezone.utc), data_version=2.0, ) print(event.serialize()) ``` This would return ` {'id': '3e02a22c-f327-4f62-af25-b71e0865888b', 'topic': 'product', 'subject': 'ProductUpdated', 'data': {'time': '2020-09-07 10:37:08.348679+00:00'}, 'eventType': 'supplychain.product', 'eventTime': '2020-09-07T10:37:08.348679Z', 'dataVersion': '2.0'} ` the serialize is not called by me in the code I actually use, but it looks like that is what is called behind the scenes when I send off the event. I want the datetime (the key "time" in the above example) to be serialized just as the parent-level "event_time". My problem is not only with datetime as in the current example, but also with decimals. I guess this fits in this repo and not in the EventGrid SDK repo, but feel free to redirect me there.
Azure/msrest-for-python
diff --git a/tests/test_serialization.py b/tests/test_serialization.py index ab04cfd..6837bad 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -25,6 +25,7 @@ # #-------------------------------------------------------------------------- +from decimal import Decimal import sys import json import isodate @@ -1395,6 +1396,42 @@ class TestRuntimeSerialized(unittest.TestCase): 'data': {'id': u"\ua015"} } + def test_datetime_types_as_type_object(self): + """https://github.com/Azure/msrest-for-python/issues/223 + """ + + class TestModel(Model): + _attribute_map = {'data': {'key': 'data', 'type': 'object'}} + + m = TestModel(data = { + 'datetime': isodate.parse_datetime('2012-02-24T00:53:52.780Z'), + 'date': date(2019,5,1), + 'time': time(11,12,13), + 'timedelta': timedelta(56) + }) + serialized = m.serialize() + assert serialized['data'] == { + 'datetime': '2012-02-24T00:53:52.780Z', + 'date': '2019-05-01', + 'time': '11:12:13', + 'timedelta': 'P56D' + } + + def test_decimal_types_as_type_object(self): + """https://github.com/Azure/msrest-for-python/issues/223 + """ + + class TestModel(Model): + _attribute_map = {'data': {'key': 'data', 'type': 'object'}} + + m = TestModel(data = { + 'decimal': Decimal('1.1'), + }) + serialized = m.serialize() + assert serialized['data'] == { + 'decimal': 1.1 + } + def test_json_with_xml_map(self): basic_json = {'age': 37, 'country': 'france'}
{ "commit_name": "merge_commit", "failed_lite_validators": [], "has_test_patch": true, "is_lite": true, "llm_score": { "difficulty_score": 1, "issue_text_score": 0, "test_score": 2 }, "num_modified_files": 1 }
0.6
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest", "pytest-cov", "pytest-asyncio" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.9", "reqs_path": [ "dev_requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
aiohappyeyeballs==2.6.1 aiohttp==3.11.14 aiosignal==1.3.2 astroid==3.3.9 async-timeout==5.0.1 attrs==25.3.0 certifi==2025.1.31 charset-normalizer==3.4.1 coverage==4.5.4 dill==0.3.9 exceptiongroup==1.2.2 frozenlist==1.5.0 httpretty==1.1.4 idna==3.10 iniconfig==2.1.0 isodate==0.7.2 isort==6.0.1 mccabe==0.7.0 -e git+https://github.com/Azure/msrest-for-python.git@c16e5218fe99742c5bf93d73ce0bb71c9b1c0953#egg=msrest multidict==6.2.0 mypy==1.15.0 mypy-extensions==1.0.0 oauthlib==3.2.2 packaging==24.2 platformdirs==4.3.7 pluggy==1.5.0 propcache==0.3.1 pylint==3.3.6 pytest==8.3.5 pytest-asyncio==0.26.0 pytest-cov==2.10.1 requests==2.32.3 requests-oauthlib==2.0.0 tomli==2.2.1 tomlkit==0.13.2 typing_extensions==4.13.0 urllib3==2.3.0 yarl==1.18.3
name: msrest-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tzdata=2025a=h04d1e81_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - aiohappyeyeballs==2.6.1 - aiohttp==3.11.14 - aiosignal==1.3.2 - astroid==3.3.9 - async-timeout==5.0.1 - attrs==25.3.0 - certifi==2025.1.31 - charset-normalizer==3.4.1 - coverage==4.5.4 - dill==0.3.9 - exceptiongroup==1.2.2 - frozenlist==1.5.0 - httpretty==1.1.4 - idna==3.10 - iniconfig==2.1.0 - isodate==0.7.2 - isort==6.0.1 - mccabe==0.7.0 - multidict==6.2.0 - mypy==1.15.0 - mypy-extensions==1.0.0 - oauthlib==3.2.2 - packaging==24.2 - platformdirs==4.3.7 - pluggy==1.5.0 - propcache==0.3.1 - pylint==3.3.6 - pytest==8.3.5 - pytest-asyncio==0.26.0 - pytest-cov==2.10.1 - requests==2.32.3 - requests-oauthlib==2.0.0 - tomli==2.2.1 - tomlkit==0.13.2 - typing-extensions==4.13.0 - urllib3==2.3.0 - yarl==1.18.3 prefix: /opt/conda/envs/msrest-for-python
[ "tests/test_serialization.py::TestRuntimeSerialized::test_datetime_types_as_type_object", "tests/test_serialization.py::TestRuntimeSerialized::test_decimal_types_as_type_object" ]
[]
[ "tests/test_serialization.py::TestModelDeserialization::test_empty_enum_logs", "tests/test_serialization.py::TestModelDeserialization::test_model_kwargs", "tests/test_serialization.py::TestModelDeserialization::test_model_kwargs_logs", "tests/test_serialization.py::TestModelDeserialization::test_response", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_declared", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_manual", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_no_send", "tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_with_auto_model", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_dict_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_duration", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_enum", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_int", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_none", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_sequence", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_str", "tests/test_serialization.py::TestRuntimeSerialized::test_empty_list", "tests/test_serialization.py::TestRuntimeSerialized::test_json_with_xml_map", "tests/test_serialization.py::TestRuntimeSerialized::test_key_type", "tests/test_serialization.py::TestRuntimeSerialized::test_long_as_type_object", "tests/test_serialization.py::TestRuntimeSerialized::test_model_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_serialize_none", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_mismatched_map", "tests/test_serialization.py::TestRuntimeSerialized::test_polymorphic_serialization", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_custom_model", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_datetime", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_direct_model", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_empty_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_from_dict_datetime", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_int_as_iter_with_div", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_json_obj", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_object", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_primitive_types", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_query", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_str_as_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_time", "tests/test_serialization.py::TestRuntimeSerialized::test_unicode_as_type_object", "tests/test_serialization.py::TestRuntimeSerialized::test_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_validation_flag", "tests/test_serialization.py::TestRuntimeSerialized::test_validation_type", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_declared", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_flattening", "tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_not_configured", "tests/test_serialization.py::TestRuntimeDeserialized::test_array_deserialize", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_enum", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_int", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_in_list", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_none", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_str", "tests/test_serialization.py::TestRuntimeDeserialized::test_basic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_cls_method_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_date", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_datetime", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_datetime_rfc", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_flattening", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_object", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_storage", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_time", "tests/test_serialization.py::TestRuntimeDeserialized::test_invalid_json", "tests/test_serialization.py::TestRuntimeDeserialized::test_long_as_type_object", "tests/test_serialization.py::TestRuntimeDeserialized::test_non_obj_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_no_attr", "tests/test_serialization.py::TestRuntimeDeserialized::test_personalize_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization_with_escape", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_missing_info", "tests/test_serialization.py::TestRuntimeDeserialized::test_rfc_pickable", "tests/test_serialization.py::TestRuntimeDeserialized::test_robust_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_twice_key_scenario", "tests/test_serialization.py::TestModelInstanceEquality::test_model_instance_equality" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_msrest-for-python-224
Azure__msrest-for-python-28
02b1e35c7cfb045bd4752abe800ad6912282eb6e
2017-04-03 22:04:40
24deba7a7a9e335314058ec2d0b39a710f61be60
diff --git a/msrest/service_client.py b/msrest/service_client.py index a204089..ac70211 100644 --- a/msrest/service_client.py +++ b/msrest/service_client.py @@ -138,7 +138,7 @@ class ServiceClient(object): return kwargs - def send_formdata(self, request, headers={}, content={}, **config): + def send_formdata(self, request, headers=None, content=None, **config): """Send data as a multipart form-data request. We only deal with file-like objects or strings at this point. The requests is not yet streamed. @@ -148,11 +148,11 @@ class ServiceClient(object): :param dict content: Dictionary of the fields of the formdata. :param config: Any specific config overrides. """ + if content is None: + content = {} file_data = {f: self._format_data(d) for f, d in content.items()} - try: - del headers['Content-Type'] - except KeyError: - pass + if headers: + headers.pop('Content-Type', None) return self.send(request, headers, None, files=file_data, **config) def send(self, request, headers=None, content=None, **config): @@ -290,7 +290,7 @@ class ServiceClient(object): """ self._headers[header] = value - def get(self, url=None, params={}): + def get(self, url=None, params=None): """Create a GET request object. :param str url: The request URL. @@ -300,7 +300,7 @@ class ServiceClient(object): request.method = 'GET' return request - def put(self, url=None, params={}): + def put(self, url=None, params=None): """Create a PUT request object. :param str url: The request URL. @@ -310,7 +310,7 @@ class ServiceClient(object): request.method = 'PUT' return request - def post(self, url=None, params={}): + def post(self, url=None, params=None): """Create a POST request object. :param str url: The request URL. @@ -320,7 +320,7 @@ class ServiceClient(object): request.method = 'POST' return request - def head(self, url=None, params={}): + def head(self, url=None, params=None): """Create a HEAD request object. :param str url: The request URL. @@ -330,7 +330,7 @@ class ServiceClient(object): request.method = 'HEAD' return request - def patch(self, url=None, params={}): + def patch(self, url=None, params=None): """Create a PATCH request object. :param str url: The request URL. @@ -340,7 +340,7 @@ class ServiceClient(object): request.method = 'PATCH' return request - def delete(self, url=None, params={}): + def delete(self, url=None, params=None): """Create a DELETE request object. :param str url: The request URL. @@ -350,7 +350,7 @@ class ServiceClient(object): request.method = 'DELETE' return request - def merge(self, url=None, params={}): + def merge(self, url=None, params=None): """Create a MERGE request object. :param str url: The request URL.
Default argument value is mutable Hi, Just want to confirm, I noticed there are some methods in `ServiceClient` contain a mutable default argument, for instance: `def get(self, url=None, params={}): """Create a GET request object. :param str url: The request URL. :param dict params: Request URL parameters. """ request = self._request(url, params) request.method = 'GET' return request` And the default argument `params` is changed in`self._request(url, params)`. Is that as design? I just think it's a little wired. Thanks!
Azure/msrest-for-python
diff --git a/test/unittest_client.py b/test/unittest_client.py index c22b13e..4a193ee 100644 --- a/test/unittest_client.py +++ b/test/unittest_client.py @@ -201,7 +201,7 @@ class TestServiceClient(unittest.TestCase): mock_client._format_data.return_value = "formatted" request = ClientRequest('GET') ServiceClient.send_formdata(mock_client, request) - mock_client.send.assert_called_with(request, {}, None, files={}) + mock_client.send.assert_called_with(request, None, None, files={}) ServiceClient.send_formdata(mock_client, request, {'id':'1234'}, {'Test':'Data'}) mock_client.send.assert_called_with(request, {'id':'1234'}, None, files={'Test':'formatted'})
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 2, "test_score": 1 }, "num_modified_files": 1 }
0.4
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest", "coverage", "flake8" ], "pre_install": null, "python": "3.5", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs==22.2.0 certifi==2021.5.30 charset-normalizer==2.0.12 coverage==6.2 flake8==5.0.4 idna==3.10 importlib-metadata==4.2.0 iniconfig==1.1.1 isodate==0.6.1 mccabe==0.7.0 -e git+https://github.com/Azure/msrest-for-python.git@02b1e35c7cfb045bd4752abe800ad6912282eb6e#egg=msrest oauthlib==3.2.2 packaging==21.3 pluggy==1.0.0 py==1.11.0 pycodestyle==2.9.1 pyflakes==2.5.0 pyparsing==3.1.4 pytest==7.0.1 requests==2.27.1 requests-oauthlib==2.0.0 six==1.17.0 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.26.20 zipp==3.6.0
name: msrest-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - attrs==22.2.0 - charset-normalizer==2.0.12 - coverage==6.2 - flake8==5.0.4 - idna==3.10 - importlib-metadata==4.2.0 - iniconfig==1.1.1 - isodate==0.6.1 - mccabe==0.7.0 - oauthlib==3.2.2 - packaging==21.3 - pluggy==1.0.0 - py==1.11.0 - pycodestyle==2.9.1 - pyflakes==2.5.0 - pyparsing==3.1.4 - pytest==7.0.1 - requests==2.27.1 - requests-oauthlib==2.0.0 - six==1.17.0 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.26.20 - zipp==3.6.0 prefix: /opt/conda/envs/msrest-for-python
[ "test/unittest_client.py::TestServiceClient::test_client_formdata_send" ]
[]
[ "test/unittest_client.py::TestServiceClient::test_client_add_hook", "test/unittest_client.py::TestServiceClient::test_client_header", "test/unittest_client.py::TestServiceClient::test_client_request", "test/unittest_client.py::TestServiceClient::test_client_send", "test/unittest_client.py::TestServiceClient::test_format_data", "test/unittest_client.py::TestServiceClient::test_format_url" ]
[]
MIT License
null
Azure__msrest-for-python-43
11f19f936f2d2d912782c7280f02f01ed89baf47
2017-08-22 03:53:10
24deba7a7a9e335314058ec2d0b39a710f61be60
diff --git a/msrest/serialization.py b/msrest/serialization.py index 6eb8ec9..063f2e6 100644 --- a/msrest/serialization.py +++ b/msrest/serialization.py @@ -918,6 +918,9 @@ class Deserializer(object): '[]': self.deserialize_iter, '{}': self.deserialize_dict } + self.deserialize_expected_types = { + 'duration': (isodate.Duration, datetime.timedelta) + } self.dependencies = dict(classes) if classes else {} self.key_extractors = [ rest_key_extractor @@ -1080,6 +1083,8 @@ class Deserializer(object): if data_type in self.basic_types.values(): return self.deserialize_basic(data, data_type) if data_type in self.deserialize_type: + if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): + return data data_val = self.deserialize_type[data_type](data) return data_val
Serialization issue if dict syntax and Duration used ```python msrest.exceptions.SerializationError: Unable to build a model: Unable to deserialize response data. Data: 3 years, 6 months, 4 days, 12:30:05, duration, TypeError: Expecting a string isodate.duration.Duration(4, 45005, 0, years=3, months=6), DeserializationError: Unable to deserialize response data. Data: 3 years, 6 months, 4 days, 12:30:05, duration, TypeError: Expecting a string isodate.duration.Duration(4, 45005, 0, years=3, months=6) ``` Regression introduced in 0.4.12
Azure/msrest-for-python
diff --git a/tests/test_serialization.py b/tests/test_serialization.py index f70dcbd..787a086 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -138,7 +138,6 @@ class TestRuntimeSerialized(unittest.TestCase): class TestObj(Model): - _validation = {} _attribute_map = { 'attr_a': {'key':'id', 'type':'str'}, 'attr_b': {'key':'AttrB', 'type':'int'}, @@ -147,23 +146,30 @@ class TestRuntimeSerialized(unittest.TestCase): 'attr_e': {'key':'AttrE', 'type': '{float}'}, 'attr_f': {'key':'AttrF', 'type': 'duration'}, 'attr_g': {'key':'properties.AttrG', 'type':'str'}, - } - - def __init__(self): + } - self.attr_a = None - self.attr_b = None - self.attr_c = None - self.attr_d = None - self.attr_e = None - self.attr_f = None - self.attr_g = None + def __init__(self, + attr_a=None, + attr_b=None, + attr_c=None, + attr_d=None, + attr_e=None, + attr_f=None, + attr_g=None): + + self.attr_a = attr_a + self.attr_b = attr_b + self.attr_c = attr_c + self.attr_d = attr_d + self.attr_e = attr_e + self.attr_f = attr_f + self.attr_g = attr_g def __str__(self): return "Test_Object" def setUp(self): - self.s = Serializer() + self.s = Serializer({'TestObj': self.TestObj}) return super(TestRuntimeSerialized, self).setUp() def test_serialize_direct_model(self): @@ -496,6 +502,14 @@ class TestRuntimeSerialized(unittest.TestCase): message = self.s._serialize(test_obj) self.assertEquals("P1D", message["AttrF"]) + test_obj = self.TestObj() + test_obj.attr_f = isodate.parse_duration("P3Y6M4DT12H30M5S") + + message = self.s.body({ + "attr_f": isodate.parse_duration("P3Y6M4DT12H30M5S")}, + 'TestObj') + self.assertEquals("P3Y6M4DT12H30M5S", message["AttrF"]) + def test_attr_list_simple(self): """ Test serializing an object with simple-typed list attributes @@ -657,8 +671,8 @@ class TestRuntimeSerialized(unittest.TestCase): g = self.s.body({"test":{"value":"data"}}, 'object') self.assertEqual(g, {"test":{"value":"data"}}) - h = self.s.serialize_data({"test":self.TestObj()}, 'object') - self.assertEqual(h, {"test":"Test_Object"}) + h = self.s.serialize_data({"test":self.TestObj('id')}, 'object') + self.assertEqual(h, {"test":{'id': 'id'}}) i = self.s.serialize_data({"test":[1,2,3,4,5]}, 'object') self.assertEqual(i, {"test":[1,2,3,4,5]})
{ "commit_name": "head_commit", "failed_lite_validators": [], "has_test_patch": true, "is_lite": true, "llm_score": { "difficulty_score": 1, "issue_text_score": 2, "test_score": 0 }, "num_modified_files": 1 }
0.4
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest", "pytest-cov" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.9", "reqs_path": [ "requirements.txt", "dev_requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
certifi==2025.1.31 charset-normalizer==3.4.1 coverage==7.8.0 exceptiongroup==1.2.2 httpretty==1.1.4 idna==3.10 iniconfig==2.1.0 isodate==0.7.2 -e git+https://github.com/Azure/msrest-for-python.git@11f19f936f2d2d912782c7280f02f01ed89baf47#egg=msrest oauthlib==3.2.2 packaging==24.2 pluggy==1.5.0 pytest==8.3.5 pytest-cov==6.0.0 requests==2.32.3 requests-oauthlib==2.0.0 tomli==2.2.1 urllib3==2.3.0
name: msrest-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tzdata=2025a=h04d1e81_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - certifi==2025.1.31 - charset-normalizer==3.4.1 - coverage==7.8.0 - exceptiongroup==1.2.2 - httpretty==1.1.4 - idna==3.10 - iniconfig==2.1.0 - isodate==0.7.2 - oauthlib==3.2.2 - packaging==24.2 - pluggy==1.5.0 - pytest==8.3.5 - pytest-cov==6.0.0 - requests==2.32.3 - requests-oauthlib==2.0.0 - tomli==2.2.1 - urllib3==2.3.0 prefix: /opt/conda/envs/msrest-for-python
[ "tests/test_serialization.py::TestRuntimeSerialized::test_attr_duration" ]
[]
[ "tests/test_serialization.py::TestModelDeserialization::test_response", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_dict_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_enum", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_int", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_none", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_sequence", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_str", "tests/test_serialization.py::TestRuntimeSerialized::test_empty_list", "tests/test_serialization.py::TestRuntimeSerialized::test_key_type", "tests/test_serialization.py::TestRuntimeSerialized::test_model_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_serialize_none", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_mismatched_map", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_without_attr_map", "tests/test_serialization.py::TestRuntimeSerialized::test_polymorphic_serialization", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_datetime", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_direct_model", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_empty_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_json_obj", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_object", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_primitive_types", "tests/test_serialization.py::TestRuntimeSerialized::test_validate", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_int", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_in_list", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_none", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_str", "tests/test_serialization.py::TestRuntimeDeserialized::test_basic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_cls_method_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_datetime", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_object", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_storage", "tests/test_serialization.py::TestRuntimeDeserialized::test_non_obj_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_no_attr", "tests/test_serialization.py::TestRuntimeDeserialized::test_personalize_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization_with_escape", "tests/test_serialization.py::TestRuntimeDeserialized::test_robust_deserialization", "tests/test_serialization.py::TestModelInstanceEquality::test_model_instance_equality" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_msrest-for-python-43
Azure__msrest-for-python-45
07cec915d60e29193935dfca17d5e8a7afd0a3d4
2017-08-23 16:10:17
24deba7a7a9e335314058ec2d0b39a710f61be60
diff --git a/msrest/serialization.py b/msrest/serialization.py index 063f2e6..a3d50cd 100644 --- a/msrest/serialization.py +++ b/msrest/serialization.py @@ -1200,6 +1200,12 @@ class Deserializer(object): :param str data: response string to be deserialized. :rtype: str or unicode """ + # We might be here because we have an enum modeled as string, + # and we try to deserialize a partial dict with enum inside + if isinstance(data, Enum): + return data + + # Consider this is real string try: if isinstance(data, unicode): return data
v0.4.12 breaks mixed dict with enum if model-as-string=true This breaks: ``` python async_security_rule = self.network_client.security_rules.create_or_update( self.group_name, security_group_name, new_security_rule_name, { 'access':azure.mgmt.network.models.SecurityRuleAccess.allow, 'description':'New Test security rule', 'destination_address_prefix':'*', 'destination_port_range':'123-3500', 'direction':azure.mgmt.network.models.SecurityRuleDirection.outbound, 'priority':400, 'protocol':azure.mgmt.network.models.SecurityRuleProtocol.tcp, 'source_address_prefix':'*', 'source_port_range':'655', } ) ```
Azure/msrest-for-python
diff --git a/tests/test_serialization.py b/tests/test_serialization.py index 787a086..10fb82f 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -353,10 +353,10 @@ class TestRuntimeSerialized(unittest.TestCase): class TestEnum(Enum): val = "Value" - t = test_obj + t = test_obj() t.abc = TestEnum.val - serialized = self.s._serialize(test_obj) + serialized = self.s._serialize(t) expected = { "ABC": "Value" } @@ -374,6 +374,31 @@ class TestRuntimeSerialized(unittest.TestCase): with self.assertRaises(SerializationError): serializer._serialize(t) + serializer = Serializer({ + 'TestEnumObj': test_obj, + 'TestEnum': TestEnum + }) + serialized = serializer.body({ + 'abc': TestEnum.val + }, 'TestEnumObj') + expected = { + 'ABC': 'Value' + } + self.assertEqual(expected, serialized) + + # model-as-string=True + test_obj._attribute_map = { + "abc":{"key":"ABC", "type":"str"} + } + serialized = serializer.body({ + 'abc': TestEnum.val + }, 'TestEnumObj') + expected = { + 'ABC': 'Value' + } + self.assertEqual(expected, serialized) + + def test_attr_none(self): """ Test serializing an object with None attributes.
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 1, "test_score": 0 }, "num_modified_files": 1 }
0.4
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest", "pytest-cov" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.9", "reqs_path": [ "requirements.txt", "dev_requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
certifi==2025.1.31 charset-normalizer==3.4.1 coverage==7.8.0 exceptiongroup==1.2.2 httpretty==1.1.4 idna==3.10 iniconfig==2.1.0 isodate==0.7.2 -e git+https://github.com/Azure/msrest-for-python.git@07cec915d60e29193935dfca17d5e8a7afd0a3d4#egg=msrest oauthlib==3.2.2 packaging==24.2 pluggy==1.5.0 pytest==8.3.5 pytest-cov==6.0.0 requests==2.32.3 requests-oauthlib==2.0.0 tomli==2.2.1 urllib3==2.3.0
name: msrest-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tzdata=2025a=h04d1e81_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - certifi==2025.1.31 - charset-normalizer==3.4.1 - coverage==7.8.0 - exceptiongroup==1.2.2 - httpretty==1.1.4 - idna==3.10 - iniconfig==2.1.0 - isodate==0.7.2 - oauthlib==3.2.2 - packaging==24.2 - pluggy==1.5.0 - pytest==8.3.5 - pytest-cov==6.0.0 - requests==2.32.3 - requests-oauthlib==2.0.0 - tomli==2.2.1 - urllib3==2.3.0 prefix: /opt/conda/envs/msrest-for-python
[ "tests/test_serialization.py::TestRuntimeSerialized::test_attr_enum" ]
[]
[ "tests/test_serialization.py::TestModelDeserialization::test_response", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_dict_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_duration", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_int", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_none", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_sequence", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_str", "tests/test_serialization.py::TestRuntimeSerialized::test_empty_list", "tests/test_serialization.py::TestRuntimeSerialized::test_key_type", "tests/test_serialization.py::TestRuntimeSerialized::test_model_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_serialize_none", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_mismatched_map", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_without_attr_map", "tests/test_serialization.py::TestRuntimeSerialized::test_polymorphic_serialization", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_datetime", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_direct_model", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_empty_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_json_obj", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_object", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_primitive_types", "tests/test_serialization.py::TestRuntimeSerialized::test_validate", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_int", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_in_list", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_none", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_str", "tests/test_serialization.py::TestRuntimeDeserialized::test_basic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_cls_method_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_datetime", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_object", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_storage", "tests/test_serialization.py::TestRuntimeDeserialized::test_non_obj_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_no_attr", "tests/test_serialization.py::TestRuntimeDeserialized::test_personalize_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization_with_escape", "tests/test_serialization.py::TestRuntimeDeserialized::test_robust_deserialization", "tests/test_serialization.py::TestModelInstanceEquality::test_model_instance_equality" ]
[]
MIT License
null
Azure__msrest-for-python-53
bad8585bcbe5f92f3b2c892c8b373ee367dff70f
2017-09-28 17:58:23
24deba7a7a9e335314058ec2d0b39a710f61be60
codecov-io: # [Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=h1) Report > Merging [#53](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/msrest-for-python/commit/bad8585bcbe5f92f3b2c892c8b373ee367dff70f?src=pr&el=desc) will **not change** coverage. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/Azure/msrest-for-python/pull/53/graphs/tree.svg?token=Lny6ZO1MUF&src=pr&width=650&height=150)](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #53 +/- ## ======================================= Coverage 77.77% 77.77% ======================================= Files 260 260 Lines 12696 12696 ======================================= Hits 9874 9874 Misses 2822 2822 ``` | [Impacted Files](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [...rmat\_test\_service/operations/queries\_operations.py](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=tree#diff-dGVzdC92YW5pbGxhL0V4cGVjdGVkL0FjY2VwdGFuY2VUZXN0cy9VcmxNdWx0aUNvbGxlY3Rpb25Gb3JtYXQvYXV0b19yZXN0X3VybF9tdXRsaV9jb2xsZWN0aW9uX2Zvcm1hdF90ZXN0X3NlcnZpY2Uvb3BlcmF0aW9ucy9xdWVyaWVzX29wZXJhdGlvbnMucHk=) | `76.78% <0%> (ø)` | :arrow_up: | | [...ion\_test\_service/operations/duration\_operations.py](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=tree#diff-dGVzdC92YW5pbGxhL0V4cGVjdGVkL0FjY2VwdGFuY2VUZXN0cy9Cb2R5RHVyYXRpb24vYXV0b19yZXN0X2R1cmF0aW9uX3Rlc3Rfc2VydmljZS9vcGVyYXRpb25zL2R1cmF0aW9uX29wZXJhdGlvbnMucHk=) | `76.62% <0%> (ø)` | :arrow_up: | | [...ger\_bat\_byte\_service/operations/byte\_operations.py](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=tree#diff-dGVzdC92YW5pbGxhL0V4cGVjdGVkL0FjY2VwdGFuY2VUZXN0cy9Cb2R5Qnl0ZS9hdXRvX3Jlc3Rfc3dhZ2dlcl9iYXRfYnl0ZV9zZXJ2aWNlL29wZXJhdGlvbnMvYnl0ZV9vcGVyYXRpb25zLnB5) | `76.84% <0%> (ø)` | :arrow_up: | | [...rvice/operations/http\_client\_failure\_operations.py](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=tree#diff-dGVzdC92YW5pbGxhL0V4cGVjdGVkL0FjY2VwdGFuY2VUZXN0cy9IdHRwL2F1dG9fcmVzdF9odHRwX2luZnJhc3RydWN0dXJlX3Rlc3Rfc2VydmljZS9vcGVyYXRpb25zL2h0dHBfY2xpZW50X2ZhaWx1cmVfb3BlcmF0aW9ucy5weQ==) | `71.54% <0%> (ø)` | :arrow_up: | | [...ed\_host\_test\_client/operations/paths\_operations.py](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=tree#diff-dGVzdC92YW5pbGxhL0V4cGVjdGVkL0FjY2VwdGFuY2VUZXN0cy9DdXN0b21CYXNlVXJpL2F1dG9fcmVzdF9wYXJhbWV0ZXJpemVkX2hvc3RfdGVzdF9jbGllbnQvb3BlcmF0aW9ucy9wYXRoc19vcGVyYXRpb25zLnB5) | `83.33% <0%> (ø)` | :arrow_up: | | [...nal\_test\_service/operations/implicit\_operations.py](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=tree#diff-dGVzdC92YW5pbGxhL0V4cGVjdGVkL0FjY2VwdGFuY2VUZXN0cy9SZXF1aXJlZE9wdGlvbmFsL2F1dG9fcmVzdF9yZXF1aXJlZF9vcHRpb25hbF90ZXN0X3NlcnZpY2Uvb3BlcmF0aW9ucy9pbXBsaWNpdF9vcGVyYXRpb25zLnB5) | `52.5% <0%> (ø)` | :arrow_up: | | [...ionary\_service/operations/dictionary\_operations.py](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=tree#diff-dGVzdC92YW5pbGxhL0V4cGVjdGVkL0FjY2VwdGFuY2VUZXN0cy9Cb2R5RGljdGlvbmFyeS9hdXRvX3Jlc3Rfc3dhZ2dlcl9iYV90ZGljdGlvbmFyeV9zZXJ2aWNlL29wZXJhdGlvbnMvZGljdGlvbmFyeV9vcGVyYXRpb25zLnB5) | `74.49% <0%> (ø)` | :arrow_up: | | [...e\_test\_service/operations/http\_retry\_operations.py](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=tree#diff-dGVzdC92YW5pbGxhL0V4cGVjdGVkL0FjY2VwdGFuY2VUZXN0cy9IdHRwL2F1dG9fcmVzdF9odHRwX2luZnJhc3RydWN0dXJlX3Rlc3Rfc2VydmljZS9vcGVyYXRpb25zL2h0dHBfcmV0cnlfb3BlcmF0aW9ucy5weQ==) | `72.46% <0%> (ø)` | :arrow_up: | | [...t\_service/operations/datetimerfc1123\_operations.py](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=tree#diff-dGVzdC92YW5pbGxhL0V4cGVjdGVkL0FjY2VwdGFuY2VUZXN0cy9Cb2R5RGF0ZVRpbWVSZmMxMTIzL2F1dG9fcmVzdF9yZmMxMTIzX2RhdGVfdGltZV90ZXN0X3NlcnZpY2Uvb3BlcmF0aW9ucy9kYXRldGltZXJmYzExMjNfb3BlcmF0aW9ucy5weQ==) | `74.39% <0%> (ø)` | :arrow_up: | | [...test\_service/operations/polymorphism\_operations.py](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=tree#diff-dGVzdC92YW5pbGxhL0V4cGVjdGVkL0FjY2VwdGFuY2VUZXN0cy9Cb2R5Q29tcGxleC9hdXRvX3Jlc3RfY29tcGxleF90ZXN0X3NlcnZpY2Uvb3BlcmF0aW9ucy9wb2x5bW9ycGhpc21fb3BlcmF0aW9ucy5weQ==) | `71.42% <0%> (ø)` | :arrow_up: | | ... and [45 more](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=tree-more) | | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=footer). Last update [bad8585...42a6a8b](https://codecov.io/gh/Azure/msrest-for-python/pull/53?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/msrest/configuration.py b/msrest/configuration.py index 7b47b39..4b46b56 100644 --- a/msrest/configuration.py +++ b/msrest/configuration.py @@ -44,6 +44,19 @@ from .pipeline import ( from .version import msrest_version +def default_session_configuration_callback(session, global_config, local_config, **kwargs): + """Configuration callback if you need to change default session configuration. + + :param requests.Session session: The session. + :param Configuration global_config: The global configuration. + :param dict local_config: The on-the-fly configuration passed on the call. + :param dict kwargs: The current computed values for session.request method. + :return: Must return kwargs, to be passed to session.request. If None is return, initial kwargs will be used. + :rtype: dict + """ + return kwargs + + class Configuration(object): """Client configuration. @@ -79,6 +92,8 @@ class Configuration(object): # - kwargs['msrest']['session'] with the current session self.hooks = [] + self.session_configuration_callback = default_session_configuration_callback + self._config = configparser.ConfigParser() self._config.optionxform = str diff --git a/msrest/serialization.py b/msrest/serialization.py index 1902ca2..cc03063 100644 --- a/msrest/serialization.py +++ b/msrest/serialization.py @@ -350,6 +350,7 @@ class Serializer(object): } self.dependencies = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer + self.client_side_validation = True def _serialize(self, target_obj, data_type=None, **kwargs): """Serialize data into a string according to type. @@ -440,9 +441,10 @@ class Serializer(object): raise_with_traceback( SerializationError, "Unable to build a model: "+str(err), err) - errors = _recursive_validate(data_type, data) - if errors: - raise errors[0] + if self.client_side_validation: + errors = _recursive_validate(data_type, data) + if errors: + raise errors[0] return self._serialize(data, data_type, **kwargs) def url(self, name, data, data_type, **kwargs): @@ -454,7 +456,8 @@ class Serializer(object): :raises: TypeError if serialization fails. :raises: ValueError if data is None """ - data = self.validate(data, name, required=True, **kwargs) + if self.client_side_validation: + data = self.validate(data, name, required=True, **kwargs) try: output = self.serialize_data(data, data_type, **kwargs) if data_type == 'bool': @@ -478,7 +481,8 @@ class Serializer(object): :raises: TypeError if serialization fails. :raises: ValueError if data is None """ - data = self.validate(data, name, required=True, **kwargs) + if self.client_side_validation: + data = self.validate(data, name, required=True, **kwargs) try: if data_type in ['[str]']: data = ["" if d is None else d for d in data] @@ -504,7 +508,8 @@ class Serializer(object): :raises: TypeError if serialization fails. :raises: ValueError if data is None """ - data = self.validate(data, name, required=True, **kwargs) + if self.client_side_validation: + data = self.validate(data, name, required=True, **kwargs) try: if data_type in ['[str]']: data = ["" if d is None else d for d in data] diff --git a/msrest/service_client.py b/msrest/service_client.py index d0e6fdb..eed50c5 100644 --- a/msrest/service_client.py +++ b/msrest/service_client.py @@ -145,6 +145,11 @@ class ServiceClient(object): for protocol in self._protocols: session.mount(protocol, requests.adapters.HTTPAdapter(max_retries=max_retries)) + + output_kwargs = self.config.session_configuration_callback(session, self.config, config, **kwargs) + if output_kwargs is not None: + kwargs = output_kwargs + return kwargs def send_formdata(self, request, headers=None, content=None, **config):
Add support to disable validation on the runtime side Should be a flag in configuration to disable runtime validation. This flag should be default to `client-side-validation` value from Autorest: https://github.com/Azure/autorest/issues/1583#issuecomment-311142690 FYI @matthchr
Azure/msrest-for-python
diff --git a/tests/test_client.py b/tests/test_client.py index 8e73444..ee10d48 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -50,6 +50,22 @@ class TestServiceClient(unittest.TestCase): self.creds = mock.create_autospec(OAuthTokenAuthentication) return super(TestServiceClient, self).setUp() + def test_session_callback(self): + + client = ServiceClient(self.creds, self.cfg) + local_session = requests.Session() + + def callback(session, global_config, local_config, **kwargs): + self.assertIs(session, local_session) + self.assertIs(global_config, self.cfg) + self.assertTrue(local_config["test"]) + return {'used_callback': True} + + self.cfg.session_configuration_callback = callback + + output_kwargs = client._configure_session(local_session, **{"test": True}) + self.assertTrue(output_kwargs['used_callback']) + def test_client_request(self): client = ServiceClient(self.creds, self.cfg) diff --git a/tests/test_serialization.py b/tests/test_serialization.py index c6cf07d..4d6a80a 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -172,6 +172,32 @@ class TestRuntimeSerialized(unittest.TestCase): self.s = Serializer({'TestObj': self.TestObj}) return super(TestRuntimeSerialized, self).setUp() + def test_validation_flag(self): + s = Serializer() + s.client_side_validation = True + + with self.assertRaises(ValidationError): + s.query("filter", "", "str", min_length=666) + with self.assertRaises(ValidationError): + s.url("filter", "", "str", min_length=666) + with self.assertRaises(ValidationError): + s.header("filter", "", "str", min_length=666) + + test_obj = self.TestObj() + self.TestObj._validation = { + 'attr_b': {'required': True}, + } + test_obj.attr_b = None + + with self.assertRaises(ValidationError): + self.s.body(test_obj, 'TestObj') + + s.client_side_validation = False + s.query("filter", "", "str", min_length=666) + s.url("filter", "", "str", min_length=666) + s.header("filter", "", "str", min_length=666) + s.body(test_obj, 'TestObj') + def test_serialize_direct_model(self): testobj = self.TestObj() testobj.attr_a = "myid"
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_hyperlinks", "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 2, "test_score": 0 }, "num_modified_files": 3 }
0.4
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "pytest" ], "pre_install": null, "python": "3.6", "reqs_path": [ "dev_requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work certifi==2021.5.30 charset-normalizer==2.0.12 idna==3.10 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work isodate==0.6.1 more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work -e git+https://github.com/Azure/msrest-for-python.git@bad8585bcbe5f92f3b2c892c8b373ee367dff70f#egg=msrest oauthlib==3.2.2 packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work pytest==6.2.4 requests==2.27.1 requests-oauthlib==2.0.0 six==1.17.0 toml @ file:///tmp/build/80754af9/toml_1616166611790/work typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work urllib3==1.26.20 zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work
name: msrest-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=21.4.0=pyhd3eb1b0_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - importlib-metadata=4.8.1=py36h06a4308_0 - importlib_metadata=4.8.1=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - more-itertools=8.12.0=pyhd3eb1b0_0 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=21.3=pyhd3eb1b0_0 - pip=21.2.2=py36h06a4308_0 - pluggy=0.13.1=py36h06a4308_0 - py=1.11.0=pyhd3eb1b0_0 - pyparsing=3.0.4=pyhd3eb1b0_0 - pytest=6.2.4=py36h06a4308_2 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - toml=0.10.2=pyhd3eb1b0_0 - typing_extensions=4.1.1=pyh06a4308_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zipp=3.6.0=pyhd3eb1b0_0 - zlib=1.2.13=h5eee18b_1 - pip: - charset-normalizer==2.0.12 - idna==3.10 - isodate==0.6.1 - oauthlib==3.2.2 - requests==2.27.1 - requests-oauthlib==2.0.0 - six==1.17.0 - urllib3==1.26.20 prefix: /opt/conda/envs/msrest-for-python
[ "tests/test_client.py::TestServiceClient::test_session_callback", "tests/test_serialization.py::TestRuntimeSerialized::test_validation_flag" ]
[]
[ "tests/test_client.py::TestServiceClient::test_client_formdata_send", "tests/test_client.py::TestServiceClient::test_client_header", "tests/test_client.py::TestServiceClient::test_client_request", "tests/test_client.py::TestServiceClient::test_client_send", "tests/test_client.py::TestServiceClient::test_format_data", "tests/test_client.py::TestServiceClient::test_format_url", "tests/test_serialization.py::TestModelDeserialization::test_response", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_dict_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_duration", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_enum", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_int", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_none", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_sequence", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_str", "tests/test_serialization.py::TestRuntimeSerialized::test_empty_list", "tests/test_serialization.py::TestRuntimeSerialized::test_key_type", "tests/test_serialization.py::TestRuntimeSerialized::test_model_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_serialize_none", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_mismatched_map", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_without_attr_map", "tests/test_serialization.py::TestRuntimeSerialized::test_polymorphic_serialization", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_datetime", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_direct_model", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_empty_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_json_obj", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_object", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_primitive_types", "tests/test_serialization.py::TestRuntimeSerialized::test_validate", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_int", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_in_list", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_none", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_str", "tests/test_serialization.py::TestRuntimeDeserialized::test_basic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_cls_method_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_datetime", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_object", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_storage", "tests/test_serialization.py::TestRuntimeDeserialized::test_invalid_json", "tests/test_serialization.py::TestRuntimeDeserialized::test_non_obj_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_no_attr", "tests/test_serialization.py::TestRuntimeDeserialized::test_personalize_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization_with_escape", "tests/test_serialization.py::TestRuntimeDeserialized::test_robust_deserialization", "tests/test_serialization.py::TestModelInstanceEquality::test_model_instance_equality" ]
[]
MIT License
null
Azure__msrest-for-python-54
36172c1011c1a6b62eb57f7608ef571b71747a1a
2017-09-28 18:30:24
24deba7a7a9e335314058ec2d0b39a710f61be60
diff --git a/msrest/serialization.py b/msrest/serialization.py index cc03063..61e811f 100644 --- a/msrest/serialization.py +++ b/msrest/serialization.py @@ -623,6 +623,8 @@ class Serializer(object): in the iterable into a combined string. Default is 'None'. :rtype: list, str """ + if isinstance(data, str): + raise SerializationError("Refuse str type as a valid iter type.") serialized = [] for d in data: try:
Should refuse a string as a valid list of string Ends up in the portal as ['a','b','c'] if we use `Model('abc')` instead of `Model(['abc'])`. Should fail, accepting a string for a list of string is likely an error and not a feature. See https://github.com/Azure/azure-sdk-for-python/issues/1376#issuecomment-323409463
Azure/msrest-for-python
diff --git a/tests/test_serialization.py b/tests/test_serialization.py index 4d6a80a..39f2878 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -736,6 +736,10 @@ class TestRuntimeSerialized(unittest.TestCase): b = self.s.serialize_iter([], 'int') self.assertEqual(b, []) + def test_serialize_str_as_iter(self): + with self.assertRaises(SerializationError): + self.s.serialize_iter("I am a string", 'str') + def test_serialize_json_obj(self): class ComplexId(Model):
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 1, "test_score": 2 }, "num_modified_files": 1 }
0.4
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest_v2", "no_use_env": null, "packages": "requirements.txt", "pip_packages": null, "pre_install": null, "python": "3.6", "reqs_path": [ "dev_requirements.txt" ], "test_cmd": "pytest -xvs" }
attrs==22.2.0 certifi==2021.5.30 charset-normalizer==2.0.12 coverage==6.2 httpretty==1.1.4 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.6.1 -e git+https://github.com/Azure/msrest-for-python.git@36172c1011c1a6b62eb57f7608ef571b71747a1a#egg=msrest oauthlib==3.2.2 packaging==21.3 pluggy==1.0.0 py==1.11.0 pyparsing==3.1.4 pytest==7.0.1 pytest-cov==4.0.0 requests==2.27.1 requests-oauthlib==2.0.0 six==1.17.0 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.26.20 zipp==3.6.0
name: msrest-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - attrs==22.2.0 - charset-normalizer==2.0.12 - coverage==6.2 - httpretty==1.1.4 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.6.1 - oauthlib==3.2.2 - packaging==21.3 - pluggy==1.0.0 - py==1.11.0 - pyparsing==3.1.4 - pytest==7.0.1 - pytest-cov==4.0.0 - requests==2.27.1 - requests-oauthlib==2.0.0 - six==1.17.0 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.26.20 - zipp==3.6.0 prefix: /opt/conda/envs/msrest-for-python
[ "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_str_as_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_validation_flag", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_int", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_in_list", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_none", "tests/test_serialization.py::TestRuntimeDeserialized::test_attr_str", "tests/test_serialization.py::TestRuntimeDeserialized::test_basic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_cls_method_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_datetime", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_object", "tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_storage", "tests/test_serialization.py::TestRuntimeDeserialized::test_invalid_json", "tests/test_serialization.py::TestRuntimeDeserialized::test_non_obj_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_no_attr", "tests/test_serialization.py::TestRuntimeDeserialized::test_personalize_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization", "tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization_with_escape", "tests/test_serialization.py::TestRuntimeDeserialized::test_robust_deserialization", "tests/test_serialization.py::TestModelInstanceEquality::test_model_instance_equality" ]
[]
[ "tests/test_serialization.py::TestModelDeserialization::test_response", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_bool", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_dict_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_duration", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_enum", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_int", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_complex", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_simple", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_none", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_sequence", "tests/test_serialization.py::TestRuntimeSerialized::test_attr_str", "tests/test_serialization.py::TestRuntimeSerialized::test_empty_list", "tests/test_serialization.py::TestRuntimeSerialized::test_key_type", "tests/test_serialization.py::TestRuntimeSerialized::test_model_validate", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_serialize_none", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_malformed_map", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_mismatched_map", "tests/test_serialization.py::TestRuntimeSerialized::test_obj_without_attr_map", "tests/test_serialization.py::TestRuntimeSerialized::test_polymorphic_serialization", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_datetime", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_direct_model", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_empty_iter", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_json_obj", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_object", "tests/test_serialization.py::TestRuntimeSerialized::test_serialize_primitive_types" ]
[]
MIT License
null
Azure__msrest-for-python-55
bb876c23427448d293c793e16d415971eb1753bc
2017-09-28 19:26:51
24deba7a7a9e335314058ec2d0b39a710f61be60
diff --git a/msrest/exceptions.py b/msrest/exceptions.py index 6ac7dcc..3b8788e 100644 --- a/msrest/exceptions.py +++ b/msrest/exceptions.py @@ -136,7 +136,13 @@ class HttpOperationError(ClientException): self.error = deserialize(resp_type, response) if self.error is None: self.error = deserialize.dependencies[resp_type]() - self.message = self.error.message + # ARM uses OData v4 + # http://docs.oasis-open.org/odata/odata-json-format/v4.0/os/odata-json-format-v4.0-os.html#_Toc372793091 + # Code and Message are REQUIRED + self.message = "({}) {}".format( + self.error.error.code, + self.error.error.message + ) except (DeserializationError, AttributeError, KeyError): pass
Improve exception string if custom exception Example, with this: https://github.com/Azure/azure-sdk-for-python/blob/master/azure-mgmt-billing/azure/mgmt/billing/models/error_response.py And this answer: ```python { "error": { "code": "NotOptedIn", "message": "You are not allowed to download invoices. Please contact your account administrator (ptvsazure@outlook.com) to turn on access in the management portal for allowing to download invoices through the API." } } ``` We should have something better than: ```python D:\VEnvs\AzureCli\Lib\site-packages\azure\mgmt\billing\operations\invoices_operations.py in internal_paging(next_link, raw) 110 111 if response.status_code not in [200]: --> 112 raise models.ErrorResponseException(self._deserialize, response) 113 114 return response ErrorResponseException: Operation returned an invalid status code 'Unauthorized' ``` We loose the message
Azure/msrest-for-python
diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py new file mode 100644 index 0000000..2995593 --- /dev/null +++ b/tests/test_exceptions.py @@ -0,0 +1,92 @@ +#-------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# +#-------------------------------------------------------------------------- +import json +import unittest +try: + from unittest import mock +except ImportError: + import mock + +import requests + +from msrest.serialization import Model, Deserializer +from msrest.exceptions import HttpOperationError + + +class TestExceptions(unittest.TestCase): + + def test_custom_exception(self): + + class ErrorResponse(Model): + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + def __init__(self, error=None): + self.error = error + + + class ErrorResponseException(HttpOperationError): + def __init__(self, deserialize, response, *args): + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + class ErrorDetails(Model): + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self): + self.code = None + self.message = None + self.target = None + + deserializer = Deserializer({ + 'ErrorResponse': ErrorResponse, + 'ErrorDetails': ErrorDetails + }) + + response = mock.create_autospec(requests.Response) + response.text = json.dumps( + { + "error": { + "code": "NotOptedIn", + "message": "You are not allowed to download invoices. Please contact your account administrator (ptvsazure@outlook.com) to turn on access in the management portal for allowing to download invoices through the API." + } + } + ) + response.headers = {"content-type": "application/json; charset=utf8"} + + excep = ErrorResponseException(deserializer, response) + + self.assertIn("NotOptedIn", str(excep)) + self.assertIn("You are not allowed to download invoices", str(excep))
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 0, "test_score": 2 }, "num_modified_files": 1 }
0.4
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest", "pytest-cov" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.9", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
certifi==2025.1.31 charset-normalizer==3.4.1 coverage==7.8.0 exceptiongroup==1.2.2 idna==3.10 iniconfig==2.1.0 isodate==0.7.2 -e git+https://github.com/Azure/msrest-for-python.git@bb876c23427448d293c793e16d415971eb1753bc#egg=msrest oauthlib==3.2.2 packaging==24.2 pluggy==1.5.0 pytest==8.3.5 pytest-cov==6.0.0 requests==2.32.3 requests-oauthlib==2.0.0 tomli==2.2.1 urllib3==2.3.0
name: msrest-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tzdata=2025a=h04d1e81_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - certifi==2025.1.31 - charset-normalizer==3.4.1 - coverage==7.8.0 - exceptiongroup==1.2.2 - idna==3.10 - iniconfig==2.1.0 - isodate==0.7.2 - oauthlib==3.2.2 - packaging==24.2 - pluggy==1.5.0 - pytest==8.3.5 - pytest-cov==6.0.0 - requests==2.32.3 - requests-oauthlib==2.0.0 - tomli==2.2.1 - urllib3==2.3.0 prefix: /opt/conda/envs/msrest-for-python
[ "tests/test_exceptions.py::TestExceptions::test_custom_exception" ]
[]
[]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_msrest-for-python-55
Azure__msrest-for-python-62
a34b2d5521e9fa12f3b9d40c42ed783c06afedf1
2017-10-12 21:12:34
24deba7a7a9e335314058ec2d0b39a710f61be60
diff --git a/msrest/authentication.py b/msrest/authentication.py index 48c90ae..8d21624 100644 --- a/msrest/authentication.py +++ b/msrest/authentication.py @@ -79,6 +79,14 @@ class BasicTokenAuthentication(Authentication): self.scheme = 'Bearer' self.token = token + def set_token(self): + """Should be used to define the self.token attribute. + + In this implementation, does nothing since the token is statically provided + at creation. + """ + pass + def signed_session(self): """Create requests session with any required auth headers applied. @@ -91,7 +99,7 @@ class BasicTokenAuthentication(Authentication): return session -class OAuthTokenAuthentication(Authentication): +class OAuthTokenAuthentication(BasicTokenAuthentication): """OAuth Token Authentication. Requires that supplied token contains an expires_in field.
Make BasicTokenAuthentication the new base class of OAuthTokenAuthentication To enable some KV scenarios releated to MSI
Azure/msrest-for-python
diff --git a/tests/test_auth.py b/tests/test_auth.py index e573a02..32f67f5 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -39,6 +39,7 @@ except ImportError: from msrest.authentication import ( BasicAuthentication, + BasicTokenAuthentication, OAuthTokenAuthentication) from requests import Request @@ -71,6 +72,19 @@ class TestAuthentication(unittest.TestCase): self.assertTrue('Authorization' in req.headers) self.assertTrue(req.headers['Authorization'].startswith('Basic ')) + def test_basic_token_auth(self): + + token = { + 'access_token': '123456789' + } + basic = BasicTokenAuthentication(token) + basic.set_token() # Just check that this does not raise + session = basic.signed_session() + + req = session.prepare_request(self.request) + self.assertTrue('Authorization' in req.headers) + self.assertEquals(req.headers['Authorization'], 'Bearer 123456789') + def test_token_auth(self): token = {"my_token":123}
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_short_problem_statement" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 1, "test_score": 0 }, "num_modified_files": 1 }
0.4
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest", "pytest-cov" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.9", "reqs_path": [ "dev_requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
certifi==2025.1.31 charset-normalizer==3.4.1 coverage==7.8.0 exceptiongroup==1.2.2 httpretty==1.1.4 idna==3.10 iniconfig==2.1.0 isodate==0.7.2 -e git+https://github.com/Azure/msrest-for-python.git@a34b2d5521e9fa12f3b9d40c42ed783c06afedf1#egg=msrest oauthlib==3.2.2 packaging==24.2 pluggy==1.5.0 pytest==8.3.5 pytest-cov==6.0.0 requests==2.32.3 requests-oauthlib==2.0.0 tomli==2.2.1 urllib3==2.3.0
name: msrest-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tzdata=2025a=h04d1e81_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - certifi==2025.1.31 - charset-normalizer==3.4.1 - coverage==7.8.0 - exceptiongroup==1.2.2 - httpretty==1.1.4 - idna==3.10 - iniconfig==2.1.0 - isodate==0.7.2 - oauthlib==3.2.2 - packaging==24.2 - pluggy==1.5.0 - pytest==8.3.5 - pytest-cov==6.0.0 - requests==2.32.3 - requests-oauthlib==2.0.0 - tomli==2.2.1 - urllib3==2.3.0 prefix: /opt/conda/envs/msrest-for-python
[ "tests/test_auth.py::TestAuthentication::test_basic_token_auth" ]
[]
[ "tests/test_auth.py::TestAuthentication::test_basic_auth", "tests/test_auth.py::TestAuthentication::test_token_auth" ]
[]
MIT License
null
Azure__msrest-for-python-67
24deba7a7a9e335314058ec2d0b39a710f61be60
2017-11-20 21:05:32
24deba7a7a9e335314058ec2d0b39a710f61be60
diff --git a/msrest/service_client.py b/msrest/service_client.py index eed50c5..d86fcbb 100644 --- a/msrest/service_client.py +++ b/msrest/service_client.py @@ -164,10 +164,15 @@ class ServiceClient(object): """ if content is None: content = {} - file_data = {f: self._format_data(d) for f, d in content.items()} - if headers: - headers.pop('Content-Type', None) - return self.send(request, headers, None, files=file_data, **config) + content_type = headers.pop('Content-Type', None) if headers else None + + if content_type and content_type.lower() == 'application/x-www-form-urlencoded': + # Do NOT use "add_content" that assumes input is JSON + request.data = {f: d for f, d in content.items() if d is not None} + return self.send(request, headers, None, **config) + else: # Assume "multipart/form-data" + file_data = {f: self._format_data(d) for f, d in content.items() if d is not None} + return self.send(request, headers, None, files=file_data, **config) def send(self, request, headers=None, content=None, **config): """Prepare and send request object according to configuration.
Optional formData parameters crash msrest If a parameter that is supposed to be formData is optional, we give `None` to requests: ```python files = [('Text', (None, 'cognituve services')), ('Mode', (None, None)), ('PreContextText', (None, None)), ('PostContextText', (None, None))] data = {} @staticmethod def _encode_files(files, data): """Build the body for a multipart/form-data request. Will successfully encode files when passed as a dict or a list of tuples. Order is retained if data is a list of tuples but arbitrary if parameters are supplied as a dict. The tuples may be 2-tuples (filename, fileobj), 3-tuples (filename, fileobj, contentype) or 4-tuples (filename, fileobj, contentype, custom_headers). """ if (not files): raise ValueError("Files must be provided.") elif isinstance(data, basestring): raise ValueError("Data must not be a string.") new_fields = [] fields = to_key_val_list(data or {}) files = to_key_val_list(files or {}) for field, val in fields: if isinstance(val, basestring) or not hasattr(val, '__iter__'): val = [val] for v in val: if v is not None: # Don't call str() on bytestrings: in Py3 it all goes wrong. if not isinstance(v, bytes): v = str(v) new_fields.append( (field.decode('utf-8') if isinstance(field, bytes) else field, v.encode('utf-8') if isinstance(v, str) else v)) for (k, v) in files: # support for explicit filename ft = None fh = None if isinstance(v, (tuple, list)): if len(v) == 2: fn, fp = v elif len(v) == 3: fn, fp, ft = v else: fn, fp, ft, fh = v else: fn = guess_filename(v) or k fp = v if isinstance(fp, (str, bytes, bytearray)): fdata = fp else: > fdata = fp.read() E AttributeError: 'NoneType' object has no attribute 'read' ```
Azure/msrest-for-python
diff --git a/tests/test_client.py b/tests/test_client.py index ee10d48..650eac5 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -204,6 +204,17 @@ class TestServiceClient(unittest.TestCase): ServiceClient.send_formdata(mock_client, request, {'Content-Type':'1234'}, {'1':'1', '2':'2'}) mock_client.send.assert_called_with(request, {}, None, files={'1':'formatted', '2':'formatted'}) + ServiceClient.send_formdata(mock_client, request, {'Content-Type':'1234'}, {'1':'1', '2':None}) + mock_client.send.assert_called_with(request, {}, None, files={'1':'formatted'}) + + ServiceClient.send_formdata(mock_client, request, {'Content-Type':'application/x-www-form-urlencoded'}, {'1':'1', '2':'2'}) + mock_client.send.assert_called_with(request, {}, None) + self.assertEqual(request.data, {'1':'1', '2':'2'}) + + ServiceClient.send_formdata(mock_client, request, {'Content-Type':'application/x-www-form-urlencoded'}, {'1':'1', '2':None}) + mock_client.send.assert_called_with(request, {}, None) + self.assertEqual(request.data, {'1':'1'}) + def test_format_data(self): mock_client = mock.create_autospec(ServiceClient)
{ "commit_name": "head_commit", "failed_lite_validators": [], "has_test_patch": true, "is_lite": true, "llm_score": { "difficulty_score": 1, "issue_text_score": 0, "test_score": 0 }, "num_modified_files": 1 }
0.4
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest", "numpy>=1.16.0", "pandas>=1.0.0" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.9", "reqs_path": [ "requirements/base.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
certifi==2025.1.31 charset-normalizer==3.4.1 exceptiongroup==1.2.2 idna==3.10 iniconfig==2.1.0 isodate==0.7.2 -e git+https://github.com/Azure/msrest-for-python.git@24deba7a7a9e335314058ec2d0b39a710f61be60#egg=msrest numpy==2.0.2 oauthlib==3.2.2 packaging==24.2 pandas==2.2.3 pluggy==1.5.0 pytest==8.3.5 python-dateutil==2.9.0.post0 pytz==2025.2 requests==2.32.3 requests-oauthlib==2.0.0 six==1.17.0 tomli==2.2.1 tzdata==2025.2 urllib3==2.3.0
name: msrest-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - certifi==2025.1.31 - charset-normalizer==3.4.1 - exceptiongroup==1.2.2 - idna==3.10 - iniconfig==2.1.0 - isodate==0.7.2 - numpy==2.0.2 - oauthlib==3.2.2 - packaging==24.2 - pandas==2.2.3 - pluggy==1.5.0 - pytest==8.3.5 - python-dateutil==2.9.0.post0 - pytz==2025.2 - requests==2.32.3 - requests-oauthlib==2.0.0 - six==1.17.0 - tomli==2.2.1 - tzdata==2025.2 - urllib3==2.3.0 prefix: /opt/conda/envs/msrest-for-python
[ "tests/test_client.py::TestServiceClient::test_client_formdata_send" ]
[]
[ "tests/test_client.py::TestServiceClient::test_client_header", "tests/test_client.py::TestServiceClient::test_client_request", "tests/test_client.py::TestServiceClient::test_client_send", "tests/test_client.py::TestServiceClient::test_format_data", "tests/test_client.py::TestServiceClient::test_format_url", "tests/test_client.py::TestServiceClient::test_session_callback" ]
[]
MIT License
null
Azure__msrestazure-for-python-107
bc59bae35d784f0aad8d1e26ebfd9c20897dca46
2018-07-02 21:27:59
0f372b60f9add4c245c323e24acca038936e472f
diff --git a/msrestazure/azure_active_directory.py b/msrestazure/azure_active_directory.py index 48ac41c..88c3744 100644 --- a/msrestazure/azure_active_directory.py +++ b/msrestazure/azure_active_directory.py @@ -685,6 +685,8 @@ class MSIAuthentication(BasicTokenAuthentication): elif "MSI_ENDPOINT" not in os.environ: # Use IMDS if no MSI_ENDPOINT self._vm_msi = _ImdsTokenProvider(self.resource, self.msi_conf) + # Follow the same convention as all Credentials class to check for the token at creation time #106 + self.set_token() def set_token(self): if _is_app_service():
MSIAuthentication should set toekn on instance creation All msrestazure instance set the token on instance creation, except MSIAuthentication. This presents a few issues: - Unlike all other usages, authentication exception will be raised at usage, not at creation level - This creates weird bug in KeyVault which is doing some magic inside credentials: https://github.com/Azure/azure-sdk-for-python/issues/2852
Azure/msrestazure-for-python
diff --git a/tests/test_auth.py b/tests/test_auth.py index ed5ae77..56baf9c 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -240,7 +240,7 @@ class TestServicePrincipalCredentials(unittest.TestCase): ServicePrincipalCredentials, '_setup_session', return_value=session): proxies = {'http': 'http://myproxy:80'} - creds = ServicePrincipalCredentials("client_id", "secret", + creds = ServicePrincipalCredentials("client_id", "secret", verify=False, tenant="private", proxies=proxies) @@ -311,7 +311,7 @@ class TestServicePrincipalCredentials(unittest.TestCase): UserPassCredentials, '_setup_session', return_value=session): proxies = {'http': 'http://myproxy:8080'} - creds = UserPassCredentials("my_username", "my_password", + creds = UserPassCredentials("my_username", "my_password", verify=False, tenant="private", resource='resource', proxies=proxies) @@ -381,7 +381,7 @@ class TestServicePrincipalCredentials(unittest.TestCase): assert token_type == "TokenType" assert access_token == "AccessToken" assert token_entry == json_payload - + httpretty.register_uri(httpretty.POST, 'http://localhost:42/oauth2/token', status=503, @@ -419,10 +419,9 @@ class TestServicePrincipalCredentials(unittest.TestCase): content_type="application/json") credentials = MSIAuthentication() - credentials.set_token() assert credentials.scheme == "TokenTypeIMDS" assert credentials.token == json_payload - + # Test MSIAuthentication with MSI_ENDPOINT and no APPSETTING_WEBSITE_SITE_NAME is MSI_ENDPOINT json_payload = { @@ -436,7 +435,6 @@ class TestServicePrincipalCredentials(unittest.TestCase): with mock.patch('os.environ', {'MSI_ENDPOINT': 'http://random.org/yadadada'}): credentials = MSIAuthentication() - credentials.set_token() assert credentials.scheme == "TokenTypeMSI_ENDPOINT" assert credentials.token == json_payload @@ -458,14 +456,13 @@ class TestServicePrincipalCredentials(unittest.TestCase): } with mock.patch.dict('os.environ', app_service_env): credentials = MSIAuthentication(resource="foo") - credentials.set_token() assert credentials.scheme == "TokenTypeWebApp" assert credentials.token == json_payload @httpretty.activate def test_msi_vm_imds_retry(self): - + json_payload = { 'token_type': "TokenTypeIMDS", "access_token": "AccessToken" @@ -484,20 +481,18 @@ class TestServicePrincipalCredentials(unittest.TestCase): body=json.dumps(json_payload), content_type="application/json") credentials = MSIAuthentication() - credentials.set_token() assert credentials.scheme == "TokenTypeIMDS" assert credentials.token == json_payload @httpretty.activate def test_msi_vm_imds_no_retry_on_bad_error(self): - + httpretty.register_uri(httpretty.GET, 'http://169.254.169.254/metadata/identity/oauth2/token', status=499) - credentials = MSIAuthentication() with self.assertRaises(HTTPError) as cm: - credentials.set_token() + credentials = MSIAuthentication() @pytest.mark.slow @@ -515,7 +510,7 @@ def test_refresh_userpassword_no_common_session(user_password): # Hacking the token time creds.token['expires_on'] = time.time() - 10 creds.token['expires_at'] = creds.token['expires_on'] - + try: session = creds.signed_session() response = session.get("https://management.azure.com/subscriptions?api-version=2016-06-01") @@ -541,7 +536,7 @@ def test_refresh_userpassword_common_session(user_password): # Hacking the token time creds.token['expires_on'] = time.time() - 10 creds.token['expires_at'] = creds.token['expires_on'] - + try: session = creds.signed_session(root_session) response = session.get("https://management.azure.com/subscriptions?api-version=2016-06-01") @@ -573,7 +568,7 @@ def test_refresh_aadtokencredentials_no_common_session(user_password): # Hacking the token time creds.token['expires_on'] = time.time() - 10 creds.token['expires_at'] = creds.token['expires_on'] - + try: session = creds.signed_session() response = session.get("https://management.azure.com/subscriptions?api-version=2016-06-01") @@ -607,7 +602,7 @@ def test_refresh_aadtokencredentials_common_session(user_password): # Hacking the token time creds.token['expires_on'] = time.time() - 10 creds.token['expires_at'] = creds.token['expires_on'] - + try: session = creds.signed_session(root_session) response = session.get("https://management.azure.com/subscriptions?api-version=2016-06-01")
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 2, "test_score": 0 }, "num_modified_files": 1 }
0.4
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "mock", "httpretty", "pytest", "pytest-cov", "pylint" ], "pre_install": [ "apt-get update", "apt-get install -y gcc libunwind8-dev" ], "python": "3.6", "reqs_path": [ "dev_requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 astroid==2.11.7 attrs==22.2.0 azure-core==1.24.2 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 coverage==6.2 cryptography==40.0.2 dill==0.3.4 httpretty==1.1.4 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.6.1 isort==5.10.1 jeepney==0.7.1 keyring==23.4.1 lazy-object-proxy==1.7.1 mccabe==0.7.0 mock==5.2.0 msrest==0.7.1 -e git+https://github.com/Azure/msrestazure-for-python.git@bc59bae35d784f0aad8d1e26ebfd9c20897dca46#egg=msrestazure oauthlib==3.2.2 packaging==21.3 platformdirs==2.4.0 pluggy==1.0.0 py==1.11.0 pycparser==2.21 PyJWT==2.4.0 pylint==2.13.9 pyparsing==3.1.4 pytest==7.0.1 pytest-cov==4.0.0 python-dateutil==2.9.0.post0 requests==2.27.1 requests-oauthlib==2.0.0 SecretStorage==3.3.3 six==1.17.0 tomli==1.2.3 typed-ast==1.5.5 typing_extensions==4.1.1 urllib3==1.26.20 wrapt==1.16.0 zipp==3.6.0
name: msrestazure-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - astroid==2.11.7 - attrs==22.2.0 - azure-core==1.24.2 - cffi==1.15.1 - charset-normalizer==2.0.12 - coverage==6.2 - cryptography==40.0.2 - dill==0.3.4 - httpretty==1.1.4 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.6.1 - isort==5.10.1 - jeepney==0.7.1 - keyring==23.4.1 - lazy-object-proxy==1.7.1 - mccabe==0.7.0 - mock==5.2.0 - msrest==0.7.1 - oauthlib==3.2.2 - packaging==21.3 - platformdirs==2.4.0 - pluggy==1.0.0 - py==1.11.0 - pycparser==2.21 - pyjwt==2.4.0 - pylint==2.13.9 - pyparsing==3.1.4 - pytest==7.0.1 - pytest-cov==4.0.0 - python-dateutil==2.9.0.post0 - requests==2.27.1 - requests-oauthlib==2.0.0 - secretstorage==3.3.3 - six==1.17.0 - tomli==1.2.3 - typed-ast==1.5.5 - typing-extensions==4.1.1 - urllib3==1.26.20 - wrapt==1.16.0 - zipp==3.6.0 prefix: /opt/conda/envs/msrestazure-for-python
[ "tests/test_auth.py::TestServicePrincipalCredentials::test_msi_vm", "tests/test_auth.py::TestServicePrincipalCredentials::test_msi_vm_imds_no_retry_on_bad_error", "tests/test_auth.py::TestServicePrincipalCredentials::test_msi_vm_imds_retry" ]
[]
[ "tests/test_auth.py::TestServicePrincipalCredentials::test_adal_authentication", "tests/test_auth.py::TestServicePrincipalCredentials::test_check_state", "tests/test_auth.py::TestServicePrincipalCredentials::test_clear_token", "tests/test_auth.py::TestServicePrincipalCredentials::test_convert_token", "tests/test_auth.py::TestServicePrincipalCredentials::test_credentials_get_stored_auth", "tests/test_auth.py::TestServicePrincipalCredentials::test_credentials_retrieve_session", "tests/test_auth.py::TestServicePrincipalCredentials::test_http", "tests/test_auth.py::TestServicePrincipalCredentials::test_https", "tests/test_auth.py::TestServicePrincipalCredentials::test_service_principal", "tests/test_auth.py::TestServicePrincipalCredentials::test_store_token", "tests/test_auth.py::TestServicePrincipalCredentials::test_store_token_boom", "tests/test_auth.py::TestServicePrincipalCredentials::test_user_pass_credentials" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_msrestazure-for-python-107
Azure__msrestazure-for-python-121
ca3dceee99aee5aa4e5a25ec20c1794440510011
2018-10-31 16:52:14
ca3dceee99aee5aa4e5a25ec20c1794440510011
diff --git a/msrestazure/polling/arm_polling.py b/msrestazure/polling/arm_polling.py index 2f3aa2a..d299e6f 100644 --- a/msrestazure/polling/arm_polling.py +++ b/msrestazure/polling/arm_polling.py @@ -262,7 +262,17 @@ class LongRunningOperation(object): status = self._get_provisioning_state(response) self.status = status or 'Succeeded' - self.resource = self._deserialize(response) + self.parse_resource(response) + + def parse_resource(self, response): + """Assuming this response is a resource, use the deserialization callback to parse it. + If body is empty, assuming no resource to return. + """ + self._raise_if_bad_http_status_and_method(response) + if not self._is_empty(response): + self.resource = self._deserialize(response) + else: + self.resource = None def get_status_from_async(self, response): """Process the latest status update retrieved from a @@ -398,7 +408,7 @@ class ARMPolling(PollingMethod): else: final_get_url = self._operation.initial_response.request.url self._response = self.request_status(final_get_url) - self._operation.get_status_from_resource(self._response) + self._operation.parse_resource(self._response) def _delay(self): """Check for a 'retry-after' header to set timeout,
If final GET on Location is empty, does not necessarily mean there is a problem If Swagger explains to follow Location on final state, and there is not return type, it is expected that the final body is empty. However, msrestazure right now assume this final call must have a body. Fix, update this code: ```python elif self._operation.should_do_final_get(): if self._operation.method == 'POST' and self._operation.location_url: final_get_url = self._operation.location_url else: final_get_url = self._operation.initial_response.request.url self._response = self.request_status(final_get_url) self._operation.get_status_from_resource(self._response) ``` to NOT do a `get_status_from_resource` at the end (we don't care about the status, we know it's right) but something smarter that accept an empty body Will fix https://github.com/Azure/azure-cli/issues/7671
Azure/msrestazure-for-python
diff --git a/tests/test_arm_polling.py b/tests/test_arm_polling.py index affa1fc..94e71d8 100644 --- a/tests/test_arm_polling.py +++ b/tests/test_arm_polling.py @@ -38,7 +38,7 @@ import pytest from requests import Request, Response -from msrest import Deserializer +from msrest import Deserializer, Configuration from msrest.service_client import ServiceClient from msrest.exceptions import DeserializationError from msrest.polling import LROPoller @@ -80,7 +80,7 @@ RESOURCE_URL = 'http://subscriptions/sub1/resourcegroups/g1/resourcetype1/resour ERROR = 'http://dummyurl_ReturnError' POLLING_STATUS = 200 -CLIENT = ServiceClient(None, None) +CLIENT = ServiceClient(None, Configuration("http://example.org")) def mock_send(client_self, request, header_parameters, stream): return TestArmPolling.mock_update(request.url, header_parameters) CLIENT.send = types.MethodType(mock_send, CLIENT) @@ -336,6 +336,9 @@ class TestArmPolling(object): ) class TestServiceClient(ServiceClient): + def __init__(self): + ServiceClient.__init__(self, None, Configuration("http://example.org")) + def send(self, request, headers=None, content=None, **config): assert request.method == 'GET' @@ -359,7 +362,7 @@ class TestArmPolling(object): # Test 1, LRO options with Location final state poll = LROPoller( - TestServiceClient(None, None), + TestServiceClient(), response, deserialization_cb, ARMPolling(0, lro_options={"final-state-via": "location"})) @@ -368,7 +371,7 @@ class TestArmPolling(object): # Test 2, LRO options with Azure-AsyncOperation final state poll = LROPoller( - TestServiceClient(None, None), + TestServiceClient(), response, deserialization_cb, ARMPolling(0, lro_options={"final-state-via": "azure-async-operation"})) @@ -377,13 +380,46 @@ class TestArmPolling(object): # Test 3, backward compat (no options, means "azure-async-operation") poll = LROPoller( - TestServiceClient(None, None), + TestServiceClient(), response, deserialization_cb, ARMPolling(0)) result = poll.result() assert result['status'] == 'Succeeded' + # Test 4, location has no body + + class TestServiceClientNoBody(ServiceClient): + def __init__(self): + ServiceClient.__init__(self, None, Configuration("http://example.org")) + + def send(self, request, headers=None, content=None, **config): + assert request.method == 'GET' + + if request.url == 'http://example.org/location': + return TestArmPolling.mock_send( + 'GET', + 200, + body="" + ) + elif request.url == 'http://example.org/async_monitor': + return TestArmPolling.mock_send( + 'GET', + 200, + body={'status': 'Succeeded'} + ) + else: + pytest.fail("No other query allowed") + + poll = LROPoller( + TestServiceClientNoBody(), + response, + deserialization_cb, + ARMPolling(0, lro_options={"final-state-via": "location"})) + result = poll.result() + assert result is None + + # Former oooooold tests to refactor one day to something more readble # Test throw on non LRO related status code
{ "commit_name": "merge_commit", "failed_lite_validators": [ "has_hyperlinks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 0, "test_score": 0 }, "num_modified_files": 1 }
0.5
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest", "pytest-cov" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.6", "reqs_path": [ "dev_requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 attrs==22.2.0 azure-core==1.24.2 certifi==2021.5.30 cffi==1.15.1 charset-normalizer==2.0.12 coverage==6.2 cryptography==40.0.2 httpretty==1.1.4 idna==3.10 importlib-metadata==4.8.3 iniconfig==1.1.1 isodate==0.6.1 msrest==0.7.1 -e git+https://github.com/Azure/msrestazure-for-python.git@ca3dceee99aee5aa4e5a25ec20c1794440510011#egg=msrestazure oauthlib==3.2.2 packaging==21.3 pluggy==1.0.0 py==1.11.0 pycparser==2.21 PyJWT==2.4.0 pyparsing==3.1.4 pytest==7.0.1 pytest-cov==4.0.0 python-dateutil==2.9.0.post0 requests==2.27.1 requests-oauthlib==2.0.0 six==1.17.0 tomli==1.2.3 typing_extensions==4.1.1 urllib3==1.26.20 zipp==3.6.0
name: msrestazure-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2021.5.30=py36h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=21.2.2=py36h06a4308_0 - python=3.6.13=h12debd9_1 - readline=8.2=h5eee18b_0 - setuptools=58.0.4=py36h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.37.1=pyhd3eb1b0_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - attrs==22.2.0 - azure-core==1.24.2 - cffi==1.15.1 - charset-normalizer==2.0.12 - coverage==6.2 - cryptography==40.0.2 - httpretty==1.1.4 - idna==3.10 - importlib-metadata==4.8.3 - iniconfig==1.1.1 - isodate==0.6.1 - msrest==0.7.1 - oauthlib==3.2.2 - packaging==21.3 - pluggy==1.0.0 - py==1.11.0 - pycparser==2.21 - pyjwt==2.4.0 - pyparsing==3.1.4 - pytest==7.0.1 - pytest-cov==4.0.0 - python-dateutil==2.9.0.post0 - requests==2.27.1 - requests-oauthlib==2.0.0 - six==1.17.0 - tomli==1.2.3 - typing-extensions==4.1.1 - urllib3==1.26.20 - zipp==3.6.0 prefix: /opt/conda/envs/msrestazure-for-python
[ "tests/test_arm_polling.py::TestArmPolling::test_long_running_post" ]
[]
[ "tests/test_arm_polling.py::TestArmPolling::test_long_running_put", "tests/test_arm_polling.py::TestArmPolling::test_long_running_patch", "tests/test_arm_polling.py::TestArmPolling::test_long_running_delete", "tests/test_arm_polling.py::TestArmPolling::test_long_running_negative" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_msrestazure-for-python-121
Azure__msrestazure-for-python-55
005f5a4320385930ba82d4c0e13ce90506884b27
2017-10-30 22:28:54
0f372b60f9add4c245c323e24acca038936e472f
diff --git a/msrestazure/azure_exceptions.py b/msrestazure/azure_exceptions.py index bb85333..5b4792c 100644 --- a/msrestazure/azure_exceptions.py +++ b/msrestazure/azure_exceptions.py @@ -30,6 +30,15 @@ from msrest.exceptions import ClientException from msrest.serialization import Deserializer from msrest.exceptions import DeserializationError +class CloudErrorRoot(object): + """Just match the "error" key at the root of a OdataV4 JSON. + """ + _validation = {} + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorData'}, + } + def __init__(self, error): + self.error = error class CloudErrorData(object): """Cloud Error Data object, deserialized from error data returned @@ -47,7 +56,7 @@ class CloudErrorData(object): def __init__(self, *args, **kwargs): self.error = kwargs.get('error') - self._message = kwargs.get('message') + self.message = kwargs.get('message') self.request_id = None self.error_time = None self.target = kwargs.get('target') @@ -122,7 +131,10 @@ class CloudError(ClientException): """ def __init__(self, response, error=None, *args, **kwargs): - self.deserializer = Deserializer({'CloudErrorData': CloudErrorData}) + self.deserializer = Deserializer({ + 'CloudErrorRoot': CloudErrorRoot, + 'CloudErrorData': CloudErrorData + }) self.error = None self.message = None self.response = response @@ -149,13 +161,7 @@ class CloudError(ClientException): def _build_error_data(self, response): try: - data = response.json() - except ValueError: - data = response - else: - data = data.get('error', data) - try: - self.error = self.deserializer(CloudErrorData(), data) + self.error = self.deserializer('CloudErrorRoot', response).error except DeserializationError: self.error = None else: @@ -178,7 +184,10 @@ class CloudError(ClientException): except ValueError: message = "none" else: - message = data.get("message", self._get_state(data)) + try: + message = data.get("message", self._get_state(data)) + except AttributeError: # data is not a dict, but is a requests.Response parsable as JSON + message = str(response.text) try: response.raise_for_status() except RequestException as err:
CloudError parsing should be resilient if input type is string In so (messy) scenario, we don't receive a dict (from a JSON), but a string. We should be robust to that and print the while string as the error message: ```python msrest.http_logger : b'"{\\"error\\":{\\"code\\":\\"ResourceGroupNotFound\\",\\"message\\":\\"Resource group \'res_grp\' could not be found.\\"}}"' 'str' object has no attribute 'get' Traceback (most recent call last): File "C:\Users\lmazuel\Git\AzureCli\lib\site-packages\azure\cli\main.py", line 36, in main cmd_result = APPLICATION.execute(args) File "C:\Users\lmazuel\Git\AzureCli\lib\site-packages\azure\cli\core\application.py", line 212, in execute result = expanded_arg.func(params) File "C:\Users\lmazuel\Git\AzureCli\lib\site-packages\azure\cli\core\commands\__init__.py", line 377, in __call__ return self.handler(*args, **kwargs) File "C:\Users\lmazuel\Git\AzureCli\lib\site-packages\azure\cli\core\commands\__init__.py", line 620, in _execute_command reraise(*sys.exc_info()) File "C:\Users\lmazuel\Git\AzureCli\lib\site-packages\six.py", line 693, in reraise raise value File "C:\Users\lmazuel\Git\AzureCli\lib\site-packages\azure\cli\core\commands\__init__.py", line 614, in _execute_command return list(result) File "C:\Users\lmazuel\Git\AzureCli\lib\site-packages\msrest\paging.py", line 109, in __next__ self.advance_page() File "C:\Users\lmazuel\Git\AzureCli\lib\site-packages\msrest\paging.py", line 95, in advance_page self._response = self._get_next(self.next_link) File "C:\Users\lmazuel\Git\AzureCli\lib\site-packages\azure\mgmt\compute\v2017_03_30\operations\disks_operations.py", line 441, in internal_paging exp = CloudError(response) File "C:\Users\lmazuel\Git\AzureCli\lib\site-packages\msrestazure\azure_exceptions.py", line 136, in __init__ self._build_error_data(response) File "C:\Users\lmazuel\Git\AzureCli\lib\site-packages\msrestazure\azure_exceptions.py", line 156, in _build_error_data data = data.get('error', data) AttributeError: 'str' object has no attribute 'get' ```
Azure/msrestazure-for-python
diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py index 2506a9c..45a4770 100644 --- a/tests/test_exceptions.py +++ b/tests/test_exceptions.py @@ -125,20 +125,6 @@ class TestCloudException(unittest.TestCase): response.headers = {"content-type": "application/json; charset=utf8"} response.reason = 'BadRequest' - message = { - 'code': '500', - 'message': {'value': 'Bad Request\nRequest:34875\nTime:1999-12-31T23:59:59-23:59'}, - 'values': {'invalid_attribute':'data'} - } - - response.text = json.dumps(message) - response.json = lambda: json.loads(response.text) - - error = CloudError(response) - self.assertEqual(error.message, 'Bad Request') - self.assertEqual(error.status_code, 400) - self.assertIsInstance(error.error, CloudErrorData) - message = { 'error': { 'code': '500', 'message': {'value': 'Bad Request\nRequest:34875\nTime:1999-12-31T23:59:59-23:59'}, @@ -146,6 +132,7 @@ class TestCloudException(unittest.TestCase): }} response.text = json.dumps(message) + response.json = lambda: json.loads(response.text) error = CloudError(response) self.assertEqual(error.message, 'Bad Request') self.assertEqual(error.status_code, 400) @@ -175,9 +162,9 @@ class TestCloudException(unittest.TestCase): response.text = '{\r\n "odata.metadata":"https://account.region.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element","code":"InvalidHeaderValue","message":{\r\n "lang":"en-US","value":"The value for one of the HTTP headers is not in the correct format.\\nRequestId:5f4c1f05-603a-4495-8e80-01f776310bbd\\nTime:2016-01-04T22:12:33.9245931Z"\r\n },"values":[\r\n {\r\n "key":"HeaderName","value":"Content-Type"\r\n },{\r\n "key":"HeaderValue","value":"application/json; odata=minimalmetadata; charset=utf-8"\r\n }\r\n ]\r\n}' error = CloudError(response) - self.assertIsInstance(error.error, CloudErrorData) + self.assertIn("The value for one of the HTTP headers is not in the correct format", error.message) - response.text = '{"code":"Conflict","message":"The maximum number of Free ServerFarms allowed in a Subscription is 10.","target":null,"details":[{"message":"The maximum number of Free ServerFarms allowed in a Subscription is 10."},{"code":"Conflict"},{"errorentity":{"code":"Conflict","message":"The maximum number of Free ServerFarms allowed in a Subscription is 10.","extendedCode":"59301","messageTemplate":"The maximum number of {0} ServerFarms allowed in a Subscription is {1}.","parameters":["Free","10"],"innerErrors":null}}],"innererror":null}' + response.text = '{"error":{"code":"Conflict","message":"The maximum number of Free ServerFarms allowed in a Subscription is 10.","target":null,"details":[{"message":"The maximum number of Free ServerFarms allowed in a Subscription is 10."},{"code":"Conflict"},{"errorentity":{"code":"Conflict","message":"The maximum number of Free ServerFarms allowed in a Subscription is 10.","extendedCode":"59301","messageTemplate":"The maximum number of {0} ServerFarms allowed in a Subscription is {1}.","parameters":["Free","10"],"innerErrors":null}}],"innererror":null}}' error = CloudError(response) self.assertIsInstance(error.error, CloudErrorData) self.assertEqual(error.error.error, "Conflict") @@ -199,6 +186,11 @@ class TestCloudException(unittest.TestCase): self.assertIsInstance(error.error, CloudErrorData) self.assertEqual(error.error.error, "BadArgument") + # See https://github.com/Azure/msrestazure-for-python/issues/54 + response.text = '"{\\"error\\": {\\"code\\": \\"ResourceGroupNotFound\\", \\"message\\": \\"Resource group \'res_grp\' could not be found.\\"}}"' + error = CloudError(response) + self.assertIn(response.text, error.message) + if __name__ == '__main__': unittest.main()
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 0, "test_score": 2 }, "num_modified_files": 1 }
0.4
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "httpretty", "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.9", "reqs_path": [ "requirements.txt" ], "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==0.4.7 backports.tarfile==1.2.0 certifi==2025.1.31 cffi==1.17.1 charset-normalizer==3.4.1 cryptography==44.0.2 exceptiongroup==1.2.2 httpretty==1.1.4 idna==3.10 importlib_metadata==8.6.1 iniconfig==2.1.0 isodate==0.7.2 jaraco.classes==3.4.0 jaraco.context==6.0.1 jaraco.functools==4.1.0 jeepney==0.9.0 keyring==25.6.0 more-itertools==10.6.0 msrest==0.4.29 -e git+https://github.com/Azure/msrestazure-for-python.git@005f5a4320385930ba82d4c0e13ce90506884b27#egg=msrestazure oauthlib==3.2.2 packaging==24.2 pluggy==1.5.0 pycparser==2.22 PyJWT==2.10.1 pytest==8.3.5 python-dateutil==2.9.0.post0 requests==2.32.3 requests-oauthlib==2.0.0 SecretStorage==3.3.3 six==1.17.0 tomli==2.2.1 urllib3==2.3.0 zipp==3.21.0
name: msrestazure-for-python channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - pip=25.0=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tzdata=2025a=h04d1e81_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==0.4.7 - backports-tarfile==1.2.0 - certifi==2025.1.31 - cffi==1.17.1 - charset-normalizer==3.4.1 - cryptography==44.0.2 - exceptiongroup==1.2.2 - httpretty==1.1.4 - idna==3.10 - importlib-metadata==8.6.1 - iniconfig==2.1.0 - isodate==0.7.2 - jaraco-classes==3.4.0 - jaraco-context==6.0.1 - jaraco-functools==4.1.0 - jeepney==0.9.0 - keyring==25.6.0 - more-itertools==10.6.0 - msrest==0.4.29 - oauthlib==3.2.2 - packaging==24.2 - pluggy==1.5.0 - pycparser==2.22 - pyjwt==2.10.1 - pytest==8.3.5 - python-dateutil==2.9.0.post0 - requests==2.32.3 - requests-oauthlib==2.0.0 - secretstorage==3.3.3 - six==1.17.0 - tomli==2.2.1 - urllib3==2.3.0 - zipp==3.21.0 prefix: /opt/conda/envs/msrestazure-for-python
[ "tests/test_exceptions.py::TestCloudException::test_cloud_error" ]
[]
[ "tests/test_exceptions.py::TestCloudException::test_cloud_exception" ]
[]
MIT License
null
Azure__pykusto-150
8a5785b422db13c5445425a36e8016d8683e24d7
2021-05-06 08:39:27
68121cdd79cc9c1d6b8f71e5e80df566ac6842c7
diff --git a/.idea/runConfigurations/Lint.xml b/.idea/runConfigurations/Lint.xml index 5135e6a..aa679af 100644 --- a/.idea/runConfigurations/Lint.xml +++ b/.idea/runConfigurations/Lint.xml @@ -13,7 +13,7 @@ <option name="ADD_SOURCE_ROOTS" value="true" /> <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /> <option name="SCRIPT_NAME" value="" /> - <option name="PARAMETERS" value="-m flake8 pykusto test --count --select=E9,F63,F7,F82 --max-complexity=10 --max-line-length=127 --show-source --statistics" /> + <option name="PARAMETERS" value="-m flake8 setup.py pykusto test --count --max-complexity=10 --max-line-length=180 --show-source --statistics" /> <option name="SHOW_COMMAND_LINE" value="false" /> <option name="EMULATE_TERMINAL" value="false" /> <option name="MODULE_MODE" value="false" /> diff --git a/pykusto/__init__.py b/pykusto/__init__.py index 1b9302d..e851ccb 100644 --- a/pykusto/__init__.py +++ b/pykusto/__init__.py @@ -1,3 +1,4 @@ +# flake8: noqa # Allows importing externally-facing classes without specifying submodules. # e.g. "from pykusto import PyKustoClient" instead of "from pykusto.client import PyKustoClient" # Also allows for a convenient list of all externally-facing classes as the autocomplete of "from pykusto import " diff --git a/pykusto/_src/client.py b/pykusto/_src/client.py index 76b9337..66c39f6 100644 --- a/pykusto/_src/client.py +++ b/pykusto/_src/client.py @@ -1,6 +1,5 @@ from collections import defaultdict from fnmatch import fnmatch -from functools import lru_cache from threading import Lock from typing import Union, List, Tuple, Dict, Generator, Optional, Set, Type, Callable from urllib.parse import urlparse @@ -12,8 +11,6 @@ from azure.kusto.data._models import KustoResultRow as _KustoResultRow from azure.kusto.data.exceptions import KustoServiceError from azure.kusto.data.helpers import dataframe_from_result_table from azure.kusto.data.response import KustoResponseDataSet -# noinspection PyProtectedMember -from azure.kusto.data.security import _get_azure_cli_auth_token from redo import retrier from .expressions import BaseColumn, _AnyTypeColumn @@ -47,9 +44,12 @@ class RetryConfig: for exception_to_check in self.retry_exceptions: if isinstance(e, exception_to_check): if attempt == self.attempts: - _logger.warn(f"Reached maximum number of attempts ({self.attempts}), raising exception") + _logger.warning(f"Reached maximum number of attempts ({self.attempts}), raising exception") raise - _logger.info(f"Attempt number {attempt} out of {self.attempts} failed, previous sleep time was {sleep_time} seconds. Exception: {e}") + _logger.info( + f"Attempt number {attempt} out of {self.attempts} failed, " + f"previous sleep time was {sleep_time} seconds. Exception: {e.__class__.__name__}('{str(e)}')" + ) break else: raise @@ -95,10 +95,15 @@ class PyKustoClient(_ItemFetcher): __first_execution: bool __first_execution_lock: Lock __retry_config: RetryConfig + __auth_method: Callable[[str], KustoConnectionStringBuilder] + + __global_client_cache: Dict[str, KustoClient] = {} + __global_cache_lock: Lock = Lock() def __init__( self, client_or_cluster: Union[str, KustoClient], fetch_by_default: bool = True, use_global_cache: bool = False, - retry_config: RetryConfig = NO_RETRIES + retry_config: RetryConfig = NO_RETRIES, + auth_method: Callable[[str], KustoConnectionStringBuilder] = KustoConnectionStringBuilder.with_az_cli_authentication, ) -> None: """ Create a new handle to Kusto cluster. The value of "fetch_by_default" is used for current instance, and also passed on to database instances. @@ -111,15 +116,15 @@ class PyKustoClient(_ItemFetcher): self.__first_execution = True self.__first_execution_lock = Lock() self.__retry_config = retry_config + self.__auth_method = auth_method if isinstance(client_or_cluster, KustoClient): self.__client = client_or_cluster # noinspection PyProtectedMember self.__cluster_name = urlparse(client_or_cluster._query_endpoint).netloc assert not use_global_cache, "Global cache not supported when providing your own client instance" else: - - self.__client = (self._cached_get_client_for_cluster if use_global_cache else self._get_client_for_cluster)(client_or_cluster) self.__cluster_name = client_or_cluster + self.__client = (self._cached_get_client_for_cluster if use_global_cache else self._get_client_for_cluster)() self._refresh_if_needed() def __repr__(self) -> str: @@ -158,26 +163,21 @@ class PyKustoClient(_ItemFetcher): def get_cluster_name(self) -> str: return self.__cluster_name - @staticmethod - def _get_client_for_cluster(cluster: str) -> KustoClient: - # If we call 'with_az_cli_authentication' directly, in case of failure we will get an un-informative exception. - # As a workaround, we first attempt to manually get the Azure CLI token, and see if it works. - # Get rid of this workaround once this is resolved: https://github.com/Azure/azure-kusto-python/issues/240 - stored_token = _get_azure_cli_auth_token() - if stored_token is None: - _logger.info("Failed to get Azure CLI token, falling back to AAD device authentication") - connection_string_builder = KustoConnectionStringBuilder.with_aad_device_authentication(cluster) - else: - connection_string_builder = KustoConnectionStringBuilder.with_az_cli_authentication(cluster) - return KustoClient(connection_string_builder) + def _get_client_for_cluster(self) -> KustoClient: + return KustoClient(self.__auth_method(self.__cluster_name)) - @staticmethod - @lru_cache(maxsize=128) - def _cached_get_client_for_cluster(cluster: str) -> KustoClient: + def _cached_get_client_for_cluster(self) -> KustoClient: """ Provided for convenience during development, not recommended for general use. """ - return PyKustoClient._get_client_for_cluster(cluster) + with PyKustoClient.__global_cache_lock: + client = PyKustoClient.__global_client_cache.get(self.__cluster_name) + if client is None: + client = self._get_client_for_cluster() + PyKustoClient.__global_client_cache[self.__cluster_name] = client + assert len(PyKustoClient.__global_client_cache) <= 1024, "Global client cache cannot exceed size of 1024" + + return client def _internal_get_items(self) -> Dict[str, 'Database']: # Retrieves database names, table names, column names and types for all databases. A database name is required diff --git a/pykusto/_src/functions.py b/pykusto/_src/functions.py index fe348d1..2885200 100644 --- a/pykusto/_src/functions.py +++ b/pykusto/_src/functions.py @@ -534,7 +534,7 @@ class Functions: """ https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/make-timespanfunction """ - raise NotImplemented # pragma: no cover + raise NotImplementedError() # pragma: no cover # def max_of(self): return # @@ -553,7 +553,7 @@ class Functions: """ https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/newguidfunction """ - raise NotImplemented # pragma: no cover + raise NotImplementedError() # pragma: no cover @staticmethod def now(offset: TimespanType = None) -> _DatetimeExpression: @@ -628,14 +628,14 @@ class Functions: """ https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/percentile-tdigestfunction """ - raise NotImplemented # pragma: no cover + raise NotImplementedError() # pragma: no cover @staticmethod def percentrank_tdigest() -> AnyExpression: """ https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/percentrank-tdigestfunction """ - raise NotImplemented # pragma: no cover + raise NotImplementedError() # pragma: no cover @staticmethod def pow(expr1: NumberType, expr2: NumberType) -> _NumberExpression: @@ -1021,7 +1021,7 @@ class Functions: """ https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/toguidfunction """ - raise NotImplemented # pragma: no cover + raise NotImplementedError() # pragma: no cover @staticmethod def to_hex(expr1: NumberType, expr2: NumberType = None) -> _StringExpression: @@ -1104,21 +1104,21 @@ class Functions: """ https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/urldecodefunction """ - raise NotImplemented # pragma: no cover + raise NotImplementedError() # pragma: no cover @staticmethod def url_encode() -> _StringExpression: """ https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/urlencodefunction """ - raise NotImplemented # pragma: no cover + raise NotImplementedError() # pragma: no cover @staticmethod def week_of_year() -> _NumberExpression: """ https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/weekofyearfunction """ - raise NotImplemented # pragma: no cover + raise NotImplementedError() # pragma: no cover # def welch_test(self): return @@ -1127,7 +1127,7 @@ class Functions: """ https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/zipfunction """ - raise NotImplemented # pragma: no cover + raise NotImplementedError() # pragma: no cover # ---------------------------------------------------- # Aggregation functions diff --git a/pykusto/_src/item_fetcher.py b/pykusto/_src/item_fetcher.py index c93368f..d4e5725 100644 --- a/pykusto/_src/item_fetcher.py +++ b/pykusto/_src/item_fetcher.py @@ -136,7 +136,7 @@ class _ItemFetcher(metaclass=ABCMeta): # If an exception is raised in the future thread, it is re-raised here self.__future.result(timeout=timeout_seconds) except TimeoutError: - _logger.warn("Timeout while waiting for response from Kusto") + _logger.warning("Timeout while waiting for response from Kusto") def blocking_refresh(self, timeout_seconds: Union[None, float] = None) -> None: self.refresh() diff --git a/setup.py b/setup.py index 0fc071b..b69db1d 100644 --- a/setup.py +++ b/setup.py @@ -23,20 +23,24 @@ setup( long_description_content_type="text/markdown", keywords="kusto azure-data-explorer client library query", install_requires=[ - 'azure-kusto-data>=0.0.43,<=0.1.0', # In 0.0.43 some packages were renamed - 'pandas>=0.24.1,<=1.2.3', # azure-kusto-data requires 0.24.1 + # Release notes: https://github.com/Azure/azure-kusto-python/releases + 'azure-kusto-data==2.1.1', # Earlier versions not supported because of: https://github.com/Azure/azure-kusto-python/issues/312 + + # Release notes: https://pandas.pydata.org/docs/whatsnew/index.html + # Note that starting from 1.2.0 support for Python 3.6 was dropped + 'pandas>=0.25.0,<=1.2.4', # Tests use DataFrame constructor options introduced in 0.25.0 + 'redo==2.0.4', ], tests_require=[ 'pytest', 'pytest-cov', 'flake8', - 'pandas>=0.25.0', # Tests use DataFrame constructor options introduced in 0.25.0 ], classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", - "Topic :: Software Development", + "Topic :: Software Development", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8",
Allow `use_global_cache=True` with any authentication method Use case: researcher was using pykusto from a Data Bricks notebook, and the default Azure CLI authentication was failing with the exception below. When they provided their own `KustoClient` instance, they could no longer use `use_global_cache`. ``` FileNotFoundError Traceback (most recent call last) /databricks/python/lib/python3.7/site-packages/azure/cli/core/_session.py in load(self, filename, max_age) 47 self.save() ---> 48 with codecs_open(self.filename, 'r', encoding=self._encoding) as f: 49 self.data = json.load(f) /local_disk0/.ephemeral_nfs/envs/pythonEnv-55cda8d1-9409-4809-af73-a9a8df6e827b/lib/python3.7/codecs.py in open(filename, mode, encoding, errors, buffering) 903 mode = mode + 'b' --> 904 file = builtins.open(filename, mode, buffering) 905 if encoding is None: FileNotFoundError: [Errno 2] No such file or directory: '/root/.azure/azureProfile.json' During handling of the above exception, another exception occurred: FileNotFoundError Traceback (most recent call last) <command-1366941365999876> in <module> 8 9 # Use the client when creating the PyKustoClient ---> 10 client = PyKustoClient(cluster,use_global_cache=True) /databricks/python/lib/python3.7/site-packages/pykusto/_src/client.py in __init__(self, client_or_cluster, fetch_by_default, use_global_cache, retry_config) 119 else: 120 --> 121 self.__client = (self._cached_get_client_for_cluster if use_global_cache else self._get_client_for_cluster)(client_or_cluster) 122 self.__cluster_name = client_or_cluster 123 self._refresh_if_needed() /databricks/python/lib/python3.7/site-packages/pykusto/_src/client.py in _cached_get_client_for_cluster(cluster) 178 Provided for convenience during development, not recommended for general use. 179 """ --> 180 return PyKustoClient._get_client_for_cluster(cluster) 181 182 def _internal_get_items(self) -> Dict[str, 'Database']: /databricks/python/lib/python3.7/site-packages/pykusto/_src/client.py in _get_client_for_cluster(cluster) 164 # As a workaround, we first attempt to manually get the Azure CLI token, and see if it works. 165 # Get rid of this workaround once this is resolved: https://github.com/Azure/azure-kusto-python/issues/240 --> 166 stored_token = _get_azure_cli_auth_token() 167 if stored_token is None: 168 _logger.info("Failed to get Azure CLI token, falling back to AAD device authentication") /databricks/python/lib/python3.7/site-packages/azure/kusto/data/security.py in _get_azure_cli_auth_token() 30 31 azure_folder = get_config_dir() ---> 32 ACCOUNT.load(os.path.join(azure_folder, "azureProfile.json")) 33 profile = Profile(storage=ACCOUNT) 34 token_data = profile.get_raw_token()[0][2] /databricks/python/lib/python3.7/site-packages/azure/cli/core/_session.py in load(self, filename, max_age) 59 "Failed to load or parse file %s. It will be overridden by default settings.", 60 self.filename) ---> 61 self.save() 62 63 def save(self): /databricks/python/lib/python3.7/site-packages/azure/cli/core/_session.py in save(self) 63 def save(self): 64 if self.filename: ---> 65 with codecs_open(self.filename, 'w', encoding=self._encoding) as f: 66 json.dump(self.data, f) 67 /local_disk0/.ephemeral_nfs/envs/pythonEnv-55cda8d1-9409-4809-af73-a9a8df6e827b/lib/python3.7/codecs.py in open(filename, mode, encoding, errors, buffering) 902 # Force opening of the file in binary mode 903 mode = mode + 'b' --> 904 file = builtins.open(filename, mode, buffering) 905 if encoding is None: 906 return file FileNotFoundError: [Errno 2] No such file or directory: '/root/.azure/azureProfile.json' ```
Azure/pykusto
diff --git a/.github/workflows/runtests.yml b/.github/workflows/runtests.yml index 3759f53..4ede851 100644 --- a/.github/workflows/runtests.yml +++ b/.github/workflows/runtests.yml @@ -17,20 +17,23 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up Python 3.8 - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: + # TODO: test all relevant versions python-version: 3.8 - name: Install dependencies - run: | + # According to the internet using 'python -m pip' instead of 'pip' can prevent some issues + run: | + python -m pip install --upgrade pip + # For some reason transitive dependencies are not installed properly, unless we first explictly install 'azure-kusto-data'. Hence this ugly hack. + python -m pip install `grep -oP "azure-kusto-data==[^']+" setup.py` python setup.py install + python -m pip freeze - name: Lint with flake8 run: | - pip install flake8 - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + python -m pip install flake8 + python -m flake8 setup.py pykusto test --count --max-complexity=10 --max-line-length=180 --show-source --statistics - name: Test with pytest run: | - pip install pytest pytest-cov - pytest --cov=pykusto --cov-report term-missing --cov-fail-under=100 + python -m pip install pytest pytest-cov + python -m pytest --cov=pykusto --cov-report term-missing --cov-fail-under=100 diff --git a/test/test_base.py b/test/test_base.py index 7b19cc5..a46e84b 100644 --- a/test/test_base.py +++ b/test/test_base.py @@ -89,7 +89,8 @@ class CustomAssertLogsContext(_AssertLogsContext): # noinspection PyMissingConstructor class MockKustoResultTable(KustoResultTable): def __init__(self, rows: Tuple[Any, ...], columns: Tuple[str, ...]): - self.rows = tuple(KustoResultRow(columns, row) for row in rows) + self.kusto_result_rows = tuple(KustoResultRow(columns, row) for row in rows) + self.raw_rows = self.kusto_result_rows self.columns = tuple(type('Column', (object,), {'column_name': col, 'column_type': ''}) for col in columns) @@ -230,5 +231,4 @@ class MockKustoClient(KustoClient): return response() - test_logger = logging.getLogger("pykusto_test") diff --git a/test/test_client.py b/test/test_client.py index 0aca717..5fc05c2 100644 --- a/test/test_client.py +++ b/test/test_client.py @@ -2,12 +2,13 @@ import logging from typing import Type from unittest.mock import patch -from azure.kusto.data import KustoClient +from azure.kusto.data import KustoClient, KustoConnectionStringBuilder from azure.kusto.data.exceptions import KustoError from pykusto import PyKustoClient, column_generator as col, Query, KustoServiceError, RetryConfig, NO_RETRIES # noinspection PyProtectedMember from pykusto._src.logger import _logger +# noinspection PyProtectedMember from test.test_base import TestBase, MockKustoClient, RecordedQuery, mock_response @@ -75,7 +76,7 @@ class TestClient(TestBase): def test_default_authentication(self): mock_kusto_client = MockKustoClient() - with patch('pykusto._src.client.PyKustoClient._get_client_for_cluster', lambda s, cluster: mock_kusto_client): + with patch('pykusto._src.client.PyKustoClient._get_client_for_cluster', lambda s: mock_kusto_client): table = PyKustoClient('https://help.kusto.windows.net/')['test_db']['mock_table'] Query().take(5).execute(table) self.assertIs( @@ -155,21 +156,18 @@ class TestClient(TestBase): ) def test_client_for_cluster_with_azure_cli_auth(self): - with patch('pykusto._src.client._get_azure_cli_auth_token', lambda: "MOCK_TOKEN"), self.assertLogs(_logger, logging.INFO) as cm: + with self.assertLogs(_logger, logging.INFO) as cm: client = PyKustoClient('https://help.kusto.windows.net', fetch_by_default=False) self.assertIsInstance(client._PyKustoClient__client, KustoClient) self.assertEqual('https://help.kusto.windows.net', client.get_cluster_name()) self.assertEqual([], cm.output) - def test_client_for_cluster_fallback_to_aad_device_auth(self): - with patch('pykusto._src.client._get_azure_cli_auth_token', lambda: None), self.assertLogs(_logger, logging.INFO) as cm: - client = PyKustoClient('https://help.kusto.windows.net', fetch_by_default=False) + def test_client_for_cluster_with_aad_device_auth(self): + with self.assertLogs(_logger, logging.INFO) as cm: + client = PyKustoClient('https://help.kusto.windows.net', fetch_by_default=False, auth_method=KustoConnectionStringBuilder.with_aad_device_authentication) self.assertIsInstance(client._PyKustoClient__client, KustoClient) self.assertEqual('https://help.kusto.windows.net', client.get_cluster_name()) - self.assertEqual( - ['INFO:pykusto:Failed to get Azure CLI token, falling back to AAD device authentication'], - cm.output - ) + self.assertEqual([], cm.output) @staticmethod def unreliable_mock_kusto_client(number_of_failures: int, exception_type: Type[Exception] = KustoServiceError): @@ -195,7 +193,7 @@ class TestClient(TestBase): self.assertEqual( [ f"INFO:pykusto:Attempt number {i} out of {number_of_retries} failed, " - f"previous sleep time was 0.1 seconds. Exception: (KustoServiceError(...), 'Mock exception for test')" + f"previous sleep time was 0.1 seconds. Exception: KustoServiceError('Mock exception for test')" for i in range(1, number_of_retries) ], cm.output
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 0, "test_score": 3 }, "num_modified_files": 6 }
0.0
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "pytest" ], "pre_install": null, "python": "3.7", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 attrs @ file:///croot/attrs_1668696182826/work azure-core==1.30.1 azure-kusto-data==0.1.0 certifi @ file:///croot/certifi_1671487769961/work/certifi cffi==1.15.1 charset-normalizer==3.4.1 cryptography==44.0.2 flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core idna==3.10 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1648562407465/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work isodate==0.7.2 msrest==0.7.1 msrestazure==0.6.4.post1 numpy==1.21.6 oauthlib==3.2.2 packaging @ file:///croot/packaging_1671697413597/work pandas==1.2.3 pluggy @ file:///tmp/build/80754af9/pluggy_1648042572264/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pycparser==2.21 PyJWT==2.8.0 -e git+https://github.com/Azure/pykusto.git@8a5785b422db13c5445425a36e8016d8683e24d7#egg=pykusto pytest==7.1.2 python-dateutil==2.9.0.post0 pytz==2025.2 redo==2.0.4 requests==2.31.0 requests-oauthlib==2.0.0 six==1.17.0 tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work typing_extensions==4.7.1 urllib3==2.0.7 zipp @ file:///croot/zipp_1672387121353/work
name: pykusto channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=22.1.0=py37h06a4308_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2022.12.7=py37h06a4308_0 - flit-core=3.6.0=pyhd3eb1b0_0 - importlib-metadata=4.11.3=py37h06a4308_0 - importlib_metadata=4.11.3=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=22.0=py37h06a4308_0 - pip=22.3.1=py37h06a4308_0 - pluggy=1.0.0=py37h06a4308_1 - py=1.11.0=pyhd3eb1b0_0 - pytest=7.1.2=py37h06a4308_0 - python=3.7.16=h7a1cb2a_0 - readline=8.2=h5eee18b_0 - setuptools=65.6.3=py37h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tomli=2.0.1=py37h06a4308_0 - wheel=0.38.4=py37h06a4308_0 - xz=5.6.4=h5eee18b_1 - zipp=3.11.0=py37h06a4308_0 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - azure-core==1.30.1 - azure-kusto-data==0.1.0 - cffi==1.15.1 - charset-normalizer==3.4.1 - cryptography==44.0.2 - idna==3.10 - isodate==0.7.2 - msrest==0.7.1 - msrestazure==0.6.4.post1 - numpy==1.21.6 - oauthlib==3.2.2 - pandas==1.2.3 - pycparser==2.21 - pyjwt==2.8.0 - python-dateutil==2.9.0.post0 - pytz==2025.2 - redo==2.0.4 - requests==2.31.0 - requests-oauthlib==2.0.0 - six==1.17.0 - typing-extensions==4.7.1 - urllib3==2.0.7 prefix: /opt/conda/envs/pykusto
[ "test/test_client.py::TestClient::test_client_for_cluster_with_aad_device_auth", "test/test_client.py::TestClient::test_client_for_cluster_with_azure_cli_auth" ]
[ "test/test_client.py::TestClient::test_2_retry", "test/test_client.py::TestClient::test_3_retries", "test/test_client.py::TestClient::test_cross_cluster_join", "test/test_client.py::TestClient::test_cross_cluster_join_with_union", "test/test_client.py::TestClient::test_cross_cluster_join_with_union_2", "test/test_client.py::TestClient::test_default_authentication", "test/test_client.py::TestClient::test_execute_already_bound", "test/test_client.py::TestClient::test_get_table", "test/test_client.py::TestClient::test_single_table", "test/test_client.py::TestClient::test_single_table_on_execute", "test/test_client.py::TestClient::test_union_table", "test/test_client.py::TestClient::test_union_table_with_wildcard" ]
[ "test/test_client.py::TestClient::test_client_instances", "test/test_client.py::TestClient::test_client_instances_cached", "test/test_client.py::TestClient::test_client_instances_cached_distinct", "test/test_client.py::TestClient::test_execute_no_table", "test/test_client.py::TestClient::test_missing_retries", "test/test_client.py::TestClient::test_non_transient_exception" ]
[]
MIT License
null
Azure__pykusto-159
68121cdd79cc9c1d6b8f71e5e80df566ac6842c7
2021-06-24 11:43:53
68121cdd79cc9c1d6b8f71e5e80df566ac6842c7
diff --git a/pykusto/_src/client.py b/pykusto/_src/client.py index 66c39f6..d18fa82 100644 --- a/pykusto/_src/client.py +++ b/pykusto/_src/client.py @@ -371,7 +371,7 @@ class Table(_ItemFetcher): return KQL(table_names[0]) def execute(self, query: KQL, retry_config: RetryConfig = None) -> KustoResponse: - return self.__database.execute(query, retry_config) + return self.__database.execute(query, retry_config=retry_config) def get_columns_names(self) -> Generator[str, None, None]: yield from self._get_item_names()
Retry config causes an exception beacuse of bug in argumets order in client execute function In `_src.client.py` the function `execute` is defined as follows: `def execute(self, query: KQL, retry_config: RetryConfig = None) -> KustoResponse: return self.__database.execute(query, retry_config)` but the `database.execute` function receives three arguments, without explicitly naming the argument as retry_config, it is used as the properties argument. ` def execute(self, query: KQL, properties: ClientRequestProperties = None, retry_config: RetryConfig = None) -> KustoResponse: return self.__client.execute(self.__name, query, properties, retry_config)`
Azure/pykusto
diff --git a/test/test_client.py b/test/test_client.py index 5fc05c2..930e81e 100644 --- a/test/test_client.py +++ b/test/test_client.py @@ -222,3 +222,28 @@ class TestClient(TestBase): KustoError("Mock exception for test", None), lambda: Query(table).take(5).execute(), ) + + def test_override_retry_config_for_query(self): + num_retries = 2 + num_failed_attempts = num_retries - 1 + retry_sleep_time = 0.1 + + mock_kusto_client = self.unreliable_mock_kusto_client(num_failed_attempts) + table = PyKustoClient(mock_kusto_client, fetch_by_default=False)['test_db']['mock_table'] + retry_config = RetryConfig(num_retries, sleep_time=retry_sleep_time, jitter=0) + + with self.assertLogs(_logger, logging.INFO) as cm: + Query(table).take(5).execute(retry_config=retry_config) + + self.assertEqual( + [RecordedQuery('test_db', 'mock_table | take 5')] * num_retries, + mock_kusto_client.recorded_queries + ) + self.assertEqual( + [ + f"INFO:pykusto:Attempt number {num_failed_attempts} out of {num_retries} failed, " + f"previous sleep time was {retry_sleep_time} seconds. " + f"Exception: KustoServiceError('Mock exception for test')" + ], + cm.output + )
{ "commit_name": "head_commit", "failed_lite_validators": [], "has_test_patch": true, "is_lite": true, "llm_score": { "difficulty_score": 2, "issue_text_score": 0, "test_score": 0 }, "num_modified_files": 1 }
0.0
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "", "pip_packages": [ "pytest" ], "pre_install": [ "apt-get update", "apt-get install -y gcc" ], "python": "3.7", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
azure-core==1.30.1 azure-identity==1.5.0 azure-kusto-data==2.1.1 certifi @ file:///croot/certifi_1671487769961/work/certifi cffi==1.15.1 charset-normalizer==3.4.1 cryptography==3.4.8 exceptiongroup==1.2.2 idna==3.10 importlib-metadata==6.7.0 iniconfig==2.0.0 msal==1.9.0 msal-extensions==0.3.1 numpy==1.21.6 packaging==24.0 pandas==1.2.4 pluggy==1.2.0 portalocker==2.7.0 pycparser==2.21 PyJWT==2.8.0 -e git+https://github.com/Azure/pykusto.git@68121cdd79cc9c1d6b8f71e5e80df566ac6842c7#egg=pykusto pytest==7.4.4 python-dateutil==2.9.0.post0 pytz==2025.2 redo==2.0.4 requests==2.31.0 six==1.17.0 tomli==2.0.1 typing_extensions==4.7.1 urllib3==2.0.7 zipp==3.15.0
name: pykusto channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2022.12.7=py37h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=22.3.1=py37h06a4308_0 - python=3.7.16=h7a1cb2a_0 - readline=8.2=h5eee18b_0 - setuptools=65.6.3=py37h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.38.4=py37h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - azure-core==1.30.1 - azure-identity==1.5.0 - azure-kusto-data==2.1.1 - cffi==1.15.1 - charset-normalizer==3.4.1 - cryptography==3.4.8 - exceptiongroup==1.2.2 - idna==3.10 - importlib-metadata==6.7.0 - iniconfig==2.0.0 - msal==1.9.0 - msal-extensions==0.3.1 - numpy==1.21.6 - packaging==24.0 - pandas==1.2.4 - pluggy==1.2.0 - portalocker==2.7.0 - pycparser==2.21 - pyjwt==2.8.0 - pytest==7.4.4 - python-dateutil==2.9.0.post0 - pytz==2025.2 - redo==2.0.4 - requests==2.31.0 - six==1.17.0 - tomli==2.0.1 - typing-extensions==4.7.1 - urllib3==2.0.7 - zipp==3.15.0 prefix: /opt/conda/envs/pykusto
[ "test/test_client.py::TestClient::test_override_retry_config_for_query" ]
[]
[ "test/test_client.py::TestClient::test_2_retry", "test/test_client.py::TestClient::test_3_retries", "test/test_client.py::TestClient::test_client_for_cluster_with_aad_device_auth", "test/test_client.py::TestClient::test_client_for_cluster_with_azure_cli_auth", "test/test_client.py::TestClient::test_client_instances", "test/test_client.py::TestClient::test_client_instances_cached", "test/test_client.py::TestClient::test_client_instances_cached_distinct", "test/test_client.py::TestClient::test_cross_cluster_join", "test/test_client.py::TestClient::test_cross_cluster_join_with_union", "test/test_client.py::TestClient::test_cross_cluster_join_with_union_2", "test/test_client.py::TestClient::test_default_authentication", "test/test_client.py::TestClient::test_execute_already_bound", "test/test_client.py::TestClient::test_execute_no_table", "test/test_client.py::TestClient::test_get_table", "test/test_client.py::TestClient::test_missing_retries", "test/test_client.py::TestClient::test_non_transient_exception", "test/test_client.py::TestClient::test_single_table", "test/test_client.py::TestClient::test_single_table_on_execute", "test/test_client.py::TestClient::test_union_table", "test/test_client.py::TestClient::test_union_table_with_wildcard" ]
[]
MIT License
swerebench/sweb.eval.x86_64.azure_1776_pykusto-159
Azure__pykusto-20
13fc2f12a84ca19b0cc8c6d61d2c67da858fdae0
2019-08-12 08:54:35
68121cdd79cc9c1d6b8f71e5e80df566ac6842c7
diff --git a/pykusto/client.py b/pykusto/client.py index 1d708c7..2bc47e4 100644 --- a/pykusto/client.py +++ b/pykusto/client.py @@ -1,5 +1,8 @@ from typing import Union, List, Tuple +# noinspection PyProtectedMember +from urllib.parse import urlparse + # noinspection PyProtectedMember from azure.kusto.data._response import KustoResponseDataSet from azure.kusto.data.request import KustoClient, KustoConnectionStringBuilder, ClientRequestProperties @@ -12,6 +15,7 @@ class PyKustoClient: Handle to a Kusto cluster """ _client: KustoClient + _cluster_name: str def __init__(self, client_or_cluster: Union[str, KustoClient]) -> None: """ @@ -22,8 +26,11 @@ class PyKustoClient: """ if isinstance(client_or_cluster, KustoClient): self._client = client_or_cluster + # noinspection PyProtectedMember + self._cluster_name = urlparse(client_or_cluster._query_endpoint).netloc # TODO neater way else: self._client = self._get_client_for_cluster(client_or_cluster) + self._cluster_name = client_or_cluster def execute(self, database: str, query: KQL, properties: ClientRequestProperties = None) -> KustoResponseDataSet: return self._client.execute(database, query, properties) @@ -35,6 +42,9 @@ class PyKustoClient: def __getitem__(self, database_name: str) -> 'Database': return Database(self, database_name) + def get_cluster_name(self) -> str: + return self._cluster_name + @staticmethod def _get_client_for_cluster(cluster: str) -> KustoClient: return KustoClient(KustoConnectionStringBuilder.with_aad_device_authentication(cluster)) @@ -70,7 +80,7 @@ class Table: Handle to a Kusto table """ database: Database - table: KQL + tables: Union[str, List[str], Tuple[str, ...]] def __init__(self, database: Database, tables: Union[str, List[str], Tuple[str, ...]]) -> None: """ @@ -82,19 +92,31 @@ class Table: """ self.database = database - - if isinstance(tables, (List, Tuple)): - self.table = KQL(', '.join(tables)) + self.tables = [tables] if isinstance(tables, str) else tables + + def get_table(self) -> KQL: + result = KQL(', '.join(self.tables)) + if '*' in result or ',' in result: + result = KQL('union ' + result) + return result + + def get_full_table(self) -> KQL: + assert len(self.tables) > 0 + if len(self.tables) == 1 and not any('*' in t for t in self.tables): + return self._format_full_table_name(self.tables[0]) else: - self.table = KQL(tables) - if '*' in self.table or ',' in self.table: - self.table = KQL('union ' + self.table) + return KQL("union " + ", ".join(self._format_full_table_name(t) for t in self.tables)) + + def _format_full_table_name(self, table): + table_format_str = 'cluster("{}").database("{}").table("{}")' + return KQL( + table_format_str.format(self.database.client.get_cluster_name(), self.database.name, table)) def execute(self, rendered_query: KQL) -> KustoResponseDataSet: return self.database.execute(rendered_query) def show_columns(self) -> Tuple[Tuple[str, str], ...]: - res: KustoResponseDataSet = self.execute(KQL('.show table {}'.format(self.table))) + res: KustoResponseDataSet = self.execute(KQL('.show table {}'.format(self.get_table()))) return tuple( ( r[0], # Column name diff --git a/pykusto/query.py b/pykusto/query.py index 547c1c9..42caba4 100644 --- a/pykusto/query.py +++ b/pykusto/query.py @@ -156,14 +156,18 @@ class Query: def _compile(self) -> KQL: pass - def _compile_all(self) -> KQL: + def _compile_all(self, use_full_table_name) -> KQL: if self._head is None: if self._table is None: return KQL("") else: - return self._table.table + table = self._table + if use_full_table_name: + return table.get_full_table() + else: + return table.get_table() else: - return KQL("{} | {}".format(self._head._compile_all(), self._compile())) + return KQL("{} | {}".format(self._head._compile_all(use_full_table_name), self._compile())) def get_table(self) -> Table: if self._head is None: @@ -171,8 +175,8 @@ class Query: else: return self._head.get_table() - def render(self) -> KQL: - result = self._compile_all() + def render(self, use_full_table_name: bool = False) -> KQL: + result = self._compile_all(use_full_table_name) logger.debug("Complied query: " + result) return result @@ -180,7 +184,7 @@ class Query: if self.get_table() is None: if table is None: raise RuntimeError("No table supplied") - rendered_query = table.table + self.render() + rendered_query = table.get_table() + self.render() else: if table is not None: raise RuntimeError("This table is already bound to a query") @@ -412,7 +416,7 @@ class JoinQuery(Query): return KQL("join {} ({}) on {}".format( "" if self._kind is None else "kind={}".format(self._kind.value), - self._joined_query.render(), + self._joined_query.render(use_full_table_name=True), ", ".join([self._compile_on_attribute(attr) for attr in self._on_attributes])))
Add support for cross-cluster join If the joined table is from a different cluster, render it using the following syntax: cluster("a").database("b").table("c")
Azure/pykusto
diff --git a/test/test_query.py b/test/test_query.py index b4ed016..a228e03 100644 --- a/test/test_query.py +++ b/test/test_query.py @@ -69,7 +69,7 @@ class TestQuery(TestBase): table = PyKustoClient(mock_kusto_client)['test_db']['test_table'] self.assertEqual( - " | where foo > 4 | take 5 | join kind=inner (test_table) on col0, $left.col1==$right.col2", + ' | where foo > 4 | take 5 | join kind=inner (cluster("test_cluster.kusto.windows.net").database("test_db").table("test_table")) on col0, $left.col1==$right.col2', Query().where(col.foo > 4).take(5).join( Query(table), kind=JoinKind.INNER).on(col.col0).on(col.col1, col.col2).render(), ) @@ -79,7 +79,7 @@ class TestQuery(TestBase): table = PyKustoClient(mock_kusto_client)['test_db']['test_table'] self.assertEqual( - " | where foo > 4 | take 5 | join kind=inner (test_table | where bla == 2 | take 6) on col0, " + ' | where foo > 4 | take 5 | join kind=inner (cluster("test_cluster.kusto.windows.net").database("test_db").table("test_table") | where bla == 2 | take 6) on col0, ' "$left.col1==$right.col2", Query().where(col.foo > 4).take(5).join( Query(table).where(col.bla == 2).take(6), kind=JoinKind.INNER).on(col.col0).on(col.col1, diff --git a/test/test_table.py b/test/test_table.py index d7a81b6..755acb2 100644 --- a/test/test_table.py +++ b/test/test_table.py @@ -1,8 +1,10 @@ from typing import List, Tuple from unittest.mock import patch +from urllib.parse import urljoin from azure.kusto.data.request import KustoClient, ClientRequestProperties +from pykusto.expressions import column_generator as col from pykusto.client import PyKustoClient from pykusto.query import Query from test.test_base import TestBase @@ -12,8 +14,9 @@ from test.test_base import TestBase class MockKustoClient(KustoClient): executions: List[Tuple[str, str, ClientRequestProperties]] - def __init__(self): + def __init__(self, cluster="https://test_cluster.kusto.windows.net"): self.executions = [] + self._query_endpoint = urljoin(cluster, "/v2/rest/query") def execute(self, database: str, rendered_query: str, properties: ClientRequestProperties = None): self.executions.append((database, rendered_query, properties)) @@ -85,3 +88,43 @@ class TestTable(TestBase): [('test_db', 'test_table | take 5', None)], mock_kusto_client.executions, ) + + def test_cross_cluster_join(self): + mock_kusto_client_1 = MockKustoClient("https://one.kusto.windows.net") + mock_kusto_client_2 = MockKustoClient("https://two.kusto.windows.net") + + table1 = PyKustoClient(mock_kusto_client_1)['test_db_1']['test_table_1'] + table2 = PyKustoClient(mock_kusto_client_2)['test_db_2']['test_table_2'] + Query(table1).take(5).join(Query(table2).take(6)).on(col.foo).execute() + self.assertEqual( + [('test_db_1', 'test_table_1 | take 5 | join (cluster("two.kusto.windows.net").database("test_db_2").table("test_table_2") | take 6) on foo', None)], + mock_kusto_client_1.executions, + ) + + def test_cross_cluster_join_with_union(self): + mock_kusto_client_1 = MockKustoClient("https://one.kusto.windows.net") + mock_kusto_client_2 = MockKustoClient("https://two.kusto.windows.net") + + table1 = PyKustoClient(mock_kusto_client_1)['test_db_1']['test_table_1'] + table2 = PyKustoClient(mock_kusto_client_2)['test_db_2'].get_tables('test_table_2_*') + Query(table1).take(5).join(Query(table2).take(6)).on(col.foo).execute() + self.assertEqual( + [('test_db_1', + 'test_table_1 | take 5 | join (union cluster("two.kusto.windows.net").database("test_db_2").table("test_table_2_*") | take 6) on foo', + None)], + mock_kusto_client_1.executions, + ) + + def test_cross_cluster_join_with_union_2(self): + mock_kusto_client_1 = MockKustoClient("https://one.kusto.windows.net") + mock_kusto_client_2 = MockKustoClient("https://two.kusto.windows.net") + + table1 = PyKustoClient(mock_kusto_client_1)['test_db_1']['test_table_1'] + table2 = PyKustoClient(mock_kusto_client_2)['test_db_2'].get_tables('test_table_2_*', 'test_table_3_*') + Query(table1).take(5).join(Query(table2).take(6)).on(col.foo).execute() + self.assertEqual( + [('test_db_1', + 'test_table_1 | take 5 | join (union cluster("two.kusto.windows.net").database("test_db_2").table("test_table_2_*"), cluster("two.kusto.windows.net").database("test_db_2").table("test_table_3_*") | take 6) on foo', + None)], + mock_kusto_client_1.executions, + )
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 1, "test_score": 3 }, "num_modified_files": 2 }
0.0
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "pytest" ], "pre_install": null, "python": "3.9", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 azure-kusto-data==0.0.31 certifi==2025.1.31 cffi==1.17.1 charset-normalizer==3.4.1 cryptography==44.0.2 exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work idna==3.10 iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work packaging @ file:///croot/packaging_1734472117206/work pluggy @ file:///croot/pluggy_1733169602837/work pycparser==2.22 PyJWT==2.10.1 -e git+https://github.com/Azure/pykusto.git@13fc2f12a84ca19b0cc8c6d61d2c67da858fdae0#egg=pykusto pytest @ file:///croot/pytest_1738938843180/work python-dateutil==2.9.0.post0 requests==2.32.3 six==1.17.0 tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work urllib3==2.3.0
name: pykusto channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - exceptiongroup=1.2.0=py39h06a4308_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=3.0.16=h5eee18b_0 - packaging=24.2=py39h06a4308_0 - pip=25.0=py39h06a4308_0 - pluggy=1.5.0=py39h06a4308_0 - pytest=8.3.4=py39h06a4308_0 - python=3.9.21=he870216_1 - readline=8.2=h5eee18b_0 - setuptools=75.8.0=py39h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tomli=2.0.1=py39h06a4308_0 - tzdata=2025a=h04d1e81_0 - wheel=0.45.1=py39h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - azure-kusto-data==0.0.31 - certifi==2025.1.31 - cffi==1.17.1 - charset-normalizer==3.4.1 - cryptography==44.0.2 - idna==3.10 - pycparser==2.22 - pyjwt==2.10.1 - python-dateutil==2.9.0.post0 - requests==2.32.3 - six==1.17.0 - urllib3==2.3.0 prefix: /opt/conda/envs/pykusto
[ "test/test_query.py::TestQuery::test_join_with_table", "test/test_query.py::TestQuery::test_join_with_table_and_query", "test/test_table.py::TestTable::test_cross_cluster_join", "test/test_table.py::TestTable::test_cross_cluster_join_with_union", "test/test_table.py::TestTable::test_cross_cluster_join_with_union_2" ]
[]
[ "test/test_query.py::TestQuery::test_add_queries", "test/test_query.py::TestQuery::test_count", "test/test_query.py::TestQuery::test_custom", "test/test_query.py::TestQuery::test_distinct", "test/test_query.py::TestQuery::test_distinct_all", "test/test_query.py::TestQuery::test_extend", "test/test_query.py::TestQuery::test_extend_assign_to_multiple_columns", "test/test_query.py::TestQuery::test_extend_generate_column_name", "test/test_query.py::TestQuery::test_join_no_joined_table", "test/test_query.py::TestQuery::test_join_no_on", "test/test_query.py::TestQuery::test_limit", "test/test_query.py::TestQuery::test_mv_expand", "test/test_query.py::TestQuery::test_mv_expand_args", "test/test_query.py::TestQuery::test_mv_expand_no_args", "test/test_query.py::TestQuery::test_order", "test/test_query.py::TestQuery::test_order_expression_in_arg", "test/test_query.py::TestQuery::test_project", "test/test_query.py::TestQuery::test_project_assign_to_multiple_columns", "test/test_query.py::TestQuery::test_project_away", "test/test_query.py::TestQuery::test_project_away_wildcard", "test/test_query.py::TestQuery::test_project_rename", "test/test_query.py::TestQuery::test_project_unspecified_column", "test/test_query.py::TestQuery::test_project_with_expression", "test/test_query.py::TestQuery::test_sample", "test/test_query.py::TestQuery::test_sanity", "test/test_query.py::TestQuery::test_sort", "test/test_query.py::TestQuery::test_sort_multiple_cols", "test/test_query.py::TestQuery::test_summarize", "test/test_query.py::TestQuery::test_summarize_by", "test/test_query.py::TestQuery::test_summarize_by_expression", "test/test_query.py::TestQuery::test_take", "test/test_query.py::TestQuery::test_top", "test/test_query.py::TestQuery::test_udf", "test/test_query.py::TestQuery::test_where", "test/test_table.py::TestTable::test_default_authentication", "test/test_table.py::TestTable::test_execute_already_bound", "test/test_table.py::TestTable::test_execute_no_table", "test/test_table.py::TestTable::test_single_table", "test/test_table.py::TestTable::test_single_table_on_execute", "test/test_table.py::TestTable::test_union_table", "test/test_table.py::TestTable::test_union_table_with_wildcard" ]
[]
MIT License
null
Azure__pykusto-22
aff79137b6d310f33a2085ece2fbe41886c50c11
2019-08-12 14:53:39
68121cdd79cc9c1d6b8f71e5e80df566ac6842c7
diff --git a/pykusto/query.py b/pykusto/query.py index 42caba4..272bbaf 100644 --- a/pykusto/query.py +++ b/pykusto/query.py @@ -53,7 +53,12 @@ class Query: self._table = head if isinstance(head, Table) else None def __add__(self, other: 'Query'): - other._head = self + other_base = other + while other_base._head is not None: + if other_base._head._head is None: + break + other_base = other_base._head + other_base._head = self return other def where(self, predicate: BooleanType) -> 'WhereQuery':
query.__add__ only handles short queries
Azure/pykusto
diff --git a/test/test_query.py b/test/test_query.py index a228e03..034feec 100644 --- a/test/test_query.py +++ b/test/test_query.py @@ -15,9 +15,21 @@ class TestQuery(TestBase): ) def test_add_queries(self): - query = Query().where(col.foo > 4) + Query().take(5) + Query().sort_by(col.bar, Order.ASC, Nulls.LAST) + query = (Query().where(col.foo > 4) + + Query().take(5) + + Query().where(col.foo > 1).sort_by(col.bar, Order.ASC, Nulls.LAST)) self.assertEqual( - " | where foo > 4 | take 5 | sort by bar asc nulls last", + " | where foo > 4 | take 5 | where foo > 1 | sort by bar asc nulls last", + query.render(), + ) + + def test_add_queries_with_table(self): + mock_kusto_client = MockKustoClient() + table = PyKustoClient(mock_kusto_client)['test_db']['test_table'] + b = Query().take(5).take(2).sort_by(col.bar, Order.ASC, Nulls.LAST) + query = Query(table).where(col.foo > 4) + b + self.assertEqual( + "test_table | where foo > 4 | take 5 | take 2 | sort by bar asc nulls last", query.render(), )
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_short_problem_statement" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 2, "test_score": 0 }, "num_modified_files": 1 }
0.0
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .[dev]", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "pytest" ], "pre_install": null, "python": "3.7", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 attrs @ file:///croot/attrs_1668696182826/work azure-kusto-data==0.0.31 certifi @ file:///croot/certifi_1671487769961/work/certifi cffi==1.15.1 charset-normalizer==3.4.1 cryptography==44.0.2 flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core idna==3.10 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1648562407465/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work packaging @ file:///croot/packaging_1671697413597/work pluggy @ file:///tmp/build/80754af9/pluggy_1648042572264/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pycparser==2.21 PyJWT==2.8.0 -e git+https://github.com/Azure/pykusto.git@aff79137b6d310f33a2085ece2fbe41886c50c11#egg=pykusto pytest==7.1.2 python-dateutil==2.9.0.post0 requests==2.31.0 six==1.17.0 tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work typing_extensions @ file:///croot/typing_extensions_1669924550328/work urllib3==2.0.7 zipp @ file:///croot/zipp_1672387121353/work
name: pykusto channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=22.1.0=py37h06a4308_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2022.12.7=py37h06a4308_0 - flit-core=3.6.0=pyhd3eb1b0_0 - importlib-metadata=4.11.3=py37h06a4308_0 - importlib_metadata=4.11.3=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=22.0=py37h06a4308_0 - pip=22.3.1=py37h06a4308_0 - pluggy=1.0.0=py37h06a4308_1 - py=1.11.0=pyhd3eb1b0_0 - pytest=7.1.2=py37h06a4308_0 - python=3.7.16=h7a1cb2a_0 - readline=8.2=h5eee18b_0 - setuptools=65.6.3=py37h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tomli=2.0.1=py37h06a4308_0 - typing_extensions=4.4.0=py37h06a4308_0 - wheel=0.38.4=py37h06a4308_0 - xz=5.6.4=h5eee18b_1 - zipp=3.11.0=py37h06a4308_0 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - azure-kusto-data==0.0.31 - cffi==1.15.1 - charset-normalizer==3.4.1 - cryptography==44.0.2 - idna==3.10 - pycparser==2.21 - pyjwt==2.8.0 - python-dateutil==2.9.0.post0 - requests==2.31.0 - six==1.17.0 - urllib3==2.0.7 prefix: /opt/conda/envs/pykusto
[ "test/test_query.py::TestQuery::test_add_queries", "test/test_query.py::TestQuery::test_add_queries_with_table" ]
[]
[ "test/test_query.py::TestQuery::test_count", "test/test_query.py::TestQuery::test_custom", "test/test_query.py::TestQuery::test_distinct", "test/test_query.py::TestQuery::test_distinct_all", "test/test_query.py::TestQuery::test_extend", "test/test_query.py::TestQuery::test_extend_assign_to_multiple_columns", "test/test_query.py::TestQuery::test_extend_generate_column_name", "test/test_query.py::TestQuery::test_join_no_joined_table", "test/test_query.py::TestQuery::test_join_no_on", "test/test_query.py::TestQuery::test_join_with_table", "test/test_query.py::TestQuery::test_join_with_table_and_query", "test/test_query.py::TestQuery::test_limit", "test/test_query.py::TestQuery::test_mv_expand", "test/test_query.py::TestQuery::test_mv_expand_args", "test/test_query.py::TestQuery::test_mv_expand_no_args", "test/test_query.py::TestQuery::test_order", "test/test_query.py::TestQuery::test_order_expression_in_arg", "test/test_query.py::TestQuery::test_project", "test/test_query.py::TestQuery::test_project_assign_to_multiple_columns", "test/test_query.py::TestQuery::test_project_away", "test/test_query.py::TestQuery::test_project_away_wildcard", "test/test_query.py::TestQuery::test_project_rename", "test/test_query.py::TestQuery::test_project_unspecified_column", "test/test_query.py::TestQuery::test_project_with_expression", "test/test_query.py::TestQuery::test_sample", "test/test_query.py::TestQuery::test_sanity", "test/test_query.py::TestQuery::test_sort", "test/test_query.py::TestQuery::test_sort_multiple_cols", "test/test_query.py::TestQuery::test_summarize", "test/test_query.py::TestQuery::test_summarize_by", "test/test_query.py::TestQuery::test_summarize_by_expression", "test/test_query.py::TestQuery::test_take", "test/test_query.py::TestQuery::test_top", "test/test_query.py::TestQuery::test_udf", "test/test_query.py::TestQuery::test_where" ]
[]
MIT License
null
Azure__pykusto-34
a6f85c8015b59226608bafa1d2f5d862d1917ef4
2019-12-29 10:57:59
68121cdd79cc9c1d6b8f71e5e80df566ac6842c7
diff --git a/pykusto/functions.py b/pykusto/functions.py index 8450ef8..210958f 100644 --- a/pykusto/functions.py +++ b/pykusto/functions.py @@ -120,6 +120,8 @@ def ceiling(expr: NumberType) -> NumberExpression: def cos(expr: NumberType) -> NumberExpression: return expr.cos() + + # # def cot(self): return @@ -257,12 +259,12 @@ def hourofday(expr: DatetimeType) -> NumberExpression: return expr.hourofday() -def iif(predicate: BooleanType, if_true: ExpressionType, if_false: ExpressionType) -> BaseExpression: - return BaseExpression(KQL('iif({}, {}, {})'.format(predicate, if_true, if_false))) +def iff(predicate: BooleanType, if_true: ExpressionType, if_false: ExpressionType) -> BaseExpression: + return BaseExpression(KQL('iff({}, {}, {})'.format(predicate, _subexpr_to_kql(if_true), _subexpr_to_kql(if_false)))) -def iff(predicate: BooleanType, if_true: ExpressionType, if_false: ExpressionType) -> BaseExpression: - return BaseExpression(KQL('iff({}, {}, {})'.format(predicate, if_true, if_false))) +def iif(predicate: BooleanType, if_true: ExpressionType, if_false: ExpressionType) -> BaseExpression: + return iff(predicate, if_true, if_false) # diff --git a/setup.py b/setup.py index 605de64..b31e771 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='pykusto', - version='0.0.4', + version='0.0.5', packages=find_packages(exclude=['test']), url='https://github.com/Azure/pykusto', license='MIT License',
iff doesn't support sub expressions The following syntax is not working: .extend(timeDelta=iff(col.day-col.day1 == 0, timedelta(DAYS_BACK_DIFF), col.day-col.day1))
Azure/pykusto
diff --git a/test/test_functions.py b/test/test_functions.py index 247142d..55fc998 100644 --- a/test/test_functions.py +++ b/test/test_functions.py @@ -7,7 +7,7 @@ from pykusto.query import Query from test.test_base import TestBase -# TODO dcount_hll, iif +# TODO dcount_hll class TestFunction(TestBase): def test_acos(self): @@ -629,3 +629,16 @@ class TestFunction(TestBase): " | summarize active_days = dcount(bin(timestamp, time(1.0:0:0.0)))", Query().summarize(active_days=f.dcount(f.bin(col.timestamp, datetime.timedelta(1)))).render() ) + + def test_iff(self): + self.assertEqual( + " | project foo = (iff(foo > (ago(time(2.0:0:0.0))), time(3.0:0:0.0), time(4.0:0:0.0)))", + Query().project(foo=f.iff(col.foo > f.ago(datetime.timedelta(2)), datetime.timedelta(3), datetime.timedelta(4))).render() + ) + + def test_iif(self): + # iif is just an alias to iff + self.assertEqual( + " | project foo = (iff(foo > (ago(time(2.0:0:0.0))), time(3.0:0:0.0), time(4.0:0:0.0)))", + Query().project(foo=f.iif(col.foo > f.ago(datetime.timedelta(2)), datetime.timedelta(3), datetime.timedelta(4))).render() + )
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 0, "issue_text_score": 3, "test_score": 2 }, "num_modified_files": 2 }
0.0
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "pytest" ], "pre_install": null, "python": "3.7", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 attrs @ file:///croot/attrs_1668696182826/work azure-kusto-data==0.0.36 certifi @ file:///croot/certifi_1671487769961/work/certifi cffi==1.15.1 charset-normalizer==3.4.1 cryptography==44.0.2 flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core idna==3.10 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1648562407465/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work packaging @ file:///croot/packaging_1671697413597/work pluggy @ file:///tmp/build/80754af9/pluggy_1648042572264/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pycparser==2.21 PyJWT==2.8.0 -e git+https://github.com/Azure/pykusto.git@a6f85c8015b59226608bafa1d2f5d862d1917ef4#egg=pykusto pytest==7.1.2 python-dateutil==2.9.0.post0 requests==2.31.0 six==1.17.0 tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work typing_extensions @ file:///croot/typing_extensions_1669924550328/work urllib3==2.0.7 zipp @ file:///croot/zipp_1672387121353/work
name: pykusto channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=22.1.0=py37h06a4308_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2022.12.7=py37h06a4308_0 - flit-core=3.6.0=pyhd3eb1b0_0 - importlib-metadata=4.11.3=py37h06a4308_0 - importlib_metadata=4.11.3=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=22.0=py37h06a4308_0 - pip=22.3.1=py37h06a4308_0 - pluggy=1.0.0=py37h06a4308_1 - py=1.11.0=pyhd3eb1b0_0 - pytest=7.1.2=py37h06a4308_0 - python=3.7.16=h7a1cb2a_0 - readline=8.2=h5eee18b_0 - setuptools=65.6.3=py37h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tomli=2.0.1=py37h06a4308_0 - typing_extensions=4.4.0=py37h06a4308_0 - wheel=0.38.4=py37h06a4308_0 - xz=5.6.4=h5eee18b_1 - zipp=3.11.0=py37h06a4308_0 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - azure-kusto-data==0.0.36 - cffi==1.15.1 - charset-normalizer==3.4.1 - cryptography==44.0.2 - idna==3.10 - pycparser==2.21 - pyjwt==2.8.0 - python-dateutil==2.9.0.post0 - requests==2.31.0 - six==1.17.0 - urllib3==2.0.7 prefix: /opt/conda/envs/pykusto
[ "test/test_functions.py::TestFunction::test_iff", "test/test_functions.py::TestFunction::test_iif" ]
[]
[ "test/test_functions.py::TestFunction::test_acos", "test/test_functions.py::TestFunction::test_ago", "test/test_functions.py::TestFunction::test_any", "test/test_functions.py::TestFunction::test_arg_max", "test/test_functions.py::TestFunction::test_arg_min", "test/test_functions.py::TestFunction::test_array_length", "test/test_functions.py::TestFunction::test_avgif", "test/test_functions.py::TestFunction::test_bag_keys", "test/test_functions.py::TestFunction::test_bin", "test/test_functions.py::TestFunction::test_bin_at", "test/test_functions.py::TestFunction::test_bin_auto", "test/test_functions.py::TestFunction::test_case", "test/test_functions.py::TestFunction::test_ceiling", "test/test_functions.py::TestFunction::test_cos", "test/test_functions.py::TestFunction::test_count", "test/test_functions.py::TestFunction::test_countif", "test/test_functions.py::TestFunction::test_dcount", "test/test_functions.py::TestFunction::test_endofday", "test/test_functions.py::TestFunction::test_endofmonth", "test/test_functions.py::TestFunction::test_endofweek", "test/test_functions.py::TestFunction::test_exp", "test/test_functions.py::TestFunction::test_exp10", "test/test_functions.py::TestFunction::test_exp2", "test/test_functions.py::TestFunction::test_floor", "test/test_functions.py::TestFunction::test_format_datetime", "test/test_functions.py::TestFunction::test_format_timespan", "test/test_functions.py::TestFunction::test_getmonth", "test/test_functions.py::TestFunction::test_gettype", "test/test_functions.py::TestFunction::test_getyear", "test/test_functions.py::TestFunction::test_hash", "test/test_functions.py::TestFunction::test_hash_sha256", "test/test_functions.py::TestFunction::test_hourofday", "test/test_functions.py::TestFunction::test_isempty", "test/test_functions.py::TestFunction::test_isfinite", "test/test_functions.py::TestFunction::test_isinf", "test/test_functions.py::TestFunction::test_isnan", "test/test_functions.py::TestFunction::test_isnotempty", "test/test_functions.py::TestFunction::test_isnotnull", "test/test_functions.py::TestFunction::test_isnull", "test/test_functions.py::TestFunction::test_isutf8", "test/test_functions.py::TestFunction::test_log", "test/test_functions.py::TestFunction::test_log10", "test/test_functions.py::TestFunction::test_log2", "test/test_functions.py::TestFunction::test_loggamma", "test/test_functions.py::TestFunction::test_make_bag", "test/test_functions.py::TestFunction::test_make_datetime", "test/test_functions.py::TestFunction::test_make_list", "test/test_functions.py::TestFunction::test_make_set", "test/test_functions.py::TestFunction::test_max", "test/test_functions.py::TestFunction::test_min", "test/test_functions.py::TestFunction::test_nesting", "test/test_functions.py::TestFunction::test_now", "test/test_functions.py::TestFunction::test_percentile", "test/test_functions.py::TestFunction::test_percentiles", "test/test_functions.py::TestFunction::test_pow", "test/test_functions.py::TestFunction::test_round", "test/test_functions.py::TestFunction::test_sign", "test/test_functions.py::TestFunction::test_sqrt", "test/test_functions.py::TestFunction::test_startofday", "test/test_functions.py::TestFunction::test_startofmonth", "test/test_functions.py::TestFunction::test_startofweek", "test/test_functions.py::TestFunction::test_startofyear", "test/test_functions.py::TestFunction::test_stdev", "test/test_functions.py::TestFunction::test_stdevif", "test/test_functions.py::TestFunction::test_stdevp", "test/test_functions.py::TestFunction::test_strcat", "test/test_functions.py::TestFunction::test_strcat_array", "test/test_functions.py::TestFunction::test_strcat_delim", "test/test_functions.py::TestFunction::test_strcmp", "test/test_functions.py::TestFunction::test_string_size", "test/test_functions.py::TestFunction::test_strlen", "test/test_functions.py::TestFunction::test_strrep", "test/test_functions.py::TestFunction::test_substring", "test/test_functions.py::TestFunction::test_sum", "test/test_functions.py::TestFunction::test_sumif", "test/test_functions.py::TestFunction::test_tobool", "test/test_functions.py::TestFunction::test_toboolean", "test/test_functions.py::TestFunction::test_todouble", "test/test_functions.py::TestFunction::test_variance", "test/test_functions.py::TestFunction::test_varianceif", "test/test_functions.py::TestFunction::test_variancep" ]
[]
MIT License
null
Azure__pykusto-36
290b60fd7ed3b61c05a3959c1adc7d4ce943f5db
2020-01-01 09:57:29
68121cdd79cc9c1d6b8f71e5e80df566ac6842c7
diff --git a/pykusto/expressions.py b/pykusto/expressions.py index d921749..e5ceedc 100644 --- a/pykusto/expressions.py +++ b/pykusto/expressions.py @@ -14,7 +14,7 @@ MappingType = Union[Mapping, 'MappingExpression'] DatetimeType = Union[datetime, 'DatetimeExpression'] TimespanType = Union[timedelta, 'TimespanExpression'] AggregationType = Union['AggregationExpression'] -DynamicType = Union[ArrayType, MappingType] +DynamicType = Union['DynamicExpression'] OrderType = Union[DatetimeType, TimespanType, NumberType, StringType] @@ -421,7 +421,20 @@ class TimespanExpression(BaseExpression): ))) -class ArrayExpression(BaseExpression): +class ArrayBaseExpression(BaseExpression): + def __getitem__(self, index: NumberType) -> 'AnyExpression': + return AnyExpression(KQL('{}[{}]'.format(self.kql, _subexpr_to_kql(index)))) + + +class MappingBaseExpression(BaseExpression): + def __getitem__(self, index: StringType) -> 'AnyExpression': + return AnyExpression(KQL('{}[{}]'.format(self.kql, _subexpr_to_kql(index)))) + + def __getattr__(self, name: str) -> 'AnyExpression': + return AnyExpression(KQL('{}.{}'.format(self.kql, name))) + + +class ArrayExpression(ArrayBaseExpression): def __len__(self) -> NumberExpression: return self.array_length() @@ -437,16 +450,13 @@ class ArrayExpression(BaseExpression): ', '.join('{}'.format(_subexpr_to_kql(e) for e in elements)) ))) - def __getitem__(self, index: NumberType) -> BaseExpression: - return BaseExpression(KQL('{}[{}]'.format(self.kql, _subexpr_to_kql(index)))) - def assign_to(self, *columns: 'Column') -> 'AssignmentBase': if len(columns) <= 1: return super().assign_to(*columns) return AssignmentToMultipleColumns(columns, self) -class MappingExpression(BaseExpression): +class MappingExpression(MappingBaseExpression): def keys(self) -> ArrayExpression: return ArrayExpression(KQL('bag_keys({})'.format(self.kql))) @@ -456,8 +466,18 @@ class MappingExpression(BaseExpression): ', '.join('"{}", {}'.format(k, _subexpr_to_kql(v)) for k, v in kwargs) ))) - def __getitem__(self, index: StringType) -> BaseExpression: - return BaseExpression(KQL('{}[{}]'.format(self.kql, _subexpr_to_kql(index)))) + +class DynamicExpression(ArrayExpression, MappingExpression): + def __getitem__(self, index: Union[StringType, NumberType]) -> 'AnyExpression': + return AnyExpression(KQL('{}[{}]'.format(self.kql, _subexpr_to_kql(index)))) + + +class AnyExpression( + NumberExpression, BooleanExpression, + StringExpression, DynamicExpression, + DatetimeExpression, TimespanExpression +): + pass class AggregationExpression(BaseExpression): @@ -545,20 +565,13 @@ class AssignmentFromAggregationToColumn(AssignmentBase): super().__init__(None if column is None else column.kql, aggregation) -class Column( - NumberExpression, BooleanExpression, StringExpression, - ArrayExpression, MappingExpression, DatetimeExpression, - TimespanExpression -): +class Column(AnyExpression): _name: str def __init__(self, name: str) -> None: super().__init__(KQL("['{}']".format(name) if '.' in name else name)) self._name = name - def __getattr__(self, name: str) -> 'Column': - return Column(self._name + '.' + name) - def as_subexpression(self) -> KQL: return self.kql @@ -572,10 +585,6 @@ class Column( return AssignmentFromColumnToColumn(columns[0], self) return ArrayExpression.assign_to(self, *columns) - def __call__(self, *args, **kwargs): - # Someone tried to call a non-existent method, and a column object was generated - raise AttributeError("No such method: " + self._name.split('.')[-1]) - class ColumnGenerator: def __getattr__(self, name: str) -> Column: diff --git a/setup.py b/setup.py index b31e771..01983a5 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='pykusto', - version='0.0.5', + version='0.0.6', packages=find_packages(exclude=['test']), url='https://github.com/Azure/pykusto', license='MIT License',
Refactor array, mapping dynamic types * Introduce DynamicExpression and AnyExpression * ArrayExpression and MappingExpression should return AnyExpression * Delete Column.__getitem__ * Fix inheritance tree
Azure/pykusto
diff --git a/test/test_expressions.py b/test/test_expressions.py index 7c42e8a..5b6f766 100644 --- a/test/test_expressions.py +++ b/test/test_expressions.py @@ -38,22 +38,46 @@ class TestExpressions(TestBase): Query().where(col.arr[col.foo * 2] == 'bar').render(), ) + def test_array_access_yields_any_expression(self): + self.assertEqual( + ' | where (cos(arr[3])) < 1', + Query().where(col.arr[3].cos() < 1).render(), + ) + def test_mapping_access(self): self.assertEqual( ' | where (dict["key"]) == "bar"', Query().where(col.dict['key'] == 'bar').render(), ) + def test_mapping_access_attribute(self): + self.assertEqual( + ' | where (dict.key) == "bar"', + Query().where(col.dict.key == 'bar').render(), + ) + def test_mapping_access_expression_index(self): self.assertEqual( ' | where (dict[foo]) == "bar"', Query().where(col.dict[col.foo] == 'bar').render(), ) + def test_mapping_access_yields_any_expression(self): + self.assertEqual( + ' | where (dict["key"]) contains "substr"', + Query().where(col.dict['key'].contains("substr")).render(), + ) + + def test_dynamic(self): + self.assertEqual( + ' | where (dict["foo"][0].bar[1][2][(tolower(bar))]) > time(1.0:0:0.0)', + Query().where(col.dict['foo'][0].bar[1][2][col.bar.lower()] > timedelta(1)).render(), + ) + def test_assign_to(self): self.assertEqual( - " | extend ['foo.bar'] = (shoo * 2)", - Query().extend((col.shoo * 2).assign_to(col.foo.bar)).render(), + " | extend bar = (foo * 2)", + Query().extend((col.foo * 2).assign_to(col.bar)).render(), ) self.assertEqual( " | extend foo = (shoo * 2)", @@ -78,19 +102,7 @@ class TestExpressions(TestBase): col.foo.is_empty().kql, ) - def test_method_does_not_exist(self): - self.assertRaises( - AttributeError("No such method: non_existant_method"), - col.foo.non_existant_method, - ) - def test_column_generator(self): - self.assertEqual( - " | project ['foo.bar']", - Query().project(col.foo.bar).render(), - ) - - def test_column_generator_2(self): self.assertEqual( " | project ['foo.bar']", Query().project(col['foo.bar']).render(),
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 3, "test_score": 2 }, "num_modified_files": 2 }
0.0
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": null, "python": "3.7", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 azure-kusto-data==0.0.36 certifi @ file:///croot/certifi_1671487769961/work/certifi cffi==1.15.1 charset-normalizer==3.4.1 cryptography==44.0.2 exceptiongroup==1.2.2 idna==3.10 importlib-metadata==6.7.0 iniconfig==2.0.0 packaging==24.0 pluggy==1.2.0 pycparser==2.21 PyJWT==2.8.0 -e git+https://github.com/Azure/pykusto.git@290b60fd7ed3b61c05a3959c1adc7d4ce943f5db#egg=pykusto pytest==7.4.4 python-dateutil==2.9.0.post0 requests==2.31.0 six==1.17.0 tomli==2.0.1 typing_extensions==4.7.1 urllib3==2.0.7 zipp==3.15.0
name: pykusto channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2022.12.7=py37h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=22.3.1=py37h06a4308_0 - python=3.7.16=h7a1cb2a_0 - readline=8.2=h5eee18b_0 - setuptools=65.6.3=py37h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.38.4=py37h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - azure-kusto-data==0.0.36 - cffi==1.15.1 - charset-normalizer==3.4.1 - cryptography==44.0.2 - exceptiongroup==1.2.2 - idna==3.10 - importlib-metadata==6.7.0 - iniconfig==2.0.0 - packaging==24.0 - pluggy==1.2.0 - pycparser==2.21 - pyjwt==2.8.0 - pytest==7.4.4 - python-dateutil==2.9.0.post0 - requests==2.31.0 - six==1.17.0 - tomli==2.0.1 - typing-extensions==4.7.1 - urllib3==2.0.7 - zipp==3.15.0 prefix: /opt/conda/envs/pykusto
[ "test/test_expressions.py::TestExpressions::test_array_access_yields_any_expression", "test/test_expressions.py::TestExpressions::test_dynamic", "test/test_expressions.py::TestExpressions::test_mapping_access_attribute", "test/test_expressions.py::TestExpressions::test_mapping_access_yields_any_expression" ]
[]
[ "test/test_expressions.py::TestExpressions::test_array_access", "test/test_expressions.py::TestExpressions::test_array_access_expression_index", "test/test_expressions.py::TestExpressions::test_assign_to", "test/test_expressions.py::TestExpressions::test_between_timespan", "test/test_expressions.py::TestExpressions::test_column_generator", "test/test_expressions.py::TestExpressions::test_contains", "test/test_expressions.py::TestExpressions::test_extend_const", "test/test_expressions.py::TestExpressions::test_has", "test/test_expressions.py::TestExpressions::test_is_empty", "test/test_expressions.py::TestExpressions::test_is_in", "test/test_expressions.py::TestExpressions::test_mapping_access", "test/test_expressions.py::TestExpressions::test_mapping_access_expression_index", "test/test_expressions.py::TestExpressions::test_not_contains" ]
[]
MIT License
null
Azure__pykusto-41
d20a446d97e242d6ce4b8e99b6ab0c076e629e6c
2020-01-01 13:23:03
68121cdd79cc9c1d6b8f71e5e80df566ac6842c7
diff --git a/pykusto/client.py b/pykusto/client.py index 2bc47e4..23b7266 100644 --- a/pykusto/client.py +++ b/pykusto/client.py @@ -1,5 +1,4 @@ from typing import Union, List, Tuple - # noinspection PyProtectedMember from urllib.parse import urlparse @@ -7,7 +6,7 @@ from urllib.parse import urlparse from azure.kusto.data._response import KustoResponseDataSet from azure.kusto.data.request import KustoClient, KustoConnectionStringBuilder, ClientRequestProperties -from pykusto.utils import KQL +from pykusto.kql_converters import KQL class PyKustoClient: diff --git a/pykusto/expressions.py b/pykusto/expressions.py index f1e9db8..a02183b 100644 --- a/pykusto/expressions.py +++ b/pykusto/expressions.py @@ -1,9 +1,10 @@ from datetime import datetime, timedelta -from typing import Any, List, Tuple, Mapping, Optional +from numbers import Number +from typing import Any, List, Tuple, Mapping, Optional, Type from typing import Union -from pykusto.utils import KQL -from pykusto.utils import KustoTypes, to_kql +from pykusto.kql_converters import KQL +from pykusto.type_utils import plain_expression, aggregation_expression, KustoTypes, kql_converter ExpressionType = Union[KustoTypes, 'BaseExpression'] StringType = Union[str, 'StringExpression'] @@ -13,14 +14,21 @@ ArrayType = Union[List, Tuple, 'ArrayExpression'] MappingType = Union[Mapping, 'MappingExpression'] DatetimeType = Union[datetime, 'DatetimeExpression'] TimespanType = Union[timedelta, 'TimespanExpression'] -AggregationType = Union['AggregationExpression'] -DynamicType = Union['DynamicExpression'] +DynamicType = Union[ArrayType, MappingType] OrderType = Union[DatetimeType, TimespanType, NumberType, StringType] # All classes in the same file to prevent circular dependencies def _subexpr_to_kql(obj: ExpressionType) -> KQL: + """ + Convert the given expression to KQL, enclosing it in parentheses if it is a compound expression. This guarantees + correct evaluation order. When parentheses are not needed, for example when the expressions is used as an argument + to a function, use `to_kql` instead. + + :param obj: Expression to convert to KQL + :return: KQL that represents the given expression + """ if isinstance(obj, BaseExpression): return obj.as_subexpression() return to_kql(obj) @@ -29,11 +37,20 @@ def _subexpr_to_kql(obj: ExpressionType) -> KQL: class BaseExpression: kql: KQL - def __init__(self, kql: KQL) -> None: + def __new__(cls, *args, **kwargs): + if cls is 'BaseExpression': + raise TypeError("BaseExpression is abstract") + return object.__new__(cls) + + def __init__(self, kql: Union[KQL, 'BaseExpression']) -> None: + if isinstance(kql, BaseExpression): + self.kql = kql.kql + elif not isinstance(kql, str): + raise ValueError("Either expression or KQL required") self.kql = kql def __repr__(self) -> str: - return self.kql + return str(self.kql) def as_subexpression(self) -> KQL: return KQL('({})'.format(self.kql)) @@ -58,10 +75,15 @@ class BaseExpression: return BooleanExpression(KQL('{} has \"{}\"'.format(self.kql, exp))) @staticmethod - def binary_op(left: ExpressionType, operator: str, right: ExpressionType) -> KQL: - return KQL('{}{}{}'.format( + def base_binary_op( + left: ExpressionType, operator: str, right: ExpressionType, result_type: Type[KustoTypes] + ) -> 'BaseExpression': + registrar = plain_expression + if isinstance(left, AggregationExpression) or isinstance(right, AggregationExpression): + registrar = aggregation_expression + return registrar.for_type(result_type)(KQL('{}{}{}'.format( _subexpr_to_kql(left), operator, _subexpr_to_kql(right)) - ) + )) def __eq__(self, other: ExpressionType) -> 'BooleanExpression': return BooleanExpression.binary_op(self, ' == ', other) @@ -100,10 +122,12 @@ class BaseExpression: raise ValueError("Only arrays can be assigned to multiple columns") +@plain_expression(bool) class BooleanExpression(BaseExpression): @staticmethod def binary_op(left: ExpressionType, operator: str, right: ExpressionType) -> 'BooleanExpression': - return BooleanExpression(BaseExpression.binary_op(left, operator, right)) + # noinspection PyTypeChecker + return BaseExpression.base_binary_op(left, operator, right, bool) def __and__(self, other: BooleanType) -> 'BooleanExpression': return BooleanExpression.binary_op(self, ' and ', other) @@ -115,10 +139,12 @@ class BooleanExpression(BaseExpression): return BooleanExpression(KQL('not({})'.format(self.kql))) +@plain_expression(Number) class NumberExpression(BaseExpression): @staticmethod def binary_op(left: NumberType, operator: str, right: NumberType) -> 'NumberExpression': - return NumberExpression(BaseExpression.binary_op(left, operator, right)) + # noinspection PyTypeChecker + return BaseExpression.base_binary_op(left, operator, right, Number) def __lt__(self, other: NumberType) -> BooleanExpression: return BooleanExpression.binary_op(self, ' < ', other) @@ -168,15 +194,15 @@ class NumberExpression(BaseExpression): return NumberExpression(KQL('floor({}, {})'.format(self.kql, _subexpr_to_kql(round_to)))) def bin(self, round_to: NumberType) -> 'BaseExpression': - return BaseExpression(KQL('bin({}, {})'.format(self.kql, _subexpr_to_kql(round_to)))) + return NumberExpression(KQL('bin({}, {})'.format(self.kql, _subexpr_to_kql(round_to)))) def bin_at(self, round_to: NumberType, fixed_point: NumberType) -> 'BaseExpression': - return BaseExpression(KQL('bin_at({}, {}, {})'.format(self.kql, - _subexpr_to_kql(round_to), - _subexpr_to_kql(fixed_point)))) + return NumberExpression(KQL('bin_at({}, {}, {})'.format(self.kql, + _subexpr_to_kql(round_to), + _subexpr_to_kql(fixed_point)))) def bin_auto(self) -> 'BaseExpression': - return BaseExpression(KQL('bin_auto({})'.format(self.kql))) + return NumberExpression(KQL('bin_auto({})'.format(self.kql))) def ceiling(self) -> 'NumberExpression': return NumberExpression(KQL('ceiling({})'.format(self.kql))) @@ -213,11 +239,17 @@ class NumberExpression(BaseExpression): def round(self, precision: NumberType = None) -> 'NumberExpression': return NumberExpression(KQL( - ('round({}, {})' if precision is None else 'round({}, {})').format(self, precision) + ('round({}, {})' if precision is None else 'round({}, {})').format(self.kql, to_kql(precision)) )) +@plain_expression(str) class StringExpression(BaseExpression): + @staticmethod + def binary_op(left: ExpressionType, operator: str, right: ExpressionType) -> 'StringExpression': + # noinspection PyTypeChecker + return BaseExpression.base_binary_op(left, operator, right, str) + def __len__(self) -> NumberExpression: return self.string_size() @@ -228,7 +260,7 @@ class StringExpression(BaseExpression): return BooleanExpression(KQL('isempty({})'.format(self.kql))) def __add__(self, other: StringType) -> 'StringExpression': - return StringExpression(BaseExpression.binary_op(self, ' + ', other)) + return StringExpression.binary_op(self, ' + ', other) @staticmethod def concat(*strings: StringType) -> 'StringExpression': @@ -238,8 +270,10 @@ class StringExpression(BaseExpression): def split(self, delimiter: StringType, requested_index: NumberType = None) -> 'ArrayExpression': if requested_index is None: - return ArrayExpression(KQL('split({}, {})'.format(_subexpr_to_kql(self.kql), _subexpr_to_kql(delimiter)))) - return ArrayExpression(KQL('split({}, {}, {})'.format(_subexpr_to_kql(self.kql), _subexpr_to_kql(delimiter), requested_index))) + return ArrayExpression(KQL('split({}, {})'.format(to_kql(self.kql), to_kql(delimiter)))) + return ArrayExpression(KQL('split({}, {}, {})'.format( + to_kql(self.kql), to_kql(delimiter), to_kql(requested_index) + ))) def equals(self, other: StringType, case_sensitive: bool = False) -> BooleanExpression: return BooleanExpression.binary_op(self, ' == ' if case_sensitive else ' =~ ', other) @@ -278,10 +312,12 @@ class StringExpression(BaseExpression): return BooleanExpression(KQL('isutf8({})'.format(self.kql))) +@plain_expression(datetime) class DatetimeExpression(BaseExpression): @staticmethod def binary_op(left: ExpressionType, operator: str, right: ExpressionType) -> 'DatetimeExpression': - return DatetimeExpression(BaseExpression.binary_op(left, operator, right)) + # noinspection PyTypeChecker + return BaseExpression.base_binary_op(left, operator, right, datetime) def __lt__(self, other: DatetimeType) -> BooleanExpression: return BooleanExpression.binary_op(self, ' < ', other) @@ -316,15 +352,15 @@ class DatetimeExpression(BaseExpression): return DatetimeExpression(KQL('floor({}, {})'.format(self.kql, _subexpr_to_kql(round_to)))) def bin(self, round_to: TimespanType) -> 'BaseExpression': - return BaseExpression(KQL('bin({}, {})'.format(self.kql, _subexpr_to_kql(round_to)))) + return DatetimeExpression(KQL('bin({}, {})'.format(self.kql, _subexpr_to_kql(round_to)))) def bin_at(self, round_to: TimespanType, fixed_point: DatetimeType) -> 'BaseExpression': - return BaseExpression(KQL('bin_at({}, {}, {})'.format(self.kql, - _subexpr_to_kql(round_to), - _subexpr_to_kql(fixed_point)))) + return DatetimeExpression(KQL('bin_at({}, {}, {})'.format( + self.kql, _subexpr_to_kql(round_to), to_kql(fixed_point) + ))) def bin_auto(self) -> 'BaseExpression': - return BaseExpression(KQL('bin_auto({})'.format(self.kql))) + return DatetimeExpression(KQL('bin_auto({})'.format(self.kql))) def endofday(self, offset: NumberType = None) -> 'DatetimeExpression': if offset is None: @@ -364,33 +400,35 @@ class DatetimeExpression(BaseExpression): return NumberExpression(KQL('getyear({})'.format(self.kql))) def hourofday(self) -> NumberExpression: - return NumberExpression(KQL('hourofday({})'.format(self))) + return NumberExpression(KQL('hourofday({})'.format(self.kql))) def startofday(self, offset: NumberType = None) -> 'DatetimeExpression': return DatetimeExpression(KQL( - ('startofday({})' if offset is None else 'startofday({}, {})').format(self.kql, offset) + ('startofday({})' if offset is None else 'startofday({}, {})').format(self.kql, to_kql(offset)) )) def startofmonth(self, offset: NumberType = None) -> 'DatetimeExpression': return DatetimeExpression(KQL( - ('startofmonth({})' if offset is None else 'startofmonth({}, {})').format(self.kql, offset) + ('startofmonth({})' if offset is None else 'startofmonth({}, {})').format(self.kql, to_kql(offset)) )) def startofweek(self, offset: NumberType = None) -> 'DatetimeExpression': return DatetimeExpression(KQL( - ('startofweek({})' if offset is None else 'startofweek({}, {})').format(self.kql, offset) + ('startofweek({})' if offset is None else 'startofweek({}, {})').format(self.kql, to_kql(offset)) )) def startofyear(self, offset: NumberType = None) -> 'DatetimeExpression': return DatetimeExpression(KQL( - ('startofyear({})' if offset is None else 'startofyear({}, {})').format(self.kql, offset) + ('startofyear({})' if offset is None else 'startofyear({}, {})').format(self.kql, to_kql(offset)) )) +@plain_expression(timedelta) class TimespanExpression(BaseExpression): @staticmethod def binary_op(left: ExpressionType, operator: str, right: ExpressionType) -> 'TimespanExpression': - return TimespanExpression(BaseExpression.binary_op(left, operator, right)) + # noinspection PyTypeChecker + return BaseExpression.base_binary_op(left, operator, right, timedelta) def __add__(self, other: TimespanType) -> 'TimespanExpression': return TimespanExpression.binary_op(self, ' + ', other) @@ -402,18 +440,18 @@ class TimespanExpression(BaseExpression): return DatetimeExpression(KQL('ago({})'.format(_subexpr_to_kql(self)))) def bin(self, round_to: TimespanType) -> 'BaseExpression': - return BaseExpression(KQL('bin({}, {})'.format(self.kql, _subexpr_to_kql(round_to)))) + return TimespanExpression(KQL('bin({}, {})'.format(self.kql, _subexpr_to_kql(round_to)))) def bin_at(self, round_to: TimespanType, fixed_point: TimespanType) -> 'BaseExpression': - return BaseExpression(KQL('bin_at({}, {}, {})'.format(self.kql, - _subexpr_to_kql(round_to), - _subexpr_to_kql(fixed_point)))) + return TimespanExpression(KQL('bin_at({}, {}, {})'.format( + self.kql, to_kql(round_to), to_kql(fixed_point) + ))) def bin_auto(self) -> 'BaseExpression': - return BaseExpression(KQL('bin_auto({})'.format(self.kql))) + return TimespanExpression(KQL('bin_auto({})'.format(self.kql))) def format_timespan(self, format_string: StringType) -> StringExpression: - return StringExpression(KQL('format_timespan({}, {})'.format(self.kql, _subexpr_to_kql(format_string)))) + return StringExpression(KQL('format_timespan({}, {})'.format(self.kql, to_kql(format_string)))) def between(self, lower: TimespanType, upper: TimespanType) -> BooleanExpression: return BooleanExpression(KQL('{} between ({} .. {})'.format( @@ -434,6 +472,7 @@ class MappingBaseExpression(BaseExpression): return AnyExpression(KQL('{}.{}'.format(self.kql, name))) +@plain_expression(List, Tuple) class ArrayExpression(ArrayBaseExpression): def __len__(self) -> NumberExpression: return self.array_length() @@ -450,12 +489,16 @@ class ArrayExpression(ArrayBaseExpression): ', '.join('{}'.format(_subexpr_to_kql(e) for e in elements)) ))) + def __getitem__(self, index: NumberType) -> BaseExpression: + return AnyExpression(KQL('{}[{}]'.format(self.kql, _subexpr_to_kql(index)))) + def assign_to(self, *columns: 'Column') -> 'AssignmentBase': if len(columns) <= 1: return super().assign_to(*columns) return AssignmentToMultipleColumns(columns, self) +@plain_expression(Mapping) class MappingExpression(MappingBaseExpression): def keys(self) -> ArrayExpression: return ArrayExpression(KQL('bag_keys({})'.format(self.kql))) @@ -481,6 +524,10 @@ class AnyExpression( class AggregationExpression(BaseExpression): + def __new__(cls, *args, **kwargs): + if cls is 'AggregationExpression': + raise TypeError("AggregationExpression is abstract") + return object.__new__(cls) def assign_to(self, *columns: 'Column') -> 'AssignmentFromAggregationToColumn': if len(columns) == 0: @@ -494,30 +541,37 @@ class AggregationExpression(BaseExpression): return self.kql +@aggregation_expression(bool) class BooleanAggregationExpression(AggregationExpression, BooleanExpression): pass +@aggregation_expression(Number) class NumberAggregationExpression(AggregationExpression, NumberExpression): pass +@aggregation_expression(str) class StringAggregationExpression(AggregationExpression, StringExpression): pass +@aggregation_expression(datetime) class DatetimeAggregationExpression(AggregationExpression, DatetimeExpression): pass +@aggregation_expression(timedelta) class TimespanAggregationExpression(AggregationExpression, TimespanExpression): pass +@aggregation_expression(List, Tuple) class ArrayAggregationExpression(AggregationExpression, ArrayExpression): pass +@aggregation_expression(Mapping) class MappingAggregationExpression(AggregationExpression, MappingExpression): pass @@ -561,7 +615,7 @@ class AssignmentToMultipleColumns(AssignmentBase): class AssignmentFromAggregationToColumn(AssignmentBase): - def __init__(self, column: Optional['Column'], aggregation: AggregationType) -> None: + def __init__(self, column: Optional['Column'], aggregation: AggregationExpression) -> None: super().__init__(None if column is None else column.kql, aggregation) @@ -597,3 +651,18 @@ class ColumnGenerator: # Recommended usage: from pykusto.expressions import column_generator as col # TODO: Is there a way to enforce this to be a singleton? column_generator = ColumnGenerator() + + +def to_kql(obj: ExpressionType) -> KQL: + """ + Convert the given expression to KQL. If this is a subexpression of a greater expression, neighboring operators might + take precedence over operators included in this expression, causing an incorrect evaluation order. + If this is a concern, use `_subexpr_to_kql` instead, which will enclose this expression in parentheses if it is + a compound expression. + + :param obj: Expression to convert to KQL + :return: KQL that represents the given expression + """ + if isinstance(obj, BaseExpression): + return obj.kql + return kql_converter.for_obj(obj) diff --git a/pykusto/functions.py b/pykusto/functions.py index 6894492..6269870 100644 --- a/pykusto/functions.py +++ b/pykusto/functions.py @@ -1,7 +1,12 @@ -from pykusto import utils -from pykusto.expressions import * -from pykusto.expressions import _subexpr_to_kql, Column -from pykusto.utils import KQL +from typing import Union + +from pykusto.expressions import Column, NumberType, NumberExpression, TimespanType, \ + DatetimeExpression, TimespanExpression, ArrayType, DynamicType, DatetimeType, BaseExpression, BooleanType, \ + ExpressionType, AggregationExpression, StringType, StringExpression, BooleanExpression, \ + NumberAggregationExpression, MappingAggregationExpression, ArrayAggregationExpression, to_kql, DynamicExpression, \ + ArrayExpression +from pykusto.kql_converters import KQL +from pykusto.type_utils import plain_expression # Scalar functions @@ -101,9 +106,9 @@ def bin_auto(expr: Union[NumberType, DatetimeType, TimespanType]) -> BaseExpress def case(predicate: BooleanType, val: ExpressionType, *args: Union[BooleanType, ExpressionType]) -> BaseExpression: - res = 'case({}, {}, {})'.format(_subexpr_to_kql(predicate), - _subexpr_to_kql(val), - ', '.join([_subexpr_to_kql(arg) for arg in args])) + res = 'case({}, {}, {})'.format( + to_kql(predicate), to_kql(val), ', '.join([to_kql(arg) for arg in args]) + ) return AggregationExpression(KQL(res)) @@ -167,7 +172,7 @@ def cos(expr: NumberType) -> NumberExpression: # def dcount_hll(expr: ExpressionType) -> BaseExpression: -# return BaseExpression(KQL('dcount_hll({})'.format(expr))) +# return BaseExpression(KQL('dcount_hll({})'.format(to_kql(expr)))) # def degrees(self): return @@ -260,7 +265,12 @@ def hourofday(expr: DatetimeType) -> NumberExpression: def iff(predicate: BooleanType, if_true: ExpressionType, if_false: ExpressionType) -> BaseExpression: - return BaseExpression(KQL('iff({}, {}, {})'.format(predicate, _subexpr_to_kql(if_true), _subexpr_to_kql(if_false)))) + return_type = type(if_true) + if type(if_false) is not return_type: + raise TypeError("The second and third arguments must be of the same type") + return plain_expression.for_type(return_type)( + KQL('iff({}, {}, {})'.format(to_kql(predicate), to_kql(if_true), to_kql(if_false))) + ) def iif(predicate: BooleanType, if_true: ExpressionType, if_false: ExpressionType) -> BaseExpression: @@ -335,12 +345,12 @@ def make_datetime(year: NumberType, minute: NumberType = None, second: NumberType = None) -> DatetimeExpression: res = 'make_datetime({year}, {month}, {day}, {hour}, {minute}, {second})'.format( - year=_subexpr_to_kql(year), - month=_subexpr_to_kql(month), - day=_subexpr_to_kql(day), - hour=_subexpr_to_kql(0 if hour is None else hour), - minute=_subexpr_to_kql(0 if minute is None else minute), - second=_subexpr_to_kql(0 if second is None else second) + year=to_kql(year), + month=to_kql(month), + day=to_kql(day), + hour=to_kql(0 if hour is None else hour), + minute=to_kql(0 if minute is None else minute), + second=to_kql(0 if second is None else second) ) return DatetimeExpression(KQL(res)) @@ -365,7 +375,7 @@ def new_guid(): raise NotImplemented # TODO def now(offset: TimespanType = None) -> StringExpression: if offset: - return StringExpression(KQL('now({})'.format(utils.timedelta_to_kql(offset)))) + return StringExpression(KQL('now({})'.format(to_kql(offset)))) return StringExpression(KQL('now()')) @@ -390,7 +400,7 @@ def pack_dictionary(): raise NotImplemented # TODO def parse_json(expr: Union[StringType, DynamicType]) -> DynamicExpression: - return DynamicExpression(KQL('parse_json({})'.format(expr))) + return DynamicExpression(KQL('parse_json({})'.format(to_kql(expr)))) # def parse_path(self): return @@ -418,7 +428,7 @@ def percentrank_tdigest(): raise NotImplemented # TODO def pow(expr1: NumberType, expr2: NumberType) -> NumberExpression: - return NumberExpression(KQL('pow({}, {})'.format(expr1, expr2))) + return NumberExpression(KQL('pow({}, {})'.format(to_kql(expr1), to_kql(expr2)))) # def radians(self): return @@ -543,7 +553,7 @@ def round(expr: NumberType, precision: NumberType = None) -> NumberExpression: def sign(expr: NumberType) -> NumberExpression: - return NumberExpression(KQL('sign({})'.format(expr))) + return NumberExpression(KQL('sign({})'.format(to_kql(expr)))) # def sin(self): return @@ -554,7 +564,7 @@ def split(string: StringType, delimiter: StringType, requested_index: NumberType def sqrt(expr: NumberType) -> NumberExpression: - return NumberExpression(KQL('sqrt({})'.format(expr))) + return NumberExpression(KQL('sqrt({})'.format(to_kql(expr)))) def startofday(expr: DatetimeType, offset: NumberType = None) -> DatetimeExpression: @@ -574,52 +584,55 @@ def startofyear(expr: DatetimeType, offset: NumberType = None) -> DatetimeExpres def strcat(expr1: StringType, expr2: StringType, *exprs: StringType) -> StringExpression: - res = 'strcat({}, {}'.format(_subexpr_to_kql(expr1), - _subexpr_to_kql(expr2)) + res = 'strcat({}, {}'.format(to_kql(expr1), + to_kql(expr2)) if len(exprs) > 0: - res = res + ', ' + ', '.join([_subexpr_to_kql(expr) for expr in exprs]) + res = res + ', ' + ', '.join([to_kql(expr) for expr in exprs]) return StringExpression(KQL(res + ')')) def strcat_array(expr: ArrayType, delimiter: StringType) -> StringExpression: - return StringExpression(KQL('strcat_array({}, {})'.format(expr, _subexpr_to_kql(delimiter)))) + return StringExpression(KQL('strcat_array({}, {})'.format(to_kql(expr), to_kql(delimiter)))) def strcat_delim(delimiter: StringType, expr1: StringType, expr2: StringType, *exprs: StringType) -> StringExpression: res = 'strcat_delim({}, {}, {}'.format( - _subexpr_to_kql(delimiter), - _subexpr_to_kql(expr1), - _subexpr_to_kql(expr2)) + to_kql(delimiter), + to_kql(expr1), + to_kql(expr2)) if len(exprs) > 0: - res = res + ', ' + ', '.join([_subexpr_to_kql(expr) for expr in exprs]) + res = res + ', ' + ', '.join([to_kql(expr) for expr in exprs]) return StringExpression(KQL(res + ')')) def strcmp(expr1: StringType, expr2: StringType) -> NumberExpression: - return NumberExpression(KQL('strcmp({}, {})'.format(expr1, expr2))) + return NumberExpression(KQL('strcmp({}, {})'.format(to_kql(expr1), to_kql(expr2)))) def string_size(expr: StringType) -> NumberExpression: - return NumberExpression(KQL('string_size({})'.format(expr))) + return NumberExpression(KQL('string_size({})'.format(to_kql(expr)))) def strlen(expr: StringType) -> NumberExpression: - return NumberExpression(KQL('strlen({})'.format(expr))) + return NumberExpression(KQL('strlen({})'.format(to_kql(expr)))) def strrep(expr: StringType, multiplier: NumberType, delimiter: StringType = None) -> StringExpression: if delimiter is None: - res = 'strrep({}, {})'.format(expr, multiplier) + res = 'strrep({}, {})'.format(to_kql(expr), to_kql(multiplier)) else: - res = 'strrep({}, {}, {})'.format(expr, multiplier, _subexpr_to_kql(delimiter)) + res = 'strrep({}, {}, {})'.format(to_kql(expr), to_kql(multiplier), + to_kql(delimiter)) return StringExpression(KQL((res))) def substring(expr: StringType, start_index: NumberType, length: NumberType = None) -> StringExpression: return StringExpression(KQL( - ('substring({}, {})' if length is None else 'substring({}, {}, {})').format(expr, start_index, length) + ('substring({}, {})' if length is None else 'substring({}, {}, {})').format( + to_kql(expr), to_kql(start_index), to_kql(length) + ) )) @@ -630,22 +643,22 @@ def substring(expr: StringType, start_index: NumberType, length: NumberType = No def tobool(expr: ExpressionType) -> BooleanExpression: - return BooleanExpression(KQL('tobool({})'.format(expr))) + return BooleanExpression(KQL('tobool({})'.format(to_kql(expr)))) def toboolean(expr: ExpressionType) -> BooleanExpression: - return BooleanExpression(KQL('toboolean({})'.format(expr))) + return BooleanExpression(KQL('toboolean({})'.format(to_kql(expr)))) def todatetime(expr: StringType) -> DatetimeExpression: - return DatetimeExpression(KQL('todatetime({})'.format(expr))) + return DatetimeExpression(KQL('todatetime({})'.format(to_kql(expr)))) def todecimal(): raise NotImplemented # TODO def todouble(expr: NumberType) -> NumberExpression: - return NumberExpression(KQL("todouble({})".format(expr))) + return NumberExpression(KQL("todouble({})".format(to_kql(expr)))) def todynamic(): raise NotImplemented # TODO @@ -732,11 +745,11 @@ def arg_min(*args: ExpressionType) -> AggregationExpression: def avg(expr: ExpressionType) -> NumberAggregationExpression: - return NumberAggregationExpression(KQL('avg({})'.format(expr))) + return NumberAggregationExpression(KQL('avg({})'.format(to_kql(expr)))) def avgif(expr: ExpressionType, predicate: BooleanType) -> NumberAggregationExpression: - return NumberAggregationExpression(KQL('avgif({}, {})'.format(expr, predicate))) + return NumberAggregationExpression(KQL('avgif({}, {})'.format(to_kql(expr), to_kql(predicate)))) # def buildschema(self): @@ -749,17 +762,19 @@ def count(col: Column = None) -> NumberAggregationExpression: def countif(predicate: BooleanType) -> NumberAggregationExpression: - return NumberAggregationExpression(KQL('countif({})'.format(predicate))) + return NumberAggregationExpression(KQL('countif({})'.format(to_kql(predicate)))) def dcount(expr: ExpressionType, accuracy: NumberType = None) -> NumberAggregationExpression: return NumberAggregationExpression(KQL( - ('dcount({})' if accuracy is None else 'dcount({}, {})').format(expr, accuracy) + ('dcount({})' if accuracy is None else 'dcount({}, {})').format(to_kql(expr), to_kql(accuracy)) )) def dcountif(expr: ExpressionType, predicate: BooleanType, accuracy: NumberType = 0) -> NumberAggregationExpression: - return NumberAggregationExpression(KQL('dcountif({}, {}, {})'.format(expr, predicate, accuracy))) + return NumberAggregationExpression(KQL('dcountif({}, {}, {})'.format( + to_kql(expr), to_kql(predicate), to_kql(accuracy) + ))) # def hll(expr: ExpressionType, accuracy: NumberType = None) -> AggregationExpression: @@ -769,64 +784,64 @@ def dcountif(expr: ExpressionType, predicate: BooleanType, accuracy: NumberType # def hll_merge(expr: ExpressionType) -> AggregationExpression: -# return AggregationExpression(KQL('hll_merge({})'.format(expr))) +# return AggregationExpression(KQL('hll_merge({})'.format(to_kql(expr)))) def make_bag(expr: ExpressionType, max_size: NumberType = None) -> MappingAggregationExpression: if max_size: return MappingAggregationExpression(KQL('make_bag({}, {})'.format(expr, max_size))) - return MappingAggregationExpression(KQL('make_bag({})'.format(expr))) + return MappingAggregationExpression(KQL('make_bag({})'.format(to_kql(expr)))) def make_list(expr: ExpressionType, max_size: NumberType = None) -> ArrayAggregationExpression: if max_size: return ArrayAggregationExpression(KQL('make_list({}, {})'.format(expr, max_size))) - return ArrayAggregationExpression(KQL('make_list({})'.format(expr))) + return ArrayAggregationExpression(KQL('make_list({})'.format(to_kql(expr)))) def make_set(expr: ExpressionType, max_size: NumberType = None) -> ArrayAggregationExpression: if max_size: return ArrayAggregationExpression(KQL('make_set({}, {})'.format(expr, max_size))) - return ArrayAggregationExpression(KQL('make_set({})'.format(expr))) + return ArrayAggregationExpression(KQL('make_set({})'.format(to_kql(expr)))) def max(expr: ExpressionType) -> AggregationExpression: - return AggregationExpression(KQL('max({})'.format(expr))) + return AggregationExpression(KQL('max({})'.format(to_kql(expr)))) def min(expr: ExpressionType) -> AggregationExpression: - return AggregationExpression(KQL('min({})'.format(expr))) + return AggregationExpression(KQL('min({})'.format(to_kql(expr)))) def percentile(expr: ExpressionType, per: NumberType) -> AggregationExpression: - res = 'percentiles({}, {})'.format(expr, _subexpr_to_kql(per)) + res = 'percentiles({}, {})'.format(expr, to_kql(per)) return AggregationExpression(KQL(res)) def percentiles(expr: ExpressionType, *pers: NumberType) -> AggregationExpression: res = 'percentiles({}, {})'.format(expr, - ', '.join([str(_subexpr_to_kql(per)) for per in pers])) + ', '.join([str(to_kql(per)) for per in pers])) return AggregationExpression(KQL(res)) def stdev(expr: ExpressionType) -> AggregationExpression: - return AggregationExpression(KQL('stdev({})'.format(expr))) + return AggregationExpression(KQL('stdev({})'.format(to_kql(expr)))) def stdevif(expr: ExpressionType, predicate: BooleanType) -> AggregationExpression: - return AggregationExpression(KQL('stdevif({}, {})'.format(expr, predicate))) + return AggregationExpression(KQL('stdevif({}, {})'.format(to_kql(expr), to_kql(predicate)))) def stdevp(expr: ExpressionType) -> AggregationExpression: - return AggregationExpression(KQL('stdevp({})'.format(expr))) + return AggregationExpression(KQL('stdevp({})'.format(to_kql(expr)))) def sum(expr: ExpressionType) -> AggregationExpression: - return AggregationExpression(KQL('sum({})'.format(expr))) + return AggregationExpression(KQL('sum({})'.format(to_kql(expr)))) def sumif(expr: ExpressionType, predicate: BooleanType) -> AggregationExpression: - return AggregationExpression(KQL('sumif({}, {})'.format(expr, predicate))) + return AggregationExpression(KQL('sumif({}, {})'.format(to_kql(expr), to_kql(predicate)))) # def tdigest(self): @@ -838,12 +853,12 @@ def sumif(expr: ExpressionType, predicate: BooleanType) -> AggregationExpression def variance(expr: ExpressionType) -> AggregationExpression: - return AggregationExpression(KQL('variance({})'.format(expr))) + return AggregationExpression(KQL('variance({})'.format(to_kql(expr)))) def varianceif(expr: ExpressionType, predicate: BooleanType) -> AggregationExpression: - return AggregationExpression(KQL('varianceif({}, {})'.format(expr, predicate))) + return AggregationExpression(KQL('varianceif({}, {})'.format(to_kql(expr), to_kql(predicate)))) def variancep(expr: ExpressionType) -> AggregationExpression: - return AggregationExpression(KQL('variancep({})'.format(expr))) + return AggregationExpression(KQL('variancep({})'.format(to_kql(expr)))) diff --git a/pykusto/utils.py b/pykusto/kql_converters.py similarity index 60% rename from pykusto/utils.py rename to pykusto/kql_converters.py index 521900d..63079f4 100644 --- a/pykusto/utils.py +++ b/pykusto/kql_converters.py @@ -1,20 +1,19 @@ import json -import logging from datetime import datetime, timedelta -from typing import Union, Mapping, NewType, Type, Dict, Callable, Any, Tuple, List +from numbers import Number +from typing import NewType, Mapping, Union, List, Tuple -logger = logging.getLogger("pykusto") - -KustoTypes = Union[str, int, bool, datetime, Mapping, List, Tuple, float, timedelta] -# TODO: Unhandled date types: guid, decimal +from pykusto.type_utils import kql_converter KQL = NewType('KQL', str) +@kql_converter(datetime) def datetime_to_kql(dt: datetime) -> KQL: return KQL(dt.strftime('datetime(%Y-%m-%d %H:%M:%S.%f)')) +@kql_converter(timedelta) def timedelta_to_kql(td: timedelta) -> KQL: hours, remainder = divmod(td.seconds, 3600) minutes, seconds = divmod(remainder, 60) @@ -27,6 +26,7 @@ def timedelta_to_kql(td: timedelta) -> KQL: )) +@kql_converter(Mapping, List, Tuple) def dynamic_to_kql(d: Union[Mapping, List, Tuple]) -> KQL: query = list(json.dumps(d)) # Issue #11 @@ -48,29 +48,21 @@ def dynamic_to_kql(d: Union[Mapping, List, Tuple]) -> KQL: return KQL("".join(query)) +@kql_converter(bool) def bool_to_kql(b: bool) -> KQL: return KQL('true') if b else KQL('false') +@kql_converter(str) def str_to_kql(s: str) -> KQL: return KQL('"{}"'.format(s)) -KQL_CONVERTER_BY_TYPE: Dict[Type, Callable[[Any], KQL]] = { - datetime: datetime_to_kql, - timedelta: timedelta_to_kql, - Mapping: dynamic_to_kql, - List: dynamic_to_kql, - Tuple: dynamic_to_kql, - bool: bool_to_kql, - str: str_to_kql, - int: KQL, - float: KQL, -} - - -def to_kql(obj: KustoTypes) -> KQL: - for kusto_type, converter in KQL_CONVERTER_BY_TYPE.items(): - if isinstance(obj, kusto_type): - return converter(obj) - raise ValueError("No KQL converter found for object {} of type {}".format(obj, type(obj))) +@kql_converter(Number) +def number_to_kql(n: Number) -> KQL: + return KQL(str(n)) + + +@kql_converter(type(None)) +def none_to_kql(n: type(None)) -> KQL: + return KQL("") diff --git a/pykusto/logger.py b/pykusto/logger.py new file mode 100644 index 0000000..6b2cc66 --- /dev/null +++ b/pykusto/logger.py @@ -0,0 +1,3 @@ +import logging + +logger = logging.getLogger("pykusto") diff --git a/pykusto/query.py b/pykusto/query.py index b7157fb..845517c 100644 --- a/pykusto/query.py +++ b/pykusto/query.py @@ -10,9 +10,10 @@ from azure.kusto.data.helpers import dataframe_from_result_table from pykusto.client import Table from pykusto.expressions import BooleanType, ExpressionType, AggregationExpression, OrderType, \ StringType, AssignmentBase, AssignmentFromAggregationToColumn, AssignmentToSingleColumn, Column, BaseExpression, \ - AssignmentFromColumnToColumn + AssignmentFromColumnToColumn, AnyExpression, to_kql +from pykusto.kql_converters import KQL +from pykusto.logger import logger from pykusto.udf import stringify_python_func -from pykusto.utils import KQL, logger, to_kql class Order(Enum): @@ -127,7 +128,7 @@ class Query: return DistinctQuery(self, columns) def distinct_all(self): - return DistinctQuery(self, (BaseExpression(KQL("*")),)) + return DistinctQuery(self, (AnyExpression(KQL("*")),)) def extend(self, *args: Union[BaseExpression, AssignmentBase], **kwargs: ExpressionType) -> 'ExtendQuery': assignments: List[AssignmentBase] = [] @@ -140,7 +141,7 @@ class Query: if isinstance(expression, BaseExpression): assignments.append(expression.assign_to(Column(column_name))) else: - assignments.append(BaseExpression(to_kql(expression)).assign_to(Column(column_name))) + assignments.append(AnyExpression(to_kql(expression)).assign_to(Column(column_name))) return ExtendQuery(self, *assignments) def summarize(self, *args: Union[AggregationExpression, AssignmentFromAggregationToColumn], diff --git a/pykusto/type_utils.py b/pykusto/type_utils.py new file mode 100644 index 0000000..ca407cd --- /dev/null +++ b/pykusto/type_utils.py @@ -0,0 +1,65 @@ +from datetime import datetime, timedelta +from numbers import Number +from typing import Union, Mapping, Type, Dict, Callable, Tuple, List + +KustoTypes = Union[str, Number, bool, datetime, Mapping, List, Tuple, timedelta] +# TODO: Unhandled data types: guid, decimal + + +class TypeRegistrar: + """ + A factory for annotations that are used to create a mapping between Kusto types and python types and functions. + Each annotation must be called with a Kusto type as a parameter. The `for_obj` and `for_type` methods + can then be used to retrieve the python type or function corresponding to a given Kusto type. + """ + registry: Dict[Type[KustoTypes], Callable] + + def __init__(self, name: str) -> None: + """ + :param name: Name is used for better logging and clearer errors + """ + self.name = name + self.registry = {} + + def __repr__(self) -> str: + return self.name + + def __call__(self, *types: Type[KustoTypes]) -> Callable: + def inner(wrapped): + for t in types: + previous = self.registry.setdefault(t, wrapped) + if previous is not wrapped: + raise TypeError("{}: type already registered: {}".format(self, t.__name__)) + return wrapped + + return inner + + def for_obj(self, obj: KustoTypes) -> Callable: + """ + Given an object of Kusto type, retrieve the python type or function associated with the object's type, and call + it with the given object as a parameter + + :param obj: An object of Kusto type + :return: Associated python object + """ + for registered_type, registered_callable in self.registry.items(): + if isinstance(obj, registered_type): + return registered_callable(obj) + raise ValueError("{}: no registered callable for object {} of type {}".format(self, obj, type(obj).__name__)) + + def for_type(self, t: Type[KustoTypes]) -> Callable: + """ + Given a Kusto type, retrieve the associated python type or function + + :param t: A Kusto type + :return: Associated python object + """ + for registered_type, registered_callable in self.registry.items(): + if issubclass(t, registered_type): + return registered_callable + raise ValueError("{}: no registered callable for type {}".format(self, t.__name__)) + + +kql_converter = TypeRegistrar("KQL Converter") +plain_expression = TypeRegistrar("Plain expression") +aggregation_expression = TypeRegistrar("Aggregation expression") diff --git a/setup.py b/setup.py index c2641c0..ca8f191 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='pykusto', - version='0.0.8', + version='0.0.9', packages=find_packages(exclude=['test']), url='https://github.com/Azure/pykusto', license='MIT License',
Return correct types in operators that accept aggregation expressions
Azure/pykusto
diff --git a/test/test_base.py b/test/test_base.py index 7070cec..dde3185 100644 --- a/test/test_base.py +++ b/test/test_base.py @@ -3,7 +3,7 @@ import sys from typing import Callable from unittest import TestCase -from pykusto.utils import logger +from pykusto.logger import logger class TestBase(TestCase): diff --git a/test/test_functions.py b/test/test_functions.py index 45b380a..3ce0a5c 100644 --- a/test/test_functions.py +++ b/test/test_functions.py @@ -40,7 +40,7 @@ class TestFunction(TestBase): def test_case(self): self.assertEqual( - " | extend bucket = case((foo <= 3), \"Small\", (foo <= 10), \"Medium\", \"Large\")", + " | extend bucket = case(foo <= 3, \"Small\", foo <= 10, \"Medium\", \"Large\")", Query().extend(bucket=f.case(col.foo <= 3, "Small", col.foo <= 10, 'Medium', 'Large')).render() ) @@ -372,13 +372,14 @@ class TestFunction(TestBase): Query().extend(f.strcat_delim('-', ',', col.foo)).render() ) + @unittest.skip("Enabled after #40 is fixed") def test_strcat_array(self): self.assertEqual( " | where (strcat_array(foo, \",\")) == \"A,B,C\"", Query().where(f.strcat_array(col.foo, ',') == 'A,B,C').render() ) self.assertEqual( - " | where (strcat_array(['A', 'B', 'C'], \",\")) == \"A,B,C\"", + " | where (strcat_array(dynamic([\"A\", \"B\", \"C\"]), \",\")) == \"A,B,C\"", Query().where(f.strcat_array(['A', 'B', 'C'], ',') == 'A,B,C').render() ) @@ -458,7 +459,7 @@ class TestFunction(TestBase): # Query().where(f.todatetime('') > datetime.datetime(2019, 7, 23)).render(), # " | where (startofday(foo)) > datetime(2019-07-23 00:00:00.000000)") # def todatetime(expr: StringType) -> DatetimeExpression: - # return DatetimeExpression(KQL('todatetime({})'.format(expr))) + # return DatetimeExpression(KQL('todatetime({})'.format(_subexpr_to_kql(expr)))) def test_todouble(self): self.assertEqual( @@ -488,14 +489,13 @@ class TestFunction(TestBase): Query().summarize(f.arg_min(col.foo, col.bar, col.fam)).render() ) - @unittest.skip("Re-enable once issue #1 is resolved") def test_avg(self): self.assertEqual( " | summarize avg(foo)", Query().summarize(f.avg(col.foo)).render() ) self.assertEqual( - " | summarize avg(foo)-5", + " | summarize avg(foo) - 5", Query().summarize(f.avg(col.foo) - 5).render() ) diff --git a/test/test_utils.py b/test/test_utils.py index c3614d8..2b2e7aa 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -1,16 +1,81 @@ -from pykusto import utils +from pykusto.expressions import to_kql +from pykusto.type_utils import TypeRegistrar from test.test_base import TestBase class TestUtils(TestBase): def test_dynamic_to_kql(self): - dict ={ + test_dict = { "name": "Alan", "age": 21, "address": ("NY", 36), "pets": ["Libby", "Panda", "]", "["] } self.assertEqual( - "{\"name\": \"Alan\", \"age\": 21, \"address\": (\"NY\", 36), \"pets\": (\"Libby\", \"Panda\", \"]\", \"[\")}", - utils.to_kql(dict) + "{\"name\": \"Alan\", \"age\": 21, \"address\": (\"NY\", 36), " + "\"pets\": (\"Libby\", \"Panda\", \"]\", \"[\")}", + to_kql(test_dict) + ) + + def test_type_registrar_for_type(self): + test_annotation = TypeRegistrar("Test annotation") + + @test_annotation(str) + def str_annotated(s: str) -> str: + return "response to " + s + + self.assertEqual( + "response to test for_type", + test_annotation.for_type(str)("test for_type") + ) + + def test_type_registrar_for_obj(self): + test_annotation = TypeRegistrar("Test annotation") + + @test_annotation(str) + def str_annotated(s: str) -> str: + return "response to " + s + + self.assertEqual( + "response to test for_obj", + test_annotation.for_obj("test for_obj") + ) + + def test_type_registrar_for_type_not_found(self): + test_annotation = TypeRegistrar("Test annotation") + + @test_annotation(str) + def str_annotated(s: str) -> str: + return "response to " + s + + self.assertRaises( + ValueError("Test annotation: no registered callable for type bool"), + lambda: test_annotation.for_type(bool)("test for_type") + ) + + def test_type_registrar_for_obj_not_found(self): + test_annotation = TypeRegistrar("Test annotation") + + @test_annotation(str) + def str_annotated(s: str) -> str: + return "response to " + s + + self.assertRaises( + ValueError("Test annotation: no registered callable for object True of type bool"), + lambda: test_annotation.for_obj(True) + ) + + def test_type_registrar_collision(self): + test_annotation = TypeRegistrar("Test annotation") + + @test_annotation(str) + def str_annotated_1(s: str) -> str: + return "response to " + s + + def str_annotated_2(s: str) -> str: + return "response to " + s + + self.assertRaises( + TypeError("Test annotation: type already registered: str"), + lambda: test_annotation(str)(str_annotated_2) )
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_added_files", "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 2, "issue_text_score": 3, "test_score": 3 }, "num_modified_files": 6 }
0.0
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "pytest" ], "pre_install": null, "python": "3.7", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 attrs @ file:///croot/attrs_1668696182826/work azure-kusto-data==0.0.36 certifi @ file:///croot/certifi_1671487769961/work/certifi cffi==1.15.1 charset-normalizer==3.4.1 cryptography==44.0.2 flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core idna==3.10 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1648562407465/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work packaging @ file:///croot/packaging_1671697413597/work pluggy @ file:///tmp/build/80754af9/pluggy_1648042572264/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pycparser==2.21 PyJWT==2.8.0 -e git+https://github.com/Azure/pykusto.git@d20a446d97e242d6ce4b8e99b6ab0c076e629e6c#egg=pykusto pytest==7.1.2 python-dateutil==2.9.0.post0 requests==2.31.0 six==1.17.0 tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work typing_extensions @ file:///croot/typing_extensions_1669924550328/work urllib3==2.0.7 zipp @ file:///croot/zipp_1672387121353/work
name: pykusto channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=22.1.0=py37h06a4308_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2022.12.7=py37h06a4308_0 - flit-core=3.6.0=pyhd3eb1b0_0 - importlib-metadata=4.11.3=py37h06a4308_0 - importlib_metadata=4.11.3=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=22.0=py37h06a4308_0 - pip=22.3.1=py37h06a4308_0 - pluggy=1.0.0=py37h06a4308_1 - py=1.11.0=pyhd3eb1b0_0 - pytest=7.1.2=py37h06a4308_0 - python=3.7.16=h7a1cb2a_0 - readline=8.2=h5eee18b_0 - setuptools=65.6.3=py37h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tomli=2.0.1=py37h06a4308_0 - typing_extensions=4.4.0=py37h06a4308_0 - wheel=0.38.4=py37h06a4308_0 - xz=5.6.4=h5eee18b_1 - zipp=3.11.0=py37h06a4308_0 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - azure-kusto-data==0.0.36 - cffi==1.15.1 - charset-normalizer==3.4.1 - cryptography==44.0.2 - idna==3.10 - pycparser==2.21 - pyjwt==2.8.0 - python-dateutil==2.9.0.post0 - requests==2.31.0 - six==1.17.0 - urllib3==2.0.7 prefix: /opt/conda/envs/pykusto
[ "test/test_functions.py::TestFunction::test_acos", "test/test_functions.py::TestFunction::test_ago", "test/test_functions.py::TestFunction::test_any", "test/test_functions.py::TestFunction::test_arg_max", "test/test_functions.py::TestFunction::test_arg_min", "test/test_functions.py::TestFunction::test_array_length", "test/test_functions.py::TestFunction::test_avg", "test/test_functions.py::TestFunction::test_avgif", "test/test_functions.py::TestFunction::test_bag_keys", "test/test_functions.py::TestFunction::test_bin", "test/test_functions.py::TestFunction::test_bin_at", "test/test_functions.py::TestFunction::test_bin_auto", "test/test_functions.py::TestFunction::test_case", "test/test_functions.py::TestFunction::test_ceiling", "test/test_functions.py::TestFunction::test_cos", "test/test_functions.py::TestFunction::test_count", "test/test_functions.py::TestFunction::test_countif", "test/test_functions.py::TestFunction::test_dcount", "test/test_functions.py::TestFunction::test_endofday", "test/test_functions.py::TestFunction::test_endofmonth", "test/test_functions.py::TestFunction::test_endofweek", "test/test_functions.py::TestFunction::test_exp", "test/test_functions.py::TestFunction::test_exp10", "test/test_functions.py::TestFunction::test_exp2", "test/test_functions.py::TestFunction::test_floor", "test/test_functions.py::TestFunction::test_format_datetime", "test/test_functions.py::TestFunction::test_format_timespan", "test/test_functions.py::TestFunction::test_getmonth", "test/test_functions.py::TestFunction::test_gettype", "test/test_functions.py::TestFunction::test_getyear", "test/test_functions.py::TestFunction::test_hash", "test/test_functions.py::TestFunction::test_hash_sha256", "test/test_functions.py::TestFunction::test_hourofday", "test/test_functions.py::TestFunction::test_iff", "test/test_functions.py::TestFunction::test_iif", "test/test_functions.py::TestFunction::test_isempty", "test/test_functions.py::TestFunction::test_isfinite", "test/test_functions.py::TestFunction::test_isinf", "test/test_functions.py::TestFunction::test_isnan", "test/test_functions.py::TestFunction::test_isnotempty", "test/test_functions.py::TestFunction::test_isnotnull", "test/test_functions.py::TestFunction::test_isnull", "test/test_functions.py::TestFunction::test_isutf8", "test/test_functions.py::TestFunction::test_log", "test/test_functions.py::TestFunction::test_log10", "test/test_functions.py::TestFunction::test_log2", "test/test_functions.py::TestFunction::test_loggamma", "test/test_functions.py::TestFunction::test_make_bag", "test/test_functions.py::TestFunction::test_make_datetime", "test/test_functions.py::TestFunction::test_make_list", "test/test_functions.py::TestFunction::test_make_set", "test/test_functions.py::TestFunction::test_max", "test/test_functions.py::TestFunction::test_min", "test/test_functions.py::TestFunction::test_nesting", "test/test_functions.py::TestFunction::test_now", "test/test_functions.py::TestFunction::test_parse_json_array", "test/test_functions.py::TestFunction::test_parse_json_brackets", "test/test_functions.py::TestFunction::test_parse_json_dot", "test/test_functions.py::TestFunction::test_parse_json_nesting", "test/test_functions.py::TestFunction::test_parse_json_number_expression", "test/test_functions.py::TestFunction::test_parse_json_to_string", "test/test_functions.py::TestFunction::test_percentile", "test/test_functions.py::TestFunction::test_percentiles", "test/test_functions.py::TestFunction::test_pow", "test/test_functions.py::TestFunction::test_round", "test/test_functions.py::TestFunction::test_sign", "test/test_functions.py::TestFunction::test_split", "test/test_functions.py::TestFunction::test_sqrt", "test/test_functions.py::TestFunction::test_startofday", "test/test_functions.py::TestFunction::test_startofmonth", "test/test_functions.py::TestFunction::test_startofweek", "test/test_functions.py::TestFunction::test_startofyear", "test/test_functions.py::TestFunction::test_stdev", "test/test_functions.py::TestFunction::test_stdevif", "test/test_functions.py::TestFunction::test_stdevp", "test/test_functions.py::TestFunction::test_strcat", "test/test_functions.py::TestFunction::test_strcat_delim", "test/test_functions.py::TestFunction::test_strcmp", "test/test_functions.py::TestFunction::test_string_size", "test/test_functions.py::TestFunction::test_strlen", "test/test_functions.py::TestFunction::test_strrep", "test/test_functions.py::TestFunction::test_substring", "test/test_functions.py::TestFunction::test_sum", "test/test_functions.py::TestFunction::test_sumif", "test/test_functions.py::TestFunction::test_tobool", "test/test_functions.py::TestFunction::test_toboolean", "test/test_functions.py::TestFunction::test_todouble", "test/test_functions.py::TestFunction::test_variance", "test/test_functions.py::TestFunction::test_varianceif", "test/test_functions.py::TestFunction::test_variancep", "test/test_utils.py::TestUtils::test_dynamic_to_kql", "test/test_utils.py::TestUtils::test_type_registrar_collision", "test/test_utils.py::TestUtils::test_type_registrar_for_obj", "test/test_utils.py::TestUtils::test_type_registrar_for_obj_not_found", "test/test_utils.py::TestUtils::test_type_registrar_for_type", "test/test_utils.py::TestUtils::test_type_registrar_for_type_not_found" ]
[]
[]
[]
MIT License
null
Azure__pykusto-42
8783b166ce0ee3236ad6fcda81d9355a80438cd2
2020-01-01 13:44:42
68121cdd79cc9c1d6b8f71e5e80df566ac6842c7
diff --git a/pykusto/expressions.py b/pykusto/expressions.py index a02183b..ec73163 100644 --- a/pykusto/expressions.py +++ b/pykusto/expressions.py @@ -21,14 +21,6 @@ OrderType = Union[DatetimeType, TimespanType, NumberType, StringType] # All classes in the same file to prevent circular dependencies def _subexpr_to_kql(obj: ExpressionType) -> KQL: - """ - Convert the given expression to KQL, enclosing it in parentheses if it is a compound expression. This guarantees - correct evaluation order. When parentheses are not needed, for example when the expressions is used as an argument - to a function, use `to_kql` instead. - - :param obj: Expression to convert to KQL - :return: KQL that represents the given expression - """ if isinstance(obj, BaseExpression): return obj.as_subexpression() return to_kql(obj) @@ -42,11 +34,8 @@ class BaseExpression: raise TypeError("BaseExpression is abstract") return object.__new__(cls) - def __init__(self, kql: Union[KQL, 'BaseExpression']) -> None: - if isinstance(kql, BaseExpression): - self.kql = kql.kql - elif not isinstance(kql, str): - raise ValueError("Either expression or KQL required") + def __init__(self, kql: KQL) -> None: + assert isinstance(kql, str) self.kql = kql def __repr__(self) -> str: @@ -270,9 +259,9 @@ class StringExpression(BaseExpression): def split(self, delimiter: StringType, requested_index: NumberType = None) -> 'ArrayExpression': if requested_index is None: - return ArrayExpression(KQL('split({}, {})'.format(to_kql(self.kql), to_kql(delimiter)))) - return ArrayExpression(KQL('split({}, {}, {})'.format( - to_kql(self.kql), to_kql(delimiter), to_kql(requested_index) + return ArrayExpression(KQL('split({}, {}'.format(self.kql, to_kql(delimiter)))) + return ArrayExpression(KQL('split({}, {}, {}'.format( + self.kql, _subexpr_to_kql(delimiter), to_kql(requested_index) ))) def equals(self, other: StringType, case_sensitive: bool = False) -> BooleanExpression: @@ -654,15 +643,6 @@ column_generator = ColumnGenerator() def to_kql(obj: ExpressionType) -> KQL: - """ - Convert the given expression to KQL. If this is a subexpression of a greater expression, neighboring operators might - take precedence over operators included in this expression, causing an incorrect evaluation order. - If this is a concern, use `_subexpr_to_kql` instead, which will enclose this expression in parentheses if it is - a compound expression. - - :param obj: Expression to convert to KQL - :return: KQL that represents the given expression - """ if isinstance(obj, BaseExpression): return obj.kql return kql_converter.for_obj(obj) diff --git a/pykusto/functions.py b/pykusto/functions.py index 6269870..fcfc6f4 100644 --- a/pykusto/functions.py +++ b/pykusto/functions.py @@ -1,10 +1,10 @@ +import json from typing import Union from pykusto.expressions import Column, NumberType, NumberExpression, TimespanType, \ DatetimeExpression, TimespanExpression, ArrayType, DynamicType, DatetimeType, BaseExpression, BooleanType, \ ExpressionType, AggregationExpression, StringType, StringExpression, BooleanExpression, \ - NumberAggregationExpression, MappingAggregationExpression, ArrayAggregationExpression, to_kql, DynamicExpression, \ - ArrayExpression + NumberAggregationExpression, MappingAggregationExpression, ArrayAggregationExpression, to_kql, DynamicExpression from pykusto.kql_converters import KQL from pykusto.type_utils import plain_expression @@ -559,8 +559,7 @@ def sign(expr: NumberType) -> NumberExpression: # def sin(self): return # # -def split(string: StringType, delimiter: StringType, requested_index: NumberType = None) -> 'ArrayExpression': - return StringExpression(KQL(string)).split(delimiter, requested_index) +# def split(self): return def sqrt(expr: NumberType) -> NumberExpression: @@ -583,16 +582,20 @@ def startofyear(expr: DatetimeType, offset: NumberType = None) -> DatetimeExpres return expr.startofyear(offset) -def strcat(expr1: StringType, expr2: StringType, *exprs: StringType) -> StringExpression: - res = 'strcat({}, {}'.format(to_kql(expr1), - to_kql(expr2)) - if len(exprs) > 0: - res = res + ', ' + ', '.join([to_kql(expr) for expr in exprs]) - return StringExpression(KQL(res + ')')) +def strcat(*strings: StringType) -> StringExpression: + if len(strings) < 2: + raise ValueError("strcat requires at least two arguments") + return StringExpression(KQL('strcat({})'.format(', '.join(to_kql(s) for s in strings)))) + + +def to_literal_dynamic(d: DynamicType) -> KQL: + if isinstance(d, BaseExpression): + return d.kql + return KQL('dynamic({})'.format(json.dumps(d))) def strcat_array(expr: ArrayType, delimiter: StringType) -> StringExpression: - return StringExpression(KQL('strcat_array({}, {})'.format(to_kql(expr), to_kql(delimiter)))) + return StringExpression(KQL('strcat_array({}, {})'.format(to_literal_dynamic(expr), to_kql(delimiter)))) def strcat_delim(delimiter: StringType, expr1: StringType, expr2: StringType, *exprs: StringType) -> StringExpression: diff --git a/pykusto/kql_converters.py b/pykusto/kql_converters.py index 63079f4..a1eaeae 100644 --- a/pykusto/kql_converters.py +++ b/pykusto/kql_converters.py @@ -29,7 +29,7 @@ def timedelta_to_kql(td: timedelta) -> KQL: @kql_converter(Mapping, List, Tuple) def dynamic_to_kql(d: Union[Mapping, List, Tuple]) -> KQL: query = list(json.dumps(d)) - # Issue #11 + # Convert square brackets to round brackets (Issue #11) counter = 0 prev = "" for i, c in enumerate(query): diff --git a/pykusto/logger.py b/pykusto/logger.py deleted file mode 100644 index 6b2cc66..0000000 --- a/pykusto/logger.py +++ /dev/null @@ -1,3 +0,0 @@ -import logging - -logger = logging.getLogger("pykusto") diff --git a/pykusto/query.py b/pykusto/query.py index 845517c..8207f13 100644 --- a/pykusto/query.py +++ b/pykusto/query.py @@ -1,18 +1,18 @@ -from abc import abstractmethod -from copy import copy, deepcopy -from enum import Enum from itertools import chain -from types import FunctionType from typing import Tuple, List, Union, Optional +from abc import abstractmethod from azure.kusto.data.helpers import dataframe_from_result_table +from copy import copy, deepcopy +from enum import Enum +from types import FunctionType from pykusto.client import Table from pykusto.expressions import BooleanType, ExpressionType, AggregationExpression, OrderType, \ StringType, AssignmentBase, AssignmentFromAggregationToColumn, AssignmentToSingleColumn, Column, BaseExpression, \ AssignmentFromColumnToColumn, AnyExpression, to_kql from pykusto.kql_converters import KQL -from pykusto.logger import logger +from pykusto.type_utils import logger from pykusto.udf import stringify_python_func diff --git a/pykusto/type_utils.py b/pykusto/type_utils.py index ca407cd..bb5cb4d 100644 --- a/pykusto/type_utils.py +++ b/pykusto/type_utils.py @@ -1,65 +1,41 @@ +import logging from datetime import datetime, timedelta from numbers import Number -from typing import Union, Mapping, Type, Dict, Callable, Tuple, List +from typing import Union, Mapping, Type, Dict, Callable, Any, Tuple, List + +logger = logging.getLogger("pykusto") KustoTypes = Union[str, Number, bool, datetime, Mapping, List, Tuple, timedelta] # TODO: Unhandled data types: guid, decimal class TypeRegistrar: - """ - A factory for annotations that are used to create a mapping between Kusto types and python types and functions. - Each annotation must be called with a Kusto type as a parameter. The `for_obj` and `for_type` methods - can then be used to retrieve the python type or function corresponding to a given Kusto type. - """ registry: Dict[Type[KustoTypes], Callable] - def __init__(self, name: str) -> None: - """ - :param name: Name is used for better logging and clearer errors - """ - self.name = name + def __init__(self) -> None: self.registry = {} - def __repr__(self) -> str: - return self.name - def __call__(self, *types: Type[KustoTypes]) -> Callable: def inner(wrapped): for t in types: - previous = self.registry.setdefault(t, wrapped) - if previous is not wrapped: - raise TypeError("{}: type already registered: {}".format(self, t.__name__)) + self.registry[t] = wrapped return wrapped return inner - def for_obj(self, obj: KustoTypes) -> Callable: - """ - Given an object of Kusto type, retrieve the python type or function associated with the object's type, and call - it with the given object as a parameter - - :param obj: An object of Kusto type - :return: Associated python object - """ + def for_obj(self, obj: Any) -> Any: for registered_type, registered_callable in self.registry.items(): if isinstance(obj, registered_type): return registered_callable(obj) - raise ValueError("{}: no registered callable for object {} of type {}".format(self, obj, type(obj).__name__)) + raise ValueError("No registered callable for object {} of type {}".format(obj, type(obj).__name__)) def for_type(self, t: Type[KustoTypes]) -> Callable: - """ - Given a Kusto type, retrieve the associated python type or function - - :param t: A Kusto type - :return: Associated python object - """ for registered_type, registered_callable in self.registry.items(): if issubclass(t, registered_type): return registered_callable - raise ValueError("{}: no registered callable for type {}".format(self, t.__name__)) + raise ValueError("No registered callable for type {}".format(t.__name__)) -kql_converter = TypeRegistrar("KQL Converter") -plain_expression = TypeRegistrar("Plain expression") -aggregation_expression = TypeRegistrar("Aggregation expression") +kql_converter = TypeRegistrar() +plain_expression = TypeRegistrar() +aggregation_expression = TypeRegistrar() diff --git a/setup.py b/setup.py index ca8f191..543081f 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='pykusto', - version='0.0.9', + version='0.0.7', packages=find_packages(exclude=['test']), url='https://github.com/Azure/pykusto', license='MIT License',
In some contexts a dynamic literal needs to be created with the "dynamic" keyword For example, currently `strcat_array` fails because it requires: `strcat_array(dynamic(["A", "B", "C"]), ",")` while pykusto produces: `strcat_array(("A", "B", "C"), ",")`
Azure/pykusto
diff --git a/test/test_base.py b/test/test_base.py index dde3185..6321ec8 100644 --- a/test/test_base.py +++ b/test/test_base.py @@ -3,7 +3,7 @@ import sys from typing import Callable from unittest import TestCase -from pykusto.logger import logger +from pykusto.type_utils import logger class TestBase(TestCase): diff --git a/test/test_functions.py b/test/test_functions.py index 3ce0a5c..65d0d07 100644 --- a/test/test_functions.py +++ b/test/test_functions.py @@ -1,5 +1,4 @@ import datetime -import unittest from pykusto import functions as f from pykusto.expressions import column_generator as col @@ -372,7 +371,6 @@ class TestFunction(TestBase): Query().extend(f.strcat_delim('-', ',', col.foo)).render() ) - @unittest.skip("Enabled after #40 is fixed") def test_strcat_array(self): self.assertEqual( " | where (strcat_array(foo, \",\")) == \"A,B,C\"", @@ -425,20 +423,6 @@ class TestFunction(TestBase): Query().where(f.substring(col.foo, col.bar, 4) == 'ABC,ABC').render() ) - def test_split(self): - self.assertEqual( - ' | extend foo = (split(bar, "_", 3))', - Query().extend(foo=f.split(col.bar, "_", 3)).render() - ) - self.assertEqual( - ' | extend foo = (split(bar, "_")[3])', - Query().extend(foo=f.split(col.bar, "_")[3]).render() - ) - self.assertEqual( - ' | extend foo = (split("1_2", "_")[3])', - Query().extend(foo=f.split("1_2", "_")[3]).render() - ) - def test_tobool(self): self.assertEqual( " | where tobool(foo)", diff --git a/test/test_utils.py b/test/test_utils.py index 2b2e7aa..fc774c4 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -1,81 +1,16 @@ from pykusto.expressions import to_kql -from pykusto.type_utils import TypeRegistrar from test.test_base import TestBase class TestUtils(TestBase): def test_dynamic_to_kql(self): - test_dict = { + dict ={ "name": "Alan", "age": 21, "address": ("NY", 36), "pets": ["Libby", "Panda", "]", "["] } self.assertEqual( - "{\"name\": \"Alan\", \"age\": 21, \"address\": (\"NY\", 36), " - "\"pets\": (\"Libby\", \"Panda\", \"]\", \"[\")}", - to_kql(test_dict) - ) - - def test_type_registrar_for_type(self): - test_annotation = TypeRegistrar("Test annotation") - - @test_annotation(str) - def str_annotated(s: str) -> str: - return "response to " + s - - self.assertEqual( - "response to test for_type", - test_annotation.for_type(str)("test for_type") - ) - - def test_type_registrar_for_obj(self): - test_annotation = TypeRegistrar("Test annotation") - - @test_annotation(str) - def str_annotated(s: str) -> str: - return "response to " + s - - self.assertEqual( - "response to test for_obj", - test_annotation.for_obj("test for_obj") - ) - - def test_type_registrar_for_type_not_found(self): - test_annotation = TypeRegistrar("Test annotation") - - @test_annotation(str) - def str_annotated(s: str) -> str: - return "response to " + s - - self.assertRaises( - ValueError("Test annotation: no registered callable for type bool"), - lambda: test_annotation.for_type(bool)("test for_type") - ) - - def test_type_registrar_for_obj_not_found(self): - test_annotation = TypeRegistrar("Test annotation") - - @test_annotation(str) - def str_annotated(s: str) -> str: - return "response to " + s - - self.assertRaises( - ValueError("Test annotation: no registered callable for object True of type bool"), - lambda: test_annotation.for_obj(True) - ) - - def test_type_registrar_collision(self): - test_annotation = TypeRegistrar("Test annotation") - - @test_annotation(str) - def str_annotated_1(s: str) -> str: - return "response to " + s - - def str_annotated_2(s: str) -> str: - return "response to " + s - - self.assertRaises( - TypeError("Test annotation: type already registered: str"), - lambda: test_annotation(str)(str_annotated_2) + "{\"name\": \"Alan\", \"age\": 21, \"address\": (\"NY\", 36), \"pets\": (\"Libby\", \"Panda\", \"]\", \"[\")}", + to_kql(dict) )
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_removed_files", "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 1, "test_score": 3 }, "num_modified_files": 6 }
0.0
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "requirements.txt", "pip_packages": [ "pytest" ], "pre_install": null, "python": "3.7", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 azure-kusto-data==0.0.36 certifi @ file:///croot/certifi_1671487769961/work/certifi cffi==1.15.1 charset-normalizer==3.4.1 cryptography==44.0.2 exceptiongroup==1.2.2 idna==3.10 importlib-metadata==6.7.0 iniconfig==2.0.0 packaging==24.0 pluggy==1.2.0 pycparser==2.21 PyJWT==2.8.0 -e git+https://github.com/Azure/pykusto.git@8783b166ce0ee3236ad6fcda81d9355a80438cd2#egg=pykusto pytest==7.4.4 python-dateutil==2.9.0.post0 requests==2.31.0 six==1.17.0 tomli==2.0.1 typing_extensions==4.7.1 urllib3==2.0.7 zipp==3.15.0
name: pykusto channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - ca-certificates=2025.2.25=h06a4308_0 - certifi=2022.12.7=py37h06a4308_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - pip=22.3.1=py37h06a4308_0 - python=3.7.16=h7a1cb2a_0 - readline=8.2=h5eee18b_0 - setuptools=65.6.3=py37h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - wheel=0.38.4=py37h06a4308_0 - xz=5.6.4=h5eee18b_1 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - azure-kusto-data==0.0.36 - cffi==1.15.1 - charset-normalizer==3.4.1 - cryptography==44.0.2 - exceptiongroup==1.2.2 - idna==3.10 - importlib-metadata==6.7.0 - iniconfig==2.0.0 - packaging==24.0 - pluggy==1.2.0 - pycparser==2.21 - pyjwt==2.8.0 - pytest==7.4.4 - python-dateutil==2.9.0.post0 - requests==2.31.0 - six==1.17.0 - tomli==2.0.1 - typing-extensions==4.7.1 - urllib3==2.0.7 - zipp==3.15.0 prefix: /opt/conda/envs/pykusto
[ "test/test_functions.py::TestFunction::test_acos", "test/test_functions.py::TestFunction::test_ago", "test/test_functions.py::TestFunction::test_any", "test/test_functions.py::TestFunction::test_arg_max", "test/test_functions.py::TestFunction::test_arg_min", "test/test_functions.py::TestFunction::test_array_length", "test/test_functions.py::TestFunction::test_avg", "test/test_functions.py::TestFunction::test_avgif", "test/test_functions.py::TestFunction::test_bag_keys", "test/test_functions.py::TestFunction::test_bin", "test/test_functions.py::TestFunction::test_bin_at", "test/test_functions.py::TestFunction::test_bin_auto", "test/test_functions.py::TestFunction::test_case", "test/test_functions.py::TestFunction::test_ceiling", "test/test_functions.py::TestFunction::test_cos", "test/test_functions.py::TestFunction::test_count", "test/test_functions.py::TestFunction::test_countif", "test/test_functions.py::TestFunction::test_dcount", "test/test_functions.py::TestFunction::test_endofday", "test/test_functions.py::TestFunction::test_endofmonth", "test/test_functions.py::TestFunction::test_endofweek", "test/test_functions.py::TestFunction::test_exp", "test/test_functions.py::TestFunction::test_exp10", "test/test_functions.py::TestFunction::test_exp2", "test/test_functions.py::TestFunction::test_floor", "test/test_functions.py::TestFunction::test_format_datetime", "test/test_functions.py::TestFunction::test_format_timespan", "test/test_functions.py::TestFunction::test_getmonth", "test/test_functions.py::TestFunction::test_gettype", "test/test_functions.py::TestFunction::test_getyear", "test/test_functions.py::TestFunction::test_hash", "test/test_functions.py::TestFunction::test_hash_sha256", "test/test_functions.py::TestFunction::test_hourofday", "test/test_functions.py::TestFunction::test_iff", "test/test_functions.py::TestFunction::test_iif", "test/test_functions.py::TestFunction::test_isempty", "test/test_functions.py::TestFunction::test_isfinite", "test/test_functions.py::TestFunction::test_isinf", "test/test_functions.py::TestFunction::test_isnan", "test/test_functions.py::TestFunction::test_isnotempty", "test/test_functions.py::TestFunction::test_isnotnull", "test/test_functions.py::TestFunction::test_isnull", "test/test_functions.py::TestFunction::test_isutf8", "test/test_functions.py::TestFunction::test_log", "test/test_functions.py::TestFunction::test_log10", "test/test_functions.py::TestFunction::test_log2", "test/test_functions.py::TestFunction::test_loggamma", "test/test_functions.py::TestFunction::test_make_bag", "test/test_functions.py::TestFunction::test_make_datetime", "test/test_functions.py::TestFunction::test_make_list", "test/test_functions.py::TestFunction::test_make_set", "test/test_functions.py::TestFunction::test_max", "test/test_functions.py::TestFunction::test_min", "test/test_functions.py::TestFunction::test_nesting", "test/test_functions.py::TestFunction::test_now", "test/test_functions.py::TestFunction::test_parse_json_array", "test/test_functions.py::TestFunction::test_parse_json_brackets", "test/test_functions.py::TestFunction::test_parse_json_dot", "test/test_functions.py::TestFunction::test_parse_json_nesting", "test/test_functions.py::TestFunction::test_parse_json_number_expression", "test/test_functions.py::TestFunction::test_parse_json_to_string", "test/test_functions.py::TestFunction::test_percentile", "test/test_functions.py::TestFunction::test_percentiles", "test/test_functions.py::TestFunction::test_pow", "test/test_functions.py::TestFunction::test_round", "test/test_functions.py::TestFunction::test_sign", "test/test_functions.py::TestFunction::test_sqrt", "test/test_functions.py::TestFunction::test_startofday", "test/test_functions.py::TestFunction::test_startofmonth", "test/test_functions.py::TestFunction::test_startofweek", "test/test_functions.py::TestFunction::test_startofyear", "test/test_functions.py::TestFunction::test_stdev", "test/test_functions.py::TestFunction::test_stdevif", "test/test_functions.py::TestFunction::test_stdevp", "test/test_functions.py::TestFunction::test_strcat", "test/test_functions.py::TestFunction::test_strcat_array", "test/test_functions.py::TestFunction::test_strcat_delim", "test/test_functions.py::TestFunction::test_strcmp", "test/test_functions.py::TestFunction::test_string_size", "test/test_functions.py::TestFunction::test_strlen", "test/test_functions.py::TestFunction::test_strrep", "test/test_functions.py::TestFunction::test_substring", "test/test_functions.py::TestFunction::test_sum", "test/test_functions.py::TestFunction::test_sumif", "test/test_functions.py::TestFunction::test_tobool", "test/test_functions.py::TestFunction::test_toboolean", "test/test_functions.py::TestFunction::test_todouble", "test/test_functions.py::TestFunction::test_variance", "test/test_functions.py::TestFunction::test_varianceif", "test/test_functions.py::TestFunction::test_variancep", "test/test_utils.py::TestUtils::test_dynamic_to_kql" ]
[]
[]
[]
MIT License
null
Azure__pykusto-54
9463e103d72bec751023c922cc5827c93471eb3d
2020-02-24 08:18:58
68121cdd79cc9c1d6b8f71e5e80df566ac6842c7
diff --git a/.gitignore b/.gitignore index 939d9b9..c3c5d29 100644 --- a/.gitignore +++ b/.gitignore @@ -333,4 +333,9 @@ ASALocalRun/ /.idea/workspace.xml /.idea/checkstyle-idea.xml /.idea/misc.xml + +# Python venv and installation files /venv +/build +/dist +/pykusto.egg-info diff --git a/README.md b/README.md index 5e090c7..30a366b 100644 --- a/README.md +++ b/README.md @@ -16,29 +16,29 @@ pip install pykusto from datetime import timedelta from pykusto.client import PyKustoClient from pykusto.query import Query -from pykusto.expressions import column_generator as col # Connect to cluster with AAD device authentication +# Databases, tables, and columns are auto-retrieved client = PyKustoClient('https://help.kusto.windows.net') # Show databases print(client.show_databases()) # Show tables in 'Samples' database -print(client['Samples'].show_tables()) +print(client.Samples.show_tables()) # Connect to 'StormEvents' table -table = client['Samples']['StormEvents'] +t = client.Samples.StormEvents # Build query ( - Query(table) - # Access columns using 'col' global variable - .project(col.StartTime, col.EndTime, col.EventType, col.Source) + Query(t) + # Access columns using table variable + .project(t.StartTime, t.EndTime, t.EventType, t.Source) # Specify new column name using Python keyword argument - .extend(Duration=col.EndTime - col.StartTime) + .extend(Duration=t.EndTime - t.StartTime) # Python types are implicitly converted to Kusto types - .where(col.Duration > timedelta(hours=1)) + .where(t.Duration > timedelta(hours=1)) .take(5) # Output to pandas dataframe .to_dataframe() diff --git a/pykusto/client.py b/pykusto/client.py index 23b7266..379918d 100644 --- a/pykusto/client.py +++ b/pykusto/client.py @@ -1,28 +1,36 @@ -from typing import Union, List, Tuple -# noinspection PyProtectedMember +from collections import defaultdict +from typing import Union, List, Tuple, Dict, Any from urllib.parse import urlparse # noinspection PyProtectedMember from azure.kusto.data._response import KustoResponseDataSet from azure.kusto.data.request import KustoClient, KustoConnectionStringBuilder, ClientRequestProperties +from pykusto.expressions import BaseColumn, AnyTypeColumn +from pykusto.item_fetcher import ItemFetcher from pykusto.kql_converters import KQL +from pykusto.type_utils import INTERNAL_NAME_TO_TYPE, typed_column, DOT_NAME_TO_TYPE -class PyKustoClient: +class PyKustoClient(ItemFetcher): """ - Handle to a Kusto cluster + Handle to a Kusto cluster. + Uses :class:`ItemFetcher` to fetch and cache the full cluster schema, including all databases, tables, columns and their types. """ _client: KustoClient _cluster_name: str - def __init__(self, client_or_cluster: Union[str, KustoClient]) -> None: + def __init__(self, client_or_cluster: Union[str, KustoClient], fetch_by_default: bool = True) -> None: """ - Create a new handle to Kusto cluster + Create a new handle to Kusto cluster. The value of "fetch_by_default" is used for current instance, and also passed on to database instances. :param client_or_cluster: Either a KustoClient object, or a cluster name. In case a cluster name is given, a KustoClient is generated with AAD device authentication """ + self._set_client(client_or_cluster) + super().__init__(None, fetch_by_default) + + def _set_client(self, client_or_cluster): if isinstance(client_or_cluster, KustoClient): self._client = client_or_cluster # noinspection PyProtectedMember @@ -31,15 +39,21 @@ class PyKustoClient: self._client = self._get_client_for_cluster(client_or_cluster) self._cluster_name = client_or_cluster + def __repr__(self) -> str: + return f'PyKustoClient({self._cluster_name})' + + def _new_item(self, name: str) -> 'Database': + # "fetch_by_default" set to false because often a database generated this way is not represented by an actual Kusto database + return Database(self, name, fetch_by_default=False) + + def get_database(self, name: str) -> 'Database': + return self[name] + def execute(self, database: str, query: KQL, properties: ClientRequestProperties = None) -> KustoResponseDataSet: return self._client.execute(database, query, properties) def show_databases(self) -> Tuple[str, ...]: - res: KustoResponseDataSet = self.execute('', KQL('.show databases')) - return tuple(r[0] for r in res.primary_results[0].rows) - - def __getitem__(self, database_name: str) -> 'Database': - return Database(self, database_name) + return self.get_item_names() def get_cluster_name(self) -> str: return self._cluster_name @@ -48,50 +62,117 @@ class PyKustoClient: def _get_client_for_cluster(cluster: str) -> KustoClient: return KustoClient(KustoConnectionStringBuilder.with_aad_device_authentication(cluster)) + def _internal_get_items(self) -> Dict[str, 'Database']: + # Retrieves database names, table names, column names and types for all databases. A database name is required by the "execute" method, but is ignored for this query + res: KustoResponseDataSet = self.execute('', KQL('.show databases schema | project DatabaseName, TableName, ColumnName, ColumnType | limit 100000')) + database_to_table_to_columns = defaultdict(lambda: defaultdict(list)) + for database_name, table_name, column_name, column_type in res.primary_results[0].rows: + if is_empty(database_name) or is_empty(table_name) or is_empty(column_name): + continue + database_to_table_to_columns[database_name][table_name].append(typed_column.registry[DOT_NAME_TO_TYPE[column_type]](column_name)) + return { + # Database instances are provided with all table and column data, preventing them from generating more queries. However the "fetch_by_default" behavior is + # passed on to them for future actions. + database_name: Database( + self, database_name, {table_name: tuple(columns) for table_name, columns in table_to_columns.items()}, fetch_by_default=self._fetch_by_default + ) + for database_name, table_to_columns in database_to_table_to_columns.items() + } + -class Database: +class Database(ItemFetcher): """ - Handle to a Kusto database + Handle to a Kusto database. + Uses :class:`ItemFetcher` to fetch and cache the full database schema, including all tables, columns and their types. """ client: PyKustoClient name: str - def __init__(self, client: PyKustoClient, name: str) -> None: + def __init__(self, client: PyKustoClient, name: str, tables: Dict[str, Tuple[BaseColumn]] = None, fetch_by_default: bool = True) -> None: + """ + Create a new handle to Kusto database. The value of "fetch_by_default" is used for current instance, and also passed on to database instances. + + :param client: The associated PyKustoClient instance + :param name: Database name + :param tables: A mapping from table names to the columns of each table. If this is None and "fetch_by_default" is true then they will be fetched in the constructor. + """ + super().__init__( + # Providing the items to ItemFetcher prevents further queries until the "refresh" method is explicitly called + None if tables is None else {table_name: Table(self, table_name, columns, fetch_by_default=fetch_by_default) for table_name, columns in tables.items()}, + fetch_by_default + ) self.client = client self.name = name + def __repr__(self) -> str: + return f'{self.client}.Database({self.name})' + + def _new_item(self, name: str) -> 'Table': + # "fetch_by_default" set to false because often a table generated this way is not represented by an actual Kusto table + return Table(self, name, fetch_by_default=False) + def execute(self, query: KQL, properties: ClientRequestProperties = None) -> KustoResponseDataSet: return self.client.execute(self.name, query, properties) def show_tables(self) -> Tuple[str, ...]: - res: KustoResponseDataSet = self.execute(KQL('.show tables')) - return tuple(r[0] for r in res.primary_results[0].rows) + return self.get_item_names() def get_tables(self, *tables: str): - return Table(self, tables) - - def __getitem__(self, table_name: str) -> 'Table': - return self.get_tables(table_name) - - -class Table: + return Table(self, tables, fetch_by_default=self._fetch_by_default) + + def _internal_get_items(self) -> Dict[str, 'Table']: + # Retrieves table names, column names and types for this database only (the database name is added in the "execute" method) + res: KustoResponseDataSet = self.execute(KQL('.show database schema | project TableName, ColumnName, ColumnType | limit 10000')) + table_to_columns = defaultdict(list) + for table_name, column_name, column_type in res.primary_results[0].rows: + if is_empty(table_name) or is_empty(column_name): + continue + table_to_columns[table_name].append(typed_column.registry[DOT_NAME_TO_TYPE[column_type]](column_name)) + # Table instances are provided with all column data, preventing them from generating more queries. However the "fetch_by_default" behavior is + # passed on to them for future actions. + return {table_name: Table(self, table_name, tuple(columns), fetch_by_default=self._fetch_by_default) for table_name, columns in table_to_columns.items()} + + +class Table(ItemFetcher): """ - Handle to a Kusto table + Handle to a Kusto table. + Uses :class:`ItemFetcher` to fetch and cache the table schema of columns and their types. """ database: Database - tables: Union[str, List[str], Tuple[str, ...]] + tables: Tuple[str, ...] - def __init__(self, database: Database, tables: Union[str, List[str], Tuple[str, ...]]) -> None: + def __init__(self, database: Database, tables: Union[str, List[str], Tuple[str, ...]], columns: Tuple[BaseColumn, ...] = None, fetch_by_default: bool = True) -> None: """ - Create a new handle to a Kusto table + Create a new handle to a Kusto table. - :param database: Database object + :param database: The associated Database instance :param tables: Either a single table name, or a list of tables. If more than one table is given OR the table name contains a wildcard, the Kusto 'union' statement will be used. + :param columns: Table columns. If this is None and "ItemFetcher" is true then they will be fetched in the constructor. """ - + super().__init__( + None if columns is None else {c.get_name(): c for c in columns}, + fetch_by_default + ) self.database = database - self.tables = [tables] if isinstance(tables, str) else tables + self.tables = (tables,) if isinstance(tables, str) else tuple(tables) + + def __repr__(self) -> str: + return f'{self.database}.Table({self.get_table()})' + + def _new_item(self, name: str) -> BaseColumn: + return AnyTypeColumn(name) + + def __getattr__(self, name: str) -> Any: + """ + Convenience function for obtaining a column using dot notation. + In contrast with the overridden method from the :class:`ItemFetcher` class, a new column is generated if needed, since new columns can be created on the fly in the course + of the query (e.g. using 'extend'), and there is no fear of undesired erroneous queries sent to Kusto. + + :param name: Name of column + :return: The column with the given name + """ + return self[name] def get_table(self) -> KQL: result = KQL(', '.join(self.tables)) @@ -114,12 +195,19 @@ class Table: def execute(self, rendered_query: KQL) -> KustoResponseDataSet: return self.database.execute(rendered_query) - def show_columns(self) -> Tuple[Tuple[str, str], ...]: - res: KustoResponseDataSet = self.execute(KQL('.show table {}'.format(self.get_table()))) - return tuple( - ( - r[0], # Column name - r[1], # Column type - ) - for r in res.primary_results[0].rows - ) + def show_columns(self): + return self.get_item_names() + + def _internal_get_items(self) -> Dict[str, Any]: + # TODO: Handle unions + # Retrieves column names and types for this table only + res: KustoResponseDataSet = self.execute(KQL('.show table {} | project AttributeName, AttributeType | limit 10000'.format(self.get_table()))) + return { + column_name: typed_column.registry[INTERNAL_NAME_TO_TYPE[column_type]](column_name) + for column_name, column_type in res.primary_results[0].rows + } + + +# There has to be code somewhere that already does this, but I didn't find it +def is_empty(s: str) -> bool: + return s is None or len(s.strip()) == 0 diff --git a/pykusto/expressions.py b/pykusto/expressions.py index cb69d38..e6f79ae 100644 --- a/pykusto/expressions.py +++ b/pykusto/expressions.py @@ -1,12 +1,11 @@ from datetime import datetime, timedelta -from numbers import Number from typing import Any, List, Tuple, Mapping, Optional, Type from typing import Union from pykusto.kql_converters import KQL -from pykusto.type_utils import plain_expression, aggregation_expression, KustoTypes, kql_converter, TypeName +from pykusto.type_utils import plain_expression, aggregation_expression, PythonTypes, kql_converter, KustoType, typed_column -ExpressionType = Union[KustoTypes, 'BaseExpression'] +ExpressionType = Union[PythonTypes, 'BaseExpression'] StringType = Union[str, 'StringExpression'] BooleanType = Union[bool, 'BooleanExpression'] NumberType = Union[int, float, 'NumberExpression'] @@ -36,6 +35,8 @@ def _subexpr_to_kql(obj: ExpressionType) -> KQL: class BaseExpression: kql: KQL + # We would prefer to use 'abc' to make the class abstract, but this can be done only if there is at least one abstract method, which we don't have here. + # Overriding __new___ is the next best solution. def __new__(cls, *args, **kwargs): if cls is 'BaseExpression': raise TypeError("BaseExpression is abstract") @@ -44,7 +45,8 @@ class BaseExpression: def __init__(self, kql: Union[KQL, 'BaseExpression']) -> None: if isinstance(kql, BaseExpression): self.kql = kql.kql - elif not isinstance(kql, str): + return + if not isinstance(kql, str): raise ValueError("Either expression or KQL required") self.kql = kql @@ -75,7 +77,7 @@ class BaseExpression: @staticmethod def base_binary_op( - left: ExpressionType, operator: str, right: ExpressionType, result_type: Type[KustoTypes] + left: ExpressionType, operator: str, right: ExpressionType, result_type: Type[KustoType] ) -> 'BaseExpression': registrar = plain_expression if isinstance(left, AggregationExpression) or isinstance(right, AggregationExpression): @@ -112,16 +114,25 @@ class BaseExpression: def to_string(self) -> 'StringExpression': return StringExpression(KQL('tostring({})'.format(self.kql))) - def assign_to(self, *columns: 'Column') -> 'AssignmentBase': + def assign_to_single_column(self, column: 'AnyTypeColumn') -> 'AssignmentToSingleColumn': + return AssignmentToSingleColumn(column, self) + + def assign_to_multiple_columns(self, *columns: 'AnyTypeColumn') -> 'AssignmentBase': + """ + This method exists for the sole purpose of providing an informative error message. + """ + raise ValueError("Only arrays can be assigned to multiple columns") + + def assign_to(self, *columns: 'AnyTypeColumn') -> 'AssignmentBase': if len(columns) == 0: # Unspecified column name return AssignmentBase(None, self) if len(columns) == 1: - return AssignmentToSingleColumn(columns[0], self) - raise ValueError("Only arrays can be assigned to multiple columns") + return self.assign_to_single_column(columns[0]) + return self.assign_to_multiple_columns(*columns) -@plain_expression(bool) +@plain_expression(KustoType.BOOL) class BooleanExpression(BaseExpression): @staticmethod def binary_op(left: ExpressionType, operator: str, right: ExpressionType) -> 'BooleanExpression': @@ -138,12 +149,12 @@ class BooleanExpression(BaseExpression): return BooleanExpression(KQL('not({})'.format(self.kql))) -@plain_expression(Number) +@plain_expression(KustoType.INT, KustoType.LONG, KustoType.REAL) class NumberExpression(BaseExpression): @staticmethod def binary_op(left: NumberType, operator: str, right: NumberType) -> 'NumberExpression': # noinspection PyTypeChecker - return BaseExpression.base_binary_op(left, operator, right, Number) + return BaseExpression.base_binary_op(left, operator, right, int) def __lt__(self, other: NumberType) -> BooleanExpression: return BooleanExpression.binary_op(self, ' < ', other) @@ -225,16 +236,16 @@ class NumberExpression(BaseExpression): return BooleanExpression(KQL('isnan({})'.format(self.kql))) def log(self) -> 'NumberExpression': - return NumberExpression(KQL('log({})'.format(self))) + return NumberExpression(KQL('log({})'.format(self.kql))) def log10(self) -> 'NumberExpression': - return NumberExpression(KQL('log10({})'.format(self))) + return NumberExpression(KQL('log10({})'.format(self.kql))) def log2(self) -> 'NumberExpression': - return NumberExpression(KQL('log2({})'.format(self))) + return NumberExpression(KQL('log2({})'.format(self.kql))) def loggamma(self) -> 'NumberExpression': - return NumberExpression(KQL('loggamma({})'.format(self))) + return NumberExpression(KQL('loggamma({})'.format(self.kql))) def round(self, precision: NumberType = None) -> 'NumberExpression': return NumberExpression(KQL( @@ -242,7 +253,7 @@ class NumberExpression(BaseExpression): )) -@plain_expression(str) +@plain_expression(KustoType.STRING) class StringExpression(BaseExpression): @staticmethod def binary_op(left: ExpressionType, operator: str, right: ExpressionType) -> 'StringExpression': @@ -269,9 +280,9 @@ class StringExpression(BaseExpression): def split(self, delimiter: StringType, requested_index: NumberType = None) -> 'ArrayExpression': if requested_index is None: - return ArrayExpression(KQL('split({}, {})'.format(to_kql(self.kql), to_kql(delimiter)))) + return ArrayExpression(KQL('split({}, {})'.format(self.kql, to_kql(delimiter)))) return ArrayExpression(KQL('split({}, {}, {})'.format( - to_kql(self.kql), to_kql(delimiter), to_kql(requested_index) + self.kql, to_kql(delimiter), to_kql(requested_index) ))) def equals(self, other: StringType, case_sensitive: bool = False) -> BooleanExpression: @@ -311,7 +322,7 @@ class StringExpression(BaseExpression): return BooleanExpression(KQL('isutf8({})'.format(self.kql))) -@plain_expression(datetime) +@plain_expression(KustoType.DATETIME) class DatetimeExpression(BaseExpression): @staticmethod def binary_op(left: ExpressionType, operator: str, right: ExpressionType) -> 'DatetimeExpression': @@ -422,7 +433,7 @@ class DatetimeExpression(BaseExpression): )) -@plain_expression(timedelta) +@plain_expression(KustoType.TIMESPAN) class TimespanExpression(BaseExpression): @staticmethod def binary_op(left: ExpressionType, operator: str, right: ExpressionType) -> 'TimespanExpression': @@ -458,7 +469,7 @@ class TimespanExpression(BaseExpression): ))) -@plain_expression(List, Tuple) +@plain_expression(KustoType.ARRAY) class ArrayExpression(BaseExpression): def __getitem__(self, index: NumberType) -> 'AnyExpression': return AnyExpression(KQL('{}[{}]'.format(self.kql, _subexpr_to_kql(index)))) @@ -469,7 +480,7 @@ class ArrayExpression(BaseExpression): def array_length(self) -> NumberExpression: return NumberExpression(KQL('array_length({})'.format(self.kql))) - def contains(self, other: ExpressionType) -> 'BooleanExpression': + def array_contains(self, other: ExpressionType) -> 'BooleanExpression': return BooleanExpression.binary_op(other, ' in ', self) @staticmethod @@ -478,16 +489,14 @@ class ArrayExpression(BaseExpression): ', '.join('{}'.format(_subexpr_to_kql(e) for e in elements)) ))) - def assign_to(self, *columns: 'Column') -> 'AssignmentBase': - if len(columns) <= 1: - return super().assign_to(*columns) + def assign_to_multiple_columns(self, *columns: 'AnyTypeColumn') -> 'AssignmentToMultipleColumns': return AssignmentToMultipleColumns(columns, self) -@plain_expression(Mapping) +@plain_expression(KustoType.MAPPING) class MappingExpression(BaseExpression): def __getitem__(self, index: StringType) -> 'AnyExpression': - return AnyExpression(KQL('{}[{}]'.format(self.kql, _subexpr_to_kql(index)))) + return AnyExpression(KQL('{}[{}]'.format(self.kql, to_kql(index)))) def __getattr__(self, name: str) -> 'AnyExpression': return AnyExpression(KQL('{}.{}'.format(self.kql, name))) @@ -516,12 +525,15 @@ class AnyExpression( class AggregationExpression(BaseExpression): + + # We would prefer to use 'abc' to make the class abstract, but this can be done only if there is at least one abstract method, which we don't have here. + # Overriding __new___ is the next best solution. def __new__(cls, *args, **kwargs): if cls is 'AggregationExpression': raise TypeError("AggregationExpression is abstract") return object.__new__(cls) - def assign_to(self, *columns: 'Column') -> 'AssignmentFromAggregationToColumn': + def assign_to(self, *columns: 'AnyTypeColumn') -> 'AssignmentFromAggregationToColumn': if len(columns) == 0: # Unspecified column name return AssignmentFromAggregationToColumn(None, self) @@ -533,37 +545,37 @@ class AggregationExpression(BaseExpression): return self.kql -@aggregation_expression(bool) +@aggregation_expression(KustoType.BOOL) class BooleanAggregationExpression(AggregationExpression, BooleanExpression): pass -@aggregation_expression(Number) +@aggregation_expression(KustoType.INT, KustoType.LONG, KustoType.REAL) class NumberAggregationExpression(AggregationExpression, NumberExpression): pass -@aggregation_expression(str) +@aggregation_expression(KustoType.STRING) class StringAggregationExpression(AggregationExpression, StringExpression): pass -@aggregation_expression(datetime) +@aggregation_expression(KustoType.DATETIME) class DatetimeAggregationExpression(AggregationExpression, DatetimeExpression): pass -@aggregation_expression(timedelta) +@aggregation_expression(KustoType.TIMESPAN) class TimespanAggregationExpression(AggregationExpression, TimespanExpression): pass -@aggregation_expression(List, Tuple) +@aggregation_expression(KustoType.ARRAY) class ArrayAggregationExpression(AggregationExpression, ArrayExpression): pass -@aggregation_expression(Mapping) +@aggregation_expression(KustoType.MAPPING) class MappingAggregationExpression(AggregationExpression, MappingExpression): pass @@ -583,7 +595,7 @@ class AssignmentBase: return KQL('{} = {}'.format(self._lvalue, self._rvalue)) @staticmethod - def assign(expression: ExpressionType, *columns: 'Column') -> 'AssignmentBase': + def assign(expression: ExpressionType, *columns: 'AnyTypeColumn') -> 'AssignmentBase': if len(columns) == 0: raise ValueError("Provide at least one column") if len(columns) == 1: @@ -592,52 +604,116 @@ class AssignmentBase: class AssignmentToSingleColumn(AssignmentBase): - def __init__(self, column: 'Column', expression: ExpressionType) -> None: + def __init__(self, column: 'AnyTypeColumn', expression: ExpressionType) -> None: super().__init__(column.kql, expression) class AssignmentFromColumnToColumn(AssignmentToSingleColumn): - def __init__(self, target: 'Column', source: 'Column') -> None: + def __init__(self, target: 'AnyTypeColumn', source: 'BaseColumn') -> None: super().__init__(target, source) class AssignmentToMultipleColumns(AssignmentBase): - def __init__(self, columns: Union[List['Column'], Tuple['Column']], expression: ArrayType) -> None: + def __init__(self, columns: Union[List['AnyTypeColumn'], Tuple['AnyTypeColumn']], expression: ArrayType) -> None: super().__init__(KQL('({})'.format(', '.join(c.kql for c in columns))), expression) class AssignmentFromAggregationToColumn(AssignmentBase): - def __init__(self, column: Optional['Column'], aggregation: AggregationExpression) -> None: + def __init__(self, column: Optional['AnyTypeColumn'], aggregation: AggregationExpression) -> None: super().__init__(None if column is None else column.kql, aggregation) -class Column(AnyExpression): +class BaseColumn(BaseExpression): _name: str + # We would prefer to use 'abc' to make the class abstract, but this can be done only if there is at least one abstract method, which we don't have here. + # We can't define "get_kusto_type" as abstract because at least one concrete subclass (NumberColumn) does not override it. + # Overriding __new___ is the next best solution. + def __new__(cls, *args, **kwargs): + if cls is 'BaseColumn': + raise TypeError("BaseColumn is abstract") + return object.__new__(cls) + def __init__(self, name: str) -> None: super().__init__(KQL("['{}']".format(name) if '.' in name else name)) self._name = name + def get_name(self) -> str: + return self._name + def as_subexpression(self) -> KQL: return self.kql + def assign_to_single_column(self, column: 'AnyTypeColumn') -> 'AssignmentFromColumnToColumn': + return AssignmentFromColumnToColumn(column, self) + + def get_kusto_type(self) -> KustoType: + raise NotImplementedError("BaseColumn has no type") + + def __repr__(self) -> str: + return f'{self.__class__.__name__}({self._name})' + + +@typed_column(KustoType.INT, KustoType.LONG, KustoType.REAL) +class NumberColumn(BaseColumn, NumberExpression): + pass + + +@typed_column(KustoType.BOOL) +class BooleanColumn(BaseColumn, BooleanExpression): + def get_kusto_type(self) -> KustoType: + return KustoType.BOOL + + +@typed_column(KustoType.ARRAY) +class ArrayColumn(BaseColumn, ArrayExpression): + def get_kusto_type(self) -> KustoType: + return KustoType.ARRAY + + +@typed_column(KustoType.MAPPING) +class MappingColumn(BaseColumn, MappingExpression): + def get_kusto_type(self) -> KustoType: + return KustoType.MAPPING + + +class DynamicColumn(ArrayColumn, MappingColumn): + def get_kusto_type(self) -> KustoType: + raise ValueError("Column type unknown") + + +@typed_column(KustoType.STRING) +class StringColumn(BaseColumn, StringExpression): + def get_kusto_type(self) -> KustoType: + return KustoType.STRING + + +@typed_column(KustoType.DATETIME) +class DatetimeColumn(BaseColumn, DatetimeExpression): + def get_kusto_type(self) -> KustoType: + return KustoType.DATETIME + + +@typed_column(KustoType.TIMESPAN) +class TimespanColumn(BaseColumn, TimespanExpression): + def get_kusto_type(self) -> KustoType: + return KustoType.TIMESPAN + + +class AnyTypeColumn(NumberColumn, BooleanColumn, DynamicColumn, StringColumn, DatetimeColumn, TimespanColumn): def __len__(self) -> NumberExpression: - raise NotImplementedError("Column type unknown, instead use 'string_size' or 'array_length'") + raise ValueError("Column type unknown, instead use 'string_size' or 'array_length'") - def assign_to(self, *columns: 'Column') -> 'AssignmentBase': - if len(columns) == 0: - return super().assign_to() - if len(columns) == 1: - return AssignmentFromColumnToColumn(columns[0], self) - return ArrayExpression.assign_to(self, *columns) + def get_kusto_type(self) -> KustoType: + raise ValueError("Column type unknown") class ColumnGenerator: - def __getattr__(self, name: str) -> Column: - return Column(name) + def __getattr__(self, name: str) -> AnyTypeColumn: + return AnyTypeColumn(name) - def __getitem__(self, name: str) -> Column: - return Column(name) + def __getitem__(self, name: str) -> AnyTypeColumn: + return AnyTypeColumn(name) # Recommended usage: from pykusto.expressions import column_generator as col @@ -646,8 +722,8 @@ column_generator = ColumnGenerator() class ColumnToType(BaseExpression): - def __init__(self, col: Column, type_name: TypeName) -> None: - super().__init__(KQL("{} to typeof({})".format(col.kql, type_name.value))) + def __init__(self, col: BaseColumn, kusto_type: KustoType) -> None: + super().__init__(KQL("{} to typeof({})".format(col.kql, kusto_type.primary_name))) def to_kql(obj: ExpressionType) -> KQL: diff --git a/pykusto/functions.py b/pykusto/functions.py index fa01772..e55c5f7 100644 --- a/pykusto/functions.py +++ b/pykusto/functions.py @@ -1,13 +1,13 @@ import json from typing import Union -from pykusto.expressions import Column, NumberType, NumberExpression, TimespanType, \ +from pykusto.expressions import AnyTypeColumn, NumberType, NumberExpression, TimespanType, \ DatetimeExpression, TimespanExpression, ArrayType, DynamicType, DatetimeType, BaseExpression, BooleanType, \ ExpressionType, AggregationExpression, StringType, StringExpression, BooleanExpression, \ NumberAggregationExpression, MappingAggregationExpression, ArrayAggregationExpression, to_kql, DynamicExpression, \ - ArrayExpression, ColumnToType + ArrayExpression, ColumnToType, BaseColumn from pykusto.kql_converters import KQL -from pykusto.type_utils import plain_expression, get_base_types, TypeName +from pykusto.type_utils import plain_expression, get_base_types, KustoType # Scalar functions @@ -26,7 +26,7 @@ def ago(expr: TimespanType) -> DatetimeExpression: def array_length(expr: ArrayType) -> NumberExpression: - return expr.array_length() + return ArrayExpression(expr).array_length() # def array_slice(): return @@ -272,10 +272,10 @@ def iff(predicate: BooleanType, if_true: ExpressionType, if_false: ExpressionTyp if len(common_types) == 0: # If there is not at least one common type, then certainly the arguments are not of the same type raise TypeError("The second and third arguments must be of the same type, but they are: {} and {}".format( - ", ".join(t.__name__ for t in return_types), - ", ".join(t.__name__ for t in other_types) + ", ".join(t.primary_name for t in return_types), + ", ".join(t.primary_name for t in other_types) )) - return plain_expression.for_type(next(iter(common_types)))( + return plain_expression.registry[next(iter(common_types))]( KQL('iff({}, {}, {})'.format(to_kql(predicate), to_kql(if_true), to_kql(if_false))) ) @@ -567,7 +567,7 @@ def sign(expr: NumberType) -> NumberExpression: # # def split(string: StringType, delimiter: StringType, requested_index: NumberType = None) -> 'ArrayExpression': - return StringExpression(KQL(string)).split(delimiter, requested_index) + return StringExpression(to_kql(string)).split(delimiter, requested_index) def sqrt(expr: NumberType) -> NumberExpression: @@ -621,7 +621,7 @@ def strcmp(expr1: StringType, expr2: StringType) -> NumberExpression: def string_size(expr: StringType) -> NumberExpression: - return NumberExpression(KQL('string_size({})'.format(to_kql(expr)))) + return StringExpression(expr).string_size() def strlen(expr: StringType) -> NumberExpression: @@ -772,7 +772,7 @@ def avgif(expr: ExpressionType, predicate: BooleanType) -> NumberAggregationExpr # return -def count(col: Column = None) -> NumberAggregationExpression: +def count(col: AnyTypeColumn = None) -> NumberAggregationExpression: res = "count()" if col is None else "count({})".format(col.kql) return NumberAggregationExpression(KQL(res)) @@ -835,7 +835,7 @@ def percentile(expr: ExpressionType, per: NumberType) -> AggregationExpression: def percentiles(expr: ExpressionType, *pers: NumberType) -> AggregationExpression: - res = 'percentiles({}, {})'.format(expr, + res = 'percentiles({}, {})'.format(expr.kql, ', '.join([str(to_kql(per)) for per in pers])) return AggregationExpression(KQL(res)) @@ -881,5 +881,5 @@ def variancep(expr: ExpressionType) -> AggregationExpression: # Used for mv-expand -def to_type(column: Column, type_name: TypeName) -> ColumnToType: +def to_type(column: BaseColumn, type_name: KustoType) -> ColumnToType: return ColumnToType(column, type_name) diff --git a/pykusto/item_fetcher.py b/pykusto/item_fetcher.py new file mode 100644 index 0000000..d27a855 --- /dev/null +++ b/pykusto/item_fetcher.py @@ -0,0 +1,114 @@ +from abc import ABCMeta, abstractmethod +from concurrent.futures import Future, ThreadPoolExecutor, wait +from itertools import chain +from threading import Lock +from typing import Union, Dict, Any, Iterable, Callable + +# Using a thread pool even though we only need one thread, because that's the only way to make use of "futures". +# Also, this makes it easy to use more than one thread, if the need ever arises. +POOL = ThreadPoolExecutor(max_workers=1) + + +class ItemFetcher(metaclass=ABCMeta): + """ + Abstract class that caches a collection of items, fetching them in certain scenarios. + """ + _fetch_by_default: bool + __items: Union[None, Dict[str, Any]] + __future: Union[None, Future] + __item_write_lock: Lock + __item_fetch_lock: Lock + + def __init__(self, items: Union[None, Dict[str, Any]], fetch_by_default: bool) -> None: + """ + :param items: Initial items. If not None, items will not be fetched until the "refresh" method is explicitly called. + :param fetch_by_default: When true, items will be fetched in the constructor, but only if they were not supplied as a parameter. Subclasses are encouraged to pass + on the value of "fetch_by_default" to child ItemFetchers. + """ + self._fetch_by_default = fetch_by_default + self.__items = items + self.__future = None + self.__item_write_lock = Lock() + self.__item_fetch_lock = Lock() + if items is None and fetch_by_default: + self.refresh() + + def get_item_names(self): + return tuple(self.__items.keys()) + + @abstractmethod + def _new_item(self, name: str) -> Any: + raise NotImplementedError() + + def __getattr__(self, name: str) -> Any: + """ + Convenience function for obtaining an item using dot notation. + Often dot notation is used for other purposes, and sometimes that happens implicitly. For example Jupyter notebooks automatically run dot-notation code in the background + on objects. For this reason, to avoid undesired erroneous queries sent to Kusto, an item is returned only if one already exists, and a new item is not generated otherwise + (in contrast to bracket notation). + + :param name: Name of item to return + :return: The item with the given name + :raises AttributeError: If there is no such item + """ + return self._get_item(name, lambda: _raise(AttributeError(f"{self} has no attribute '{name}'"))) + + def __getitem__(self, name: str) -> Any: + """ + Convenience function for obtaining an item using bracket notation. + Since bracket notation is only used explicitly, a new item is generated if needed (in contrast to dot notation). + + :param name: Name of item to return + :return: The item with the given name + """ + return self._get_item(name, lambda: self.__generate_and_save_new_item(name)) + + def __generate_and_save_new_item(self, name): + item = self._new_item(name) + with self.__item_write_lock: + if self.__items is None: + self.__items = {} + self.__items[name] = item + return item + + def _get_item(self, name: str, fallback: Callable) -> Any: + if self.__items is not None: + resolved_item = self.__items.get(name) + if resolved_item is not None: + return resolved_item + return fallback() + + def __dir__(self) -> Iterable[str]: + return sorted(chain(super().__dir__(), tuple() if self.__items is None else self.__items.keys())) + + def refresh(self): + """ + Fetches all items in a separate thread, making them available after the tread finishes executing. The 'wait_for_items' method can be used to wait for that to happen. + The specific logic for fetching is defined in concrete subclasses. + """ + self.__future = POOL.submit(self._get_items) + self.__future.add_done_callback(self._set_items) + + def wait_for_items(self): + """ + If item fetching is currently in progress, wait until it is done and return, otherwise return immediately. + If several fetching threads are in progress, wait for the most recent one. + """ + if self.__future is not None: + wait((self.__future,)) + + def _set_items(self, future: Future): + with self.__item_write_lock: + self.__items = future.result() + + @abstractmethod + def _internal_get_items(self) -> Dict[str, Any]: + raise NotImplementedError() + + def _get_items(self) -> Dict[str, Any]: + with self.__item_fetch_lock: + return self._internal_get_items() + + +def _raise(e: BaseException): + raise e diff --git a/pykusto/kql_converters.py b/pykusto/kql_converters.py index 85c3c3a..3ee5fbf 100644 --- a/pykusto/kql_converters.py +++ b/pykusto/kql_converters.py @@ -4,17 +4,17 @@ from itertools import chain from numbers import Number from typing import NewType, Mapping, Union, List, Tuple -from pykusto.type_utils import kql_converter +from pykusto.type_utils import kql_converter, KustoType KQL = NewType('KQL', str) -@kql_converter(datetime) +@kql_converter(KustoType.DATETIME) def datetime_to_kql(dt: datetime) -> KQL: return KQL(dt.strftime('datetime(%Y-%m-%d %H:%M:%S.%f)')) -@kql_converter(timedelta) +@kql_converter(KustoType.TIMESPAN) def timedelta_to_kql(td: timedelta) -> KQL: hours, remainder = divmod(td.seconds, 3600) minutes, seconds = divmod(remainder, 60) @@ -27,7 +27,7 @@ def timedelta_to_kql(td: timedelta) -> KQL: )) -@kql_converter(Mapping, List, Tuple) +@kql_converter(KustoType.ARRAY, KustoType.MAPPING) def dynamic_to_kql(d: Union[Mapping, List, Tuple]) -> KQL: try: query = list(json.dumps(d)) @@ -69,21 +69,22 @@ def build_dynamic(d: Union[Mapping, List, Tuple]) -> KQL: return to_kql(d) -@kql_converter(bool) +@kql_converter(KustoType.BOOL) def bool_to_kql(b: bool) -> KQL: return KQL('true') if b else KQL('false') -@kql_converter(str) +@kql_converter(KustoType.STRING) def str_to_kql(s: str) -> KQL: return KQL('"{}"'.format(s)) -@kql_converter(Number) +@kql_converter(KustoType.INT, KustoType.LONG, KustoType.REAL) def number_to_kql(n: Number) -> KQL: return KQL(str(n)) -@kql_converter(type(None)) +# noinspection PyUnusedLocal +@kql_converter(KustoType.NULL) def none_to_kql(n: type(None)) -> KQL: return KQL("") diff --git a/pykusto/query.py b/pykusto/query.py index b2f77f3..c2df0a4 100644 --- a/pykusto/query.py +++ b/pykusto/query.py @@ -11,11 +11,12 @@ from azure.kusto.data.helpers import dataframe_from_result_table from pykusto.client import Table from pykusto.expressions import BooleanType, ExpressionType, AggregationExpression, OrderedType, \ - StringType, AssignmentBase, AssignmentFromAggregationToColumn, AssignmentToSingleColumn, Column, BaseExpression, \ + StringType, AssignmentBase, AssignmentFromAggregationToColumn, AssignmentToSingleColumn, AnyTypeColumn, \ + BaseExpression, \ AssignmentFromColumnToColumn, AnyExpression, to_kql, ColumnToType from pykusto.kql_converters import KQL from pykusto.logger import logger -from pykusto.type_utils import TypeName +from pykusto.type_utils import KustoType from pykusto.udf import stringify_python_func @@ -102,17 +103,17 @@ class Query: def order_by(self, col: OrderedType, order: Order = None, nulls: Nulls = None) -> 'OrderQuery': return OrderQuery(self, col, order, nulls) - def top(self, num_rows: int, col: Column, order: Order = None, nulls: Nulls = None) -> 'TopQuery': + def top(self, num_rows: int, col: AnyTypeColumn, order: Order = None, nulls: Nulls = None) -> 'TopQuery': return TopQuery(self, num_rows, col, order, nulls) def join(self, query: 'Query', kind: JoinKind = None) -> 'JoinQuery': return JoinQuery(self, query, kind) - def project(self, *args: Union[Column, AssignmentBase, BaseExpression], **kwargs: ExpressionType) -> 'ProjectQuery': - columns: List[Column] = [] + def project(self, *args: Union[AnyTypeColumn, AssignmentBase, BaseExpression], **kwargs: ExpressionType) -> 'ProjectQuery': + columns: List[AnyTypeColumn] = [] assignments: List[AssignmentBase] = [] for arg in args: - if isinstance(arg, Column): + if isinstance(arg, AnyTypeColumn): columns.append(arg) elif isinstance(arg, AssignmentBase): assignments.append(arg) @@ -121,13 +122,13 @@ class Query: else: raise ValueError("Invalid assignment: " + arg.to_kql()) for column_name, expression in kwargs.items(): - assignments.append(AssignmentToSingleColumn(Column(column_name), expression)) + assignments.append(AssignmentToSingleColumn(AnyTypeColumn(column_name), expression)) return ProjectQuery(self, columns, assignments) - def project_rename(self, *args: AssignmentFromColumnToColumn, **kwargs: Column) -> 'ProjectRenameQuery': + def project_rename(self, *args: AssignmentFromColumnToColumn, **kwargs: AnyTypeColumn) -> 'ProjectRenameQuery': assignments: List[AssignmentFromColumnToColumn] = list(args) for column_name, column in kwargs.items(): - assignments.append(AssignmentFromColumnToColumn(Column(column_name), column)) + assignments.append(AssignmentFromColumnToColumn(AnyTypeColumn(column_name), column)) return ProjectRenameQuery(self, assignments) def project_away(self, *columns: StringType) -> 'ProjectAwayQuery': @@ -148,9 +149,9 @@ class Query: assignments.append(arg) for column_name, expression in kwargs.items(): if isinstance(expression, BaseExpression): - assignments.append(expression.assign_to(Column(column_name))) + assignments.append(expression.assign_to(AnyTypeColumn(column_name))) else: - assignments.append(AnyExpression(to_kql(expression)).assign_to(Column(column_name))) + assignments.append(AnyExpression(to_kql(expression)).assign_to(AnyTypeColumn(column_name))) return ExtendQuery(self, *assignments) def summarize(self, *args: Union[AggregationExpression, AssignmentFromAggregationToColumn], @@ -164,10 +165,10 @@ class Query: else: raise ValueError("Invalid assignment: " + str(arg)) for column_name, agg in kwargs.items(): - assignments.append(AssignmentFromAggregationToColumn(Column(column_name), agg)) + assignments.append(AssignmentFromAggregationToColumn(AnyTypeColumn(column_name), agg)) return SummarizeQuery(self, assignments) - def mv_expand(self, *columns: Union[Column, ColumnToType], bag_expansion: BagExpansion = None, with_item_index: Column = None, + def mv_expand(self, *columns: Union[AnyTypeColumn, ColumnToType], bag_expansion: BagExpansion = None, with_item_index: AnyTypeColumn = None, limit: int = None) -> 'MvExpandQuery': if len(columns) == 0: raise ValueError("Please specify one or more columns for mv-expand") @@ -179,15 +180,16 @@ class Query: def evaluate(self, plugin_name, *args: ExpressionType, distribution: Distribution = None) -> 'EvaluateQuery': return EvaluateQuery(self, plugin_name, *args, distribution=distribution) - def evaluate_udf(self, udf: FunctionType, extend: bool = True, distribution: Distribution = None, **type_specs: TypeName) -> 'EvaluateQuery': + def evaluate_udf(self, udf: FunctionType, extend: bool = True, distribution: Distribution = None, **type_specs: KustoType) -> 'EvaluateQuery': return EvaluateQuery( self, 'python', - BaseExpression(KQL('typeof({})'.format(('*, ' if extend else '') + ', '.join(field_name + ':' + type_name.value for field_name, type_name in type_specs.items())))), + BaseExpression( + KQL('typeof({})'.format(('*, ' if extend else '') + ', '.join(field_name + ':' + kusto_type.primary_name for field_name, kusto_type in type_specs.items())))), stringify_python_func(udf), distribution=distribution ) - def bag_unpack(self, col: Column, prefix: str = None) -> 'EvaluateQuery': + def bag_unpack(self, col: AnyTypeColumn, prefix: str = None) -> 'EvaluateQuery': if prefix is None: return EvaluateQuery(self, 'bag_unpack', col) return EvaluateQuery(self, 'bag_unpack', col, prefix) @@ -240,10 +242,10 @@ class Query: class ProjectQuery(Query): - _columns: List[Column] + _columns: List[AnyTypeColumn] _assignments: List[AssignmentBase] - def __init__(self, head: 'Query', columns: List[Column], assignments: List[AssignmentBase]) -> None: + def __init__(self, head: 'Query', columns: List[AnyTypeColumn], assignments: List[AssignmentBase]) -> None: super().__init__(head) self._columns = columns self._assignments = assignments @@ -275,7 +277,7 @@ class ProjectAwayQuery(Query): def _compile(self) -> KQL: def col_or_wildcard_to_string(col_or_wildcard): - return col_or_wildcard.kql if isinstance(col_or_wildcard, Column) else col_or_wildcard + return col_or_wildcard.kql if isinstance(col_or_wildcard, AnyTypeColumn) else col_or_wildcard return KQL('project-away {}'.format(', '.join((col_or_wildcard_to_string(c) for c in self._columns)))) @@ -410,7 +412,7 @@ class TopQuery(Query): _num_rows: int _order_spec: OrderQuery.OrderSpec - def __init__(self, head: Query, num_rows: int, col: Column, order: Order, nulls: Nulls): + def __init__(self, head: Query, num_rows: int, col: AnyTypeColumn, order: Order, nulls: Nulls): super(TopQuery, self).__init__(head) self._num_rows = num_rows self._order_spec = OrderQuery.OrderSpec(col, order, nulls) @@ -427,21 +429,21 @@ class JoinException(Exception): class JoinQuery(Query): _joined_query: Query _kind: JoinKind - _on_attributes: Tuple[Tuple[Column, ...], ...] + _on_attributes: Tuple[Tuple[AnyTypeColumn, ...], ...] def __init__(self, head: Query, joined_query: Query, kind: JoinKind, - on_attributes: Tuple[Tuple[Column, ...], ...] = tuple()): + on_attributes: Tuple[Tuple[AnyTypeColumn, ...], ...] = tuple()): super(JoinQuery, self).__init__(head) self._joined_query = joined_query self._kind = kind self._on_attributes = on_attributes - def on(self, col1: Column, col2: Column = None) -> 'JoinQuery': + def on(self, col1: AnyTypeColumn, col2: AnyTypeColumn = None) -> 'JoinQuery': self._on_attributes = self._on_attributes + (((col1,),) if col2 is None else ((col1, col2),)) return self @staticmethod - def _compile_on_attribute(attribute: Tuple[Column]): + def _compile_on_attribute(attribute: Tuple[AnyTypeColumn]): assert len(attribute) in (1, 2) if len(attribute) == 1: return attribute[0].kql @@ -462,7 +464,7 @@ class JoinQuery(Query): class SummarizeQuery(Query): _assignments: List[AssignmentFromAggregationToColumn] - _by_columns: List[Union[Column, BaseExpression]] + _by_columns: List[Union[AnyTypeColumn, BaseExpression]] _by_assignments: List[AssignmentToSingleColumn] def __init__(self, head: Query, @@ -472,17 +474,17 @@ class SummarizeQuery(Query): self._by_columns = [] self._by_assignments = [] - def by(self, *args: Union[AssignmentToSingleColumn, Column, BaseExpression], + def by(self, *args: Union[AssignmentToSingleColumn, AnyTypeColumn, BaseExpression], **kwargs: BaseExpression): for arg in args: - if isinstance(arg, Column) or isinstance(arg, BaseExpression): + if isinstance(arg, AnyTypeColumn) or isinstance(arg, BaseExpression): self._by_columns.append(arg) elif isinstance(arg, AssignmentToSingleColumn): self._by_assignments.append(arg) else: raise ValueError("Invalid assignment: " + arg.to_kql()) for column_name, group_exp in kwargs.items(): - self._by_assignments.append(AssignmentToSingleColumn(Column(column_name), group_exp)) + self._by_assignments.append(AssignmentToSingleColumn(AnyTypeColumn(column_name), group_exp)) return self def _compile(self) -> KQL: @@ -496,12 +498,12 @@ class SummarizeQuery(Query): class MvExpandQuery(Query): - _columns: Tuple[Union[Column, ColumnToType]] + _columns: Tuple[Union[AnyTypeColumn, ColumnToType]] _bag_expansion: BagExpansion - _with_item_index: Column + _with_item_index: AnyTypeColumn _limit: int - def __init__(self, head: Query, columns: Tuple[Union[Column, ColumnToType]], bag_expansion: BagExpansion, with_item_index: Column, limit: int): + def __init__(self, head: Query, columns: Tuple[Union[AnyTypeColumn, ColumnToType]], bag_expansion: BagExpansion, with_item_index: AnyTypeColumn, limit: int): super(MvExpandQuery, self).__init__(head) self._columns = columns self._bag_expansion = bag_expansion diff --git a/pykusto/type_utils.py b/pykusto/type_utils.py index 7a5daa2..afef29b 100644 --- a/pykusto/type_utils.py +++ b/pykusto/type_utils.py @@ -1,26 +1,69 @@ from datetime import datetime, timedelta from enum import Enum -from numbers import Number from typing import Union, Mapping, Type, Dict, Callable, Tuple, List, Any, Set -KustoTypes = Union[str, Number, bool, datetime, Mapping, List, Tuple, timedelta] # TODO: Unhandled data types: guid, decimal - - -def get_base_types(obj: Any) -> Set[Type[KustoTypes]]: +PythonTypes = Union[str, int, float, bool, datetime, Mapping, List, Tuple, timedelta] + + +class KustoType(Enum): + BOOL = ('bool', 'I8', 'System.SByte', bool) + DATETIME = ('datetime', 'DateTime', 'System.DateTime', datetime) + # noinspection PyTypeChecker + DECIMAL = ('decimal', 'Decimal', 'System.Data.SqlTypes.SqlDecimal', None) # TODO + ARRAY = ('dynamic', 'Dynamic', 'System.Object', List, Tuple) + MAPPING = ('dynamic', 'Dynamic', 'System.Object', Mapping) + # noinspection PyTypeChecker + GUID = ('guid', 'UniqueId', 'System.Guid', None) # TODO + INT = ('int', 'I32', 'System.Int32', int) + LONG = ('long', 'I64', 'System.Int64', int) + REAL = ('real', 'R64', 'System.Double', float) + STRING = ('string', 'StringBuffer', 'System.String', str) + TIMESPAN = ('timespan', 'TimeSpan', 'System.TimeSpan', timedelta) + NULL = ('null', 'null', 'null', type(None)) + + primary_name: str + internal_name: str + dot_net_name: str + python_types: Tuple[Type[PythonTypes]] + + def __init__(self, primary_name: str, internal_name: str, dot_net_name: str, *python_types: Type[PythonTypes]) -> None: + self.primary_name = primary_name + self.internal_name = internal_name + self.dot_net_name = dot_net_name + self.python_types = python_types + + def is_type_of(self, obj) -> bool: + for python_type in self.python_types: + if python_type is not None and isinstance(obj, python_type): + return True + return False + + def is_superclass_of(self, t: Type) -> bool: + for python_type in self.python_types: + if python_type is not None and issubclass(t, python_type): + return True + return False + + +INTERNAL_NAME_TO_TYPE: Dict[str, KustoType] = {t.internal_name: t for t in KustoType} +DOT_NAME_TO_TYPE: Dict[str, KustoType] = {t.dot_net_name: t for t in KustoType} + + +def get_base_types(obj: Any) -> Set[KustoType]: """ - For a given object, return the associated basic type, which is a member of `KustoTypes` + For a given object, return the associated basic type, which is a member of :class:`KustoType` :param obj: The given object for which the type is resolved - :return: A type which is a member of `KustoTypes` + :return: A type which is a member of `KustoType` """ - obj_type = type(obj) - for kusto_type in KustoTypes.__args__: - if isinstance(obj, kusto_type): + for kusto_type in KustoType: + if kusto_type.is_type_of(obj): # The object is already a member of Kusto types return {kusto_type} # The object is one of the expression types decorated with a TypeRegistrar, therefore the original types are # recorded the field _base_types + obj_type = type(obj) base_types = getattr(obj_type, '_base_types', None) if base_types is None: raise TypeError("get_base_types called for unsupported type: {}".format(obj_type.__name__)) @@ -29,11 +72,12 @@ def get_base_types(obj: Any) -> Set[Type[KustoTypes]]: class TypeRegistrar: """ - A factory for annotations that are used to create a mapping between Kusto types and python types and functions. + A factory for annotations that are used to create a mapping between Kusto types and python types / functions. Each annotation must be called with a Kusto type as a parameter. The `for_obj` and `for_type` methods can then be used to retrieve the python type or function corresponding to a given Kusto type. """ - registry: Dict[Type[KustoTypes], Callable] + name: str + registry: Dict[KustoType, Callable] def __init__(self, name: str) -> None: """ @@ -45,18 +89,18 @@ class TypeRegistrar: def __repr__(self) -> str: return self.name - def __call__(self, *types: Type[KustoTypes]) -> Callable: + def __call__(self, *types: KustoType) -> Callable: def inner(wrapped): for t in types: previous = self.registry.setdefault(t, wrapped) if previous is not wrapped: - raise TypeError("{}: type already registered: {}".format(self, t.__name__)) + raise TypeError("{}: type already registered: {}".format(self, t.primary_name)) wrapped._base_types = set(types) return wrapped return inner - def for_obj(self, obj: KustoTypes) -> Callable: + def for_obj(self, obj: PythonTypes) -> Callable: """ Given an object of Kusto type, retrieve the python type or function associated with the object's type, and call it with the given object as a parameter @@ -65,11 +109,11 @@ class TypeRegistrar: :return: Associated python object """ for registered_type, registered_callable in self.registry.items(): - if isinstance(obj, registered_type): + if registered_type.is_type_of(obj): return registered_callable(obj) raise ValueError("{}: no registered callable for object {} of type {}".format(self, obj, type(obj).__name__)) - def for_type(self, t: Type[KustoTypes]) -> Callable: + def for_type(self, t: Type[PythonTypes]) -> Callable: """ Given a Kusto type, retrieve the associated python type or function @@ -77,24 +121,12 @@ class TypeRegistrar: :return: Associated python object """ for registered_type, registered_callable in self.registry.items(): - if issubclass(t, registered_type): + if registered_type.is_superclass_of(t): return registered_callable raise ValueError("{}: no registered callable for type {}".format(self, t.__name__)) kql_converter = TypeRegistrar("KQL Converter") +typed_column = TypeRegistrar("Column") plain_expression = TypeRegistrar("Plain expression") aggregation_expression = TypeRegistrar("Aggregation expression") - - -class TypeName(Enum): - BOOL = 'bool' - DATETIME = 'datetime' - DECIMAL = 'decimal' - DYNAMIC = 'dynamic' - GUID = 'guid' - INT = 'int' - LONG = 'long' - REAL = 'real' - STRING = 'string' - TIMESPAN = 'timespan' diff --git a/setup.py b/setup.py index 9fa5b79..f075904 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='pykusto', - version='0.0.10', + version='0.0.11', packages=find_packages(exclude=['test']), url='https://github.com/Azure/pykusto', license='MIT License',
Autocomplete column names
Azure/pykusto
diff --git a/test/test_functions.py b/test/test_functions.py index b88182a..c23866e 100644 --- a/test/test_functions.py +++ b/test/test_functions.py @@ -738,7 +738,7 @@ class TestFunction(TestBase): def test_iff_different_types(self): self.assertRaises( - TypeError("The second and third arguments must be of the same type, but they are: timedelta and str"), + TypeError("The second and third arguments must be of the same type, but they are: timespan and string"), lambda: Query().project(foo=f.iff(col.foo > f.ago(datetime.timedelta(2)), datetime.timedelta(3), "hello")) .render() ) diff --git a/test/test_query.py b/test/test_query.py index c28e76c..4ec926d 100644 --- a/test/test_query.py +++ b/test/test_query.py @@ -2,7 +2,7 @@ from pykusto import functions as f from pykusto.client import PyKustoClient from pykusto.expressions import column_generator as col from pykusto.query import Query, Order, Nulls, JoinKind, JoinException, BagExpansion, Distribution -from pykusto.type_utils import TypeName +from pykusto.type_utils import KustoType from test.test_base import TestBase from test.test_table import MockKustoClient from test.udf import func, STRINGIFIED @@ -163,6 +163,12 @@ class TestQuery(TestBase): Query().extend(col.foo.assign_to(col.foo1, col.foo2), shoo=col.bar * 4).render(), ) + def test_extend_assign_non_array_to_multiple_columns(self): + self.assertRaises( + ValueError("Only arrays can be assigned to multiple columns"), + lambda: Query().extend(f.strcat("hello", "world").assign_to(col.foo1, col.foo2)).render(), + ) + def test_extend_generate_column_name(self): self.assertEqual( " | extend v1 + v2, foo = bar * 4", @@ -203,7 +209,7 @@ class TestQuery(TestBase): def test_mv_expand_to_type(self): self.assertEqual( " | mv-expand a to typeof(string), b to typeof(int), c", - Query().mv_expand(f.to_type(col.a, TypeName.STRING), f.to_type(col.b, TypeName.INT), col.c).render(), + Query().mv_expand(f.to_type(col.a, KustoType.STRING), f.to_type(col.b, KustoType.INT), col.c).render(), ) def test_mv_expand_args(self): @@ -312,13 +318,13 @@ class TestQuery(TestBase): def test_udf(self): self.assertEqual( " | evaluate python(typeof(*, StateZone:string), {})".format(STRINGIFIED), - Query().evaluate_udf(func, StateZone=TypeName.STRING).render(), + Query().evaluate_udf(func, StateZone=KustoType.STRING).render(), ) def test_udf_no_extend(self): self.assertEqual( " | evaluate python(typeof(StateZone:string), {})".format(STRINGIFIED), - Query().evaluate_udf(func, extend=False, StateZone=TypeName.STRING).render(), + Query().evaluate_udf(func, extend=False, StateZone=KustoType.STRING).render(), ) def test_bag_unpack(self): diff --git a/test/test_table.py b/test/test_table.py index f817699..9ce0205 100644 --- a/test/test_table.py +++ b/test/test_table.py @@ -1,24 +1,73 @@ -from typing import List, Tuple +from concurrent.futures import Future +from typing import List, Tuple, Callable, Any from unittest.mock import patch from urllib.parse import urljoin from azure.kusto.data.request import KustoClient, ClientRequestProperties -from pykusto.expressions import column_generator as col from pykusto.client import PyKustoClient +from pykusto.expressions import column_generator as col, StringColumn, NumberColumn, AnyTypeColumn, BooleanColumn from pykusto.query import Query +from pykusto.type_utils import KustoType from test.test_base import TestBase +def mock_response(rows: Tuple[Any, ...]): + return type( + 'KustoResponseDataSet', + (object,), + {'primary_results': (type( + 'KustoResultTable', + (object,), + {'rows': rows} + ),)} + ) + + +def mock_columns_response(columns: List[Tuple[str, KustoType]] = tuple()) -> Callable: + return lambda: mock_response(tuple((c_name, c_type.internal_name) for c_name, c_type in columns)) + + +def mock_tables_response(tables: List[Tuple[str, List[Tuple[str, KustoType]]]] = tuple()) -> Callable: + return lambda: mock_response(tuple((t_name, c_name, c_type.dot_net_name) for t_name, columns in tables for c_name, c_type in columns)) + + +def mock_databases_response(databases: List[Tuple[str, List[Tuple[str, List[Tuple[str, KustoType]]]]]] = tuple()) -> Callable: + return lambda: mock_response(tuple( + (d_name, t_name, c_name, c_type.dot_net_name) + for d_name, tables in databases + for t_name, columns in tables + for c_name, c_type in columns + )) + + # noinspection PyMissingConstructor class MockKustoClient(KustoClient): executions: List[Tuple[str, str, ClientRequestProperties]] - - def __init__(self, cluster="https://test_cluster.kusto.windows.net"): + columns_response: Callable + tables_response: Callable + databases_response: Callable + + def __init__( + self, + cluster="https://test_cluster.kusto.windows.net", + columns_response: Callable = mock_columns_response([]), + tables_response: Callable = mock_tables_response([]), + databases_response: Callable = mock_databases_response([]), + ): self.executions = [] self._query_endpoint = urljoin(cluster, "/v2/rest/query") + self.columns_response = columns_response + self.tables_response = tables_response + self.databases_response = databases_response def execute(self, database: str, rendered_query: str, properties: ClientRequestProperties = None): + if rendered_query == '.show database schema | project TableName, ColumnName, ColumnType | limit 10000': + return self.tables_response() + if rendered_query.startswith('.show table '): + return self.columns_response() + if rendered_query.startswith('.show databases schema '): + return self.databases_response() self.executions.append((database, rendered_query, properties)) @@ -128,3 +177,76 @@ class TestTable(TestBase): None)], mock_kusto_client_1.executions, ) + + def test_column_retrieve(self): + mock_kusto_client = MockKustoClient(columns_response=mock_columns_response([('foo', KustoType.STRING), ('bar', KustoType.INT)])) + table = PyKustoClient(mock_kusto_client)['test_db']['test_table'] + table.refresh() + table.wait_for_items() # Avoid race condition + self.assertEqual(StringColumn, type(table.foo)) + self.assertEqual(NumberColumn, type(table.bar)) + self.assertEqual(AnyTypeColumn, type(table['baz'])) + + def test_column_retrieve_brackets(self): + mock_kusto_client = MockKustoClient(columns_response=mock_columns_response([('foo', KustoType.STRING), ('bar', KustoType.INT)])) + table = PyKustoClient(mock_kusto_client)['test_db']['test_table'] + table.refresh() + table.wait_for_items() # Avoid race condition + self.assertEqual(StringColumn, type(table['foo'])) + self.assertEqual(NumberColumn, type(table['bar'])) + self.assertEqual(AnyTypeColumn, type(table['baz'])) + + def test_column_retrieve_slow(self): + mock_response_future = Future() + try: + mock_kusto_client = MockKustoClient(columns_response=lambda: mock_response_future.result()) + table = PyKustoClient(mock_kusto_client)['test_db']['test_table'] + self.assertEqual(AnyTypeColumn, type(table['foo'])) + self.assertEqual(AnyTypeColumn, type(table['bar'])) + self.assertEqual(AnyTypeColumn, type(table['baz'])) + finally: + mock_response_future.set_result(mock_columns_response([])()) + + def test_table_retrieve(self): + mock_kusto_client = MockKustoClient(tables_response=mock_tables_response([('test_table', [('foo', KustoType.STRING), ('bar', KustoType.INT)])])) + db = PyKustoClient(mock_kusto_client)['test_db'] + db.refresh() + db.wait_for_items() # Avoid race condition + table = db.test_table + self.assertEqual(StringColumn, type(table.foo)) + self.assertEqual(NumberColumn, type(table.bar)) + self.assertEqual(AnyTypeColumn, type(table['baz'])) + self.assertEqual(AnyTypeColumn, type(db['other_table']['foo'])) + + def test_table_retrieve_error(self): + mock_kusto_client = MockKustoClient(tables_response=mock_tables_response([('test_table', [('foo', KustoType.STRING), ('bar', KustoType.INT)])])) + db = PyKustoClient(mock_kusto_client)['test_db'] + db.refresh() + db.wait_for_items() # Avoid race condition + self.assertRaises( + AttributeError("PyKustoClient(test_cluster.kusto.windows.net).Database(test_db) has no attribute 'test_table_1'"), + lambda: db.test_table_1 + ) + + def test_two_tables_retrieve(self): + mock_kusto_client = MockKustoClient(tables_response=mock_tables_response([ + ('test_table_1', [('foo', KustoType.STRING), ('bar', KustoType.INT)]), + ('test_table_2', [('baz', KustoType.BOOL)]) + ])) + db = PyKustoClient(mock_kusto_client)['test_db'] + db.refresh() + db.wait_for_items() # Avoid race condition + self.assertEqual(StringColumn, type(db.test_table_1.foo)) + self.assertEqual(NumberColumn, type(db.test_table_1.bar)) + self.assertEqual(BooleanColumn, type(db.test_table_2['baz'])) + self.assertEqual(AnyTypeColumn, type(db['other_table']['foo'])) + + def test_database_retrieve(self): + mock_kusto_client = MockKustoClient(databases_response=mock_databases_response([('test_db', [('test_table', [('foo', KustoType.STRING), ('bar', KustoType.INT)])])])) + client = PyKustoClient(mock_kusto_client) + client.wait_for_items() + table = client.test_db.test_table + self.assertEqual(StringColumn, type(table.foo)) + self.assertEqual(NumberColumn, type(table.bar)) + self.assertEqual(AnyTypeColumn, type(table['baz'])) + self.assertEqual(AnyTypeColumn, type(client.test_db['other_table']['foo'])) diff --git a/test/test_utils.py b/test/test_utils.py index 1cc326d..30ae78a 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -1,5 +1,5 @@ from pykusto.expressions import to_kql -from pykusto.type_utils import TypeRegistrar +from pykusto.type_utils import TypeRegistrar, KustoType from test.test_base import TestBase @@ -20,7 +20,7 @@ class TestUtils(TestBase): def test_type_registrar_for_type(self): test_annotation = TypeRegistrar("Test annotation") - @test_annotation(str) + @test_annotation(KustoType.STRING) def str_annotated(s: str) -> str: return "response to " + s @@ -32,7 +32,7 @@ class TestUtils(TestBase): def test_type_registrar_for_obj(self): test_annotation = TypeRegistrar("Test annotation") - @test_annotation(str) + @test_annotation(KustoType.STRING) def str_annotated(s: str) -> str: return "response to " + s @@ -44,7 +44,7 @@ class TestUtils(TestBase): def test_type_registrar_for_type_not_found(self): test_annotation = TypeRegistrar("Test annotation") - @test_annotation(str) + @test_annotation(KustoType.STRING) def str_annotated(s: str) -> str: return "response to " + s @@ -56,7 +56,7 @@ class TestUtils(TestBase): def test_type_registrar_for_obj_not_found(self): test_annotation = TypeRegistrar("Test annotation") - @test_annotation(str) + @test_annotation(KustoType.STRING) def str_annotated(s: str) -> str: return "response to " + s @@ -68,7 +68,7 @@ class TestUtils(TestBase): def test_type_registrar_collision(self): test_annotation = TypeRegistrar("Test annotation") - @test_annotation(str) + @test_annotation(KustoType.STRING) def str_annotated_1(s: str) -> str: return "response to " + s @@ -76,6 +76,6 @@ class TestUtils(TestBase): return "response to " + s self.assertRaises( - TypeError("Test annotation: type already registered: str"), - lambda: test_annotation(str)(str_annotated_2) + TypeError("Test annotation: type already registered: string"), + lambda: test_annotation(KustoType.STRING)(str_annotated_2) )
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_added_files", "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 3, "issue_text_score": 3, "test_score": 0 }, "num_modified_files": 9 }
0.0
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "pytest" ], "pre_install": null, "python": "3.7", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 attrs @ file:///croot/attrs_1668696182826/work azure-kusto-data==0.0.36 certifi @ file:///croot/certifi_1671487769961/work/certifi cffi==1.15.1 charset-normalizer==3.4.1 cryptography==44.0.2 flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core idna==3.10 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1648562407465/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work packaging @ file:///croot/packaging_1671697413597/work pluggy @ file:///tmp/build/80754af9/pluggy_1648042572264/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pycparser==2.21 PyJWT==2.8.0 -e git+https://github.com/Azure/pykusto.git@9463e103d72bec751023c922cc5827c93471eb3d#egg=pykusto pytest==7.1.2 python-dateutil==2.9.0.post0 requests==2.31.0 six==1.17.0 tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work typing_extensions @ file:///croot/typing_extensions_1669924550328/work urllib3==2.0.7 zipp @ file:///croot/zipp_1672387121353/work
name: pykusto channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=22.1.0=py37h06a4308_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2022.12.7=py37h06a4308_0 - flit-core=3.6.0=pyhd3eb1b0_0 - importlib-metadata=4.11.3=py37h06a4308_0 - importlib_metadata=4.11.3=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=22.0=py37h06a4308_0 - pip=22.3.1=py37h06a4308_0 - pluggy=1.0.0=py37h06a4308_1 - py=1.11.0=pyhd3eb1b0_0 - pytest=7.1.2=py37h06a4308_0 - python=3.7.16=h7a1cb2a_0 - readline=8.2=h5eee18b_0 - setuptools=65.6.3=py37h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tomli=2.0.1=py37h06a4308_0 - typing_extensions=4.4.0=py37h06a4308_0 - wheel=0.38.4=py37h06a4308_0 - xz=5.6.4=h5eee18b_1 - zipp=3.11.0=py37h06a4308_0 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - azure-kusto-data==0.0.36 - cffi==1.15.1 - charset-normalizer==3.4.1 - cryptography==44.0.2 - idna==3.10 - pycparser==2.21 - pyjwt==2.8.0 - python-dateutil==2.9.0.post0 - requests==2.31.0 - six==1.17.0 - urllib3==2.0.7 prefix: /opt/conda/envs/pykusto
[ "test/test_functions.py::TestFunction::test_acos", "test/test_functions.py::TestFunction::test_ago", "test/test_functions.py::TestFunction::test_any", "test/test_functions.py::TestFunction::test_arg_max", "test/test_functions.py::TestFunction::test_arg_min", "test/test_functions.py::TestFunction::test_array_length", "test/test_functions.py::TestFunction::test_avg", "test/test_functions.py::TestFunction::test_avgif", "test/test_functions.py::TestFunction::test_bag_keys", "test/test_functions.py::TestFunction::test_bin", "test/test_functions.py::TestFunction::test_bin_at", "test/test_functions.py::TestFunction::test_bin_auto", "test/test_functions.py::TestFunction::test_case", "test/test_functions.py::TestFunction::test_ceiling", "test/test_functions.py::TestFunction::test_cos", "test/test_functions.py::TestFunction::test_count", "test/test_functions.py::TestFunction::test_countif", "test/test_functions.py::TestFunction::test_dcount", "test/test_functions.py::TestFunction::test_endofday", "test/test_functions.py::TestFunction::test_endofmonth", "test/test_functions.py::TestFunction::test_endofweek", "test/test_functions.py::TestFunction::test_exp", "test/test_functions.py::TestFunction::test_exp10", "test/test_functions.py::TestFunction::test_exp2", "test/test_functions.py::TestFunction::test_floor", "test/test_functions.py::TestFunction::test_format_datetime", "test/test_functions.py::TestFunction::test_format_timespan", "test/test_functions.py::TestFunction::test_getmonth", "test/test_functions.py::TestFunction::test_gettype", "test/test_functions.py::TestFunction::test_getyear", "test/test_functions.py::TestFunction::test_hash", "test/test_functions.py::TestFunction::test_hash_sha256", "test/test_functions.py::TestFunction::test_hourofday", "test/test_functions.py::TestFunction::test_iff", "test/test_functions.py::TestFunction::test_iff_different_types", "test/test_functions.py::TestFunction::test_iff_expression_return_type", "test/test_functions.py::TestFunction::test_iff_related_types", "test/test_functions.py::TestFunction::test_iif", "test/test_functions.py::TestFunction::test_isempty", "test/test_functions.py::TestFunction::test_isfinite", "test/test_functions.py::TestFunction::test_isinf", "test/test_functions.py::TestFunction::test_isnan", "test/test_functions.py::TestFunction::test_isnotempty", "test/test_functions.py::TestFunction::test_isnotnull", "test/test_functions.py::TestFunction::test_isnull", "test/test_functions.py::TestFunction::test_isutf8", "test/test_functions.py::TestFunction::test_log", "test/test_functions.py::TestFunction::test_log10", "test/test_functions.py::TestFunction::test_log2", "test/test_functions.py::TestFunction::test_loggamma", "test/test_functions.py::TestFunction::test_make_bag", "test/test_functions.py::TestFunction::test_make_datetime", "test/test_functions.py::TestFunction::test_make_list", "test/test_functions.py::TestFunction::test_make_set", "test/test_functions.py::TestFunction::test_max", "test/test_functions.py::TestFunction::test_min", "test/test_functions.py::TestFunction::test_nesting", "test/test_functions.py::TestFunction::test_now", "test/test_functions.py::TestFunction::test_parse_json_array", "test/test_functions.py::TestFunction::test_parse_json_brackets", "test/test_functions.py::TestFunction::test_parse_json_dot", "test/test_functions.py::TestFunction::test_parse_json_nesting", "test/test_functions.py::TestFunction::test_parse_json_number_expression", "test/test_functions.py::TestFunction::test_parse_json_to_string", "test/test_functions.py::TestFunction::test_percentile", "test/test_functions.py::TestFunction::test_percentiles", "test/test_functions.py::TestFunction::test_pow", "test/test_functions.py::TestFunction::test_round", "test/test_functions.py::TestFunction::test_sign", "test/test_functions.py::TestFunction::test_split", "test/test_functions.py::TestFunction::test_sqrt", "test/test_functions.py::TestFunction::test_startofday", "test/test_functions.py::TestFunction::test_startofmonth", "test/test_functions.py::TestFunction::test_startofweek", "test/test_functions.py::TestFunction::test_startofyear", "test/test_functions.py::TestFunction::test_stdev", "test/test_functions.py::TestFunction::test_stdevif", "test/test_functions.py::TestFunction::test_stdevp", "test/test_functions.py::TestFunction::test_strcat", "test/test_functions.py::TestFunction::test_strcat_array", "test/test_functions.py::TestFunction::test_strcat_delim", "test/test_functions.py::TestFunction::test_strcmp", "test/test_functions.py::TestFunction::test_string_size", "test/test_functions.py::TestFunction::test_strlen", "test/test_functions.py::TestFunction::test_strrep", "test/test_functions.py::TestFunction::test_substring", "test/test_functions.py::TestFunction::test_sum", "test/test_functions.py::TestFunction::test_sumif", "test/test_functions.py::TestFunction::test_tobool", "test/test_functions.py::TestFunction::test_toboolean", "test/test_functions.py::TestFunction::test_todecimal", "test/test_functions.py::TestFunction::test_todouble", "test/test_functions.py::TestFunction::test_tohex", "test/test_functions.py::TestFunction::test_toint", "test/test_functions.py::TestFunction::test_tolong", "test/test_functions.py::TestFunction::test_tolower", "test/test_functions.py::TestFunction::test_toreal", "test/test_functions.py::TestFunction::test_toupper", "test/test_functions.py::TestFunction::test_variance", "test/test_functions.py::TestFunction::test_varianceif", "test/test_functions.py::TestFunction::test_variancep", "test/test_query.py::TestQuery::test_add_queries", "test/test_query.py::TestQuery::test_add_queries_with_table", "test/test_query.py::TestQuery::test_bag_unpack", "test/test_query.py::TestQuery::test_bag_unpack_with_prefix", "test/test_query.py::TestQuery::test_count", "test/test_query.py::TestQuery::test_custom", "test/test_query.py::TestQuery::test_distinct", "test/test_query.py::TestQuery::test_distinct_all", "test/test_query.py::TestQuery::test_evaluate", "test/test_query.py::TestQuery::test_evaluate_with_distribution", "test/test_query.py::TestQuery::test_extend", "test/test_query.py::TestQuery::test_extend_assign_non_array_to_multiple_columns", "test/test_query.py::TestQuery::test_extend_assign_to_multiple_columns", "test/test_query.py::TestQuery::test_extend_build_dynamic", "test/test_query.py::TestQuery::test_extend_generate_column_name", "test/test_query.py::TestQuery::test_join_no_joined_table", "test/test_query.py::TestQuery::test_join_no_on", "test/test_query.py::TestQuery::test_join_with_table", "test/test_query.py::TestQuery::test_join_with_table_and_query", "test/test_query.py::TestQuery::test_limit", "test/test_query.py::TestQuery::test_mv_expand", "test/test_query.py::TestQuery::test_mv_expand_args", "test/test_query.py::TestQuery::test_mv_expand_no_args", "test/test_query.py::TestQuery::test_mv_expand_to_type", "test/test_query.py::TestQuery::test_no_params_for_sort", "test/test_query.py::TestQuery::test_order", "test/test_query.py::TestQuery::test_order_expression_in_arg", "test/test_query.py::TestQuery::test_project", "test/test_query.py::TestQuery::test_project_assign_to_multiple_columns", "test/test_query.py::TestQuery::test_project_away", "test/test_query.py::TestQuery::test_project_away_wildcard", "test/test_query.py::TestQuery::test_project_rename", "test/test_query.py::TestQuery::test_project_unspecified_column", "test/test_query.py::TestQuery::test_project_with_expression", "test/test_query.py::TestQuery::test_sample", "test/test_query.py::TestQuery::test_sanity", "test/test_query.py::TestQuery::test_sort", "test/test_query.py::TestQuery::test_sort_multiple_cols", "test/test_query.py::TestQuery::test_summarize", "test/test_query.py::TestQuery::test_summarize_by", "test/test_query.py::TestQuery::test_summarize_by_expression", "test/test_query.py::TestQuery::test_take", "test/test_query.py::TestQuery::test_top", "test/test_query.py::TestQuery::test_udf", "test/test_query.py::TestQuery::test_udf_no_extend", "test/test_query.py::TestQuery::test_where", "test/test_table.py::TestTable::test_column_retrieve", "test/test_table.py::TestTable::test_column_retrieve_brackets", "test/test_table.py::TestTable::test_column_retrieve_slow", "test/test_table.py::TestTable::test_cross_cluster_join", "test/test_table.py::TestTable::test_cross_cluster_join_with_union", "test/test_table.py::TestTable::test_cross_cluster_join_with_union_2", "test/test_table.py::TestTable::test_database_retrieve", "test/test_table.py::TestTable::test_default_authentication", "test/test_table.py::TestTable::test_execute_already_bound", "test/test_table.py::TestTable::test_execute_no_table", "test/test_table.py::TestTable::test_single_table", "test/test_table.py::TestTable::test_single_table_on_execute", "test/test_table.py::TestTable::test_table_retrieve", "test/test_table.py::TestTable::test_table_retrieve_error", "test/test_table.py::TestTable::test_two_tables_retrieve", "test/test_table.py::TestTable::test_union_table", "test/test_table.py::TestTable::test_union_table_with_wildcard", "test/test_utils.py::TestUtils::test_dynamic_to_kql", "test/test_utils.py::TestUtils::test_type_registrar_collision", "test/test_utils.py::TestUtils::test_type_registrar_for_obj", "test/test_utils.py::TestUtils::test_type_registrar_for_obj_not_found", "test/test_utils.py::TestUtils::test_type_registrar_for_type", "test/test_utils.py::TestUtils::test_type_registrar_for_type_not_found" ]
[]
[]
[]
MIT License
null
Azure__pykusto-70
0930c481041f5165e870094d2716d9ebeb671c41
2020-04-26 12:57:58
68121cdd79cc9c1d6b8f71e5e80df566ac6842c7
diff --git a/pykusto/functions.py b/pykusto/functions.py index bae1253..bbf711b 100644 --- a/pykusto/functions.py +++ b/pykusto/functions.py @@ -1,4 +1,5 @@ import json +from itertools import chain from typing import Union from pykusto.expressions import AnyTypeColumn, NumberType, NumberExpression, TimespanType, \ @@ -32,11 +33,6 @@ class Functions: """ return TimespanExpression.ago(expr) - # def array_concat(): return - # - # - # def array_iif(): return - @staticmethod def array_length(expr: ArrayType) -> NumberExpression: """ @@ -710,14 +706,102 @@ class Functions: # def series_subtract(self): return # # - # def set_difference(self): return - # - # # def set_intersect(self): return # # # def set_union(self): return + @staticmethod + def set_has_element(array: ArrayType, value: ExpressionType) -> BooleanExpression: + """ + https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/sethaselementfunction + """ + return BooleanExpression(KQL(f'set_has_element({to_kql(array)}, {to_kql(value)})')) + + @staticmethod + def set_difference(array1: ArrayType, array2: ArrayType, *more_arrays: ArrayType) -> ArrayExpression: + """ + https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/setdifferencefunction + """ + return ArrayExpression(KQL(f'set_difference({to_kql(array1)}, {", ".join(to_kql(a) for a in chain([array2], more_arrays))})')) + + @staticmethod + def set_intersect(array1: ArrayType, array2: ArrayType, *more_arrays: ArrayType) -> ArrayExpression: + """ + https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/setintersectfunction + """ + return ArrayExpression(KQL(f'set_intersect({to_kql(array1)}, {", ".join(to_kql(a) for a in chain([array2], more_arrays))})')) + + @staticmethod + def set_union(array1: ArrayType, array2: ArrayType, *more_arrays: ArrayType) -> ArrayExpression: + """ + https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/setunionfunction + """ + return ArrayExpression(KQL(f'set_union({to_kql(array1)}, {", ".join(to_kql(a) for a in chain([array2], more_arrays))})')) + + @staticmethod + def array_concat(array1: ArrayType, array2: ArrayType, *more_arrays: ArrayType) -> ArrayExpression: + """ + https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/arrayconcatfunction + """ + return ArrayExpression(KQL(f'array_concat({to_kql(array1)}, {", ".join(to_kql(a) for a in chain([array2], more_arrays))})')) + + @staticmethod + def array_iif(condition_array: ArrayType, if_true: ArrayType, if_false: ArrayType) -> ArrayExpression: + """ + https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/arrayifffunction + """ + return ArrayExpression(KQL(f'array_iif({to_kql(condition_array)}, {to_kql(if_true)}, {to_kql(if_false)})')) + + @staticmethod + def array_index_of(array: ArrayType, value: ExpressionType) -> NumberExpression: + """ + https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/arrayindexoffunction + """ + return NumberExpression(KQL(f'array_index_of({to_kql(array)}, {to_kql(value)})')) + + @staticmethod + def array_rotate_left(array: ArrayType, rotate_count: NumberType) -> ArrayExpression: + """ + https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/array_rotate_leftfunction + """ + return ArrayExpression(KQL(f'array_rotate_left({to_kql(array)}, {to_kql(rotate_count)})')) + + @staticmethod + def array_rotate_right(array: ArrayType, rotate_count: NumberType) -> ArrayExpression: + """ + https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/array_rotate_rightfunction + """ + return ArrayExpression(KQL(f'array_rotate_right({to_kql(array)}, {to_kql(rotate_count)})')) + + @staticmethod + def array_shift_left(array: ArrayType, shift_count: NumberType, fill_value: ExpressionType = None) -> ArrayExpression: + """ + https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/array_shift_leftfunction + """ + return ArrayExpression(KQL(f'array_shift_left({to_kql(array)}, {to_kql(shift_count)}{"" if fill_value is None else ", " + to_kql(fill_value)})')) + + @staticmethod + def array_shift_right(array: ArrayType, shift_count: NumberType, fill_value: ExpressionType = None) -> ArrayExpression: + """ + https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/array_shift_rightfunction + """ + return ArrayExpression(KQL(f'array_shift_right({to_kql(array)}, {to_kql(shift_count)}{"" if fill_value is None else ", " + to_kql(fill_value)})')) + + @staticmethod + def array_slice(array: ArrayType, start: NumberType, end: NumberType) -> ArrayExpression: + """ + https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/arrayslicefunction + """ + return ArrayExpression(KQL(f'array_slice({to_kql(array)}, {to_kql(start)}, {to_kql(end)})')) + + @staticmethod + def array_split(array: ArrayType, indices: Union[NumberType, ArrayType]) -> ArrayExpression: + """ + https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/arraysplitfunction + """ + return ArrayExpression(KQL(f'array_split({to_kql(array)}, {to_kql(indices)})')) + @staticmethod def sign(expr: NumberType) -> NumberExpression: """
add set_difference function and while at it, more array operations...
Azure/pykusto
diff --git a/test/test_functions.py b/test/test_functions.py index 2d53aa8..8b3edaa 100644 --- a/test/test_functions.py +++ b/test/test_functions.py @@ -827,3 +827,81 @@ class TestFunction(TestBase): ' | extend foo = pack_array(numField, stringField)', Query().extend(foo=f.pack_array(t.numField, t.stringField)).render() ) + + def test_set_has_element(self): + self.assertEqual( + ' | extend foo = set_has_element(arrayField, numField)', + Query().extend(foo=f.set_has_element(t.arrayField, t.numField)).render() + ) + + def test_set_difference(self): + self.assertEqual( + ' | extend foo = set_difference(arrayField, arrayField2)', + Query().extend(foo=f.set_difference(t.arrayField, t.arrayField2)).render() + ) + + def test_set_intersect(self): + self.assertEqual( + ' | extend foo = set_intersect(arrayField, arrayField2)', + Query().extend(foo=f.set_intersect(t.arrayField, t.arrayField2)).render() + ) + + def test_set_union(self): + self.assertEqual( + ' | extend foo = set_union(arrayField, arrayField2)', + Query().extend(foo=f.set_union(t.arrayField, t.arrayField2)).render() + ) + + def test_array_concat(self): + self.assertEqual( + ' | extend foo = array_concat(arrayField, arrayField2)', + Query().extend(foo=f.array_concat(t.arrayField, t.arrayField2)).render() + ) + + def test_array_iif(self): + self.assertEqual( + ' | extend foo = array_iif(arrayField, arrayField2, arrayField3)', + Query().extend(foo=f.array_iif(t.arrayField, t.arrayField2, t.arrayField3)).render() + ) + + def test_array_index_of(self): + self.assertEqual( + ' | extend foo = array_index_of(arrayField, numField)', + Query().extend(foo=f.array_index_of(t.arrayField, t.numField)).render() + ) + + def test_array_rotate_left(self): + self.assertEqual( + ' | extend foo = array_rotate_left(arrayField, numField)', + Query().extend(foo=f.array_rotate_left(t.arrayField, t.numField)).render() + ) + + def test_array_rotate_right(self): + self.assertEqual( + ' | extend foo = array_rotate_right(arrayField, numField)', + Query().extend(foo=f.array_rotate_right(t.arrayField, t.numField)).render() + ) + + def test_array_shift_left(self): + self.assertEqual( + ' | extend foo = array_shift_left(arrayField, numField)', + Query().extend(foo=f.array_shift_left(t.arrayField, t.numField)).render() + ) + + def test_array_shift_right(self): + self.assertEqual( + ' | extend foo = array_shift_right(arrayField, numField, numField2)', + Query().extend(foo=f.array_shift_right(t.arrayField, t.numField, t.numField2)).render() + ) + + def test_array_slice(self): + self.assertEqual( + ' | extend foo = array_slice(arrayField, numField, numField2)', + Query().extend(foo=f.array_slice(t.arrayField, t.numField, t.numField2)).render() + ) + + def test_array_split(self): + self.assertEqual( + ' | extend foo = array_split(arrayField, numField)', + Query().extend(foo=f.array_split(t.arrayField, t.numField)).render() + )
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_short_problem_statement" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 3, "issue_text_score": 3, "test_score": 3 }, "num_modified_files": 1 }
0.0
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "pytest" ], "pre_install": null, "python": "3.7", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 attrs @ file:///croot/attrs_1668696182826/work azure-core==1.30.1 azure-kusto-data==0.0.44 certifi @ file:///croot/certifi_1671487769961/work/certifi cffi==1.15.1 charset-normalizer==3.4.1 cryptography==44.0.2 flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core idna==3.10 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1648562407465/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work isodate==0.7.2 msrest==0.7.1 msrestazure==0.6.4.post1 numpy==1.21.6 oauthlib==3.2.2 packaging @ file:///croot/packaging_1671697413597/work pandas==1.0.3 pluggy @ file:///tmp/build/80754af9/pluggy_1648042572264/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pycparser==2.21 PyJWT==2.8.0 -e git+https://github.com/Azure/pykusto.git@0930c481041f5165e870094d2716d9ebeb671c41#egg=pykusto pytest==7.1.2 python-dateutil==2.9.0.post0 pytz==2025.2 requests==2.31.0 requests-oauthlib==2.0.0 six==1.17.0 tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work typing_extensions==4.7.1 urllib3==2.0.7 zipp @ file:///croot/zipp_1672387121353/work
name: pykusto channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=22.1.0=py37h06a4308_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2022.12.7=py37h06a4308_0 - flit-core=3.6.0=pyhd3eb1b0_0 - importlib-metadata=4.11.3=py37h06a4308_0 - importlib_metadata=4.11.3=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=22.0=py37h06a4308_0 - pip=22.3.1=py37h06a4308_0 - pluggy=1.0.0=py37h06a4308_1 - py=1.11.0=pyhd3eb1b0_0 - pytest=7.1.2=py37h06a4308_0 - python=3.7.16=h7a1cb2a_0 - readline=8.2=h5eee18b_0 - setuptools=65.6.3=py37h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tomli=2.0.1=py37h06a4308_0 - wheel=0.38.4=py37h06a4308_0 - xz=5.6.4=h5eee18b_1 - zipp=3.11.0=py37h06a4308_0 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - azure-core==1.30.1 - azure-kusto-data==0.0.44 - cffi==1.15.1 - charset-normalizer==3.4.1 - cryptography==44.0.2 - idna==3.10 - isodate==0.7.2 - msrest==0.7.1 - msrestazure==0.6.4.post1 - numpy==1.21.6 - oauthlib==3.2.2 - pandas==1.0.3 - pycparser==2.21 - pyjwt==2.8.0 - python-dateutil==2.9.0.post0 - pytz==2025.2 - requests==2.31.0 - requests-oauthlib==2.0.0 - six==1.17.0 - typing-extensions==4.7.1 - urllib3==2.0.7 prefix: /opt/conda/envs/pykusto
[ "test/test_functions.py::TestFunction::test_array_concat", "test/test_functions.py::TestFunction::test_array_iif", "test/test_functions.py::TestFunction::test_array_index_of", "test/test_functions.py::TestFunction::test_array_rotate_left", "test/test_functions.py::TestFunction::test_array_rotate_right", "test/test_functions.py::TestFunction::test_array_shift_left", "test/test_functions.py::TestFunction::test_array_shift_right", "test/test_functions.py::TestFunction::test_array_slice", "test/test_functions.py::TestFunction::test_array_split", "test/test_functions.py::TestFunction::test_set_difference", "test/test_functions.py::TestFunction::test_set_has_element", "test/test_functions.py::TestFunction::test_set_intersect", "test/test_functions.py::TestFunction::test_set_union" ]
[]
[ "test/test_functions.py::TestFunction::test_acos", "test/test_functions.py::TestFunction::test_aggregation_assign_to", "test/test_functions.py::TestFunction::test_aggregation_assign_to_multiple", "test/test_functions.py::TestFunction::test_aggregation_by_assign_to", "test/test_functions.py::TestFunction::test_ago", "test/test_functions.py::TestFunction::test_any", "test/test_functions.py::TestFunction::test_arg_max", "test/test_functions.py::TestFunction::test_arg_min", "test/test_functions.py::TestFunction::test_array_length", "test/test_functions.py::TestFunction::test_avg", "test/test_functions.py::TestFunction::test_avgif", "test/test_functions.py::TestFunction::test_bag_keys", "test/test_functions.py::TestFunction::test_bin", "test/test_functions.py::TestFunction::test_bin_at", "test/test_functions.py::TestFunction::test_bin_auto", "test/test_functions.py::TestFunction::test_case", "test/test_functions.py::TestFunction::test_ceiling", "test/test_functions.py::TestFunction::test_cos", "test/test_functions.py::TestFunction::test_count", "test/test_functions.py::TestFunction::test_countif", "test/test_functions.py::TestFunction::test_dcount", "test/test_functions.py::TestFunction::test_dcountif", "test/test_functions.py::TestFunction::test_endofday", "test/test_functions.py::TestFunction::test_endofmonth", "test/test_functions.py::TestFunction::test_endofweek", "test/test_functions.py::TestFunction::test_endofyear", "test/test_functions.py::TestFunction::test_exp", "test/test_functions.py::TestFunction::test_exp10", "test/test_functions.py::TestFunction::test_exp2", "test/test_functions.py::TestFunction::test_floor", "test/test_functions.py::TestFunction::test_format_datetime", "test/test_functions.py::TestFunction::test_format_timespan", "test/test_functions.py::TestFunction::test_getmonth", "test/test_functions.py::TestFunction::test_gettype", "test/test_functions.py::TestFunction::test_getyear", "test/test_functions.py::TestFunction::test_hash", "test/test_functions.py::TestFunction::test_hash_sha256", "test/test_functions.py::TestFunction::test_hourofday", "test/test_functions.py::TestFunction::test_iff", "test/test_functions.py::TestFunction::test_iff_ambiguous_type", "test/test_functions.py::TestFunction::test_iff_different_types", "test/test_functions.py::TestFunction::test_iff_expression_return_type", "test/test_functions.py::TestFunction::test_iff_related_types", "test/test_functions.py::TestFunction::test_iif", "test/test_functions.py::TestFunction::test_isempty", "test/test_functions.py::TestFunction::test_isfinite", "test/test_functions.py::TestFunction::test_isinf", "test/test_functions.py::TestFunction::test_isnan", "test/test_functions.py::TestFunction::test_isnotempty", "test/test_functions.py::TestFunction::test_isnotnull", "test/test_functions.py::TestFunction::test_isnull", "test/test_functions.py::TestFunction::test_isutf8", "test/test_functions.py::TestFunction::test_log", "test/test_functions.py::TestFunction::test_log10", "test/test_functions.py::TestFunction::test_log2", "test/test_functions.py::TestFunction::test_loggamma", "test/test_functions.py::TestFunction::test_make_bag", "test/test_functions.py::TestFunction::test_make_datetime", "test/test_functions.py::TestFunction::test_make_list", "test/test_functions.py::TestFunction::test_make_set", "test/test_functions.py::TestFunction::test_max", "test/test_functions.py::TestFunction::test_max_if", "test/test_functions.py::TestFunction::test_min", "test/test_functions.py::TestFunction::test_min_if", "test/test_functions.py::TestFunction::test_nesting", "test/test_functions.py::TestFunction::test_now", "test/test_functions.py::TestFunction::test_pack", "test/test_functions.py::TestFunction::test_pack_array", "test/test_functions.py::TestFunction::test_parse_json_array", "test/test_functions.py::TestFunction::test_parse_json_brackets", "test/test_functions.py::TestFunction::test_parse_json_dot", "test/test_functions.py::TestFunction::test_parse_json_nesting", "test/test_functions.py::TestFunction::test_parse_json_number_expression", "test/test_functions.py::TestFunction::test_parse_json_to_string", "test/test_functions.py::TestFunction::test_percentile", "test/test_functions.py::TestFunction::test_percentiles", "test/test_functions.py::TestFunction::test_pow", "test/test_functions.py::TestFunction::test_round", "test/test_functions.py::TestFunction::test_sign", "test/test_functions.py::TestFunction::test_split", "test/test_functions.py::TestFunction::test_sqrt", "test/test_functions.py::TestFunction::test_startofday", "test/test_functions.py::TestFunction::test_startofmonth", "test/test_functions.py::TestFunction::test_startofweek", "test/test_functions.py::TestFunction::test_startofyear", "test/test_functions.py::TestFunction::test_stdev", "test/test_functions.py::TestFunction::test_stdevif", "test/test_functions.py::TestFunction::test_stdevp", "test/test_functions.py::TestFunction::test_strcat", "test/test_functions.py::TestFunction::test_strcat_array", "test/test_functions.py::TestFunction::test_strcat_delim", "test/test_functions.py::TestFunction::test_strcat_one_argument", "test/test_functions.py::TestFunction::test_strcmp", "test/test_functions.py::TestFunction::test_string_size", "test/test_functions.py::TestFunction::test_strlen", "test/test_functions.py::TestFunction::test_strrep", "test/test_functions.py::TestFunction::test_substring", "test/test_functions.py::TestFunction::test_sum", "test/test_functions.py::TestFunction::test_sumif", "test/test_functions.py::TestFunction::test_tobool", "test/test_functions.py::TestFunction::test_todatetime", "test/test_functions.py::TestFunction::test_todecimal", "test/test_functions.py::TestFunction::test_todouble", "test/test_functions.py::TestFunction::test_tohex", "test/test_functions.py::TestFunction::test_toint", "test/test_functions.py::TestFunction::test_tolong", "test/test_functions.py::TestFunction::test_tolower", "test/test_functions.py::TestFunction::test_toreal", "test/test_functions.py::TestFunction::test_toupper", "test/test_functions.py::TestFunction::test_variance", "test/test_functions.py::TestFunction::test_varianceif", "test/test_functions.py::TestFunction::test_variancep" ]
[]
MIT License
null
Azure__pykusto-71
0930c481041f5165e870094d2716d9ebeb671c41
2020-04-26 13:12:14
68121cdd79cc9c1d6b8f71e5e80df566ac6842c7
diff --git a/pykusto/item_fetcher.py b/pykusto/item_fetcher.py index 406f8eb..6b3620a 100644 --- a/pykusto/item_fetcher.py +++ b/pykusto/item_fetcher.py @@ -92,7 +92,7 @@ class ItemFetcher(metaclass=ABCMeta): return fallback() def __dir__(self) -> Iterable[str]: - return sorted(chain(super().__dir__(), tuple() if self.__items is None else self.__items.keys())) + return sorted(chain(super().__dir__(), tuple() if self.__items is None else filter(lambda name: '.' not in name, self.__items.keys()))) def refresh(self) -> None: """
Do not autocomplete to columns which contain a dot in their name
Azure/pykusto
diff --git a/test/test_client_fetch.py b/test/test_client_fetch.py index 76f9d2a..1b45a23 100644 --- a/test/test_client_fetch.py +++ b/test/test_client_fetch.py @@ -22,12 +22,12 @@ class TestClientFetch(TestBase): mock_kusto_client.recorded_queries, ) # Dot notation - self.assertIsInstance(table.foo, StringColumn) - self.assertIsInstance(table.bar, NumberColumn) + self.assertEqual(type(table.foo), StringColumn) + self.assertEqual(type(table.bar), NumberColumn) # Bracket notation - self.assertIsInstance(table['foo'], StringColumn) - self.assertIsInstance(table['bar'], NumberColumn) - self.assertIsInstance(table['baz'], AnyTypeColumn) + self.assertEqual(type(table['foo']), StringColumn) + self.assertEqual(type(table['bar']), NumberColumn) + self.assertEqual(type(table['baz']), AnyTypeColumn) def test_column_fetch_slow(self): mock_response_future = Future() @@ -42,9 +42,9 @@ class TestClientFetch(TestBase): mock_kusto_client = MockKustoClient(upon_execute=upon_execute, record_metadata=True) table = PyKustoClient(mock_kusto_client, fetch_by_default=False)['test_db']['test_table'] table.refresh() - self.assertIsInstance(table['foo'], AnyTypeColumn) - self.assertIsInstance(table['bar'], AnyTypeColumn) - self.assertIsInstance(table['baz'], AnyTypeColumn) + self.assertEqual(type(table['foo']), AnyTypeColumn) + self.assertEqual(type(table['bar']), AnyTypeColumn) + self.assertEqual(type(table['baz']), AnyTypeColumn) # Make sure above lines were called while the fetch query was still waiting assert not mock_response_future.executed finally: @@ -109,11 +109,11 @@ class TestClientFetch(TestBase): ) table = db.test_table # Table columns - self.assertIsInstance(table.foo, StringColumn) - self.assertIsInstance(table.bar, NumberColumn) - self.assertIsInstance(table['baz'], AnyTypeColumn) + self.assertEqual(type(table.foo), StringColumn) + self.assertEqual(type(table.bar), NumberColumn) + self.assertEqual(type(table['baz']), AnyTypeColumn) # Bracket notation - self.assertIsInstance(db['other_table']['foo'], AnyTypeColumn) + self.assertEqual(type(db['other_table']['foo']), AnyTypeColumn) # Dot notation error self.assertRaises( AttributeError("PyKustoClient(test_cluster.kusto.windows.net).Database(test_db) has no attribute 'test_table_1'"), @@ -135,20 +135,20 @@ class TestClientFetch(TestBase): mock_kusto_client.recorded_queries, ) # Table columns - self.assertIsInstance(db.test_table_1.foo, StringColumn) - self.assertIsInstance(db.test_table_1.bar, NumberColumn) - self.assertIsInstance(db.test_table_2['baz'], BooleanColumn) - self.assertIsInstance(db['other_table']['foo'], AnyTypeColumn) + self.assertEqual(type(db.test_table_1.foo), StringColumn) + self.assertEqual(type(db.test_table_1.bar), NumberColumn) + self.assertEqual(type(db.test_table_2['baz']), BooleanColumn) + self.assertEqual(type(db['other_table']['foo']), AnyTypeColumn) # Union table = db.get_table('test_table_1', 'test_table_2') - self.assertIsInstance(table.foo, StringColumn) - self.assertIsInstance(table.bar, NumberColumn) - self.assertIsInstance(table.baz, BooleanColumn) + self.assertEqual(type(table.foo), StringColumn) + self.assertEqual(type(table.bar), NumberColumn) + self.assertEqual(type(table.baz), BooleanColumn) # Wildcard table = db.get_table('test_table_*') - self.assertIsInstance(table.foo, StringColumn) - self.assertIsInstance(table.bar, NumberColumn) - self.assertIsInstance(table.baz, BooleanColumn) + self.assertEqual(type(table.foo), StringColumn) + self.assertEqual(type(table.bar), NumberColumn) + self.assertEqual(type(table.baz), BooleanColumn) def test_union_column_name_conflict(self): mock_kusto_client = MockKustoClient( @@ -174,9 +174,9 @@ class TestClientFetch(TestBase): ], mock_kusto_client.recorded_queries, ) - self.assertIsInstance(table.foo_string, StringColumn) - self.assertIsInstance(table.bar, NumberColumn) - self.assertIsInstance(table.foo_bool, BooleanColumn) + self.assertEqual(type(table.foo_string), StringColumn) + self.assertEqual(type(table.bar), NumberColumn) + self.assertEqual(type(table.foo_bool), BooleanColumn) def test_union_wildcard_one_table(self): mock_kusto_client = MockKustoClient( @@ -193,9 +193,9 @@ class TestClientFetch(TestBase): mock_kusto_client.recorded_queries, ) table = db.get_table('test_table_*') - self.assertIsInstance(table.foo, StringColumn) - self.assertIsInstance(table.bar, NumberColumn) - self.assertIsInstance(table['baz'], AnyTypeColumn) + self.assertEqual(type(table.foo), StringColumn) + self.assertEqual(type(table.bar), NumberColumn) + self.assertEqual(type(table['baz']), AnyTypeColumn) def test_database_fetch(self): mock_kusto_client = MockKustoClient( @@ -210,13 +210,13 @@ class TestClientFetch(TestBase): ) # Table columns table = client.test_db.test_table - self.assertIsInstance(table.foo, StringColumn) - self.assertIsInstance(table.bar, NumberColumn) - self.assertIsInstance(table['baz'], AnyTypeColumn) - self.assertIsInstance(client.test_db['other_table']['foo'], AnyTypeColumn) + self.assertEqual(type(table.foo), StringColumn) + self.assertEqual(type(table.bar), NumberColumn) + self.assertEqual(type(table['baz']), AnyTypeColumn) + self.assertEqual(type(client.test_db['other_table']['foo']), AnyTypeColumn) # Various utility methods db = client.get_database('test_db') - self.assertIsInstance(db, Database) + self.assertEqual(type(db), Database) self.assertEqual('test_db', db.get_name()) self.assertEqual(('test_db',), tuple(client.get_databases_names())) self.assertEqual(('test_table', 'other_table'), tuple(client.test_db.get_table_names())) @@ -224,6 +224,22 @@ class TestClientFetch(TestBase): self.assertTrue({'foo', 'bar'} < set(dir(client.test_db.test_table))) self.assertEqual('PyKustoClient(test_cluster.kusto.windows.net).Database(test_db).Table(test_table)', repr(client.test_db.test_table)) + def test_autocomplete_with_dot(self): + mock_kusto_client = MockKustoClient( + databases_response=mock_databases_response([('test_db', [('test_table', [('foo', KustoType.STRING), ('bar.baz', KustoType.INT)])])]), + record_metadata=True, + ) + client = PyKustoClient(mock_kusto_client) + client.wait_for_items() + # Table columns + table = client.test_db.test_table + self.assertEqual(type(table.foo), StringColumn) + self.assertEqual(type(table.bar), AnyTypeColumn) + self.assertEqual(type(table['bar.baz']), NumberColumn) + autocomplete_list = set(dir(client.test_db.test_table)) + self.assertIn('foo', autocomplete_list) + self.assertNotIn('bar.baz', autocomplete_list) + def test_empty_database(self): mock_kusto_client = MockKustoClient( databases_response=mock_databases_response([ @@ -238,7 +254,7 @@ class TestClientFetch(TestBase): [RecordedQuery('', '.show databases schema | project DatabaseName, TableName, ColumnName, ColumnType | limit 100000')], mock_kusto_client.recorded_queries, ) - self.assertIsInstance(client.test_db.test_table.foo, StringColumn) + self.assertEqual(type(client.test_db.test_table.foo), StringColumn) def test_client_not_fetched(self): client = PyKustoClient(MockKustoClient(), fetch_by_default=False)
{ "commit_name": "head_commit", "failed_lite_validators": [ "has_short_problem_statement", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false, "llm_score": { "difficulty_score": 1, "issue_text_score": 1, "test_score": 3 }, "num_modified_files": 1 }
0.0
{ "env_vars": null, "env_yml_path": null, "install": "pip install -e .", "log_parser": "parse_log_pytest", "no_use_env": null, "packages": "pytest", "pip_packages": [ "pytest" ], "pre_install": null, "python": "3.7", "reqs_path": null, "test_cmd": "pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning" }
adal==1.2.7 attrs @ file:///croot/attrs_1668696182826/work azure-core==1.30.1 azure-kusto-data==0.0.44 certifi @ file:///croot/certifi_1671487769961/work/certifi cffi==1.15.1 charset-normalizer==3.4.1 cryptography==44.0.2 flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core idna==3.10 importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1648562407465/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work isodate==0.7.2 msrest==0.7.1 msrestazure==0.6.4.post1 numpy==1.21.6 oauthlib==3.2.2 packaging @ file:///croot/packaging_1671697413597/work pandas==1.0.3 pluggy @ file:///tmp/build/80754af9/pluggy_1648042572264/work py @ file:///opt/conda/conda-bld/py_1644396412707/work pycparser==2.21 PyJWT==2.8.0 -e git+https://github.com/Azure/pykusto.git@0930c481041f5165e870094d2716d9ebeb671c41#egg=pykusto pytest==7.1.2 python-dateutil==2.9.0.post0 pytz==2025.2 requests==2.31.0 requests-oauthlib==2.0.0 six==1.17.0 tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work typing_extensions==4.7.1 urllib3==2.0.7 zipp @ file:///croot/zipp_1672387121353/work
name: pykusto channels: - defaults - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r - conda-forge dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - attrs=22.1.0=py37h06a4308_0 - ca-certificates=2025.2.25=h06a4308_0 - certifi=2022.12.7=py37h06a4308_0 - flit-core=3.6.0=pyhd3eb1b0_0 - importlib-metadata=4.11.3=py37h06a4308_0 - importlib_metadata=4.11.3=hd3eb1b0_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - ld_impl_linux-64=2.40=h12ee557_0 - libffi=3.4.4=h6a678d5_1 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - ncurses=6.4=h6a678d5_0 - openssl=1.1.1w=h7f8727e_0 - packaging=22.0=py37h06a4308_0 - pip=22.3.1=py37h06a4308_0 - pluggy=1.0.0=py37h06a4308_1 - py=1.11.0=pyhd3eb1b0_0 - pytest=7.1.2=py37h06a4308_0 - python=3.7.16=h7a1cb2a_0 - readline=8.2=h5eee18b_0 - setuptools=65.6.3=py37h06a4308_0 - sqlite=3.45.3=h5eee18b_0 - tk=8.6.14=h39e8969_0 - tomli=2.0.1=py37h06a4308_0 - wheel=0.38.4=py37h06a4308_0 - xz=5.6.4=h5eee18b_1 - zipp=3.11.0=py37h06a4308_0 - zlib=1.2.13=h5eee18b_1 - pip: - adal==1.2.7 - azure-core==1.30.1 - azure-kusto-data==0.0.44 - cffi==1.15.1 - charset-normalizer==3.4.1 - cryptography==44.0.2 - idna==3.10 - isodate==0.7.2 - msrest==0.7.1 - msrestazure==0.6.4.post1 - numpy==1.21.6 - oauthlib==3.2.2 - pandas==1.0.3 - pycparser==2.21 - pyjwt==2.8.0 - python-dateutil==2.9.0.post0 - pytz==2025.2 - requests==2.31.0 - requests-oauthlib==2.0.0 - six==1.17.0 - typing-extensions==4.7.1 - urllib3==2.0.7 prefix: /opt/conda/envs/pykusto
[ "test/test_client_fetch.py::TestClientFetch::test_autocomplete_with_dot", "test/test_client_fetch.py::TestClientFetch::test_query_before_fetch_returned" ]
[]
[ "test/test_client_fetch.py::TestClientFetch::test_client_not_fetched", "test/test_client_fetch.py::TestClientFetch::test_column_fetch", "test/test_client_fetch.py::TestClientFetch::test_column_fetch_slow", "test/test_client_fetch.py::TestClientFetch::test_database_fetch", "test/test_client_fetch.py::TestClientFetch::test_empty_database", "test/test_client_fetch.py::TestClientFetch::test_table_fetch", "test/test_client_fetch.py::TestClientFetch::test_two_tables_fetch", "test/test_client_fetch.py::TestClientFetch::test_union_column_name_conflict", "test/test_client_fetch.py::TestClientFetch::test_union_wildcard_one_table" ]
[]
MIT License
null