onappgo

package module
v0.1.58 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MPL-2.0 Imports: 18 Imported by: 0

README

Go lang package for OnApp Cloud Platform

Maintainers

This OnApp Go is maintained by:

  • The Taras Brodovych at Virtuozzo

Requirements

  • Go 1.20.x or higher

Developing the OnApp Go

If you wish to work on the OnApp Go, you'll first need Go installed on your machine (version 1.20.x is required). You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin to your $PATH.

Documentation

Index

Constants

View Source
const (
	MAX_PER_TARGET = "max_per_target"
	MIN_PER_ORIGIN = "min_per_origin"
	MAX_PER_ORIGIN = "max_per_origin"

	DEFAULT  = "default"
	PRESENCE = "presence"
)
View Source
const (
	STORING                         = 1 + iota // "storing"
	SOLIDFIRE_STORING                          // "solidfire_storing"
	VDC_STORING                                // "vdc_storing"
	HYPERVISOR_STORING                         // "hypervisor_storing"
	NETWORKING                                 // "networking"
	EXTERNAL_NETWORKING                        // "external_networking"
	REGULAR_SERVER                             // "regular_server"
	VIRTUAL_SERVER                             // "virtual_server"
	PRECONFIGURED_SERVER                       // "preconfigured_server"
	AUTOSCALED_SERVER                          // "autoscaled_server"
	APPLICATION_SERVER                         // "application_server"
	ACCELERATED_SERVER                         // "accelerated_server"
	BAREMETAL_SERVER                           // "baremetal_server"
	CONTAINER_SERVER                           // "container_server"
	SMART_SERVER                               // "smart_server"
	VPC_SERVER                                 // "vpc_server"
	DRAAS                                      // "draas"
	CDN                                        // "cdn"
	REGULAR_BACKUP_ON_BACKUP_SERVER            // "regular_backup_on_backup_server"

	REGULAR_TEMPLATE_ON_BACKUP_SERVER = 21 + iota // "regular_template_on_backup_server"
	ISO_TEMPLATE                                  // "iso_template"
	OVA_TEMPLATE                                  // "ova_template"
	ALLOCATION_POOL                               // "allocation_pool"
	RESERVATION_POOL                              // "reservation_pool"
	ALLOCATION_VAPP                               // "allocation_vapp"
	RECIPE                                        // "recipe"
	SERVICE_ADDON                                 // "service_addon"
	REGULAR_BACKUP_ON_HYPERVISOR                  // "regular_backup_on_hypervisor"

	REGULAR_TEMPLATE_ON_HYPERVISOR    = 31 + iota // "regular_template_on_hypervisor"
	TEMPLATE_USAGE                                // "template_usage"
	RECOVERY_POINT_ON_BACKUP_RESOURCE             // "recovery_point_on_backup_resource"
	BACKUP_RESOURCE_USAGE                         // "backup_resource_usage"

	// Monthly Statistics features
	SUM_OF_HOURLY_ADJUSTMENT        = 95 + iota // "sum_of_hourly_adjustment"
	SUM_OF_HOURLY_STAT_NON_ARCHIVED             // "sum_of_hourly_stat_non_archived"
	SUM_OF_HOURLY_STAT                          // "sum_of_hourly_stat"
	SUM_OF_HOURLY_STAT_ARCHIVED                 // "sum_of_hourly_stat_archived"
	SUBSCRIPTION                                // "subscription"
)

Features

View Source
const (
	COMPUTE_ZONE        = 1 + iota // "compute_zone"
	DATA_STORE_ZONE                // "data_store_zone"
	NETWORK_ZONE                   // "network_zone"
	BACKUP_SERVER_ZONE             // "backup_server_zone"
	INSTANCE_PACKAGE               // "instance_package"
	TEMPLATE_GROUP                 // "template_group"
	EDGE_GROUP                     // "edge_group"
	RECIPE_GROUP                   // "recipe_group"
	SERVICE_ADDON_GROUP            // "service_addon_group"
)

Targets

View Source
const (
	COMPUTE_ZONE_RESOURCE              string = "compute_zone_resource"
	DATA_STORE_ZONE_RESOURCE           string = "data_store_zone_resource"
	NETWORK_ZONE_RESOURCE              string = "network_zone_resource"
	BACKUP_SERVER_ZONE_RESOURCE        string = "backup_server_zone_resource"
	VIRTUAL_SERVERS_RESOURCE           string = "virtual_servers_resource"
	AUTOSCALED_SERVERS_RESOURCE        string = "autoscaled_servers_resource"
	COMPUTE_RESOURCE_STORING_RESOURCE  string = "compute_resource_storing_resource"
	BACKUPS_RESOURCE                   string = "backups_resource"
	TEMPLATES_RESOURCE                 string = "templates_resource"
	ISO_TEMPLATES_RESOURCE             string = "iso_templates_resource"
	ACCELERATED_SERVERS_RESOURCE       string = "accelerated_servers_resource"
	APPLICATION_SERVERS_RESOURCE       string = "application_servers_resource"
	CONTAINER_SERVERS_RESOURCE         string = "container_servers_resource"
	DRAAS_RESOURCE                     string = "draas_resource"
	SOLIDFIRE_DATA_STORE_ZONE_RESOURCE string = "solidfire_data_store_zone_resource"
	PRECONFIGURED_SERVERS_RESOURCE     string = "preconfigured_servers_resource"
	EDGE_GROUPS_RESOURCE               string = "edge_groups_resource"
	RECIPE_GROUPS_RESOURCE             string = "recipe_groups_resource"
	TEMPLATE_GROUPS_RESOURCE           string = "template_groups_resource"
	SERVICE_ADDON_GROUPS_RESOURCE      string = "service_addon_groups_resource"
	TEMPLATE_RESOURCE                  string = "template_resource"
	SERVICE_ADDON_RESOURCE             string = "service_addon_resource"
	BARE_METAL_SERVERS_RESOURCE        string = "bare_metal_servers_resource"
	SMART_SERVERS_RESOURCE             string = "smart_servers_resource"
	ORCHESTRATION_MODEL_RESOURCE       string = "orchestration_model_resource"
	BACKUP_RESOURCE_ZONE_RESOURCE      string = "backup_resource_zone_resource"
	CDN_BANDWIDTH_RESOURCE             string = "cdn_bandwidth_resource"
	BLUEPRINT_GROUPS_RESOURCE          string = "blueprint_groups_resource"
)

ResourceRoots

View Source
const (
	VIRTUAL        string = "virtual"
	VPC            string = "vpc"
	SMART          string = "smart"
	BARE_METAL     string = "baremetal"
	OCM            string = "ocm"
	OTHER          string = "other"
	INFRASTRUCTURE string = "infrastructure"
	SUNLIGHT       string = "sunlight"
)

ServerTypes

View Source
const (
	FREE_PER_TARGET         = "free_per_target"
	FREE_PER_TARGET_MONTHLY = "free_per_target_monthly"
	FREE_PER_ORIGIN         = "free_per_origin"

	ON    = "on"     // powered_on = true
	OFF   = "off"    // powered_on = false
	ONOFF = "on/off" // any state of powered_on
)
View Source
const (

	// TransactionRunning is a running transaction status
	TransactionRunning = "running"

	// TransactionComplete is a completed transaction status
	TransactionComplete = "complete"

	// TransactionPending is a pending transaction status
	TransactionPending = "pending"

	// TransactionCancelled is a cancelled transaction status
	TransactionCancelled = "cancelled"

	// TransactionFailed is a failed transaction status
	TransactionFailed = "failed"
)
View Source
const AssignedToCache string = "assigned_to_cache"
View Source
const AssignedToSAN string = "assigned_to_san"
View Source
const AssignedToStorage string = "assigned_to_storage"
View Source
const Unassigned string = "unassigned"

Variables

View Source
var TimingStrategy = []string{
	"hourly",
	"monthly",
}

Functions

func Bool

func Bool(v bool) *bool

Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.

func CheckResponse

func CheckResponse(r *http.Response) error

CheckResponse checks the API response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range. API error responses are expected to have either no response body, or a JSON response body that maps to ErrorResponse. Any other response body will be silently ignored.

func DoRequest

func DoRequest(ctx context.Context, req *http.Request) (*http.Response, error)

DoRequest submits an HTTP request.

func DoRequestWithClient

func DoRequestWithClient(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error)

DoRequestWithClient submits an HTTP request using the specified client.

func Int

func Int(v int) *int

Int is a helper routine that allocates a new int32 value to store v and returns a pointer to it, but unlike Int32 its argument value is an int.

func ServerTypesRestrictions

func ServerTypesRestrictions(resourceType string, serverType string, ignoreCase bool) (string, bool)

ServerTypesRestrictions -

func StreamToString

func StreamToString(stream io.Reader) string

StreamToString converts a reader to a string

func String

func String(v string) *string

String is a helper routine that allocates a new string value to store v and returns a pointer to it.

func StringInSlice

func StringInSlice(valid []string, k string, ignoreCase bool) bool

StringInSlice -

Types

type AccessControl

type AccessControl struct {
	BucketID       int         `json:"bucket_id,omitempty"`
	ServerType     string      `json:"server_type,omitempty"`
	TargetID       int         `json:"target_id,omitempty"`
	Type           string      `json:"type,omitempty"`
	TimingStrategy string      `json:"timing_strategy,omitempty"`
	TargetName     string      `json:"target_name,omitempty"`
	Preferences    interface{} `json:"preferences,omitempty"`
	Limits         *Limits     `json:"limits,omitempty"`
}

func (*AccessControl) EqualFilter

func (obj *AccessControl) EqualFilter(filter interface{}) bool

type AccessControlCreateRequest

type AccessControlCreateRequest struct {
	BucketID   int     `json:"bucket_id,omitempty"`
	ServerType string  `json:"server_type,omitempty"`
	TargetID   int     `json:"target_id,omitempty"`
	Type       string  `json:"type,omitempty"`
	Limits     *Limits `json:"limits,omitempty"`
}

func (AccessControlCreateRequest) String

type AccessControlDeleteRequest

type AccessControlDeleteRequest AccessControlCreateRequest

type AccessControlEditRequest

type AccessControlEditRequest AccessControlCreateRequest

type AccessControlLimits

type AccessControlLimits map[string]*LimitResourceRoots
var AccessControls *AccessControlLimits

type AccessControlsService

type AccessControlsService interface {
	List(context.Context, int, *ListOptions) ([]AccessControl, *Response, error)
	// Get(context.Context, int, int) (*AccessControl, *Response, error)
	Create(context.Context, *AccessControlCreateRequest) (*AccessControl, *Response, error)
	Delete(context.Context, *AccessControlDeleteRequest, interface{}) (*Response, error)
	Edit(context.Context, *AccessControlEditRequest) (*Response, error)
}

AccessControlsService is an interface for interfacing with the AccessControls endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/buckets/access-control

type AccessControlsServiceOp

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

AccessControlsServiceOp handles communication with the AccessControl related methods of the OnApp API.

func (*AccessControlsServiceOp) Create

Create AccessControl.

func (*AccessControlsServiceOp) Delete

func (s *AccessControlsServiceOp) Delete(ctx context.Context, deleteRequest *AccessControlDeleteRequest, meta interface{}) (*Response, error)

Delete AccessControl.

func (*AccessControlsServiceOp) Edit

Edit AccessControl.

func (*AccessControlsServiceOp) List

List return AccessControls for Bucket.

type AccountAttributes

type AccountAttributes struct {
	Username        string `json:"username,omitempty"`
	InitiatorSecret string `json:"initiator_secret,omitempty"`
	TargetSecret    string `json:"target_secret,omitempty"`
}

AccountAttributes - SolidFire account username

type ActionRequest

type ActionRequest map[string]interface{}

ActionRequest reprents OnApp Action Request

type AdditionalFields

type AdditionalFields struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

AdditionalFields -

type AdminAttributes

type AdminAttributes struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

type AdvancedOptions

type AdvancedOptions struct {
}

AdvancedOptions -

type Asset

type Asset struct {
	Mac string `json:"mac,omitempty"`
	IP  string `json:"ip,omitempty"`
}

type AssignIPAddress

type AssignIPAddress struct {
	Address            string `json:"address,omitempty"`
	IPNetID            int    `json:"ip_net_id,omitempty"`
	IPRangeID          int    `json:"ip_range_id,omitempty"`
	IPVersion          int    `json:"ip_version,omitempty"`
	NetworkInterfaceID int    `json:"network_interface_id,omitempty"`
	OwnIP              int    `json:"own_ip,omitempty"`
	UsedIP             int    `json:"used_ip,omitempty"`
}

AssignIPAddress - used for assign IPAddress to the VirtualMachine or User

type AttachDiskHardwareDevice

type AttachDiskHardwareDevice struct {
	Status string `json:"status,omitempty"`
	Format bool   `json:"format,bool"`
}

AttachDiskHardwareDevice represents a request to attach disks from hypervisor to the integrated data store

type AttachNetworkInterfaceHardwareDevice

type AttachNetworkInterfaceHardwareDevice struct {
	Status string `json:"status,omitempty"`
}

AttachNetworkInterfaceHardwareDevice represents a request to attach network interfaces from hypervisor to the integrated data store

type BackendNode

type BackendNode struct {
	ID    string  `json:"id,omitempty"`
	Nodes []Nodes `json:"nodes,omitempty"`
}

type BackendNodes

type BackendNodes []struct {
	Hypervisor BackendNode `json:"hypervisor,omitempty"`
}

func (*BackendNodes) GetNodesByHostID added in v0.1.55

func (b *BackendNodes) GetNodesByHostID(hostID int) []Nodes

GetNodesByHostID - return computer resources backend nodes with integrated storage

type Backup

type Backup struct {
	AllowedHotMigrate        bool   `json:"allowed_hot_migrate,bool"`
	AllowedSwap              bool   `json:"allowed_swap,bool"`
	AllowResizeWithoutReboot bool   `json:"allow_resize_without_reboot,bool"`
	BackupServerID           int    `json:"backup_server_id,omitempty"`
	BackupSize               int    `json:"backup_size,omitempty"`
	BackupType               string `json:"backup_type,omitempty"`
	Built                    bool   `json:"built,bool"`
	BuiltAt                  string `json:"built_at,omitempty"`
	CreatedAt                string `json:"created_at,omitempty"`
	DataStoreType            string `json:"data_store_type,omitempty"`
	DiskID                   int    `json:"disk_id,omitempty"`
	ID                       int    `json:"id,omitempty"`
	Identifier               string `json:"identifier,omitempty"`
	Initiated                string `json:"initiated,omitempty"`
	Iqn                      string `json:"iqn,omitempty"`
	Locked                   bool   `json:"locked,bool"`
	MarkedForDelete          bool   `json:"marked_for_delete,bool"`
	MinDiskSize              int    `json:"min_disk_size,omitempty"`
	MinMemorySize            int    `json:"min_memory_size,omitempty"`
	Note                     string `json:"note,omitempty"`
	OperatingSystem          string `json:"operating_system,omitempty"`
	OperatingSystemDistro    string `json:"operating_system_distro,omitempty"`
	TargetID                 int    `json:"target_id,omitempty"`
	TargetType               string `json:"target_type,omitempty"`
	TemplateID               int    `json:"template_id,omitempty"`
	UpdatedAt                string `json:"updated_at,omitempty"`
	UserID                   int    `json:"user_id,omitempty"`
	VolumeID                 int    `json:"volume_id,omitempty"`
}

Backup represent VirtualMachine backup

type BackupCreateRequest

type BackupCreateRequest struct {
	DiskID             int    `json:"disk_id,omitempty"`
	Note               string `json:"note,omitempty"`
	ForceWindowsBackup int    `json:"force_windows_backup,omitempty"`
	VirtualMachineID   int    `json:"-"` // Additional fie42ld to determine Virtual Machine to create disk backup
}

BackupCreateRequest - data for creating Backup

func (BackupCreateRequest) String

func (d BackupCreateRequest) String() string

type BackupNoteRequest

type BackupNoteRequest struct {
	Note string `json:"note,omitempty"`
}

BackupNoteRequest - data for add/edit backup note

type BackupResource

type BackupResource struct {
	AdvancedOptions []AdvancedOptions `json:"advanced_options"`
	ID              int               `json:"id,omitempty"`
	CreatedAt       string            `json:"created_at,omitempty"`
	Label           string            `json:"label,omitempty"`
	Enabled         bool              `json:"enabled,bool"`
	Plugin          string            `json:"plugin,omitempty"`
	PrimaryHost     string            `json:"primary_host,omitempty"`
	SecondaryHost   string            `json:"secondary_host,omitempty"`
	UpdatedAt       string            `json:"updated_at,omitempty"`
	Username        string            `json:"username,omitempty"`
	Password        string            `json:"password,omitempty"`
	ResourceZoneID  int               `json:"resource_zone_id,omitempty"`

	// OnApp 6.1
	DayToRunOn int    `json:"day_to_run_on,omitempty"`
	StartTime  string `json:"start_time,omitempty"`
}

BackupResource represents a BackupResource

type BackupResourceCreateRequest

type BackupResourceCreateRequest struct {
	Label          string `json:"label,omitempty"`
	Plugin         string `json:"plugin,omitempty"`
	PrimaryHost    string `json:"primary_host,omitempty"`
	Username       string `json:"username,omitempty"`
	Password       string `json:"password,omitempty"`
	ResourceZoneID int    `json:"resource_zone_id,omitempty"`

	// OnApp 6.1
	// 0 - Sunday, 1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5 - Friday, 6 - Saturday
	DayToRunOn int    `json:"day_to_run_on,omitempty"`
	StartTime  string `json:"start_time,omitempty"`
}

BackupResourceCreateRequest represents a request to create a BackupResource

func (BackupResourceCreateRequest) String

type BackupResourceZone

type BackupResourceZone struct {
	ID              int    `json:"id,omitempty"`
	CreatedAt       string `json:"created_at,omitempty"`
	Label           string `json:"label,omitempty"`
	LocationGroupID int    `json:"location_group_id,omitempty"`
	UpdatedAt       string `json:"updated_at,omitempty"`
}

BackupResourceZone represents a BackupResourceZone

type BackupResourceZoneCreateRequest

type BackupResourceZoneCreateRequest struct {
	Label           string `json:"label,omitempty"`
	LocationGroupID int    `json:"location_group_id,omitempty"`
}

BackupResourceZoneCreateRequest represents a request to create a BackupResourceZone

func (BackupResourceZoneCreateRequest) String

type BackupResourceZonesService

BackupResourceZonesService is an interface for interfacing with the Backup Resource Zones endpoints of the OnApp API https://docs.onapp.com/apim/latest/backup-server-zones

type BackupResourceZonesServiceOp

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

BackupResourceZonesServiceOp handles communication with the Backup Resource Zone related methods of the OnApp API.

func (*BackupResourceZonesServiceOp) Create

Create BackupResourceZone.

func (*BackupResourceZonesServiceOp) Delete

