nmsclient

package
v0.0.2-0...-a5d442b Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const MACADDR_ZERO = "00:00:00:00:00:00"

Variables

View Source
var ValidateConnector = validateConnector

Functions

This section is empty.

Types

type ADMApplications

type ADMApplications struct {
	Metadata struct {
		Name           string `json:"name"`
		Description    string `json:"description",omitempty`
		EnvironmentRef struct {
			Ref  string `json:"ref",omitempty`
			Name string `json:"name",omitempty`
		} `json:"environmentRef",omitempty`
		Tags []string `json:"tags",omitempty`
	} `json:"metadata"`
	TCPUDPComponentRefs []struct {
		Ref  string `json:"ref",omitempty`
		Name string `json:"name",omitempty`
	} `json:"tcpUdpComponentRefs",omitempty`
	WebComponentRefs []struct {
		Ref  string `json:"ref",omitempty`
		Name string `json:"name",omitempty`
	} `json:"webComponentRefs",omitempty`
}

type ADMEnvironment

type ADMEnvironment struct {
	Metadata struct {
		Name        string   `json:"name"`
		Description string   `json:"description",omitempty`
		Tags        []string `json:"tags",omitempty`
	} `json:"metadata"`
}

ADM ENvironment JSON object representation

func NewEnvironment

func NewEnvironment(environment ADMEnvironment) *ADMEnvironment

type ADMGateway

type ADMGateway struct {
	Metadata struct {
		Name           string `json:"name"`
		Description    string `json:"description",omitempty`
		EnvironmentRef struct {
			Ref  string `json:"ref"`
			Name string `json:"name"`
		} `json:"environmentRef"`
		Tags       []string  `json:"tags"`
		UID        string    `json:"uid"`
		UpdateTime time.Time `json:"updateTime"`
	} `json:"metadata"`
	CustomExtensions struct {
	} `json:"customExtensions",omitempty`
	Ingress struct {
		Placement struct {
			InstanceGroupRefs []struct {
				ListenIps struct {
					Value string `json:"value"`
				} `json:"listenIps"`
			} `json:"instanceGroupRefs"`
		} `json:"placement"`
		TLS struct {
			CertRef struct {
				Ref  string `json:"ref"`
				Name string `json:"name"`
			} `json:"certRef"`
			Cipher             string   `json:"cipher"`
			PreferServerCipher string   `json:"preferServerCipher"`
			Protocols          []string `json:"protocols"`
			SessionCache       string   `json:"sessionCache"`
		} `json:"tls"`
		Uris struct {
			Doloreda struct {
				CustomExtensions struct {
				} `json:"customExtensions"`
				MatchMethod    string `json:"matchMethod"`
				ServerPoolPort int    `json:"serverPoolPort"`
				TLS            struct {
					CertRef struct {
						Value string `json:"value"`
					} `json:"certRef"`
					Cipher struct {
						Value string `json:"value"`
					} `json:"cipher"`
					PreferServerCipher struct {
						Value string `json:"value"`
					} `json:"preferServerCipher"`
					Protocols struct {
						Value string `json:"value"`
					} `json:"protocols"`
					SessionCache struct {
						Value string `json:"value"`
					} `json:"sessionCache"`
				} `json:"tls"`
			} `json:"doloreda"`
		} `json:"uris"`
	} `json:"ingress"`
}

func NewGateway

func NewGateway(gateway ADMGateway) *ADMGateway

type AuthConfig

type AuthConfig struct {
	Username string
	Password string

	ClientCert []byte
	ClientKey  []byte
}

type Bool

type Bool bool

func (Bool) MarshalJSON

func (b Bool) MarshalJSON() ([]byte, error)

type CapacityReport

type CapacityReport struct {
	IBBase `json:"-"`
	Ref    string `json:"_ref,omitempty"`

	Name         string                   `json:"name,omitempty"`
	HardwareType string                   `json:"hardware_type,omitempty"`
	MaxCapacity  int                      `json:"max_capacity,omitempty"`
	ObjectCount  []map[string]interface{} `json:"object_counts,omitempty"`
	PercentUsed  int                      `json:"percent_used,omitempty"`
	Role         string                   `json:"role,omitempty"`
	TotalObjects int                      `json:"total_objects,omitempty"`
}

CapacityReport represents capacityreport object

func NewCapcityReport

