Classes¶
DirectSource¶
Represents a Linked Source object and its properties when using a Direct Linking strategy.
from dlpx.virtualization.platform import DirectSource
direct_source = DirectSource(guid, connection, parameters)
Fields¶
| Field | Type | Description |
|---|---|---|
| guid | String | Unique Identifier for the source. |
| connection | RemoteConnection | Connection for the source environment. |
| parameters | LinkedSourceDefinition | User input as per the LinkedSource Schema. |
StagedSource¶
Represents a Linked Source object and its properties when using a Staged Linking strategy.
from dlpx.virtualization.platform import StagedSource
staged_source = StagedSource(guid, source_connection, parameters, mount, staged_connection)
Fields¶
| Field | Type | Description |
|---|---|---|
| guid | String | Unique Identifier for the source. |
| source_connection | RemoteConnection | Connection for the source environment. |
| parameters | LinkedSourceDefinition | User input as per the LinkedSource Schema. |
| mount | Mount | Mount point associated with the source. |
| staged_connection | RemoteConnection | Connection for the staging environment. |
VirtualSource¶
Represents a Virtual Source object and its properties.
from dlpx.virtualization.platform import VirtualSource
virtual_source = VirtualSource(guid, connection, parameters, mounts)
Fields¶
| Field | Type | Description |
|---|---|---|
| guid | String | Unique Identifier for the source. |
| connection | RemoteConnection | Connection for the source environment. |
| parameters | VirtualSourceDefinition | User input as per the VirtualSource Schema. |
| mounts | list[Mount] | Mount points associated with the source. |
RemoteConnection¶
Represents a connection to a source.
from dlpx.virtualization.common import RemoteConnection
connection = RemoteConnection(environment, user)
Fields¶
| Field | Type | Description |
|---|---|---|
| environment | RemoteEnvironment | Environment for the connection. |
| user | RemoteUser | User for the connection. |
Status¶
An enum used to represent the state of a linked or virtual source and whether it is functioning as expected.
from dlpx.virtualization.platform import Status
status = Status.ACTIVE
Values¶
| Value | Description |
|---|---|
| ACTIVE | Source is healthy and functioning as expected. |
| INACTIVE | Source is not functioning as expected. |
Mount¶
Represents a mount exported and mounted to a remote host.
from dlpx.virtualization.platform import Mount
mount = Mount(environment, path)
Fields¶
| Field | Type | Description |
|---|---|---|
| remote_environment | RemoteEnvironment or Reference | Environment for the connection. |
| mount_path | String | The path on the remote host that has the mounted data set. |
| shared_path | String | Optional. The path of the subdirectory of the data set to mount to the remote host. |
OwnershipSpecification¶
Represents how to set the ownership for a data set. This only applies to Unix Hosts.
from dlpx.virtualization.platform import OwnershipSpecification
ownership_specification = OwnershipSpecification(uid, gid)
Fields¶
| Field | Type | Description |
|---|---|---|
| uid | Integer | The user id to set the ownership of the data set to. |
| gid | Integer | The group id to set the ownership of the data set to. |
MountSpecification¶
Represents properties for the mount associated with an exported data set.
from dlpx.virtualization.platform import MountSpecification
mount_specification = MountSpecification([mount], ownership_specification)
Fields¶
| Field | Type | Description |
|---|---|---|
| mounts | list[Mount] | The list of mounts to export the data sets to. |
| ownership_specification | OwnershipSpecification | Optional. Control the ownership attributes for the data set. It defaults to the environment user of the remote environment if it is not specified. |
SnapshotParametersDefinition¶
User provided parameters for the snapshot operation. It includes a boolean property named resync that can be used to indicate to the plugin whether or not to initiate a full ingestion of the dSource. The parameters are only set during a manual snapshot. When using a sync policy, resync defaults to false.
from dlpx.virtualization.platform import Plugin
plugin = Plugin()
@plugin.linked.pre_snapshot()
def linked_pre_snapshot(staged_source, repository, source_config, snapshot_parameters):
if snapshot_parameter.resync:
print(snapshot_parameter.resync)
This class will be generated during build and is located with the autogenerated classes. As it is passed into the operation, importing it is not neccessary.
Fields¶
| Field | Type | Description |
|---|---|---|
| resync | Boolean | Determines if this snapshot should ingest the dSource from scratch. |
RemoteEnvironment¶
Represents a remote environment.
from dlpx.virtualization.common import RemoteEnvironment
environment = RemoteEnvironment(name, reference, host)
Fields¶
| Field | Type | Description |
|---|---|---|
| name | String | Name of the environment. |
| reference | String | Unique identifier for the environment. |
| host | RemoteHost | Host that belongs to the environment. |
RemoteHost¶
Represents a remote host, can be Unix or Windows.
from dlpx.virtualization.common import RemoteHost
host = RemoteHost(name, reference, binary_path, scratch_path)
Fields¶
| Field | Type | Description |
|---|---|---|
| name | String | Host address. |
| reference | String | Unique identifier for the host. |
| binary_path | String | Path to Delphix provided binaries on the host, which are present in the toolkit pushed to the remote host like dlpx_db_exec, dlpx_pfexec, etc. This property is only available for Unix hosts. |
| scratch_path | String | Path to scratch path on the host. |
RemoteUser¶
Represents a user on a remote host.
from dlpx.virtualization.common import RemoteUser
user = RemoteUser(name, reference)
Fields¶
| Field | Type | Description |
|---|---|---|
| name | String | User name. |
| reference | String | Unique identifier for the user. |