diff options
author | Marcel Enguehard <mengueha+fdio@cisco.com> | 2017-05-29 15:54:39 +0200 |
---|---|---|
committer | Marcel Enguehard <mengueha+fdio@cisco.com> | 2017-05-29 15:54:39 +0200 |
commit | 97c6a8bb1847febe8bda5f95e19f527cabc060b9 (patch) | |
tree | eef5bd3a9c10179d59205f11240535d8be20f5ee /vicn/resource/lxd | |
parent | a836e5c16ea7df38646c46f2e9ffc6163ab05f06 (diff) |
Misc bug fixes: VPP, deb package detection, lxd
Change-Id: Ib3d339e636c0ec62dc0fe3227af85bcc167445cf
Signed-off-by: Marcel Enguehard <mengueha+fdio@cisco.com>
Diffstat (limited to 'vicn/resource/lxd')
-rw-r--r-- | vicn/resource/lxd/lxc_container.py | 1 | ||||
-rw-r--r-- | vicn/resource/lxd/lxd_hypervisor.py | 3 | ||||
-rw-r--r-- | vicn/resource/lxd/lxd_profile.py | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/vicn/resource/lxd/lxc_container.py b/vicn/resource/lxd/lxc_container.py index 654b3bc5..8c8b4816 100644 --- a/vicn/resource/lxd/lxc_container.py +++ b/vicn/resource/lxd/lxc_container.py @@ -154,6 +154,7 @@ class LxcContainer(Node): container = self._get_container_description() log.debug('Container description: {}'.format(container)) client = self.node.lxd_hypervisor.client + self._container = client.containers.create(container, wait=True) def _get_container_description(self): diff --git a/vicn/resource/lxd/lxd_hypervisor.py b/vicn/resource/lxd/lxd_hypervisor.py index f9952e4f..bbdba7c6 100644 --- a/vicn/resource/lxd/lxd_hypervisor.py +++ b/vicn/resource/lxd/lxd_hypervisor.py @@ -52,7 +52,6 @@ DEFAULT_CERT_PATH = os.path.expanduser(os.path.join( DEFAULT_KEY_PATH = os.path.expanduser(os.path.join( '~', '.vicn', 'lxd_client_cert', 'client_key.pem')) -# FIXME hardcoded password for LXD server LXD_TRUST_PWD_DEFAULT = 'vicn' LXD_STORAGE_SIZE_DEFAULT = 100 # GB @@ -199,6 +198,8 @@ class LxdHypervisor(Service): owner = self) lxd_cert_install = LxdInstallCert(certificate = lxd_local_cert, owner = self) + # XXX BUG network has to exist before profile, although as an attribute it + # will be setup after lxd_vicn_profile = LxdProfile(name=LXD_PROFILE_NAME_DEFAULT, node=self.node, description='vICN profile', diff --git a/vicn/resource/lxd/lxd_profile.py b/vicn/resource/lxd/lxd_profile.py index e7afee4a..db871671 100644 --- a/vicn/resource/lxd/lxd_profile.py +++ b/vicn/resource/lxd/lxd_profile.py @@ -28,6 +28,8 @@ lxc profile device add {profile.name} root disk pool={profile.pool} path=/ lxc profile device add {profile.name} {profile.iface_name} nic name={profile.iface_name} nictype=bridged parent={profile.network} lxc profile unset {profile.name} environment.http_proxy lxc profile unset {profile.name} user.network_mode +# Temp fix for VPP +lxc profile create vpp ''' CMD_LXD_PROFILE_GET = 'lxc profile list | grep {profile.name}' |