func NewCapcityReport(capReport CapacityReport) *CapacityReport

type Connector

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

func NewConnector

func NewConnector(hostConfig HostConfig, authCfg AuthConfig, transportConfig TransportConfig,
	requestBuilder HttpRequestBuilder, requestor HttpRequestor) (res *Connector, err error)

func (*Connector) CreateObject

func (c *Connector) CreateObject(obj NMSObject) (ref string, err error)

func (*Connector) DeleteObject

func (c *Connector) DeleteObject(ref string) (refRes string, err error)

func (*Connector) GetObject

func (c *Connector) GetObject(
	obj NMSObject, ref string,
	queryParams *QueryParams, res interface{}) (err error)

func (*Connector) Logout

func (c *Connector) Logout() (err error)

Logout sends a request to invalidate the ibapauth cookie and should be used in a defer statement after the Connector has been successfully initialized.

func (*Connector) UpdateObject

func (c *Connector) UpdateObject(obj NMSObject, ref string) (refRes string, err error)

type DNSView

type DNSView struct {
	IBBase      `json:"-"`
	Ref         string `json:"_ref"`
	Name        string `json:"name"`
	NetworkView string `json:"network_view"`
	Comment     string `json:"comment"`
	Ea          EA     `json:"extattrs"`
}

func NewEmptyDNSView

func NewEmptyDNSView() *DNSView

type EA

type EA map[string]interface{}

func (EA) Count

func (ea EA) Count() int

func (EA) MarshalJSON

func (ea EA) MarshalJSON() ([]byte, error)

func (*EA) UnmarshalJSON

func (ea *EA) UnmarshalJSON(b []byte) (err error)

type EADefListValue

type EADefListValue string

func (EADefListValue) MarshalJSON

func (v EADefListValue) MarshalJSON() ([]byte, error)

func (*EADefListValue) UnmarshalJSON

func (v *EADefListValue) UnmarshalJSON(b []byte) (err error)

type EADefinition

type EADefinition struct {
	IBBase             `json:"-"`
	Ref                string           `json:"_ref,omitempty"`
	Comment            string           `json:"comment"`
	Flags              string           `json:"flags,omitempty"`
	ListValues         []EADefListValue `json:"list_values,omitempty"`
	Name               string           `json:"name,omitempty"`
	Type               string           `json:"type,omitempty"`
	AllowedObjectTypes []string         `json:"allowed_object_types,omitempty"`
}

func NewEADefinition

func NewEADefinition(eadef EADefinition) *EADefinition

type EASearch

type EASearch map[string]interface{}

func (EASearch) MarshalJSON

func (eas EASearch) MarshalJSON() ([]byte, error)

type FixedAddress

type FixedAddress struct {
	IBBase      `json:"-"`
	Ref         string `json:"_ref,omitempty"`
	NetviewName string `json:"network_view,omitempty"`
	Cidr        string `json:"network,omitempty"`
	Comment     string `json:"comment"`
	IPv4Address string `json:"ipv4addr,omitempty"`
	IPv6Address string `json:"ipv6addr,omitempty"`
	Duid        string `json:"duid,omitempty"`
	Mac         string `json:"mac,omitempty"`
	Name        string `json:"name,omitempty"`
	MatchClient string `json:"match_client,omitempty"`
	Ea          EA     `json:"extattrs"`
}

func NewEmptyFixedAddress

func NewEmptyFixedAddress(isIPv6 bool) *FixedAddress

func NewFixedAddress

func NewFixedAddress(
	netView string,
	name string,
	ipAddr string,
	cidr string,
	macOrDuid string,
	clients string,
	eas EA,
	ref string,
	isIPv6 bool,
	comment string) *FixedAddress

type Grid

type Grid struct {
	IBBase     `json:"-"`
	Ref        string      `json:"_ref,omitempty"`
	Name       string      `json:"name,omitempty"`
	NTPSetting *NTPSetting `json:"ntp_setting,omitempty"`
}

func NewGrid

func NewGrid(grid Grid) *Grid

type HostConfig

type HostConfig struct {
	Host    string
	Version string
	Port    string
}

type HostRecord

