Metadata-Version: 1.1
Name: pyvcloud
Version: 0.6
Summary: VMware vCloud Python SDK
Home-page: https://github.com/vmware/pyvcloud
Author: VMware, Inc.
Author-email: pgomez@vmware.com
License: License :: OSI Approved :: Apache Software License
Description: pyvcloud
        ========
        
        Python SDK for VMware vCloud.
        
        ``Release early, release often.``
        
        This project is under development.
        
        Sample usage:
        
        Import modules and instantiate a vCloud Air object::
        
            from pyvcloud.vcloudair import VCA
            vca = VCA()
        
        Login to a vCloud Director instance::
        
            vca.login('vcdhost.company.com', 'vcdUser@vcdOrg', 'password', None, 'vcd', '5.6')
            
        A user might have access to one or more datacenters within an organization::
        
            for datacenter in vca.get_vdcReferences():
                print datacenter.name        
            vcd = vca.get_vCloudDirector(vdcId='mydatacenter')
        
        Login to subscription-based vCloud Air::
        
            vca.login('vchs.vmware.com', 'user@company.com', 'password', None, 'subscription', '5.6')  
            
        On the subscription-based vCloud Air, there are services and datacenters::
        
            for service in vca.get_serviceReferences():
                print service.serviceId  
            
            for datacenter in vca.get_vdcReferences('myservice'):
                print datacenter.name
                
            vcd = vca.get_vCloudDirector('myservice', 'mydatacenter')
        
        In both cases, after getting a reference to a vCloud Director instance (vcd), get all vApps::
        
            for vapp in vcd.get_vApps():
                print "name: %s, status: %s\n" % (vapp.name, vapp.status)
        
        Get all vApp templates::
        
            templates = vcd.list_templates({'--catalog': False})
        
        Get all networks::
        
            networks = vcd.get_networkRefs()
        
        Sample vApp life cycle::
        
            #create vApp and get the reference
            vcd.create_vApp('myvapp', 'Ubuntu Server 12.04 LTS (amd64 20140927)', 'Public Catalog', {'--blocking': True, '--json': True, '--deploy': False, '--on': False, '--network': ''})
            vapp = vcd.get_vApp('myvapp')
        
            #connect vApp to org network
            vcd.connect_vApp(vapp, 'AppServices-default-routed', 'bridged')
        
            #connect the VMs
            vapp.connect_vms('AppServices-default-routed', 'POOL')
            
            #power on the vApp and VMs
            vapp.poweron({'--blocking': True, '--json': True})
            
        The vApp is now ready to use. When is time to delet it (need to get the vapp reference before each operation)::
        
            vapp = vcd.get_vApp('myvapp')
            vapp.undeploy({'--blocking': True, '--json': True, '--action': 'shutdown'})
        
            vapp = vcd.get_vApp('myvapp')
            vapp.delete({'--blocking': True, '--json': True})    
        
        Displaying the XML representation of the vApp::
        
            import sys
            myvapp.me.export(sys.stdout, 0)
        
        
        Development
        ===========
        
        To test the current code, check it out from github and install it with::
        
            pip install --editable .
        
        To debug a python session, add this code::
        
            import logging
            import httplib
            httplib.HTTPConnection.debuglevel = 1
            logging.basicConfig()
            logging.getLogger().setLevel(logging.DEBUG)
            requests_log = logging.getLogger("requests.packages.urllib3")
            requests_log.setLevel(logging.DEBUG)
            requests_log.propagate = True
        
        
Keywords: pyvcloud vcloud vcloudair vmware
Platform: Windows
Platform: Linux
Platform: Solaris
Platform: Mac OS-X
Platform: Unix
Classifier: Development Status :: 1 - Planning
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Developers
Classifier: Environment :: No Input/Output (Daemon)
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Distributed Computing
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
