Skip to content

Commit 1f5d314

Browse files
Alex AzarhAlex Azarh
authored andcommitted
fixed bug #834 and updated requirements for cloudshell-automation-api
1 parent c42b38a commit 1f5d314

8 files changed

Lines changed: 17 additions & 13 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ install:
88
- pip install "cloudshell-core>=2.0.0,<2.1.0" --extra-index-url https://testpypi.python.org/simple
99
- chmod 777 ./cloudshell_shell_core_install.sh
1010
- ./cloudshell_shell_core_install.sh
11-
- pip install "cloudshell-automation-api>=7.1.0.0,<7.2.0.0" --extra-index-url https://testpypi.python.org/simple
11+
- pip install "cloudshell-automation-api>=8.0.0.0,<8.1.0.0" --extra-index-url https://testpypi.python.org/simple
1212
language: python
1313
notifications:
1414
webhools: "https://qualisystems.getbadges.io/api/app/webhook/63350e33-4119-49c3-8127-075aaa022926"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
jsonpickle==0.9.3
2-
cloudshell-automation-api>=7.1.0.0,<7.2.0.0
2+
cloudshell-automation-api>=8.0.0.0,<8.1.0.0
33
cloudshell-cp-vcenter>=1.6.0,<1.7.0
44
cloudshell-shell-core>=2.0.0,<2.1.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
jsonpickle==0.9.3
2-
cloudshell-automation-api>=7.1.0.0,<7.2.0.0
2+
cloudshell-automation-api>=8.0.0.0,<8.1.0.0
33
cloudshell-cp-vcenter>=1.6.0,<1.7.0
44
cloudshell-shell-core>=2.0.0,<2.1.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
jsonpickle==0.9.3
2-
cloudshell-automation-api>=7.1.0.0,<7.2.0.0
2+
cloudshell-automation-api>=8.0.0.0,<8.1.0.0
33
cloudshell-cp-vcenter>=1.6.0,<1.7.0
44
cloudshell-shell-core>=2.0.0,<2.1.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
jsonpickle==0.9.3
2-
cloudshell-automation-api>=7.1.0.0,<7.2.0.0
2+
cloudshell-automation-api>=8.0.0.0,<8.1.0.0
33
cloudshell-cp-vcenter>=1.6.0,<1.7.0
44
cloudshell-shell-core>=2.0.0,<2.1.0

package/cloudshell/cp/vcenter/common/vcenter/vmomi_service.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@
1010
from cloudshell.cp.vcenter.exceptions.task_waiter import TaskFaultException
1111

1212

13-
14-
class VCenterAuthError (Exception):
15-
def __init__(self, original_exception):
16-
super(VCenterAuthError, self).__init__(original_exception.message)
13+
class VCenterAuthError(Exception):
14+
def __init__(self, message, original_exception):
15+
"""
16+
:param str message:
17+
:param original_exception: The orginoal exception that was raised
18+
:return:
19+
"""
20+
super(VCenterAuthError, self).__init__(message)
1721
self.original_exception = original_exception
1822

1923

@@ -72,7 +76,7 @@ def connect(self, address, user, password, port=443):
7276
si = self.pyvmomi_connect(host=address, user=user, pwd=password, port=port)
7377
return si
7478
except vim.fault.InvalidLogin as e:
75-
raise VCenterAuthError(e.msg)
79+
raise VCenterAuthError(e.msg, e)
7680
except IOError as e:
7781
# logger.info("I/O error({0}): {1}".format(e.errno, e.strerror))
7882
raise ValueError('Cannot connect to vCenter, please check that the address is valid')
@@ -314,7 +318,7 @@ def get_obj(self, content, vimtype, name):
314318
@staticmethod
315319
def _get_all_objects_by_type(content, vimtype):
316320
container = content.viewManager.CreateContainerView(
317-
content.rootFolder, vimtype, True)
321+
content.rootFolder, vimtype, True)
318322
return container
319323

320324
@staticmethod

package/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cloudshell-automation-api>=7.1.0.0,<7.2.0.0
1+
cloudshell-automation-api>=8.0.0.0,<8.1.0.0
22
cloudshell-core>=2.0.0,<2.1.0
33
pyvmomi==6.0.0
44
jsonpickle==0.9.3
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cloudshell-automation-api>=7.1.0.0,<7.2.0.0
1+
cloudshell-automation-api>=8.0.0.0,<8.1.0.0
22
cloudshell-core>=2.0.0,<2.1.0
33
cloudshell-cp-vcenter>=1.6.0,<1.7.0
44
cloudshell-shell-core>=2.3.0,<2.4.0

0 commit comments

Comments
 (0)