~ubuntu-branches/debian/stretch/waagent/stretch

« back to all changes in this revision

Viewing changes to azurelinuxagent/distro/ubuntu/loader.py

  • Committer: Package Import Robot
  • Author(s): Bastian Blank
  • Date: 2016-02-01 13:11:28 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20160201131128-4wxc2tklmq3x40xe
Tags: 2.1.2-1
* New upstream version.
* Depend on host, needed by Microsofts custom script stuff.
* Use cloud-init:
  - Use Ubuntu provisioning handler, disable provisioning.
  - Depend on new enough version of cloud-init.
  - Update dependencies in init script and service.
  - Disable recursive agent invocation and hostname bounce in clout-init.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Windows Azure Linux Agent
 
1
# Microsoft Azure Linux Agent
2
2
#
3
3
# Copyright 2014 Microsoft Corporation
4
4
#
17
17
# Requires Python 2.4+ and Openssl 1.0+
18
18
#
19
19
 
20
 
from azurelinuxagent.metadata import DistroName, DistroVersion
 
20
from azurelinuxagent.metadata import DISTRO_NAME, DISTRO_VERSION, DISTRO_FULL_NAME
21
21
 
22
 
def GetOSUtil():
 
22
def get_osutil():
23
23
    from  azurelinuxagent.distro.ubuntu.osutil import Ubuntu1204OSUtil, \
24
24
                                                      UbuntuOSUtil, \
25
 
                                                      Ubuntu14xOSUtil
26
 
    if DistroVersion == "12.04":
 
25
                                                      Ubuntu14xOSUtil, \
 
26
                                                      UbuntuSnappyOSUtil
 
27
 
 
28
    if DISTRO_VERSION == "12.04":
27
29
        return Ubuntu1204OSUtil()
28
 
    elif DistroVersion == "14.04" or DistroVersion == "14.10":
 
30
    elif DISTRO_VERSION == "14.04" or DISTRO_VERSION == "14.10":
29
31
        return Ubuntu14xOSUtil()
 
32
    elif DISTRO_FULL_NAME == "Snappy Ubuntu Core":
 
33
        return UbuntuSnappyOSUtil()
30
34
    else:
31
35
        return UbuntuOSUtil()
32
36
 
33
 
def GetHandlers():
 
37
def get_handlers():
34
38
    from azurelinuxagent.distro.ubuntu.handlerFactory import UbuntuHandlerFactory
35
39
    return UbuntuHandlerFactory()
36
 
     
 
40