network_based_device_ha

package
v2.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package network_based_device_ha contains HA device functionality on security.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractHADevicesInto

func ExtractHADevicesInto(r pagination.Page, v interface{}) error

ExtractHADevicesInto interprets the results of a single page from a List() call, producing a slice of Device entities.

func List

func List(client *eclcloud.ServiceClient, opts ListOptsBuilder) pagination.Pager

List enumerates the Devices to which the current token has access.

Types

type CreateOpts

type CreateOpts struct {
	SOKind   string            `json:"sokind" required:"true"`
	TenantID string            `json:"tenant_id" required:"true"`
	Locale   string            `json:"locale,omitempty"`
	GtHost   [2]GtHostInCreate `json:"gt_host" required:"true"`
}

CreateOpts represents parameters used to create a device.

func (CreateOpts) ToHADeviceCreateMap

func (opts CreateOpts) ToHADeviceCreateMap() (map[string]interface{}, error)

ToHADeviceCreateMap formats a CreateOpts into a create request.

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToHADeviceCreateMap() (map[string]interface{}, error)
}

CreateOptsBuilder allows extensions to add additional parameters to the Create request.

type CreateResult

type CreateResult struct {
	// contains filtered or unexported fields
}

CreateResult represents the result of a create operation. Call its Extract method to interpret it as a HA Device.

func Create

func Create(client *eclcloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)

Create creates a new device.

func (CreateResult) Extract

func (r CreateResult) Extract() (*HADeviceOrder, error)

Extract is a function that accepts a result and extracts a HA Device resource.

func (CreateResult) ExtractInto

func (r CreateResult) ExtractInto(v interface{}) error

Extract interprets any commonResult as a HA Device if possible.

type DeleteOpts

type DeleteOpts struct {
	SOKind   string            `json:"sokind" required:"true"`
	TenantID string            `json:"tenant_id" required:"true"`
	GtHost   [2]GtHostInDelete `json:"gt_host" required:"true"`
}

DeleteOpts represents parameters used to delete a device.

func (DeleteOpts) ToHADeviceDeleteMap

func (opts DeleteOpts) ToHADeviceDeleteMap() (map[string]interface{}, error)

ToHADeviceDeleteMap formats a DeleteOpts into a delete request.

type DeleteOptsBuilder

type DeleteOptsBuilder interface {
	ToHADeviceDeleteMap() (map[string]interface{}, error)
}

DeleteOptsBuilder allows extensions to add additional parameters to the Delete request.

type DeleteResult

type DeleteResult struct {
	// contains filtered or unexported fields
}

DeleteResult represents the result of a delete operation. Call its ExtractErr method to determine if the request succeeded or failed.

func Delete

func Delete(client *eclcloud.ServiceClient, deviceType string, opts DeleteOptsBuilder) (r DeleteResult)

Delete deletes a device.

func (DeleteResult) Extract

func (r DeleteResult) Extract() (*HADeviceOrder, error)

Extract is a function that accepts a result and extracts a HA Device resource.

func (DeleteResult) ExtractInto

func (r DeleteResult) ExtractInto(v interface{}) error

Extract interprets any commonResult as a HA Device if possible.

type GetResult

type GetResult struct {
	// contains filtered or unexported fields
}

GetResult represents the result of a get operation. Call its Extract method to interpret it as a HA Device.

func (GetResult) Extract

func (r GetResult) Extract() (*HADeviceOrder, error)

Extract is a function that accepts a result and extracts a HA Device resource.

func (GetResult) ExtractInto

func (r GetResult) ExtractInto(v interface{}) error

Extract interprets any commonResult as a HA Device if possible.

type GtHostInCreate

type GtHostInCreate struct {
	OperatingMode string `json:"operatingmode" required:"true"`
	LicenseKind   string `json:"licensekind" required:"true"`
	AZGroup       string `json:"azgroup" required:"true"`

	HALink1NetworkID string `json:"halink1networkid" required:"true"`
	HALink1SubnetID  string `json:"halink1subnetid" required:"true"`
	HALink1IPAddress string `json:"halink1ipaddress" required:"true"`

	HALink2NetworkID string `json:"halink2networkid" required:"true"`
	HALink2SubnetID  string `json:"halink2subnetid" required:"true"`
	HALink2IPAddress string `json:"halink2ipaddress" required:"true"`
}

