Documentation ¶
Index ¶
- func Provider() *schema.Provider
- func ReconcileMaps(oldMap map[string]interface{}, newMap map[string]interface{}, ...) bool
- func ReconcileSlices(oldSlice []string, newSlice []string, addItem AddSliceItemFunc, ...) bool
- type AddItemFunc
- type AddSliceItemFunc
- type Disk
- type Image
- type ItemEqualFunc
- type Machine
- type NetworkInterface
- type RemoveItemFunc
- type RemoveSliceItemFunc
- type SmartOSClient
- func (c *SmartOSClient) Close(nodeName string)
- func (c *SmartOSClient) Connect(nodeName string) error
- func (c *SmartOSClient) CreateMachine(nodeName string, machine *Machine) (*uuid.UUID, error)
- func (c *SmartOSClient) DeleteMachine(nodeName string, id uuid.UUID) error
- func (c *SmartOSClient) FindRemoteImage(nodeName string, name string, version string) (*Image, error)
- func (c *SmartOSClient) GetImage(nodeName string, name string, version string) (*Image, error)
- func (c *SmartOSClient) GetLocalImage(nodeName string, name string, version string) (*Image, error)
- func (c *SmartOSClient) GetMachine(nodeName string, id uuid.UUID) (*Machine, error)
- func (c *SmartOSClient) ImportRemoteImage(nodeName string, uuid uuid.UUID) error
- func (c *SmartOSClient) UpdateMachine(nodeName string, machine *Machine) error
- type UpdateItemFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReconcileMaps ¶
func ReconcileMaps(oldMap map[string]interface{}, newMap map[string]interface{}, addItem AddItemFunc, updateItem UpdateItemFunc, removeItem RemoveItemFunc, itemsAreEqual ItemEqualFunc) bool
ReconcileMaps compares two maps; one with old data and one with new data and calls the various argument functions reflecting what operations are necessary to transform the old map into the new.
func ReconcileSlices ¶
func ReconcileSlices(oldSlice []string, newSlice []string, addItem AddSliceItemFunc, removeItem RemoveSliceItemFunc) bool
ReconcileSlices compares two slices; one with old data and one with new data and calls the various argument functions reflecting what operations are necessary to transform the old slice into the new.
Types ¶
type AddItemFunc ¶
type AddItemFunc func(string, interface{})
type AddSliceItemFunc ¶
type AddSliceItemFunc func(string)
type ItemEqualFunc ¶
type ItemEqualFunc func(interface{}, interface{}) bool
type Machine ¶
type Machine struct { NodeName string ID *uuid.UUID `json:"uuid,omitempty"` Alias string `json:"alias,omitempty"` Autoboot *bool `json:"autoboot,omitempty"` Brand string `json:"brand,omitempty"` CPUCap *uint32 `json:"cpu_cap,omitempty"` /* CPUShares uint32 `json:"cpu_shares,omitempty"` */ CustomerMetadata map[string]string `json:"customer_metadata,omitempty"` SetCustomerMetadata map[string]string `json:"set_customer_metadata,omitempty"` // for updates RemoveCustomerMetadata []string `json:"remove_customer_metadata,omitempty"` // for updates Disks []Disk `json:"disks,omitempty"` /* DelegateDataset bool `json:"delegate_dataset,omitempty"` DNSDomain string `json:"dns_domain,omitempty"` FirewallEnabled bool `json:"firewall_enabled,omitempty"` Hostname string `json:"hostname,omitempty"` */ ImageUUID *uuid.UUID `json:"image_uuid,omitempty"` /* InternalMetadata map[string]string `json:"internal_metadat,omitempty"` InternalMetadataNamespaces map[string]string `json:"internal_metadata_namespaces,omitempty"` IndestructableDelegated bool `json:"indestructible_delegated,omitempty"` IndestructableZoneRoot bool `json:"indestructible_zoneroot,omitempty"` */ KernelVersion string `json:"kernel_version,omitempty"` MaintainResolvers *bool `json:"maintain_resolvers,omitempty"` MaxPhysicalMemory *uint32 `json:"max_physical_memory,omitempty"` /* MaxSwap uint32 `json:"max_swap,omitempty"` */ NetworkInterfaces []NetworkInterface `json:"nics,omitempty"` Quota *uint32 `json:"quota,omitempty"` RAM *uint32 `json:"ram,omitempty"` Resolvers []string `json:"resolvers,omitempty"` VirtualCPUCount *uint32 `json:"vcpus,omitempty"` State string `json:"state,omitempty"` PrimaryIP string `json:"-"` Metadata map[string]string `json:"-"` }
func (*Machine) LoadFromSchema ¶
func (m *Machine) LoadFromSchema(d *schema.ResourceData) error
func (*Machine) SaveToSchema ¶
func (m *Machine) SaveToSchema(d *schema.ResourceData) error
func (*Machine) UpdateMetadata ¶
func (m *Machine) UpdateMetadata()
func (*Machine) UpdatePrimaryIP ¶
func (m *Machine) UpdatePrimaryIP()
type NetworkInterface ¶
type NetworkInterface struct { /* AllowDHCPSpoofing bool `json:"allow_dhcp_spoofing,omitempty"` */ AllowIPSpoofing bool `json:"allow_ip_spoofing"` AllowMACSpoofing bool `json:"allow_mac_spoofing"` AllowRestrictedTraffic bool `json:"allow_restricted_traffic"` /* BlockedOutgoingPorts []uint16 `json:"blocked_outgoing_ports,omitempty"` */ Gateways []string `json:"gateways,omitempty"` Interface string `json:"interface,omitempty"` IPAddresses []string `json:"ips,omitempty"` IPAddress string `json:"ip,omitempty"` /* HardwareAddress string `json:"mac,omitempty"` */ Model string `json:"model,omitempty"` Tag string `json:"nic_tag,omitempty"` IsPrimary *bool `json:"primary,omitempty"` VirtualLANID uint16 `json:"vlan_id,omitempty"` /* VRRP Support */ VRRPVRID *uint32 `json:"vrrp_vrid,omitempty"` VRRPPrimaryIP string `json:"vrrp_primary_ip,omitempty"` }
type RemoveItemFunc ¶
type RemoveItemFunc func(string)
type RemoveSliceItemFunc ¶
type RemoveSliceItemFunc func(string)
type SmartOSClient ¶
type SmartOSClient struct {
// contains filtered or unexported fields
}
func (*SmartOSClient) Close ¶
func (c *SmartOSClient) Close(nodeName string)
func (*SmartOSClient) Connect ¶
func (c *SmartOSClient) Connect(nodeName string) error
func (*SmartOSClient) CreateMachine ¶
func (*SmartOSClient) DeleteMachine ¶
func (c *SmartOSClient) DeleteMachine(nodeName string, id uuid.UUID) error
func (*SmartOSClient) FindRemoteImage ¶
func (*SmartOSClient) GetLocalImage ¶
func (*SmartOSClient) GetMachine ¶
func (*SmartOSClient) ImportRemoteImage ¶
func (c *SmartOSClient) ImportRemoteImage(nodeName string, uuid uuid.UUID) error
func (*SmartOSClient) UpdateMachine ¶
func (c *SmartOSClient) UpdateMachine(nodeName string, machine *Machine) error
type UpdateItemFunc ¶
type UpdateItemFunc func(string, interface{})
Click to show internal directories.
Click to hide internal directories.