Skip to content

SystemDeviceTypeImportRequest

Bases: OCIRequest

Request to import a Device Type Archive File (DTAF) as a new Device Type. The URL supports the HTTP and the FILE protocols. When the optional element resellerId is specified, the device type created is at reseller level. When the optional element deviceTypeRename is set, on import, the device type name part of the DTAF will be changed to the desired name on the destination system. When the optional element deviceTypeFileUpdate is set, on import, the files that are matched based on the file format are updated with the ones from the DTAF. The file format and the file category are the only attributes that can't be updated. The response is either a SuccessResponse or an ErrorResponse.

The following data elements are only used in AS data mode and ignored in XS data mode:
  deviceTypeFileUpdate
  deviceTypeRename
  resellerId

Attributes:

file (str):

reseller_id (Optional[str]):

device_type_rename (Optional[AccessDeviceTypeRename]):

device_type_file_update (Optional[bool]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class SystemDeviceTypeImportRequest(OCIRequest):
    """Request to import a Device Type Archive File (DTAF) as a new Device Type.  The URL supports the HTTP and the FILE protocols.
        When the optional element resellerId is specified, the device type created is at reseller level.
        When the optional element deviceTypeRename is set, on import, the device type name part of the DTAF will be changed to the desired name on the destination system.
        When the optional element deviceTypeFileUpdate is set, on import, the files that are matched based on the file format are updated with the ones from the DTAF. The file format and the file category are the only attributes that can't be updated.
        The response is either a SuccessResponse or an ErrorResponse.

        The following data elements are only used in AS data mode and ignored in XS data mode:
          deviceTypeFileUpdate
          deviceTypeRename
          resellerId

    Attributes:

        file (str):

        reseller_id (Optional[str]):

        device_type_rename (Optional[AccessDeviceTypeRename]):

        device_type_file_update (Optional[bool]):

    """

    file: str = field(metadata={"alias": "file"})

    reseller_id: Optional[str] = field(default=None, metadata={"alias": "resellerId"})

    device_type_rename: Optional[AccessDeviceTypeRename] = field(
        default=None, metadata={"alias": "deviceTypeRename"}
    )

    device_type_file_update: Optional[bool] = field(
        default=None, metadata={"alias": "deviceTypeFileUpdate"}
    )

Responses

Bases: OCIResponse

Source code in src/mercury_ocip/commands/base_command.py
class SuccessResponse(OCIResponse):
    pass

Bases: OCIResponse

Source code in src/mercury_ocip/commands/base_command.py
class ErrorResponse(OCIResponse):
    errorCode: Optional[int] = None
    summary: str
    summaryEnglish: str
    detail: Optional[str] = None

Example Usage

from mercury_ocip.client import Client
from mercury_ocip.commands import SystemDeviceTypeImportRequest

client = Client()

command = SystemDeviceTypeImportRequest(
    file=...,
    reseller_id=...,
    device_type_rename=...,
    device_type_file_update=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("SystemDeviceTypeImportRequest",
    file=...,
    reseller_id=...,
    device_type_rename=...,
    device_type_file_update=...,
)

print(response)