Skip to content

SystemFileGetContentRequest

Bases: OCIRequest

Requests the contents of a file. This transaction is only allowed to get content for files under /var/broadworks/userfiles/AuditLogs/ or /var/broadworks/IpDeviceConfig/. The response is either a SystemFileGetContentResponse or an ErrorResponse.

Attributes:

file_name (str):
Source code in src/mercury_ocip_fast/commands/commands.py
@dataclass(kw_only=True)
class SystemFileGetContentRequest(OCIRequest):
    """Requests the contents of a file.  This transaction is only allowed to get content for files under
        /var/broadworks/userfiles/AuditLogs/ or /var/broadworks/IpDeviceConfig/.
        The response is either a SystemFileGetContentResponse or an ErrorResponse.

    Attributes:

        file_name (str):

    """

    file_name: str = field(metadata={"alias": "fileName"})

Responses

Bases: OCIDataResponse

Response to a SystemFileGetContentRequest. The fileContent length returned is limited to 128KBytes.

Attributes:

file_content (int):
Source code in src/mercury_ocip_fast/commands/commands.py
@dataclass(kw_only=True)
class SystemFileGetContentResponse(OCIDataResponse):
    """Response to a SystemFileGetContentRequest. The fileContent length returned is limited to 128KBytes.

    Attributes:

        file_content (int):

    """

    file_content: int = field(metadata={"alias": "fileContent"})

Bases: OCIResponse

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

Example Usage

from mercury_ocip_fast.client import Client
from mercury_ocip_fast.commands import SystemFileGetContentRequest

client = Client()

command = SystemFileGetContentRequest(
    file_name=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip_fast.client import Client

client = Client()

response = client.raw_command("SystemFileGetContentRequest",
    file_name=...,
)

print(response)