GtHostInCreate represents parameters used to create a HA Device.

type GtHostInDelete

type GtHostInDelete struct {
	HostName string `json:"hostname" required:"true"`
}

GtHostInDelete represents parameters used to delete a HA Device.

type GtHostInUpdate

type GtHostInUpdate struct {
	OperatingMode string `json:"operatingmode" required:"true"`
	LicenseKind   string `json:"licensekind" required:"true"`
	HostName      string `json:"hostname" required:"true"`
}

GtHostInUpdate represents parameters used to update a HA Device.

type HADevice

type HADevice struct {
	ID   int      `json:"id"`
	Cell []string `json:"cell"`
}

HADevice represents the result of a each element in response of HA Device api result.

func ExtractHADevices

func ExtractHADevices(r pagination.Page) ([]HADevice, error)

ExtractHADevices accepts a Page struct, specifically a HADevicePage struct, and extracts the elements into a slice of HA Device structs. In other words, a generic collection is mapped into a relevant slice.

type HADeviceOrder

type HADeviceOrder struct {
	ID      string `json:"soId"`
	Code    string `json:"code"`
	Message string `json:"message"`
	Status  int    `json:"status"`
}

HADeviceOrder represents a HA Device's each order.

type HADevicePage

type HADevicePage struct {
	pagination.LinkedPageBase
}

HADevicePage is the page returned by a pager when traversing over a collection of HA Device.

func (HADevicePage) IsEmpty

func (r HADevicePage) IsEmpty() (bool, error)

IsEmpty checks whether a HADevicePage struct is empty.

func (HADevicePage) NextPageURL

func (r HADevicePage) NextPageURL() (string, error)

NextPageURL is invoked when a paginated collection of HA Device has reached the end of a page and the pager seeks to traverse over a new one. In order to do this, it needs to construct the next page's URL.

type ListOpts

type ListOpts struct {
	TenantID string `q:"tenant_id"`
	Locale   string `q:"locale"`
}

ListOpts enables filtering of a list request.

func (ListOpts) ToHADeviceQuery

func (opts ListOpts) ToHADeviceQuery() (string, error)

ToHADeviceQuery formats a ListOpts into a query string.

type ListOptsBuilder

type ListOptsBuilder interface {
	ToHADeviceQuery() (string, error)
}

ListOptsBuilder allows extensions to add additional parameters to the List request

type UpdateOpts

type UpdateOpts struct {
	SOKind   string            `json:"sokind" required:"true"`
	Locale   string            `json:"locale,omitempty"`
	TenantID string            `json:"tenant_id" required:"true"`
	GtHost   [2]GtHostInUpdate `json:"gt_host" required:"true"`
}

UpdateOpts represents parameters to update a HA Device.

func (UpdateOpts) ToHADeviceUpdateMap

func (opts UpdateOpts) ToHADeviceUpdateMap() (map[string]interface{}, error)

ToHADeviceUpdateMap formats a UpdateOpts into an update request.

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToHADeviceUpdateMap() (map[string]interface{}, error)
}

UpdateOptsBuilder allows extensions to add additional parameters to the Update request.

type UpdateResult

type UpdateResult struct {
	// contains filtered or unexported fields
}

UpdateResult represents the result of an update operation. Call its Extract method to interpret it as a HA Device.

func Update

func Update(client *eclcloud.ServiceClient, opts UpdateOptsBuilder) (r UpdateResult)

Update modifies the attributes of a device.

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*HADeviceOrder, error)

Extract is a function that accepts a result and extracts a HA Device resource.

func (UpdateResult) ExtractInto

func (r UpdateResult) ExtractInto(v interface{}) error

Extract interprets any commonResult as a HA Device if possible.

Directories

Path Synopsis
Package testing contains network based security HA device unittests
Package testing contains network based security HA device unittests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL