Documentation ¶
Overview ¶
Package devices devices/devices.go
Package devices devices/ngfw.go
Package devices devices/panorama.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceManager ¶
type DeviceManager struct {
// contains filtered or unexported fields
}
DeviceManager handles device-related operations
func NewDeviceManager ¶
func NewDeviceManager(conf *config.Config, l *logger.Logger) *DeviceManager
NewDeviceManager creates a new instance of DeviceManager with the provided configuration and logger. The panosClientFactory field is set to nil initially and can be set later based on the workflow. The function returns a pointer to the created DeviceManager.
func (*DeviceManager) GetDeviceCertificateStatus ¶ added in v1.0.4
func (dm *DeviceManager) GetDeviceCertificateStatus(deviceList []map[string]string)
GetDeviceCertificateStatus retrieves the output from the command `show device-certificate status` It will always leverage the pango SDK, and only interact with NGFW devices It will update each device in the deviceList with the certificate status information
func (*DeviceManager) GetDeviceList ¶
func (dm *DeviceManager) GetDeviceList(noPanorama bool) ([]map[string]string, error)
GetDeviceList retrieves a list of devices and their information. If noPanorama is true, it retrieves the devices from the local inventory file. If noPanorama is false, it retrieves the devices from Panorama. It returns the list of devices as an array of maps, where each map contains the device information.
func (*DeviceManager) SetNgfwWorkflow ¶ added in v1.0.1
func (dm *DeviceManager) SetNgfwWorkflow()
SetNgfwWorkflow sets the PAN-OS client factory to create a real PAN-OS client for NGFW.
func (*DeviceManager) SetPanoramaWorkflow ¶ added in v1.0.1
func (dm *DeviceManager) SetPanoramaWorkflow()
SetPanoramaWorkflow sets the PAN-OS client factory to create a real Panorama client.
type PanosClient ¶ added in v1.0.1
type PanosClient interface { Initialize() error Op(cmd interface{}, vsys string, extras interface{}, ans interface{}) ([]byte, error) }
PanosClient interface for the PAN-OS operations we need
type PanosClientFactory ¶ added in v1.0.1
type PanosClientFactory func(hostname, username, password string) PanosClient
PanosClientFactory is a function type that creates a PanosClient