vmware-archive / vcd-cli Goto Github PK
View Code? Open in Web Editor NEWCommand Line Interface for VMware vCloud Director
Home Page: https://vmware.github.io/vcd-cli
License: Other
Command Line Interface for VMware vCloud Director
Home Page: https://vmware.github.io/vcd-cli
License: Other
Hi,
Is there any way we can connect multiple networks while creating vapp's using vca-cli
disconnecting vApp from networks pre-defined in the template
progress : [************************* ]
vca --version
vca-cli version 12rc3 (pyvcloud: 13rc3)
We have got the error when we using --insecure option.
vca --insecure vapp create --vapp .....
progress : [* ] 1 %Traceback (most recent call last):
File "/bin/vca", line 9, in <module>
load_entry_point('vca-cli==12', 'console_scripts', 'vca')()
File "/usr/lib/python2.7/site-packages/click/core.py", line 664, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/click/core.py", line 644, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/site-packages/click/core.py", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python2.7/site-packages/click/core.py", line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python2.7/site-packages/click/core.py", line 464, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/vca_cli/vca_cli.py", line 649, in vapp
vca.vcloud_session.get_vcloud_headers())
File "/usr/lib/python2.7/site-packages/vca_cli/vca_cli.py", line 2444, in display_progress
response = requests.get(task.get_href(), headers=headers)
File "/usr/lib/python2.7/site-packages/requests/api.py", line 65, in get
return request('get', url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/api.py", line 49, in request
response = session.request(method=method, url=url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 461, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 431, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [Errno bad handshake] [('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')]
Feature request:
It would be nice if the option 'insecure' is set than warning will not show:
/usr/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
Thank you for the very useful utility!
this should include the env properties
Output from a basic command:
Tims-Mac-mini:~ tim$ vca vapp
/Library/Python/2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
/Library/Python/2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
/Library/Python/2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
/Library/Python/2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
/Library/Python/2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
/Library/Python/2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
/Library/Python/2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
/Library/Python/2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Something like this should hide warnings:
urllib3.disable_warnings()
When using vca-cli to create a vapp I get the following error at the end of creation:
File "/usr/local/bin/vca", line 9, in
load_entry_point('vca-cli==11', 'console_scripts', 'vca')()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 664, in call
return self.main(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 644, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 837, in invoke
return ctx.invoke(self.callback, *_ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 464, in invoke
return callback(_args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/vca_cli/vca_cli.py", line 474, in vapp
if task: display_progress(task, ctx.obj['json_output'], vca.vcloud_session.get_vcloud_headers())
File "/usr/local/lib/python2.7/dist-packages/vca_cli/vca_cli.py", line 1533, in display_progress
sys.stdout.write("\r" + task_table(response.content) + '\n')
File "/usr/local/lib/python2.7/dist-packages/vca_cli/vca_cli.py", line 1485, in task_table
startTime = datetime.strptime(task_dict["Task"].get('@starttime'), "%Y-%m-%dT%H:%M:%S.%fZ")
File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
(data_string, format))
ValueError: time data '2015-05-21T15:38:38.860-04:00' does not match format '%Y-%m-%dT%H:%M:%S.%fZ'
Thoughts?
In file vcloudair.py
In line 1559 : org variable is reassigned to the gateway got from ctx.
In line 1570 : gateway, which will be of none type is used and not org, which is the gateway.
Hi!
When I login under account with End User role I'm not able neither by default get vDC nor select it manually with python error IndexError: list index out of range
. Please find log below:
~$ vca vdc use --vdc M267276419-3903
Using vdc 'M267276419-3903', profile 'default'
Traceback (most recent call last):
File "/usr/local/bin/vca", line 9, in <module>
load_entry_point('vca-cli==14', 'console_scripts', 'vca')()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 27, in new_func
return f(get_current_context().obj, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/vca_cli/vca_cli_compute.py", line 63, in vdc
cmd_proc.select_default_gateway()
File "/usr/local/lib/python2.7/dist-packages/vca_cli/cmd_proc.py", line 557, in select_default_gateway
gateways = self.vca.get_gateways(self.vdc_name)
File "/usr/local/lib/python2.7/dist-packages/pyvcloud/vcloudair.py", line 1214, in get_gateways
self.response = Http.get(link[0].get_href(), headers=self.vcloud_session.get_vcloud_headers(), verify=self.verify, logger=self.logger)
IndexError: list index out of range
~$ vca vdc
Available Virtual Data Centers in org 'm267276419-3903', profile 'default':
| Virtual Data Center | Selected |
|-----------------------+------------|
| M267276419-3903 | |
~$
When I login under account with admin role I have selected vDC by default and also I can select vDC manually.
Hola desde Barcelona, Paco!
I have followed up the examples to try to login into a vCloud Director Standalone instance but I can't login:
I have installed pycloud and vca-cli via pip on a virtual environment on Ubuntu 15.04 and I have upgraded all the modules. I'm using a user "MYUSERNAME" to manage an organitzation called "MYORG" that has a vDC called "MYVDC" on the vCloud Director 5.5 https://myvcloud.mydomain . I can successfully manage it using the regular Web Interface but I can't login via vca-cli using any of these commands:
$ vca --insecure login MYUSERNAME@MYORG --password MYPASSWORD --host https://myvcloud.mydomain --org MYORG --version 5.5
$ vca --insecure login MYUSERNAME --password MYPASSWORD --host https://myvcloud.mydomain --org MYORG --version 5.5
$ vca --insecure login MYUSERNAME@MYORG --password MYPASSWORD --host https://myvcloud.mydomain --org MYORG --vdc MYVDC --version 5.5
$ vca --insecure login MYUSERNAME --password MYPASSWORD --host https://myvcloud.mydomain --org MYORG --vdc MYVDC --version 5.5
But I always get a:
Can't login: Access is forbidden
What's wrong? Thanks and best regards.
/รngel
I'm getting errors when trying to display "vca status" (subscription). The first response is for the login request using the command vca login [email protected] --password --host https://vchs.vmware.com --version 5.6 --type subscription. The second response is the output from "vca status" after I've been authenticated. Interestingly, I have no trouble displaying the list of orgs using vca org list command, however, when I try setting the org to the name of my org it says "unable to select organization in profile.
vca : INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): vchs.vmware.com
At line:1 char:1
- CategoryInfo : NotSpecified: (INFO:requests.p...vchs.vmware.com:String) [], RemoteException
- FullyQualifiedErrorId : NativeCommandError
DEBUG:requests.packages.urllib3.connectionpool:"POST /api/vchs/sessions HTTP/1.1" 201 204
send: 'POST /api/vchs/sessions HTTP/1.1\r\nHost: vchs.vmware.com\r\nContent-Length: 0\r\nAccept-Encoding: gzip, deflate\r\nAccept: application/xml;version=5.6\r\nUser-Agent: python-requests/2.4.3 CPython/2.7.8 Windows/8\r\nConnection: keep-alive\r\nAuthorization: Basic amNvd2FuQHZtd2FyZS5jb206ejBtQiEzeio=\r\n\r\n'
reply: 'HTTP/1.1 201 Created\r\n'
header: Date: Fri, 13 Feb 2015 15:41:48 GMT
header: Server: Apache-Coyote/1.1
header: x-vchs-authorization: 59266ce87ca751f84bb7be96666f1ef81e21aea9,c2b79fe0-c0a7-4da6-8658-b6f00d2d910b%3BVMware+Sales+Demo%3Ba36ecbfe-3000-4c95-a0d0-094d838fdcc8%3Bjcowan%40vmware.com%3B17501914-a57f-4db2-8f92-33e7478ce54b%3B1%3B1423842108937%3Btrue%3Bfalse
header: Content-Type: application/xml; class=vnd.vmware.vchs.session; version=5.6;charset=UTF-8
header: Vary: Accept-Encoding,User-Agent
header: Content-Encoding: gzip
header: X-Frame-Options: SAMEORIGIN
header: Content-Length: 204
header: Set-Cookie: ROUTEID=.132; path=/;Secure;HTTPOnly
header: Cache-Control: no-store,no-cache,must-revalidate
header: Pragma: no-cache
header: Keep-Alive: timeout=15, max=100
header: Connection: Keep-Alive
Login successful for profile 'default'
vca : INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): vchs.vmware.com
At line:1 char:1
- CategoryInfo : NotSpecified: (INFO:requests.p...vchs.vmware.com:String) [], RemoteException
- FullyQualifiedErrorId : NativeCommandError
DEBUG:requests.packages.urllib3.connectionpool:"GET /api/vchs/services HTTP/1.1" 200 489
send: 'GET /api/vchs/services HTTP/1.1\r\nHost: vchs.vmware.com\r\nConnection: keep-alive\r\nx-vchs-authorization: 59266ce87ca751f84bb7be96666f1ef81e21aea9,c2b79fe0-c0a7-4da6-8658-b6f00d2d910b%3BVMware+Sales+Demo%3Ba36ecbfe-3000-4c95-a0d0-094d838fdcc8%3Bjcowan%40vmware.com%3B17501914-a57f-4db2-8f92-33e7478ce54b%3B1%3B1423842108937%3Btrue%3Bfalse\r\nAccept-Encoding: gzip, deflate\r\nAccept: application/xml;version=5.6\r\nUser-Agent: python-requests/2.4.3 CPython/2.7.8 Windows/8\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Fri, 13 Feb 2015 15:42:08 GMT
header: Server: Apache-Coyote/1.1
header: x-vchs-authorization: 07d5e905d52ad7b6d7938fc256097d99b55c1405,c2b79fe0-c0a7-4da6-8658-b6f00d2d910b%3BVMware+Sales+Demo%3Ba36ecbfe-3000-4c95-a0d0-094d838fdcc8%3Bjcowan%40vmware.com%3B17501914-a57f-4db2-8f92-33e7478ce54b%3B1%3B1423842128378%3Btrue%3Bfalse
header: Content-Type: application/xml; class=vnd.vmware.vchs.servicelist; version=5.6;charset=UTF-8
header: Vary: Accept-Encoding,User-Agent
header: Content-Encoding: gzip
header: X-Frame-Options: SAMEORIGIN
header: Content-Length: 489
header: Set-Cookie: ROUTEID=.132; path=/;Secure;HTTPOnly
header: Cache-Control: no-store,no-cache,must-revalidate
header: Pragma: no-cache
header: Keep-Alive: timeout=15, max=100
header: Connection: Keep-Alive
Traceback (most recent call last):
File "C:\Python27\Scripts\vca-script.py", line 9, in
load_entry_point('vca-cli==6', 'console_scripts', 'vca')()
File "C:\Python27\lib\site-packages\click\core.py", line 610, in call
return self.main(_args, *_kwargs)
File "C:\Python27\lib\site-packages\click\core.py", line 590, in main
rv = self.invoke(ctx)
File "C:\Python27\lib\site-packages\click\core.py", line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Python27\lib\site-packages\click\core.py", line 782, in invoke
return ctx.invoke(self.callback, *_ctx.params)
File "C:\Python27\lib\site-packages\click\core.py", line 416, in invoke
return callback(_args, **kwargs)
File "C:\Python27\lib\site-packages\vca_cli\vca_cli.py", line 247, in status
if property == 'password' and len(ctx.obj[property])>0:
TypeError: object of type 'NoneType' has no len()
Got the following error:
root@6077ec5c3b61:/tmp# pip install vca-cli
Requirement already satisfied (use --upgrade to upgrade): vca-cli in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): Click in /usr/local/lib/python2.7/dist-packages (from vca-cli)
Requirement already satisfied (use --upgrade to upgrade): colorama in /usr/lib/python2.7/dist-packages (from vca-cli)
Downloading/unpacking cryptography (from vca-cli)
Downloading cryptography-0.7.2.tar.gz (247kB): 247kB downloaded
Running setup.py (path:/tmp/pip_build_root/cryptography/setup.py) egg_info for package cryptography
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*' found under directory 'vectors'
Downloading/unpacking pyvcloud==7 (from vca-cli)
Downloading pyvcloud-7.tar.gz (1.3MB): 1.3MB downloaded
Running setup.py (path:/tmp/pip_build_root/pyvcloud/setup.py) egg_info for package pyvcloud
Downloading/unpacking cffi>=0.8 (from cryptography->vca-cli)
Downloading cffi-0.8.6.tar.gz (196kB): 196kB downloaded
Running setup.py (path:/tmp/pip_build_root/cffi/setup.py) egg_info for package cffi
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing
libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing
libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Downloading/unpacking pyasn1 (from cryptography->vca-cli)
Downloading pyasn1-0.1.7.tar.gz (68kB): 68kB downloaded
Running setup.py (path:/tmp/pip_build_root/pyasn1/setup.py) egg_info for package pyasn1
Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in /usr/local/lib/python2.7/dist-packages (from cryptography->vca-cli)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/dist-packages (from cryptography->vca-cli)
Downloading/unpacking enum34 (from cryptography->vca-cli)
Downloading enum34-1.0.4.tar.gz
Running setup.py (path:/tmp/pip_build_root/enum34/setup.py) egg_info for package enum34
Downloading/unpacking PyYAML==3.10 (from pyvcloud==7->vca-cli)
Downloading PyYAML-3.10.tar.gz (241kB): 241kB downloaded
Running setup.py (path:/tmp/pip_build_root/PyYAML/setup.py) egg_info for package PyYAML
Downloading/unpacking iptools==0.6.1 (from pyvcloud==7->vca-cli)
Downloading iptools-0.6.1.tar.gz
Running setup.py (path:/tmp/pip_build_root/iptools/setup.py) egg_info for package iptools
no previously-included directories found matching 'docs/_build'
Downloading/unpacking requests==2.4.3 (from pyvcloud==7->vca-cli)
Downloading requests-2.4.3-py2.py3-none-any.whl (459kB): 459kB downloaded
Downloading/unpacking tabulate==0.7.3 (from pyvcloud==7->vca-cli)
Downloading tabulate-0.7.3.tar.gz
Running setup.py (path:/tmp/pip_build_root/tabulate/setup.py) egg_info for package tabulate
Requirement already satisfied (use --upgrade to upgrade): wsgiref==0.1.2 in /usr/lib/python2.7 (from pyvcloud==7->vca-cli)
Downloading/unpacking xmltodict==0.9.0 (from pyvcloud==7->vca-cli)
Downloading xmltodict-0.9.0.tar.gz
Running setup.py (path:/tmp/pip_build_root/xmltodict/setup.py) egg_info for package xmltodict
Downloading/unpacking lxml==3.4.1 (from pyvcloud==7->vca-cli)
Downloading lxml-3.4.1.tar.gz (3.5MB): 3.5MB downloaded
Running setup.py (path:/tmp/pip_build_root/lxml/setup.py) egg_info for package lxml
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.1.
Building without Cython.
Using build configuration of libxslt 1.1.28
warning: no previously-included files found matching '*.py'
Downloading/unpacking pycparser (from cffi>=0.8->cryptography->vca-cli)
Downloading pycparser-2.10.tar.gz (206kB): 206kB downloaded
Running setup.py (path:/tmp/pip_build_root/pycparser/setup.py) egg_info for package pycparser
Installing collected packages: cryptography, pyvcloud, cffi, pyasn1, enum34, PyYAML, iptools, requests, tabulate, xmltodict, lxml, pycparser
Running setup.py install for cryptography
zip_safe flag not set; analyzing archive contents...
Installed /tmp/pip_build_root/cryptography/enum34-1.0.4-py2.7.egg
Searching for pyasn1
Reading https://pypi.python.org/simple/pyasn1/
Best match: pyasn1 0.1.7
Downloading https://pypi.python.org/packages/2.7/p/pyasn1/pyasn1-0.1.7-py2.7.egg#md5=15f079cabee01402bf86ca8b83356469
Processing pyasn1-0.1.7-py2.7.egg
Moving pyasn1-0.1.7-py2.7.egg to /tmp/pip_build_root/cryptography
Installed /tmp/pip_build_root/cryptography/pyasn1-0.1.7-py2.7.egg
Searching for cffi>=0.8
Reading https://pypi.python.org/simple/cffi/
Best match: cffi 0.8.6
Downloading https://pypi.python.org/packages/source/c/cffi/cffi-0.8.6.tar.gz#md5=474b5a68299a6f05009171de1dc91be6
Processing cffi-0.8.6.tar.gz
Writing /tmp/easy_install-EmnJsi/cffi-0.8.6/setup.cfg
Running cffi-0.8.6/setup.py -q bdist_egg --dist-dir /tmp/easy_install-EmnJsi/cffi-0.8.6/egg-dist-tmp-JZL6PL
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
compiling '_configtest.c':
__thread int some_threadlocal_variable_42;
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -c _configtest.c -o _configtest.o
success!
removing: _configtest.c _configtest.o
c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip_build_root/cryptography/setup.py", line 339, in <module>
**keywords_with_side_effects(sys.argv)
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 239, in __init__
self.fetch_build_eggs(attrs.pop('setup_requires'))
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 264, in fetch_build_eggs
replace_conflicting=True
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 620, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 858, in best_match
return self.obtain(req, installer) # try and download/install
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 870, in obtain
return installer(requirement)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 314, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 616, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 646, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 834, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1040, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1028, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-uOrZw9-record/install-record.txt --single-version-externally-managed --compile:
zip_safe flag not set; analyzing archive contents...
Installed /tmp/pip_build_root/cryptography/enum34-1.0.4-py2.7.egg
Searching for pyasn1
Reading https://pypi.python.org/simple/pyasn1/
Best match: pyasn1 0.1.7
Downloading https://pypi.python.org/packages/2.7/p/pyasn1/pyasn1-0.1.7-py2.7.egg#md5=15f079cabee01402bf86ca8b83356469
Processing pyasn1-0.1.7-py2.7.egg
Moving pyasn1-0.1.7-py2.7.egg to /tmp/pip_build_root/cryptography
Installed /tmp/pip_build_root/cryptography/pyasn1-0.1.7-py2.7.egg
Searching for cffi>=0.8
Reading https://pypi.python.org/simple/cffi/
Best match: cffi 0.8.6
Downloading https://pypi.python.org/packages/source/c/cffi/cffi-0.8.6.tar.gz#md5=474b5a68299a6f05009171de1dc91be6
Processing cffi-0.8.6.tar.gz
Writing /tmp/easy_install-EmnJsi/cffi-0.8.6/setup.cfg
Running cffi-0.8.6/setup.py -q bdist_egg --dist-dir /tmp/easy_install-EmnJsi/cffi-0.8.6/egg-dist-tmp-JZL6PL
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
compiling '_configtest.c':
__thread int some_threadlocal_variable_42;
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -c _configtest.c -o _configtest.o
success!
removing: _configtest.c _configtest.o
c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip_build_root/cryptography/setup.py", line 339, in
**keywords_with_side_effects(sys.argv)
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 239, in init
self.fetch_build_eggs(attrs.pop('setup_requires'))
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 264, in fetch_build_eggs
replace_conflicting=True
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 620, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 858, in best_match
return self.obtain(req, installer) # try and download/install
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 870, in obtain
return installer(requirement)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 314, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 616, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 646, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 834, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1040, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1028, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip_build_root/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-uOrZw9-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/cryptography
Storing debug log for failure in /root/.pip/pip.log
Please review the changes and merge them. The link to the repo is:
https://github.com/anshimagupta/cli.git
some use _, others camel case
I am trying to create a VM using vca
cli using the following command
vca vapp create --vapp myvapp \
--catalog 'Public Catalog' \
--template 'Ubuntu Server 12.04 LTS (amd64 20150127)' \
--network default-routed-network \
--mode pool \
--vm myvm \
--cpu 2 \
--ram 8
The output is:
creating vApp 'myvapp' in VDC 'VDC1' from template 'Ubuntu Server 12.04 LTS (amd64 20150127)' in catalog 'Public Catalog'
progress : [**************************************************************************************************** ] 100
<Error message="[ 7a2fab8c-40fb-4ca6-aedf-70ec17fed279 ] Unable to perform this action. Contact your cloud administrator." minorErrorCode="INTERNAL_SERVER_ERROR" majorErrorCode="500"/>
setting computer name for VM 'myvm'
Traceback (most recent call last):
File "/usr/local/bin/vca", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 680, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 508, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 26, in new_func
return f(get_current_context().obj, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/vca_cli/vca_cli_compute.py", line 355, in vapp
utils.print_error("can't set computer name", cmd_proc)
File "/usr/local/lib/python2.7/dist-packages/vca_cli/vca_cli_utils.py", line 52, in print_error
json_message = json.loads(cmd_proc.vca.response.content)
File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Sometimes the above command works, but most of the times it fails.
Note: the following warning is displayed on the terminal
util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning
I have installed vca-cli using these instructions of the readme: https://github.com/vmware/vca-cli#ubuntu on a 12.04 host.
Hi. How do I get firewall rules from a fenced vapp ?
Firewall rules in gateway 'edge_MyVDC01', VDC 'org_vdc_MyVDC', profile 'default' (firewall is On):
| Source IP | Source Port | Destination IP | Destination Port | Protocol | Enabled |
|-------------+---------------+------------------+--------------------+------------+-----------|
Available vApps in 'org_vdc_MyVDC', profile 'default':
| vApp | VMs | Status | Deployed | Description |
|-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+---------------------------------------------------------------------------------------------------|
| Application Framework | Dev Stack, Backup Stack, Mail Stack, Logging Stack | Powered on | yes | Applications to support the running of all Platforms |
| Development Platform | Frontend Stack | Powered on | yes | Based on Production
Available networks in 'org_vdc_MyVDC', profile 'default':
| Name | Mode | Gateway | Netmask | DNS 1 | DNS 2 | Pool IP Range |
|-------------------------+-----------+---------------+---------------+----------------+----------------+---------------------------|
| org_net_MyVDC01 | natRouted | 192.168.1.254 | 255.255.255.0 | 135.135.135.135 | 135.135.135.136 | 192.168.1.5-192.168.1.250 |
Seems to work fine but has ext_nat_MyVDC in the "Applied On" column.
Hi,
Since vca-cli was used for VCA, it makes perfect sense that it was developed with Org scope in mind, w/ org-admin role at best, and thus not System account which is capable of listing all orgs, vdcs, edges, and so on.
Now that vca is gone, and VCD-SP is used extensively in SPs around the world, is it planned to target vca-cli usage for SP's administrators w/ System account login.
If i'm logging w/ my System account, it works like a charm, but I can't list organization for the reason mentionned above. Thus I can't do anything. The painful alternative afaik is to rely on an org-admin user on a per-org basis.
It would be great to be able to operate vcd in CLI w/ System account. My 2 cents.
Anyway, keep the good work!
I've tried running the documented installation instructions:
$ pip install vca-cli
I've also tried running the command as root
with sudo
:
$ sudo pip install vca-cli
I received an error in both cases.
Log files can be found in this gist: https://gist.github.com/zjs/de5568ed08aa3240eef2
vca_cli_version 14rc2
pyvcloud_version 14rc8
When attempting to log into vCloud Director 5.5.x, receive the following error:
$ vca --debug --insecure login myuser --host my-url --org myorg --vdc myvdc --version 5.5
InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised.
Password:
User 'myuser' logged in, profile 'default'
Password encrypted and saved in local profile. Use --do-not-save-password to disable it.
Using VDC 'myvdc', profile 'default'
Can't login: list index out of range
However, when I use the same client and attempt to log into another vCloud Director environment, the login is successful. The one in which the login fails is a substantially larger environment in all respects than the one in which login is successful.
BTW, I was unable to get the --debug
option to work. I had tried including both before and after the subcommand to no avail.
Tims-Mac-mini:~ tim$ vca vapp create -a TEST-VAPP2 -c "TurnKey" -t "TURNKEY WORDPRESS" -n "Example network" -m POOL -V "Tim-Wordpress-001"
progress : [**************************************************************************************************** ] 100 %
| Start Time | Duration | Status |
|---------------------+----------------+----------|
| 2015-07-31 18:43:03 | 0 mins 37 secs | success |
setting computer name for VM 'Tim-Wordpress-001'
[ 0de17ac7-e41e-4c30-848d-9cc0ec542592 ] Guest customization is not supported by the selected OS. Please disable guest customization to proceed.
disconnecting VM from networks pre-defined in the template
| Start Time | Duration | Status |
|---------------------+---------------+----------|
| 2015-07-31 18:43:43 | 0 mins 2 secs | success |
disconnecting vApp from networks pre-defined in the template
| Start Time | Duration | Status |
|---------------------+---------------+----------|
| 2015-07-31 18:43:46 | 0 mins 0 secs | success |
# Output of "vca vm" after creation compeltes:
Available VMs in 'DC_1119688' for 'default' profile:
| VM | vApp | Status | IPs | Networks | vCPUs | Memory (GB) | CD/DVD | OS | Owner |
|-------------------+-------------------+-------------+----------------+------------------+---------+---------------+----------------------+-------------------------------------------+--------------|
| Tim-Wordpress-001 | TEST-VAPP2 | Powered off | | | 1 | 0 | [] | Other (32-bit) | cloud1102635 |
There are no errors to suggest the network doesn't exist, i'm 100% certain it does.
connecting VMs to network 'M86.....-4840-default-routed' with mode 'DHCP'
progress : [************************* ]
vca --version
vca-cli version 12rc3 (pyvcloud: 13rc3)
If no password is provided on the command line, the user will be prompted for one.
However, none of the examples demonstrate this functionality, which may lead a user to believe it is necessary to supply their password on the command line (where it will likely be visible and logged).
Please consider adding the ability to set a syslog server on the edge gateway.
Are these going to be supported?
When authentication to a vCloud Director instance fails, the only output returned to stdout
is "login failed", per vca_cli.py#L253. It would be good to have verbose output available in order that the failure is more obvious.
I'll take a look at looking through the code at some point in future to see if I can fix this.
It'd be nice to be able to edit/change vApp / VM settings.. especially memory, CPUs, network settings.
Afaik currently these can be set when creating a new vApp, but can't be edited afterwards using vca-cli.
When an error occurs and is reported to the user, vca-cli
should include the value of the X-VMWARE-VCLOUD-REQUEST-ID
header from the relevant API response. If the user contacts support about the error, they can provide this value to allow support to quickly identify the relevant logs.
How do you create a link between the vca-cli package and oh-my-zsh on Windows? It looks like it works fine without the linkage.
After a successful installation on OSX 10.10.4, i receive the following error.
$ vca --version
Traceback (most recent call last):
File "/usr/local/bin/vca", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2797, in <module>
parse_requirements(__requires__), Environment()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 576, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: six>=1.9.0
The problem:
$ vca login -p -t subscription --host https://vchs.vmware.com -v 5.6
Login successful for profile 'default'
$ vca org use --org --service
Using organization in profile 'default'
$ vca nat add --type SNAT --original_ip 192.168.10.2 --translated_ip 23.92.245.228
Traceback (most recent call last):
File "/home/achirko/workspace/vcloud/venv/bin/vca", line 9, in
load_entry_point('vca-cli==6', 'console_scripts', 'vca')()
File "/home/achirko/workspace/vcloud/venv/local/lib/python2.7/site-packages/click/core.py", line 610, in call
return self.main(_args, *_kwargs)
File "/home/achirko/workspace/vcloud/venv/local/lib/python2.7/site-packages/click/core.py", line 590, in main
rv = self.invoke(ctx)
File "/home/achirko/workspace/vcloud/venv/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/achirko/workspace/vcloud/venv/local/lib/python2.7/site-packages/click/core.py", line 782, in invoke
return ctx.invoke(self.callback, *_ctx.params)
File "/home/achirko/workspace/vcloud/venv/local/lib/python2.7/site-packages/click/core.py", line 416, in invoke
return callback(_args, **kwargs)
File "/home/achirko/workspace/vcloud/vca-cli/vca_cli/vca_cli.py", line 679, in nat
gateways = vca.get_gateways(vdc)
File "/home/achirko/workspace/vcloud/pyvcloud/pyvcloud/vcloudair.py", line 400, in get_gateways
link = filter(lambda link: link.get_rel() == "edgeGateways", self.get_vdc(vdc_name).get_Link())
AttributeError: 'NoneType' object has no attribute 'get_Link'
I created a new virtual env, activated it and installed vca-cli with pip.
I get this error:
vca --version
Traceback (most recent call last):
File "/Users/robin/dwp/vca/venv/bin/vca", line 7, in <module>
from vca_cli.vca_cli import cli
File "/Users/robin/dwp/vca/venv/lib/python2.7/site-packages/vca_cli/vca_cli.py", line 542, in <module>
import vca_cli_blueprint # NOQA
File "/Users/robin/dwp/vca/venv/lib/python2.7/site-packages/vca_cli/vca_cli_blueprint.py", line 23, in <module>
from dsl_parser.exceptions import \
ImportError: No module named dsl_parser.exceptions
This is Python 2.7.12, installed from brew on OSX
apply to vcd-cli
I wan to use vca-cli with vCloud Director 5.1.2.
I am getting error: SSL routines:SSL3_CHECK_CERT_AND_ALGORITHM:dh key too small
:~# vca --insecure login [email protected] --password megapassword --host vcloud01.xyz.com --org mega-org --version 5.1
InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised.
Can't login: [Errno 1] _ssl.c:510: error:14082174:SSL routines:SSL3_CHECK_CERT_AND_ALGORITHM:dh key too small
After googling i do understand that problem in Diffie-Hellman cyphers settings on server side.
Unfortionally where is no way change anything on server side.
Is it possible to disable usage of Diffie-Hellman cyphers on client side ?
Thanks.
deallocating public IP '' from gateway 'gateway' in VDC 'VDC1'
Traceback (most recent call last):
File "/usr/local/bin/vca", line 9, in
load_entry_point('vca-cli==14', 'console_scripts', 'vca')()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in call
return self.main(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, *_ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
return callback(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 27, in new_func
return f(get_current_context().obj, *args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/vca_cli/vca_cli_network.py", line 109, in gateway
error.get_message(), cmd_proc)
File "/usr/local/lib/python2.7/dist-packages/vca_cli/vca_cli_utils.py", line 52, in print_error
json_message = json.loads(cmd_proc.vca.response.content)
File "/usr/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
We cannot add both TCP & UDP while creating Firewall rule using vCA CLI. It fails with the following error
add --protocol tcp & udp --dest-port 8080 --dest-ip xxxxx --source-port Any --source-ip any
invalid value of protocol: invalid choice: tcp , udp (Choose from tcp,udp,icmp, any)
Looks like this has to be added in the Code. Possibly next release.
When I try to log in to an instance like so:
vca login [email protected] --instance "abe380c7-ebd0-4417-927a-a9b88e596ae3"
I get an error:
Traceback (most recent call last):
File "//anaconda/bin/vca", line 9, in <module>
load_entry_point('vca-cli==10', 'console_scripts', 'vca')()
File "//anaconda/lib/python2.7/site-packages/click/core.py", line 664, in __call__
return self.main(*args, **kwargs)
File "//anaconda/lib/python2.7/site-packages/click/core.py", line 644, in main
rv = self.invoke(ctx)
File "//anaconda/lib/python2.7/site-packages/click/core.py", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "//anaconda/lib/python2.7/site-packages/click/core.py", line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "//anaconda/lib/python2.7/site-packages/click/core.py", line 464, in invoke
return callback(*args, **kwargs)
File "//anaconda/lib/python2.7/site-packages/vca_cli/vca_cli.py", line 239, in login
result = _login_user_to_service(ctx, user, host, password, service_type, service_version, instance, org)
File "//anaconda/lib/python2.7/site-packages/vca_cli/vca_cli.py", line 170, in _login_user_to_service
result = vca.login_to_instance(instance, password, None, None)
File "//anaconda/lib/python2.7/site-packages/pyvcloud/vcloudair.py", line 177, in login_to_instance
result = vcloud_session.login(password, token)
File "//anaconda/lib/python2.7/site-packages/pyvcloud/vcloudsession.py", line 65, in login
session = sessionType.parseString(self.response.content, True)
File "//anaconda/lib/python2.7/site-packages/pyvcloud/schema/vcd/v1_5/schemas/vcloud/sessionType.py", line 5225, in parseString
rootObj.build(rootNode)
File "//anaconda/lib/python2.7/site-packages/pyvcloud/schema/vcd/v1_5/schemas/vcloud/sessionType.py", line 5101, in build
self.buildAttributes(node, node.attrib, already_processed)
File "//anaconda/lib/python2.7/site-packages/pyvcloud/schema/vcd/v1_5/schemas/vcloud/sessionType.py", line 5119, in buildAttributes
super(SessionType, self).buildAttributes(node, attrs, already_processed)
File "//anaconda/lib/python2.7/site-packages/pyvcloud/schema/vcd/v1_5/schemas/vcloud/sessionType.py", line 1215, in buildAttributes
value = find_attr_value_('xsi:type', node)
File "//anaconda/lib/python2.7/site-packages/pyvcloud/schema/vcd/v1_5/schemas/vcloud/sessionType.py", line 492, in find_attr_value_
namespace = node.nsmap.get(prefix)
AttributeError: nsmap
Is there a way to do it with cli?
deleting vApp 't_TESTHS' from VDC 'M86......-4840'
Traceback (most recent call last):
File "/usr/local/bin/vca", line 9, in
load_entry_point('vca-cli==12rc3', 'console_scripts', 'vca')()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 664, in call
return self.main(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 644, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 837, in invoke
return ctx.invoke(self.callback, *_ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 464, in invoke
return callback(_args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/vca_cli/vca_cli.py", line 495, in vapp
task = vca.delete_vapp(vdc, vapp)
File "/usr/local/lib/python2.7/dist-packages/pyvcloud/vcloudair.py", line 405, in delete_vapp
if vapp: return vapp.delete()
File "/usr/local/lib/python2.7/dist-packages/pyvcloud/vapp.py", line 125, in delete
return self.execute("remove", "delete")
File "/usr/local/lib/python2.7/dist-packages/pyvcloud/vapp.py", line 79, in execute
self.response = Http.delete(link[0].get_href(), headers=self.headers, verify=self.verify, logger=self.logger)
File "/usr/local/lib/python2.7/dist-packages/pyvcloud/init.py", line 65, in delete
response = requests.delete(url, data, **kwargs)
NameError: global name 'data' is not defined
vca --version
vca-cli version 12rc3 (pyvcloud: 13rc3)
After logging in vca status gives a traceback:
Traceback (most recent call last):
File "/usr/local/bin/vca", line 9, in
load_entry_point('vca-cli==13', 'console_scripts', 'vca')()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 664, in call
return self.main(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 644, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 837, in invoke
return ctx.invoke(self.callback, *_ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 464, in invoke
return callback(_args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/vca_cli/vca_cli_impl.py", line 346, in status
if prop == 'password' and len(ctx.obj.get(prop, [])) > 0:
TypeError: object of type 'NoneType' has no len()
Running on the latest stable from pip:
vca --version
vca-cli version 13 (pyvcloud: 14rc6)
I'm trying to follow the guidelines to get CoreOS working in vCA as outlined here:
http://blogs.vmware.com/vcloud/2015/02/using-coreos-vcloud-air-demand.html
When I get to the part about inserting the config ISO I get the following:
$ vca vapp insert --vdc VDC1 --vapp coreos1 --vm coreos_production_vmware_ova --catalog default-catalog --media coreos1-config.iso
insert media 'coreos1-config.iso', VM 'coreos_production_vmware_ova' in vApp 'coreos1' in VDC 'VDC1'
Traceback (most recent call last):
File "/usr/local/bin/vca", line 9, in <module>
load_entry_point('vca-cli==14', 'console_scripts', 'vca')()
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 680, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 508, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context().obj, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/vca_cli/vca_cli_compute.py", line 558, in vapp
task = the_vapp.vm_media(vm_name, the_media, operation)
File "/usr/local/lib/python2.7/site-packages/pyvcloud/vapp.py", line 512, in vm_media
""" % (media.get('name'), media.get('id'), media.get('href'))
AttributeError: 'NoneType' object has no attribute 'get'
Some more output for troubleshooting:
$ vca catalog
Available catalogs and items in org 'secretorg', profile 'default':
| Catalog | Item |
|-----------------+------------------------------------------|
| Public Catalog | CentOS64-64BIT |
| Public Catalog | CentOS64-32BIT |
| Public Catalog | Ubuntu Server 12.04 LTS (amd64 20150127) |
| Public Catalog | Ubuntu Server 12.04 LTS (i386 20150127) |
| Public Catalog | W2K12-STD-64BIT |
| Public Catalog | CentOS63-64BIT |
| Public Catalog | W2K12-STD-R2-64BIT |
| Public Catalog | W2K8-STD-R2-64BIT |
| Public Catalog | CentOS63-32BIT |
| default-catalog | coreos_template |
| default-catalog | coreos-config1.iso |
$ vca vapp
Available vApps in 'VDC1', profile 'default':
| vApp | VMs | Status | Deployed | Description |
|---------+------------------------------+------------+------------+---------------|
| coreos1 | coreos_production_vmware_ova | Powered on | yes | |
Inserting the ISO through the web interface works as expected.
It'd be good to be able to specify OVF properties (guest properties) and parameters when provisioning a new Vapp / VM. Many OVF based templates/images allow (or require) configuration and settings to be done via OVF properties.
vCloud AIR and vCloud Director do support OVF properties via the REST API.
Is this project dead? Is there an alternative? Thanks.
While doing a simple vca vapp create I get a time format error. Running on OSX 10.10 running Python 2.7.6 with the latest vca-cli from pip hitting a vCloud Director Standalone instance running 5.6.4
The vApp creates but looks like it gets to just before hooking up the network before failing.
Here is the command and output:
Tims-Mac-mini:~ tim$ vca vapp create -a TEST-VAPP2 -c "TurnKey" -t "TURNKEY WORDPRESS" -n "Example network" -m POOL -V "Tim-Wordpress-001"
creating vApp 'TEST-VAPP2' in VDC 'DC_1119688' from template 'TURNKEY WORDPRESS' in catalog 'TurnKey'
Traceback (most recent call last):
File "/usr/local/bin/vca", line 9, in <module>
load_entry_point('vca-cli==10', 'console_scripts', 'vca')()
File "/Library/Python/2.7/site-packages/click/core.py", line 664, in __call__
return self.main(*args, **kwargs)
File "/Library/Python/2.7/site-packages/click/core.py", line 644, in main
rv = self.invoke(ctx)
File "/Library/Python/2.7/site-packages/click/core.py", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Library/Python/2.7/site-packages/click/core.py", line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Library/Python/2.7/site-packages/click/core.py", line 464, in invoke
return callback(*args, **kwargs)
File "/Library/Python/2.7/site-packages/vca_cli/vca_cli.py", line 465, in vapp
if task: display_progress(task, ctx.obj['json_output'], vca.vcloud_session.get_vcloud_headers())
File "/Library/Python/2.7/site-packages/vca_cli/vca_cli.py", line 1520, in display_progress
sys.stdout.write("\r" + task_table(response.content) + '\n')
File "/Library/Python/2.7/site-packages/vca_cli/vca_cli.py", line 1472, in task_table
startTime = datetime.strptime(task_dict["Task"].get('@startTime'), "%Y-%m-%dT%H:%M:%S.%fZ")
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_strptime.py", line 325, in _strptime
(data_string, format))
ValueError: time data '2015-07-28T09:14:05.190+08:00' does not match format '%Y-%m-%dT%H:%M:%S.%fZ'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.