type HostRecord struct {
	IBBase      `json:"-"`
	Ref         string               `json:"_ref,omitempty"`
	Ipv4Addr    string               `json:"ipv4addr,omitempty"`
	Ipv4Addrs   []HostRecordIpv4Addr `json:"ipv4addrs"`
	Ipv6Addr    string               `json:"ipv6addr,omitempty"`
	Ipv6Addrs   []HostRecordIpv6Addr `json:"ipv6addrs"`
	Name        string               `json:"name,omitempty"`
	View        string               `json:"view,omitempty"`
	Zone        string               `json:"zone,omitempty"`
	EnableDns   bool                 `json:"configure_for_dns"`
	NetworkView string               `json:"network_view,omitempty"`
	Comment     string               `json:"comment"`
	Ea          EA                   `json:"extattrs"`
	UseTtl      bool                 `json:"use_ttl"`
	Ttl         uint32               `json:"ttl"`
	Aliases     []string             `json:"aliases,omitempty"`
}

func NewEmptyHostRecord

func NewEmptyHostRecord() *HostRecord

func NewHostRecord

func NewHostRecord(
	netView string,
	name string,
	ipv4Addr string,
	ipv6Addr string,
	ipv4AddrList []HostRecordIpv4Addr,
	ipv6AddrList []HostRecordIpv6Addr,
	eas EA,
	enableDNS bool,
	dnsView string,
	zone string,
	ref string,
	useTtl bool,
	ttl uint32,
	comment string,
	aliases []string) *HostRecord

type HostRecordIpv4Addr

type HostRecordIpv4Addr struct {
	IBBase     `json:"-"`
	Ipv4Addr   string `json:"ipv4addr,omitempty"`
	Ref        string `json:"_ref,omitempty"`
	Mac        string `json:"mac"`
	View       string `json:"view,omitempty"`
	Cidr       string `json:"network,omitempty"`
	EnableDhcp bool   `json:"configure_for_dhcp"`
}

func NewEmptyHostRecordIpv4Addr

func NewEmptyHostRecordIpv4Addr() *HostRecordIpv4Addr

func NewHostRecordIpv4Addr

func NewHostRecordIpv4Addr(
	ipAddr string,
	macAddr string,
	enableDhcp bool,
	ref string) *HostRecordIpv4Addr

type HostRecordIpv6Addr

type HostRecordIpv6Addr struct {
	IBBase     `json:"-"`
	Ipv6Addr   string `json:"ipv6addr,omitempty"`
	Ref        string `json:"_ref,omitempty"`
	Duid       string `json:"duid"`
	View       string `json:"view,omitempty"`
	Cidr       string `json:"network,omitempty"`
	EnableDhcp bool   `json:"configure_for_dhcp"`
}

func NewEmptyHostRecordIpv6Addr

func NewEmptyHostRecordIpv6Addr() *HostRecordIpv6Addr

func NewHostRecordIpv6Addr

func NewHostRecordIpv6Addr(
	ipAddr string,
	duid string,
	enableDhcp bool,
	ref string) *HostRecordIpv6Addr

type HttpRequestBuilder

type HttpRequestBuilder interface {
	Init(HostConfig, AuthConfig)
	BuildUrl(r RequestType, objType string, ref string, returnFields []string, queryParams *QueryParams) (urlStr string)
	BuildBody(r RequestType, obj NMSObject) (jsonStr []byte)
	BuildRequest(r RequestType, obj NMSObject, ref string, queryParams *QueryParams) (req *http.Request, err error)
}

type HttpRequestor

type HttpRequestor interface {
	Init(AuthConfig, TransportConfig)
	SendRequest(*http.Request) ([]byte, error)
}

type Ipv6Setting

type Ipv6Setting struct {
	AutoRouterConfigEnabled bool   `json:"auto_router_config_enabled"`
	CidrPrefix              uint   `json:"cidr_prefix,omitempty"`
	Dscp                    uint   `json:"dscp,omitempty"`
	Enabled                 bool   `json:"enabled,omitempty"`
	Gateway                 string `json:"gateway"`
	Primary                 string `json:"primary,omitempty"`
	VirtualIp               string `json:"virtual_ip"`
	VlanId                  uint   `json:"vlan_id,emitempty"`
	UseDscp                 bool   `json:"use_dscp,omitempty"`
}

type LanHaPortSetting

