resources

package
v0.0.0-...-9c72d28 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: Apache-2.0, Apache-2.0, Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CBPublicIPPool       = "ext"
	CBGateWayId          = "8c1af031-aad6-4762-ac83-52e09dd82571"
	CBVirutalNetworkName = "CB-VNet"
	CBVnetDefaultCidr    = "130.0.0.0/16"
	//CBVMUser             = "cb-user"
	DNSNameservers = "8.8.8.8"
)

Variables

This section is empty.

Functions

func CreateSubnetCIDR

func CreateSubnetCIDR(subnetList []*irs.VNetworkInfo) (*string, error)

서브넷 CIDR 생성 (CIDR C class 기준 생성)

func GetCBVNetId

func GetCBVNetId(client *gophercloud.ServiceClient) (string, error)

기본 가상 네트워크(CB-VNet) Id 정보 조회

func GetFlavor

func GetFlavor(client *gophercloud.ServiceClient, flavorName string) (*string, error)

Types

type InterfaceInfo

type InterfaceInfo struct {
	Id   string
	Name string
}

@TODO: Interface 리소스 프로퍼티 정의 필요

type InterfaceReqInfo

type InterfaceReqInfo struct {
	RouterId string
	SubnetId string
}

@TODO: Interface 생성 요청 파라미터 정의 필요

type OpenStackImageHandler

type OpenStackImageHandler struct {
	Client      *gophercloud.ServiceClient
	ImageClient *gophercloud.ServiceClient
}

func (*OpenStackImageHandler) CreateImage

func (imageHandler *OpenStackImageHandler) CreateImage(imageReqInfo irs.ImageReqInfo) (irs.ImageInfo, error)

func (*OpenStackImageHandler) DeleteImage

func (imageHandler *OpenStackImageHandler) DeleteImage(imageID string) (bool, error)

func (*OpenStackImageHandler) GetImage

func (imageHandler *OpenStackImageHandler) GetImage(imageNameId string) (irs.ImageInfo, error)

func (*OpenStackImageHandler) ListImage

func (imageHandler *OpenStackImageHandler) ListImage() ([]*irs.ImageInfo, error)

type OpenStackKeyPairHandler

type OpenStackKeyPairHandler struct {
	Client *gophercloud.ServiceClient
}

func (*OpenStackKeyPairHandler) CreateKey

func (keyPairHandler *OpenStackKeyPairHandler) CreateKey(keyPairReqInfo irs.KeyPairReqInfo) (irs.KeyPairInfo, error)

func (*OpenStackKeyPairHandler) DeleteKey

func (keyPairHandler *OpenStackKeyPairHandler) DeleteKey(keyName string) (bool, error)

func (*OpenStackKeyPairHandler) GetKey

func (keyPairHandler *OpenStackKeyPairHandler) GetKey(keyName string) (irs.KeyPairInfo, error)

func (*OpenStackKeyPairHandler) ListKey

func (keyPairHandler *OpenStackKeyPairHandler) ListKey() ([]*irs.KeyPairInfo, error)

type OpenStackPublicIPHandler

type OpenStackPublicIPHandler struct {
	Client *gophercloud.ServiceClient
}

func (*OpenStackPublicIPHandler) CreatePublicIP

func (publicIPHandler *OpenStackPublicIPHandler) CreatePublicIP(publicIPReqInfo irs.PublicIPReqInfo) (irs.PublicIPInfo, error)

func (*OpenStackPublicIPHandler) DeletePublicIP

func (publicIPHandler *OpenStackPublicIPHandler) DeletePublicIP(publicIPID string) (bool, error)

func (*OpenStackPublicIPHandler) GetPublicIP

func (publicIPHandler *OpenStackPublicIPHandler) GetPublicIP(publicIPID string) (irs.PublicIPInfo, error)

func (*OpenStackPublicIPHandler) ListPublicIP

func (publicIPHandler *OpenStackPublicIPHandler) ListPublicIP() ([]*irs.PublicIPInfo, error)

type OpenStackRouterHandler

type OpenStackRouterHandler struct {
	Client *gophercloud.ServiceClient
}

func (*OpenStackRouterHandler) AddInterface

func (routerHandler *OpenStackRouterHandler) AddInterface(interfaceReqInfo InterfaceReqInfo) (InterfaceInfo, error)

func (*OpenStackRouterHandler) CreateRouter

func (routerHandler *OpenStackRouterHandler) CreateRouter(routerReqInfo RouterReqInfo) (RouterInfo, error)

func (*OpenStackRouterHandler) DeleteInterface

func (routerHandler *OpenStackRouterHandler) DeleteInterface(routerID string, subnetID string) (bool, error)

func (*OpenStackRouterHandler) DeleteRouter

func (routerHandler *OpenStackRouterHandler) DeleteRouter(routerID string) (bool, error)

func (*OpenStackRouterHandler) GetRouter

func (routerHandler *OpenStackRouterHandler) GetRouter(routerID string) (RouterInfo, error)

func (*OpenStackRouterHandler) ListRouter

func (routerHandler *OpenStackRouterHandler) ListRouter() ([]*RouterInfo, error)

type OpenStackSecurityHandler

type OpenStackSecurityHandler struct {
	Client        *gophercloud.ServiceClient
	NetworkClient *gophercloud.ServiceClient
}

func (*OpenStackSecurityHandler) CreateSecurity

func (securityHandler *OpenStackSecurityHandler) CreateSecurity(securityReqInfo irs.SecurityReqInfo) (irs.SecurityInfo, error)

func (*OpenStackSecurityHandler) DeleteSecurity

