Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

vCD Org VDC

mac edited this page Dec 7, 2020 · 6 revisions

Org VDC Example Usage

  1. Org VDC States

    • Create Org VDC
    
    - name: create vdc
      vcd_org_vdc:
       vdc_name: test_vdc
       vdc_org_name: test_org
       provider_vdc_name: test_provider_vdc
       description: test vdc description
       allocation_model: AllocationVApp
       is_enabled: false
       storage_profiles:
        - name: Performance
          enabled: true
          units: "MB"
          limit: 50000
          default: true
          cpu_units : MHz
          cpu_allocated : 0
          cpu_limit : 0
          mem_units : 'MB'
          mem_allocated : 0
          mem_limit : 0
          nic_quota : 0
          network_quota : 0
          vm_quota : 0
          resource_guaranteed_memory : 1.0
          resource_guaranteed_cpu : 1.0
          vcpu_in_mhz : 1024
          is_thin_provision : true
          network_pool_name : test_network_pool
          uses_fast_provisioning : false
          over_commit_allowed : false
          vm_discovery_enabled : true
          state: "present"
    
    
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • vdc_name - name of the new org vdc
    • vdc_org_name - associated organization name with the new vdc
    • provider_vdc_name - The name of an existing provider vdc
    • description - description of the new org vdc
    • allocation_model - allocation model used by this vdc. Accepted values are 'AllocationVApp', 'AllocationPool' or 'ReservationPool'
    • cpu_units - unit for compute capacity allocated to this vdc. Accepted values are 'MHz' or 'GHz'. Default value is 'MHz'
    • cpu_allocated - capacity that is committed to be available. Default value is 1
    • cpu_limit - capacity limit relative to the value specified for allocation. Default value is 1
    • mem_units - unit for memory capacity allocated to this vdc. Acceptable values are 'MB' or 'GB'. Default value is 'MB'
    • mem_allocated - memory capacity that is committed to be available.. Default value is 1
    • mem_limit - memory capacity limit relative to the value specified for allocation. Default value is 1
    • nic_quota - maximum number of virtual NICs allowed in this vdc. Defaults to 0, which specifies an unlimited number
    • network_quota - maximum number of network objects that can be deployed in this vdc. Defaults to 0, which means no networks can be deployed
    • vm_quota - maximum number of VMs that can be created in this vdc. Defaults to 0, which specifies an unlimited number
    • storage_profiles - list of provider vdc storage profiles to add to this vdc. Each item is a dictionary that should include the following elements:
      • name - name of the PVDC storage profile
      • enabled - true/false, true if the storage profile is enabled for this vdc else false
      • units - Units used to define limit. One of MB or GB
      • limit - Max number of units allocated for this storage profile
      • default - true/false, true if this is default storage profile for this vdc else false
    • resource_guaranteed_memory - percentage of allocated CPU resources guaranteed to vApps deployed in this vdc. Value defaults to 1.0 if the element is empty
    • resource_guaranteed_cpu - percentage of allocated memory resources guaranteed to vApps deployed in this vdc. Value defaults to 1.0 if the element is empty
    • vcpu_in_mhz - specifies the clock frequency, in MegaHertz, for any virtual CPU that is allocated to a VM
    • is_thin_provision - true/false, true to request thin provisioning else false
    • network_pool_name - name to a network pool in the provider vdc that this org vdc should use
    • uses_fast_provisioning - true/false, true to request fast provisioning else false
    • over_commit_allowed - true/false, false to disallow creation of the VDC if the AllocationModel is AllocationPool or ReservationPool and the ComputeCapacity specified is greater than what the backing provider VDC can supply. Defaults to true, if empty or missing
    • vm_discovery_enabled - true/false, true if discovery of vCenter VMs is enabled for resource pools backing this vdc else false
    • is_enabled - true/false, true if this vdc is enabled for use by the organization users else false. The default value is true
    • state == "present" to create org vdc

    • Update Org VDC
    
     - name: update vdc
       vcd_org_vdc:
        vdc_name: "test_vdc"
        vdc_org_name: test_org
        is_enabled: true
        state: "update"
     
     
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • vdc_name - (Required) Name of the vdc
    • vdc_org_name - (Required) associated organization with vdc
    • description - (Optional) description of the new org vdc
    • allocation_model - (Optional) allocation model used by this vdc. Accepted values are 'AllocationVApp', 'AllocationPool' or 'ReservationPool'
    • cpu_units - (Optional) unit for compute capacity allocated to this vdc. Accepted values are 'MHz' or 'GHz'. Default value is 'MHz'
    • cpu_allocated - (Optional) capacity that is committed to be available. Default value is 1
    • cpu_limit - (Optional) capacity limit relative to the value specified for allocation. Default value is 1
    • mem_units - (Optional) unit for memory capacity allocated to this vdc. Acceptable values are 'MB' or 'GB'. Default value is 'MB'
    • mem_allocated - (Optional) memory capacity that is committed to be available.. Default value is 1
    • mem_limit - (Optional) memory capacity limit relative to the value specified for allocation. Default value is 1
    • nic_quota - (Optional) maximum number of virtual NICs allowed in this vdc. Defaults to 0, which specifies an unlimited number
    • network_quota - (Optional) maximum number of network objects that can be deployed in this vdc. Defaults to 0, which means no networks can be deployed
    • vm_quota - (Optional) maximum number of VMs that can be created in this vdc. Defaults to 0, which specifies an unlimited number
    • resource_guaranteed_memory - (Optional) percentage of allocated CPU resources guaranteed to vApps deployed in this vdc. Value defaults to 1.0 if the element is empty
    • resource_guaranteed_cpu - (Optional) percentage of allocated memory resources guaranteed to vApps deployed in this vdc. Value defaults to 1.0 if the element is empty
    • vcpu_in_mhz - (Optional) specifies the clock frequency, in MegaHertz, for any virtual CPU that is allocated to a VM
    • is_thin_provision - (Optional) true/false, true to request thin provisioning else false
    • is_enabled - (Optional) To enable/disable the vdc. The default value is true.
    • state == "update" (Required) to update the vdc

    • Delete Org VDC
    
     - name: delete Vdc
       vcd_org_vdc:
        vdc_name: "test_vdc"
        vdc_org_name: test_org
        state: "absent"
    
    
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • vdc_name - Name of the vdc
    • vdc_org_name - associated organization with vdc
    • state == "absent" (Required) to delete vdc

  2. Org VDC Operations

    • Add Storage Profile(s) to Org VDC
     
     - name: add_storage_profile to org vdc
       vcd_org_vdc:
         vdc_org_name: Acme
         vdc_name: ACME_PAYGG
         storage_profiles:
           - name: 'VM Encryption Policy'
             enabled: true
             default: false
             limit: 1000
         operation: add_storage_profile
     
     
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • vdc_name - Name of the vdc
    • vdc_org_name - associated organization with vdc
    • storage_profiles - (Required) list of storage profiles to be added to the org vdc
      • name - (Required) name of the storage profile
      • enabled - (Optional) True, if the profile should be enabled (default to False)
      • default - (Optional) True, if the profile should be the default profile (default to False)
      • limit_in_mb - (Required) the profile limit in MB
    • operation == "add_storage_profile" (Required) to add storage profiles to vdc

    • Update Storage Profile(s) for Org VDC
     
     - name: update_storage_profile for org vdc
       vcd_org_vdc:
         vdc_org_name: Acme
         vdc_name: ACME_PAYGG
         storage_profiles:
           - name: 'VM Encryption Policy'
             enabled: true
             default: false
             limit: 1000
         operation: update_storage_profile
     
     
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • vdc_name - Name of the vdc
    • vdc_org_name - associated organization with vdc
    • storage_profiles - (Required) list of storage profiles to be updated for the org vdc
      • name - (Required) name of the storage profile
      • enabled - (Optional) True, if the profile should be enabled (default to False)
      • default - (Optional) True, if the profile should be the default profile (default to False)
      • limit_in_mb - (Required) the profile limit in MB
    • operation == "update_storage_profile" (Required) to update storage profiles for vdc

    • Delete Storage Profile(s) to Org VDC
     
     - name: delete_storage_profile to org vdc
       vcd_org_vdc:
         vdc_org_name: Acme
         vdc_name: ACME_PAYGG
         storage_profiles:
           - name: 'VM Encryption Policy'
         operation: delete_storage_profile
     
     
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • vdc_name - Name of the vdc
    • vdc_org_name - associated organization with vdc
    • storage_profiles - (Required) list of storage profiles to be deleted from the org vdc
    • operation == "delete_storage_profile" (Required) to delete storage profiles from vdc