From 3c7c2275b2d4660b83db9495c5f6ece5c6557b43 Mon Sep 17 00:00:00 2001 From: Jordan Augé Date: Sat, 25 Mar 2017 02:00:42 +0100 Subject: Misc. improvements to vICN codebase detailed below. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - vICN core . Added python setup script (allowing package installation) . Better error handling - Resources . LXD : better handling of certificate generation . Physical : generation of SSH keypair within vICN . Link : code simplification . EmulatedLteChannel: fixed typo in netmask configuration of emu-radio (missing /) - Examples . Added json file for tutorial #2 - Dumbell . New tutorial #03 - Load balancing in WiFi/LTE hetnet - Other minor changes incl. code cleanup (trailing spaces, etc.) Change-Id: Id306ca71e27d9859aa72760f63a2bc364bfe8159 Signed-off-by: Jordan Augé --- vicn/resource/lxd/lxd_hypervisor.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'vicn/resource/lxd') diff --git a/vicn/resource/lxd/lxd_hypervisor.py b/vicn/resource/lxd/lxd_hypervisor.py index 328f3fdf..b6e1c9ff 100644 --- a/vicn/resource/lxd/lxd_hypervisor.py +++ b/vicn/resource/lxd/lxd_hypervisor.py @@ -44,11 +44,10 @@ logging.getLogger("requests").setLevel(logging.WARNING) logging.getLogger("urllib3").setLevel(logging.WARNING) log = logging.getLogger(__name__) -# FIXME use system-wide files -DEFAULT_CERT_PATH = os.path.join(os.path.dirname(__file__), - '..', '..', '..', 'config', 'lxd_client_cert', 'client_cert.pem') -DEFAULT_KEY_PATH = os.path.join(os.path.dirname(__file__), - '..', '..', '..', 'config', 'lxd_client_cert', 'client_key.pem') +DEFAULT_CERT_PATH = os.path.expanduser(os.path.join( + '~', '.vicn', 'lxd_client_cert', 'client_cert.pem')) +DEFAULT_KEY_PATH = os.path.expanduser(os.path.join( + '~', '.vicn', 'lxd_client_cert', 'client_key.pem')) # FIXME hardcoded password for LXD server DEFAULT_TRUST_PASSWORD = 'vicn' @@ -191,8 +190,7 @@ class LxdHypervisor(Service): cert = DEFAULT_CERT_PATH, key = DEFAULT_KEY_PATH, owner = self) - lxd_cert_install = LxdInstallCert(node = Reference(self, 'node'), - certificate = lxd_local_cert, + lxd_cert_install = LxdInstallCert(certificate = lxd_local_cert, owner = self) return (lxd_init | lxd_local_cert) > lxd_cert_install -- cgit 1.2.3-korg