type LanHaPortSetting struct {
	HAIpAddress    string              `json:"ha_ip_address,omitempty"`
	HaPortSetting  PhysicalPortSetting `json:"ha_port_setting,omitempty"`
	LanPortSetting PhysicalPortSetting `json:"lan_port_setting,omitempty"`
	MgmtIpv6addr   string              `json:"mgmt_ipv6addr,omitempty"`
	MgmtLan        string              `json:"mgmt_lan,omitempty"`
}

type License

type License struct {
	IBBase           `json:"-"`
	Ref              string `json:"_ref,omitempty"`
	ExpirationStatus string `json:"expiration_status,omitempty"`
	ExpiryDate       int    `json:"expiry_date,omitempty"`
	HwID             string `json:"hwid,omitempty"`
	Key              string `json:"key,omitempty"`
	Kind             string `json:"kind,omitempty"`
	Limit            string `json:"limit,omitempty"`
	LimitContext     string `json:"limit_context,omitempty"`
	Licensetype      string `json:"type,omitempty"`
}

License represents license wapi object

func NewGridLicense

func NewGridLicense(license License) *License

func NewLicense

func NewLicense(license License) *License

type Member

type Member struct {
	IBBase                   `json:"-"`
	Ref                      string     `json:"_ref,omitempty"`
	HostName                 string     `json:"host_name,omitempty"`
	ConfigAddrType           string     `json:"config_addr_type,omitempty"`
	PLATFORM                 string     `json:"platform,omitempty"`
	ServiceTypeConfiguration string     `json:"service_type_configuration,omitempty"`
	Nodeinfo                 []NodeInfo `json:"node_info,omitempty"`
	TimeZone                 string     `json:"time_zone,omitempty"`
}

Member represents NIOS member

func NewMember

func NewMember(member Member) *Member

type MultiRequest

type MultiRequest struct {
	IBBase `json:"-"`
	Body   []*RequestBody
}

func NewMultiRequest

func NewMultiRequest(body []*RequestBody) *MultiRequest

func (*MultiRequest) MarshalJSON

func (r *MultiRequest) MarshalJSON() ([]byte, error)

type NMSBase

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

func (*NMSBase) EaSearch

func (obj *NMSBase) EaSearch() EASearch

func (*NMSBase) ObjectType

func (obj *NMSBase) ObjectType() string

func (*NMSBase) ReturnFields

func (obj *NMSBase) ReturnFields() []string

type NMSConnector

type NMSConnector interface {
	CreateObject(obj NMSObject) (ref string, err error)
	GetObject(obj NMSObject, ref string, queryParams *QueryParams, res interface{}) error
	DeleteObject(ref string) (refRes string, err error)
	UpdateObject(obj NMSObject, ref string) (refRes string, err error)
}

type NMSObject

type NMSObject interface {
	ObjectType() string
	ReturnFields() []string
	EaSearch() EASearch
}

type NMSObjectManager

type NMSObjectManager interface {
	GetDNSView(name string) (*DNSView, error)
	CreateEnvironment(name string, description string, tags []string, eas EA) (*Network, error)
	GetEnvironment(name string, uuid string, eas EA) (*Network, error)
	UpdateEnvironment(name string, description string, tags []string, eas EA) (*Network, error)
	DeleteEnvironment(name string, uuid string, eas EA) (*Network, error)
}

type NTPSetting

type NTPSetting struct {
	EnableNTP  bool                   `json:"enable_ntp,omitempty"`
	NTPAcl     map[string]interface{} `json:"ntp_acl,omitempty"`
	NTPKeys    []string               `json:"ntp_keys,omitempty"`
	NTPKod     bool                   `json:"ntp_kod,omitempty"`
	NTPServers []NTPserver            `json:"ntp_servers,omitempty"`
}

type NTPserver

type NTPserver struct {
	Address              string `json:"address,omitempty"`
	Burst                bool   `json:"burst,omitempty"`
	EnableAuthentication bool   `json:"enable_authentication,omitempty"`
	IBurst               bool   `json:"iburst,omitempty"`
	NTPKeyNumber         uint   `json:"ntp_key_number,omitempty"`
	Preffered            bool   `json:"preffered,omitempty"`
}

type NameServer

type NameServer struct {
	Address string `json:"address,omitempty"`
	Name    string `json:"name,omitempty"`
}

type NapiHttpRequestor

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

func (*NapiHttpRequestor) Init

func (whr *NapiHttpRequestor) Init(authCfg AuthConfig, trCfg TransportConfig)

func (*NapiHttpRequestor) SendRequest

