Ejemplo n.º 1
0
    def __init__(self):
        self.client = session.LXDAPISession()
        self.container_dir = container_dir.LXDContainerDirectories()
        self.lock_path = str(os.path.join(CONF.instances_path, 'locks'))

        self.container_image = None
        self.container_manifest = None
Ejemplo n.º 2
0
 def __init__(self, virtapi):
     self.virtapi = virtapi
     self.config = config.LXDContainerConfig()
     self.container_dir = container_dir.LXDContainerDirectories()
     self.session = session.LXDAPISession()
     self.operations = \
         operations.LXDContainerOperations(
             self.virtapi)
Ejemplo n.º 3
0
    def setUp(self):
        super(SessionImageTest, self).setUp()

        self.ml = stubs.lxd_mock()
        lxd_patcher = mock.patch('pylxd.api.API',
                                 mock.Mock(return_value=self.ml))
        lxd_patcher.start()
        self.addCleanup(lxd_patcher.stop)

        self.session = session.LXDAPISession()
Ejemplo n.º 4
0
    def setUp(self):
        super(SessionProfileTest, self).setUp()
        """This is so we can mock out pylxd API calls."""
        self.ml = stubs.lxd_mock()
        lxd_patcher = mock.patch('pylxd.api.API',
                                 mock.Mock(return_value=self.ml))
        lxd_patcher.start()
        self.addCleanup(lxd_patcher.stop)

        self.session = session.LXDAPISession()
Ejemplo n.º 5
0
 def __init__(self):
     self.container_dir = container_dir.LXDContainerDirectories()
     self.session = session.LXDAPISession()
     self.vif_driver = vif.LXDGenericDriver()
Ejemplo n.º 6
0
 def __init__(self):
     self.session = session.LXDAPISession()
     self.lock_path = str(os.path.join(CONF.instances_path, 'locks'))