Ejemplo n.º 1
0
 def __init__(self):
     Platform.__init__(self)
     self.compute_svc_mgr = GoogleServiceManager(
         self, 'compute', self.compute_api_version,
         *(COMPUTE_RW_SCOPE + STORAGE_FULL_SCOPE))
     self.storage_svs_mgr = GoogleServiceManager(self, 'storage', 'v1beta2',
                                                 *STORAGE_FULL_SCOPE)
Ejemplo n.º 2
0
    def __init__(self):
        Platform.__init__(self)
        self.compute_svc_mgr = GoogleServiceManager(
                self, 'compute', 'v1beta14', COMPUTE_RW_SCOPE, STORAGE_FULL_SCOPE)

        self.storage_svs_mgr = GoogleServiceManager(
                self, 'storage', 'v1beta1', STORAGE_FULL_SCOPE)
Ejemplo n.º 3
0
    def __init__(self):
        Platform.__init__(self)
        self.compute_svc_mgr = GoogleServiceManager(self, 'compute',
                                                    'v1beta14',
                                                    COMPUTE_RW_SCOPE,
                                                    STORAGE_FULL_SCOPE)

        self.storage_svs_mgr = GoogleServiceManager(self, 'storage', 'v1beta1',
                                                    STORAGE_FULL_SCOPE)
Ejemplo n.º 4
0
	def __init__(self):
		Platform.__init__(self)
		
		# Find the virtual router.
		eth0leases = util.firstmatched(lambda x: os.path.exists(x), 
									['/var/lib/dhcp/dhclient.eth0.leases',
									'/var/lib/dhcp3/dhclient.eth0.leases',
									'/var/lib/dhclient/dhclient-eth0.leases'],
									'/var/lib/dhclient/dhclient-eth0.leases') 
		if not os.path.exists(eth0leases):
			raise PlatformError("Can't find virtual router. file %s not exists" % eth0leases)
		
		router = None
		for line in open(eth0leases):
			if 'dhcp-server-identifier' in line:
				router = filter(None, line.split(';')[0].split(' '))[2]
		LOG.debug('Meta-data server: %s', router)
		self._router = router
	
		self._metadata = {}
Ejemplo n.º 5
0
    def __init__(self):
        Platform.__init__(self)

        # Find the virtual router.
        eth0leases = util.firstmatched(lambda x: os.path.exists(x),
                                                                ['/var/lib/dhcp/dhclient.eth0.leases',
                                                                '/var/lib/dhcp3/dhclient.eth0.leases',
                                                                '/var/lib/dhclient/dhclient-eth0.leases'],
                                                                '/var/lib/dhclient/dhclient-eth0.leases')
        if not os.path.exists(eth0leases):
            raise PlatformError("Can't find virtual router. file %s not exists" % eth0leases)

        router = None
        for line in open(eth0leases):
            if 'dhcp-server-identifier' in line:
                router = filter(None, line.split(';')[0].split(' '))[2]
        LOG.debug('Meta-data server: %s', router)
        self._router = router

        self._metadata = {}
Ejemplo n.º 6
0
 def __init__(self):
     Platform.__init__(self)
     self._metadata = {}
     self._conn_pool = LocalPool(_create_connection)
     self.refresh_virtual_router_addr()
Ejemplo n.º 7
0
	def __init__(self):
		Platform.__init__(self)
		self._logger = logging.getLogger(__name__)
Ejemplo n.º 8
0
 def __init__(self):
     Platform.__init__(self)
     self._metadata = {}
     self._conn_pool = LocalPool(_create_connection)
     self.refresh_virtual_router_addr()
Ejemplo n.º 9
0
 def __init__(self):
     Platform.__init__(self)
     self.compute_svc_mgr = GoogleServiceManager(
             self, 'compute', self.compute_api_version, *(COMPUTE_RW_SCOPE + STORAGE_FULL_SCOPE))
     self.storage_svs_mgr = GoogleServiceManager(
             self, 'storage', 'v1beta1', *STORAGE_FULL_SCOPE)
Ejemplo n.º 10
0
 def __init__(self):
     Platform.__init__(self)
     self._logger = logging.getLogger(__name__)
     # Work over [Errno -3] Temporary failure in name resolution
     # http://bugs.centos.org/view.php?id=4814
     os.chmod('/etc/resolv.conf', 0755)
Ejemplo n.º 11
0
 def __init__(self):
     Platform.__init__(self)
     self._logger = logging.getLogger(__name__)
     # Work over [Errno -3] Temporary failure in name resolution
     # http://bugs.centos.org/view.php?id=4814
     os.chmod('/etc/resolv.conf', 0755)