func (whr *NapiHttpRequestor) SendRequest(req *http.Request) (res []byte, err error)

type NapiRequestBuilder

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

func NewNapiRequestBuilder

func NewNapiRequestBuilder(hostCfg HostConfig, authCfg AuthConfig) (*NapiRequestBuilder, error)

func (*NapiRequestBuilder) BuildBody

func (wrb *NapiRequestBuilder) BuildBody(t RequestType, obj NMSObject) []byte

func (*NapiRequestBuilder) BuildRequest

func (wrb *NapiRequestBuilder) BuildRequest(t RequestType, obj NMSObject, ref string, queryParams *QueryParams) (req *http.Request, err error)

func (*NapiRequestBuilder) BuildUrl

func (wrb *NapiRequestBuilder) BuildUrl(t RequestType, objType string, ref string, returnFields []string, queryParams *QueryParams) (urlStr string)

func (*NapiRequestBuilder) Init

func (wrb *NapiRequestBuilder) Init(hostCfg HostConfig, authCfg AuthConfig)

type Network

type Network struct {
	NMSBase
	Ref         string `json:"_ref,omitempty"`
	NetviewName string `json:"network_view,omitempty"`
	Cidr        string `json:"network,omitempty"`
	Ea          EA     `json:"extattrs"`
	Comment     string `json:"comment"`
}

func NewNetwork

func NewNetwork(netview string, cidr string, isIPv6 bool, comment string, ea EA) *Network

type NetworkContainer

type NetworkContainer struct {
	IBBase      `json:"-"`
	Ref         string `json:"_ref,omitempty"`
	NetviewName string `json:"network_view,omitempty"`
	Cidr        string `json:"network,omitempty"`
	Comment     string `json:"comment"`
	Ea          EA     `json:"extattrs"`
}

func NewNetworkContainer

func NewNetworkContainer(netview, cidr string, isIPv6 bool, comment string, ea EA) *NetworkContainer

type NetworkContainerNextAvailable

type NetworkContainerNextAvailable struct {
	IBBase  `json:"-"`
	Network *NetworkContainerNextAvailableInfo `json:"network"`
	Comment string                             `json:"comment"`
	Ea      EA                                 `json:"extattrs"`
}

func NewNetworkContainerNextAvailable

func NewNetworkContainerNextAvailable(ncav *NetworkContainerNextAvailableInfo, isIPv6 bool, comment string, ea EA) *NetworkContainerNextAvailable

type NetworkContainerNextAvailableInfo

type NetworkContainerNextAvailableInfo struct {
	Function     string            `json:"_object_function"`
	ResultField  string            `json:"_result_field"`
	Object       string            `json:"_object"`
	ObjectParams map[string]string `json:"_object_parameters"`
	Params       map[string]uint   `json:"_parameters"`
	NetviewName  string            `json:"network_view,omitempty"`
}

func NewNetworkContainerNextAvailableInfo

func NewNetworkContainerNextAvailableInfo(netview, cidr string, prefixLen uint, isIPv6 bool) *NetworkContainerNextAvailableInfo

type NetworkSetting

type NetworkSetting struct {
	Address    string `json:"address"`
	Dscp       uint   `json:"dscp"`
	Gateway    string `json:"gateway"`
	Primary    bool   `json:"primary"`
	SubnetMask string `json:"subnet_mask"`
	UseDscp    bool   `json:"use_dscp,omiempty"`
	VlanId     uint   `json:"vlan_id,omitempty"`
}

type NetworkView

type NetworkView struct {
	NMSBase `json:"-"`
	Ref     string `json:"_ref,omitempty"`
	Name    string `json:"name,omitempty"`
	Comment string `json:"comment"`
	Ea      EA     `json:"extattrs"`
}

func NewEmptyNetworkView

func NewEmptyNetworkView() *NetworkView

func NewNetworkView

func NewNetworkView(name string, comment string, eas EA, ref string) *NetworkView

type NodeInfo

