summaryrefslogtreecommitdiff
path: root/azurelinuxagent/agent.py
diff options
context:
space:
mode:
authorƁukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com>2017-01-16 10:10:41 +0100
committerusd-importer <ubuntu-server@lists.ubuntu.com>2017-01-17 17:53:13 +0000
commitdd73af563850762aad64e7ed2a9897377830af10 (patch)
tree33f34ccce29a5a11227741dbe6a8fce20deeeaba /azurelinuxagent/agent.py
parenta05019d9343d0fde153d75a8e61fb6f99d1d3ff3 (diff)
parent558111e33720eb8f1eaacf571cf4fadae2430286 (diff)
downloadvyos-walinuxagent-dd73af563850762aad64e7ed2a9897377830af10.tar.gz
vyos-walinuxagent-dd73af563850762aad64e7ed2a9897377830af10.zip
Import patches-applied version 2.2.2-0ubuntu1 to applied/ubuntu/zesty-proposed
Imported using git-ubuntu import. Changelog parent: a05019d9343d0fde153d75a8e61fb6f99d1d3ff3 Unapplied parent: 558111e33720eb8f1eaacf571cf4fadae2430286 New changelog entries: * New upstream release (LP: #1651128) - d/patches/fix-auto-update.patch, d/patches/lp1623570-adjust-walinuxagent-service-after-and-wants.patch: - Dropped as changes have been applied upstream - Refreshed debian/patches/disable_import_test.patch
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