Represents an abstract base class for PAN-OS configuration objects that are version-specific. Derived classes must implement methods to define object-specific XPaths, provide XML representations for API requests, and parse configuration data.

Hierarchy

Constructors

Properties

_apiClient: null | ApiClient
children: PanObject[]
name: string
parent: null | PanObject

Accessors

  • get apiClient(): ApiClient
  • Retrieves the ApiClient from the current instance or its parent hierarchy.

    Returns ApiClient

    The ApiClient associated with this object.

    Throws

    An error if the ApiClient instance is not found in the hierarchy.

Methods

  • Adds a PanObject as a child to this object, establishing a parent-child relationship.

    Parameters

    • child: PanObject

      The PanObject to be added as a child.

    Returns void

  • Issues an API request to apply changes to this configuration object on the PAN-OS device. It effectively replaces the object at its XPath location with the current object state.

    Returns Promise<void>

    A promise that resolves once the changes have been successfully applied.

  • Issues an API request to create this configuration object on the PAN-OS device.

    Returns Promise<void>

    A promise that resolves once the object has been successfully created.

  • Locates a child PanObject within the configuration tree by name and, optionally, by type.

    Type Parameters

    Parameters

    • name: string

      The name of the object to search for.

    • Optional classType: (new (...args) => ObjectType)

      Optional. The class constructor to match instances against.

        • new (...args): ObjectType
        • Parameters

          • Rest ...args: unknown[]

          Returns ObjectType

    Returns null | ObjectType

    The matching PanObject instance, or null if not found.

  • Constructs the XPath for the PAN-OS configuration context of the object.

    Returns string

    The XPath string corresponding to the object's location in the PAN-OS configuration hierarchy.

    Abstract

  • Checks if a given PanObject is a child of this object.

    Parameters

    Returns boolean

    true if the specified PanObject is a child of this object, otherwise false.

  • Interprets configuration data and parses it into an array of PanObject instances.

    Parameters

    • config: unknown

      The configuration data retrieved from the PAN-OS device.

    Returns PanObject[]

    An array of PanObject instances derived from the configuration data.

    Abstract

  • Removes a PanObject from this object's children, severing the parent-child relationship.

    Parameters

    • child: PanObject

      The PanObject to be removed from the children.

    Returns void

  • Serializes the object state to its XML representation tailored for PAN-OS API interactions.

    Returns string

    An XML string representing the object's state for the API.

    Abstract

Generated using TypeDoc