type NodeInfo struct {
	HaStatus             string              `json:"ha_status,omitempty"`
	HwId                 string              `json:"hwid,omitempty"`
	HwModel              string              `json:"hwmodel,omitempty"`
	HwPlatform           string              `json:"hwplatform,omitempty"`
	HwType               string              `json:"hwtype,omitempty"`
	Lan2PhysicalSetting  PhysicalPortSetting `json:"lan2_physical_setting,omitempty"`
	LanHaPortSetting     LanHaPortSetting    `json:"lan_ha_Port_Setting,omitempty"`
	MgmtNetworkSetting   NetworkSetting      `json:"mgmt_network_setting,omitempty"`
	MgmtPhysicalSetting  PhysicalPortSetting `json:"mgmt_physical_setting,omitempty"`
	PaidNios             bool                `json:"paid_nios,omitempty"`
	PhysicalOid          string              `json:"physical_oid,omitempty"`
	ServiceStatus        []ServiceStatus     `json:"service_status,omitempty"`
	V6MgmtNetworkSetting Ipv6Setting         `json:"v6_mgmt_network_setting,omitempty"`
}

type ObjectManager

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

func (*ObjectManager) CreateEnvironment

func (objMgr *ObjectManager) CreateEnvironment(
	name string,
	description string,
	tags []string,
	eas EA) (*RecordA, error)

func (*ObjectManager) CreateMultiObject

func (objMgr *ObjectManager) CreateMultiObject(req *MultiRequest) ([]map[string]interface{}, error)

CreateMultiObject unmarshals the result into slice of maps

func (*ObjectManager) CreateZoneAuth

func (objMgr *ObjectManager) CreateZoneAuth(
	fqdn string,
	eas EA) (*ZoneAuth, error)

CreateZoneAuth creates zones and subs by passing fqdn

func (*ObjectManager) CreateZoneDelegated

func (objMgr *ObjectManager) CreateZoneDelegated(fqdn string, delegate_to []NameServer) (*ZoneDelegated, error)

CreateZoneDelegated creates delegated zone

func (*ObjectManager) DeleteEnvironment

func (objMgr *ObjectManager) DeleteEnvironment(ref string) (string, error)

func (*ObjectManager) DeleteZoneAuth

func (objMgr *ObjectManager) DeleteZoneAuth(ref string) (string, error)

DeleteZoneAuth deletes an auth zone

func (*ObjectManager) DeleteZoneDelegated

func (objMgr *ObjectManager) DeleteZoneDelegated(ref string) (string, error)

DeleteZoneDelegated deletes delegated zone

func (*ObjectManager) GetAllMembers

func (objMgr *ObjectManager) GetAllMembers() ([]Member, error)

GetAllMembers returns all members information

func (*ObjectManager) GetCapacityReport

func (objMgr *ObjectManager) GetCapacityReport(name string) ([]CapacityReport, error)

GetCapacityReport returns all capacity for members

func (*ObjectManager) GetEnvironment

func (objMgr *ObjectManager) GetEnvironment(dnsview string, recordName string, ipAddr string) (*RecordA, error)

func (*ObjectManager) GetEnvironmentByUUID

func (objMgr *ObjectManager) GetEnvironmentByUUID(ref string) (*RecordA, error)

func (*ObjectManager) GetGridInfo

func (objMgr *ObjectManager) GetGridInfo() ([]Grid, error)

GetGridInfo returns the details for grid

func (*ObjectManager) GetGridLicense

func (objMgr *ObjectManager) GetGridLicense() ([]License, error)

GetLicense returns the license details for grid

func (*ObjectManager) GetLicense

func (objMgr *ObjectManager) GetLicense() ([]License, error)

GetLicense returns the license details for member

func (*ObjectManager) GetUpgradeStatus

func (objMgr *ObjectManager) GetUpgradeStatus(statusType string) ([]UpgradeStatus, error)

GetUpgradeStatus returns the grid upgrade information

func (*ObjectManager) GetZoneAuth

func (objMgr *ObjectManager) GetZoneAuth() ([]ZoneAuth, error)

GetZoneAuth returns the authoritatives zones

func (*ObjectManager) GetZoneAuthByRef

func (objMgr *ObjectManager) GetZoneAuthByRef(ref string) (*ZoneAuth, error)

Retreive a authortative zone by ref

func (*ObjectManager) GetZoneDelegated

func (objMgr *ObjectManager) GetZoneDelegated(fqdn string) (*ZoneDelegated, error)

GetZoneDelegated returns the delegated zone

func (*ObjectManager) UpdateEnvironment

func (objMgr *ObjectManager) UpdateEnvironment(
	ref string,
	name string,
	ipAddr string,
	cidr string,
	netView string,
	ttl uint32,
	useTTL bool,
	comment string,
	eas EA) (*RecordA, error)