func (s *BackupResourceZonesServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete BackupResourceZone.

func (*BackupResourceZonesServiceOp) Get

Get individual BackupResourceZone.

func (*BackupResourceZonesServiceOp) List

List all DataStoreGroups.

type BackupResourcesService

type BackupResourcesService interface {
	List(context.Context, *ListOptions) ([]BackupResource, *Response, error)
	Get(context.Context, int) (*BackupResource, *Response, error)
	Create(context.Context, *BackupResourceCreateRequest) (*BackupResource, *Response, error)
	Delete(context.Context, int, interface{}) (*Response, error)
}

BackupResourcesService is an interface for interfacing with the Backup Resources endpoints of the OnApp API https://docs.onapp.com/apim/latest/backup-resources

type BackupResourcesServiceOp

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

BackupResourcesServiceOp handles communication with the Backup Resource related methods of the OnApp API.

func (*BackupResourcesServiceOp) Create

Create BackupResource.

func (*BackupResourcesServiceOp) Delete

func (s *BackupResourcesServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete BackupResource.

func (*BackupResourcesServiceOp) Get

Get individual BackupResource.

func (*BackupResourcesServiceOp) List

List all DataStoreGroups.

type BackupServer

type BackupServer struct {
	BackupIPAddress     string `json:"backup_ip_address,omitempty"`
	BackupServerGroupID int    `json:"backup_server_group_id,omitempty"`
	Capacity            int    `json:"capacity,omitempty"`
	CPUIdle             int    `json:"cpu_idle,omitempty"`
	CPUMhz              int    `json:"cpu_mhz,omitempty"`
	Cpus                int    `json:"cpus,omitempty"`
	CreatedAt           string `json:"created_at,omitempty"`
	Distro              string `json:"distro,omitempty"`
	Enabled             bool   `json:"enabled,bool"`
	ID                  int    `json:"id,omitempty"`
	IPAddress           string `json:"ip_address,omitempty"`
	Label               string `json:"label,omitempty"`
	OsVersion           int    `json:"os_version,omitempty"`
	OsVersionMinor      int    `json:"os_version_minor,omitempty"`
	Release             string `json:"release,omitempty"`
	TotalMem            int    `json:"total_mem,omitempty"`
	UpdatedAt           string `json:"updated_at,omitempty"`
	Uptime              string `json:"uptime,omitempty"`
	IntegratedStorage   bool   `json:"integrated_storage,bool"`
}

BackupServer - represent a backup server of OnApp API

type BackupServerCreateRequest

type BackupServerCreateRequest struct {
	Label               string `json:"label,omitempty"`
	Enabled             bool   `json:"enabled,bool"`
	Capacity            int    `json:"capacity,omitempty"`
	IPAddress           string `json:"ip_address,omitempty"`
	BackupIPAddress     string `json:"backup_ip_address,omitempty"`
	BackupServerGroupID int    `json:"backup_server_group_id,omitempty"`
	IntegratedStorage   bool   `json:"integrated_storage,bool"`
}

BackupServerCreateRequest represents a request to create a BackupServer

func (BackupServerCreateRequest) String

func (d BackupServerCreateRequest) String() string

type BackupServerEditRequest

type BackupServerEditRequest struct {
	Label             string `json:"label,omitempty"`
	Enabled           bool   `json:"enabled,bool"`
	Capacity          int    `json:"capacity,omitempty"`
	IPAddress         string `json:"ip_address,omitempty"`
	BackupIPAddress   string `json:"backup_ip_address,omitempty"`
	IntegratedStorage bool   `json:"integrated_storage,bool"`
}

BackupServerEditRequest represents a request to edit a BackupServer

type BackupServerGroup

type BackupServerGroup struct {
	AdditionalFields  []AdditionalFields `json:"additional_fields,omitempty"`
	Closed            bool               `json:"closed,bool"`
	CreatedAt         string             `json:"created_at,omitempty"`
	DatacenterID      int                `json:"datacenter_id,omitempty"`
	DraasID           int                `json:"draas_id,omitempty"`
	FederationEnabled bool               `json:"federation_enabled,bool"`
	FederationID      int                `json:"federation_id,omitempty"`
	HypervisorID      int                `json:"hypervisor_id,omitempty"`
	ID                int                `json:"id,omitempty"`
	Identifier        string             `json:"identifier,omitempty"`
	Label             string             `json:"label,omitempty"`
	LocationGroupID   int                `json:"location_group_id,omitempty"`
	ProviderVdcID     int                `json:"provider_vdc_id,omitempty"`
	ServerType        string             `json:"server_type,omitempty"`
	Traded            bool               `json:"traded,bool"`
	UpdatedAt         string             `json:"updated_at,omitempty"`
}

BackupServerGroup represents a BackupServerGroup

type BackupServerGroupCreateRequest

type BackupServerGroupCreateRequest struct {
	Label           string `json:"label,omitempty"`
	LocationGroupID int    `json:"location_group_id,omitempty"`
	ServerType      string `json:"server_type,omitempty"`
}

BackupServerGroupCreateRequest represents a request to create a BackupServerGroup

func (BackupServerGroupCreateRequest) String

type BackupServerGroupEditRequest

type BackupServerGroupEditRequest struct {
	Label           string `json:"label,omitempty"`
	LocationGroupID int    `json:"location_group_id,omitempty"`
}

BackupServerGroupEditRequest represents a request to edit a BackupServerGroup

type BackupServerGroupsService

BackupServerGroupsService is an interface for interfacing with the Backup Server Groups endpoints of the OnApp API https://docs.onapp.com/apim/latest/backup-resource-zones

type BackupServerGroupsServiceOp

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

BackupServerGroupsServiceOp handles communication with the Backup Server Group related methods of the OnApp API.

func (*BackupServerGroupsServiceOp) Create

Create BackupServerGroup.

func (*BackupServerGroupsServiceOp) Delete

func (s *BackupServerGroupsServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete BackupServerGroup.

func (*BackupServerGroupsServiceOp) Edit

Edit BackupServerGroup.

func (*BackupServerGroupsServiceOp) Get

Get individual BackupServerGroup.

func (*BackupServerGroupsServiceOp) List

List all DataStoreGroups.

type BackupServerJoin

type BackupServerJoin struct {
	ID             int    `json:"id,omitempty"`
	BackupServerID int    `json:"backup_server_id,omitempty"`
	CreatedAt      string `json:"created_at,omitempty"`
	UpdatedAt      string `json:"updated_at,omitempty"`
	TargetJoinID   int    `json:"target_join_id,omitempty"`
	TargetJoinType string `json:"target_join_type,omitempty"`
}

BackupServerJoin represents a BackupServerJoin

type BackupServerJoinCreateRequest

type BackupServerJoinCreateRequest struct {
	BackupServerID int    `json:"backup_server_id,omitempty"`
	TargetJoinID   int    `json:"-"`
	TargetJoinType string `json:"-"`
}

BackupServerJoinCreateRequest represents a request to create a BackupServerJoin

func (BackupServerJoinCreateRequest) String

type BackupServerJoinDeleteRequest

type BackupServerJoinDeleteRequest struct {
	ID             int
	TargetJoinID   int
	TargetJoinType string
}

BackupServerJoinDeleteRequest represents a request to delete a BackupServerJoin

type BackupServerJoinsService

BackupServerJoinsService is an interface for interfacing with the BackupServerJoin

type BackupServerJoinsServiceOp

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

BackupServerJoinsServiceOp -

func (*BackupServerJoinsServiceOp) Create

Create BackupServerJoin.

func (*BackupServerJoinsServiceOp) Delete

func (s *BackupServerJoinsServiceOp) Delete(ctx context.Context, deleteRequest *BackupServerJoinDeleteRequest, meta interface{}) (*Response, error)

Delete BackupServerJoin.

func (*BackupServerJoinsServiceOp) Get

func (s *BackupServerJoinsServiceOp) Get(ctx context.Context, targetJoinType string, targetJoinID int, id int) (*BackupServerJoin, *Response, error)

Get individual BackupServerJoin.

func (*BackupServerJoinsServiceOp) List

List all BackupServerJoins.

type BackupServersService

type BackupServersService interface {
	List(context.Context, *ListOptions) ([]BackupServer, *Response, error)
	Get(context.Context, int) (*BackupServer, *Response, error)
	Create(context.Context, *BackupServerCreateRequest) (*BackupServer, *Response, error)
	Delete(context.Context, int, interface{}) (*Response, error)
	Edit(context.Context, int, *BackupServerEditRequest) (*Response, error)

	// TODO !!!
	// Move next functions to the BackupServerActionsService
	Refresh(context.Context, int) (*HardwareDevices, *Response, error)
	Attach(context.Context, int, map[string]interface{}) (*Response, error)
	EditIntegratedStorageSettings(context.Context, int, *IntegratedStorageSettings) (*Response, error)
}

BackupServersService is an interface for interfacing with the Backup Server endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/backup-servers

type BackupServersServiceOp

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

BackupServersServiceOp handles communication with the Backup Server related methods of the OnApp API.

func (*BackupServersServiceOp) Attach

func (s *BackupServersServiceOp) Attach(ctx context.Context, resID int, attachRequest map[string]interface{}) (*Response, error)

Attach - attach disks, network interfaces of hypervisor to the integrated data store

func (*BackupServersServiceOp) Create

Create BackupServer.

func (*BackupServersServiceOp) Delete

func (s *BackupServersServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete BackupServer.

func (*BackupServersServiceOp) Edit

func (s *BackupServersServiceOp) Edit(ctx context.Context, id int, editRequest *BackupServerEditRequest) (*Response, error)

Edit BackupServer.

func (*BackupServersServiceOp) EditIntegratedStorageSettings

func (s *BackupServersServiceOp) EditIntegratedStorageSettings(ctx context.Context, id int, editRequest *IntegratedStorageSettings) (*Response, error)

EditIntegratedStorageSettings -

func (*BackupServersServiceOp) Get

Get individual BackupServer.

func (*BackupServersServiceOp) List

List all BackupServers.

func (*BackupServersServiceOp) Refresh

Refresh - get list of hardware devices (network interfaces) from backup server with enabled integrated storage

type BackupsService

type BackupsService interface {
	List(context.Context, int, *ListOptions) ([]Backup, *Response, error)
	Get(context.Context, int) (*Backup, *Response, error)
	Create(context.Context, *BackupCreateRequest) (*Backup, *Response, error)
	Delete(context.Context, int, interface{}) (*Response, error)

	// TODO !!!
	// Move next functions to the BackupActionsService
	AllComputeResourceBackups(context.Context, int) ([]Backup, *Response, error)
	ListOfDiskBackups(context.Context, int, int) ([]Backup, *Response, error)
	BackupNote(context.Context, int, *BackupNoteRequest) (*Response, error)
	ConvertBackupToTemplate(context.Context, int, *ConvertBackupToTemplateRequest) (*Response, error)
}

BackupsService is an interface for interfacing with the Backup endpoints of the OnApp API https://docs.onapp.com/apim/latest/backups-snapshots

type BackupsServiceOp

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

BackupsServiceOp handles communication with the Backup related methods of the OnApp API.

func (*BackupsServiceOp) AllComputeResourceBackups

func (s *BackupsServiceOp) AllComputeResourceBackups(ctx context.Context, vmID int) ([]Backup, *Response, error)

AllComputeResourceBackups -

func (*BackupsServiceOp) BackupNote

func (s *BackupsServiceOp) BackupNote(ctx context.Context, id int, noteRequest *BackupNoteRequest) (*Response, error)

BackupNote - Add/Edit Note of Backup

func (*BackupsServiceOp) ConvertBackupToTemplate

func (s *BackupsServiceOp) ConvertBackupToTemplate(ctx context.Context, id int, convertRequest *ConvertBackupToTemplateRequest) (*Response, error)

ConvertBackupToTemplate - Convert Backup to the Template

func (*BackupsServiceOp) Create

func (s *BackupsServiceOp) Create(ctx context.Context, createRequest *BackupCreateRequest) (*Backup, *Response, error)

Create Backup

func (*BackupsServiceOp) Delete

func (s *BackupsServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete Backup

func (*BackupsServiceOp) Get

func (s *BackupsServiceOp) Get(ctx context.Context, id int) (*Backup, *Response, error)

Get individual Backup

func (*BackupsServiceOp) List

func (s *BackupsServiceOp) List(ctx context.Context, vmID int, opt *ListOptions) ([]Backup, *Response, error)

List all Backups in the cloud

func (*BackupsServiceOp) ListOfDiskBackups

func (s *BackupsServiceOp) ListOfDiskBackups(ctx context.Context, vmID int, diskID int) ([]Backup, *Response, error)

ListOfDiskBackups -

type Bucket

type Bucket struct {
	ID           int     `json:"id,omitempty"`
	Label        string  `json:"label,omitempty"`
	CreatedAt    string  `json:"created_at,omitempty"`
	UpdatedAt    string  `json:"updated_at,omitempty"`
	CurrencyCode string  `json:"currency_code,omitempty"`
	ShowPrice    bool    `json:"show_price,bool"`
	AllowsMak    bool    `json:"allows_mak,bool"`
	AllowsKms    bool    `json:"allows_kms,bool"`
	AllowsOwn    bool    `json:"allows_own,bool"`
	MonthlyPrice float64 `json:"monthly_price,omitempty"`
}

Bucket -

type BucketCreateRequest

type BucketCreateRequest struct {
	Label        string  `json:"label,omitempty"`
	CurrencyCode string  `json:"currency_code,omitempty"`
	MonthlyPrice float64 `json:"monthly_price,omitempty"`
	AllowsKms    bool    `json:"allows_kms,bool"`
	AllowsMak    bool    `json:"allows_mak,bool"`
	AllowsOwn    bool    `json:"allows_own,bool"`
}

BucketCreateRequest -

func (BucketCreateRequest) String

func (d BucketCreateRequest) String() string

type BucketEditRequest

type BucketEditRequest BucketCreateRequest

type BucketsService

type BucketsService interface {
	List(context.Context, *ListOptions) ([]Bucket, *Response, error)
	Get(context.Context, int) (*Bucket, *Response, error)
	Create(context.Context, *BucketCreateRequest) (*Bucket, *Response, error)
	Delete(context.Context, int, interface{}) (*Response, error)
	Edit(context.Context, int, *BucketEditRequest) (*Response, error)
}

BucketsService is an interface for interfacing with the Bucket endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/buckets

type BucketsServiceOp

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

BucketsServiceOp handles communication with the Bucket related methods of the OnApp API.

func (*BucketsServiceOp) Create

func (s *BucketsServiceOp) Create(ctx context.Context, createRequest *BucketCreateRequest) (*Bucket, *Response, error)

Create Bucket.

func (*BucketsServiceOp) Delete

func (s *BucketsServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete Bucket.

func (*BucketsServiceOp) Edit

func (s *BucketsServiceOp) Edit(ctx context.Context, id int, editRequest *BucketEditRequest) (*Response, error)

Edit Bucket.

func (*BucketsServiceOp) Get

func (s *BucketsServiceOp) Get(ctx context.Context, id int) (*Bucket, *Response, error)

Get individual Bucket.

func (*BucketsServiceOp) List

func (s *BucketsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Bucket, *Response, error)

List all Buckets.

type Certificate

type Certificate struct {
	ExpireAt string `json:"expire_at,omitempty"`
	Name     string `json:"name,omitempty"`
}

Certificate -

type Certificates

type Certificates struct {
	Certificate Certificate `json:"certificate,omitempty"`
}

Certificates -

type Children added in v0.1.58

type Children struct {
	ID        int        `json:"id,omitempty"`
	Label     string     `json:"label,omitempty"`
	ParentID  int        `json:"parent_id,omitempty"`
	Lft       int        `json:"lft,omitempty"`
	Rgt       int        `json:"rgt,omitempty"`
	Depth     int        `json:"depth,omitempty"`
	CreatedAt string     `json:"created_at,omitempty"`
	UpdatedAt string     `json:"updated_at,omitempty"`
	Childrens []Children `json:"children,omitempty"` // rename filed but JSON leave as is
	Relations []Relation `json:"relations,omitempty"`
}

type Client

type Client struct {

	// Base URL for API requests.
	BaseURL *url.URL

	// User agent for client
	UserAgent string

	// Services used for communicating with the API
	AccessControls            AccessControlsService
	BackupResources           BackupResourcesService
	BackupResourceZones       BackupResourceZonesService
	Backups                   BackupsService
	BackupServerGroups        BackupServerGroupsService
	BackupServerJoins         BackupServerJoinsService
	BackupServers             BackupServersService
	Buckets                   BucketsService
	CloudbootComputeResources CloudbootComputeResourcesService
	CloudbootIPAddresses      CloudbootIPAddressesService
	Configurations            ConfigurationsService
	DataStoreGroups           DataStoreGroupsService
	DataStoreJoins            DataStoreJoinsService
	DataStores                DataStoresService
	Disks                     DisksService
	Engines                   EnginesService
	FirewallRules             FirewallRulesService
	HypervisorGroups          HypervisorGroupsService
	Hypervisors               HypervisorsService
	HypervisorZones           HypervisorZonesService
	ImageTemplateGroups       ImageTemplateGroupsService
	ImageTemplates            ImageTemplatesService
	InstancePackages          InstancePackagesService
	IntegratedDataStores      IntegratedDataStoresService
	IPAddresses               IPAddressesService
	IPNets                    IPNetsService
	IPRanges                  IPRangesService
	Licenses                  LicensesService
	LocationGroups            LocationGroupsService
	NetworkGroups             NetworkGroupsService
	NetworkInterfaces         NetworkInterfacesService
	NetworkJoins              NetworkJoinsService
	Networks                  NetworksService
	RateCards                 RateCardsService
	RecipeGroups              RecipeGroupsService
	Recipes                   RecipesService
	RecipeSteps               RecipeStepsService
	RecipeJoins               RecipeJoinsService
	RemoteTemplates           RemoteTemplatesService
	Resolvers                 ResolversService
	Roles                     RolesService
	SoftwareLicenses          SoftwareLicensesService
	SSHKeys                   SSHKeysService
	Transactions              TransactionsService
	UserGroups                UserGroupsService
	Users                     UsersService
	UserWhiteLists            UserWhiteListsService
	VirtualMachineActions     VirtualMachineActionsService
	VirtualMachines           VirtualMachinesService
	// contains filtered or unexported fields
}

Client manages communication with OnApp API.

func New

func New(httpClient *http.Client, opts ...ClientOpt) (*Client, error)

New returns a new OnApp API client instance.

func NewClient

func NewClient(httpClient *http.Client) *Client

NewClient returns a new OnApp API client.

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error)

Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response will be written to v, without attempting to decode it.

func (*Client) NewRequest

func (c *Client) NewRequest(ctx context.Context, method, urlStr string, body interface{}) (*http.Request, error)

NewRequest creates an API request. A relative URL can be provided in urlStr, which will be resolved to the BaseURL of the Client. Relative URLS should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included in as the request body.

func (*Client) OnRequestCompleted

func (c *Client) OnRequestCompleted(rc RequestCompletionCallback)

OnRequestCompleted sets the OnApp API request completion callback

func (*Client) Version

func (c *Client) Version() (string, *Response, error)

Version return OnApp endpoint version

type ClientOpt

type ClientOpt func(*Client) error

ClientOpt are options for New.

func SetAllowUnverifiedSSL

func SetAllowUnverifiedSSL(isv bool) ClientOpt

SetAllowUnverifiedSSL is a client option for setting allowUnverifiedSSL.

func SetBaseURL

func SetBaseURL(bu string) ClientOpt

SetBaseURL is a client option for setting the base URL.

func SetBasicAuth

func SetBasicAuth(user, password string) ClientOpt

SetBasicAuth is a client option for setting the user and password for API call.

func SetUserAgent

func SetUserAgent(ua string) ClientOpt

SetUserAgent is a client option for setting the user agent.

type CloudbootComputeResource

type CloudbootComputeResource Hypervisor

type CloudbootComputeResourceCreateRequest

type CloudbootComputeResourceCreateRequest struct {
	Label                       string   `json:"label,omitempty"`
	PxeIPAddressID              int      `json:"pxe_ip_address_id,omitempty"`
	HypervisorType              string   `json:"hypervisor_type,omitempty"`
	HypervisorGroupID           int      `json:"hypervisor_group_id,omitempty"`
	SegregationOsType           string   `json:"segregation_os_type,omitempty"`
	ServerType                  string   `json:"server_type,omitempty"`
	Backup                      bool     `json:"backup,bool"`
	BackupIPAddress             string   `json:"backup_ip_address,omitempty"`
	Enabled                     bool     `json:"enabled,bool"`
	CollectStats                bool     `json:"collect_stats,bool"`
	DisableFailover             bool     `json:"disable_failover,bool"`
	FormatDisks                 bool     `json:"format_disks,bool"`
	PassthroughDisks            bool     `json:"passthrough_disks,bool"`
	Storage                     *Storage `json:"storage,omitempty"`
	StorageControllerMemorySize int      `json:"storage_controller_memory_size,omitempty"`
	StaticIntegratedStorage     bool     `json:"static_integrated_storage,bool"`
	DisksPerStorageController   int      `json:"disks_per_storage_controller,omitempty"`
	CloudBootOs                 string   `json:"cloud_boot_os,omitempty"`
	CustomConfig                string   `json:"custom_config,omitempty"`
	DefaultGateway              string   `json:"default_gateway,omitempty"`
	Vlan                        string   `json:"vlan,omitempty"`
	Mac                         string   `json:"mac,omitempty"` // Helper field
}

func (CloudbootComputeResourceCreateRequest) String

type CloudbootComputeResourceEditRequest

type CloudbootComputeResourceEditRequest struct {
	CollectStats                     bool     `json:"collect_stats,bool"`
	DisableFailover                  bool     `json:"disable_failover,bool"`
	PassthroughDisks                 bool     `json:"passthrough_disks,bool"`
	Storage                          *Storage `json:"storage,omitempty"`
	StorageControllerMemorySize      int      `json:"storage_controller_memory_size,omitempty"`
	StaticIntegratedStorage          bool     `json:"static_integrated_storage,bool"`
	DisksPerStorageController        int      `json:"disks_per_storage_controller,omitempty"`
	IntegratedStorageDisabled        bool     `json:"integrated_storage_disabled,omitempty"`
	CustomConfig                     string   `json:"custom_config,omitempty"`
	ApplyHypervisorGroupCustomConfig bool     `json:"apply_hypervisor_group_custom_config,bool"`
}

CloudbootComputeResourceEditRequest represents a request to edit a CloudbootComputeResource

type CloudbootComputeResourcesService

CloudbootComputeResourcesService is an interface for interfacing with the CloudbootComputeResource endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/compute-resources

type CloudbootComputeResourcesServiceOp

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

CloudbootComputeResourcesServiceOp handles communication with the CloudbootComputeResource related methods of the OnApp API.

func (*CloudbootComputeResourcesServiceOp) CloudbootAvailableResources

func (s *CloudbootComputeResourcesServiceOp) CloudbootAvailableResources(ctx context.Context) ([]Asset, *Response, error)

CloudbootAvailableResources - List all Cloudboot available resources

func (*CloudbootComputeResourcesServiceOp) Create

Create Cloudboot CloudbootComputeResource

func (*CloudbootComputeResourcesServiceOp) Delete

func (s *CloudbootComputeResourcesServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete Cloudboot CloudbootComputeResource

func (*CloudbootComputeResourcesServiceOp) Edit

Edit Cloudboot CloudbootComputeResource

func (*CloudbootComputeResourcesServiceOp) Get

Get individual Cloudboot CloudbootComputeResource

func (*CloudbootComputeResourcesServiceOp) List

List all Cloudboot CloudbootComputeResources

type CloudbootIPAddress

type CloudbootIPAddress struct {
	ID              int    `json:"id,omitempty"`
	Address         string `json:"address,omitempty"`
	Broadcast       string `json:"broadcast,omitempty"`
	NetworkAddress  string `json:"network_address,omitempty"`
	Gateway         string `json:"gateway,omitempty"`
	CreatedAt       string `json:"created_at,omitempty"`
	UpdatedAt       string `json:"updated_at,omitempty"`
	UserID          int    `json:"user_id,omitempty"`
	Pxe             bool   `json:"pxe,bool"`
	HypervisorID    int    `json:"hypervisor_id,omitempty"`
	IPRangeID       int    `json:"ip_range_id,omitempty"`
	ExternalAddress string `json:"external_address,omitempty"`
	Free            bool   `json:"free,bool"`
	Netmask         string `json:"netmask,omitempty"`
}

type CloudbootIPAddressCreateRequest

type CloudbootIPAddressCreateRequest struct {
	Address string `json:"address,omitempty"`
}

func (CloudbootIPAddressCreateRequest) String

type CloudbootIPAddressesService

type CloudbootIPAddressesService interface {
	List(context.Context, *ListOptions) ([]CloudbootIPAddress, *Response, error)
	// Get(context.Context, int) (*CloudbootIPAddress, *Response, error)
	Create(context.Context, *CloudbootIPAddressCreateRequest) (*CloudbootIPAddress, *Response, error)
	Delete(context.Context, int, interface{}) (*Response, error)
}

CloudbootIPAddressesService is an interface for interfacing with the CloudbootIPAddress endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/cloudboot-ip-addresses

type CloudbootIPAddressesServiceOp

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

CloudbootIPAddressesServiceOp handles communication with the CloudbootIPAddress related methods of the OnApp API.

func (*CloudbootIPAddressesServiceOp) Create

Create Cloudboot CloudbootIPAddress

func (*CloudbootIPAddressesServiceOp) Delete

func (s *CloudbootIPAddressesServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete Cloudboot CloudbootIPAddress

func (*CloudbootIPAddressesServiceOp) List

List all Cloudboot CloudbootIPAddresss

type Configuration

type Configuration struct {
	ActionGlobalLockExpirationTimeout     int      `json:"action_global_lock_expiration_timeout,omitempty"`
	ActionGlobalLockRetryDelay            int      `json:"action_global_lock_retry_delay,omitempty"`
	AdapterOpenConnectionTimeout          int      `json:"adapter_open_connection_timeout,omitempty"`
	AdapterResponseTimeout                int      `json:"adapter_response_timeout,omitempty"`
	AjaxLogUpdateInterval                 int      `json:"ajax_log_update_interval,omitempty"`
	AjaxPaginationUpdateTime              int      `json:"ajax_pagination_update_time,omitempty"`
	AjaxPowerUpdateTime                   int      `json:"ajax_power_update_time,omitempty"`
	AllowAdvancedVsManagement             bool     `json:"allow_advanced_vs_management,omitempty"`
	AllowConnectAws                       bool     `json:"allow_connect_aws,omitempty"`
	AllowHypervisorPasswordEncryption     bool     `json:"allow_hypervisor_password_encryption,omitempty"`
	AllowIncrementalBackups               bool     `json:"allow_incremental_backups,omitempty"`
	AllowInitialRootPasswordEncryption    bool     `json:"allow_initial_root_password_encryption,omitempty"`
	AllowStartVmsWithOneIP                bool     `json:"allow_start_vms_with_one_ip,omitempty"`
	AllowToCollectErrors                  bool     `json:"allow_to_collect_errors,omitempty"`
	AmountOfServiceInstances              int      `json:"amount_of_service_instances,omitempty"`
	AppName                               string   `json:"app_name,omitempty"`
	ArchiveStatsPeriod                    int      `json:"archive_stats_period,omitempty"`
	BackupConvertCoefficient              float64  `json:"backup_convert_coefficient,omitempty"`
	BackupsPath                           string   `json:"backups_path,omitempty"`
	BackupTakerDelay                      int      `json:"backup_taker_delay,omitempty"`
	BillingTransactionRunnerDelay         int      `json:"billing_transaction_runner_delay,omitempty"`
	BlockSize                             int      `json:"block_size,omitempty"`
	CaptureVappTimeout                    int      `json:"capture_vapp_timeout,omitempty"`
	CdnMaxResultsPerGetPage               int      `json:"cdn_max_results_per_get_page,omitempty"`
	CdnSyncDelay                          int      `json:"cdn_sync_delay,omitempty"`
	CloudBootDomainNameServers            string   `json:"cloud_boot_domain_name_servers,omitempty"`
	CloudBootEnabled                      bool     `json:"cloud_boot_enabled,omitempty"`
	CloudBootTarget                       string   `json:"cloud_boot_target,omitempty"`
	ClusterMonitorDelay                   int      `json:"cluster_monitor_delay,omitempty"`
	ComposeVappTimeout                    int      `json:"compose_vapp_timeout,omitempty"`
	CreateEdgeGatewayTimeout              int      `json:"create_edge_gateway_timeout,omitempty"`
	CreateSnapshotTimeout                 int      `json:"create_snapshot_timeout,omitempty"`
	CreateVappTemplateTimeout             int      `json:"create_vapp_template_timeout,omitempty"`
	CreateVdcTimeout                      int      `json:"create_vdc_timeout,omitempty"`
	DashboardAPIAccessToken               string   `json:"dashboard_api_access_token,omitempty"`
	DashboardStats                        []string `json:"dashboard_stats,omitempty"`
	DataPath                              string   `json:"data_path,omitempty"`
	DefaultAccelerationPolicy             bool     `json:"default_acceleration_policy,omitempty"`
	DefaultCustomTheme                    string   `json:"default_custom_theme,omitempty"`
	DefaultFirewallPolicy                 string   `json:"default_firewall_policy,omitempty"`
	DefaultImageTemplate                  int      `json:"default_image_template,omitempty"`
	DefaultTimeout                        int      `json:"default_timeout,omitempty"`
	DefaultVirshConsolePolicy             bool     `json:"default_virsh_console_policy,omitempty"`
	DeleteTemplateSourceAfterInstall      bool     `json:"delete_template_source_after_install,omitempty"`
	DisableBilling                        bool     `json:"disable_billing,omitempty"`
	DisableHypervisorFailover             bool     `json:"disable_hypervisor_failover,omitempty"`
	DNSEnabled                            bool     `json:"dns_enabled,omitempty"`
	DraasEnabled                          bool     `json:"draas_enabled,omitempty"`
	DraasShadowSSHPort                    int      `json:"draas_shadow_ssh_port,omitempty"`
	DraasShadowVpnPort                    int      `json:"draas_shadow_vpn_port,omitempty"`
	DraasVpnCidrBlock                     string   `json:"draas_vpn_cidr_block,omitempty"`
	DropFirewallPolicyAllowedIps          string   `json:"drop_firewall_policy_allowed_ips,omitempty"`
	EmailDeliveryMethod                   string   `json:"email_delivery_method,omitempty"`
	EnableDailyStorageReport              bool     `json:"enable_daily_storage_report,omitempty"`
	EnableDownloadTimeout                 int      `json:"enable_download_timeout,omitempty"`
	EnableHourlyStorageReport             bool     `json:"enable_hourly_storage_report,omitempty"`
	EnableNotifications                   bool     `json:"enable_notifications,omitempty"`
	EnableSuperAdminPermissions           bool     `json:"enable_super_admin_permissions,omitempty"`
	EnforceRedundancy                     bool     `json:"enforce_redundancy,omitempty"`
	FederationTrustsOnlyPrivate           bool     `json:"federation_trusts_only_private,omitempty"`
	ForceSamlLoginOnly                    bool     `json:"force_saml_login_only,omitempty"`
	GenerateComment                       string   `json:"generate_comment,omitempty"`
	GracefulStopTimeout                   int      `json:"graceful_stop_timeout,omitempty"`
	GuestWaitTimeBeforeDestroy            int      `json:"guest_wait_time_before_destroy,omitempty"`
	HaEnabled                             bool     `json:"ha_enabled,omitempty"`
	HypervisorLiveTimes                   int      `json:"hypervisor_live_times,omitempty"`
	HypervisorMonitorDelay                int      `json:"hypervisor_monitor_delay,omitempty"`
	InfinibandCloudBootEnabled            bool     `json:"infiniband_cloud_boot_enabled,omitempty"`
	InstancePackagesThresholdNum          int      `json:"instance_packages_threshold_num,omitempty"` // but in the 6.2.0-183 string !!!! wtf?
	InstantiateVappTemplateTimeout        int      `json:"instantiate_vapp_template_timeout,omitempty"`
	InstantStatsPeriod                    int      `json:"instant_stats_period,omitempty"`
	InterHypervisorBalanceThresholdRatio  int      `json:"inter_hypervisor_balance_threshold_ratio,omitempty"`
	IntraHypervisorBalanceThresholdRatio  int      `json:"intra_hypervisor_balance_threshold_ratio,omitempty"`
	IoLimitingEnabled                     bool     `json:"io_limiting_enabled,omitempty"`
	IPAddressReservationTime              int      `json:"ip_address_reservation_time,omitempty"`
	IPHistoryKeepPeriod                   int      `json:"ip_history_keep_period,omitempty"`
	IpsAllowedForLogin                    string   `json:"ips_allowed_for_login,omitempty"`
	IsArchiveStatsEnabled                 bool     `json:"is_archive_stats_enabled,omitempty"`
	IscsiPortAvailabilityCheckTimeout     int      `json:"iscsi_port_availability_check_timeout,omitempty"`
	IsolatedLicense                       bool     `json:"isolated_license,omitempty"`
	IsoPathOnCp                           string   `json:"iso_path_on_cp,omitempty"`
	IsoPathOnHv                           string   `json:"iso_path_on_hv,omitempty"`
	KvmAvailableFreeMemoryPercentage      int      `json:"kvm_available_free_memory_percentage,omitempty"`
	KvmMaxMemoryRate                      int      `json:"kvm_max_memory_rate,omitempty"`
	LicenseKey                            string   `json:"license_key,omitempty"`
	Localdomain                           string   `json:"localdomain,omitempty"`
	Locales                               []string `json:"locales,omitempty"`
	LogCleanupEnabled                     bool     `json:"log_cleanup_enabled,omitempty"`
	LogCleanupPeriod                      int      `json:"log_cleanup_period,omitempty"` // but in the 6.2.0-183 string !!!! wtf?
	LogLevel                              string   `json:"log_level,omitempty"`
	MaxCPUQuota                           int      `json:"max_cpu_quota,omitempty"`
	MaximumPendingTasks                   int      `json:"maximum_pending_tasks,omitempty"`
	MaxIPAddressesToAssignSimultaneously  int      `json:"max_ip_addresses_to_assign_simultaneously,omitempty"`
	MaxMemoryQuota                        int      `json:"max_memory_quota,omitempty"`
	MaxMemoryRatio                        int      `json:"max_memory_ratio,omitempty"`
	MaxNetworkInterfacePortSpeed          int      `json:"max_network_interface_port_speed,omitempty"`
	MaxUploadSize                         int      `json:"max_upload_size,omitempty"`
	MigrationRateLimit                    int      `json:"migration_rate_limit,omitempty"`
	MonitisAccount                        string   `json:"monitis_account,omitempty"`
	MonitisApikey                         string   `json:"monitis_apikey,omitempty"`
	MonitisPath                           string   `json:"monitis_path,omitempty"`
	MysqlBillingTransactionRetries        int      `json:"mysql_billing_transaction_retries,omitempty"`
	NfsRootIP                             string   `json:"nfs_root_ip,omitempty"`
	NotificationSubjectPrefix             string   `json:"notification_subject_prefix,omitempty"`
	NsxPollingInterval                    int      `json:"nsx_polling_interval,omitempty"`
	NumberOfNotificationsToShow           int      `json:"number_of_notifications_to_show,omitempty"`
	OvaPath                               string   `json:"ova_path,omitempty"`
	PaginationDashboardPagesLimit         int      `json:"pagination_dashboard_pages_limit,omitempty"`
	PaginationMaxItemsLimit               int      `json:"pagination_max_items_limit,omitempty"`
	PartitionAlignOffset                  int      `json:"partition_align_offset,omitempty"`
	PasswordEnforceComplexity             bool     `json:"password_enforce_complexity,omitempty"`
	PasswordExpiry                        int      `json:"password_expiry,omitempty"`
	PasswordForceUnique                   bool     `json:"password_force_unique,omitempty"`
	PasswordHistoryLength                 int      `json:"password_history_length,omitempty"`
	PasswordLettersNumbers                bool     `json:"password_letters_numbers,omitempty"`
	PasswordLockoutAttempts               int      `json:"password_lockout_attempts,omitempty"`
	PasswordMinimumLength                 int      `json:"password_minimum_length,omitempty"`
	PasswordProtectionForDeleting         bool     `json:"password_protection_for_deleting,omitempty"`
	PasswordSymbols                       bool     `json:"password_symbols,omitempty"`
	PasswordUpperLowercase                bool     `json:"password_upper_lowercase,omitempty"`
	PingVmsBeforeInitFailover             bool     `json:"ping_vms_before_init_failover,omitempty"`
	PowerOffTimeout                       int      `json:"power_off_timeout,omitempty"`
	PowerOnTimeout                        int      `json:"power_on_timeout,omitempty"`
	PreferLocalReads                      bool     `json:"prefer_local_reads,omitempty"`
	QemuAttachDeviceDelay                 int      `json:"qemu_attach_device_delay,omitempty"`
	QemuDetachDeviceDelay                 int      `json:"qemu_detach_device_delay,omitempty"`
	RabbitmqHost                          string   `json:"rabbitmq_host,omitempty"`
	RabbitmqLogin                         string   `json:"rabbitmq_login,omitempty"`
	RabbitmqPassword                      string   `json:"rabbitmq_password,omitempty"`
	RabbitmqPort                          int      `json:"rabbitmq_port,omitempty"`
	RabbitmqVhost                         string   `json:"rabbitmq_vhost,omitempty"`
	RebootTimeout                         int      `json:"reboot_timeout,omitempty"`
	RecipeTmpDir                          string   `json:"recipe_tmp_dir,omitempty"`
	RecomposeVappTimeout                  int      `json:"recompose_vapp_timeout,omitempty"`
	RemoteAccessSessionLastPort           int      `json:"remote_access_session_last_port,omitempty"`
	RemoteAccessSessionStartPort          int      `json:"remote_access_session_start_port,omitempty"`
	RemoveBackupsOnDestroyVM              bool     `json:"remove_backups_on_destroy_vm,omitempty"`
	ResetTimeout                          int      `json:"reset_timeout,omitempty"`
	RsyncOptionAcls                       bool     `json:"rsync_option_acls,omitempty"`
	RsyncOptionXattrs                     bool     `json:"rsync_option_xattrs,omitempty"`
	RunRecipeOnVsSleepSeconds             int      `json:"run_recipe_on_vs_sleep_seconds,omitempty"`
	ScheduleRunnerDelay                   int      `json:"schedule_runner_delay,omitempty"`
	ServiceAccountName                    string   `json:"service_account_name,omitempty"`
	SessionTimeout                        int      `json:"session_timeout,omitempty"`
	ShowIPAddressSelectionForNewVM        bool     `json:"show_ip_address_selection_for_new_vm,omitempty"`
	ShowNewWizard                         bool     `json:"show_new_wizard,omitempty"`
	ShutdownTimeout                       int      `json:"shutdown_timeout,omitempty"`
	SimultaneousBackups                   int      `json:"simultaneous_backups,omitempty"`
	SimultaneousBackupsPerBackupServer    int      `json:"simultaneous_backups_per_backup_server,omitempty"`
	SimultaneousBackupsPerDatastore       int      `json:"simultaneous_backups_per_datastore,omitempty"`
	SimultaneousBackupsPerHypervisor      int      `json:"simultaneous_backups_per_hypervisor,omitempty"`
	SimultaneousMigrationsPerHypervisor   int      `json:"simultaneous_migrations_per_hypervisor,omitempty"`
	SimultaneousPersonalDeliviries        int      `json:"simultaneous_personal_deliviries,omitempty"`
	SimultaneousStorageResyncTransactions int      `json:"simultaneous_storage_resync_transactions,omitempty"`
	SimultaneousTransactions              int      `json:"simultaneous_transactions,omitempty"`
	SMTPAddress                           string   `json:"smtp_address,omitempty"`
	SMTPAuthentication                    string   `json:"smtp_authentication,omitempty"`
	SMTPDomain                            string   `json:"smtp_domain,omitempty"`
	SMTPEnableStarttlsAuto                bool     `json:"smtp_enable_starttls_auto,omitempty"`
	SMTPPassword                          string   `json:"smtp_password,omitempty"`
	SMTPPort                              int      `json:"smtp_port,omitempty"`
	SMTPUsername                          string   `json:"smtp_username,omitempty"`
	SnmpStatsLevel1Period                 int      `json:"snmp_stats_level1_period,omitempty"`
	SnmpStatsLevel2Period                 int      `json:"snmp_stats_level2_period,omitempty"`
	SnmpStatsLevel3Period                 int      `json:"snmp_stats_level3_period,omitempty"`
	SnmptrapAddresses                     string   `json:"snmptrap_addresses,omitempty"`
	SnmptrapPort                          int      `json:"snmptrap_port,omitempty"`
	SSHFileTransferOptions                string   `json:"ssh_file_transfer_options,omitempty"`
	SSHFileTransferServer                 string   `json:"ssh_file_transfer_server,omitempty"`
	SSHFileTransferUser                   string   `json:"ssh_file_transfer_user,omitempty"`
	SSHPort                               int      `json:"ssh_port,omitempty"`
	SSHTimeout                            int      `json:"ssh_timeout,omitempty"`
	SslPemPath                            string   `json:"ssl_pem_path,omitempty"`
	StorageEnabled                        bool     `json:"storage_enabled,omitempty"`
	StorageEndpointOverride               string   `json:"storage_endpoint_override,omitempty"`
	StorageUnicast                        bool     `json:"storage_unicast,omitempty"`
	SupportHelpEmail                      string   `json:"support_help_email,omitempty"`
	SuspendTimeout                        int      `json:"suspend_timeout,omitempty"`
	SystemAlertReminderPeriod             int      `json:"system_alert_reminder_period,omitempty"`
	SystemEmail                           string   `json:"system_email,omitempty"`
	SystemHost                            string   `json:"system_host,omitempty"`
	SystemNotification                    bool     `json:"system_notification,omitempty"`
	SystemSupportEmail                    string   `json:"system_support_email,omitempty"`
	SystemTheme                           string   `json:"system_theme,omitempty"`
	TcBurst                               int      `json:"tc_burst,omitempty"`
	TcLatency                             int      `json:"tc_latency,omitempty"`
	TcMtu                                 int      `json:"tc_mtu,omitempty"`
	TemplatePath                          string   `json:"template_path,omitempty"`
	TransactionApprovals                  bool     `json:"transaction_approvals,omitempty"`
	TransactionRunnerDelay                int      `json:"transaction_runner_delay,omitempty"`
	TransactionStandbyPeriod              int      `json:"transaction_standby_period,omitempty"`
	TrustedProxies                        []string `json:"trusted_proxies,omitempty"`
	UndeployTimeout                       int      `json:"undeploy_timeout,omitempty"`
	UniformNodeCapacityThresholdRatio     int      `json:"uniform_node_capacity_threshold_ratio,omitempty"`
	UnsuspendTimeout                      int      `json:"unsuspend_timeout,omitempty"`
	UpdateServerURL                       string   `json:"update_server_url,omitempty"`
	UploadMediaTimeout                    int      `json:"upload_media_timeout,omitempty"`
	UploadVappTemplateTimeout             int      `json:"upload_vapp_template_timeout,omitempty"`
	URLForCustomTools                     string   `json:"url_for_custom_tools,omitempty"`
	UseHTML5VncConsole                    bool     `json:"use_html5_vnc_console,omitempty"`
	UseSSHFileTransfer                    bool     `json:"use_ssh_file_transfer,omitempty"`
	UseYubikeyLogin                       bool     `json:"use_yubikey_login,omitempty"`
	VcenterL1StatsTimeout                 int      `json:"vcenter_l1_stats_timeout,omitempty"`
	VcenterL2StatsTimeout                 int      `json:"vcenter_l2_stats_timeout,omitempty"`
	VcloudPreventIdleSessionTimeout       int      `json:"vcloud_prevent_idle_session_timeout,omitempty"`
	VcloudStatsLevel1Period               int      `json:"vcloud_stats_level1_period,omitempty"`
	VcloudStatsLevel2Period               int      `json:"vcloud_stats_level2_period,omitempty"`
	VcloudStatsUsageInterval              int      `json:"vcloud_stats_usage_interval,omitempty"`
	WipeOutDiskOnDestroy                  bool     `json:"wipe_out_disk_on_destroy,omitempty"`
	WizardResourceReservationTTL          int      `json:"wizard_resource_reservation_ttl,omitempty"`
	WrongActivatedLogicalVolumeAlerts     bool     `json:"wrong_activated_logical_volume_alerts,omitempty"`
	WrongActivatedLogicalVolumeMinutes    int      `json:"wrong_activated_logical_volume_minutes,omitempty"`
	YubikeyAPIID                          string   `json:"yubikey_api_id,omitempty"`
	YubikeyAPIKey                         string   `json:"yubikey_api_key,omitempty"`
	ZabbixHost                            string   `json:"zabbix_host,omitempty"`
	ZabbixPassword                        string   `json:"zabbix_password,omitempty"`
	ZabbixURL                             string   `json:"zabbix_url,omitempty"`
	ZabbixUser                            string   `json:"zabbix_user,omitempty"`
	ZombieDiskSpaceUpdaterDelay           int      `json:"zombie_disk_space_updater_delay,omitempty"`
	ZombieTransactionTime                 int      `json:"zombie_transaction_time,omitempty"`
}

Configuration - represent configuration settings of OnApp installation.

type ConfigurationsService

type ConfigurationsService interface {
	Get(context.Context) (*Configuration, *Response, error)
	// Edit(context.Context, *Configuration, int) (*Response, error)
	Edit(context.Context, *map[string]interface{}, int) (*Response, error)
}

ConfigurationsService is an interface for interfacing with the Configurations endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/system-configuration

type ConfigurationsServiceOp

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

ConfigurationsServiceOp handles communication with the Configuration related methods of the OnApp API.

func (*ConfigurationsServiceOp) Edit

func (s *ConfigurationsServiceOp) Edit(ctx context.Context, editRequest *map[string]interface{}, restart int) (*Response, error)

Edit individual Configuration. func (s *ConfigurationsServiceOp) Edit(ctx context.Context, editRequest *Configuration, restart int) (*Response, error) {

func (*ConfigurationsServiceOp) Get

Get individual Configuration.

type ConnectionOptions

type ConnectionOptions struct {
	APIURL        string `json:"api_url,omitempty"`
	Login         string `json:"login,omitempty"`
	OperationMode string `json:"operation_mode,omitempty"`
	Password      string `json:"password,omitempty"`
}

ConnectionOptions for VMware hypervisor

type ConvertBackupToTemplateRequest

type ConvertBackupToTemplateRequest struct {
	Label         string `json:"label,omitempty"`
	MinDiskSize   int    `json:"min_disk_size,omitempty"`
	MinMemorySize int    `json:"min_memory_size,omitempty"`
}

ConvertBackupToTemplateRequest - data for converting Backup to the Template

type CustomRecipeVariableAttributes

type CustomRecipeVariableAttributes struct {
	Enabled int    `json:"enabled,omitempty"`
	Name    string `json:"name,omitempty"`
	Value   string `json:"value,omitempty"`
}

CustomRecipeVariableAttributes -

type DataStore

type DataStore struct {
	ID                             int         `json:"id,omitempty"`
	Label                          string      `json:"label,omitempty"`
	Identifier                     string      `json:"identifier,omitempty"`
	CreatedAt                      string      `json:"created_at,omitempty"`
	UpdatedAt                      string      `json:"updated_at,omitempty"`
	LocalHypervisorID              int         `json:"local_hypervisor_id,omitempty"`
	DataStoreSize                  int         `json:"data_store_size,omitempty"`
	ZombieDisksSize                int         `json:"zombie_disks_size,omitempty"`
	IP                             string      `json:"ip,omitempty"`
	DataStoreGroupID               int         `json:"data_store_group_id,omitempty"`
	Enabled                        bool        `json:"enabled,bool"`
	DataStoreType                  string      `json:"data_store_type,omitempty"`
	IscsiIP                        string      `json:"iscsi_ip,omitempty"`
	HypervisorGroupID              int         `json:"hypervisor_group_id,omitempty"`
	VdcID                          int         `json:"vdc_id,omitempty"`
	IntegratedStorageCacheEnabled  bool        `json:"integrated_storage_cache_enabled,bool"`
	IntegratedStorageCacheSettings interface{} `json:"integrated_storage_cache_settings,omitempty"`
	AutoHealing                    bool        `json:"auto_healing,bool"`
	IoLimits                       IoLimits    `json:"io_limits,omitempty"`
	Epoch                          bool        `json:"epoch,bool"`
	Default                        bool        `json:"default,bool"`
	Usage                          int         `json:"usage,omitempty"`
	Trim                           bool        `json:"trim,bool"`
}

DataStore represents a DataStore

type DataStoreCreateRequest

type DataStoreCreateRequest struct {
	Label             string `json:"label,omitempty"`
	DataStoreGroupID  int    `json:"data_store_group_id,omitempty"`
	LocalHypervisorID int    `json:"local_hypervisor_id,omitempty"`
	IP                string `json:"ip,omitempty"`
	Enabled           bool   `json:"enabled,bool"`
	DataStoreSize     int    `json:"data_store_size,omitempty"`
	DataStoreType     string `json:"data_store_type,omitempty"`
	IscsiIP           string `json:"iscsi_ip,omitempty"`
}

DataStoreCreateRequest represents a request to create a DataStore

func (DataStoreCreateRequest) String

func (d DataStoreCreateRequest) String() string

type DataStoreEditRequest

type DataStoreEditRequest struct {
	Label             string `json:"label,omitempty"`
	DataStoreGroupID  int    `json:"data_store_group_id,omitempty"`
	LocalHypervisorID int    `json:"local_hypervisor_id,omitempty"`
	IP                string `json:"ip,omitempty"`
	Enabled           bool   `json:"enabled,bool"`
	DataStoreSize     int    `json:"data_store_size,omitempty"`
	DataStoreType     string `json:"data_store_type,omitempty"`
	IscsiIP           string `json:"iscsi_ip,omitempty"`
	Trim              bool   `json:"trim,bool"`
}

DataStoreEditRequest represents a request to edit a DataStore

type DataStoreGroup

type DataStoreGroup struct {
	ID                int                `json:"id,omitempty"`
	Label             string             `json:"label,omitempty"`
	CreatedAt         string             `json:"created_at,omitempty"`
	UpdatedAt         string             `json:"updated_at,omitempty"`
	ServerType        string             `json:"server_type,omitempty"`
	LocationGroupID   int                `json:"location_group_id,omitempty"`
	FederationEnabled bool               `json:"federation_enabled,bool"`
	FederationID      int                `json:"federation_id,omitempty"`
	Traded            bool               `json:"traded,bool"`
	Closed            bool               `json:"closed,bool"`
	HypervisorID      int                `json:"hypervisor_id,omitempty"`
	Identifier        string             `json:"identifier,omitempty"`
	PreconfiguredOnly bool               `json:"preconfigured_only,bool"`
	DraasID           int                `json:"draas_id,omitempty"`
	ProviderVdcID     int                `json:"provider_vdc_id,omitempty"`
	AdditionalFields  []AdditionalFields `json:"additional_fields,omitempty"`
	DatacenterID      int                `json:"datacenter_id,omitempty"`
	DefaultMaxIops    int                `json:"default_max_iops,omitempty"`
	DefaultBurstIops  int                `json:"default_burst_iops,omitempty"`
	MinDiskSize       int                `json:"min_disk_size,omitempty"`
}

DataStoreGroup represents a DataStoreGroup

type DataStoreGroupCreateRequest

type DataStoreGroupCreateRequest struct {
	Label             string `json:"label,omitempty"`
	LocationGroupID   int    `json:"location_group_id,omitempty"`
	PreconfiguredOnly bool   `json:"preconfigured_only,bool"`
	ServerType        string `json:"server_type,omitempty"`
}

DataStoreGroupCreateRequest represents a request to create a DataStoreGroup

func (DataStoreGroupCreateRequest) String

type DataStoreGroupEditRequest

type DataStoreGroupEditRequest struct {
	Label             string `json:"label,omitempty"`
	LocationGroupID   int    `json:"location_group_id,omitempty"`
	PreconfiguredOnly bool   `json:"preconfigured_only,bool"`
}

DataStoreGroupEditRequest represents a request to edit a DataStoreGroup

type DataStoreGroupsService

DataStoreGroupsService is an interface for interfacing with the Data Store Zones endpoints of the OnApp API https://docs.onapp.com/apim/latest/data-store-zones

type DataStoreGroupsServiceOp

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

DataStoreGroupsServiceOp handles communication with the Data Store Groups related methods of the OnApp API.

func (*DataStoreGroupsServiceOp) Attach

func (s *DataStoreGroupsServiceOp) Attach(ctx context.Context, resID int, id int) (*Response, error)

Attach data store to the DataStoreGroup.

func (*DataStoreGroupsServiceOp) AttachedDataStores added in v0.1.53

func (s *DataStoreGroupsServiceOp) AttachedDataStores(ctx context.Context, resID int) ([]DataStore, *Response, error)

AttachedDataStores return all DataStores attached to the DataStoreGroup.

func (*DataStoreGroupsServiceOp) Create

Create DataStoreGroup.

func (*DataStoreGroupsServiceOp) Delete

func (s *DataStoreGroupsServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete DataStoreGroup.

func (*DataStoreGroupsServiceOp) Detach

func (s *DataStoreGroupsServiceOp) Detach(ctx context.Context, resID int, id int) (*Response, error)

Detach data store from the DataStoreGroup.

func (*DataStoreGroupsServiceOp) Edit

Edit DataStoreGroup.

func (*DataStoreGroupsServiceOp) Get

Get individual DataStoreGroup.

func (*DataStoreGroupsServiceOp) List

List all DataStoreGroups.

type DataStoreJoin

type DataStoreJoin struct {
	ID             int    `json:"id,omitempty"`
	DataStoreID    int    `json:"data_store_id,omitempty"`
	CreatedAt      string `json:"created_at,omitempty"`
	UpdatedAt      string `json:"updated_at,omitempty"`
	TargetJoinID   int    `json:"target_join_id,omitempty"`
	TargetJoinType string `json:"target_join_type,omitempty"`
}

DataStoreJoin represents a DataStoreJoin

type DataStoreJoinCreateRequest

type DataStoreJoinCreateRequest struct {
	DataStoreID    int    `json:"data_store_id,omitempty"`
	TargetJoinID   int    `json:"-"`
	TargetJoinType string `json:"-"`
}

DataStoreJoinCreateRequest represents a request to create a DataStoreJoin

func (DataStoreJoinCreateRequest) String

type DataStoreJoinDeleteRequest

type DataStoreJoinDeleteRequest struct {
	ID             int
	TargetJoinID   int
	TargetJoinType string
}

DataStoreJoinDeleteRequest represents a request to delete a DataStoreJoin

type DataStoreJoinsService

DataStoreJoinsService is an interface for interfacing with the DataStoreJoin

type DataStoreJoinsServiceOp

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

DataStoreJoinsServiceOp -

func (*DataStoreJoinsServiceOp) Create

Create DataStoreJoin.

func (*DataStoreJoinsServiceOp) Delete

func (s *DataStoreJoinsServiceOp) Delete(ctx context.Context, deleteRequest *DataStoreJoinDeleteRequest, meta interface{}) (*Response, error)

Delete DataStoreJoin.

func (*DataStoreJoinsServiceOp) Get

func (s *DataStoreJoinsServiceOp) Get(ctx context.Context, targetJoinType string, targetJoinID int, id int) (*DataStoreJoin, *Response, error)

Get individual DataStoreJoin.

func (*DataStoreJoinsServiceOp) List

List all DataStoreJoins.

type DataStoreSolidFireCreateRequest

type DataStoreSolidFireCreateRequest struct {
	Label             string `json:"label,omitempty"`
	DataStoreGroupID  int    `json:"data_store_group_id,omitempty"`
	LocalHypervisorID int    `json:"local_hypervisor_id,omitempty"`
	IP                string `json:"ip,omitempty"`
	Enabled           bool   `json:"enabled,bool"`
	DataStoreSize     int    `json:"data_store_size,omitempty"`
	DataStoreType     string `json:"data_store_type,omitempty"`
	IscsiIP           string `json:"iscsi_ip,omitempty"`

	AdminAttributes   AdminAttributes   `json:"admin_attributes,omitempty"`
	AccountAttributes AccountAttributes `json:"account_attributes,omitempty"`
}

DataStoreSolidFireCreateRequest represents a request to create a SolidFire DataStore

type DataStoreZonePricing

type DataStoreZonePricing struct {
	DataRead       string `json:"data_read,omitempty"`
	DataWrite      string `json:"data_write,omitempty"`
	DiskSizeMax    string `json:"disk_size_max,omitempty"`
	DiskSizeOff    string `json:"disk_size_off,omitempty"`
	DiskSizeOn     string `json:"disk_size_on,omitempty"`
	InputRequests  string `json:"input_requests,omitempty"`
	OutputRequests string `json:"output_requests,omitempty"`
}

DataStoreZonePricing -

type DataStoresService

type DataStoresService interface {
	List(context.Context, *ListOptions) ([]DataStore, *Response, error)
	Get(context.Context, int) (*DataStore, *Response, error)
	Create(context.Context, *DataStoreCreateRequest) (*DataStore, *Response, error)
	Delete(context.Context, int, interface{}) (*Response, error)
	Edit(context.Context, int, *DataStoreEditRequest) (*Response, error)

	// TODO !!!
	// Move next functions to the DataStoreActionsService
	IoLimits(context.Context, int, *IoLimits) (*Response, error)
}

DataStoresService is an interface for interfacing with the DataStore endpoints of the OnApp API https://docs.onapp.com/apim/latest/data-stores

type DataStoresServiceOp

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

DataStoresServiceOp handles communication with the Data Store related methods of the OnApp API.

func (*DataStoresServiceOp) Create

func (s *DataStoresServiceOp) Create(ctx context.Context, createRequest *DataStoreCreateRequest) (*DataStore, *Response, error)

Create DataStore.

func (*DataStoresServiceOp) Delete

func (s *DataStoresServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete DataStore.

func (*DataStoresServiceOp) Edit

func (s *DataStoresServiceOp) Edit(ctx context.Context, id int, editRequest *DataStoreEditRequest) (*Response, error)

Edit DataStore.

func (*DataStoresServiceOp) Get

Get individual DataStore.

func (*DataStoresServiceOp) IoLimits

func (s *DataStoresServiceOp) IoLimits(ctx context.Context, id int, editRequest *IoLimits) (*Response, error)

IoLimits edit io limits for DataStore.

func (*DataStoresServiceOp) List

List all DataStores.

type Disk

type Disk struct {
	AddToFreebsdFstab              bool                           `json:"add_to_freebsd_fstab,bool"`
	AddToLinuxFstab                bool                           `json:"add_to_linux_fstab,bool"`
	Built                          bool                           `json:"built,bool"`
	BurstBw                        int                            `json:"burst_bw,omitempty"`
	BurstIops                      int                            `json:"burst_iops,omitempty"`
	CreatedAt                      string                         `json:"created_at,omitempty"`
	DataStoreID                    int                            `json:"data_store_id,omitempty"`
	DiskSize                       int                            `json:"disk_size,omitempty"`
	DiskVMNumber                   int                            `json:"disk_vm_number,omitempty"`
	FileSystem                     string                         `json:"file_system,omitempty"`
	HasAutobackups                 bool                           `json:"has_autobackups,bool"`
	ID                             int                            `json:"id,omitempty"`
	Identifier                     string                         `json:"identifier,omitempty"`
	IntegratedStorageCacheEnabled  bool                           `json:"integrated_storage_cache_enabled,bool"`
	IntegratedStorageCacheOverride bool                           `json:"integrated_storage_cache_override,bool"`
	IntegratedStorageCacheSettings IntegratedStorageCacheSettings `json:"integrated_storage_cache_settings,omitempty"`
	IoLimits                       IoLimits                       `json:"io_limits,omitempty"`
	IoLimitsOverride               bool                           `json:"io_limits_override,bool"`
	Iqn                            string                         `json:"iqn,omitempty"`
	IsSwap                         bool                           `json:"is_swap,bool"`
	Label                          string                         `json:"label,omitempty"`
	Locked                         bool                           `json:"locked,bool"`
	MaxBw                          int                            `json:"max_bw,omitempty"`
	MaxIops                        int                            `json:"max_iops,omitempty"`
	MinIops                        int                            `json:"min_iops,omitempty"`
	MountPoint                     string                         `json:"mount_point,omitempty"`
	Mounted                        bool                           `json:"mounted,bool"`
	OpenstackID                    int                            `json:"openstack_id,omitempty"`
	Primary                        bool                           `json:"primary,bool"`
	TemporaryVirtualMachineID      int                            `json:"temporary_virtual_machine_id,omitempty"`
	UpdatedAt                      string                         `json:"updated_at,omitempty"`
	VirtualMachineID               int                            `json:"virtual_machine_id,omitempty"`
	VolumeID                       int                            `json:"volume_id,omitempty"`
}

Disk - represent disk from Virtual Machine

type DiskCreateRequest

type DiskCreateRequest struct {
	AddToLinuxFstab   bool   `json:"add_to_linux_fstab,bool"`
	AddToFreebsdFstab bool   `json:"add_to_freebsd_fstab,bool"`
	Primary           bool   `json:"primary,bool"`
	DiskSize          int    `json:"disk_size,omitempty"`
	FileSystem        string `json:"file_system,omitempty"`
	DataStoreID       int    `json:"data_store_id,omitempty"`
	Label             string `json:"label,omitempty"`
	RequireFormatDisk bool   `json:"require_format_disk,bool"`
	MountPoint        string `json:"mount_point,omitempty"`
	HotAttach         bool   `json:"hot_attach,bool"`
	MinIops           int    `json:"min_iops,omitempty"`
	Mounted           bool   `json:"mounted,bool"`

	// Additional field to determine Virtual Machine to create disk
	VirtualMachineID int `json:"-"`
}

DiskCreateRequest - data for creating Disk

func (DiskCreateRequest) String

func (d DiskCreateRequest) String() string

type DiskEditRequest

type DiskEditRequest struct {
	AddToLinuxFstab   bool   `json:"add_to_linux_fstab,bool"`
	AddToFreebsdFstab bool   `json:"add_to_freebsd_fstab,bool"`
	DiskSize          int    `json:"disk_size,omitempty"`
	FileSystem        string `json:"file_system,omitempty"`
	DataStoreID       int    `json:"data_store_id,omitempty"`
	Label             string `json:"label,omitempty"`
	RequireFormatDisk bool   `json:"require_format_disk,bool"`
	MountPoint        string `json:"mount_point,omitempty"`
	MinIops           int    `json:"min_iops,omitempty"`
	Mounted           string `json:"mounted,omitempty"`
}

DiskEditRequest - data for editing Disk

type DisksService

type DisksService interface {
	List(context.Context, *ListOptions) ([]Disk, *Response, error)
	Get(context.Context, int) (*Disk, *Response, error)
	Create(context.Context, *DiskCreateRequest) (*Disk, *Response, error)
	Delete(context.Context, int, interface{}) (*Transaction, *Response, error)
	Edit(context.Context, int, *DiskEditRequest) (*Response, error)
}

DisksService is an interface for interfacing with the Disk endpoints of the OnApp API https://docs.onapp.com/apim/latest/disks

type DisksServiceOp

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

DisksServiceOp handles communication with the Disk related methods of the OnApp API.

func (*DisksServiceOp) Create

func (s *DisksServiceOp) Create(ctx context.Context, createRequest *DiskCreateRequest) (*Disk, *Response, error)

Create Disk.

func (*DisksServiceOp) Delete

func (s *DisksServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Transaction, *Response, error)

Delete Disk.

func (*DisksServiceOp) Edit

func (s *DisksServiceOp) Edit(ctx context.Context, id int, editRequest *DiskEditRequest) (*Response, error)

Edit Disk.

func (*DisksServiceOp) Get

func (s *DisksServiceOp) Get(ctx context.Context, id int) (*Disk, *Response, error)

Get individual Disk.

func (*DisksServiceOp) List

func (s *DisksServiceOp) List(ctx context.Context, opt *ListOptions) ([]Disk, *Response, error)

List all Disks in the cloud.

type Engine added in v0.1.52

type Engine struct {
	Status string `json:"status,omitempty"`
	IP     string `json:"ip,omitempty"`
}

func (Engine) IsOffline added in v0.1.53

func (res Engine) IsOffline() bool

IsOffline check if status of engine is 'offline'

func (Engine) IsOnline added in v0.1.53

func (res Engine) IsOnline() bool

IsOnline check if status of engine is 'online'

type EnginesService added in v0.1.52

type EnginesService interface {
	Status(context.Context) (*Engine, *Response, error)
	Start(context.Context) (*Engine, *Response, error)
	Stop(context.Context) (*Engine, *Response, error)
	Reload(context.Context) (*Engine, *Response, error)
}

EnginesService is an interface for interfacing with the Engines endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/onapp-engine

type EnginesServiceOp added in v0.1.52

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

EnginesServiceOp handles communication with the Engine related methods of the OnApp API.

func (*EnginesServiceOp) Reload added in v0.1.52

func (s *EnginesServiceOp) Reload(ctx context.Context) (*Engine, *Response, error)

Reload Engine.

func (*EnginesServiceOp) Start added in v0.1.52

func (s *EnginesServiceOp) Start(ctx context.Context) (*Engine, *Response, error)

Start Engine.

func (*EnginesServiceOp) Status added in v0.1.52

func (s *EnginesServiceOp) Status(ctx context.Context) (*Engine, *Response, error)

Status of Engine.

func (*EnginesServiceOp) Stop added in v0.1.52

func (s *EnginesServiceOp) Stop(ctx context.Context) (*Engine, *Response, error)

Stop Engine.

type ErrorResponse

type ErrorResponse struct {
	// HTTP response that caused this error
	Response *http.Response

	// Error messages
	Errors map[string][]string `json:"errors,omitempty"`
}

An ErrorResponse reports the error caused by an API request

func (*ErrorResponse) Error

func (r *ErrorResponse) Error() string

func (*ErrorResponse) String

func (r *ErrorResponse) String() string

String - convert ErrorResponse to the string

type FirewallRule

type FirewallRule struct {
	Address            string `json:"address,omitempty"`
	Command            string `json:"command,omitempty"`
	Comment            string `json:"comment,omitempty"`
	CreatedAt          string `json:"created_at,omitempty"`
	Description        string `json:"description,omitempty"`
	DestinationIP      string `json:"destination_ip,omitempty"`
	EnableLogging      bool   `json:"enable_logging,bool"`
	Enabled            bool   `json:"enabled,bool"`
	FirewallServiceID  int    `json:"firewall_service_id,omitempty"`
	ID                 int    `json:"id,omitempty"`
	Identifier         string `json:"identifier,omitempty"`
	NetworkInterfaceID int    `json:"network_interface_id,omitempty"`
	Port               string `json:"port,omitempty"`
	Position           int    `json:"position,omitempty"`
	Protocol           string `json:"protocol,omitempty"`
	ProtocolType       string `json:"protocol_type,omitempty"`
	SourcePort         string `json:"source_port,omitempty"`
	UpdatedAt          string `json:"updated_at,omitempty"`
}

FirewallRule - https://docs.onapp.com/apim/latest/firewall-rules-for-vss

type FirewallRuleCreateRequest

type FirewallRuleCreateRequest struct {
	Address            string `json:"address,omitempty"`
	Command            string `json:"command,omitempty"`
	Protocol           string `json:"protocol,omitempty"`
	NetworkInterfaceID int    `json:"network_interface_id,omitempty"`
	Comment            string `json:"comment,omitempty"`
	Port               string `json:"port,omitempty"`
}

FirewallRuleCreateRequest represents a request to create a FirewallRule

func (FirewallRuleCreateRequest) String

func (d FirewallRuleCreateRequest) String() string

type FirewallRulesService

FirewallRulesService is an interface for interfacing with the FirewallRule endpoints of the OnApp API https://docs.onapp.com/apim/latest/firewall-rules-for-vss

type FirewallRulesServiceOp

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

FirewallRulesServiceOp handles communication with the FirewallRules related methods of the OnApp API.

func (*FirewallRulesServiceOp) Create

Create FirewallRule

func (*FirewallRulesServiceOp) Delete

func (s *FirewallRulesServiceOp) Delete(ctx context.Context, vmID int, id int, meta interface{}) (*Response, error)

Delete FirewallRule

func (*FirewallRulesServiceOp) Edit

func (s *FirewallRulesServiceOp) Edit(ctx context.Context, vmID int, id int, editRequest *FirewallRuleCreateRequest) (*Response, error)

Edit FirewallRule

func (*FirewallRulesServiceOp) Get

Get individual FirewallRule

func (*FirewallRulesServiceOp) List

List all FirewallRules

type HardwareCustomDevice

type HardwareCustomDevice struct {
	Code       string `json:"code,omitempty"`
	CreatedAt  string `json:"created_at,omitempty"`
	ID         int    `json:"id,omitempty"`
	Name       string `json:"name,omitempty"`
	ParentID   int    `json:"parent_id,omitempty"`
	ParentType string `json:"parent_type,omitempty"`
	Pci        string `json:"pci,omitempty"`
	Status     string `json:"status,omitempty"`
	UpdatedAt  string `json:"updated_at,omitempty"`
}

HardwareCustomDevice -

type HardwareDevices

type HardwareDevices struct {
	HardwareCustomDevice           []*HardwareCustomDevice           `json:"hardware_custom_device,omitempty"`
	HardwareDiskDevice             []*HardwareDiskDevice             `json:"hardware_disk_device,omitempty"`
	HardwareDiskPciDevice          []*HardwareDiskPciDevice          `json:"hardware_disk_pci_device,omitempty"`
	HardwareNetworkInterfaceDevice []*HardwareNetworkInterfaceDevice `json:"hardware_network_interface_device,omitempty"`
}

HardwareDevices -

type HardwareDiskDevice

type HardwareDiskDevice struct {
	CreatedAt  string `json:"created_at,omitempty"`
	ID         int    `json:"id,omitempty"`
	Name       string `json:"name,omitempty"`
	ParentID   int    `json:"parent_id,omitempty"`
	ParentType string `json:"parent_type,omitempty"`
	Scsi       string `json:"scsi,omitempty"`
	Status     string `json:"status,omitempty"`
	UpdatedAt  string `json:"updated_at,omitempty"`
}

HardwareDiskDevice -

type HardwareDiskPciDevice

type HardwareDiskPciDevice struct {
	CreatedAt  string `json:"created_at,omitempty"`
	ID         int    `json:"id,omitempty"`
	ParentID   int    `json:"parent_id,omitempty"`
	ParentType string `json:"parent_type,omitempty"`
	Pci        string `json:"pci,omitempty"`
	Status     string `json:"status,omitempty"`
	UpdatedAt  string `json:"updated_at,omitempty"`
}

HardwareDiskPciDevice -

type HardwareNetworkInterfaceDevice

type HardwareNetworkInterfaceDevice struct {
	CreatedAt     string `json:"created_at,omitempty"`
	ID            int    `json:"id,omitempty"`
	InterfaceType string `json:"interface_type,omitempty"`
	Mac           string `json:"mac,omitempty"`
	Name          string `json:"name,omitempty"`
	ParentID      int    `json:"parent_id,omitempty"`
	ParentType    string `json:"parent_type,omitempty"`
	Pci           string `json:"pci,omitempty"`
	Status        string `json:"status,omitempty"`
	UpdatedAt     string `json:"updated_at,omitempty"`
}

HardwareNetworkInterfaceDevice -

type Hypervisor

type Hypervisor struct {
	AllowUnsafeAssignedInterrupts    bool              `json:"allow_unsafe_assigned_interrupts,bool"`
	AmqpExchangeName                 string            `json:"amqp_exchange_name,omitempty"`
	ApplyHypervisorGroupCustomConfig bool              `json:"apply_hypervisor_group_custom_config,bool"`
	Backup                           bool              `json:"backup,bool"`
	BackupIPAddress                  string            `json:"backup_ip_address,omitempty"`
	Blocked                          bool              `json:"blocked,bool"`
	Built                            bool              `json:"built,bool"`
	CalledInAt                       string            `json:"called_in_at,omitempty"`
	CloudBootOs                      string            `json:"cloud_boot_os,omitempty"`
	ConnectionOptions                ConnectionOptions `json:"connection_options,omitempty"`
	CPUCores                         int               `json:"cpu_cores,omitempty"`
	CPUFlags                         []string          `json:"cpu_flags,omitempty"`
	CPUIdle                          int               `json:"cpu_idle,omitempty"`
	CPUMhz                           string            `json:"cpu_mhz,omitempty"`
	CPUModel                         string            `json:"cpu_model,omitempty"`
	Cpus                             int               `json:"cpus,omitempty"`
	CPUUnits                         int               `json:"cpu_units,omitempty"`
	CrashDebug                       bool              `json:"crash_debug,bool"`
	CreatedAt                        string            `json:"created_at,omitempty"`
	CustomConfig                     string            `json:"custom_config,omitempty"`
	DisableFailover                  bool              `json:"disable_failover,bool"`
	Distro                           string            `json:"distro,omitempty"`
	Dom0MemorySize                   int               `json:"dom0_memory_size,omitempty"`
	Enabled                          bool              `json:"enabled,bool"`
	FailoverRecipeID                 int               `json:"failover_recipe_id,omitempty"`
	FailureCount                     int               `json:"failure_count,omitempty"`
	FormatDisks                      bool              `json:"format_disks,bool"`
	FreeDiskSpace                    map[string]int    `json:"free_disk_space,omitempty"`
	FreeMem                          int               `json:"free_mem,omitempty"`
	FreeMemory                       int               `json:"free_memory,omitempty"`
	Host                             string            `json:"host,omitempty"`
	HypervisorGroupID                int               `json:"hypervisor_group_id,omitempty"`
	HypervisorType                   string            `json:"hypervisor_type,omitempty"`
	ID                               int               `json:"id,omitempty"`
	InstanceUUID                     string            `json:"instance_uuid,omitempty"`
	IntegratedStorageDisabled        bool              `json:"integrated_storage_disabled,bool"`
	IPAddress                        string            `json:"ip_address,omitempty"`
	Label                            string            `json:"label,omitempty"`
	ListOfLogicalVolumes             string            `json:"list_of_logical_volumes,omitempty"`
	ListOfVolumeGroups               string            `json:"list_of_volume_groups,omitempty"`
	ListOfZombieDomains              string            `json:"list_of_zombie_domains,omitempty"`
	Locked                           bool              `json:"locked,bool"`
	Mac                              string            `json:"mac,omitempty"`
	Machine                          string            `json:"machine,omitempty"`
	MaintenanceMode                  bool              `json:"maintenance_mode,bool"`
	MemInfo                          int               `json:"mem_info,omitempty"`
	MemoryAllocatedByRunningVms      int               `json:"memory_allocated_by_running_vms,omitempty"`
	Online                           bool              `json:"online,bool"`
	OsVersion                        int               `json:"os_version,omitempty"`
	OsVersionMinor                   int               `json:"os_version_minor,omitempty"`
	PassthroughDisks                 bool              `json:"passthrough_disks,bool"`
	PowerCycleCommand                string            `json:"power_cycle_command,omitempty"`
	Rebooting                        bool              `json:"rebooting,bool"`
	Release                          string            `json:"release,omitempty"`
	SegregationOsType                string            `json:"segregation_os_type,omitempty"`
	ServerType                       string            `json:"server_type,omitempty"`
	Spare                            bool              `json:"spare,bool"`
	StaticIntegratedStorage          bool              `json:"static_integrated_storage,bool"`
	ThreadsPerCore                   int               `json:"threads_per_core,omitempty"`
	TotalCpus                        int               `json:"total_cpus,omitempty"`
	TotalMem                         int               `json:"total_mem,omitempty"`
	TotalMemory                      int               `json:"total_memory,omitempty"`
	TotalMemoryAllocatedByVms        int               `json:"total_memory_allocated_by_vms,omitempty"`
	TotalZombieMem                   int               `json:"total_zombie_mem,omitempty"`
	UpdatedAt                        string            `json:"updated_at,omitempty"`
	Uptime                           string            `json:"uptime,omitempty"`
	UsedCPUResources                 int               `json:"used_cpu_resources,omitempty"`
}

Hypervisor represent Hypervisor of the OnApp API

type HypervisorCreateRequest

type HypervisorCreateRequest struct {
	BackupIPAddress         string `json:"backup_ip_address,omitempty"`
	CPUUnits                int    `json:"cpu_units,omitempty"`
	DisableFailover         bool   `json:"disable_failover,bool"`
	Enabled                 bool   `json:"enabled,bool"`
	FailoverRecipeID        int    `json:"failover_recipe_id,omitempty"`
	HypervisorGroupID       int    `json:"hypervisor_group_id,omitempty"`
	HypervisorType          string `json:"hypervisor_type,omitempty"`
	IPAddress               string `json:"ip_address,omitempty"`
	Label                   string `json:"label,omitempty"`
	PowerCycleCommand       string `json:"power_cycle_command,omitempty"`
	SegregationOsType       string `json:"segregation_os_type,omitempty"`
	StaticIntegratedStorage bool   `json:"static_integrated_storage,bool"`
}

HypervisorCreateRequest represents a request to create a Hypervisor

func (HypervisorCreateRequest) String

func (d HypervisorCreateRequest) String() string

type HypervisorEditRequest

type HypervisorEditRequest struct {
	BackupIPAddress   string `json:"backup_ip_address,omitempty"`
	CPUUnits          int    `json:"cpu_units,omitempty"`
	Enabled           bool   `json:"enabled,bool"`
	FailoverRecipeID  int    `json:"failover_recipe_id,omitempty"`
	HypervisorGroupID int    `json:"hypervisor_group_id,omitempty"`
	IPAddress         string `json:"ip_address,omitempty"`
	Label             string `json:"label,omitempty"`
	SegregationOsType string `json:"segregation_os_type,omitempty"`
}

HypervisorEditRequest represents a request to edit a Hypervisor

type HypervisorGroup

type HypervisorGroup struct {
	AdditionalFields            []AdditionalFields `json:"additional_fields,omitempty"`
	Closed                      bool               `json:"closed,bool"`
	CPUFlags                    []string           `json:"cpu_flags,omitempty"`
	CPUFlagsEnabled             bool               `json:"cpu_flags_enabled,bool"`
	CPUModelConfiguration       string             `json:"cpu_model_configuration"`
	CPUUnits                    int                `json:"cpu_units,omitempty"`
	CreatedAt                   string             `json:"created_at,omitempty"`
	CustomConfig                string             `json:"custom_config,omitempty"`
	DatacenterID                int                `json:"datacenter_id,omitempty"`
	DraasID                     int                `json:"draas_id,omitempty"`
	FailoverTimeout             int                `json:"failover_timeout,omitempty"`
	FederationEnabled           bool               `json:"federation_enabled,bool"`
	FederationID                string             `json:"federation_id,omitempty"`
	HypervisorID                int                `json:"hypervisor_id,omitempty"`
	ID                          int                `json:"id,omitempty"`
	Identifier                  string             `json:"identifier,omitempty"`
	Label                       string             `json:"label,omitempty"`
	LocationGroupID             int                `json:"location_group_id,omitempty"`
	MaxHostCPU                  int                `json:"max_host_cpu,omitempty"`
	MaxHostFreeMemory           int                `json:"max_host_free_memory,omitempty"`
	NetworkFailure              bool               `json:"network_failure,bool"`
	PreconfiguredOnly           bool               `json:"preconfigured_only,bool"`
	PreferLocalReads            bool               `json:"prefer_local_reads,bool"`
	ProviderName                string             `json:"provider_name,omitempty"`
	ProviderVdcID               int                `json:"provider_vdc_id,omitempty"`
	RecoveryType                string             `json:"recovery_type,omitempty"`
	ReleaseResourceType         string             `json:"release_resource_type,omitempty"`
	RunSysprep                  bool               `json:"run_sysprep,bool"`
	ScheduledForDeletion        string             `json:"scheduled_for_deletion,omitempty"`
	ServerType                  string             `json:"server_type,omitempty"`
	StorageChannel              int                `json:"storage_channel,omitempty"`
	SupplierProvider            string             `json:"supplier_provider,omitempty"`
	SupplierVersion             string             `json:"supplier_version,omitempty"`
	SupportsVirtualServerMotion bool               `json:"supports_virtual_server_motion,bool"`
	Tier                        string             `json:"tier,omitempty"`
	Traded                      bool               `json:"traded,bool"`
	UpdatedAt                   string             `json:"updated_at,omitempty"`
}

HypervisorGroup represent Compute Zone of the OnApp API

type HypervisorGroupCreateRequest

type HypervisorGroupCreateRequest struct {
	CPUFlagsEnabled     bool   `json:"cpu_flags_enabled,bool"`
	CPUUnits            int    `json:"cpu_units,omitempty"`
	CustomConfig        string `json:"custom_config,omitempty"`
	DefaultGateway      string `json:"default_gateway,omitempty"`
	FailoverTimeout     int    `json:"failover_timeout,omitempty"`
	Label               string `json:"label,omitempty"`
	LocationGroupID     int    `json:"location_group_id,omitempty"`
	MaxVmsStartAtOnce   int    `json:"max_vms_start_at_once,omitempty"`
	PreconfiguredOnly   bool   `json:"preconfigured_only,bool"`
	RecoveryType        string `json:"recovery_type,omitempty"`
	ReleaseResourceType string `json:"release_resource_type,omitempty"`
	RunSysprep          bool   `json:"run_sysprep,bool"`
	ServerType          string `json:"server_type,omitempty"`
	Vlan                string `json:"vlan,omitempty"`
}

HypervisorGroupCreateRequest represents a request to create a Compute Zone

func (HypervisorGroupCreateRequest) String

type HypervisorGroupEditRequest

type HypervisorGroupEditRequest struct {
	CPUFlagsEnabled     bool   `json:"cpu_flags_enabled,bool"`
	CPUUnits            int    `json:"cpu_units,omitempty"`
	CustomConfig        string `json:"custom_config,omitempty"`
	FailoverTimeout     int    `json:"failover_timeout,omitempty"`
	Label               string `json:"label,omitempty"`
	LocationGroupID     int    `json:"location_group_id,omitempty"`
	MaxVmsStartAtOnce   int    `json:"max_vms_start_at_once,omitempty"`
	OnlyStartedVms      int    `json:"only_started_vms,omitempty"`
	PreconfiguredOnly   bool   `json:"preconfigured_only,bool"`
	PreferLocalReads    int    `json:"prefer_local_reads,omitempty"`
	RecoveryType        string `json:"recovery_type,omitempty"`
	ReleaseResourceType string `json:"release_resource_type,omitempty"`
	RunSysprep          bool   `json:"run_sysprep,bool"`
	ServerType          string `json:"server_type,omitempty"`
	UpdateCPUUnits      int    `json:"update_cpu_units,omitempty"`
	СPUGuarantee        int    `json:"cpu_guarantee,omitempty"`
}

HypervisorGroupEditRequest represents a request to edit a Compute Zone

type HypervisorGroupsService

type HypervisorGroupsService interface {
	List(context.Context, *ListOptions) ([]HypervisorGroup, *Response, error)
	Get(context.Context, int) (*HypervisorGroup, *Response, error)
	Create(context.Context, *HypervisorGroupCreateRequest) (*HypervisorGroup, *Response, error)
	Delete(context.Context, int, interface{}) (*Response, error)
	Edit(context.Context, int, *HypervisorGroupEditRequest) (*Response, error)

	// TODO !!!
	// Move next functions to the HypervisorGroupActionsService
	ListOfAttachedComputeResources(context.Context, int) ([]Hypervisor, *Response, error)
}

HypervisorGroupsService is an interface for interfacing with the Compute Zone endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/compute-zones

type HypervisorGroupsServiceOp

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

HypervisorGroupsServiceOp handles communication with the Compute Zone related methods of the OnApp API.

func (*HypervisorGroupsServiceOp) Create

Create HypervisorGroup.

func (*HypervisorGroupsServiceOp) Delete

func (s *HypervisorGroupsServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete HypervisorGroup.

func (*HypervisorGroupsServiceOp) Edit

Edit HypervisorGroup

func (*HypervisorGroupsServiceOp) Get

Get individual HypervisorGroup.

func (*HypervisorGroupsServiceOp) List

List all HypervisorGroup.

func (*HypervisorGroupsServiceOp) ListOfAttachedComputeResources

func (s *HypervisorGroupsServiceOp) ListOfAttachedComputeResources(ctx context.Context, hvgID int) ([]Hypervisor, *Response, error)

ListOfAttachedComputeResources -

type HypervisorRebootRequest

type HypervisorRebootRequest struct {
	SkipPoweredOffVmsMigration int `json:"skip_powered_off_vms_migration,omitempty"`
	SheduleFailover            int `json:"schedule_failover,omitempty"`
	Force                      int `json:"force,omitempty"`
	Confirm                    int `json:"confirm,omitempty"`
}

HypervisorRebootRequest -

type HypervisorZone

type HypervisorZone struct {
	BandwidthIndex           int                      `json:"bandwidth_index,omitempty"`
	BandwidthScore           int                      `json:"bandwidth_score,omitempty"`
	Certificates             []Certificates           `json:"certificates,omitempty"`
	City                     string                   `json:"city,omitempty"`
	CloudIndex               int                      `json:"cloud_index,omitempty"`
	Country                  string                   `json:"country,omitempty"`
	CPUIndex                 int                      `json:"cpu_index,omitempty"`
	CPUScore                 int                      `json:"cpu_score,omitempty"`
	DataStoreZonePricing     DataStoreZonePricing     `json:"data_store_zone_pricing,omitempty"`
	Description              string                   `json:"description,omitempty"`
	DiskIndex                int                      `json:"disk_index,omitempty"`
	DiskScore                int                      `json:"disk_score,omitempty"`
	FederationID             string                   `json:"federation_id,omitempty"`
	HypervisorZonePricing    HypervisorZonePricing    `json:"hypervisor_zone_pricing,omitempty"`
	Label                    string                   `json:"label,omitempty"`
	Latitude                 float64                  `json:"latitude,omitempty"`
	Longitude                float64                  `json:"longitude,omitempty"`
	NetworkZonePricing       NetworkZonePricing       `json:"network_zone_pricing,omitempty"`
	ProviderName             string                   `json:"provider_name,omitempty"`
	SellerPageURL            string                   `json:"seller_page_url,omitempty"`
	Tier                     string                   `json:"tier,omitempty"`
	TierBandwidthIndex       int                      `json:"tier_bandwidth_index,omitempty"`
	TierCloudIndex           int                      `json:"tier_cloud_index,omitempty"`
	TierCPUIndex             int                      `json:"tier_cpu_index,omitempty"`
	TierDiskIndex            int                      `json:"tier_disk_index,omitempty"`
	TierOptions              TierOptions              `json:"tier_options,omitempty"`
	UptimePercentage         int                      `json:"uptime_percentage,omitempty"`
	UserVirtualServerPricing UserVirtualServerPricing `json:"user_virtual_server_pricing,omitempty"`
}

HypervisorZone -

type HypervisorZonePricing

type HypervisorZonePricing struct {
	CPUMax         string `json:"cpu_max,omitempty"`
	CPUOff         string `json:"cpu_off,omitempty"`
	CPUOn          string `json:"cpu_on,omitempty"`
	CPUPriorityMax string `json:"cpu_priority_max,omitempty"`
	CPUPriorityOff string `json:"cpu_priority_off,omitempty"`
	CPUPriorityOn  string `json:"cpu_priority_on,omitempty"`
	MemoryMax      string `json:"memory_max,omitempty"`
	MemoryOff      string `json:"memory_off,omitempty"`
	MemoryOn       string `json:"memory_on,omitempty"`
}

HypervisorZonePricing -

type HypervisorZonesService

type HypervisorZonesService interface {
	List(context.Context, *ListOptions) ([]HypervisorZone, *Response, error)
	Get(context.Context, int) (*HypervisorZone, *Response, error)
	// Delete(context.Context, int) (*Response, error)
	Delete(context.Context, int, interface{}) (*Transaction, *Response, error)
}

HypervisorZonesService is an interface for interfacing with the HypervisorZone endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/federation/get-list-of-federated-resources

type HypervisorZonesServiceOp

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

HypervisorZonesServiceOp handles communication with the HypervisorZone related methods of the OnApp API.

func (*HypervisorZonesServiceOp) Delete

func (s *HypervisorZonesServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Transaction, *Response, error)

Delete HypervisorZone.

func (*HypervisorZonesServiceOp) Get

Get individual HypervisorZone.

func (*HypervisorZonesServiceOp) List

List all HypervisorZones.

type HypervisorsService

type HypervisorsService interface {
	List(context.Context, *ListOptions) ([]Hypervisor, *Response, error)
	Get(context.Context, int) (*Hypervisor, *Response, error)
	Create(context.Context, *HypervisorCreateRequest) (*Hypervisor, *Response, error)
	Delete(context.Context, int, interface{}) (*Response, error)
	Edit(context.Context, int, *HypervisorEditRequest) (*Response, error)

	Reboot(context.Context, int, *HypervisorRebootRequest) (*Response, error)

	Refresh(context.Context, int) (*HardwareDevices, *Response, error)
	Attach(context.Context, int, map[string]interface{}) (*Response, error)

	GetIntegratedStorageSettings(context.Context, int) (*IntegratedStorageSettings, *Response, error)
	EditIntegratedStorageSettings(context.Context, int, *IntegratedStorageSettings) (*Response, error)
}

HypervisorsService is an interface for interfacing with the Hypervisor endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/compute-resources

type HypervisorsServiceOp

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

HypervisorsServiceOp handles communication with the Hypervisor related methods of the OnApp API.

func (*HypervisorsServiceOp) Attach

func (s *HypervisorsServiceOp) Attach(ctx context.Context, resID int, attachRequest map[string]interface{}) (*Response, error)

Attach - attach disks, network interfaces of hypervisor to the integrated data store

func (*HypervisorsServiceOp) Create

Create Hypervisor

func (*HypervisorsServiceOp) Delete

func (s *HypervisorsServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete Hypervisor

func (*HypervisorsServiceOp) Edit

func (s *HypervisorsServiceOp) Edit(ctx context.Context, id int, editRequest *HypervisorEditRequest) (*Response, error)

Edit Hypervisor

func (*HypervisorsServiceOp) EditIntegratedStorageSettings

func (s *HypervisorsServiceOp) EditIntegratedStorageSettings(ctx context.Context, id int, editRequest *IntegratedStorageSettings) (*Response, error)

EditIntegratedStorageSettings -

func (*HypervisorsServiceOp) Get

Get individual Hypervisor

func (*HypervisorsServiceOp) GetIntegratedStorageSettings added in v0.1.54

func (s *HypervisorsServiceOp) GetIntegratedStorageSettings(ctx context.Context, id int) (*IntegratedStorageSettings, *Response, error)

GetIntegratedStorageSettings -

func (*HypervisorsServiceOp) List

List all Hypervisors

func (*HypervisorsServiceOp) Reboot

func (s *HypervisorsServiceOp) Reboot(ctx context.Context, id int, rebootRequest *HypervisorRebootRequest) (*Response, error)

Reboot Hypervisor

func (*HypervisorsServiceOp) Refresh

func (s *HypervisorsServiceOp) Refresh(ctx context.Context, resID int) (*HardwareDevices, *Response, error)

Refresh - get list of hardware devices (disks, network interfaces) from hypervisor with enabled integrated storage

type ID

type ID struct {
	ID int `json:"id"`
}

ID -

type IPAddress

type IPAddress struct {
	Address         string `json:"address,omitempty"`
	Broadcast       string `json:"broadcast,omitempty"`
	CreatedAt       string `json:"created_at,omitempty"`
	ExternalAddress string `json:"external_address,omitempty"`
	Gateway         string `json:"gateway,omitempty"`
	HypervisorID    int    `json:"hypervisor_id,omitempty"`
	ID              int    `json:"id,omitempty"`
	IPNetID         int    `json:"ip_net_id,omitempty"`
	IPRangeID       int    `json:"ip_range_id,omitempty"`
	Ipv4            bool   `json:"ipv4"`
	LockVersion     int    `json:"lock_version,omitempty"`
	NetworkAddress  string `json:"network_address,omitempty"`
	NetworkID       int    `json:"network_id,omitempty"`
	Prefix          int    `json:"prefix,omitempty"`
	Pxe             bool   `json:"pxe"`
	UpdatedAt       string `json:"updated_at,omitempty"`
	UserID          int    `json:"user_id,omitempty"`
}

IPAddress -

type IPAddressJoin

type IPAddressJoin struct {
	CreatedAt          string    `json:"created_at"`
	ID                 int       `json:"id,omitempty"`
	IPAddress          IPAddress `json:"ip_address,omitempty"`
	IPAddressID        int       `json:"ip_address_id,omitempty"`
	NetworkInterfaceID int       `json:"network_interface_id,omitempty"`
	UpdatedAt          string    `json:"updated_at,omitempty"`
}

IPAddressJoin -

type IPAddresses

type IPAddresses struct {
	IPAddress IPAddress `json:"ip_address,omitempty"`
}

IPAddresses -

type IPAddressesJoin added in v0.1.54

type IPAddressesJoin struct {
	IPAddressJoin []IPAddressJoin `json:"ip_address_join,omitempty"`
}

IPAddressesJoin -

type IPAddressesService added in v0.1.54

type IPAddressesService interface {
	List(context.Context, int, *ListOptions) ([]IPAddressJoin, *Response, error)
}

IPAddressesService is an interface for interfacing with the IPAddress endpoints of the OnApp API https://docs.onapp.com/apim/latest/ip-addresses

type IPAddressesServiceOp added in v0.1.54

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

IPAddressesServiceOp handles communication with the IPAddresses related methods of the OnApp API.

func (*IPAddressesServiceOp) List added in v0.1.54

List all IPAddress

type IPNet

type IPNet struct {
	ID                  int    `json:"id,omitempty"`
	NetworkAddress      string `json:"network_address,omitempty"`
	DefaultGateway      string `json:"default_gateway,omitempty"`
	NetworkMask         int    `json:"network_mask,omitempty"`
	Ipv4                bool   `json:"ipv4,bool"`
	Label               string `json:"label,omitempty"`
	CreatedAt           string `json:"created_at,omitempty"`
	UpdatedAt           string `json:"updated_at,omitempty"`
	OpenstackID         int    `json:"openstack_id,omitempty"`
	Kind                string `json:"kind,omitempty"`
	GatewayOutsideIPNet bool   `json:"gateway_outside_ip_net,bool"`
	Enabled             bool   `json:"enabled,bool"`
	Network             ID     `json:"network"`
}

IPNet -

type IPNetCreateRequest

type IPNetCreateRequest struct {
	Label               string `json:"label,omitempty"`
	AddDefaultIPRange   int    `json:"add_default_ip_range"`
	NetworkAddress      string `json:"network_address,omitempty"`
	NetworkMask         int    `json:"network_mask,omitempty"`
	GatewayOutsideIPNet bool   `json:"gateway_outside_ip_net,bool"`
	DefaultGateway      string `json:"default_gateway,omitempty"`
}

IPNetCreateRequest -

func (IPNetCreateRequest) String

func (d IPNetCreateRequest) String() string

type IPNetEditRequest

type IPNetEditRequest struct {
	Label          string `json:"label,omitempty"`
	NetworkAddress string `json:"network_address,omitempty"`
	NetworkMask    int    `json:"network_mask,omitempty"`
}

IPNetEditRequest -

type IPNetsService

type IPNetsService interface {
	List(context.Context, int, *ListOptions) ([]IPNet, *Response, error)
	Get(context.Context, int, int) (*IPNet, *Response, error)
	Create(context.Context, int, *IPNetCreateRequest) (*IPNet, *Response, error)
	Delete(context.Context, int, int, interface{}) (*Response, error)
	Edit(context.Context, int, int, *IPNetEditRequest) (*Response, error)
}

IPNetsService is an interface for interfacing with the IPNet endpoints of the OnApp API https://docs.onapp.com/apim/latest/ip-nets

type IPNetsServiceOp

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

IPNetsServiceOp handles communication with the IPNet related methods of the OnApp API.

func (*IPNetsServiceOp) Create

func (s *IPNetsServiceOp) Create(ctx context.Context, net int, createRequest *IPNetCreateRequest) (*IPNet, *Response, error)

Create IPNet

func (*IPNetsServiceOp) Delete

func (s *IPNetsServiceOp) Delete(ctx context.Context, net int, id int, meta interface{}) (*Response, error)

Delete IPNet

func (*IPNetsServiceOp) Edit

func (s *IPNetsServiceOp) Edit(ctx context.Context, net int, id int, editRequest *IPNetEditRequest) (*Response, error)

Edit IPNet

func (*IPNetsServiceOp) Get

func (s *IPNetsServiceOp) Get(ctx context.Context, net int, id int) (*IPNet, *Response, error)

Get individual IPNet

func (*IPNetsServiceOp) List

func (s *IPNetsServiceOp) List(ctx context.Context, net int, opt *ListOptions) ([]IPNet, *Response, error)

List all IPNet

type IPRange

type IPRange struct {
	ID                  int    `json:"id,omitempty"`
	StartAddress        string `json:"start_address,omitempty"`
	EndAddress          string `json:"end_address,omitempty"`
	DefaultGateway      string `json:"default_gateway,omitempty"`
	Ipv4                bool   `json:"ipv4,bool"`
	CreatedAt           string `json:"created_at,omitempty"`
	UpdatedAt           string `json:"updated_at,omitempty"`
	Kind                string `json:"kind,omitempty"`
	GatewayOutsideIPNet bool   `json:"gateway_outside_ip_net,bool"`
	IPNet               ID     `json:"ip_net"`
}

IPRange -

type IPRangeCreateRequest

type IPRangeCreateRequest struct {
	StartAddress        string `json:"start_address,omitempty"`
	EndAddress          string `json:"end_address,omitempty"`
	DefaultGateway      string `json:"default_gateway,omitempty"`
	GatewayOutsideIPNet bool   `json:"gateway_outside_ip_net,bool"`
}

IPRangeCreateRequest -

func (IPRangeCreateRequest) String

func (d IPRangeCreateRequest) String() string

type IPRangesService

type IPRangesService interface {
	List(context.Context, int, int, *ListOptions) ([]IPRange, *Response, error)
	Get(context.Context, int, int, int) (*IPRange, *Response, error)
	Create(context.Context, int, int, *IPRangeCreateRequest) (*IPRange, *Response, error)
	Delete(context.Context, int, int, int, interface{}) (*Response, error)
	Edit(context.Context, int, int, int, *IPRangeCreateRequest) (*Response, error)
}

IPRangesService is an interface for interfacing with the IPRange endpoints of the OnApp API https://docs.onapp.com/apim/latest/ip-ranges

type IPRangesServiceOp

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

IPRangesServiceOp handles communication with the IPRange related methods of the OnApp API.

func (*IPRangesServiceOp) Create

func (s *IPRangesServiceOp) Create(ctx context.Context, net int, ipnet int, createRequest *IPRangeCreateRequest) (*IPRange, *Response, error)

Create IPRange.

func (*IPRangesServiceOp) Delete

func (s *IPRangesServiceOp) Delete(ctx context.Context, net int, ipnet int, id int, meta interface{}) (*Response, error)

Delete IPRange.

func (*IPRangesServiceOp) Edit

func (s *IPRangesServiceOp) Edit(ctx context.Context, net int, ipnet int, id int, editRequest *IPRangeCreateRequest) (*Response, error)

Edit IPRange

func (*IPRangesServiceOp) Get

func (s *IPRangesServiceOp) Get(ctx context.Context, net int, ipnet int, id int) (*IPRange, *Response, error)

Get individual IPRange.

func (*IPRangesServiceOp) List

func (s *IPRangesServiceOp) List(ctx context.Context, net int, ipnet int, opt *ListOptions) ([]IPRange, *Response, error)

List all IPRanges.

type ImageTemplate

type ImageTemplate struct {
	AllowResizeWithoutReboot  bool                              `json:"allow_resize_without_reboot,bool"`
	AllowedHotMigrate         bool                              `json:"allowed_hot_migrate,bool"`
	AllowedSwap               bool                              `json:"allowed_swap,bool"`
	ApplicationServer         bool                              `json:"application_server,bool"`
	BackupServerID            string                            `json:"backup_server_id"`
	BaremetalServer           bool                              `json:"baremetal_server,bool"`
	Cdn                       bool                              `json:"cdn,bool"`
	Checksum                  string                            `json:"checksum,omitempty"`
	CreatedAt                 string                            `json:"created_at,omitempty"`
	DatacenterID              int                               `json:"datacenter_id,omitempty"`
	DiskTargetDevice          string                            `json:"disk_target_device,omitempty"`
	Draas                     bool                              `json:"draas,bool"`
	Ext4                      bool                              `json:"ext4,bool"`
	FileName                  string                            `json:"file_name,omitempty"`
	ID                        int                               `json:"id,omitempty"`
	Identifier                string                            `json:"identifier,omitempty"`
	InitialPassword           string                            `json:"initial_password,omitempty"`
	InitialUsername           string                            `json:"initial_username,omitempty"`
	Label                     string                            `json:"label,omitempty"`
	Locked                    bool                              `json:"locked,bool"`
	ManagerID                 string                            `json:"manager_id,omitempty"`
	MinDiskSize               int                               `json:"min_disk_size,omitempty"`
	MinMemorySize             int                               `json:"min_memory_size,omitempty"`
	OpenstackID               int                               `json:"openstack_id,omitempty"`
	OperatingSystem           string                            `json:"operating_system,omitempty"`
	OperatingSystemArch       string                            `json:"operating_system_arch,omitempty"`
	OperatingSystemDistro     string                            `json:"operating_system_distro,omitempty"`
	OperatingSystemEdition    string                            `json:"operating_system_edition,omitempty"`
	OperatingSystemTail       string                            `json:"operating_system_tail,omitempty"`
	ParentTemplateID          int                               `json:"parent_template_id,omitempty"`
	Properties                map[string]interface{}            `json:"properties,omitempty"`
	RemoteID                  string                            `json:"remote_id,omitempty"`
	ResizeWithoutRebootPolicy map[string]map[string]interface{} `json:"resize_without_reboot_policy,omitempty"`
	SmartServer               bool                              `json:"smart_server,bool"`
	State                     string                            `json:"state,omitempty"`
	TemplateSize              int                               `json:"template_size,omitempty"`
	Type                      string                            `json:"type,omitempty"`
	UpdatedAt                 string                            `json:"updated_at,omitempty"`
	UserID                    int                               `json:"user_id,omitempty"`
	Version                   string                            `json:"version,omitempty"`
	Virtualization            []string                          `json:"virtualization,omitempty"`
}

ImageTemplate - represent a template of OnApp API from cloud

type ImageTemplateCreateRequest

type ImageTemplateCreateRequest struct {
	ManagerID      string `json:"manager_id,omitempty"`
	BackupServerID string `json:"backup_server_id"` // don't use omitempty because BackupServerID can be empty
}

ImageTemplateCreateRequest represents a request to install template

type ImageTemplateEditRequest

type ImageTemplateEditRequest struct {
	Label             string `json:"label,omitempty"`
	FileName          string `json:"file_name,omitempty"`
	Version           string `json:"version,omitempty"`
	MinDiskSize       int    `json:"min_disk_size,omitempty"`
	MinMemorySize     int    `json:"min_memory_size,omitempty"`
	AllowedHotMigrate bool   `json:"allowed_hot_migrate,bool"`
}

ImageTemplateEditRequest represents a request to edit template

type ImageTemplateGroup

type ImageTemplateGroup struct {
	CreatedAt         string `json:"created_at,omitempty"`
	Depth             int    `json:"depth,omitempty"`
	HypervisorGroupID int    `json:"hypervisor_group_id,omitempty"`
	ID                int    `json:"id,omitempty"`
	Kms               bool   `json:"kms,bool"`
	KmsHost           string `json:"kms_host,omitempty"`
	KmsPort           string `json:"kms_port,omitempty"`
	KmsServerLabel    string `json:"kms_server_label,omitempty"`
	Label             string `json:"label,omitempty"`
	Lft               int    `json:"lft,omitempty"`
	Mak               bool   `json:"mak,bool"`
	Own               bool   `json:"own,bool"`
	ParentID          int    `json:"parent_id,omitempty"`
	Rgt               int    `json:"rgt,omitempty"`
	SystemGroup       bool   `json:"system_group,bool"`
	UpdatedAt         string `json:"updated_at,omitempty"`
	UserID            int    `json:"user_id,omitempty"`
}

ImageTemplateGroup - represent a template of OnApp API

type ImageTemplateGroupAttachRequest

type ImageTemplateGroupAttachRequest struct {
	TemplateID int `json:"template_id,omitempty"`
}

ImageTemplateGroupAttachRequest represents a request to attach template to the ImageTemplateGroup

type ImageTemplateGroupCreateRequest

type ImageTemplateGroupCreateRequest struct {
	Kms            bool   `json:"kms,bool"`
	KmsHost        string `json:"kms_host,omitempty"`
	KmsPort        string `json:"kms_port,omitempty"`
	KmsServerLabel string `json:"kms_server_label,omitempty"`
	Label          string `json:"label,omitempty"`
	Mak            bool   `json:"mak,bool"`
	Own            bool   `json:"own,bool"`
	UserID         int    `json:"user_id,omitempty"`
}

ImageTemplateGroupCreateRequest represents a request to create a ImageTemplateGroup

type ImageTemplateGroupEditRequest

type ImageTemplateGroupEditRequest struct {
	Kms            bool   `json:"kms,bool"`
	KmsHost        string `json:"kms_host,omitempty"`
	KmsPort        string `json:"kms_port,omitempty"`
	KmsServerLabel string `json:"kms_server_label,omitempty"`
	Label          string `json:"label,omitempty"`
	Mak            bool   `json:"mak,bool"`
	Own            bool   `json:"own,bool"`
}

ImageTemplateGroupEditRequest represents a request to edit a ImageTemplateGroup

type ImageTemplateGroupsService

ImageTemplateGroupsService is an interface for interfacing with the ImageTemplateGroup endpoints of the OnApp API https://docs.onapp.com/apim/latest/template-store

type ImageTemplateGroupsServiceOp

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

ImageTemplateGroupsServiceOp handles communication with the ImageTemplateGroup related methods of the OnApp API.

func (*ImageTemplateGroupsServiceOp) Attach

Attach template to the ImageTemplateGroup.

func (*ImageTemplateGroupsServiceOp) Create

Create ImageTemplateGroup.

func (*ImageTemplateGroupsServiceOp) Delete

func (s *ImageTemplateGroupsServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete ImageTemplateGroup.

func (*ImageTemplateGroupsServiceOp) Detach

func (s *ImageTemplateGroupsServiceOp) Detach(ctx context.Context, groupID int, id int) (*Response, error)

Detach template to the ImageTemplateGroup.

func (*ImageTemplateGroupsServiceOp) Edit

Edit ImageTemplateGroup.

func (*ImageTemplateGroupsServiceOp) Get

Get individual ImageTemplateGroup.

func (*ImageTemplateGroupsServiceOp) List

List all ImageTemplateGroups.

type ImageTemplatesService

ImageTemplatesService is an interface for interfacing with the ImageTemplate endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/templates

Describe templates *installed* on the OnApp cloud

type ImageTemplatesServiceOp

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

ImageTemplatesServiceOp handles communication with the ImageTemplate related methods of the OnApp API.

func (*ImageTemplatesServiceOp) Create

Create ImageTemplate.

func (*ImageTemplatesServiceOp) Delete

func (s *ImageTemplatesServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete ImageTemplate.

func (*ImageTemplatesServiceOp) Edit

Edit ImageTemplate

func (*ImageTemplatesServiceOp) Get

Get individual ImageTemplate.

func (*ImageTemplatesServiceOp) List

List all ImageTemplates.

type Infoboxes

type Infoboxes struct {
	DisplayInfoboxes bool     `json:"display_infoboxes,bool"`
	HiddenInfoboxes  []string `json:"hidden_infoboxes,omitempty"`
}

Infoboxes -

type InstancePackage

type InstancePackage struct {
	Bandwidth   int    `json:"bandwidth,omitempty"`
	BucketsIds  []int  `json:"buckets_ids,omitempty"`
	Cpus        int    `json:"cpus,omitempty"`
	CreatedAt   string `json:"created_at,omitempty"`
	DiskSize    int    `json:"disk_size,omitempty"`
	ID          int    `json:"id,omitempty"`
	Label       string `json:"label,omitempty"`
	Memory      int    `json:"memory,omitempty"`
	OpenstackID int    `json:"openstack_id,omitempty"`
	UpdatedAt   string `json:"updated_at,omitempty"`
}

InstancePackage represents a InstancePackage

type InstancePackageCreateRequest

type InstancePackageCreateRequest struct {
	Label     string `json:"label,omitempty"`
	Cpus      int    `json:"cpus,omitempty"`
	Memory    int    `json:"memory,omitempty"`
	DiskSize  int    `json:"disk_size,omitempty"`
	Bandwidth int    `json:"bandwidth,omitempty"`
}

InstancePackageCreateRequest represents a request to create a InstancePackage

func (InstancePackageCreateRequest) String

type InstancePackageEditRequest

type InstancePackageEditRequest InstancePackageCreateRequest

type InstancePackagesService

InstancePackagesService is an interface for interfacing with the Instance Packages endpoints of the OnApp API https://docs.onapp.com/apim/latest/instance-packages

type InstancePackagesServiceOp

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

InstancePackagesServiceOp handles communication with the Instance Package related methods of the OnApp API.

func (*InstancePackagesServiceOp) Create

Create InstancePackage.

func (*InstancePackagesServiceOp) Delete

func (s *InstancePackagesServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete InstancePackage.

func (*InstancePackagesServiceOp) Edit

Edit InstancePackage.

func (*InstancePackagesServiceOp) Get

Get individual InstancePackage.

func (*InstancePackagesServiceOp) List

List all DataStoreGroups.

type IntegratedDataStoreCreateRequest

type IntegratedDataStoreCreateRequest struct {
	Name       string   `json:"name,omitempty"`
	Replicas   string   `json:"replicas,omitempty"`
	Stripes    string   `json:"stripes,omitempty"`
	Overcommit string   `json:"overcommit,omitempty"`
	NodeIDs    []string `json:"node_ids,omitempty"`
}

IntegratedDataStoreCreateRequest represents a request to create a IntegrateDataStores

func (IntegratedDataStoreCreateRequest) String

type IntegratedDataStores

type IntegratedDataStores struct {
	ID              string  `json:"id,omitempty"`
	Name            string  `json:"name,omitempty"`
	Replicas        int     `json:"replicas,omitempty"`
	Stripes         int     `json:"stripes,omitempty"`
	Overcommit      int     `json:"overcommit,omitempty"`
	TotalSize       int64   `json:"total_size,omitempty"`
	FreeSize        int64   `json:"free_size,omitempty"`
	MaximumDiskSize int64   `json:"maximum_disk_size,omitempty"`
	Performance     int     `json:"performance,omitempty"`
	DiskCount       int     `json:"disk_count,omitempty"`
	Nodes           []Nodes `json:"nodes,omitempty"`
}

type IntegratedDataStoresEditRequest

type IntegratedDataStoresEditRequest IntegratedDataStoreCreateRequest

IntegratedDataStoresEditRequest represents a request to edit a IntegrateDataStores

type IntegratedDataStoresService

type IntegratedDataStoresService interface {
	List(context.Context, int, *ListOptions) ([]IntegratedDataStores, *Response, error)
	Get(context.Context, int, string) (*IntegratedDataStores, *Response, error)
	Create(context.Context, int, *IntegratedDataStoreCreateRequest) (*IntegratedDataStores, *Response, error)
	Delete(context.Context, int, string, interface{}) (*Response, error)
	Edit(context.Context, int, string, *IntegratedDataStoresEditRequest) (*Response, error)

	// TODO !!!
	// Move next functions to the IntegratedDataStoreActionsService
	StorageNodes(context.Context, int) (*StorageNodes, *Response, error)
	BackendNodes(context.Context, int) (*BackendNodes, *Response, error)
}

IntegratedDataStoresService is an interface for interfacing with the IntegrateDataStores endpoints of the OnApp API https://docs.onapp.com/apim/latest/integrated-storage

type IntegratedDataStoresServiceOp

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

IntegratedDataStoresServiceOp handles communication with the Data Store related methods of the OnApp API.

func (*IntegratedDataStoresServiceOp) BackendNodes

func (s *IntegratedDataStoresServiceOp) BackendNodes(ctx context.Context, hvgID int) (*BackendNodes, *Response, error)

BackendNodes - get list of computer resources backend nodes from computer zone

func (*IntegratedDataStoresServiceOp) Create

Create -

func (*IntegratedDataStoresServiceOp) Delete

func (s *IntegratedDataStoresServiceOp) Delete(ctx context.Context, resID int, id string, meta interface{}) (*Response, error)

Delete -

func (*IntegratedDataStoresServiceOp) Edit

Edit -

func (*IntegratedDataStoresServiceOp) Get

Get individual

func (*IntegratedDataStoresServiceOp) List

List all

func (*IntegratedDataStoresServiceOp) StorageNodes

func (s *IntegratedDataStoresServiceOp) StorageNodes(ctx context.Context, hvgID int) (*StorageNodes, *Response, error)

StorageNodes - get list of storage nodes from computer zone

type IntegratedStorageCacheSettings

type IntegratedStorageCacheSettings struct {
}

IntegratedStorageCacheSettings -

type IntegratedStorageSettings

type IntegratedStorageSettings struct {
	BondingMode          string `json:"bonding_mode,omitempty"`
	BondName             string `json:"bond_name,omitempty"`
	BridgeName           string `json:"bridge_name,omitempty"`
	CacheMirrors         int    `json:"cache_mirrors,omitempty"`
	CacheStripes         int    `json:"cache_stripes,omitempty"`
	ControllerMemorySize int    `json:"controller_memory_size,omitempty"`
	DbSize               int    `json:"db_size,omitempty"`
	DisksPerController   int    `json:"disks_per_controller,omitempty"`
	HostID               int    `json:"host_id,omitempty"`
	Mtu                  int    `json:"mtu,omitempty"`
	Vlan                 string `json:"vlan,omitempty"`
}

IntegratedStorageSettings -

type IoLimits

type IoLimits struct {
	ReadIops        int `json:"read_iops,omitempty"`
	WriteIops       int `json:"write_iops,omitempty"`
	ReadThroughput  int `json:"read_throughput,omitempty"`
	WriteThroughput int `json:"write_throughput,omitempty"`
}

IoLimits -

type License

type License struct {
	IntegratedStorageLimit string `json:"integrated_storage_limit,omitempty"`
	IsolatedLicense        bool   `json:"isolated_license,bool"`
	Key                    string `json:"key,omitempty"`
	KvmXenCoreLimit        string `json:"kvm_xen_core_limit,omitempty"`
	KvmXenHvLimit          string `json:"kvm_xen_hv_limit,omitempty"`
	KvmXenVMLimit          string `json:"kvm_xen_vm_limit,omitempty"`
	Status                 string `json:"status,omitempty"`
	SupplierAllowed        bool   `json:"supplier_allowed,bool"`
	SupplierStatus         string `json:"supplier_status,omitempty"`
	TraderAllowed          bool   `json:"trader_allowed,bool"`
	TraderStatus           string `json:"trader_status,omitempty"`
	Type                   string `json:"type,omitempty"`
	Valid                  bool   `json:"valid,bool"`
	VcenterCoreLimit       string `json:"vcenter_core_limit,omitempty"`
	VcenterVMLimit         string `json:"vcenter_vm_limit,omitempty"`
}

func (License) IsValid

func (res License) IsValid() bool

IsValid check if license is valid

type LicenseEditRequest

type LicenseEditRequest struct {
	IsolatedLicense bool   `json:"isolated_license,bool"`
	Key             string `json:"license_key,omitempty"`
}

type LicensesService

type LicensesService interface {
	Get(context.Context) (*License, *Response, error)
	Edit(context.Context, *LicenseEditRequest) (*Response, error)
}

LicensesService is an interface for interfacing with the Licenses endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/buckets/access-control

type LicensesServiceOp

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

LicensesServiceOp handles communication with the License related methods of the OnApp API.

func (*LicensesServiceOp) Edit

func (s *LicensesServiceOp) Edit(ctx context.Context, editRequest *LicenseEditRequest) (*Response, error)

Edit individual License.

func (*LicensesServiceOp) Get

Get individual License.

type LimitResourceRoots

type LimitResourceRoots map[string]*Limits

type Limits

type Limits map[string]interface{}

func LimitsRef

func LimitsRef(serverType string, resourceType string) *Limits
type Links struct {
	PerPage  int
	CurPage  int
	Total    int
	NumPages int
}

Links manages links that are returned along with a List

func (*Links) CurrentPage

func (l *Links) CurrentPage() (int, error)

CurrentPage is current page of the list

func (*Links) IsLastPage

func (l *Links) IsLastPage() bool

IsLastPage returns true if the current page is the last

type ListOptions

type ListOptions struct {
	// For paginated result sets, page of results to retrieve.
	Page int `url:"page,omitempty"`

	// For paginated result sets, the number of results to include per page.
	PerPage int `url:"per_page,omitempty"`
}

ListOptions specifies the optional parameters to various List methods that support pagination.

type LocationGroup

type LocationGroup struct {
	ID           int     `json:"id,omitempty"`
	CreatedAt    string  `json:"created_at,omitempty"`
	UpdatedAt    string  `json:"updated_at,omitempty"`
	Country      string  `json:"country,omitempty"`
	City         string  `json:"city,omitempty"`
	FederationID int     `json:"federation_id,omitempty"`
	Lat          float64 `json:"lat,omitempty"`
	Lng          float64 `json:"lng,omitempty"`
	CdnEnabled   bool    `json:"cdn_enabled,bool"`
	Federated    bool    `json:"federated,bool"`
}

LocationGroup represent LocationGroup from OnApp API

type LocationGroupCreateRequest

type LocationGroupCreateRequest struct {
}

LocationGroupCreateRequest represents a request to create a LocationGroup

func (LocationGroupCreateRequest) String

type LocationGroupsService

type LocationGroupsService interface {
	List(context.Context, *ListOptions) ([]LocationGroup, *Response, error)
	Get(context.Context, int) (*LocationGroup, *Response, error)

	Refresh(context.Context) (*Response, error)
}

LocationGroupsService is an interface for interfacing with the LocationGroup endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/location-groups

type LocationGroupsServiceOp

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

LocationGroupsServiceOp handles communication with the LocationGroup related methods of the OnApp API.

func (*LocationGroupsServiceOp) Get

Get individual LocationGroup.

func (*LocationGroupsServiceOp) List

List all LocationGroups.

func (*LocationGroupsServiceOp) Refresh

Refresh LocationGroup.

type Network

type Network struct {
	ID                        int    `json:"id,omitempty"`
	Label                     string `json:"label,omitempty"`
	Identifier                string `json:"identifier,omitempty"`
	CreatedAt                 string `json:"created_at,omitempty"`
	UpdatedAt                 string `json:"updated_at,omitempty"`
	Vlan                      int    `json:"vlan,omitempty"`
	NetworkGroupID            int    `json:"network_group_id,omitempty"`
	Type                      string `json:"type,omitempty"`
	UserID                    int    `json:"user_id,omitempty"`
	IPAddressPoolID           int    `json:"ip_address_pool_id,omitempty"`
	DefaultOutsideIPAddressID int    `json:"default_outside_ip_address_id,omitempty"`
	DefaultNatRuleNumber      int    `json:"default_nat_rule_number,omitempty"`
	PrefixSize                int    `json:"prefix_size,omitempty"`
	IsNated                   bool   `json:"is_nated,bool"`
	VappID                    int    `json:"vapp_id,omitempty"`
	VdcID                     int    `json:"vdc_id,omitempty"`
	Enabled                   bool   `json:"enabled,bool"`
	Gateway                   string `json:"gateway,omitempty"`
	Netmask                   string `json:"netmask,omitempty"`
	PrimaryDNS                string `json:"primary_dns,omitempty"`
	SecondaryDNS              string `json:"secondary_dns,omitempty"`
	DNSSuffix                 string `json:"dns_suffix,omitempty"`
	Shared                    bool   `json:"shared,bool"`
	FenceMode                 string `json:"fence_mode,omitempty"`
	VcenterIdentifier         string `json:"vcenter_identifier,omitempty"`
	ParentNetworkID           int    `json:"parent_network_id,omitempty"`
	OpenstackID               int    `json:"openstack_id,omitempty"`
	DvSwitchID                int    `json:"dv_switch_id,omitempty"`
	VdcGroupID                int    `json:"vdc_group_id,omitempty"`
	UniversalRouterID         int    `json:"universal_router_id,omitempty"`
	AssignedUser              int    `json:"assigned_user,omitempty"`
}

Network represents a Network

type NetworkCreateRequest

type NetworkCreateRequest struct {
	Label          string `json:"label,omitempty"`
	NetworkGroupID int    `json:"network_group_id,omitempty"`
	Vlan           int    `json:"vlan,omitempty"`

	// Must be set as default value: "Networking::Network"
	Type string `json:"type,omitempty"`
}

NetworkCreateRequest represents a request to create a Network

func (NetworkCreateRequest) String

func (d NetworkCreateRequest) String() string

type NetworkEditRequest

type NetworkEditRequest struct {
	Label          string `json:"label,omitempty"`
	NetworkGroupID int    `json:"network_group_id,omitempty"`
	Vlan           int    `json:"vlan,omitempty"`
}

NetworkEditRequest represents a request to edit a Network

type NetworkGroup

type NetworkGroup struct {
	AdditionalFields  []AdditionalFields `json:"additional_fields,omitempty"`
	Closed            bool               `json:"closed,bool"`
	CreatedAt         string             `json:"created_at,omitempty"`
	DatacenterID      int                `json:"datacenter_id,omitempty"`
	DraasID           int                `json:"draas_id,omitempty"`
	FederationEnabled bool               `json:"federation_enabled,bool"`
	FederationID      int                `json:"federation_id,omitempty"`
	HypervisorID      int                `json:"hypervisor_id,omitempty"`
	ID                int                `json:"id,omitempty"`
	Identifier        string             `json:"identifier,omitempty"`
	Label             string             `json:"label,omitempty"`
	LocationGroupID   int                `json:"location_group_id,omitempty"`
	PreconfiguredOnly bool               `json:"preconfigured_only,bool"`
	ProviderVdcID     int                `json:"provider_vdc_id,omitempty"`
	ServerType        string             `json:"server_type,omitempty"`
	Traded            bool               `json:"traded,bool"`
	UpdatedAt         string             `json:"updated_at,omitempty"`
}

NetworkGroup represents a NetworkGroup

type NetworkGroupCreateRequest

type NetworkGroupCreateRequest struct {
	Label             string `json:"label,omitempty"`
	LocationGroupID   int    `json:"location_group_id,omitempty"`
	PreconfiguredOnly bool   `json:"preconfigured_only,bool"`
	ServerType        string `json:"server_type,omitempty"`
}

NetworkGroupCreateRequest represents a request to create a NetworkGroup

func (NetworkGroupCreateRequest) String

func (d NetworkGroupCreateRequest) String() string

type NetworkGroupEditRequest

type NetworkGroupEditRequest struct {
	Label             string `json:"label,omitempty"`
	LocationGroupID   int    `json:"location_group_id,omitempty"`
	PreconfiguredOnly bool   `json:"preconfigured_only,bool"`
}

NetworkGroupEditRequest represents a request to edit a NetworkGroup

type NetworkGroupsService

NetworkGroupsService is an interface for interfacing with the NetworkGroup endpoints of the OnApp API https://docs.onapp.com/apim/latest/network-zones

type NetworkGroupsServiceOp

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

NetworkGroupsServiceOp handles communication with the NetworkGroups related methods of the OnApp API.

func (*NetworkGroupsServiceOp) Create

Create NetworkGroup.

func (*NetworkGroupsServiceOp) Delete

func (s *NetworkGroupsServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete NetworkGroup.

func (*NetworkGroupsServiceOp) Edit

func (s *NetworkGroupsServiceOp) Edit(ctx context.Context, id int, editRequest *NetworkGroupEditRequest) (*Response, error)

Edit NetworkGroup.

func (*NetworkGroupsServiceOp) Get

Get individual NetworkGroup.

func (*NetworkGroupsServiceOp) List

List all NetworkGroups.

type NetworkInterface

type NetworkInterface struct {
	AdapterType         string `json:"adapter_type,omitempty"`
	Connected           bool   `json:"connected,bool"`
	CreatedAt           string `json:"created_at,omitempty"`
	DefaultFirewallRule string `json:"default_firewall_rule,omitempty"`
	EdgeGatewayID       int    `json:"edge_gateway_id,omitempty"`
	ID                  int    `json:"id,omitempty"`
	Identifier          string `json:"identifier,omitempty"`
	Label               string `json:"label,omitempty"`
	MacAddress          string `json:"mac_address,omitempty"`
	NetworkJoinID       int    `json:"network_join_id"`
	OpenstackID         int    `json:"openstack_id,omitempty"`
	Primary             bool   `json:"primary,bool"`
	RateLimit           int    `json:"rate_limit,omitempty"`
	UpdatedAt           string `json:"updated_at,omitempty"`
	Usage               bool   `json:"usage,bool"`
	UsageLastResetAt    bool   `json:"usage_last_reset_at,bool"`
	UsageMonthRolledAt  bool   `json:"usage_month_rolled_at,bool"`
	UseAsGateway        bool   `json:"use_as_gateway,bool"`
	VirtualMachineID    int    `json:"virtual_machine_id,omitempty"`
}

NetworkInterface represents a NetworkInterface

type NetworkInterfaceCreateRequest

type NetworkInterfaceCreateRequest struct {
	Label         string `json:"label,omitempty"`
	RateLimit     int    `json:"rate_limit,omitempty"`
	NetworkJoinID int    `json:"network_join_id,omitempty"`
	Primary       bool   `json:"primary,bool"`
}

NetworkInterfaceCreateRequest represents a request to create a NetworkInterface

func (NetworkInterfaceCreateRequest) String

type NetworkInterfaceEditRequest

type NetworkInterfaceEditRequest struct {
	Label     string `json:"label,omitempty"`
	RateLimit int    `json:"rate_limit,omitempty"`
}

NetworkInterfaceEditRequest represents a request to edit a NetworkInterface

type NetworkInterfacesService

NetworkInterfacesService is an interface for interfacing with the NetworkInterface endpoints of the OnApp API https://docs.onapp.com/apim/latest/network-interfaces

type NetworkInterfacesServiceOp

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

NetworkInterfacesServiceOp handles communication with the NetworkInterfaces related methods of the OnApp API.

func (*NetworkInterfacesServiceOp) Create

Create NetworkInterface.

func (*NetworkInterfacesServiceOp) Delete

func (s *NetworkInterfacesServiceOp) Delete(ctx context.Context, vmID int, id int, meta interface{}) (*Response, error)

Delete NetworkInterface.

func (*NetworkInterfacesServiceOp) Edit

Edit NetworkInterface.

func (*NetworkInterfacesServiceOp) Get

Get individual NetworkInterface.

func (*NetworkInterfacesServiceOp) List

List all NetworkInterfaces.

type NetworkJoin

type NetworkJoin struct {
	ID             int    `json:"id,omitempty"`
	NetworkID      int    `json:"network_id,omitempty"`
	Interface      string `json:"interface,omitempty"`
	CreatedAt      string `json:"created_at,omitempty"`
	UpdatedAt      string `json:"updated_at,omitempty"`
	TargetJoinID   int    `json:"target_join_id,omitempty"`
	TargetJoinType string `json:"target_join_type,omitempty"`
	Identifier     string `json:"identifier,omitempty"`
}

NetworkJoin represents a NetworkJoin

type NetworkJoinCreateRequest

type NetworkJoinCreateRequest struct {
	NetworkID      int    `json:"network_id,omitempty"`
	Interface      string `json:"interface,omitempty"`
	TargetJoinID   int    `json:"-"`
	TargetJoinType string `json:"-"`
}

NetworkJoinCreateRequest represents a request to create a NetworkJoin

func (NetworkJoinCreateRequest) String

func (d NetworkJoinCreateRequest) String() string

type NetworkJoinDeleteRequest

type NetworkJoinDeleteRequest struct {
	ID             int
	TargetJoinID   int
	TargetJoinType string
}

NetworkJoinDeleteRequest represents a request to delete a NetworkJoin

type NetworkJoinsService

NetworkJoinsService is an interface for interfacing with the NetworkJoin

type NetworkJoinsServiceOp

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

NetworkJoinsServiceOp -

func (*NetworkJoinsServiceOp) Create

Create NetworkJoin.

func (*NetworkJoinsServiceOp) Delete

func (s *NetworkJoinsServiceOp) Delete(ctx context.Context, deleteRequest *NetworkJoinDeleteRequest, meta interface{}) (*Response, error)

Delete NetworkJoin.

func (*NetworkJoinsServiceOp) Get

func (s *NetworkJoinsServiceOp) Get(ctx context.Context, targetJoinType string, targetJoinID int, id int) (*NetworkJoin, *Response, error)

Get individual NetworkJoin.

func (*NetworkJoinsServiceOp) List

List all NetworkJoins.

type NetworkZonePricing

type NetworkZonePricing struct {
	DataRxed       string `json:"data_rxed,omitempty"`
	DataSent       string `json:"data_sent,omitempty"`
	IPAddressesMax string `json:"ip_addresses_max,omitempty"`
	IPAddressesOff string `json:"ip_addresses_off,omitempty"`
	IPAddressesOn  string `json:"ip_addresses_on,omitempty"`
	PortSpeed      string `json:"port_speed,omitempty"`
	PortSpeedMax   string `json:"port_speed_max,omitempty"`
}

NetworkZonePricing -

type NetworksService

type NetworksService interface {
	List(context.Context, *ListOptions) ([]Network, *Response, error)
	Get(context.Context, int) (*Network, *Response, error)
	Create(context.Context, *NetworkCreateRequest) (*Network, *Response, error)
	Delete(context.Context, int, interface{}) (*Response, error)
	Edit(context.Context, int, *NetworkEditRequest) (*Response, error)
}

NetworksService is an interface for interfacing with the Network endpoints of the OnApp API https://docs.onapp.com/apim/latest/networks

type NetworksServiceOp

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

NetworksServiceOp handles communication with the Networks related methods of the OnApp API.

func (*NetworksServiceOp) Create

func (s *NetworksServiceOp) Create(ctx context.Context, createRequest *NetworkCreateRequest) (*Network, *Response, error)

Create Network.

func (*NetworksServiceOp) Delete

func (s *NetworksServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete Network.

func (*NetworksServiceOp) Edit

func (s *NetworksServiceOp) Edit(ctx context.Context, id int, editRequest *NetworkEditRequest) (*Response, error)

Edit Network.

func (*NetworksServiceOp) Get

func (s *NetworksServiceOp) Get(ctx context.Context, id int) (*Network, *Response, error)

Get individual Network.

func (*NetworksServiceOp) List

List all Networks.

type Node

type Node struct {
	ID string `json:"id,omitempty"`
}

type Nodes

type Nodes struct {
	Node Node `json:"node,omitempty"`
}

type Permission

type Permission struct {
	ID         int    `json:"id,omitempty"`
	Identifier string `json:"identifier,omitempty"`
	CreatedAt  string `json:"created_at,omitempty"`
	UpdatedAt  string `json:"updated_at,omitempty"`
	Label      string `json:"label,omitempty"`
}

Permission -

type Permissions

type Permissions struct {
	Permission Permission `json:"permission,omitempty"`
}

Permissions -

type PriceResourceRoots

type PriceResourceRoots map[string]*Prices

type Prices

type Prices map[string]interface{}

func PricesRef

func PricesRef(serverType string, resourceType string) *Prices

type RateCard

type RateCard struct {
	BucketID       int     `json:"bucket_id,omitempty"`
	ServerType     string  `json:"server_type,omitempty"`
	TargetID       int     `json:"target_id,omitempty"`
	Type           string  `json:"type,omitempty"`
	TimingStrategy string  `json:"timing_strategy,omitempty"`
	TargetName     string  `json:"target_name,omitempty"`
	Prices         *Prices `json:"prices,omitempty"`
}

type RateCardCreateRequest

type RateCardCreateRequest struct {
	BucketID                       int     `json:"bucket_id,omitempty"`
	ServerType                     string  `json:"server_type,omitempty"`
	TargetID                       int     `json:"target_id,omitempty"`
	Type                           string  `json:"type,omitempty"`
	TimingStrategy                 string  `json:"timing_strategy,omitempty"`
	ApplyToAllResourcesInTheBucket bool    `json:"apply_to_all_resources_in_the_bucket,bool"`
	Prices                         *Prices `json:"prices,omitempty"`
}

func (RateCardCreateRequest) String

func (d RateCardCreateRequest) String() string

type RateCardDeleteRequest

type RateCardDeleteRequest RateCardCreateRequest

type RateCardLimits

type RateCardLimits map[string]*PriceResourceRoots
var RateCards *RateCardLimits

type RateCardsService

type RateCardsService interface {
	List(context.Context, int, *ListOptions) ([]RateCard, *Response, error)
	// Get(context.Context, int, int) (*RateCard, *Response, error)
	Create(context.Context, *RateCardCreateRequest) (*RateCard, *Response, error)
	Delete(context.Context, *RateCardDeleteRequest, interface{}) (*Response, error)
}

RateCardsService is an interface for interfacing with the RateCard endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/buckets/rate-card

type RateCardsServiceOp

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

RateCardsServiceOp handles communication with the RateCard related methods of the OnApp API.

func (*RateCardsServiceOp) Create

func (s *RateCardsServiceOp) Create(ctx context.Context, createRequest *RateCardCreateRequest) (*RateCard, *Response, error)

Create RateCard.

func (*RateCardsServiceOp) Delete

func (s *RateCardsServiceOp) Delete(ctx context.Context, deleteRequest *RateCardDeleteRequest, meta interface{}) (*Response, error)

Delete RateCard.

func (*RateCardsServiceOp) List

func (s *RateCardsServiceOp) List(ctx context.Context, id int, opt *ListOptions) ([]RateCard, *Response, error)

List return RateCards for Bucket.

type Recipe added in v0.1.58

type Recipe struct {
	ID             int           `json:"id,omitempty"`
	UserID         int           `json:"user_id,omitempty"`
	CreatedAt      string        `json:"created_at,omitempty"`
	UpdatedAt      string        `json:"updated_at,omitempty"`
	Label          string        `json:"label,omitempty"`
	Description    string        `json:"description,omitempty"`
	ScriptType     string        `json:"script_type,omitempty"`
	CompatibleWith string        `json:"compatible_with,omitempty"`
	RecipeSteps    []RecipeSteps `json:"recipe_steps,omitempty"`
}

Recipe represents a Recipe

type RecipeCreateRequest added in v0.1.58

type RecipeCreateRequest struct {
	Label          string `json:"label"`
	Description    string `json:"description"`
	CompatibleWith string `json:"compatible_with"`
	ScriptType     string `json:"script_type"`
}

RecipeCreateRequest represents a request to create a Recipe

func (RecipeCreateRequest) String added in v0.1.58

func (d RecipeCreateRequest) String() string

type RecipeGroup added in v0.1.58

type RecipeGroup struct {
	ID        int        `json:"id,omitempty"`
	Label     string     `json:"label,omitempty"`
	ParentID  int        `json:"parent_id,omitempty"`
	Lft       int        `json:"lft,omitempty"`
	Rgt       int        `json:"rgt,omitempty"`
	Depth     int        `json:"depth,omitempty"`
	CreatedAt string     `json:"created_at,omitempty"`
	UpdatedAt string     `json:"updated_at,omitempty"`
	Childrens []Children `json:"children,omitempty"` // rename filed but JSON leave as is
	Relations []Relation `json:"relations,omitempty"`
}

RecipeGroup represents a RecipeGroup

type RecipeGroupAttachRequest added in v0.1.58

type RecipeGroupAttachRequest struct {
	RecipeID int `json:"recipe_id"`
}

type RecipeGroupCreateRequest added in v0.1.58

type RecipeGroupCreateRequest struct {
	Label string `json:"label,omitempty"`
}

RecipeGroupCreateRequest represents a request to create a RecipeGroup

func (RecipeGroupCreateRequest) String added in v0.1.58

func (d RecipeGroupCreateRequest) String() string

type RecipeGroupEditRequest added in v0.1.58

type RecipeGroupEditRequest struct {
	Label string `json:"label,omitempty"`
}

RecipeGroupEditRequest represents a request to edit a RecipeGroup

type RecipeGroupsService added in v0.1.58

RecipeGroupsService is an interface for interfacing with the RecipeGroup endpoints of the OnApp API https://docs.onapp.com/apim/latest/recipe_group-groups

type RecipeGroupsServiceOp added in v0.1.58

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

RecipeGroupsServiceOp handles communication with the RecipeGroups related methods of the OnApp API.

func (*RecipeGroupsServiceOp) Attach added in v0.1.58

func (s *RecipeGroupsServiceOp) Attach(ctx context.Context, recipeGroupID int, attachRequest *RecipeGroupAttachRequest) (*Response, error)

Attach - attach recipe to the RecipeGroup.

func (*RecipeGroupsServiceOp) Create added in v0.1.58

Create Recipe Group.

func (*RecipeGroupsServiceOp) Delete added in v0.1.58

func (s *RecipeGroupsServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete RecipeGroup.

func (*RecipeGroupsServiceOp) Detach added in v0.1.58

func (s *RecipeGroupsServiceOp) Detach(ctx context.Context, recipeGroupID, recipeID int) (*Response, error)

Detach - detach recipe from the RecipeGroup.

func (*RecipeGroupsServiceOp) Edit added in v0.1.58

func (s *RecipeGroupsServiceOp) Edit(ctx context.Context, id int, editRequest *RecipeGroupEditRequest) (*Response, error)

Edit RecipeGroup.

func (*RecipeGroupsServiceOp) Get added in v0.1.58

Get individual Recipe Group.

func (*RecipeGroupsServiceOp) List added in v0.1.58

List all Recipe Groups.

func (*RecipeGroupsServiceOp) Recipes added in v0.1.58

func (s *RecipeGroupsServiceOp) Recipes(ctx context.Context, recipeGroupID int, opt *ListOptions) ([]Recipe, *Response, error)

List all Recipe attached to the RecipeGroups.

type RecipeJoin added in v0.1.58

type RecipeJoin struct {
	CreatedAt      string `json:"created_at,omitempty"`
	EventType      string `json:"event_type"`
	ID             int    `json:"id"`
	RecipeID       int    `json:"recipe_id"`
	TargetJoinID   int    `json:"target_join_id,omitempty"`
	TargetJoinType string `json:"target_join_type,omitempty"`
	UpdatedAt      string `json:"updated_at,omitempty"`
}

RecipeJoin represents a RecipeJoin

type RecipeJoinCreateRequest added in v0.1.58

type RecipeJoinCreateRequest struct {
	EventType      string `json:"event_type"`
	RecipeID       int    `json:"recipe_id"`
	TargetJoinID   int    `json:"-"`
	TargetJoinType string `json:"-"`
}

RecipeJoinCreateRequest represents a request to create a ControlPanel RecipeJoin

func (RecipeJoinCreateRequest) String added in v0.1.58

func (d RecipeJoinCreateRequest) String() string

type RecipeJoinDeleteRequest added in v0.1.58

type RecipeJoinDeleteRequest struct {
	ID             int
	TargetJoinID   int
	TargetJoinType string
}

RecipeJoinDeleteRequest represents a request to delete a RecipeJoin

type RecipeJoinsService added in v0.1.58

type RecipeJoinsService interface {
	List(context.Context, *RecipeJoinCreateRequest, *ListOptions) (map[string]interface{}, *Response, error)
	Create(context.Context, *RecipeJoinCreateRequest) (*RecipeJoin, *Response, error)
	Delete(context.Context, *RecipeJoinDeleteRequest, interface{}) (*Response, error)
}

RecipeJoinsService is an interface for interfacing with the RecipeJoin

type RecipeJoinsServiceOp added in v0.1.58

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

RecipeJoinsServiceOp -

func (*RecipeJoinsServiceOp) Create added in v0.1.58

Create RecipeJoin

func (*RecipeJoinsServiceOp) Delete added in v0.1.58

func (s *RecipeJoinsServiceOp) Delete(ctx context.Context, deleteRequest *RecipeJoinDeleteRequest, meta interface{}) (*Response, error)

Delete RecipeJoin

func (*RecipeJoinsServiceOp) List added in v0.1.58

func (s *RecipeJoinsServiceOp) List(ctx context.Context, createRequest *RecipeJoinCreateRequest, opt *ListOptions) (map[string]interface{}, *Response, error)

List all RecipeJoins

type RecipeStep added in v0.1.58

type RecipeStep struct {
	ID               int    `json:"id"`
	RecipeID         int    `json:"recipe_id"`
	Number           int    `json:"number,omitempty"`
	Script           string `json:"script,omitempty"`
	OnSuccess        string `json:"on_success,omitempty"`
	OnFailure        string `json:"on_failure,omitempty"`
	SuccessGotoStep  int    `json:"success_goto_step"`
	CreatedAt        string `json:"created_at,omitempty"`
	UpdatedAt        string `json:"updated_at,omitempty"`
	ResultSource     string `json:"result_source,omitempty"`
	PassValues       string `json:"pass_values,omitempty"`
	PassAnythingElse bool   `json:"pass_anything_else"`
	FailValues       string `json:"fail_values,omitempty"`
	FailAnythingElse bool   `json:"fail_anything_else"`
	FailureGotoStep  int    `json:"failure_goto_step"`
}

type RecipeStepCreateRequest added in v0.1.58

type RecipeStepCreateRequest struct {
	Script           string `json:"script"`
	ResultSource     string `json:"result_source"`
	PassAnythingElse bool   `json:"pass_anything_else"`
	PassValues       string `json:"pass_values"`
	OnSuccess        string `json:"on_success"`
	SuccessGotoStep  int    `json:"success_goto_step"`
	FailAnythingElse bool   `json:"fail_anything_else"`
	FailValues       string `json:"fail_values"`
	OnFailure        string `json:"on_failure"`
	FailureGotoStep  int    `json:"failure_goto_step"`
}

RecipeStepCreateRequest represents a request to create a RecipeStep

func (RecipeStepCreateRequest) String added in v0.1.58

func (d RecipeStepCreateRequest) String() string

type RecipeSteps added in v0.1.58

type RecipeSteps struct {
	RecipeStep RecipeStep `json:"recipe_step,omitempty"`
}

type RecipeStepsService added in v0.1.58

type RecipeStepsService interface {
	List(context.Context, int, *ListOptions) ([]RecipeStep, *Response, error)
	Get(context.Context, int, int) (*RecipeStep, *Response, error)
	Create(context.Context, int, *RecipeStepCreateRequest) (*RecipeStep, *Response, error)
	Delete(context.Context, int, int, interface{}) (*Response, error)
	Swap(context.Context, int, int, int, interface{}) (*Response, error)
}

RecipeStepsService is an interface for interfacing with the RecipeStep endpoints of the OnApp API https://docs.onapp.com/apim/latest/recipes/manage-recipe-steps

type RecipeStepsServiceOp added in v0.1.58

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

RecipeStepsServiceOp handles communication with the Data Store related methods of the OnApp API.

func (*RecipeStepsServiceOp) Create added in v0.1.58

func (s *RecipeStepsServiceOp) Create(ctx context.Context, recipeID int, createRequest *RecipeStepCreateRequest) (*RecipeStep, *Response, error)

Create RecipeStep.

func (*RecipeStepsServiceOp) Delete added in v0.1.58

func (s *RecipeStepsServiceOp) Delete(ctx context.Context, recipeID int, recipeStepID int, meta interface{}) (*Response, error)

Delete RecipeStep.

func (*RecipeStepsServiceOp) Get added in v0.1.58

func (s *RecipeStepsServiceOp) Get(ctx context.Context, recipeID int, recipeStepID int) (*RecipeStep, *Response, error)

Get individual RecipeStep.

func (*RecipeStepsServiceOp) List added in v0.1.58

func (s *RecipeStepsServiceOp) List(ctx context.Context, recipeID int, opt *ListOptions) ([]RecipeStep, *Response, error)

List all RecipeSteps.

func (*RecipeStepsServiceOp) Swap added in v0.1.58

func (s *RecipeStepsServiceOp) Swap(ctx context.Context, recipeID int, recipeStepIDFrom int, recipeStepIDTo int, meta interface{}) (*Response, error)

Swap RecipeStep.

type RecipesService added in v0.1.58

type RecipesService interface {
	List(context.Context, *ListOptions) ([]Recipe, *Response, error)
	Get(context.Context, int) (*Recipe, *Response, error)
	Create(context.Context, *RecipeCreateRequest) (*Recipe, *Response, error)
	Delete(context.Context, int, interface{}) (*Response, error)
	Edit(context.Context, int, *RecipeCreateRequest) (*Response, error)
}

RecipesService is an interface for interfacing with the Recipe endpoints of the OnApp API https://docs.onapp.com/apim/latest/recipes

type RecipesServiceOp added in v0.1.58

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

RecipesServiceOp handles communication with the Data Store related methods of the OnApp API.

func (*RecipesServiceOp) Create added in v0.1.58

func (s *RecipesServiceOp) Create(ctx context.Context, createRequest *RecipeCreateRequest) (*Recipe, *Response, error)

Create Recipe.

func (*RecipesServiceOp) Delete added in v0.1.58

func (s *RecipesServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete Recipe.

func (*RecipesServiceOp) Edit added in v0.1.58

func (s *RecipesServiceOp) Edit(ctx context.Context, id int, editRequest *RecipeCreateRequest) (*Response, error)

Edit Recipe.

func (*RecipesServiceOp) Get added in v0.1.58

func (s *RecipesServiceOp) Get(ctx context.Context, id int) (*Recipe, *Response, error)

Get individual Recipe.

func (*RecipesServiceOp) List added in v0.1.58

func (s *RecipesServiceOp) List(ctx context.Context, opt *ListOptions) ([]Recipe, *Response, error)

List all Recipes.

type Relation added in v0.1.58

type Relation struct {
	ID            int    `json:"id,omitempty"`
	RecipeID      int    `json:"recipe_id,omitempty"`
	RecipeGroupID int    `json:"recipe_group_id,omitempty"`
	CreatedAt     string `json:"created_at,omitempty"`
	UpdatedAt     string `json:"updated_at,omitempty"`
	Recipe        Recipe `json:"recipe,omitempty"`
}

type RemoteTemplate

type RemoteTemplate struct {
	AllowResizeWithoutReboot  bool   `json:"allow_resize_without_reboot,bool"`
	AllowedHotMigrate         bool   `json:"allowed_hot_migrate,bool"`
	AllowedSwap               bool   `json:"allowed_swap,bool"`
	ApplicationServer         bool   `json:"application_server,bool"`
	BaremetalServer           bool   `json:"baremetal_server,bool"`
	Cdn                       bool   `json:"cdn,bool"`
	Checksum                  string `json:"checksum,omitempty"`
	DiskTargetDevice          string `json:"disk_target_device,omitempty"`
	Ext4                      bool   `json:"ext4,bool"`
	FileName                  string `json:"file_name,omitempty"`
	Label                     string `json:"label,omitempty"`
	ManagerID                 string `json:"manager_id,omitempty"`
	MinDiskSize               int    `json:"min_disk_size,omitempty"`
	MinMemorySize             int    `json:"min_memory_size,omitempty"`
	OperatingSystem           string `json:"operating_system,omitempty"`
	OperatingSystemArch       string `json:"operating_system_arch,omitempty"`
	OperatingSystemDistro     string `json:"operating_system_distro,omitempty"`
	OperatingSystemEdition    string `json:"operating_system_edition,omitempty"`
	OperatingSystemTail       string `json:"operating_system_tail,omitempty"`
	ResizeWithoutRebootPolicy string `json:"resize_without_reboot_policy,omitempty"`
	SmartServer               bool   `json:"smart_server,bool"`
	TemplateSize              int    `json:"template_size,omitempty"`
	Version                   string `json:"version,omitempty"`
	Virtualization            string `json:"virtualization,omitempty"`
}

RemoteTemplate - represent a template of OnApp API from repository

type RemoteTemplatesService

type RemoteTemplatesService interface {
	List(context.Context, *ListOptions) ([]RemoteTemplate, *Response, error)
}

RemoteTemplatesService is an interface for interfacing with the RemoteTemplate endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/templates/get-list-of-available-for-installation-templates

Describe templates *available* for install on the OnApp repository

type RemoteTemplatesServiceOp

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

RemoteTemplatesServiceOp handles communication with the RemoteTemplate related methods of the OnApp API.

func (*RemoteTemplatesServiceOp) List

List all RemoteTemplates.

type RequestCompletionCallback

type RequestCompletionCallback func(*http.Request, *http.Response)

RequestCompletionCallback defines the type of the request callback function

type Resolver

type Resolver struct {
	Address   string `json:"address,omitempty"`
	CreatedAt string `json:"created_at,omitempty"`
	ID        int    `json:"id,omitempty"`
	NetworkID int    `json:"network_id,omitempty"`
	UpdatedAt string `json:"updated_at,omitempty"`
}

Resolver - https://docs.onapp.com/apim/latest/resolvers

type ResolverCreateRequest

type ResolverCreateRequest struct {
	Address   string `json:"address,omitempty"`
	NetworkID int    `json:"network_id,omitempty"`
}

ResolverCreateRequest represents a request to create a Resolver

func (ResolverCreateRequest) String

func (d ResolverCreateRequest) String() string

type ResolversService

type ResolversService interface {
	List(context.Context, *ListOptions) ([]Resolver, *Response, error)
	Get(context.Context, int) (*Resolver, *Response, error)
	Create(context.Context, *ResolverCreateRequest) (*Resolver, *Response, error)
	Delete(context.Context, int, interface{}) (*Response, error)
	Edit(context.Context, int, *ResolverCreateRequest) (*Response, error)
}

ResolversService is an interface for interfacing with the Resolver endpoints of the OnApp API https://docs.onapp.com/apim/latest/firewall-rules-for-vss

type ResolversServiceOp

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

ResolversServiceOp handles communication with the Resolvers related methods of the OnApp API.

func (*ResolversServiceOp) Create

func (s *ResolversServiceOp) Create(ctx context.Context, createRequest *ResolverCreateRequest) (*Resolver, *Response, error)

Create Resolver

func (*ResolversServiceOp) Delete

func (s *ResolversServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete Resolver

func (*ResolversServiceOp) Edit

func (s *ResolversServiceOp) Edit(ctx context.Context, id int, editRequest *ResolverCreateRequest) (*Response, error)

Edit Resolver

func (*ResolversServiceOp) Get

Get individual Resolver

func (*ResolversServiceOp) List

List all Resolvers

type Response

type Response struct {
	*http.Response

	// Links that were returned with the response. These are parsed from
	// request body and not the header.
	Links *Links
}

Response is a OnApp response. This wraps the standard http.Response returned from OnApp.

type Role

type Role struct {
	ID          int           `json:"id,omitempty"`
	Label       string        `json:"label,omitempty"`
	Identifier  string        `json:"identifier,omitempty"`
	CreatedAt   string        `json:"created_at,omitempty"`
	UpdatedAt   string        `json:"updated_at,omitempty"`
	UsersCount  int           `json:"users_count,omitempty"`
	System      bool          `json:"system,bool"`
	Permissions []Permissions `json:"permissions,omitempty"`
}

Role -

type RoleCreateRequest

type RoleCreateRequest struct {
	Label         string `json:"label,omitempty"`
	PermissionIds []int  `json:"permission_ids,omitempty"`
}

RoleCreateRequest represents a request to create a Role

func (RoleCreateRequest) String

func (d RoleCreateRequest) String() string

type Roles

type Roles struct {
	Role *Role `json:"role,omitempty"`
}

Roles -

type RolesService

type RolesService interface {
	List(context.Context, *ListOptions) ([]Role, *Response, error)
	Get(context.Context, int) (*Role, *Response, error)
	Create(context.Context, *RoleCreateRequest) (*Role, *Response, error)
	Delete(context.Context, int, interface{}) (*Response, error)
	Edit(context.Context, int, *RoleCreateRequest) (*Response, error)
}

RolesService is an interface for interfacing with the Role endpoints of the OnApp API https://docs.onapp.com/apim/latest/roles

type RolesServiceOp

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

RolesServiceOp handles communication with the Roles related methods of the OnApp API.

func (*RolesServiceOp) Create

func (s *RolesServiceOp) Create(ctx context.Context, createRequest *RoleCreateRequest) (*Role, *Response, error)

Create Role.

func (*RolesServiceOp) Delete

func (s *RolesServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete Role.

func (*RolesServiceOp) Edit

func (s *RolesServiceOp) Edit(ctx context.Context, id int, editRequest *RoleCreateRequest) (*Response, error)

Edit Role

func (*RolesServiceOp) Get

func (s *RolesServiceOp) Get(ctx context.Context, id int) (*Role, *Response, error)

Get individual Role.

func (*RolesServiceOp) List

func (s *RolesServiceOp) List(ctx context.Context, opt *ListOptions) ([]Role, *Response, error)

List all Roles.

type SSHKey

type SSHKey struct {
	ID        int    `json:"id,omitempty"`
	UserID    int    `json:"user_id,omitempty"`
	Key       string `json:"key,omitempty"`
	CreatedAt string `json:"created_at,omitempty"`
	UpdatedAt string `json:"updated_at,omitempty"`
}

SSHKey - represent disk from Virtual Machine

type SSHKeyCreateRequest

type SSHKeyCreateRequest struct {
	UserID int    `json:"user_id,omitempty"`
	Key    string `json:"key,omitempty"`
}

SSHKeyCreateRequest - data for creating SSHKey

func (SSHKeyCreateRequest) String

func (d SSHKeyCreateRequest) String() string

type SSHKeyEditRequest

type SSHKeyEditRequest struct {
	UserID int    `json:"user_id,omitempty"`
	Key    string `json:"key,omitempty"`
}

SSHKeyEditRequest - data for editing SSHKey

type SSHKeysService

type SSHKeysService interface {
	List(context.Context, *ListOptions) ([]SSHKey, *Response, error)
	Get(context.Context, int) (*SSHKey, *Response, error)
	Create(context.Context, *SSHKeyCreateRequest) (*SSHKey, *Response, error)
	Delete(context.Context, int, interface{}) (*Response, error)
	Edit(context.Context, int, *SSHKeyEditRequest) (*Response, error)
}

SSHKeysService is an interface for interfacing with the SSHKey endpoints of the OnApp API https://docs.onapp.com/apim/latest/ssh-keys

type SSHKeysServiceOp

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

SSHKeysServiceOp handles communication with the SSHKey related methods of the OnApp API.

func (*SSHKeysServiceOp) Create

func (s *SSHKeysServiceOp) Create(ctx context.Context, createRequest *SSHKeyCreateRequest) (*SSHKey, *Response, error)

Create SSHKey.

func (*SSHKeysServiceOp) Delete

func (s *SSHKeysServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete SSHKey.

func (*SSHKeysServiceOp) Edit

func (s *SSHKeysServiceOp) Edit(ctx context.Context, id int, editRequest *SSHKeyEditRequest) (*Response, error)

Edit SSHKey.

func (*SSHKeysServiceOp) Get

func (s *SSHKeysServiceOp) Get(ctx context.Context, id int) (*SSHKey, *Response, error)

Get individual SSH key.

func (*SSHKeysServiceOp) List

func (s *SSHKeysServiceOp) List(ctx context.Context, opt *ListOptions) ([]SSHKey, *Response, error)

List all SSH Keys in the cloud.

type SoftwareLicense

type SoftwareLicense struct {
	ID        int      `json:"id,omitempty"`
	Arch      string   `json:"arch,omitempty"`
	Edition   []string `json:"edition,omitempty"`
	Tail      string   `json:"tail"` // should be without omitempty
	Distro    string   `json:"distro,omitempty"`
	License   string   `json:"license,omitempty"`
	Total     int      `json:"total,omitempty"`
	Count     int      `json:"count,omitempty"`
	CreatedAt string   `json:"created_at,omitempty"`
	UpdatedAt string   `json:"updated_at,omitempty"`
}

SoftwareLicense - represent disk from Virtual Machine

type SoftwareLicenseCreateRequest

type SoftwareLicenseCreateRequest struct {
	Arch    string   `json:"arch,omitempty"`
	Edition []string `json:"edition,omitempty"`
	Tail    string   `json:"tail"` // should be without omitempty
	Distro  string   `json:"distro,omitempty"`
	License string   `json:"license,omitempty"`
	Total   int      `json:"total,omitempty"`
	Count   int      `json:"count,omitempty"`
}

SoftwareLicenseCreateRequest - data for creating SoftwareLicense

func (SoftwareLicenseCreateRequest) String

type SoftwareLicenseEditRequest

type SoftwareLicenseEditRequest SoftwareLicenseCreateRequest

SoftwareLicenseEditRequest - data for editing SoftwareLicense

type SoftwareLicensesService

SoftwareLicensesService is an interface for interfacing with the SoftwareLicense endpoints of the OnApp API https://docs.onapp.com/apim/latest/software-licenses

type SoftwareLicensesServiceOp

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

SoftwareLicensesServiceOp handles communication with the SoftwareLicense related methods of the OnApp API.

func (*SoftwareLicensesServiceOp) Create

Create Software License

func (*SoftwareLicensesServiceOp) Delete

func (s *SoftwareLicensesServiceOp) Delete(ctx context.Context, id int) (*Response, error)

Delete Software License

func (*SoftwareLicensesServiceOp) Edit

Edit Software License

func (*SoftwareLicensesServiceOp) Get

Get individual Software License

func (*SoftwareLicensesServiceOp) List

List all Software License

type Storage

type Storage struct {
	Disks      []StorageDisk      `json:"disks,omitempty"`
	Nics       []StorageNic       `json:"nics,omitempty"`
	CustomPcis []StorageCustomPci `json:"custom_pcis,omitempty"`
}

type StorageCustomPci

type StorageCustomPci struct {
	Pci      string `json:"pci,omitempty"`
	Selected bool   `json:"selected,bool"`
}

type StorageDisk

type StorageDisk struct {
	Scsi     string `json:"scsi,omitempty"`
	Selected bool   `json:"selected,bool"`
}

type StorageNic

type StorageNic struct {
	Mac  string `json:"mac,omitempty"`
	Type int    `json:"type,omitempty"`
}

type StorageNodes

type StorageNodes []struct {
	Node Node
}

type TierOptions

type TierOptions struct {
	Backups            bool `json:"backups,bool"`
	DdosProtection     bool `json:"ddos_protection,bool"`
	DNS                bool `json:"dns,bool"`
	Ha                 bool `json:"ha,bool"`
	Ipv6               bool `json:"ipv6,bool"`
	Motion             bool `json:"motion,bool"`
	Replication        bool `json:"replication,bool"`
	SLA                bool `json:"sla,bool"`
	StoragePerformance bool `json:"storage_performance,bool"`
	Templates          bool `json:"templates,bool"`
	WindowsLicense     bool `json:"windows_license,bool"`
}

TierOptions -

type Transaction

type Transaction struct {
	Action                 string                 `json:"action,omitempty"`
	Actor                  string                 `json:"actor,omitempty"`
	AllowedCancel          bool                   `json:"allowed_cancel,bool"`
	AssociatedObjectID     int                    `json:"associated_object_id,omitempty"`
	AssociatedObjectType   string                 `json:"associated_object_type,omitempty"`
	ChainID                int                    `json:"chain_id,omitempty"`
	CreatedAt              string                 `json:"created_at,omitempty"`
	DependentTransactionID int                    `json:"dependent_transaction_id,omitempty"`
	ID                     int                    `json:"id,omitempty"`
	Identifier             string                 `json:"identifier,omitempty"`
	LockVersion            int                    `json:"lock_version,omitempty"`
	ParentID               int                    `json:"parent_id,omitempty"`
	ParentType             string                 `json:"parent_type,omitempty"`
	Pid                    int                    `json:"pid,omitempty"`
	Priority               int                    `json:"priority,omitempty"`
	Scheduled              bool                   `json:"scheduled,bool"`
	StartAfter             string                 `json:"start_after,omitempty"`
	StartedAt              string                 `json:"started_at,omitempty"`
	Status                 string                 `json:"status,omitempty"`
	UpdatedAt              string                 `json:"updated_at,omitempty"`
	UserID                 int                    `json:"user_id,omitempty"`
	Params                 map[string]interface{} `json:"params,omitempty"`
}

Transaction represents a OnApp Transaction

func (Transaction) Cancelled

func (trx Transaction) Cancelled() bool

Cancelled check if transaction state is 'cancelled'

func (Transaction) Complete

func (trx Transaction) Complete() bool

Complete check if transaction state is 'complete'

func (*Transaction) EqualFilter

func (trx *Transaction) EqualFilter(filter interface{}) bool

EqualFilter -

func (Transaction) Failed

func (trx Transaction) Failed() bool

Failed check if transaction state is 'failed'

func (Transaction) Finished

func (trx Transaction) Finished() bool

Finished check if transaction state is 'complete' or 'failed' or 'cancelled'

func (Transaction) Incomplete

func (trx Transaction) Incomplete() bool

Incomplete check if transaction state is 'running' or 'pending'

func (Transaction) Pending

func (trx Transaction) Pending() bool

Pending check if transaction state is 'pending'

func (Transaction) Running

func (trx Transaction) Running() bool

Running check if transaction state is 'runing'

func (Transaction) String

func (trx Transaction) String() string

func (Transaction) Unlucky

func (trx Transaction) Unlucky() bool

Unlucky check if transaction state is 'failed' or 'cancelled'

type TransactionsService

type TransactionsService interface {
	List(context.Context, *ListOptions) ([]Transaction, *Response, error)
	Get(context.Context, int) (*Transaction, *Response, error)

	GetByFilter(context.Context, interface{}, *ListOptions) (*Transaction, *Response, error)
	ListByGroup(context.Context, interface{}, bool, *ListOptions) ([]Transaction, *Response, error)
}

TransactionsService handles communction with action related methods of the OnApp API: https://docs.onapp.com/apim/latest/transactions

type TransactionsServiceOp

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

TransactionsServiceOp handles communition with the image action related methods of the OnApp API.

func (*TransactionsServiceOp) Get

Get an transaction by ID.

func (*TransactionsServiceOp) GetByFilter

func (s *TransactionsServiceOp) GetByFilter(ctx context.Context, filter interface{}, opts *ListOptions) (*Transaction, *Response, error)

GetByFilter find transaction with specified fields.

func (*TransactionsServiceOp) List

List all transactions

func (*TransactionsServiceOp) ListByGroup

func (s *TransactionsServiceOp) ListByGroup(ctx context.Context, meta interface{}, revers bool, opt *ListOptions) ([]Transaction, *Response, error)

ListByGroup return group of transactions depended by action

type UnAssignIPAddressRequest

type UnAssignIPAddressRequest struct {
	RebuildNetwork int `url:"rebuild_network"`
}

UnAssignIPAddressRequest -

type User

type User struct {
	ActivatedAt string `json:"activated_at,omitempty"`
	// APIKey                  string             `json:"api_key,omitempty"` // temporary disabled! - filled only by MakeNewAPIKey function but not needed to wrap into JSON
	AdditionalFields        []AdditionalFields `json:"additional_fields,omitempty"`
	Avatar                  interface{}        `json:"avatar,omitempty"`
	BillingPlanID           int                `json:"billing_plan_id,omitempty"`
	BucketID                int                `json:"bucket_id,omitempty"`
	CdnAccountStatus        string             `json:"cdn_account_status,omitempty"`
	CdnStatus               string             `json:"cdn_status,omitempty"`
	CreatedAt               string             `json:"created_at,omitempty"`
	DeletedAt               string             `json:"deleted_at,omitempty"`
	DiscountDueToFree       float64            `json:"discount_due_to_free,omitempty"`
	DiskSpaceAvailable      float64            `json:"disk_space_available,omitempty"`
	Email                   string             `json:"email,omitempty"`
	FirewallID              int                `json:"firewall_id,omitempty"`
	FirstName               string             `json:"first_name,omitempty"`
	GroupID                 int                `json:"group_id,omitempty"`
	ID                      int                `json:"id,omitempty"`
	Identifier              string             `json:"identifier,omitempty"`
	ImageTemplateGroupID    int                `json:"image_template_group_id,omitempty"`
	Infoboxes               Infoboxes          `json:"infoboxes,omitempty"`
	LastName                string             `json:"last_name,omitempty"`
	Locale                  string             `json:"locale,omitempty"`
	Login                   string             `json:"login,omitempty"`
	MemoryAvailable         float64            `json:"memory_available,omitempty"`
	MonthlyPrice            float64            `json:"monthly_price,omitempty"`
	OutstandingAmount       float64            `json:"outstanding_amount,omitempty"`
	PasswordChangedAt       string             `json:"password_changed_at,omitempty"`
	PaymentAmount           float64            `json:"payment_amount,omitempty"`
	RegisteredYubikey       bool               `json:"registered_yubikey,bool"`
	Roles                   []Roles            `json:"roles,omitempty"`
	Status                  string             `json:"status,omitempty"`
	Supplied                bool               `json:"supplied,bool"`
	SuspendAt               string             `json:"suspend_at,omitempty"`
	SystemTheme             string             `json:"system_theme,omitempty"`
	TimeZone                string             `json:"time_zone,omitempty"`
	TotalAmount             float64            `json:"total_amount,omitempty"`
	TotalAmountWithDiscount float64            `json:"total_amount_with_discount,omitempty"`
	UpdatedAt               string             `json:"updated_at,omitempty"`
	UsedCpus                int                `json:"used_cpus,omitempty"`
	UsedCPUShares           int                `json:"used_cpu_shares,omitempty"`
	UsedDiskSize            int                `json:"used_disk_size,omitempty"`
	UsedIPAddresses         []IPAddresses      `json:"used_ip_addresses,omitempty"`
	UsedMemory              int                `json:"used_memory,omitempty"`
	UseGravatar             bool               `json:"use_gravatar,bool"`
	UserGroupID             int                `json:"user_group_id,omitempty"`
}

User -

type UserBucket

type UserBucket struct {
	AllowsKms    bool   `json:"allows_kms,bool"`
	AllowsMak    bool   `json:"allows_mak,bool"`
	AllowsOwn    bool   `json:"allows_own,bool"`
	CreatedAt    string `json:"created_at,omitempty"`
	CurrencyCode string `json:"currency_code,omitempty"`
	ID           int    `json:"id,omitempty"`
	Label        string `json:"label,omitempty"`
	ShowPrice    bool   `json:"show_price,bool"`
	UpdatedAt    string `json:"updated_at,omitempty"`
}

UserBucket -

type UserBuckets

type UserBuckets struct {
	UserBucket UserBucket `json:"user_bucket"`
}

UserBuckets -

type UserCreateRequest

type UserCreateRequest struct {
	Login            string              `json:"login,omitempty"`
	Email            string              `json:"email,omitempty"`
	FirstName        string              `json:"first_name,omitempty"`
	LastName         string              `json:"last_name,omitempty"`
	Password         string              `json:"password,omitempty"`
	UserGroupID      int                 `json:"user_group_id,omitempty"`
	BucketID         int                 `json:"bucket_id,omitempty"`
	RoleIDs          []string            `json:"role_ids,omitempty"`
	AdditionalFields []*AdditionalFields `json:"additional_fields,omitempty"`
}

UserCreateRequest -

func (UserCreateRequest) String

func (d UserCreateRequest) String() string

type UserDeleteRequest

type UserDeleteRequest struct {
	// Force int `url:"force"`
	Force int `json:"force,omitempty"` // json body request
}

UserDeleteRequest -

type UserEditRequest

type UserEditRequest struct {
	Email             string              `json:"email,omitempty"`
	FirstName         string              `json:"first_name,omitempty"`
	LastName          string              `json:"last_name,omitempty"`
	Password          string              `json:"password,omitempty"`
	UserGroupID       int                 `json:"user_group_id,omitempty"`
	BucketID          int                 `json:"bucket_id,omitempty"`
	RoleIDs           []string            `json:"role_ids,omitempty"`
	AdditionalFields  []*AdditionalFields `json:"additional_fields,omitempty"`
	SuspendAt         string              `json:"suspend_at,omitempty"`
	RegisteredYubikey bool                `json:"registered_yubikey,bool"`
}

UserEditRequest -

type UserGroup

type UserGroup struct {
	// Must be as map[string]interface{}
	AdditionalFields map[string]interface{} `json:"additional_fields,omitempty"`

	BucketID          int           `json:"bucket_id,omitempty"`
	CreatedAt         string        `json:"created_at,omitempty"`
	DatacenterID      int           `json:"datacenter_id,omitempty"`
	DraasID           int           `json:"draas_id,omitempty"`
	HypervisorID      int           `json:"hypervisor_id,omitempty"`
	ID                int           `json:"id,omitempty"`
	Identifier        string        `json:"identifier,omitempty"`
	Label             string        `json:"label,omitempty"`
	PreconfiguredOnly bool          `json:"preconfigured_only,bool"`
	ProviderVdcID     int           `json:"provider_vdc_id,omitempty"`
	Roles             []Roles       `json:"roles,omitempty"`
	UpdatedAt         string        `json:"updated_at,omitempty"`
	UserBuckets       []UserBuckets `json:"user_buckets,omitempty"`
}

UserGroup -

type UserGroupCreateRequest

type UserGroupCreateRequest struct {
	Label          string `json:"label,omitempty"`
	BillingPlanIDs []int  `json:"billing_plan_ids,omitempty"`
}

UserGroupCreateRequest -

func (UserGroupCreateRequest) String

func (d UserGroupCreateRequest) String() string

type UserGroupEditRequest

type UserGroupEditRequest struct {
	Label          string   `json:"label,omitempty"`
	RoleIDs        []string `json:"role_ids,omitempty"`
	BillingPlanIDs []int    `json:"billing_plan_ids,omitempty"`
}

UserGroupEditRequest -

type UserGroupsService

UserGroupsService is an interface for interfacing with the UserGroup endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/user-groups

type UserGroupsServiceOp

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

UserGroupsServiceOp handles communication with the UserGroup related methods of the OnApp API.

func (*UserGroupsServiceOp) Create

func (s *UserGroupsServiceOp) Create(ctx context.Context, createRequest *UserGroupCreateRequest) (*UserGroup, *Response, error)

Create UserGroup.

func (*UserGroupsServiceOp) Delete

func (s *UserGroupsServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete UserGroup.

func (*UserGroupsServiceOp) Edit

func (s *UserGroupsServiceOp) Edit(ctx context.Context, id int, editRequest *UserGroupEditRequest) (*Response, error)

Edit UserGroup.

func (*UserGroupsServiceOp) Get

Get individual UserGroup.

func (*UserGroupsServiceOp) List

List all Users.

type UserVirtualServerPricing

type UserVirtualServerPricing struct {
	AutoScaling            string `json:"auto_scaling,omitempty"`
	AutoScalingMax         string `json:"auto_scaling_max,omitempty"`
	Backup                 string `json:"backup,omitempty"`
	BackupMax              string `json:"backup_max,omitempty"`
	Template               string `json:"template,omitempty"`
	TemplateBackupStore    string `json:"template_backup_store,omitempty"`
	TemplateBackupStoreMax string `json:"template_backup_store_max,omitempty"`
	TemplateMax            string `json:"template_max,omitempty"`
}

UserVirtualServerPricing -

type UserWhiteList

type UserWhiteList struct {
	CreatedAt   string `json:"created_at,omitempty"`
	Description string `json:"description"` // can be empty
	ID          int    `json:"id,omitempty"`
	IP          string `json:"ip,omitempty"`
	UpdatedAt   string `json:"updated_at,omitempty"`
	UserID      int    `json:"user_id,omitempty"`
}

UserWhiteList represents a UserWhiteList

type UserWhiteListCreateRequest

type UserWhiteListCreateRequest struct {
	Description string `json:"description"` // can be empty
	IP          string `json:"ip,omitempty"`
}

UserWhiteListCreateRequest represents a request to create a UserWhiteList

func (UserWhiteListCreateRequest) String

type UserWhiteListEditRequest

type UserWhiteListEditRequest UserWhiteListCreateRequest

UserWhiteListEditRequest represents a request to edit a UserWhiteList

type UserWhiteListsService

UserWhiteListsService is an interface for interfacing with the UserWhiteList endpoints of the OnApp API https://docs.onapp.com/apim/latest/whitelist-ips

type UserWhiteListsServiceOp

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

UserWhiteListsServiceOp handles communication with the UserWhiteLists related methods of the OnApp API.

func (*UserWhiteListsServiceOp) Create

Create UserWhiteList.

func (*UserWhiteListsServiceOp) Delete

func (s *UserWhiteListsServiceOp) Delete(ctx context.Context, userID int, id int, meta interface{}) (*Response, error)

Delete UserWhiteList.

func (*UserWhiteListsServiceOp) Edit

func (s *UserWhiteListsServiceOp) Edit(ctx context.Context, userID int, id int, editRequest *UserWhiteListEditRequest) (*Response, error)

Edit UserWhiteList.

func (*UserWhiteListsServiceOp) Get

func (s *UserWhiteListsServiceOp) Get(ctx context.Context, userID int, id int) (*UserWhiteList, *Response, error)

Get individual UserWhiteList.

func (*UserWhiteListsServiceOp) List

List all UserWhiteLists.

type UsersService

type UsersService interface {
	List(context.Context, *ListOptions) ([]User, *Response, error)
	Get(context.Context, int) (*User, *Response, error)
	Create(context.Context, *UserCreateRequest) (*User, *Response, error)
	Delete(context.Context, int, interface{}) (*Response, error)
	Edit(context.Context, int, *UserEditRequest) (*Response, error)

	// TODO !!!
	// Move next functions to the UserActionsService
	MakeNewAPIKey(context.Context, int) (string, *Response, error)
}

UsersService is an interface for interfacing with the User endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/users

type UsersServiceOp

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

UsersServiceOp handles communication with the User related methods of the OnApp API.

func (*UsersServiceOp) Create

func (s *UsersServiceOp) Create(ctx context.Context, createRequest *UserCreateRequest) (*User, *Response, error)

Create User.

func (*UsersServiceOp) Delete

func (s *UsersServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Response, error)

Delete User.

func (*UsersServiceOp) Edit

func (s *UsersServiceOp) Edit(ctx context.Context, id int, editRequest *UserEditRequest) (*Response, error)

Edit User

func (*UsersServiceOp) Get

func (s *UsersServiceOp) Get(ctx context.Context, id int) (*User, *Response, error)

Get individual User.

func (*UsersServiceOp) List

func (s *UsersServiceOp) List(ctx context.Context, opt *ListOptions) ([]User, *Response, error)

List all Users.

func (*UsersServiceOp) MakeNewAPIKey

func (s *UsersServiceOp) MakeNewAPIKey(ctx context.Context, id int) (string, *Response, error)

MakeNewAPIKey - Make new API key for the User.

type VirtualMachine

type VirtualMachine struct {
	Acceleration                 bool          `json:"acceleration,bool"`
	AccelerationAllowed          bool          `json:"acceleration_allowed,bool"`
	AddToMarketplace             string        `json:"add_to_marketplace,omitempty"`
	AdminNote                    string        `json:"admin_note,omitempty"`
	AllowedHotMigrate            bool          `json:"allowed_hot_migrate,bool"`
	AllowedSwap                  bool          `json:"allowed_swap,bool"`
	AutoscaleService             string        `json:"autoscale_service,omitempty"`
	Booted                       bool          `json:"booted,bool"`
	Built                        bool          `json:"built,bool"`
	BuiltFromIso                 bool          `json:"built_from_iso,bool"`
	BuiltFromOva                 bool          `json:"built_from_ova,bool"`
	CDboot                       bool          `json:"cdboot,bool"`
	CoresPerSocket               int           `json:"cores_per_socket,omitempty"`
	CPUPriority                  int           `json:"cpu_priority,omitempty"`
	CPUShares                    int           `json:"cpu_shares,omitempty"`
	CPUSockets                   string        `json:"cpu_sockets,omitempty"`
	CPUUnits                     int           `json:"cpu_units,omitempty"`
	Cpus                         int           `json:"cpus,omitempty"`
	CreatedAt                    string        `json:"created_at,omitempty"`
	DeletedAt                    string        `json:"deleted_at,omitempty"`
	Domain                       string        `json:"domain,omitempty"`
	DraasKeys                    []string      `json:"draas_keys,omitempty"`
	DraasMode                    int           `json:"draas_mode,omitempty"`
	EdgeServerType               string        `json:"edge_server_type,omitempty"`
	EnableAutoscale              bool          `json:"enable_autoscale,bool"`
	FirewallNotrack              bool          `json:"firewall_notrack,bool"`
	Hostname                     string        `json:"hostname,omitempty"`
	HotAddCPU                    string        `json:"hot_add_cpu,omitempty"`
	HotAddMemory                 string        `json:"hot_add_memory,omitempty"`
	HypervisorID                 int           `json:"hypervisor_id,omitempty"`
	HypervisorType               string        `json:"hypervisor_type,omitempty"`
	ID                           int           `json:"id,omitempty"`
	Identifier                   string        `json:"identifier,omitempty"`
	InitialRootPassword          string        `json:"initial_root_password,omitempty"`
	InitialRootPasswordEncrypted bool          `json:"initial_root_password_encrypted,bool"`
	InstancePackageID            int           `json:"instance_package_id,omitempty"`
	IPAddresses                  []IPAddresses `json:"ip_addresses,omitempty"`
	IsoID                        int           `json:"iso_id,omitempty"`
	Label                        string        `json:"label,omitempty"`
	LocalRemoteAccessIPAddress   string        `json:"local_remote_access_ip_address,omitempty"`
	LocalRemoteAccessPort        int           `json:"local_remote_access_port,omitempty"`
	Locked                       bool          `json:"locked,bool"`
	Memory                       int           `json:"memory,omitempty"`
	MinDiskSize                  int           `json:"min_disk_size,omitempty"`
	MonthlyBandwidthUsed         float32       `json:"monthly_bandwidth_used,omitempty"`
	Note                         string        `json:"note,omitempty"`
	OpenstackID                  int           `json:"openstack_id,omitempty"`
	OperatingSystem              string        `json:"operating_system,omitempty"`
	OperatingSystemDistro        string        `json:"operating_system_distro,omitempty"`
	PricePerHour                 float32       `json:"price_per_hour,omitempty"`
	PricePerHourPoweredOff       float32       `json:"price_per_hour_powered_off,omitempty"`
	RecoveryMode                 bool          `json:"recovery_mode,bool"`
	RemoteAccessPassword         string        `json:"remote_access_password,omitempty"`
	ServicePassword              string        `json:"service_password,omitempty"`
	State                        string        `json:"state,omitempty"`
	StorageServerType            string        `json:"storage_server_type,omitempty"`
	StrictVirtualMachineID       int           `json:"strict_virtual_machine_id,omitempty"`
	SupportIncrementalBackups    bool          `json:"support_incremental_backups,bool"`
	Suspended                    bool          `json:"suspended,bool"`
	TemplateID                   int           `json:"template_id,omitempty"`
	TemplateLabel                string        `json:"template_label,omitempty"`
	TemplateVersion              string        `json:"template_version,omitempty"`
	TimeZone                     string        `json:"time_zone,omitempty"`
	TotalDiskSize                int           `json:"total_disk_size,omitempty"`
	UpdatedAt                    string        `json:"updated_at,omitempty"`
	UserID                       int           `json:"user_id,omitempty"`
	VappID                       int           `json:"vapp_id,omitempty"`
	VcenterClusterID             int           `json:"vcenter_cluster_id,omitempty"`
	VcenterMoref                 string        `json:"vcenter_moref,omitempty"`
	VcenterReservedMemory        int           `json:"vcenter_reserved_memory,omitempty"`
	Vip                          string        `json:"vip,omitempty"`
	VmwareTools                  string        `json:"vmware_tools,omitempty"`
	XenID                        int           `json:"xen_id,omitempty"`
	VirshConsole                 bool          `json:"virsh_console,bool"`
	TrimDisabled                 bool          `json:"trim_disabled,bool"`
}

VirtualMachine represent VirtualServer from OnApp API

type VirtualMachineActionsService

type VirtualMachineActionsService interface {
	Shutdown(context.Context, int) (*Transaction, *Response, error)
	Stop(context.Context, int) (*Transaction, *Response, error)
	Startup(context.Context, int) (*Transaction, *Response, error)
	Unlock(context.Context, int) (*Transaction, *Response, error)
	Reboot(context.Context, int) (*Transaction, *Response, error)
	Suspend(context.Context, int) (*Transaction, *Response, error)
	Unsuspend(context.Context, int) (*Transaction, *Response, error)

	ResetPassword(context.Context, int, string, string) (*Transaction, *Response, error)
	FQDN(context.Context, int, string, string) (*Transaction, *Response, error)

	RebuildNetwork(context.Context, int, interface{}) (*Transaction, *Response, error)

	AssignIPAddress(context.Context, int, interface{}) (*Transaction, *Response, error)
	UnAssignIPAddress(context.Context, int, int, interface{}) (*Transaction, *Response, error)
	ListIPAddresses(context.Context, int) (*Transaction, *Response, error)
}

VirtualMachineActionsService is an interface for interfacing with the VirtualMachine actions endpoints of the OnApp API

type VirtualMachineActionsServiceOp

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

VirtualMachineActionsServiceOp handles communication with the VirtualMachine action related methods of the OnApp API.

func (*VirtualMachineActionsServiceOp) AssignIPAddress

func (s *VirtualMachineActionsServiceOp) AssignIPAddress(ctx context.Context, id int, params interface{}) (*Transaction, *Response, error)

AssignIPAddress - Assign IPAddress to the VirtualMachine

func (*VirtualMachineActionsServiceOp) FQDN

func (s *VirtualMachineActionsServiceOp) FQDN(ctx context.Context, id int, hostname string, domain string) (*Transaction, *Response, error)

FQDN a VirtualMachine

func (*VirtualMachineActionsServiceOp) ListIPAddresses

func (s *VirtualMachineActionsServiceOp) ListIPAddresses(ctx context.Context, id int) (*Transaction, *Response, error)

ListIPAddresses - List IPAddresses from the VirtualMachine

func (*VirtualMachineActionsServiceOp) Reboot

Reboot a VirtualMachine

func (*VirtualMachineActionsServiceOp) RebuildNetwork

func (s *VirtualMachineActionsServiceOp) RebuildNetwork(ctx context.Context, id int, opts interface{}) (*Transaction, *Response, error)

RebuildNetwork a VirtualMachine

func (*VirtualMachineActionsServiceOp) ResetPassword

func (s *VirtualMachineActionsServiceOp) ResetPassword(ctx context.Context, id int, password string, key string) (*Transaction, *Response, error)

ResetPassword a VirtualMachine

func (*VirtualMachineActionsServiceOp) Shutdown

Shutdown a VirtualMachine gracefully

func (*VirtualMachineActionsServiceOp) Startup

Startup a VirtualMachine

func (*VirtualMachineActionsServiceOp) Stop

Stop a VirtualMachine forcefully

func (*VirtualMachineActionsServiceOp) Suspend

Suspend a VirtualMachine

func (*VirtualMachineActionsServiceOp) UnAssignIPAddress

func (s *VirtualMachineActionsServiceOp) UnAssignIPAddress(ctx context.Context, id int, ipID int, opts interface{}) (*Transaction, *Response, error)

UnAssignIPAddress - UnAssign IPAddress from the VirtualMachine

func (*VirtualMachineActionsServiceOp) Unlock

Unlock a VirtualMachine

func (*VirtualMachineActionsServiceOp) Unsuspend

Unsuspend a VirtualMachine

type VirtualMachineCreateRequest

type VirtualMachineCreateRequest struct {
	CustomRecipeVariablesAttributes  []CustomRecipeVariableAttributes `json:"custom_recipe_variables_attributes,omitempty"`
	AccelerationAllowed              bool                             `json:"acceleration_allowed,bool"`
	AdminNote                        string                           `json:"admin_note,omitempty"`
	CPUShares                        int                              `json:"cpu_shares,omitempty"`
	CPUSockets                       string                           `json:"cpu_sockets,omitempty"`
	Cpus                             int                              `json:"cpus,omitempty"`
	Domain                           string                           `json:"domain,omitempty"`
	DataStoreGroupPrimaryID          int                              `json:"data_store_group_primary_id,omitempty"`
	DataStoreGroupSwapID             int                              `json:"data_store_group_swap_id,omitempty"`
	EnableAutoscale                  int                              `json:"enable_autoscale,omitempty"`
	Hostname                         string                           `json:"hostname,omitempty"`
	HypervisorGroupID                int                              `json:"hypervisor_group_id,omitempty"`
	HypervisorID                     int                              `json:"hypervisor_id,omitempty"`
	InitialRootPassword              string                           `json:"initial_root_password,omitempty"`
	InitialRootPasswordEncryptionKey string                           `json:"initial_root_password_encryption_key,omitempty"`
	InstancePackageID                int                              `json:"instance_package_id,omitempty"`
	Label                            string                           `json:"label,omitempty"`
	LicensingKey                     string                           `json:"licensing_key,omitempty"`
	LicensingServerID                int                              `json:"licensing_server_id,omitempty"`
	LicensingType                    string                           `json:"licensing_type,omitempty"`
	LocationGroupID                  int                              `json:"location_group_id,omitempty"`
	Memory                           int                              `json:"memory,omitempty"`
	NetworkID                        int                              `json:"network_id,omitempty"`
	PrimaryDiskMinIops               int                              `json:"primary_disk_min_iops,omitempty"`
	PrimaryDiskSize                  int                              `json:"primary_disk_size,omitempty"`
	PrimaryNetworkGroupID            int                              `json:"primary_network_group_id,omitempty"`
	RateLimit                        int                              `json:"rate_limit,omitempty"`
	RecipeJoinsAttributes            []string                         `json:"recipe_joins_attributes,omitempty"`
	RequiredAutomaticBackup          int                              `json:"required_automatic_backup,omitempty"`
	RequiredVirtualMachineBuild      bool                             `json:"required_virtual_machine_build,bool"`
	RequiredVirtualMachineStartup    bool                             `json:"required_virtual_machine_startup,bool"`
	SelectedIPAddress                string                           `json:"selected_ip_address,omitempty"`
	ServiceAddonIds                  []int                            `json:"service_addon_ids,omitempty"`
	SwapDiskMinIops                  int                              `json:"swap_disk_min_iops,omitempty"`
	SwapDiskSize                     int                              `json:"swap_disk_size,omitempty"`
	TemplateID                       int                              `json:"template_id,omitempty"`
	TimeZone                         string                           `json:"time_zone,omitempty"`
	TypeOfFormat                     string                           `json:"type_of_format,omitempty"`
	VirshConsole                     bool                             `json:"virsh_console,bool"`
}

VirtualMachineCreateRequest represents a request to create a VirtualMachine

func (VirtualMachineCreateRequest) String

type VirtualMachineRestartRequest

type VirtualMachineRestartRequest struct {
	Force int `url:"force"`

	// "hard", "graceful" or "soft"
	ShutdownType    string `url:"shutdown_type"`
	RequiredStartup int    `url:"required_startup"`
}

VirtualMachineRestartRequest -

type VirtualMachinesService

type VirtualMachinesService interface {
	List(context.Context, *ListOptions) ([]VirtualMachine, *Response, error)
	Get(context.Context, int) (*VirtualMachine, *Response, error)
	Create(context.Context, *VirtualMachineCreateRequest) (*VirtualMachine, *Response, error)
	Delete(context.Context, int, interface{}) (*Transaction, *Response, error)

	// TODO !!!
	// Move next functions to the VirtualMachineActionsService
	Backups(context.Context, int, *ListOptions) ([]Backup, *Response, error)
	Transactions(context.Context, int, *ListOptions) ([]Transaction, *Response, error)
	Disks(context.Context, int, *ListOptions) ([]Disk, *Response, error)
	ListNetworkInterfaces(context.Context, int, *ListOptions) ([]NetworkInterface, *Response, error)
	ListFirewallRules(context.Context, int, *ListOptions) ([]FirewallRule, *Response, error)
}

VirtualMachinesService is an interface for interfacing with the VirtualMachine endpoints of the OnApp API See: https://docs.onapp.com/apim/latest/virtual-servers

type VirtualMachinesServiceOp

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

VirtualMachinesServiceOp handles communication with the VirtualMachine related methods of the OnApp API.

func (*VirtualMachinesServiceOp) Backups

func (s *VirtualMachinesServiceOp) Backups(ctx context.Context, id int, opt *ListOptions) ([]Backup, *Response, error)

Backups lists the backups for a VirtualMachine

func (*VirtualMachinesServiceOp) Create

Create VirtualMachine.

func (*VirtualMachinesServiceOp) Delete

func (s *VirtualMachinesServiceOp) Delete(ctx context.Context, id int, meta interface{}) (*Transaction, *Response, error)

Delete VirtualMachine.

func (*VirtualMachinesServiceOp) Disks

func (s *VirtualMachinesServiceOp) Disks(ctx context.Context, id int, opt *ListOptions) ([]Disk, *Response, error)

Disks lists the disk for a VirtualMachine.

func (*VirtualMachinesServiceOp) Get

Get individual VirtualMachine.

func (*VirtualMachinesServiceOp) List

List all VirtualMachines.

func (*VirtualMachinesServiceOp) ListFirewallRules

func (s *VirtualMachinesServiceOp) ListFirewallRules(ctx context.Context, id int, opt *ListOptions) ([]FirewallRule, *Response, error)

ListFirewallRules a VirtualMachine

func (*VirtualMachinesServiceOp) ListNetworkInterfaces

func (s *VirtualMachinesServiceOp) ListNetworkInterfaces(ctx context.Context, id int, opt *ListOptions) ([]NetworkInterface, *Response, error)

ListNetworkInterfaces a VirtualMachine

func (*VirtualMachinesServiceOp) Transactions

func (s *VirtualMachinesServiceOp) Transactions(ctx context.Context, id int, opt *ListOptions) ([]Transaction, *Response, error)

Transactions lists the transactions for a VirtualMachine.

Directories

Path Synopsis
Package version provides a location to set the release versions for all packages to consume, without creating import cycles.
Package version provides a location to set the release versions for all packages to consume, without creating import cycles.

Jump to

Keyboard shortcuts

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