func (securityHandler *OpenStackSecurityHandler) DeleteSecurity(securityNameId string) (bool, error)

func (*OpenStackSecurityHandler) GetSecurity

func (securityHandler *OpenStackSecurityHandler) GetSecurity(securityNameId string) (irs.SecurityInfo, error)

func (*OpenStackSecurityHandler) ListSecurity

func (securityHandler *OpenStackSecurityHandler) ListSecurity() ([]*irs.SecurityInfo, error)

type OpenStackVMHandler

type OpenStackVMHandler struct {
	Client        *gophercloud.ServiceClient
	NetworkClient *gophercloud.ServiceClient
}

func (*OpenStackVMHandler) AssociatePublicIP

func (vmHandler *OpenStackVMHandler) AssociatePublicIP(serverID string) (bool, error)

func (*OpenStackVMHandler) GetVM

func (vmHandler *OpenStackVMHandler) GetVM(vmNameID string) (irs.VMInfo, error)

func (*OpenStackVMHandler) GetVMStatus

func (vmHandler *OpenStackVMHandler) GetVMStatus(vmNameID string) (irs.VMStatus, error)

func (*OpenStackVMHandler) ListVM

func (vmHandler *OpenStackVMHandler) ListVM() ([]*irs.VMInfo, error)

func (*OpenStackVMHandler) ListVMStatus

func (vmHandler *OpenStackVMHandler) ListVMStatus() ([]*irs.VMStatusInfo, error)

func (*OpenStackVMHandler) RebootVM

func (vmHandler *OpenStackVMHandler) RebootVM(vmNameID string) (irs.VMStatus, error)

func (*OpenStackVMHandler) ResumeVM

func (vmHandler *OpenStackVMHandler) ResumeVM(vmNameID string) (irs.VMStatus, error)

func (*OpenStackVMHandler) StartVM

func (vmHandler *OpenStackVMHandler) StartVM(vmReqInfo irs.VMReqInfo) (irs.VMInfo, error)

func (*OpenStackVMHandler) SuspendVM

func (vmHandler *OpenStackVMHandler) SuspendVM(vmNameID string) (irs.VMStatus, error)

func (*OpenStackVMHandler) TerminateVM

func (vmHandler *OpenStackVMHandler) TerminateVM(vmNameID string) (irs.VMStatus, error)

type OpenStackVNetworkHandler

type OpenStackVNetworkHandler struct {
	Client *gophercloud.ServiceClient
}

func (*OpenStackVNetworkHandler) AddInterface

func (vNetworkHandler *OpenStackVNetworkHandler) AddInterface(subnetId string, routerId string) (bool, error)

func (*OpenStackVNetworkHandler) CreateRouter

func (vNetworkHandler *OpenStackVNetworkHandler) CreateRouter(subnetName string) (*string, error)

func (*OpenStackVNetworkHandler) CreateVNetwork

func (vNetworkHandler *OpenStackVNetworkHandler) CreateVNetwork(vNetworkReqInfo irs.VNetworkReqInfo) (irs.VNetworkInfo, error)

func (*OpenStackVNetworkHandler) DeleteInterface

func (vNetworkHandler *OpenStackVNetworkHandler) DeleteInterface(subnetID string, routerID string) (bool, error)

func (*OpenStackVNetworkHandler) DeleteRouter

func (vNetworkHandler *OpenStackVNetworkHandler) DeleteRouter(subnetName string) (bool, error)

func (*OpenStackVNetworkHandler) DeleteVNetwork

func (vNetworkHandler *OpenStackVNetworkHandler) DeleteVNetwork(vNetworkNameId string) (bool, error)

func (*OpenStackVNetworkHandler) GetRouterID

func (vNetworkHandler *OpenStackVNetworkHandler) GetRouterID() (*string, error)

Router 이름 기준 ID 정보 조회

func (*OpenStackVNetworkHandler) GetVNetwork

func (vNetworkHandler *OpenStackVNetworkHandler) GetVNetwork(vNetworkNameId string) (irs.VNetworkInfo, error)

func (*OpenStackVNetworkHandler) ListVNetwork

func (vNetworkHandler *OpenStackVNetworkHandler) ListVNetwork() ([]*irs.VNetworkInfo, error)

type OpenStackVNicworkHandler

type OpenStackVNicworkHandler struct {
	Client *gophercloud.ServiceClient
}

func (*OpenStackVNicworkHandler) CreateVNic

func (vNicHandler *OpenStackVNicworkHandler) CreateVNic(vNicReqInfo irs.VNicReqInfo) (irs.VNicInfo, error)

func (*OpenStackVNicworkHandler) DeleteVNic

func (vNicHandler *OpenStackVNicworkHandler) DeleteVNic(vNicID string) (bool, error)

func (*OpenStackVNicworkHandler) GetVNic

func (vNicHandler *OpenStackVNicworkHandler) GetVNic(vNicID string) (irs.VNicInfo, error)

func (*OpenStackVNicworkHandler) ListVNic

func (vNicHandler *OpenStackVNicworkHandler) ListVNic() ([]*irs.VNicInfo, error)

type RouteInfo

type RouteInfo struct {
	NextHop         string
	DestinationCIDR string
}

@TODO: Router 리소스 프로퍼티 정의 필요

type RouterInfo

type RouterInfo struct {
	Id           string
	Name         string
	TenantId     string
	AdminStateUp bool
	Distributed  bool
	Routes       []RouteInfo
}

type RouterReqInfo

type RouterReqInfo struct {
	Name         string
	GateWayId    string
	AdminStateUp bool
}

@TODO: Router 생성 요청 파라미터 정의 필요

Jump to

Keyboard shortcuts

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