func (*ObjectManager) UpdateZoneDelegated

func (objMgr *ObjectManager) UpdateZoneDelegated(ref string, delegate_to []NameServer) (*ZoneDelegated, error)

UpdateZoneDelegated updates delegated zone

type PhysicalPortSetting

type PhysicalPortSetting struct {
	AutoPortSettingEnabled bool   `json:"auto_port_setting_enabled"`
	Duplex                 string `json:"duplex,omitempty"`
	Speed                  string `json:"speed,omitempty"`
}

type QueryParams

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

This is a general struct to add query params used in makeRequest

func NewQueryParams

func NewQueryParams(forceProxy bool, searchFields map[string]string) *QueryParams

type RecordA

type RecordA struct {
	IBBase   `json:"-"`
	Ref      string `json:"_ref,omitempty"`
	Ipv4Addr string `json:"ipv4addr,omitempty"`
	Name     string `json:"name,omitempty"`
	View     string `json:"view,omitempty"`
	Zone     string `json:"zone,omitempty"`
	UseTtl   bool   `json:"use_ttl"`
	Ttl      uint32 `json:"ttl"`
	Comment  string `json:"comment"`
	Ea       EA     `json:"extattrs"`
}

func NewEmptyRecordA

func NewEmptyRecordA() *RecordA

func NewRecordA

func NewRecordA(
	view string,
	zone string,
	name string,
	ipAddr string,
	ttl uint32,
	useTTL bool,
	comment string,
	eas EA,
	ref string) *RecordA

type RecordAAAA

type RecordAAAA struct {
	IBBase   `json:"-"`
	Ref      string `json:"_ref,omitempty"`
	Ipv6Addr string `json:"ipv6addr,omitempty"`
	Name     string `json:"name,omitempty"`
	View     string `json:"view,omitempty"`
	Zone     string `json:"zone,omitempty"`
	UseTtl   bool   `json:"use_ttl"`
	Ttl      uint32 `json:"ttl"`
	Comment  string `json:"comment"`
	Ea       EA     `json:"extattrs"`
}

func NewEmptyRecordAAAA

func NewEmptyRecordAAAA() *RecordAAAA

func NewRecordAAAA

func NewRecordAAAA(
	view string,
	name string,
	ipAddr string,
	useTtl bool,
	ttl uint32,
	comment string,
	eas EA,
	ref string) *RecordAAAA

type RecordCNAME

type RecordCNAME struct {
	IBBase    `json:"-"`
	Ref       string `json:"_ref,omitempty"`
	Canonical string `json:"canonical,omitempty"`
	Name      string `json:"name,omitempty"`
	View      string `json:"view,omitempty"`
	Zone      string `json:"zone,omitempty"`
	Ea        EA     `json:"extattrs"`
	Comment   string `json:"comment"`
	UseTtl    bool   `json:"use_ttl"`
	Ttl       uint32 `json:"ttl"`
}

func NewEmptyRecordCNAME

func NewEmptyRecordCNAME() *RecordCNAME

func NewRecordCNAME

func NewRecordCNAME(dnsView string,
	canonical string,
	recordName string,
	useTtl bool,
	ttl uint32,
	comment string,
	ea EA,
	ref string) *RecordCNAME

type RecordPTR

type RecordPTR struct {
	IBBase   `json:"-"`
	Ref      string `json:"_ref,omitempty"`
	Ipv4Addr string `json:"ipv4addr,omitempty"`
	Ipv6Addr string `json:"ipv6addr,omitempty"`
	Name     string `json:"name,omitempty"`
	PtrdName string `json:"ptrdname,omitempty"`
	View     string `json:"view,omitempty"`
	Zone     string `json:"zone,omitempty"`
	Ea       EA     `json:"extattrs"`
	UseTtl   bool   `json:"use_ttl"`
	Ttl      uint32 `json:"ttl"`
	Comment  string `json:"comment"`
}

func NewEmptyRecordPTR

func NewEmptyRecordPTR() *RecordPTR

func NewRecordPTR

func NewRecordPTR(dnsView string, ptrdname string, useTtl bool, ttl uint32, comment string, ea EA) *RecordPTR

type RecordTXT

