From ad8b093f25e8cb9387d44907f20699b52c03b1c2 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Sun, 7 Apr 2013 19:32:07 -0400 Subject: [PATCH] init accepts client argument --- plstackapi/openstack/driver.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plstackapi/openstack/driver.py b/plstackapi/openstack/driver.py index e055a60..5a42d79 100644 --- a/plstackapi/openstack/driver.py +++ b/plstackapi/openstack/driver.py @@ -1,14 +1,18 @@ from plstackapi.planetstack.config import Config -from plstackapi.openstack.shell import OpenStackShell +from plstackapi.openstack.client import OpenStackClient class OpenStackDriver: - def __init__(self, config = None): + def __init__(self, config = None, client=None): if config: self.config = Config(config) else: self.config = Config() - self.shell = OpenStackShell() + + if client: + self.shell = client + else: + self.shell = OpenStackClient() def create_tenant(self, tenant_name, enabled, description): """Create keystone tenant. Suggested fields: name, description, enabled""" -- 2.47.0