Skip to content

SystemDeviceManagementTagSetImportRequest

Bases: OCIRequest

Request to import a Tag Set Archive File (TSAF) as a new Tag Set. 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 tagSetOverride is set to true, an existing tag set on the destination system will be overridden. When the optional element tagSetRename is set, on import the tag set name part of the TSAF will be changed to the desired name on the destination system. 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:
  resellerId

Attributes:

file (str):

reseller_id (Optional[str]):

tag_set_override (Optional[bool]):

tag_set_rename (Optional[DeviceManagementTagSetRename]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class SystemDeviceManagementTagSetImportRequest(OCIRequest):
    """Request to import a Tag Set Archive File (TSAF) as a new Tag Set.  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 tagSetOverride is set to true, an existing tag set on the destination system will be overridden.
        When the optional element tagSetRename is set, on import the tag set name part of the TSAF will be changed to the desired name on the destination system.
        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:
          resellerId

    Attributes:

        file (str):

        reseller_id (Optional[str]):

        tag_set_override (Optional[bool]):

        tag_set_rename (Optional[DeviceManagementTagSetRename]):

    """

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

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

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

    tag_set_rename: Optional[DeviceManagementTagSetRename] = field(
        default=None, metadata={"alias": "tagSetRename"}
    )

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 SystemDeviceManagementTagSetImportRequest

client = Client()

command = SystemDeviceManagementTagSetImportRequest(
    file=...,
    reseller_id=...,
    tag_set_override=...,
    tag_set_rename=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("SystemDeviceManagementTagSetImportRequest",
    file=...,
    reseller_id=...,
    tag_set_override=...,
    tag_set_rename=...,
)

print(response)