summaryrefslogtreecommitdiff
path: root/azurelinuxagent/agent.py
diff options
context:
space:
mode:
Diffstat (limited to 'azurelinuxagent/agent.py')
-rw-r--r--azurelinuxagent/agent.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/azurelinuxagent/agent.py b/azurelinuxagent/agent.py
index 1309d94..2c21e47 100644
--- a/azurelinuxagent/agent.py
+++ b/azurelinuxagent/agent.py
@@ -31,7 +31,7 @@ import azurelinuxagent.common.conf as conf
from azurelinuxagent.common.version import AGENT_NAME, AGENT_LONG_VERSION, \
DISTRO_NAME, DISTRO_VERSION, \
PY_VERSION_MAJOR, PY_VERSION_MINOR, \
- PY_VERSION_MICRO
+ PY_VERSION_MICRO, GOAL_STATE_AGENT_VERSION
from azurelinuxagent.common.osutil import get_osutil
class Agent(object):
@@ -91,6 +91,8 @@ class Agent(object):
"""
print("Register {0} service".format(AGENT_NAME))
self.osutil.register_agent_service()
+ print("Stop {0} service".format(AGENT_NAME))
+ self.osutil.stop_agent_service()
print("Start {0} service".format(AGENT_NAME))
self.osutil.start_agent_service()
@@ -171,10 +173,14 @@ def version():
"""
Show agent version
"""
- print(("{0} running on {1} {2}".format(AGENT_LONG_VERSION, DISTRO_NAME,
- DISTRO_VERSION)))
- print("Python: {0}.{1}.{2}".format(PY_VERSION_MAJOR, PY_VERSION_MINOR,
+ print(("{0} running on {1} {2}".format(AGENT_LONG_VERSION,
+ DISTRO_NAME,
+ DISTRO_VERSION)))
+ print("Python: {0}.{1}.{2}".format(PY_VERSION_MAJOR,
+ PY_VERSION_MINOR,
PY_VERSION_MICRO))
+ print("Goal state agent: {0}".format(GOAL_STATE_AGENT_VERSION))
+
def usage():
"""
Show agent usage