type RecordTXT struct {
	IBBase  `json:"-"`
	View    string `json:"view,omitempty"`
	Zone    string `json:"zone,omitempty"`
	Ref     string `json:"_ref,omitempty"`
	Name    string `json:"name,omitempty"`
	Text    string `json:"text,omitempty"`
	Ttl     uint32 `json:"ttl"`
	UseTtl  bool   `json:"use_ttl"`
	Comment string `json:"comment"`
	Ea      EA     `json:"extattrs"`
}

func NewEmptyRecordTXT

func NewEmptyRecordTXT() *RecordTXT

func NewRecordTXT

func NewRecordTXT(
	dnsview string,
	zone string,
	recordname string,
	text string,
	ttl uint32,
	useTtl bool,
	comment string,
	eas EA) *RecordTXT

type RequestBody

type RequestBody struct {
	Data               map[string]interface{} `json:"data,omitempty"`
	Args               map[string]string      `json:"args,omitempty"`
	Method             string                 `json:"method"`
	Object             string                 `json:"object,omitempty"`
	EnableSubstitution bool                   `json:"enable_substitution,omitempty"`
	AssignState        map[string]string      `json:"assign_state,omitempty"`
	Discard            bool                   `json:"discard,omitempty"`
}

type RequestType

type RequestType int
const (
	CREATE RequestType = iota
	GET
	DELETE
	UPDATE
)

type ServiceStatus

type ServiceStatus struct {
	Desciption string `json:"description,omitempty"`
	Service    string `json:"service,omitempty"`
	Status     string `json:"status,omitempty"`
}

type SingleRequest

type SingleRequest struct {
	IBBase `json:"-"`
	Body   *RequestBody
}

func NewRequest

func NewRequest(body *RequestBody) *SingleRequest

type SubElementsStatus

type SubElementsStatus struct {
	Ref            string `json:"_ref,omitempty"`
	CurrentVersion string `json:"current_version"`
	ElementStatus  string `json:"element_status"`
	Ipv4Address    string `json:"ipv4_address"`
	Ipv6Address    string `json:"ipv6_address"`
	StatusValue    string `json:"status_value"`
	StepsTotal     int    `json:"steps_total"`
	StepsCompleted int    `json:"steps_completed"`
	NodeType       string `json:"type"`
	Member         string `json:"member"`
}

SubElementsStatus object representation

type TransportConfig

type TransportConfig struct {
	SslVerify bool

	HttpRequestTimeout  time.Duration // in seconds
	HttpPoolConnections int
	ProxyUrl            *url.URL
	// contains filtered or unexported fields
}

func NewTransportConfig

func NewTransportConfig(sslVerify string, httpRequestTimeout int, httpPoolConnections int) (cfg TransportConfig)

type UpgradeStatus

type UpgradeStatus struct {
	NMSBase          `json:"-"`
	Ref              string              `json:"_ref,omitempty"`
	Type             string              `json:"type"`
	SubElementStatus []SubElementsStatus `json:"subelements_status,omitempty"`
	UpgradeGroup     string              `json:"upgrade_group,omitempty"`
}

UpgradeStatus object representation

func NewUpgradeStatus

func NewUpgradeStatus(upgradeStatus UpgradeStatus) *UpgradeStatus

type UserProfile

type UserProfile struct {
	IBBase `json:"-"`
	Ref    string `json:"_ref,omitempty"`
	Name   string `json:"name,omitempty"`
}

func NewUserProfile

func NewUserProfile(userprofile UserProfile) *UserProfile

type ZoneAuth

type ZoneAuth struct {
	IBBase `json:"-"`
	Ref    string `json:"_ref,omitempty"`
	Fqdn   string `json:"fqdn,omitempty"`
	View   string `json:"view,omitempty"`
	Ea     EA     `json:"extattrs"`
}

func NewZoneAuth

func NewZoneAuth(za ZoneAuth) *ZoneAuth

type ZoneDelegated

type ZoneDelegated struct {
	IBBase     `json:"-"`
	Ref        string       `json:"_ref,omitempty"`
	Fqdn       string       `json:"fqdn,omitempty"`
	DelegateTo []NameServer `json:"delegate_to,omitempty"`
	View       string       `json:"view,omitempty"`
	Ea         EA           `json:"extattrs"`
}

func NewZoneDelegated

func NewZoneDelegated(za ZoneDelegated) *ZoneDelegated

Jump to

Keyboard shortcuts

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