Skip to content

Commit

Permalink
Code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
narrieta committed Feb 5, 2022
1 parent 452e8be commit d1c8949
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions azurelinuxagent/common/protocol/goal_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,15 @@ def __init__(self, wire_client):
self._initialize_basic_properties(xml_doc)

# The goal state for extensions can come from vmSettings when using FastTrack or from extensionsConfig otherwise, self._fetch_extended_goal_state
# populates the '_extensions' property.
self._extensions = None
# populates the '_extensions_goal_state' property.
self._extensions_goal_state = None
vm_settings = self._fetch_vm_settings()

# These "extended" properties come from additional HTTP requests to the URIs included in the basic goal state
self._hosting_env = None
self._shared_conf = None
self._certs = None
self._remote_access = None
self._extensions_goal_state = None

self._fetch_extended_goal_state(xml_text, xml_doc, vm_settings)

Expand Down Expand Up @@ -228,7 +227,7 @@ def _fetch_vm_settings(self, force_update=False):
def _fetch_extended_goal_state(self, xml_text, xml_doc, vm_settings):
"""
Issues HTTP requests (WireServer) for each of the URIs in the goal state (ExtensionsConfig, Certificate, Remote Access users, etc)
and populates the corresponding properties. If the give 'vm_settings' are not None they are used for the extensions goal state,
and populates the corresponding properties. If the given 'vm_settings' are not None they are used for the extensions goal state,
otherwise extensionsConfig is used instead.
"""
try:
Expand Down
2 changes: 1 addition & 1 deletion azurelinuxagent/common/protocol/wire.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def get_incarnation(self):

def get_vmagent_manifests(self):
goal_state = self.client.get_goal_state()
ext_conf = self.client.get_goal_state().extensions_goal_state
ext_conf = goal_state.extensions_goal_state
return ext_conf.agent_manifests, goal_state.incarnation

def get_vmagent_pkgs(self, vmagent_manifest):
Expand Down

0 comments on commit d1c8949

Please sign in to comment.