VolumeAttachment ================================== .. toctree:: :maxdepth: 2 :caption: Contents: ======== Functions --------- set +++ Set any specific field to a value **Args** * \*\*kwargs * Arbitrary list of keys as variables in formation of YAML path separated by underscores with their assocaited values. For example, to set the value at .. code-block:: JSON { "spec": { "template": { "spec": "" } } } use .. code-block:: Python obj.set(spec_template_spec="foobar") * You can also specify an incomplete path and k8sGen will attempt to find a unique location whose ending path matches what you have specified. For the case of the above structure, running .. code-block:: Python obj.set(template_spec="foobar") will set the same location because the only path that ends in 'template/spec' is 'spec/template/spec' **Returns** List of return values for each variable set Possible return values include: * True : value was set successfully * (False, 'invalid key name') : the key you are trying to set does not exist for this object * (False, 'abniguous key name') : the key you are trying to set does not refer to a unique location get +++ Get the values that have been set for specific fields **Args** * \*args * Arbitrary list of keys as variables in formation of YAML path separated by underscores **Returns** List of return values for each variable set Possible return values include: * {Value} : The key's value * (False, 'invalid key name') : the key you are trying to set does not exist for this object Key Names and Types ------------------- +-----------------------------------------------------------------------+--------------------------------+ | Key | Type | +=======================================================================+================================+ | apiVersion | storage.k8s.io/v1 | +-----------------------------------------------------------------------+--------------------------------+ | kind | VolumeAttachment | +-----------------------------------------------------------------------+--------------------------------+ | metadata | | +-----------------------------------------------------------------------+--------------------------------+ | spec_attacher | | +-----------------------------------------------------------------------+--------------------------------+ | spec_nodeName | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_accessModes | <[]string> | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_awsElasticBlockStore_fsType | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_awsElasticBlockStore_partition | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_awsElasticBlockStore_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_awsElasticBlockStore_volumeID | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_azureDisk_cachingMode | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_azureDisk_diskName | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_azureDisk_diskURI | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_azureDisk_fsType | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_azureDisk_kind | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_azureDisk_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_azureFile_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_azureFile_secretName | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_azureFile_secretNamespace | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_azureFile_shareName | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_capacity | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_cephfs_monitors | <[]string> | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_cephfs_path | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_cephfs_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_cephfs_secretFile | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_cephfs_secretRef_name | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_cephfs_secretRef_namespace | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_cephfs_user | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_cinder_fsType | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_cinder_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_cinder_secretRef_name | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_cinder_secretRef_namespace | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_cinder_volumeID | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_claimRef_apiVersion | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_claimRef_fieldPath | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_claimRef_kind | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_claimRef_name | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_claimRef_namespace | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_claimRef_resourceVersion | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_claimRef_uid | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_csi_controllerExpandSecretRef_name | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_csi_controllerExpandSecretRef_namespace | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_csi_controllerPublishSecretRef_name | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_csi_controllerPublishSecretRef_namespace | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_csi_driver | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_csi_fsType | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_csi_nodePublishSecretRef_name | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_csi_nodePublishSecretRef_namespace | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_csi_nodeStageSecretRef_name | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_csi_nodeStageSecretRef_namespace | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_csi_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_csi_volumeAttributes | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_csi_volumeHandle | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_fc_fsType | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_fc_lun | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_fc_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_fc_targetWWNs | <[]string> | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_fc_wwids | <[]string> | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_flexVolume_driver | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_flexVolume_fsType | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_flexVolume_options | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_flexVolume_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_flexVolume_secretRef_name | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_flexVolume_secretRef_namespace | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_flocker_datasetName | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_flocker_datasetUUID | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_gcePersistentDisk_fsType | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_gcePersistentDisk_partition | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_gcePersistentDisk_pdName | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_gcePersistentDisk_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_glusterfs_endpoints | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_glusterfs_endpointsNamespace | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_glusterfs_path | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_glusterfs_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_hostPath_path | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_hostPath_type | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_iscsi_chapAuthDiscovery | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_iscsi_chapAuthSession | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_iscsi_fsType | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_iscsi_initiatorName | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_iscsi_iqn | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_iscsi_iscsiInterface | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_iscsi_lun | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_iscsi_portals | <[]string> | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_iscsi_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_iscsi_secretRef_name | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_iscsi_secretRef_namespace | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_iscsi_targetPortal | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_local_fsType | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_local_path | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_mountOptions | <[]string> | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_nfs_path | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_nfs_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_nfs_server | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_nodeAffinity_required_nodeSelectorTerms | <[]COMPONENT.NodeSelectorTerm> | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_persistentVolumeReclaimPolicy | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_photonPersistentDisk_fsType | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_photonPersistentDisk_pdID | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_portworxVolume_fsType | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_portworxVolume_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_portworxVolume_volumeID | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_quobyte_group | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_quobyte_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_quobyte_registry | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_quobyte_tenant | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_quobyte_user | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_quobyte_volume | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_rbd_fsType | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_rbd_image | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_rbd_keyring | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_rbd_monitors | <[]string> | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_rbd_pool | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_rbd_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_rbd_secretRef_name | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_rbd_secretRef_namespace | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_rbd_user | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_scaleIO_fsType | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_scaleIO_gateway | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_scaleIO_protectionDomain | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_scaleIO_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_scaleIO_secretRef_name | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_scaleIO_secretRef_namespace | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_scaleIO_sslEnabled | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_scaleIO_storageMode | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_scaleIO_storagePool | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_scaleIO_system | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_scaleIO_volumeName | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_storageClassName | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_storageos_fsType | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_storageos_readOnly | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_storageos_secretRef_apiVersion | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_storageos_secretRef_fieldPath | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_storageos_secretRef_kind | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_storageos_secretRef_name | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_storageos_secretRef_namespace | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_storageos_secretRef_resourceVersion | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_storageos_secretRef_uid | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_storageos_volumeName | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_storageos_volumeNamespace | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_volumeMode | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_vsphereVolume_fsType | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_vsphereVolume_storagePolicyID | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_vsphereVolume_storagePolicyName | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_inlineVolumeSpec_vsphereVolume_volumePath | | +-----------------------------------------------------------------------+--------------------------------+ | spec_source_persistentVolumeName | | +-----------------------------------------------------------------------+--------------------------------+ JSON fields ----------- .. code-block:: JSON { "apiVersion": "storage.k8s.io/v1", "kind": "VolumeAttachment", "metadata": "", "spec": { "attacher": "", "nodeName": "", "source": { "inlineVolumeSpec": { "accessModes": "<[]string>", "awsElasticBlockStore": { "fsType": "", "partition": "", "readOnly": "", "volumeID": "" }, "azureDisk": { "cachingMode": "", "diskName": "", "diskURI": "", "fsType": "", "kind": "", "readOnly": "" }, "azureFile": { "readOnly": "", "secretName": "", "secretNamespace": "", "shareName": "" }, "capacity": "", "cephfs": { "monitors": "<[]string>", "path": "", "readOnly": "", "secretFile": "", "secretRef": { "name": "", "namespace": "" }, "user": "" }, "cinder": { "fsType": "", "readOnly": "", "secretRef": { "name": "", "namespace": "" }, "volumeID": "" }, "claimRef": { "apiVersion": "", "fieldPath": "", "kind": "", "name": "", "namespace": "", "resourceVersion": "", "uid": "" }, "csi": { "controllerExpandSecretRef": { "name": "", "namespace": "" }, "controllerPublishSecretRef": { "name": "", "namespace": "" }, "driver": "", "fsType": "", "nodePublishSecretRef": { "name": "", "namespace": "" }, "nodeStageSecretRef": { "name": "", "namespace": "" }, "readOnly": "", "volumeAttributes": "", "volumeHandle": "" }, "fc": { "fsType": "", "lun": "", "readOnly": "", "targetWWNs": "<[]string>", "wwids": "<[]string>" }, "flexVolume": { "driver": "", "fsType": "", "options": "", "readOnly": "", "secretRef": { "name": "", "namespace": "" } }, "flocker": { "datasetName": "", "datasetUUID": "" }, "gcePersistentDisk": { "fsType": "", "partition": "", "pdName": "", "readOnly": "" }, "glusterfs": { "endpoints": "", "endpointsNamespace": "", "path": "", "readOnly": "" }, "hostPath": { "path": "", "type": "" }, "iscsi": { "chapAuthDiscovery": "", "chapAuthSession": "", "fsType": "", "initiatorName": "", "iqn": "", "iscsiInterface": "", "lun": "", "portals": "<[]string>", "readOnly": "", "secretRef": { "name": "", "namespace": "" }, "targetPortal": "" }, "local": { "fsType": "", "path": "" }, "mountOptions": "<[]string>", "nfs": { "path": "", "readOnly": "", "server": "" }, "nodeAffinity": { "required": { "nodeSelectorTerms": "<[]COMPONENT.NodeSelectorTerm>" } }, "persistentVolumeReclaimPolicy": "", "photonPersistentDisk": { "fsType": "", "pdID": "" }, "portworxVolume": { "fsType": "", "readOnly": "", "volumeID": "" }, "quobyte": { "group": "", "readOnly": "", "registry": "", "tenant": "", "user": "", "volume": "" }, "rbd": { "fsType": "", "image": "", "keyring": "", "monitors": "<[]string>", "pool": "", "readOnly": "", "secretRef": { "name": "", "namespace": "" }, "user": "" }, "scaleIO": { "fsType": "", "gateway": "", "protectionDomain": "", "readOnly": "", "secretRef": { "name": "", "namespace": "" }, "sslEnabled": "", "storageMode": "", "storagePool": "", "system": "", "volumeName": "" }, "storageClassName": "", "storageos": { "fsType": "", "readOnly": "", "secretRef": { "apiVersion": "", "fieldPath": "", "kind": "", "name": "", "namespace": "", "resourceVersion": "", "uid": "" }, "volumeName": "", "volumeNamespace": "" }, "volumeMode": "", "vsphereVolume": { "fsType": "", "storagePolicyID": "", "storagePolicyName": "", "volumePath": "" } }, "persistentVolumeName": "" } } }