summaryrefslogtreecommitdiffstats
path: root/dcae-cli/dcae_cli
diff options
context:
space:
mode:
authorMichael Hwang <mhwang@research.att.com>2018-08-01 16:22:13 -0400
committerMichael Hwang <mhwang@research.att.com>2018-08-03 10:33:58 -0400
commit2de95edebaa92072aa857ca70961cd7bdaf7a77d (patch)
tree5225035b16b57d392ddbf3f38d340b4fa28f9a0c /dcae-cli/dcae_cli
parentc4a139fff38bc62ea0a47566707c7aad13a86b4f (diff)
Do first pass on dcae onboarding vagrant
* Provide Vagrantfile etc to standup a VirtualBox image that runs a minimal DCAE runtime for onboarding * Add README with directions on how to do above * Make minor fixes to the dcae-cli for issues discovered from testing above Issue-ID: DCAEGEN2-574 Change-Id: I99ea595df9e5e2b9a872b864e553caec1f020669 Signed-off-by: Michael Hwang <mhwang@research.att.com>
Diffstat (limited to 'dcae-cli/dcae_cli')
-rw-r--r--dcae-cli/dcae_cli/_version.py2
-rw-r--r--dcae-cli/dcae_cli/util/docker_util.py15
2 files changed, 3 insertions, 14 deletions
diff --git a/dcae-cli/dcae_cli/_version.py b/dcae-cli/dcae_cli/_version.py
index be3a135..ac49ad3 100644
--- a/dcae-cli/dcae_cli/_version.py
+++ b/dcae-cli/dcae_cli/_version.py
@@ -19,4 +19,4 @@
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
# -*- coding: utf-8 -*-
-__version__ = "2.10.1"
+__version__ = "2.10.2"
diff --git a/dcae-cli/dcae_cli/util/docker_util.py b/dcae-cli/dcae_cli/util/docker_util.py
index a0499d6..7ae933f 100644
--- a/dcae-cli/dcae_cli/util/docker_util.py
+++ b/dcae-cli/dcae_cli/util/docker_util.py
@@ -1,7 +1,7 @@
# ============LICENSE_START=======================================================
# org.onap.dcae
# ================================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -83,21 +83,10 @@ def get_docker_client(profile, logins=[]):
except:
raise DockerError('Could not connect to the Docker daemon. Is it running?')
-def _get_docker_client(client_funcs=(docker.Client, docker.from_env)):
- '''Returns a docker client object'''
- for func in client_funcs:
- try:
- client = func(version='auto')
- client.ping()
- return client
- except:
- continue
- raise DockerError('Could not connect to the Docker daemon. Is it running?')
-
def image_exists(image):
'''Returns True if the image exists locally'''
- client = _get_docker_client()
+ client = docker.from_env(version="auto")
return True if client.images(image) else False