Documentation ¶
Overview ¶
Package powervs implements powervs code.
Index ¶
- Constants
- func CacheKeyFunc(obj interface{}) (string, error)
- func InitialiseDHCPCacheStore() cache.Store
- type PowerVS
- type Service
- func (s *Service) CreateCosImage(body *models.CreateCosImageImportJob) (*models.JobReference, error)
- func (s *Service) CreateInstance(body *models.PVMInstanceCreate) (*models.PVMInstanceList, error)
- func (s *Service) DeleteImage(id string) error
- func (s *Service) DeleteInstance(id string) error
- func (s *Service) DeleteJob(id string) error
- func (s *Service) GetAllDHCPServers() (models.DHCPServers, error)
- func (s *Service) GetAllImage() (*models.Images, error)
- func (s *Service) GetAllInstance() (*models.PVMInstances, error)
- func (s *Service) GetAllNetwork() (*models.Networks, error)
- func (s *Service) GetCosImages(id string) (*models.Job, error)
- func (s *Service) GetDHCPServer(id string) (*models.DHCPServerDetail, error)
- func (s *Service) GetImage(id string) (*models.Image, error)
- func (s *Service) GetInstance(id string) (*models.PVMInstance, error)
- func (s *Service) GetJob(id string) (*models.Job, error)
- type ServiceOptions
- type VMip
Constants ¶
const CacheTTL = time.Duration(20) * time.Minute
CacheTTL is duration of time to store the vm ip in cache Currently the default sync period is 10 minutes that means every 10 minutes there will be a reconciliation, So setting cache timeout to 20 minutes so the cache updates will happen once in 2 reconciliations.
Variables ¶
This section is empty.
Functions ¶
func CacheKeyFunc ¶ added in v0.2.4
CacheKeyFunc defines the key function required in TTLStore.
func InitialiseDHCPCacheStore ¶ added in v0.2.4
InitialiseDHCPCacheStore returns a new cache store.
Types ¶
type PowerVS ¶
type PowerVS interface { CreateInstance(body *models.PVMInstanceCreate) (*models.PVMInstanceList, error) DeleteInstance(id string) error GetAllInstance() (*models.PVMInstances, error) GetAllImage() (*models.Images, error) GetAllNetwork() (*models.Networks, error) GetInstance(id string) (*models.PVMInstance, error) GetImage(id string) (*models.Image, error) DeleteImage(id string) error CreateCosImage(body *models.CreateCosImageImportJob) (*models.JobReference, error) GetCosImages(id string) (*models.Job, error) GetJob(id string) (*models.Job, error) DeleteJob(id string) error GetAllDHCPServers() (models.DHCPServers, error) GetDHCPServer(id string) (*models.DHCPServerDetail, error) }
PowerVS interface defines methods that a Cluster API IBMCLOUD object should implement.
func NewService ¶
func NewService(options ServiceOptions) (PowerVS, error)
NewService returns a new service for the Power VS api client.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service holds the PowerVS Service specific information.
func (*Service) CreateCosImage ¶
func (s *Service) CreateCosImage(body *models.CreateCosImageImportJob) (*models.JobReference, error)
CreateCosImage creates a import job to import the image in the Power VS service instance.
func (*Service) CreateInstance ¶
func (s *Service) CreateInstance(body *models.PVMInstanceCreate) (*models.PVMInstanceList, error)
CreateInstance creates the virtual machine in the Power VS service instance.
func (*Service) DeleteImage ¶
DeleteImage deletes the image in the Power VS service instance.
func (*Service) DeleteInstance ¶
DeleteInstance deletes the virtual machine in the Power VS service instance.
func (*Service) DeleteJob ¶
DeleteJob deletes the image import job in the Power VS service instance.
func (*Service) GetAllDHCPServers ¶ added in v0.2.4
func (s *Service) GetAllDHCPServers() (models.DHCPServers, error)
GetAllDHCPServers returns all the DHCP servers in the Power VS service instance.
func (*Service) GetAllImage ¶
GetAllImage returns all the images in the Power VS service instance.
func (*Service) GetAllInstance ¶
func (s *Service) GetAllInstance() (*models.PVMInstances, error)
GetAllInstance returns all the virtual machine in the Power VS service instance.
func (*Service) GetAllNetwork ¶
GetAllNetwork returns all the networks in the Power VS service instance.
func (*Service) GetCosImages ¶
GetCosImages returns the last import job in the Power VS service instance.
func (*Service) GetDHCPServer ¶ added in v0.2.4
func (s *Service) GetDHCPServer(id string) (*models.DHCPServerDetail, error)
GetDHCPServer returns the details for DHCP server associated with id.
func (*Service) GetInstance ¶
func (s *Service) GetInstance(id string) (*models.PVMInstance, error)
GetInstance returns the virtual machine in the Power VS service instance.
type ServiceOptions ¶
type ServiceOptions struct { *ibmpisession.IBMPIOptions CloudInstanceID string }
ServiceOptions holds the PowerVS Service Options specific information.