Merge "Create glare client in functional tests"

This commit is contained in:
Jenkins 2016-09-06 18:01:55 +00:00 committed by Gerrit Code Review
commit 2fbbbaf3f0
2 changed files with 15 additions and 1 deletions

View File

@ -27,6 +27,7 @@ import keystoneclient.v2_0 as keystoneclientv2
import keystoneclient.v3 as keystoneclientv3
from muranoclient import client as mclient
import muranoclient.common.exceptions as exceptions
from muranoclient.glance import client as glare_client
from oslo_log import log as logging
import yaml
@ -104,7 +105,17 @@ class DeployTestMixin(zip_utils.ZipUtilsMixin):
@memoize
def murano_client(cls):
murano_url = cls.get_murano_url()
if CONF.murano.packages_service == "glare":
glare_endpoint = "http://127.0.0.1:9494"
artifacts_client = glare_client.Client(
endpoint=glare_endpoint,
token=cls.keystone_client().auth_token,
insecure=False, key_file=None, ca_file=None, cert_file=None,
type_name="murano", type_version=1)
else:
artifacts_client = None
return mclient.Client('1',
artifacts_client=artifacts_client,
endpoint=murano_url,
token=cls.keystone_client().auth_token)

View File

@ -62,7 +62,10 @@ MuranoGroup = [
cfg.StrOpt('kubernetes_image',
default="ubuntu14.04-x64-kubernetes",
help="image for kubernetes"),
cfg.StrOpt('region_name', help="region name for services")
cfg.StrOpt('region_name', help="region name for services"),
cfg.StrOpt('packages_service',
default='murano',
help='murano packages service, either "murano" or "glare"')
]
CONF = cfg.CONF