コード例 #1
0
 def __init__(self, username, password):
     """
     :returns: A ``BlockDeviceVolume``.
     """
     self.logger_ = HedvigLogger.getLogger("HedvigBlockDeviceAPI")
     self._username = username
     self._password = password
     self._instance_id = self.compute_instance_id()
コード例 #2
0
import time
from uuid import UUID
import logging
import json
from zope.interface import implementer, Interface
import socket
from urlparse import urlparse

from thrift.transport import TTransport
from thrift.transport import TSocket
from thrift.transport import THttpClient
from thrift.protocol import TBinaryProtocol
from hedvig.common.qbcommon.ttypes import *
from hedvig.common.qbpages.ttypes import *
from hedvig.common.HedvigLogger import HedvigLogger
HedvigLogger.setDefaultLogFile("flocker-driver.log")
from hedvig.common.HedvigConfig import HedvigConfig
from hedvig.common.PagesProxy import PagesProxy
from hedvig.common.HedvigControllerProxy import HedvigControllerProxy
from hedvig.common.HedvigUtility import *
from subprocess import call
import subprocess
import os
from twisted.python.filepath import FilePath
from twisted.python.constants import Values, ValueConstant
import pdb

from flocker.node.agents.blockdevice import (AlreadyAttachedVolume,
                                             IBlockDeviceAPI,
                                             IProfiledBlockDeviceAPI,
                                             BlockDeviceVolume, UnknownVolume,