psphere-project / psphere Goto Github PK
View Code? Open in Web Editor NEWvSphere SDK for Python. Provision, manage and query objects in your vSphere infrastructure.
Home Page: http://psphere.readthedocs.org/
License: Apache License 2.0
vSphere SDK for Python. Provision, manage and query objects in your vSphere infrastructure.
Home Page: http://psphere.readthedocs.org/
License: Apache License 2.0
I'm trying to run this code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import time
import ConfigParser
from psphere.client import Client
from psphere.managedobjects import VirtualMachine
from pprint import pprint
client = Client("myHost", "Administrator", "myPassword")
vms = VirtualMachine.all(client)
for vm in vms:
vm.summary.guest.ipAddress
vm.config.hardware.memoryMB
And I get the following:
No handlers could be found for logger "psphere.config"
Traceback (most recent call last):
File "./vmware2.py", line 15, in <module>
vm.summary.guest.ipAddress
AttributeError: VirtualMachineGuestSummary instance has no attribute 'ipAddress'
What I'm I doing wrong?
As reported in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788086 ,
suds is not maintained for long time since, so will be removed from Debian
in next release. Then, psphere package will also be removed.
Bug reported suggests replace subs with other implementation. For example,
pysimplesoap is maintained and python3 ready.
Could you consider to move it from depending suds?
When uses in a threaded environment psphere raise KeyError or AttributeError exceptions.
For more detail, see: http://www.gossamer-threads.com/lists/python/python/1005860
The issue is that psphere uses suds which isn't threadsafe. In case of a threaded environement, the suds client must be cloned.
Also, there's a know issue in suds. See: https://fedorahosted.org/suds/attachment/ticket/435/suds-binding-race-condition.patch
The example on the mainpage, getting the timestamp does not work:
from psphere.client import Client
No handlers could be found for logger "psphere.config"
I haven't found how to update VM's annotation from within psphere (vm.summary.config.annotation
). I would like to set some metadata in there.
Is it a missing feature or I was blind and haven't found that?
The SearchIndex object does not have the FindByDnsName and FindByUuid function。
Hi,
I want to import ovf using psphere and when I called ImportVApp funtion its throwing an error. First I have created ovfDescriptor then pass this ovfDescriptor to create ImportOvfSpecParam and so far I have successfully executed my code. But in last step of calling ImportVApp() it's throwing an error message.
Error:
ImportVApp Type not found: 'configSpec':
Code where error lies:
httpNfcLease = rp.ImportVApp(spec= ovfImportResult.importSpec, folder= vmfolder,host= host)
What is the status on Python 3 support?
StoragePod is the new Folder reference for Storage DRS pools. Currently, in the supported vmware platform you can do find_entity_views(mo_ref => 'StoragePod')...etc.
In psphere, this should work like a Datastore, HostSystem, ComputeResource, etc:
storagepods = StoragePod.all(client)
Modification of the property collector will need to be done to retrieve the new results.
CentOS release 6.5 (Final)
Python 2.6.6
psphere (0.5.2)
Attempting to connect to endpoint and getting
urllib2.URLError: <urlopen error [Errno 1] _ssl.c:492: error:100AE081:elliptic curve routines:EC_GROUP_new_by_curve_name:unknown group>
Hi,
I could create VM using following virtual Ethernet adapter VirtualE1000, VirtualVmxnet, VirtualVmxnet2 and VirtualVmxnet3.
Only VirtualE1000e is failing.
Thanks,
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.