openstack 增加/安全组/浮动Ip/等实例功能
This commit is contained in:
parent
ed73a40e8d
commit
c75834c357
|
@ -2,6 +2,31 @@ package common
|
|||
|
||||
import "time"
|
||||
|
||||
/*type Auth struct {
|
||||
Auth struct {
|
||||
Identity struct {
|
||||
Methods []string `json:"methods"`
|
||||
Password struct {
|
||||
User struct {
|
||||
Name string `json:"name"`
|
||||
Password string `json:"password"`
|
||||
Domain struct {
|
||||
Name string `json:"name"`
|
||||
} `json:"domain"`
|
||||
} `json:"user"`
|
||||
} `json:"password"`
|
||||
} `json:"identity"`
|
||||
Scope struct {
|
||||
Project struct {
|
||||
Name string `json:"name"`
|
||||
Domain struct {
|
||||
Name string `json:"name"`
|
||||
} `json:"domain"`
|
||||
} `json:"project"`
|
||||
} `json:"scope"`
|
||||
} `json:"auth"`
|
||||
}*/
|
||||
|
||||
type Auth struct {
|
||||
Auth struct {
|
||||
Identity struct {
|
||||
|
@ -20,7 +45,7 @@ type Auth struct {
|
|||
Project struct {
|
||||
Name string `json:"name"`
|
||||
Domain struct {
|
||||
Name string `json:"name"`
|
||||
Id string `json:"id"`
|
||||
} `json:"domain"`
|
||||
} `json:"project"`
|
||||
} `json:"scope"`
|
||||
|
|
|
@ -32,7 +32,7 @@ func GenerateToken() (string, string, time.Time) {
|
|||
switch Platform {
|
||||
case C.OpenstackConfig.ZhiJiang.Platform:
|
||||
a.Auth.Scope.Project.Name = C.OpenstackConfig.ZhiJiang.USER
|
||||
a.Auth.Scope.Project.Domain.Name = C.OpenstackConfig.ZhiJiang.ProjectName
|
||||
a.Auth.Scope.Project.Domain.Id = C.OpenstackConfig.ZhiJiang.Id
|
||||
a.Auth.Identity.Methods = append(a.Auth.Identity.Methods, C.OpenstackConfig.ZhiJiang.AuthMethod)
|
||||
a.Auth.Identity.Password.User.Name = C.OpenstackConfig.ZhiJiang.USER
|
||||
a.Auth.Identity.Password.User.Password = C.OpenstackConfig.ZhiJiang.PASSWORD
|
||||
|
@ -40,7 +40,7 @@ func GenerateToken() (string, string, time.Time) {
|
|||
TokenUrl = C.OpenstackConfig.ZhiJiang.TokenUrl
|
||||
case C.OpenstackConfig.Nudt.Platform:
|
||||
a.Auth.Scope.Project.Name = C.OpenstackConfig.Nudt.USER
|
||||
a.Auth.Scope.Project.Domain.Name = C.OpenstackConfig.Nudt.ProjectName
|
||||
a.Auth.Scope.Project.Domain.Id = C.OpenstackConfig.Nudt.Id
|
||||
a.Auth.Identity.Methods = append(a.Auth.Identity.Methods, C.OpenstackConfig.Nudt.AuthMethod)
|
||||
a.Auth.Identity.Password.User.Name = C.OpenstackConfig.Nudt.USER
|
||||
a.Auth.Identity.Password.User.Password = C.OpenstackConfig.Nudt.PASSWORD
|
||||
|
|
|
@ -23,4 +23,5 @@ type Conf struct {
|
|||
AuthMethod string `json:"AuthMethod"`
|
||||
ProjectName string `json:"ProjectName"`
|
||||
Platform string `json:"Platform"`
|
||||
Id string `json:"Id"`
|
||||
}
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type AddSecurityGroupToServerLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewAddSecurityGroupToServerLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AddSecurityGroupToServerLogic {
|
||||
return &AddSecurityGroupToServerLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *AddSecurityGroupToServerLogic) AddSecurityGroupToServer(in *openstack.AddSecurityGroupToServerReq) (*openstack.AddSecurityGroupToServerResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
var resp openstack.AddSecurityGroupToServerResp
|
||||
platform, err := common.GetOpenstackConfWithPlatform(in.Platform)
|
||||
reqByte, err := json.Marshal(in)
|
||||
token := common.GetToken()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackComputeUrl
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if statusCode == 202 {
|
||||
err := json.Unmarshal(body, &resp)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
resp.Code = 200
|
||||
resp.Msg = "Success"
|
||||
} else if statusCode != 202 {
|
||||
json.Unmarshal(body, &resp)
|
||||
resp.Code = 400
|
||||
resp.Msg = "Failure"
|
||||
}
|
||||
return &resp, nil
|
||||
|
||||
}
|
|
@ -56,5 +56,5 @@ func (l *BulkCreateNetworksLogic) BulkCreateNetworks(in *openstack.BulkCreateNet
|
|||
resp.Code = 400
|
||||
resp.Msg = "Failure"
|
||||
}
|
||||
return &openstack.BulkCreateNetworksResp{}, nil
|
||||
return &resp, nil
|
||||
}
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ChangeAdministrativePasswordLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewChangeAdministrativePasswordLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ChangeAdministrativePasswordLogic {
|
||||
return &ChangeAdministrativePasswordLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ChangeAdministrativePasswordLogic) ChangeAdministrativePassword(in *openstack.ChangeAdministrativePasswordReq) (*openstack.ChangeAdministrativePasswordResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
var resp openstack.ChangeAdministrativePasswordResp
|
||||
platform, err := common.GetOpenstackConfWithPlatform(in.Platform)
|
||||
reqByte, err := json.Marshal(in)
|
||||
token := common.GetToken()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackComputeUrl
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if statusCode == 202 {
|
||||
err := json.Unmarshal(body, &resp)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
resp.Code = 200
|
||||
resp.Msg = "Success"
|
||||
} else if statusCode != 202 {
|
||||
json.Unmarshal(body, &resp)
|
||||
resp.Code = 400
|
||||
resp.Msg = "Failure"
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type CreateFirewallGroupLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewCreateFirewallGroupLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateFirewallGroupLogic {
|
||||
return &CreateFirewallGroupLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *CreateFirewallGroupLogic) CreateFirewallGroup(in *openstack.CreateFirewallGroupReq) (*openstack.CreateFirewallGroupResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.CreateFirewallGroupResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type CreateFirewallPolicyLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewCreateFirewallPolicyLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateFirewallPolicyLogic {
|
||||
return &CreateFirewallPolicyLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *CreateFirewallPolicyLogic) CreateFirewallPolicy(in *openstack.CreateFirewallPolicyReq) (*openstack.CreateFirewallPolicyResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.CreateFirewallPolicyResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type CreateFirewallRuleLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewCreateFirewallRuleLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateFirewallRuleLogic {
|
||||
return &CreateFirewallRuleLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *CreateFirewallRuleLogic) CreateFirewallRule(in *openstack.CreateFirewallRuleReq) (*openstack.CreateFirewallRuleResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.CreateFirewallRuleResp{}, nil
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type CreateFlavorLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewCreateFlavorLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateFlavorLogic {
|
||||
return &CreateFlavorLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *CreateFlavorLogic) CreateFlavor(in *openstack.CreateFlavorReq) (*openstack.CreateFlavorResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
var resp openstack.CreateFlavorResp
|
||||
platform, err := common.GetOpenstackConfWithPlatform(in.Platform)
|
||||
reqByte, err := json.Marshal(in)
|
||||
token := common.GetToken()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackComputeUrl
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/flavors", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if statusCode == 202 {
|
||||
err := json.Unmarshal(body, &resp)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
resp.Code = 200
|
||||
resp.Msg = "Success"
|
||||
} else if statusCode != 202 {
|
||||
json.Unmarshal(body, &resp)
|
||||
resp.Code = 400
|
||||
resp.Msg = "Failure"
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type CreateFloatingIPLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewCreateFloatingIPLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateFloatingIPLogic {
|
||||
return &CreateFloatingIPLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *CreateFloatingIPLogic) CreateFloatingIP(in *openstack.CreateFloatingIPReq) (*openstack.CreateFloatingIPResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.CreateFloatingIPResp{}, nil
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type CreateNetworkSegmentRangeLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewCreateNetworkSegmentRangeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateNetworkSegmentRangeLogic {
|
||||
return &CreateNetworkSegmentRangeLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
// 网段
|
||||
func (l *CreateNetworkSegmentRangeLogic) CreateNetworkSegmentRange(in *openstack.CreateNetworkSegmentRangeReq) (*openstack.CreateNetworkSegmentRangeResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.CreateNetworkSegmentRangeResp{}, nil
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type CreatePortLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewCreatePortLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreatePortLogic {
|
||||
return &CreatePortLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
// 端口
|
||||
func (l *CreatePortLogic) CreatePort(in *openstack.CreatePortReq) (*openstack.CreatePortResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.CreatePortResp{}, nil
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type CreateRouterLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewCreateRouterLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateRouterLogic {
|
||||
return &CreateRouterLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
// 路由
|
||||
func (l *CreateRouterLogic) CreateRouter(in *openstack.CreateRouterReq) (*openstack.CreateRouterResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.CreateRouterResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type CreateSecurityGroupLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewCreateSecurityGroupLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateSecurityGroupLogic {
|
||||
return &CreateSecurityGroupLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *CreateSecurityGroupLogic) CreateSecurityGroup(in *openstack.CreateSecurityGroupReq) (*openstack.CreateSecurityGroupResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.CreateSecurityGroupResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type CreateSecurityGroupRuleLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewCreateSecurityGroupRuleLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateSecurityGroupRuleLogic {
|
||||
return &CreateSecurityGroupRuleLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *CreateSecurityGroupRuleLogic) CreateSecurityGroupRule(in *openstack.CreateSecurityGroupRuleReq) (*openstack.CreateSecurityGroupRuleResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.CreateSecurityGroupRuleResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type DeleteFirewallGroupLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewDeleteFirewallGroupLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteFirewallGroupLogic {
|
||||
return &DeleteFirewallGroupLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DeleteFirewallGroupLogic) DeleteFirewallGroup(in *openstack.DeleteFirewallGroupReq) (*openstack.DeleteFirewallGroupResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.DeleteFirewallGroupResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type DeleteFirewallPolicyLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewDeleteFirewallPolicyLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteFirewallPolicyLogic {
|
||||
return &DeleteFirewallPolicyLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DeleteFirewallPolicyLogic) DeleteFirewallPolicy(in *openstack.DeleteFirewallPolicyReq) (*openstack.DeleteFirewallPolicyResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.DeleteFirewallPolicyResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type DeleteFirewallRuleLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewDeleteFirewallRuleLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteFirewallRuleLogic {
|
||||
return &DeleteFirewallRuleLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DeleteFirewallRuleLogic) DeleteFirewallRule(in *openstack.DeleteFirewallRuleReq) (*openstack.DeleteFirewallRuleResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.DeleteFirewallRuleResp{}, nil
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type DeleteFlavorLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewDeleteFlavorLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteFlavorLogic {
|
||||
return &DeleteFlavorLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DeleteFlavorLogic) DeleteFlavor(in *openstack.DeleteFlavorReq) (*openstack.DeleteFlavorResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
var resp openstack.DeleteFlavorResp
|
||||
platform, err := common.GetOpenstackConfWithPlatform(in.Platform)
|
||||
openstackUrl := platform.OpenstackImageUrl
|
||||
token := common.GetToken()
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/flavors/"+in.FlavorId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if statusCode == 204 {
|
||||
err := json.Unmarshal(body, &resp)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
resp.Code = 200
|
||||
resp.Msg = "Success"
|
||||
} else if statusCode != 204 {
|
||||
json.Unmarshal(body, &resp)
|
||||
resp.Code = 400
|
||||
resp.Msg = "Failure"
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type DeleteFloatingIPLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewDeleteFloatingIPLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteFloatingIPLogic {
|
||||
return &DeleteFloatingIPLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DeleteFloatingIPLogic) DeleteFloatingIP(in *openstack.DeleteFloatingIPReq) (*openstack.DeleteFloatingIPResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.DeleteFloatingIPResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type DeleteNetworkSegmentRangesLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewDeleteNetworkSegmentRangesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteNetworkSegmentRangesLogic {
|
||||
return &DeleteNetworkSegmentRangesLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DeleteNetworkSegmentRangesLogic) DeleteNetworkSegmentRanges(in *openstack.DeleteNetworkSegmentRangesReq) (*openstack.DeleteNetworkSegmentRangesResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.DeleteNetworkSegmentRangesResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type DeletePortLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewDeletePortLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeletePortLogic {
|
||||
return &DeletePortLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DeletePortLogic) DeletePort(in *openstack.DeletePortReq) (*openstack.DeletePortResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.DeletePortResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type DeleteRouterLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewDeleteRouterLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteRouterLogic {
|
||||
return &DeleteRouterLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DeleteRouterLogic) DeleteRouter(in *openstack.DeleteRouterReq) (*openstack.DeleteRouterResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.DeleteRouterResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type DeleteSecurityGroupLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewDeleteSecurityGroupLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteSecurityGroupLogic {
|
||||
return &DeleteSecurityGroupLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DeleteSecurityGroupLogic) DeleteSecurityGroup(in *openstack.DeleteSecurityGroupReq) (*openstack.DeleteSecurityGroupResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.DeleteSecurityGroupResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type DeleteSecurityGroupRuleLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewDeleteSecurityGroupRuleLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteSecurityGroupRuleLogic {
|
||||
return &DeleteSecurityGroupRuleLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DeleteSecurityGroupRuleLogic) DeleteSecurityGroupRule(in *openstack.DeleteSecurityGroupRuleReq) (*openstack.DeleteSecurityGroupRuleResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.DeleteSecurityGroupRuleResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type DeleteSubnetLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewDeleteSubnetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteSubnetLogic {
|
||||
return &DeleteSubnetLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DeleteSubnetLogic) DeleteSubnet(in *openstack.DeleteSubnetReq) (*openstack.DeleteSubnetResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.DeleteSubnetResp{}, nil
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ListFirewallGroupsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewListFirewallGroupsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListFirewallGroupsLogic {
|
||||
return &ListFirewallGroupsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
// 防火墙
|
||||
func (l *ListFirewallGroupsLogic) ListFirewallGroups(in *openstack.ListFirewallGroupsReq) (*openstack.ListFirewallGroupsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ListFirewallGroupsResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ListFirewallPoliciesLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewListFirewallPoliciesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListFirewallPoliciesLogic {
|
||||
return &ListFirewallPoliciesLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ListFirewallPoliciesLogic) ListFirewallPolicies(in *openstack.ListFirewallPoliciesReq) (*openstack.ListFirewallPoliciesResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ListFirewallPoliciesResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ListFirewallRulesLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewListFirewallRulesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListFirewallRulesLogic {
|
||||
return &ListFirewallRulesLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ListFirewallRulesLogic) ListFirewallRules(in *openstack.ListFirewallRulesReq) (*openstack.ListFirewallRulesResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ListFirewallRulesResp{}, nil
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ListFloatingIPsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewListFloatingIPsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListFloatingIPsLogic {
|
||||
return &ListFloatingIPsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
// 浮动IP
|
||||
func (l *ListFloatingIPsLogic) ListFloatingIPs(in *openstack.ListFloatingIPsReq) (*openstack.ListFloatingIPsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ListFloatingIPsResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ListNetworkSegmentRangesLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewListNetworkSegmentRangesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListNetworkSegmentRangesLogic {
|
||||
return &ListNetworkSegmentRangesLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ListNetworkSegmentRangesLogic) ListNetworkSegmentRanges(in *openstack.ListNetworkSegmentRangesReq) (*openstack.ListNetworkSegmentRangesResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ListNetworkSegmentRangesResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ListPortsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewListPortsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListPortsLogic {
|
||||
return &ListPortsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ListPortsLogic) ListPorts(in *openstack.ListPortsReq) (*openstack.ListPortsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ListPortsResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ListRoutersLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewListRoutersLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListRoutersLogic {
|
||||
return &ListRoutersLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ListRoutersLogic) ListRouters(in *openstack.ListRoutersReq) (*openstack.ListRoutersResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ListRoutersResp{}, nil
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ListSecurityGroupRulesLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewListSecurityGroupRulesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListSecurityGroupRulesLogic {
|
||||
return &ListSecurityGroupRulesLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
// 安全组规则
|
||||
func (l *ListSecurityGroupRulesLogic) ListSecurityGroupRules(in *openstack.ListSecurityGroupRulesReq) (*openstack.ListSecurityGroupRulesResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ListSecurityGroupRulesResp{}, nil
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ListSecurityGroupsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewListSecurityGroupsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListSecurityGroupsLogic {
|
||||
return &ListSecurityGroupsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
// 安全组
|
||||
func (l *ListSecurityGroupsLogic) ListSecurityGroups(in *openstack.ListSecurityGroupsReq) (*openstack.ListSecurityGroupsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ListSecurityGroupsResp{}, nil
|
||||
}
|
|
@ -30,7 +30,6 @@ func (l *ListServersLogic) ListServers(in *openstack.ListServersReq) (*openstack
|
|||
// todo: add your logic here and delete this line
|
||||
var resp openstack.ListServersResp
|
||||
platform, err := common.GetOpenstackConfWithPlatform(in.Platform)
|
||||
//openstackUrl := l.svcCtx.Config.OpenstackConfig.OpenstackComputeUrl
|
||||
openstackUrl := platform.OpenstackComputeUrl
|
||||
token := common.GetToken()
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/servers", nil, token)
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ListSubnetsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewListSubnetsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListSubnetsLogic {
|
||||
return &ListSubnetsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ListSubnetsLogic) ListSubnets(in *openstack.ListSubnetsReq) (*openstack.ListSubnetsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ListSubnetsResp{}, nil
|
||||
}
|
|
@ -2,6 +2,11 @@ package logic
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
@ -25,6 +30,31 @@ func NewRebuildServerLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Reb
|
|||
|
||||
func (l *RebuildServerLogic) RebuildServer(in *openstack.RebuildServerReq) (*openstack.RebuildServerResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.RebuildServerResp{}, nil
|
||||
var resp openstack.RebuildServerResp
|
||||
platform, err := common.GetOpenstackConfWithPlatform(in.Platform)
|
||||
reqByte, err := json.Marshal(in)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
token := common.GetToken()
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
//openstackUrl := l.svcCtx.Config.OpenstackConfig.OpenstackVolumev2Url
|
||||
openstackUrl := platform.OpenstackVolumev2Url
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if statusCode == 202 {
|
||||
err := json.Unmarshal(body, &resp)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
resp.Code = 200
|
||||
resp.Msg = "Success"
|
||||
} else if statusCode != 202 {
|
||||
json.Unmarshal(body, &resp)
|
||||
resp.Code = 400
|
||||
resp.Msg = "Failure"
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type RemoveSecurityGroupLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewRemoveSecurityGroupLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RemoveSecurityGroupLogic {
|
||||
return &RemoveSecurityGroupLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *RemoveSecurityGroupLogic) RemoveSecurityGroup(in *openstack.RemoveSecurityGroupReq) (*openstack.RemoveSecurityGroupResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
var resp openstack.RemoveSecurityGroupResp
|
||||
platform, err := common.GetOpenstackConfWithPlatform(in.Platform)
|
||||
reqByte, err := json.Marshal(in)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
token := common.GetToken()
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
//openstackUrl := l.svcCtx.Config.OpenstackConfig.OpenstackVolumev2Url
|
||||
openstackUrl := platform.OpenstackVolumev2Url
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if statusCode == 202 {
|
||||
err := json.Unmarshal(body, &resp)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
resp.Code = 200
|
||||
resp.Msg = "Success"
|
||||
} else if statusCode != 202 {
|
||||
json.Unmarshal(body, &resp)
|
||||
resp.Code = 400
|
||||
resp.Msg = "Failure"
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type RescueServerLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewRescueServerLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RescueServerLogic {
|
||||
return &RescueServerLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *RescueServerLogic) RescueServer(in *openstack.RescueServerReq) (*openstack.RescueServerResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
var resp openstack.RescueServerResp
|
||||
platform, err := common.GetOpenstackConfWithPlatform(in.Platform)
|
||||
reqByte, err := json.Marshal(in)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
token := common.GetToken()
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackVolumev2Url
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if statusCode == 202 {
|
||||
err := json.Unmarshal(body, &resp)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
resp.Code = 200
|
||||
resp.Msg = "Success"
|
||||
} else if statusCode != 202 {
|
||||
json.Unmarshal(body, &resp)
|
||||
resp.Code = 400
|
||||
resp.Msg = "Failure"
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
|
@ -2,6 +2,11 @@ package logic
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
@ -25,6 +30,30 @@ func NewResizeServerLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Resi
|
|||
|
||||
func (l *ResizeServerLogic) ResizeServer(in *openstack.ResizeServerReq) (*openstack.ResizeServerResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ResizeServerResp{}, nil
|
||||
var resp openstack.ResizeServerResp
|
||||
platform, err := common.GetOpenstackConfWithPlatform(in.Platform)
|
||||
reqByte, err := json.Marshal(in)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
token := common.GetToken()
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackVolumev2Url
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if statusCode == 202 {
|
||||
err := json.Unmarshal(body, &resp)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
resp.Code = 200
|
||||
resp.Msg = "Success"
|
||||
} else if statusCode != 202 {
|
||||
json.Unmarshal(body, &resp)
|
||||
resp.Code = 400
|
||||
resp.Msg = "Failure"
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ShelveServerLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewShelveServerLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ShelveServerLogic {
|
||||
return &ShelveServerLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ShelveServerLogic) ShelveServer(in *openstack.ShelveServerReq) (*openstack.ShelveServerResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
var resp openstack.ShelveServerResp
|
||||
platform, err := common.GetOpenstackConfWithPlatform(in.Platform)
|
||||
openstackUrl := platform.OpenstackComputeUrl
|
||||
in.Action = map[string]string{
|
||||
in.ShelveAction: "",
|
||||
}
|
||||
reqByte, err := json.Marshal(in.Action)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
//openstackUrl := l.svcCtx.Config.OpenstackConfig.OpenstackComputeUrl
|
||||
token := common.GetToken()
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if statusCode == 200 {
|
||||
err := json.Unmarshal(body, &resp)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
resp.Code = 200
|
||||
resp.Msg = "Success"
|
||||
} else if statusCode != 200 {
|
||||
json.Unmarshal(body, &resp)
|
||||
resp.Code = 400
|
||||
resp.Msg = "Failure"
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ShowFirewallGroupDetailsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewShowFirewallGroupDetailsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ShowFirewallGroupDetailsLogic {
|
||||
return &ShowFirewallGroupDetailsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ShowFirewallGroupDetailsLogic) ShowFirewallGroupDetails(in *openstack.ShowFirewallGroupDetailsReq) (*openstack.ShowFirewallGroupDetailsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ShowFirewallGroupDetailsResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ShowFirewallPolicyDetailsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewShowFirewallPolicyDetailsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ShowFirewallPolicyDetailsLogic {
|
||||
return &ShowFirewallPolicyDetailsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ShowFirewallPolicyDetailsLogic) ShowFirewallPolicyDetails(in *openstack.ShowFirewallPolicyDetailsReq) (*openstack.ShowFirewallPolicyDetailsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ShowFirewallPolicyDetailsResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ShowFirewallRuleDetailsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewShowFirewallRuleDetailsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ShowFirewallRuleDetailsLogic {
|
||||
return &ShowFirewallRuleDetailsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ShowFirewallRuleDetailsLogic) ShowFirewallRuleDetails(in *openstack.ShowFirewallRuleDetailsReq) (*openstack.ShowFirewallRuleDetailsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ShowFirewallRuleDetailsResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ShowFloatingIPDetailsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewShowFloatingIPDetailsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ShowFloatingIPDetailsLogic {
|
||||
return &ShowFloatingIPDetailsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ShowFloatingIPDetailsLogic) ShowFloatingIPDetails(in *openstack.ShowFloatingIPDetailsReq) (*openstack.ShowFloatingIPDetailsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ShowFloatingIPDetailsResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ShowNetworkSegmentRangeDetailsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewShowNetworkSegmentRangeDetailsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ShowNetworkSegmentRangeDetailsLogic {
|
||||
return &ShowNetworkSegmentRangeDetailsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ShowNetworkSegmentRangeDetailsLogic) ShowNetworkSegmentRangeDetails(in *openstack.ShowNetworkSegmentRangeDetailsReq) (*openstack.ShowNetworkSegmentRangeDetailsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ShowNetworkSegmentRangeDetailsResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ShowPortDetailsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewShowPortDetailsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ShowPortDetailsLogic {
|
||||
return &ShowPortDetailsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ShowPortDetailsLogic) ShowPortDetails(in *openstack.ShowPortDetailsReq) (*openstack.ShowPortDetailsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ShowPortDetailsResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ShowRouterDetailsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewShowRouterDetailsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ShowRouterDetailsLogic {
|
||||
return &ShowRouterDetailsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ShowRouterDetailsLogic) ShowRouterDetails(in *openstack.ShowRouterDetailsReq) (*openstack.ShowRouterDetailsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ShowRouterDetailsResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ShowSecurityGroupLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewShowSecurityGroupLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ShowSecurityGroupLogic {
|
||||
return &ShowSecurityGroupLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ShowSecurityGroupLogic) ShowSecurityGroup(in *openstack.ShowSecurityGroupReq) (*openstack.ShowSecurityGroupResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ShowSecurityGroupResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ShowSecurityGroupRuleLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewShowSecurityGroupRuleLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ShowSecurityGroupRuleLogic {
|
||||
return &ShowSecurityGroupRuleLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ShowSecurityGroupRuleLogic) ShowSecurityGroupRule(in *openstack.ShowSecurityGroupRuleReq) (*openstack.ShowSecurityGroupRuleResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.ShowSecurityGroupRuleResp{}, nil
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type SuspendServerLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewSuspendServerLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SuspendServerLogic {
|
||||
return &SuspendServerLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *SuspendServerLogic) SuspendServer(in *openstack.SuspendServerReq) (*openstack.SuspendServerResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
var resp openstack.SuspendServerResp
|
||||
platform, err := common.GetOpenstackConfWithPlatform(in.Platform)
|
||||
openstackUrl := platform.OpenstackComputeUrl
|
||||
in.Action = map[string]string{
|
||||
in.SuspendAction: "",
|
||||
}
|
||||
reqByte, err := json.Marshal(in.Action)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
//openstackUrl := l.svcCtx.Config.OpenstackConfig.OpenstackComputeUrl
|
||||
token := common.GetToken()
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if statusCode == 200 {
|
||||
err := json.Unmarshal(body, &resp)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
resp.Code = 200
|
||||
resp.Msg = "Success"
|
||||
} else if statusCode != 200 {
|
||||
json.Unmarshal(body, &resp)
|
||||
resp.Code = 400
|
||||
resp.Msg = "Failure"
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type UnpauseServerLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewUnpauseServerLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UnpauseServerLogic {
|
||||
return &UnpauseServerLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UnpauseServerLogic) UnpauseServer(in *openstack.UnpauseServerReq) (*openstack.UnpauseServerResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
var resp openstack.UnpauseServerResp
|
||||
platform, err := common.GetOpenstackConfWithPlatform(in.Platform)
|
||||
openstackUrl := platform.OpenstackComputeUrl
|
||||
in.Action = map[string]string{
|
||||
in.UnpauseAction: "",
|
||||
}
|
||||
reqByte, err := json.Marshal(in.Action)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
//openstackUrl := l.svcCtx.Config.OpenstackConfig.OpenstackComputeUrl
|
||||
token := common.GetToken()
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if statusCode == 200 {
|
||||
err := json.Unmarshal(body, &resp)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
resp.Code = 200
|
||||
resp.Msg = "Success"
|
||||
} else if statusCode != 200 {
|
||||
json.Unmarshal(body, &resp)
|
||||
resp.Code = 400
|
||||
resp.Msg = "Failure"
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type UnRescueLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewUnRescueLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UnRescueLogic {
|
||||
return &UnRescueLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UnRescueLogic) UnRescue(in *openstack.UnRescueServerReq) (*openstack.UnRescueServerResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
var resp openstack.UnRescueServerResp
|
||||
platform, err := common.GetOpenstackConfWithPlatform(in.Platform)
|
||||
openstackUrl := platform.OpenstackComputeUrl
|
||||
in.Action = map[string]string{
|
||||
in.UnRescueAction: "",
|
||||
}
|
||||
reqByte, err := json.Marshal(in.Action)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
//openstackUrl := l.svcCtx.Config.OpenstackConfig.OpenstackComputeUrl
|
||||
token := common.GetToken()
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if statusCode == 200 {
|
||||
err := json.Unmarshal(body, &resp)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
resp.Code = 200
|
||||
resp.Msg = "Success"
|
||||
} else if statusCode != 200 {
|
||||
json.Unmarshal(body, &resp)
|
||||
resp.Code = 400
|
||||
resp.Msg = "Failure"
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type UnshelveServerLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewUnshelveServerLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UnshelveServerLogic {
|
||||
return &UnshelveServerLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UnshelveServerLogic) UnshelveServer(in *openstack.UnshelveServerReq) (*openstack.UnshelveServerResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
var resp openstack.UnshelveServerResp
|
||||
platform, err := common.GetOpenstackConfWithPlatform(in.Platform)
|
||||
openstackUrl := platform.OpenstackComputeUrl
|
||||
in.Action = map[string]string{
|
||||
in.UnshelveAction: "",
|
||||
}
|
||||
reqByte, err := json.Marshal(in.Action)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
token := common.GetToken()
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if statusCode == 200 {
|
||||
err := json.Unmarshal(body, &resp)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
resp.Code = 200
|
||||
resp.Msg = "Success"
|
||||
} else if statusCode != 200 {
|
||||
json.Unmarshal(body, &resp)
|
||||
resp.Code = 400
|
||||
resp.Msg = "Failure"
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type UpdateFirewallGroupLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewUpdateFirewallGroupLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateFirewallGroupLogic {
|
||||
return &UpdateFirewallGroupLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UpdateFirewallGroupLogic) UpdateFirewallGroup(in *openstack.UpdateFirewallGroupReq) (*openstack.UpdateFirewallGroupResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.UpdateFirewallGroupResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type UpdateFloatingIPLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewUpdateFloatingIPLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateFloatingIPLogic {
|
||||
return &UpdateFloatingIPLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UpdateFloatingIPLogic) UpdateFloatingIP(in *openstack.UpdateFloatingIPReq) (*openstack.UpdateFloatingIPResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.UpdateFloatingIPResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type UpdateNetworkSegmentRangesLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewUpdateNetworkSegmentRangesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateNetworkSegmentRangesLogic {
|
||||
return &UpdateNetworkSegmentRangesLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UpdateNetworkSegmentRangesLogic) UpdateNetworkSegmentRanges(in *openstack.UpdateNetworkSegmentRangesReq) (*openstack.UpdateNetworkSegmentRangesResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.UpdateNetworkSegmentRangesResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type UpdatePortLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewUpdatePortLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdatePortLogic {
|
||||
return &UpdatePortLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UpdatePortLogic) UpdatePort(in *openstack.UpdatePortReq) (*openstack.UpdatePortResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.UpdatePortResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type UpdateRouterLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewUpdateRouterLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateRouterLogic {
|
||||
return &UpdateRouterLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UpdateRouterLogic) UpdateRouter(in *openstack.UpdateRouterReq) (*openstack.UpdateRouterResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.UpdateRouterResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type UpdateSecurityGroupLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewUpdateSecurityGroupLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateSecurityGroupLogic {
|
||||
return &UpdateSecurityGroupLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UpdateSecurityGroupLogic) UpdateSecurityGroup(in *openstack.UpdateSecurityGroupReq) (*openstack.UpdateSecurityGroupResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.UpdateSecurityGroupResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type UpdateSubnetLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewUpdateSubnetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateSubnetLogic {
|
||||
return &UpdateSubnetLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UpdateSubnetLogic) UpdateSubnet(in *openstack.UpdateSubnetReq) (*openstack.UpdateSubnetResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &openstack.UpdateSubnetResp{}, nil
|
||||
}
|
|
@ -84,9 +84,9 @@ func (s *OpenstackServer) PauseServer(ctx context.Context, in *openstack.PauseSe
|
|||
return l.PauseServer(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ListFlavorsDetail(ctx context.Context, in *openstack.ListFlavorsDetailReq) (*openstack.ListFlavorsDetailResp, error) {
|
||||
l := logic.NewListFlavorsDetailLogic(ctx, s.svcCtx)
|
||||
return l.ListFlavorsDetail(in)
|
||||
func (s *OpenstackServer) UnpauseServer(ctx context.Context, in *openstack.UnpauseServerReq) (*openstack.UnpauseServerResp, error) {
|
||||
l := logic.NewUnpauseServerLogic(ctx, s.svcCtx)
|
||||
return l.UnpauseServer(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) RebuildServer(ctx context.Context, in *openstack.RebuildServerReq) (*openstack.RebuildServerResp, error) {
|
||||
|
@ -104,6 +104,62 @@ func (s *OpenstackServer) MigrateServer(ctx context.Context, in *openstack.Migra
|
|||
return l.MigrateServer(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ShelveServer(ctx context.Context, in *openstack.ShelveServerReq) (*openstack.ShelveServerResp, error) {
|
||||
l := logic.NewShelveServerLogic(ctx, s.svcCtx)
|
||||
return l.ShelveServer(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) UnshelveServer(ctx context.Context, in *openstack.UnshelveServerReq) (*openstack.UnshelveServerResp, error) {
|
||||
l := logic.NewUnshelveServerLogic(ctx, s.svcCtx)
|
||||
return l.UnshelveServer(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ChangeAdministrativePassword(ctx context.Context, in *openstack.ChangeAdministrativePasswordReq) (*openstack.ChangeAdministrativePasswordResp, error) {
|
||||
l := logic.NewChangeAdministrativePasswordLogic(ctx, s.svcCtx)
|
||||
return l.ChangeAdministrativePassword(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) RescueServer(ctx context.Context, in *openstack.RescueServerReq) (*openstack.RescueServerResp, error) {
|
||||
l := logic.NewRescueServerLogic(ctx, s.svcCtx)
|
||||
return l.RescueServer(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) UnRescue(ctx context.Context, in *openstack.UnRescueServerReq) (*openstack.UnRescueServerResp, error) {
|
||||
l := logic.NewUnRescueLogic(ctx, s.svcCtx)
|
||||
return l.UnRescue(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) SuspendServer(ctx context.Context, in *openstack.SuspendServerReq) (*openstack.SuspendServerResp, error) {
|
||||
l := logic.NewSuspendServerLogic(ctx, s.svcCtx)
|
||||
return l.SuspendServer(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) AddSecurityGroupToServer(ctx context.Context, in *openstack.AddSecurityGroupToServerReq) (*openstack.AddSecurityGroupToServerResp, error) {
|
||||
l := logic.NewAddSecurityGroupToServerLogic(ctx, s.svcCtx)
|
||||
return l.AddSecurityGroupToServer(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) RemoveSecurityGroup(ctx context.Context, in *openstack.RemoveSecurityGroupReq) (*openstack.RemoveSecurityGroupResp, error) {
|
||||
l := logic.NewRemoveSecurityGroupLogic(ctx, s.svcCtx)
|
||||
return l.RemoveSecurityGroup(in)
|
||||
}
|
||||
|
||||
// 规格(Flavors)
|
||||
func (s *OpenstackServer) ListFlavorsDetail(ctx context.Context, in *openstack.ListFlavorsDetailReq) (*openstack.ListFlavorsDetailResp, error) {
|
||||
l := logic.NewListFlavorsDetailLogic(ctx, s.svcCtx)
|
||||
return l.ListFlavorsDetail(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) CreateFlavor(ctx context.Context, in *openstack.CreateFlavorReq) (*openstack.CreateFlavorResp, error) {
|
||||
l := logic.NewCreateFlavorLogic(ctx, s.svcCtx)
|
||||
return l.CreateFlavor(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) DeleteFlavor(ctx context.Context, in *openstack.DeleteFlavorReq) (*openstack.DeleteFlavorResp, error) {
|
||||
l := logic.NewDeleteFlavorLogic(ctx, s.svcCtx)
|
||||
return l.DeleteFlavor(in)
|
||||
}
|
||||
|
||||
// network
|
||||
func (s *OpenstackServer) ShowNetworkDetails(ctx context.Context, in *openstack.ShowNetworkDetailsReq) (*openstack.ShowNetworkDetailsResp, error) {
|
||||
l := logic.NewShowNetworkDetailsLogic(ctx, s.svcCtx)
|
||||
|
@ -135,11 +191,244 @@ func (s *OpenstackServer) BulkCreateNetworks(ctx context.Context, in *openstack.
|
|||
return l.BulkCreateNetworks(in)
|
||||
}
|
||||
|
||||
// 子网
|
||||
func (s *OpenstackServer) CreateSubnet(ctx context.Context, in *openstack.CreateSubnetReq) (*openstack.CreateSubnetResp, error) {
|
||||
l := logic.NewCreateSubnetLogic(ctx, s.svcCtx)
|
||||
return l.CreateSubnet(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ListSubnets(ctx context.Context, in *openstack.ListSubnetsReq) (*openstack.ListSubnetsResp, error) {
|
||||
l := logic.NewListSubnetsLogic(ctx, s.svcCtx)
|
||||
return l.ListSubnets(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) DeleteSubnet(ctx context.Context, in *openstack.DeleteSubnetReq) (*openstack.DeleteSubnetResp, error) {
|
||||
l := logic.NewDeleteSubnetLogic(ctx, s.svcCtx)
|
||||
return l.DeleteSubnet(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) UpdateSubnet(ctx context.Context, in *openstack.UpdateSubnetReq) (*openstack.UpdateSubnetResp, error) {
|
||||
l := logic.NewUpdateSubnetLogic(ctx, s.svcCtx)
|
||||
return l.UpdateSubnet(in)
|
||||
}
|
||||
|
||||
// 网段
|
||||
func (s *OpenstackServer) CreateNetworkSegmentRange(ctx context.Context, in *openstack.CreateNetworkSegmentRangeReq) (*openstack.CreateNetworkSegmentRangeResp, error) {
|
||||
l := logic.NewCreateNetworkSegmentRangeLogic(ctx, s.svcCtx)
|
||||
return l.CreateNetworkSegmentRange(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ListNetworkSegmentRanges(ctx context.Context, in *openstack.ListNetworkSegmentRangesReq) (*openstack.ListNetworkSegmentRangesResp, error) {
|
||||
l := logic.NewListNetworkSegmentRangesLogic(ctx, s.svcCtx)
|
||||
return l.ListNetworkSegmentRanges(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) DeleteNetworkSegmentRanges(ctx context.Context, in *openstack.DeleteNetworkSegmentRangesReq) (*openstack.DeleteNetworkSegmentRangesResp, error) {
|
||||
l := logic.NewDeleteNetworkSegmentRangesLogic(ctx, s.svcCtx)
|
||||
return l.DeleteNetworkSegmentRanges(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) UpdateNetworkSegmentRanges(ctx context.Context, in *openstack.UpdateNetworkSegmentRangesReq) (*openstack.UpdateNetworkSegmentRangesResp, error) {
|
||||
l := logic.NewUpdateNetworkSegmentRangesLogic(ctx, s.svcCtx)
|
||||
return l.UpdateNetworkSegmentRanges(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ShowNetworkSegmentRangeDetails(ctx context.Context, in *openstack.ShowNetworkSegmentRangeDetailsReq) (*openstack.ShowNetworkSegmentRangeDetailsResp, error) {
|
||||
l := logic.NewShowNetworkSegmentRangeDetailsLogic(ctx, s.svcCtx)
|
||||
return l.ShowNetworkSegmentRangeDetails(in)
|
||||
}
|
||||
|
||||
// 端口
|
||||
func (s *OpenstackServer) CreatePort(ctx context.Context, in *openstack.CreatePortReq) (*openstack.CreatePortResp, error) {
|
||||
l := logic.NewCreatePortLogic(ctx, s.svcCtx)
|
||||
return l.CreatePort(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ListPorts(ctx context.Context, in *openstack.ListPortsReq) (*openstack.ListPortsResp, error) {
|
||||
l := logic.NewListPortsLogic(ctx, s.svcCtx)
|
||||
return l.ListPorts(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) DeletePort(ctx context.Context, in *openstack.DeletePortReq) (*openstack.DeletePortResp, error) {
|
||||
l := logic.NewDeletePortLogic(ctx, s.svcCtx)
|
||||
return l.DeletePort(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) UpdatePort(ctx context.Context, in *openstack.UpdatePortReq) (*openstack.UpdatePortResp, error) {
|
||||
l := logic.NewUpdatePortLogic(ctx, s.svcCtx)
|
||||
return l.UpdatePort(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ShowPortDetails(ctx context.Context, in *openstack.ShowPortDetailsReq) (*openstack.ShowPortDetailsResp, error) {
|
||||
l := logic.NewShowPortDetailsLogic(ctx, s.svcCtx)
|
||||
return l.ShowPortDetails(in)
|
||||
}
|
||||
|
||||
// 路由
|
||||
func (s *OpenstackServer) CreateRouter(ctx context.Context, in *openstack.CreateRouterReq) (*openstack.CreateRouterResp, error) {
|
||||
l := logic.NewCreateRouterLogic(ctx, s.svcCtx)
|
||||
return l.CreateRouter(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ListRouters(ctx context.Context, in *openstack.ListRoutersReq) (*openstack.ListRoutersResp, error) {
|
||||
l := logic.NewListRoutersLogic(ctx, s.svcCtx)
|
||||
return l.ListRouters(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ShowRouterDetails(ctx context.Context, in *openstack.ShowRouterDetailsReq) (*openstack.ShowRouterDetailsResp, error) {
|
||||
l := logic.NewShowRouterDetailsLogic(ctx, s.svcCtx)
|
||||
return l.ShowRouterDetails(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) UpdateRouter(ctx context.Context, in *openstack.UpdateRouterReq) (*openstack.UpdateRouterResp, error) {
|
||||
l := logic.NewUpdateRouterLogic(ctx, s.svcCtx)
|
||||
return l.UpdateRouter(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) DeleteRouter(ctx context.Context, in *openstack.DeleteRouterReq) (*openstack.DeleteRouterResp, error) {
|
||||
l := logic.NewDeleteRouterLogic(ctx, s.svcCtx)
|
||||
return l.DeleteRouter(in)
|
||||
}
|
||||
|
||||
// 浮动IP
|
||||
func (s *OpenstackServer) ListFloatingIPs(ctx context.Context, in *openstack.ListFloatingIPsReq) (*openstack.ListFloatingIPsResp, error) {
|
||||
l := logic.NewListFloatingIPsLogic(ctx, s.svcCtx)
|
||||
return l.ListFloatingIPs(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) CreateFloatingIP(ctx context.Context, in *openstack.CreateFloatingIPReq) (*openstack.CreateFloatingIPResp, error) {
|
||||
l := logic.NewCreateFloatingIPLogic(ctx, s.svcCtx)
|
||||
return l.CreateFloatingIP(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) UpdateFloatingIP(ctx context.Context, in *openstack.UpdateFloatingIPReq) (*openstack.UpdateFloatingIPResp, error) {
|
||||
l := logic.NewUpdateFloatingIPLogic(ctx, s.svcCtx)
|
||||
return l.UpdateFloatingIP(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) DeleteFloatingIP(ctx context.Context, in *openstack.DeleteFloatingIPReq) (*openstack.DeleteFloatingIPResp, error) {
|
||||
l := logic.NewDeleteFloatingIPLogic(ctx, s.svcCtx)
|
||||
return l.DeleteFloatingIP(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ShowFloatingIPDetails(ctx context.Context, in *openstack.ShowFloatingIPDetailsReq) (*openstack.ShowFloatingIPDetailsResp, error) {
|
||||
l := logic.NewShowFloatingIPDetailsLogic(ctx, s.svcCtx)
|
||||
return l.ShowFloatingIPDetails(in)
|
||||
}
|
||||
|
||||
// 防火墙
|
||||
func (s *OpenstackServer) ListFirewallGroups(ctx context.Context, in *openstack.ListFirewallGroupsReq) (*openstack.ListFirewallGroupsResp, error) {
|
||||
l := logic.NewListFirewallGroupsLogic(ctx, s.svcCtx)
|
||||
return l.ListFirewallGroups(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) DeleteFirewallGroup(ctx context.Context, in *openstack.DeleteFirewallGroupReq) (*openstack.DeleteFirewallGroupResp, error) {
|
||||
l := logic.NewDeleteFirewallGroupLogic(ctx, s.svcCtx)
|
||||
return l.DeleteFirewallGroup(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) CreateFirewallGroup(ctx context.Context, in *openstack.CreateFirewallGroupReq) (*openstack.CreateFirewallGroupResp, error) {
|
||||
l := logic.NewCreateFirewallGroupLogic(ctx, s.svcCtx)
|
||||
return l.CreateFirewallGroup(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) UpdateFirewallGroup(ctx context.Context, in *openstack.UpdateFirewallGroupReq) (*openstack.UpdateFirewallGroupResp, error) {
|
||||
l := logic.NewUpdateFirewallGroupLogic(ctx, s.svcCtx)
|
||||
return l.UpdateFirewallGroup(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ShowFirewallGroupDetails(ctx context.Context, in *openstack.ShowFirewallGroupDetailsReq) (*openstack.ShowFirewallGroupDetailsResp, error) {
|
||||
l := logic.NewShowFirewallGroupDetailsLogic(ctx, s.svcCtx)
|
||||
return l.ShowFirewallGroupDetails(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) CreateFirewallPolicy(ctx context.Context, in *openstack.CreateFirewallPolicyReq) (*openstack.CreateFirewallPolicyResp, error) {
|
||||
l := logic.NewCreateFirewallPolicyLogic(ctx, s.svcCtx)
|
||||
return l.CreateFirewallPolicy(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) DeleteFirewallPolicy(ctx context.Context, in *openstack.DeleteFirewallPolicyReq) (*openstack.DeleteFirewallPolicyResp, error) {
|
||||
l := logic.NewDeleteFirewallPolicyLogic(ctx, s.svcCtx)
|
||||
return l.DeleteFirewallPolicy(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ListFirewallPolicies(ctx context.Context, in *openstack.ListFirewallPoliciesReq) (*openstack.ListFirewallPoliciesResp, error) {
|
||||
l := logic.NewListFirewallPoliciesLogic(ctx, s.svcCtx)
|
||||
return l.ListFirewallPolicies(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ShowFirewallPolicyDetails(ctx context.Context, in *openstack.ShowFirewallPolicyDetailsReq) (*openstack.ShowFirewallPolicyDetailsResp, error) {
|
||||
l := logic.NewShowFirewallPolicyDetailsLogic(ctx, s.svcCtx)
|
||||
return l.ShowFirewallPolicyDetails(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) CreateFirewallRule(ctx context.Context, in *openstack.CreateFirewallRuleReq) (*openstack.CreateFirewallRuleResp, error) {
|
||||
l := logic.NewCreateFirewallRuleLogic(ctx, s.svcCtx)
|
||||
return l.CreateFirewallRule(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) DeleteFirewallRule(ctx context.Context, in *openstack.DeleteFirewallRuleReq) (*openstack.DeleteFirewallRuleResp, error) {
|
||||
l := logic.NewDeleteFirewallRuleLogic(ctx, s.svcCtx)
|
||||
return l.DeleteFirewallRule(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ListFirewallRules(ctx context.Context, in *openstack.ListFirewallRulesReq) (*openstack.ListFirewallRulesResp, error) {
|
||||
l := logic.NewListFirewallRulesLogic(ctx, s.svcCtx)
|
||||
return l.ListFirewallRules(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ShowFirewallRuleDetails(ctx context.Context, in *openstack.ShowFirewallRuleDetailsReq) (*openstack.ShowFirewallRuleDetailsResp, error) {
|
||||
l := logic.NewShowFirewallRuleDetailsLogic(ctx, s.svcCtx)
|
||||
return l.ShowFirewallRuleDetails(in)
|
||||
}
|
||||
|
||||
// 安全组
|
||||
func (s *OpenstackServer) ListSecurityGroups(ctx context.Context, in *openstack.ListSecurityGroupsReq) (*openstack.ListSecurityGroupsResp, error) {
|
||||
l := logic.NewListSecurityGroupsLogic(ctx, s.svcCtx)
|
||||
return l.ListSecurityGroups(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) CreateSecurityGroup(ctx context.Context, in *openstack.CreateSecurityGroupReq) (*openstack.CreateSecurityGroupResp, error) {
|
||||
l := logic.NewCreateSecurityGroupLogic(ctx, s.svcCtx)
|
||||
return l.CreateSecurityGroup(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) DeleteSecurityGroup(ctx context.Context, in *openstack.DeleteSecurityGroupReq) (*openstack.DeleteSecurityGroupResp, error) {
|
||||
l := logic.NewDeleteSecurityGroupLogic(ctx, s.svcCtx)
|
||||
return l.DeleteSecurityGroup(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) UpdateSecurityGroup(ctx context.Context, in *openstack.UpdateSecurityGroupReq) (*openstack.UpdateSecurityGroupResp, error) {
|
||||
l := logic.NewUpdateSecurityGroupLogic(ctx, s.svcCtx)
|
||||
return l.UpdateSecurityGroup(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ShowSecurityGroup(ctx context.Context, in *openstack.ShowSecurityGroupReq) (*openstack.ShowSecurityGroupResp, error) {
|
||||
l := logic.NewShowSecurityGroupLogic(ctx, s.svcCtx)
|
||||
return l.ShowSecurityGroup(in)
|
||||
}
|
||||
|
||||
// 安全组规则
|
||||
func (s *OpenstackServer) ListSecurityGroupRules(ctx context.Context, in *openstack.ListSecurityGroupRulesReq) (*openstack.ListSecurityGroupRulesResp, error) {
|
||||
l := logic.NewListSecurityGroupRulesLogic(ctx, s.svcCtx)
|
||||
return l.ListSecurityGroupRules(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) CreateSecurityGroupRule(ctx context.Context, in *openstack.CreateSecurityGroupRuleReq) (*openstack.CreateSecurityGroupRuleResp, error) {
|
||||
l := logic.NewCreateSecurityGroupRuleLogic(ctx, s.svcCtx)
|
||||
return l.CreateSecurityGroupRule(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) ShowSecurityGroupRule(ctx context.Context, in *openstack.ShowSecurityGroupRuleReq) (*openstack.ShowSecurityGroupRuleResp, error) {
|
||||
l := logic.NewShowSecurityGroupRuleLogic(ctx, s.svcCtx)
|
||||
return l.ShowSecurityGroupRule(in)
|
||||
}
|
||||
|
||||
func (s *OpenstackServer) DeleteSecurityGroupRule(ctx context.Context, in *openstack.DeleteSecurityGroupRuleReq) (*openstack.DeleteSecurityGroupRuleResp, error) {
|
||||
l := logic.NewDeleteSecurityGroupRuleLogic(ctx, s.svcCtx)
|
||||
return l.DeleteSecurityGroupRule(in)
|
||||
}
|
||||
|
||||
// Images from glance
|
||||
func (s *OpenstackServer) CreateImage(ctx context.Context, in *openstack.CreateImageReq) (*openstack.CreateImageResp, error) {
|
||||
l := logic.NewCreateImageLogic(ctx, s.svcCtx)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -13,15 +13,50 @@ import (
|
|||
)
|
||||
|
||||
type (
|
||||
AddSecurityGroupToServerReq = openstack.AddSecurityGroupToServerReq
|
||||
AddSecurityGroupToServerReq_AddSecurityGroup = openstack.AddSecurityGroupToServerReq_AddSecurityGroup
|
||||
AddSecurityGroupToServerResp = openstack.AddSecurityGroupToServerResp
|
||||
AllocationPools = openstack.AllocationPools
|
||||
BulkCreateNetworksReq = openstack.BulkCreateNetworksReq
|
||||
BulkCreateNetworksResp = openstack.BulkCreateNetworksResp
|
||||
ChangeAdministrativePasswordReq = openstack.ChangeAdministrativePasswordReq
|
||||
ChangeAdministrativePasswordReq_Changepassword = openstack.ChangeAdministrativePasswordReq_Changepassword
|
||||
ChangeAdministrativePasswordResp = openstack.ChangeAdministrativePasswordResp
|
||||
CreateFirewallGroupReq = openstack.CreateFirewallGroupReq
|
||||
CreateFirewallGroupReq_FirewallGroup = openstack.CreateFirewallGroupReq_FirewallGroup
|
||||
CreateFirewallGroupResp = openstack.CreateFirewallGroupResp
|
||||
CreateFirewallGroupResp_FirewallGroup = openstack.CreateFirewallGroupResp_FirewallGroup
|
||||
CreateFirewallPolicyReq = openstack.CreateFirewallPolicyReq
|
||||
CreateFirewallPolicyReq_FirewallPolicy = openstack.CreateFirewallPolicyReq_FirewallPolicy
|
||||
CreateFirewallPolicyResp = openstack.CreateFirewallPolicyResp
|
||||
CreateFirewallPolicyResp_FirewallPolicy = openstack.CreateFirewallPolicyResp_FirewallPolicy
|
||||
CreateFirewallRuleReq = openstack.CreateFirewallRuleReq
|
||||
CreateFirewallRuleReq_FirewallRule = openstack.CreateFirewallRuleReq_FirewallRule
|
||||
CreateFirewallRuleResp = openstack.CreateFirewallRuleResp
|
||||
CreateFirewallRuleResp_FirewallRule = openstack.CreateFirewallRuleResp_FirewallRule
|
||||
CreateFlavorReq = openstack.CreateFlavorReq
|
||||
CreateFlavorReq_Flavor = openstack.CreateFlavorReq_Flavor
|
||||
CreateFlavorResp = openstack.CreateFlavorResp
|
||||
CreateFlavorResp_ExtraSpecs = openstack.CreateFlavorResp_ExtraSpecs
|
||||
CreateFlavorResp_Flavor = openstack.CreateFlavorResp_Flavor
|
||||
CreateFlavorResp_Links = openstack.CreateFlavorResp_Links
|
||||
CreateFloatingIPReq = openstack.CreateFloatingIPReq
|
||||
CreateFloatingIPReq_Floatingip = openstack.CreateFloatingIPReq_Floatingip
|
||||
CreateFloatingIPResp = openstack.CreateFloatingIPResp
|
||||
CreateFloatingIPResp_Floatingip = openstack.CreateFloatingIPResp_Floatingip
|
||||
CreateFloatingIPResp_PortDetails = openstack.CreateFloatingIPResp_PortDetails
|
||||
CreateFloatingIPResp_PortForwardings = openstack.CreateFloatingIPResp_PortForwardings
|
||||
CreateImageReq = openstack.CreateImageReq
|
||||
CreateImageResp = openstack.CreateImageResp
|
||||
CreateImageResp_Locations = openstack.CreateImageResp_Locations
|
||||
CreateImageResp_Tags = openstack.CreateImageResp_Tags
|
||||
CreateNetworkReq = openstack.CreateNetworkReq
|
||||
CreateNetworkResp = openstack.CreateNetworkResp
|
||||
CreateNetworkSegmentRangeReq = openstack.CreateNetworkSegmentRangeReq
|
||||
CreateNetworkSegmentRangeReq_NetworkSegmentRange = openstack.CreateNetworkSegmentRangeReq_NetworkSegmentRange
|
||||
CreateNetworkSegmentRangeResp = openstack.CreateNetworkSegmentRangeResp
|
||||
CreateNetworkSegmentRangeResp_NetworkSegmentRange = openstack.CreateNetworkSegmentRangeResp_NetworkSegmentRange
|
||||
CreateNetworkSegmentRangeResp_Used = openstack.CreateNetworkSegmentRangeResp_Used
|
||||
CreateNodeReq = openstack.CreateNodeReq
|
||||
CreateNodeReq_DriverInfo = openstack.CreateNodeReq_DriverInfo
|
||||
CreateNodeReq_InstanceInfo = openstack.CreateNodeReq_InstanceInfo
|
||||
|
@ -43,6 +78,35 @@ type (
|
|||
CreateNodeResp_States = openstack.CreateNodeResp_States
|
||||
CreateNodeResp_TargetRaidConfig = openstack.CreateNodeResp_TargetRaidConfig
|
||||
CreateNodeResp_Volume = openstack.CreateNodeResp_Volume
|
||||
CreatePortReq = openstack.CreatePortReq
|
||||
CreatePortReq_AllowedAddressPairs = openstack.CreatePortReq_AllowedAddressPairs
|
||||
CreatePortReq_Port = openstack.CreatePortReq_Port
|
||||
CreatePortResp = openstack.CreatePortResp
|
||||
CreatePortResp_AllowedAddressPairs = openstack.CreatePortResp_AllowedAddressPairs
|
||||
CreatePortResp_DnsAssignment = openstack.CreatePortResp_DnsAssignment
|
||||
CreatePortResp_ExtraDhcpOpts = openstack.CreatePortResp_ExtraDhcpOpts
|
||||
CreatePortResp_FixedIps = openstack.CreatePortResp_FixedIps
|
||||
CreatePortResp_Port = openstack.CreatePortResp_Port
|
||||
CreateRouterReq = openstack.CreateRouterReq
|
||||
CreateRouterReq_ExternalFixedIps = openstack.CreateRouterReq_ExternalFixedIps
|
||||
CreateRouterReq_ExternalGatewayInfo = openstack.CreateRouterReq_ExternalGatewayInfo
|
||||
CreateRouterReq_Router = openstack.CreateRouterReq_Router
|
||||
CreateRouterResp = openstack.CreateRouterResp
|
||||
CreateRouterResp_AvailabilityZoneHints = openstack.CreateRouterResp_AvailabilityZoneHints
|
||||
CreateRouterResp_ConntrackHelpers = openstack.CreateRouterResp_ConntrackHelpers
|
||||
CreateRouterResp_ExternalFixedIps = openstack.CreateRouterResp_ExternalFixedIps
|
||||
CreateRouterResp_ExternalGatewayInfo = openstack.CreateRouterResp_ExternalGatewayInfo
|
||||
CreateRouterResp_Router = openstack.CreateRouterResp_Router
|
||||
CreateRouterResp_Routers = openstack.CreateRouterResp_Routers
|
||||
CreateSecurityGroupReq = openstack.CreateSecurityGroupReq
|
||||
CreateSecurityGroupReq_SecurityGroup = openstack.CreateSecurityGroupReq_SecurityGroup
|
||||
CreateSecurityGroupResp = openstack.CreateSecurityGroupResp
|
||||
CreateSecurityGroupResp_SecurityGroup = openstack.CreateSecurityGroupResp_SecurityGroup
|
||||
CreateSecurityGroupResp_SecurityGroupRules = openstack.CreateSecurityGroupResp_SecurityGroupRules
|
||||
CreateSecurityGroupRuleReq = openstack.CreateSecurityGroupRuleReq
|
||||
CreateSecurityGroupRuleReq_SecurityGroupRule = openstack.CreateSecurityGroupRuleReq_SecurityGroupRule
|
||||
CreateSecurityGroupRuleResp = openstack.CreateSecurityGroupRuleResp
|
||||
CreateSecurityGroupRuleResp_SecurityGroupRule = openstack.CreateSecurityGroupRuleResp_SecurityGroupRule
|
||||
CreateServerReq = openstack.CreateServerReq
|
||||
CreateServerReq_BlockDeviceMappingV2 = openstack.CreateServerReq_BlockDeviceMappingV2
|
||||
CreateServerReq_Metadata = openstack.CreateServerReq_Metadata
|
||||
|
@ -71,14 +135,37 @@ type (
|
|||
CreateVolumeTypeResp = openstack.CreateVolumeTypeResp
|
||||
CreateVolumeTypeResp_ExtraSpecs = openstack.CreateVolumeTypeResp_ExtraSpecs
|
||||
CreateVolumeTypeResp_VolumeType = openstack.CreateVolumeTypeResp_VolumeType
|
||||
DeleteFirewallGroupReq = openstack.DeleteFirewallGroupReq
|
||||
DeleteFirewallGroupResp = openstack.DeleteFirewallGroupResp
|
||||
DeleteFirewallPolicyReq = openstack.DeleteFirewallPolicyReq
|
||||
DeleteFirewallPolicyResp = openstack.DeleteFirewallPolicyResp
|
||||
DeleteFirewallRuleReq = openstack.DeleteFirewallRuleReq
|
||||
DeleteFirewallRuleResp = openstack.DeleteFirewallRuleResp
|
||||
DeleteFlavorReq = openstack.DeleteFlavorReq
|
||||
DeleteFlavorResp = openstack.DeleteFlavorResp
|
||||
DeleteFloatingIPReq = openstack.DeleteFloatingIPReq
|
||||
DeleteFloatingIPResp = openstack.DeleteFloatingIPResp
|
||||
DeleteImageReq = openstack.DeleteImageReq
|
||||
DeleteImageResp = openstack.DeleteImageResp
|
||||
DeleteNetworkReq = openstack.DeleteNetworkReq
|
||||
DeleteNetworkResp = openstack.DeleteNetworkResp
|
||||
DeleteNetworkSegmentRangesReq = openstack.DeleteNetworkSegmentRangesReq
|
||||
DeleteNetworkSegmentRangesResp = openstack.DeleteNetworkSegmentRangesResp
|
||||
DeleteNodeReq = openstack.DeleteNodeReq
|
||||
DeleteNodeResp = openstack.DeleteNodeResp
|
||||
DeletePortReq = openstack.DeletePortReq
|
||||
DeletePortResp = openstack.DeletePortResp
|
||||
DeleteRouterReq = openstack.DeleteRouterReq
|
||||
DeleteRouterResp = openstack.DeleteRouterResp
|
||||
DeleteSecurityGroupReq = openstack.DeleteSecurityGroupReq
|
||||
DeleteSecurityGroupResp = openstack.DeleteSecurityGroupResp
|
||||
DeleteSecurityGroupRuleReq = openstack.DeleteSecurityGroupRuleReq
|
||||
DeleteSecurityGroupRuleResp = openstack.DeleteSecurityGroupRuleResp
|
||||
DeleteSecurityGroupRuleResp_SecurityGroupRule = openstack.DeleteSecurityGroupRuleResp_SecurityGroupRule
|
||||
DeleteServerReq = openstack.DeleteServerReq
|
||||
DeleteServerResp = openstack.DeleteServerResp
|
||||
DeleteSubnetReq = openstack.DeleteSubnetReq
|
||||
DeleteSubnetResp = openstack.DeleteSubnetResp
|
||||
DeleteVolumeReq = openstack.DeleteVolumeReq
|
||||
DeleteVolumeResp = openstack.DeleteVolumeResp
|
||||
DeleteVolumeTypeReq = openstack.DeleteVolumeTypeReq
|
||||
|
@ -113,21 +200,62 @@ type (
|
|||
GetVolumeLimitsResp_Absolute = openstack.GetVolumeLimitsResp_Absolute
|
||||
GetVolumeLimitsResp_Limits = openstack.GetVolumeLimitsResp_Limits
|
||||
GetVolumeLimitsResp_Rate = openstack.GetVolumeLimitsResp_Rate
|
||||
ListFirewallGroupsReq = openstack.ListFirewallGroupsReq
|
||||
ListFirewallGroupsResp = openstack.ListFirewallGroupsResp
|
||||
ListFirewallGroupsResp_FirewallGroups = openstack.ListFirewallGroupsResp_FirewallGroups
|
||||
ListFirewallPoliciesReq = openstack.ListFirewallPoliciesReq
|
||||
ListFirewallPoliciesResp = openstack.ListFirewallPoliciesResp
|
||||
ListFirewallPoliciesResp_FirewallPolicies = openstack.ListFirewallPoliciesResp_FirewallPolicies
|
||||
ListFirewallRulesReq = openstack.ListFirewallRulesReq
|
||||
ListFirewallRulesResp = openstack.ListFirewallRulesResp
|
||||
ListFirewallRulesResp_FirewallRules = openstack.ListFirewallRulesResp_FirewallRules
|
||||
ListFlavorsDetailReq = openstack.ListFlavorsDetailReq
|
||||
ListFlavorsDetailResp = openstack.ListFlavorsDetailResp
|
||||
ListFlavorsDetailResp_ExtraSpecs = openstack.ListFlavorsDetailResp_ExtraSpecs
|
||||
ListFlavorsDetailResp_Flavor = openstack.ListFlavorsDetailResp_Flavor
|
||||
ListFlavorsDetailResp_Links = openstack.ListFlavorsDetailResp_Links
|
||||
ListFloatingIPsReq = openstack.ListFloatingIPsReq
|
||||
ListFloatingIPsResp = openstack.ListFloatingIPsResp
|
||||
ListFloatingIPsResp_Floatingips = openstack.ListFloatingIPsResp_Floatingips
|
||||
ListFloatingIPsResp_PortDetails = openstack.ListFloatingIPsResp_PortDetails
|
||||
ListFloatingIPsResp_PortForwardings = openstack.ListFloatingIPsResp_PortForwardings
|
||||
ListImagesReq = openstack.ListImagesReq
|
||||
ListImagesResp = openstack.ListImagesResp
|
||||
ListImagesResp_Images = openstack.ListImagesResp_Images
|
||||
ListImagesResp_Tags = openstack.ListImagesResp_Tags
|
||||
ListNetworkSegmentRangesReq = openstack.ListNetworkSegmentRangesReq
|
||||
ListNetworkSegmentRangesResp = openstack.ListNetworkSegmentRangesResp
|
||||
ListNetworkSegmentRangesResp_NetworkSegmentRanges = openstack.ListNetworkSegmentRangesResp_NetworkSegmentRanges
|
||||
ListNetworkSegmentRangesResp_Used = openstack.ListNetworkSegmentRangesResp_Used
|
||||
ListNetworksReq = openstack.ListNetworksReq
|
||||
ListNetworksResp = openstack.ListNetworksResp
|
||||
ListNodesReq = openstack.ListNodesReq
|
||||
ListNodesResp = openstack.ListNodesResp
|
||||
ListNodesResp_Links = openstack.ListNodesResp_Links
|
||||
ListNodesResp_Nodes = openstack.ListNodesResp_Nodes
|
||||
ListPortsReq = openstack.ListPortsReq
|
||||
ListPortsResp = openstack.ListPortsResp
|
||||
ListPortsResp_AllowedAddressPairs = openstack.ListPortsResp_AllowedAddressPairs
|
||||
ListPortsResp_DnsAssignment = openstack.ListPortsResp_DnsAssignment
|
||||
ListPortsResp_ExtraDhcpOpts = openstack.ListPortsResp_ExtraDhcpOpts
|
||||
ListPortsResp_FixedIps = openstack.ListPortsResp_FixedIps
|
||||
ListPortsResp_Ports = openstack.ListPortsResp_Ports
|
||||
ListPortsResp_SecurityGroups = openstack.ListPortsResp_SecurityGroups
|
||||
ListRoutersReq = openstack.ListRoutersReq
|
||||
ListRoutersResp = openstack.ListRoutersResp
|
||||
ListRoutersResp_AvailabilityZoneHints = openstack.ListRoutersResp_AvailabilityZoneHints
|
||||
ListRoutersResp_ConntrackHelpers = openstack.ListRoutersResp_ConntrackHelpers
|
||||
ListRoutersResp_ExternalFixedIps = openstack.ListRoutersResp_ExternalFixedIps
|
||||
ListRoutersResp_ExternalGatewayInfo = openstack.ListRoutersResp_ExternalGatewayInfo
|
||||
ListRoutersResp_Routers = openstack.ListRoutersResp_Routers
|
||||
ListRoutersResp_Routes = openstack.ListRoutersResp_Routes
|
||||
ListSecurityGroupRulesReq = openstack.ListSecurityGroupRulesReq
|
||||
ListSecurityGroupRulesResp = openstack.ListSecurityGroupRulesResp
|
||||
ListSecurityGroupRulesResp_SecurityGroupRules = openstack.ListSecurityGroupRulesResp_SecurityGroupRules
|
||||
ListSecurityGroupsReq = openstack.ListSecurityGroupsReq
|
||||
ListSecurityGroupsResp = openstack.ListSecurityGroupsResp
|
||||
ListSecurityGroupsResp_SecurityGroupRules = openstack.ListSecurityGroupsResp_SecurityGroupRules
|
||||
ListSecurityGroupsResp_SecurityGroups = openstack.ListSecurityGroupsResp_SecurityGroups
|
||||
ListServersDetailedReq = openstack.ListServersDetailedReq
|
||||
ListServersDetailedResp = openstack.ListServersDetailedResp
|
||||
ListServersDetailedResp_Addresses = openstack.ListServersDetailedResp_Addresses
|
||||
|
@ -145,6 +273,10 @@ type (
|
|||
ListServersResp_Links = openstack.ListServersResp_Links
|
||||
ListServersResp_Servers = openstack.ListServersResp_Servers
|
||||
ListServersResp_ServersLinks = openstack.ListServersResp_ServersLinks
|
||||
ListSubnetsReq = openstack.ListSubnetsReq
|
||||
ListSubnetsResp = openstack.ListSubnetsResp
|
||||
ListSubnetsResp_AllocationPools = openstack.ListSubnetsResp_AllocationPools
|
||||
ListSubnetsResp_Subnets = openstack.ListSubnetsResp_Subnets
|
||||
ListVolumeTypesReq = openstack.ListVolumeTypesReq
|
||||
ListVolumeTypesResp = openstack.ListVolumeTypesResp
|
||||
ListVolumeTypesResp_ExtraSpecs = openstack.ListVolumeTypesResp_ExtraSpecs
|
||||
|
@ -186,13 +318,39 @@ type (
|
|||
RebuildServerResp_Private = openstack.RebuildServerResp_Private
|
||||
RebuildServerResp_SecurityGroups = openstack.RebuildServerResp_SecurityGroups
|
||||
RebuildServerResp_Servers = openstack.RebuildServerResp_Servers
|
||||
RemoveSecurityGroupReq = openstack.RemoveSecurityGroupReq
|
||||
RemoveSecurityGroupReq_RemoveSecurityGroup = openstack.RemoveSecurityGroupReq_RemoveSecurityGroup
|
||||
RemoveSecurityGroupResp = openstack.RemoveSecurityGroupResp
|
||||
RescueServerReq = openstack.RescueServerReq
|
||||
RescueServerReq_Rescue = openstack.RescueServerReq_Rescue
|
||||
RescueServerResp = openstack.RescueServerResp
|
||||
ResizeServerReq = openstack.ResizeServerReq
|
||||
ResizeServerReq_Resize = openstack.ResizeServerReq_Resize
|
||||
ResizeServerResp = openstack.ResizeServerResp
|
||||
Server = openstack.Server
|
||||
ServerUpdate = openstack.ServerUpdate
|
||||
ShelveServerReq = openstack.ShelveServerReq
|
||||
ShelveServerResp = openstack.ShelveServerResp
|
||||
ShowFirewallGroupDetailsReq = openstack.ShowFirewallGroupDetailsReq
|
||||
ShowFirewallGroupDetailsResp = openstack.ShowFirewallGroupDetailsResp
|
||||
ShowFirewallGroupDetailsResp_FirewallGroup = openstack.ShowFirewallGroupDetailsResp_FirewallGroup
|
||||
ShowFirewallPolicyDetailsReq = openstack.ShowFirewallPolicyDetailsReq
|
||||
ShowFirewallPolicyDetailsResp = openstack.ShowFirewallPolicyDetailsResp
|
||||
ShowFirewallPolicyDetailsResp_FirewallPolicy = openstack.ShowFirewallPolicyDetailsResp_FirewallPolicy
|
||||
ShowFirewallRuleDetailsReq = openstack.ShowFirewallRuleDetailsReq
|
||||
ShowFirewallRuleDetailsResp = openstack.ShowFirewallRuleDetailsResp
|
||||
ShowFirewallRuleDetailsResp_FirewallRule = openstack.ShowFirewallRuleDetailsResp_FirewallRule
|
||||
ShowFloatingIPDetailsReq = openstack.ShowFloatingIPDetailsReq
|
||||
ShowFloatingIPDetailsResp = openstack.ShowFloatingIPDetailsResp
|
||||
ShowFloatingIPDetailsResp_Floatingip = openstack.ShowFloatingIPDetailsResp_Floatingip
|
||||
ShowFloatingIPDetailsResp_PortDetails = openstack.ShowFloatingIPDetailsResp_PortDetails
|
||||
ShowFloatingIPDetailsResp_PortForwardings = openstack.ShowFloatingIPDetailsResp_PortForwardings
|
||||
ShowNetworkDetailsReq = openstack.ShowNetworkDetailsReq
|
||||
ShowNetworkDetailsResp = openstack.ShowNetworkDetailsResp
|
||||
ShowNetworkSegmentRangeDetailsReq = openstack.ShowNetworkSegmentRangeDetailsReq
|
||||
ShowNetworkSegmentRangeDetailsResp = openstack.ShowNetworkSegmentRangeDetailsResp
|
||||
ShowNetworkSegmentRangeDetailsResp_NetworkSegmentRange = openstack.ShowNetworkSegmentRangeDetailsResp_NetworkSegmentRange
|
||||
ShowNetworkSegmentRangeDetailsResp_Used = openstack.ShowNetworkSegmentRangeDetailsResp_Used
|
||||
ShowNodeDetailsReq = openstack.ShowNodeDetailsReq
|
||||
ShowNodeDetailsReq_Fields = openstack.ShowNodeDetailsReq_Fields
|
||||
ShowNodeDetailsResp = openstack.ShowNodeDetailsResp
|
||||
|
@ -212,15 +370,95 @@ type (
|
|||
ShowNodeDetailsResp_TargetRaidConfig = openstack.ShowNodeDetailsResp_TargetRaidConfig
|
||||
ShowNodeDetailsResp_Traits = openstack.ShowNodeDetailsResp_Traits
|
||||
ShowNodeDetailsResp_Volume = openstack.ShowNodeDetailsResp_Volume
|
||||
ShowPortDetailsReq = openstack.ShowPortDetailsReq
|
||||
ShowPortDetailsResp = openstack.ShowPortDetailsResp
|
||||
ShowPortDetailsResp_AllowedAddressPairs = openstack.ShowPortDetailsResp_AllowedAddressPairs
|
||||
ShowPortDetailsResp_DnsAssignment = openstack.ShowPortDetailsResp_DnsAssignment
|
||||
ShowPortDetailsResp_ExtraDhcpOpts = openstack.ShowPortDetailsResp_ExtraDhcpOpts
|
||||
ShowPortDetailsResp_FixedIps = openstack.ShowPortDetailsResp_FixedIps
|
||||
ShowPortDetailsResp_Port = openstack.ShowPortDetailsResp_Port
|
||||
ShowPortDetailsResp_SecurityGroups = openstack.ShowPortDetailsResp_SecurityGroups
|
||||
ShowRouterDetailsReq = openstack.ShowRouterDetailsReq
|
||||
ShowRouterDetailsReq_ExternalFixedIps = openstack.ShowRouterDetailsReq_ExternalFixedIps
|
||||
ShowRouterDetailsReq_ExternalGatewayInfo = openstack.ShowRouterDetailsReq_ExternalGatewayInfo
|
||||
ShowRouterDetailsReq_Router = openstack.ShowRouterDetailsReq_Router
|
||||
ShowRouterDetailsReq_Routes = openstack.ShowRouterDetailsReq_Routes
|
||||
ShowRouterDetailsResp = openstack.ShowRouterDetailsResp
|
||||
ShowRouterDetailsResp_AvailabilityZoneHints = openstack.ShowRouterDetailsResp_AvailabilityZoneHints
|
||||
ShowRouterDetailsResp_ConntrackHelpers = openstack.ShowRouterDetailsResp_ConntrackHelpers
|
||||
ShowRouterDetailsResp_ExternalFixedIps = openstack.ShowRouterDetailsResp_ExternalFixedIps
|
||||
ShowRouterDetailsResp_ExternalGatewayInfo = openstack.ShowRouterDetailsResp_ExternalGatewayInfo
|
||||
ShowRouterDetailsResp_Router = openstack.ShowRouterDetailsResp_Router
|
||||
ShowRouterDetailsResp_Routes = openstack.ShowRouterDetailsResp_Routes
|
||||
ShowSecurityGroupReq = openstack.ShowSecurityGroupReq
|
||||
ShowSecurityGroupResp = openstack.ShowSecurityGroupResp
|
||||
ShowSecurityGroupResp_SecurityGroup = openstack.ShowSecurityGroupResp_SecurityGroup
|
||||
ShowSecurityGroupResp_SecurityGroupRules = openstack.ShowSecurityGroupResp_SecurityGroupRules
|
||||
ShowSecurityGroupRuleReq = openstack.ShowSecurityGroupRuleReq
|
||||
ShowSecurityGroupRuleResp = openstack.ShowSecurityGroupRuleResp
|
||||
StartServerReq = openstack.StartServerReq
|
||||
StartServerResp = openstack.StartServerResp
|
||||
StopServerReq = openstack.StopServerReq
|
||||
StopServerResp = openstack.StopServerResp
|
||||
Subnet = openstack.Subnet
|
||||
SubnetResp = openstack.SubnetResp
|
||||
SuspendServerReq = openstack.SuspendServerReq
|
||||
SuspendServerResp = openstack.SuspendServerResp
|
||||
Tags = openstack.Tags
|
||||
UnRescueServerReq = openstack.UnRescueServerReq
|
||||
UnRescueServerResp = openstack.UnRescueServerResp
|
||||
UnpauseServerReq = openstack.UnpauseServerReq
|
||||
UnpauseServerResp = openstack.UnpauseServerResp
|
||||
UnshelveServerReq = openstack.UnshelveServerReq
|
||||
UnshelveServerResp = openstack.UnshelveServerResp
|
||||
UpdateFirewallGroupReq = openstack.UpdateFirewallGroupReq
|
||||
UpdateFirewallGroupReq_FirewallGroup = openstack.UpdateFirewallGroupReq_FirewallGroup
|
||||
UpdateFirewallGroupResp = openstack.UpdateFirewallGroupResp
|
||||
UpdateFirewallGroupResp_FirewallGroup = openstack.UpdateFirewallGroupResp_FirewallGroup
|
||||
UpdateFloatingIPReq = openstack.UpdateFloatingIPReq
|
||||
UpdateFloatingIPReq_Floatingip = openstack.UpdateFloatingIPReq_Floatingip
|
||||
UpdateFloatingIPResp = openstack.UpdateFloatingIPResp
|
||||
UpdateFloatingIPResp_Floatingip = openstack.UpdateFloatingIPResp_Floatingip
|
||||
UpdateFloatingIPResp_PortDetails = openstack.UpdateFloatingIPResp_PortDetails
|
||||
UpdateFloatingIPResp_PortForwardings = openstack.UpdateFloatingIPResp_PortForwardings
|
||||
UpdateNetworkReq = openstack.UpdateNetworkReq
|
||||
UpdateNetworkResp = openstack.UpdateNetworkResp
|
||||
UpdateNetworkSegmentRangesReq = openstack.UpdateNetworkSegmentRangesReq
|
||||
UpdateNetworkSegmentRangesReq_NetworkSegmentRanges = openstack.UpdateNetworkSegmentRangesReq_NetworkSegmentRanges
|
||||
UpdateNetworkSegmentRangesReq_Used = openstack.UpdateNetworkSegmentRangesReq_Used
|
||||
UpdateNetworkSegmentRangesResp = openstack.UpdateNetworkSegmentRangesResp
|
||||
UpdateNetworkSegmentRangesResp_NetworkSegmentRange = openstack.UpdateNetworkSegmentRangesResp_NetworkSegmentRange
|
||||
UpdateNetworkSegmentRangesResp_Used = openstack.UpdateNetworkSegmentRangesResp_Used
|
||||
UpdatePortReq = openstack.UpdatePortReq
|
||||
UpdatePortReq_AllowedAddressPairs = openstack.UpdatePortReq_AllowedAddressPairs
|
||||
UpdatePortReq_DnsAssignment = openstack.UpdatePortReq_DnsAssignment
|
||||
UpdatePortReq_ExtraDhcpOpts = openstack.UpdatePortReq_ExtraDhcpOpts
|
||||
UpdatePortReq_FixedIps = openstack.UpdatePortReq_FixedIps
|
||||
UpdatePortReq_Port = openstack.UpdatePortReq_Port
|
||||
UpdatePortResp = openstack.UpdatePortResp
|
||||
UpdatePortResp_AllowedAddressPairs = openstack.UpdatePortResp_AllowedAddressPairs
|
||||
UpdatePortResp_BindingProfile = openstack.UpdatePortResp_BindingProfile
|
||||
UpdatePortResp_BindingVifDetails = openstack.UpdatePortResp_BindingVifDetails
|
||||
UpdatePortResp_DnsAssignment = openstack.UpdatePortResp_DnsAssignment
|
||||
UpdatePortResp_ExtraDhcpOpts = openstack.UpdatePortResp_ExtraDhcpOpts
|
||||
UpdatePortResp_FixedIps = openstack.UpdatePortResp_FixedIps
|
||||
UpdatePortResp_Port = openstack.UpdatePortResp_Port
|
||||
UpdateRouterReq = openstack.UpdateRouterReq
|
||||
UpdateRouterReq_ExternalFixedIps = openstack.UpdateRouterReq_ExternalFixedIps
|
||||
UpdateRouterReq_ExternalGatewayInfo = openstack.UpdateRouterReq_ExternalGatewayInfo
|
||||
UpdateRouterReq_Router = openstack.UpdateRouterReq_Router
|
||||
UpdateRouterReq_Routes = openstack.UpdateRouterReq_Routes
|
||||
UpdateRouterResp = openstack.UpdateRouterResp
|
||||
UpdateRouterResp_AvailabilityZoneHints = openstack.UpdateRouterResp_AvailabilityZoneHints
|
||||
UpdateRouterResp_ConntrackHelpers = openstack.UpdateRouterResp_ConntrackHelpers
|
||||
UpdateRouterResp_ExternalFixedIps = openstack.UpdateRouterResp_ExternalFixedIps
|
||||
UpdateRouterResp_ExternalGatewayInfo = openstack.UpdateRouterResp_ExternalGatewayInfo
|
||||
UpdateRouterResp_Router = openstack.UpdateRouterResp_Router
|
||||
UpdateRouterResp_Routes = openstack.UpdateRouterResp_Routes
|
||||
UpdateSecurityGroupReq = openstack.UpdateSecurityGroupReq
|
||||
UpdateSecurityGroupResp = openstack.UpdateSecurityGroupResp
|
||||
UpdateSecurityGroupResp_SecurityGroup = openstack.UpdateSecurityGroupResp_SecurityGroup
|
||||
UpdateSecurityGroupResp_SecurityGroupRules = openstack.UpdateSecurityGroupResp_SecurityGroupRules
|
||||
UpdateServerReq = openstack.UpdateServerReq
|
||||
UpdateServerResp = openstack.UpdateServerResp
|
||||
UpdateServerResp_Addresses = openstack.UpdateServerResp_Addresses
|
||||
|
@ -233,6 +471,10 @@ type (
|
|||
UpdateServerResp_Private = openstack.UpdateServerResp_Private
|
||||
UpdateServerResp_SecurityGroups = openstack.UpdateServerResp_SecurityGroups
|
||||
UpdateServerResp_Server = openstack.UpdateServerResp_Server
|
||||
UpdateSubnetReq = openstack.UpdateSubnetReq
|
||||
UpdateSubnetResp = openstack.UpdateSubnetResp
|
||||
UpdateSubnetResp_AllocationPools = openstack.UpdateSubnetResp_AllocationPools
|
||||
UpdateSubnetResp_Subnet = openstack.UpdateSubnetResp_Subnet
|
||||
UpdateVolumeReq = openstack.UpdateVolumeReq
|
||||
UpdateVolumeReq_Metadata = openstack.UpdateVolumeReq_Metadata
|
||||
UpdateVolumeReq_Volume = openstack.UpdateVolumeReq_Volume
|
||||
|
@ -259,10 +501,22 @@ type (
|
|||
StopServer(ctx context.Context, in *StopServerReq, opts ...grpc.CallOption) (*StopServerResp, error)
|
||||
RebootServer(ctx context.Context, in *RebootServerReq, opts ...grpc.CallOption) (*RebootServerResp, error)
|
||||
PauseServer(ctx context.Context, in *PauseServerReq, opts ...grpc.CallOption) (*PauseServerResp, error)
|
||||
ListFlavorsDetail(ctx context.Context, in *ListFlavorsDetailReq, opts ...grpc.CallOption) (*ListFlavorsDetailResp, error)
|
||||
UnpauseServer(ctx context.Context, in *UnpauseServerReq, opts ...grpc.CallOption) (*UnpauseServerResp, error)
|
||||
RebuildServer(ctx context.Context, in *RebuildServerReq, opts ...grpc.CallOption) (*RebuildServerResp, error)
|
||||
ResizeServer(ctx context.Context, in *ResizeServerReq, opts ...grpc.CallOption) (*ResizeServerResp, error)
|
||||
MigrateServer(ctx context.Context, in *MigrateServerReq, opts ...grpc.CallOption) (*MigrateServerResp, error)
|
||||
ShelveServer(ctx context.Context, in *ShelveServerReq, opts ...grpc.CallOption) (*ShelveServerResp, error)
|
||||
UnshelveServer(ctx context.Context, in *UnshelveServerReq, opts ...grpc.CallOption) (*UnshelveServerResp, error)
|
||||
ChangeAdministrativePassword(ctx context.Context, in *ChangeAdministrativePasswordReq, opts ...grpc.CallOption) (*ChangeAdministrativePasswordResp, error)
|
||||
RescueServer(ctx context.Context, in *RescueServerReq, opts ...grpc.CallOption) (*RescueServerResp, error)
|
||||
UnRescue(ctx context.Context, in *UnRescueServerReq, opts ...grpc.CallOption) (*UnRescueServerResp, error)
|
||||
SuspendServer(ctx context.Context, in *SuspendServerReq, opts ...grpc.CallOption) (*SuspendServerResp, error)
|
||||
AddSecurityGroupToServer(ctx context.Context, in *AddSecurityGroupToServerReq, opts ...grpc.CallOption) (*AddSecurityGroupToServerResp, error)
|
||||
RemoveSecurityGroup(ctx context.Context, in *RemoveSecurityGroupReq, opts ...grpc.CallOption) (*RemoveSecurityGroupResp, error)
|
||||
// 规格(Flavors)
|
||||
ListFlavorsDetail(ctx context.Context, in *ListFlavorsDetailReq, opts ...grpc.CallOption) (*ListFlavorsDetailResp, error)
|
||||
CreateFlavor(ctx context.Context, in *CreateFlavorReq, opts ...grpc.CallOption) (*CreateFlavorResp, error)
|
||||
DeleteFlavor(ctx context.Context, in *DeleteFlavorReq, opts ...grpc.CallOption) (*DeleteFlavorResp, error)
|
||||
// network
|
||||
ShowNetworkDetails(ctx context.Context, in *ShowNetworkDetailsReq, opts ...grpc.CallOption) (*ShowNetworkDetailsResp, error)
|
||||
UpdateNetwork(ctx context.Context, in *UpdateNetworkReq, opts ...grpc.CallOption) (*UpdateNetworkResp, error)
|
||||
|
@ -270,7 +524,60 @@ type (
|
|||
ListNetworks(ctx context.Context, in *ListNetworksReq, opts ...grpc.CallOption) (*ListNetworksResp, error)
|
||||
CreateNetwork(ctx context.Context, in *CreateNetworkReq, opts ...grpc.CallOption) (*CreateNetworkResp, error)
|
||||
BulkCreateNetworks(ctx context.Context, in *BulkCreateNetworksReq, opts ...grpc.CallOption) (*BulkCreateNetworksResp, error)
|
||||
// 子网
|
||||
CreateSubnet(ctx context.Context, in *CreateSubnetReq, opts ...grpc.CallOption) (*CreateSubnetResp, error)
|
||||
ListSubnets(ctx context.Context, in *ListSubnetsReq, opts ...grpc.CallOption) (*ListSubnetsResp, error)
|
||||
DeleteSubnet(ctx context.Context, in *DeleteSubnetReq, opts ...grpc.CallOption) (*DeleteSubnetResp, error)
|
||||
UpdateSubnet(ctx context.Context, in *UpdateSubnetReq, opts ...grpc.CallOption) (*UpdateSubnetResp, error)
|
||||
// 网段
|
||||
CreateNetworkSegmentRange(ctx context.Context, in *CreateNetworkSegmentRangeReq, opts ...grpc.CallOption) (*CreateNetworkSegmentRangeResp, error)
|
||||
ListNetworkSegmentRanges(ctx context.Context, in *ListNetworkSegmentRangesReq, opts ...grpc.CallOption) (*ListNetworkSegmentRangesResp, error)
|
||||
DeleteNetworkSegmentRanges(ctx context.Context, in *DeleteNetworkSegmentRangesReq, opts ...grpc.CallOption) (*DeleteNetworkSegmentRangesResp, error)
|
||||
UpdateNetworkSegmentRanges(ctx context.Context, in *UpdateNetworkSegmentRangesReq, opts ...grpc.CallOption) (*UpdateNetworkSegmentRangesResp, error)
|
||||
ShowNetworkSegmentRangeDetails(ctx context.Context, in *ShowNetworkSegmentRangeDetailsReq, opts ...grpc.CallOption) (*ShowNetworkSegmentRangeDetailsResp, error)
|
||||
// 端口
|
||||
CreatePort(ctx context.Context, in *CreatePortReq, opts ...grpc.CallOption) (*CreatePortResp, error)
|
||||
ListPorts(ctx context.Context, in *ListPortsReq, opts ...grpc.CallOption) (*ListPortsResp, error)
|
||||
DeletePort(ctx context.Context, in *DeletePortReq, opts ...grpc.CallOption) (*DeletePortResp, error)
|
||||
UpdatePort(ctx context.Context, in *UpdatePortReq, opts ...grpc.CallOption) (*UpdatePortResp, error)
|
||||
ShowPortDetails(ctx context.Context, in *ShowPortDetailsReq, opts ...grpc.CallOption) (*ShowPortDetailsResp, error)
|
||||
// 路由
|
||||
CreateRouter(ctx context.Context, in *CreateRouterReq, opts ...grpc.CallOption) (*CreateRouterResp, error)
|
||||
ListRouters(ctx context.Context, in *ListRoutersReq, opts ...grpc.CallOption) (*ListRoutersResp, error)
|
||||
ShowRouterDetails(ctx context.Context, in *ShowRouterDetailsReq, opts ...grpc.CallOption) (*ShowRouterDetailsResp, error)
|
||||
UpdateRouter(ctx context.Context, in *UpdateRouterReq, opts ...grpc.CallOption) (*UpdateRouterResp, error)
|
||||
DeleteRouter(ctx context.Context, in *DeleteRouterReq, opts ...grpc.CallOption) (*DeleteRouterResp, error)
|
||||
// 浮动IP
|
||||
ListFloatingIPs(ctx context.Context, in *ListFloatingIPsReq, opts ...grpc.CallOption) (*ListFloatingIPsResp, error)
|
||||
CreateFloatingIP(ctx context.Context, in *CreateFloatingIPReq, opts ...grpc.CallOption) (*CreateFloatingIPResp, error)
|
||||
UpdateFloatingIP(ctx context.Context, in *UpdateFloatingIPReq, opts ...grpc.CallOption) (*UpdateFloatingIPResp, error)
|
||||
DeleteFloatingIP(ctx context.Context, in *DeleteFloatingIPReq, opts ...grpc.CallOption) (*DeleteFloatingIPResp, error)
|
||||
ShowFloatingIPDetails(ctx context.Context, in *ShowFloatingIPDetailsReq, opts ...grpc.CallOption) (*ShowFloatingIPDetailsResp, error)
|
||||
// 防火墙
|
||||
ListFirewallGroups(ctx context.Context, in *ListFirewallGroupsReq, opts ...grpc.CallOption) (*ListFirewallGroupsResp, error)
|
||||
DeleteFirewallGroup(ctx context.Context, in *DeleteFirewallGroupReq, opts ...grpc.CallOption) (*DeleteFirewallGroupResp, error)
|
||||
CreateFirewallGroup(ctx context.Context, in *CreateFirewallGroupReq, opts ...grpc.CallOption) (*CreateFirewallGroupResp, error)
|
||||
UpdateFirewallGroup(ctx context.Context, in *UpdateFirewallGroupReq, opts ...grpc.CallOption) (*UpdateFirewallGroupResp, error)
|
||||
ShowFirewallGroupDetails(ctx context.Context, in *ShowFirewallGroupDetailsReq, opts ...grpc.CallOption) (*ShowFirewallGroupDetailsResp, error)
|
||||
CreateFirewallPolicy(ctx context.Context, in *CreateFirewallPolicyReq, opts ...grpc.CallOption) (*CreateFirewallPolicyResp, error)
|
||||
DeleteFirewallPolicy(ctx context.Context, in *DeleteFirewallPolicyReq, opts ...grpc.CallOption) (*DeleteFirewallPolicyResp, error)
|
||||
ListFirewallPolicies(ctx context.Context, in *ListFirewallPoliciesReq, opts ...grpc.CallOption) (*ListFirewallPoliciesResp, error)
|
||||
ShowFirewallPolicyDetails(ctx context.Context, in *ShowFirewallPolicyDetailsReq, opts ...grpc.CallOption) (*ShowFirewallPolicyDetailsResp, error)
|
||||
CreateFirewallRule(ctx context.Context, in *CreateFirewallRuleReq, opts ...grpc.CallOption) (*CreateFirewallRuleResp, error)
|
||||
DeleteFirewallRule(ctx context.Context, in *DeleteFirewallRuleReq, opts ...grpc.CallOption) (*DeleteFirewallRuleResp, error)
|
||||
ListFirewallRules(ctx context.Context, in *ListFirewallRulesReq, opts ...grpc.CallOption) (*ListFirewallRulesResp, error)
|
||||
ShowFirewallRuleDetails(ctx context.Context, in *ShowFirewallRuleDetailsReq, opts ...grpc.CallOption) (*ShowFirewallRuleDetailsResp, error)
|
||||
// 安全组
|
||||
ListSecurityGroups(ctx context.Context, in *ListSecurityGroupsReq, opts ...grpc.CallOption) (*ListSecurityGroupsResp, error)
|
||||
CreateSecurityGroup(ctx context.Context, in *CreateSecurityGroupReq, opts ...grpc.CallOption) (*CreateSecurityGroupResp, error)
|
||||
DeleteSecurityGroup(ctx context.Context, in *DeleteSecurityGroupReq, opts ...grpc.CallOption) (*DeleteSecurityGroupResp, error)
|
||||
UpdateSecurityGroup(ctx context.Context, in *UpdateSecurityGroupReq, opts ...grpc.CallOption) (*UpdateSecurityGroupResp, error)
|
||||
ShowSecurityGroup(ctx context.Context, in *ShowSecurityGroupReq, opts ...grpc.CallOption) (*ShowSecurityGroupResp, error)
|
||||
// 安全组规则
|
||||
ListSecurityGroupRules(ctx context.Context, in *ListSecurityGroupRulesReq, opts ...grpc.CallOption) (*ListSecurityGroupRulesResp, error)
|
||||
CreateSecurityGroupRule(ctx context.Context, in *CreateSecurityGroupRuleReq, opts ...grpc.CallOption) (*CreateSecurityGroupRuleResp, error)
|
||||
ShowSecurityGroupRule(ctx context.Context, in *ShowSecurityGroupRuleReq, opts ...grpc.CallOption) (*ShowSecurityGroupRuleResp, error)
|
||||
DeleteSecurityGroupRule(ctx context.Context, in *DeleteSecurityGroupRuleReq, opts ...grpc.CallOption) (*DeleteSecurityGroupRuleResp, error)
|
||||
// Images from glance
|
||||
CreateImage(ctx context.Context, in *CreateImageReq, opts ...grpc.CallOption) (*CreateImageResp, error)
|
||||
ListImages(ctx context.Context, in *ListImagesReq, opts ...grpc.CallOption) (*ListImagesResp, error)
|
||||
|
@ -366,9 +673,9 @@ func (m *defaultOpenstack) PauseServer(ctx context.Context, in *PauseServerReq,
|
|||
return client.PauseServer(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ListFlavorsDetail(ctx context.Context, in *ListFlavorsDetailReq, opts ...grpc.CallOption) (*ListFlavorsDetailResp, error) {
|
||||
func (m *defaultOpenstack) UnpauseServer(ctx context.Context, in *UnpauseServerReq, opts ...grpc.CallOption) (*UnpauseServerResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ListFlavorsDetail(ctx, in, opts...)
|
||||
return client.UnpauseServer(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) RebuildServer(ctx context.Context, in *RebuildServerReq, opts ...grpc.CallOption) (*RebuildServerResp, error) {
|
||||
|
@ -386,6 +693,62 @@ func (m *defaultOpenstack) MigrateServer(ctx context.Context, in *MigrateServerR
|
|||
return client.MigrateServer(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ShelveServer(ctx context.Context, in *ShelveServerReq, opts ...grpc.CallOption) (*ShelveServerResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ShelveServer(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) UnshelveServer(ctx context.Context, in *UnshelveServerReq, opts ...grpc.CallOption) (*UnshelveServerResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.UnshelveServer(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ChangeAdministrativePassword(ctx context.Context, in *ChangeAdministrativePasswordReq, opts ...grpc.CallOption) (*ChangeAdministrativePasswordResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ChangeAdministrativePassword(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) RescueServer(ctx context.Context, in *RescueServerReq, opts ...grpc.CallOption) (*RescueServerResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.RescueServer(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) UnRescue(ctx context.Context, in *UnRescueServerReq, opts ...grpc.CallOption) (*UnRescueServerResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.UnRescue(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) SuspendServer(ctx context.Context, in *SuspendServerReq, opts ...grpc.CallOption) (*SuspendServerResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.SuspendServer(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) AddSecurityGroupToServer(ctx context.Context, in *AddSecurityGroupToServerReq, opts ...grpc.CallOption) (*AddSecurityGroupToServerResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.AddSecurityGroupToServer(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) RemoveSecurityGroup(ctx context.Context, in *RemoveSecurityGroupReq, opts ...grpc.CallOption) (*RemoveSecurityGroupResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.RemoveSecurityGroup(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 规格(Flavors)
|
||||
func (m *defaultOpenstack) ListFlavorsDetail(ctx context.Context, in *ListFlavorsDetailReq, opts ...grpc.CallOption) (*ListFlavorsDetailResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ListFlavorsDetail(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) CreateFlavor(ctx context.Context, in *CreateFlavorReq, opts ...grpc.CallOption) (*CreateFlavorResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.CreateFlavor(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) DeleteFlavor(ctx context.Context, in *DeleteFlavorReq, opts ...grpc.CallOption) (*DeleteFlavorResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.DeleteFlavor(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// network
|
||||
func (m *defaultOpenstack) ShowNetworkDetails(ctx context.Context, in *ShowNetworkDetailsReq, opts ...grpc.CallOption) (*ShowNetworkDetailsResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
|
@ -417,11 +780,244 @@ func (m *defaultOpenstack) BulkCreateNetworks(ctx context.Context, in *BulkCreat
|
|||
return client.BulkCreateNetworks(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 子网
|
||||
func (m *defaultOpenstack) CreateSubnet(ctx context.Context, in *CreateSubnetReq, opts ...grpc.CallOption) (*CreateSubnetResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.CreateSubnet(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ListSubnets(ctx context.Context, in *ListSubnetsReq, opts ...grpc.CallOption) (*ListSubnetsResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ListSubnets(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) DeleteSubnet(ctx context.Context, in *DeleteSubnetReq, opts ...grpc.CallOption) (*DeleteSubnetResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.DeleteSubnet(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) UpdateSubnet(ctx context.Context, in *UpdateSubnetReq, opts ...grpc.CallOption) (*UpdateSubnetResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.UpdateSubnet(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 网段
|
||||
func (m *defaultOpenstack) CreateNetworkSegmentRange(ctx context.Context, in *CreateNetworkSegmentRangeReq, opts ...grpc.CallOption) (*CreateNetworkSegmentRangeResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.CreateNetworkSegmentRange(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ListNetworkSegmentRanges(ctx context.Context, in *ListNetworkSegmentRangesReq, opts ...grpc.CallOption) (*ListNetworkSegmentRangesResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ListNetworkSegmentRanges(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) DeleteNetworkSegmentRanges(ctx context.Context, in *DeleteNetworkSegmentRangesReq, opts ...grpc.CallOption) (*DeleteNetworkSegmentRangesResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.DeleteNetworkSegmentRanges(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) UpdateNetworkSegmentRanges(ctx context.Context, in *UpdateNetworkSegmentRangesReq, opts ...grpc.CallOption) (*UpdateNetworkSegmentRangesResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.UpdateNetworkSegmentRanges(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ShowNetworkSegmentRangeDetails(ctx context.Context, in *ShowNetworkSegmentRangeDetailsReq, opts ...grpc.CallOption) (*ShowNetworkSegmentRangeDetailsResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ShowNetworkSegmentRangeDetails(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 端口
|
||||
func (m *defaultOpenstack) CreatePort(ctx context.Context, in *CreatePortReq, opts ...grpc.CallOption) (*CreatePortResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.CreatePort(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ListPorts(ctx context.Context, in *ListPortsReq, opts ...grpc.CallOption) (*ListPortsResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ListPorts(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) DeletePort(ctx context.Context, in *DeletePortReq, opts ...grpc.CallOption) (*DeletePortResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.DeletePort(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) UpdatePort(ctx context.Context, in *UpdatePortReq, opts ...grpc.CallOption) (*UpdatePortResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.UpdatePort(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ShowPortDetails(ctx context.Context, in *ShowPortDetailsReq, opts ...grpc.CallOption) (*ShowPortDetailsResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ShowPortDetails(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 路由
|
||||
func (m *defaultOpenstack) CreateRouter(ctx context.Context, in *CreateRouterReq, opts ...grpc.CallOption) (*CreateRouterResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.CreateRouter(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ListRouters(ctx context.Context, in *ListRoutersReq, opts ...grpc.CallOption) (*ListRoutersResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ListRouters(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ShowRouterDetails(ctx context.Context, in *ShowRouterDetailsReq, opts ...grpc.CallOption) (*ShowRouterDetailsResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ShowRouterDetails(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) UpdateRouter(ctx context.Context, in *UpdateRouterReq, opts ...grpc.CallOption) (*UpdateRouterResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.UpdateRouter(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) DeleteRouter(ctx context.Context, in *DeleteRouterReq, opts ...grpc.CallOption) (*DeleteRouterResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.DeleteRouter(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 浮动IP
|
||||
func (m *defaultOpenstack) ListFloatingIPs(ctx context.Context, in *ListFloatingIPsReq, opts ...grpc.CallOption) (*ListFloatingIPsResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ListFloatingIPs(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) CreateFloatingIP(ctx context.Context, in *CreateFloatingIPReq, opts ...grpc.CallOption) (*CreateFloatingIPResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.CreateFloatingIP(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) UpdateFloatingIP(ctx context.Context, in *UpdateFloatingIPReq, opts ...grpc.CallOption) (*UpdateFloatingIPResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.UpdateFloatingIP(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) DeleteFloatingIP(ctx context.Context, in *DeleteFloatingIPReq, opts ...grpc.CallOption) (*DeleteFloatingIPResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.DeleteFloatingIP(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ShowFloatingIPDetails(ctx context.Context, in *ShowFloatingIPDetailsReq, opts ...grpc.CallOption) (*ShowFloatingIPDetailsResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ShowFloatingIPDetails(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 防火墙
|
||||
func (m *defaultOpenstack) ListFirewallGroups(ctx context.Context, in *ListFirewallGroupsReq, opts ...grpc.CallOption) (*ListFirewallGroupsResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ListFirewallGroups(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) DeleteFirewallGroup(ctx context.Context, in *DeleteFirewallGroupReq, opts ...grpc.CallOption) (*DeleteFirewallGroupResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.DeleteFirewallGroup(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) CreateFirewallGroup(ctx context.Context, in *CreateFirewallGroupReq, opts ...grpc.CallOption) (*CreateFirewallGroupResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.CreateFirewallGroup(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) UpdateFirewallGroup(ctx context.Context, in *UpdateFirewallGroupReq, opts ...grpc.CallOption) (*UpdateFirewallGroupResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.UpdateFirewallGroup(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ShowFirewallGroupDetails(ctx context.Context, in *ShowFirewallGroupDetailsReq, opts ...grpc.CallOption) (*ShowFirewallGroupDetailsResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ShowFirewallGroupDetails(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) CreateFirewallPolicy(ctx context.Context, in *CreateFirewallPolicyReq, opts ...grpc.CallOption) (*CreateFirewallPolicyResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.CreateFirewallPolicy(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) DeleteFirewallPolicy(ctx context.Context, in *DeleteFirewallPolicyReq, opts ...grpc.CallOption) (*DeleteFirewallPolicyResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.DeleteFirewallPolicy(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ListFirewallPolicies(ctx context.Context, in *ListFirewallPoliciesReq, opts ...grpc.CallOption) (*ListFirewallPoliciesResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ListFirewallPolicies(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ShowFirewallPolicyDetails(ctx context.Context, in *ShowFirewallPolicyDetailsReq, opts ...grpc.CallOption) (*ShowFirewallPolicyDetailsResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ShowFirewallPolicyDetails(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) CreateFirewallRule(ctx context.Context, in *CreateFirewallRuleReq, opts ...grpc.CallOption) (*CreateFirewallRuleResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.CreateFirewallRule(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) DeleteFirewallRule(ctx context.Context, in *DeleteFirewallRuleReq, opts ...grpc.CallOption) (*DeleteFirewallRuleResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.DeleteFirewallRule(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ListFirewallRules(ctx context.Context, in *ListFirewallRulesReq, opts ...grpc.CallOption) (*ListFirewallRulesResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ListFirewallRules(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ShowFirewallRuleDetails(ctx context.Context, in *ShowFirewallRuleDetailsReq, opts ...grpc.CallOption) (*ShowFirewallRuleDetailsResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ShowFirewallRuleDetails(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 安全组
|
||||
func (m *defaultOpenstack) ListSecurityGroups(ctx context.Context, in *ListSecurityGroupsReq, opts ...grpc.CallOption) (*ListSecurityGroupsResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ListSecurityGroups(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) CreateSecurityGroup(ctx context.Context, in *CreateSecurityGroupReq, opts ...grpc.CallOption) (*CreateSecurityGroupResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.CreateSecurityGroup(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) DeleteSecurityGroup(ctx context.Context, in *DeleteSecurityGroupReq, opts ...grpc.CallOption) (*DeleteSecurityGroupResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.DeleteSecurityGroup(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) UpdateSecurityGroup(ctx context.Context, in *UpdateSecurityGroupReq, opts ...grpc.CallOption) (*UpdateSecurityGroupResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.UpdateSecurityGroup(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ShowSecurityGroup(ctx context.Context, in *ShowSecurityGroupReq, opts ...grpc.CallOption) (*ShowSecurityGroupResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ShowSecurityGroup(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 安全组规则
|
||||
func (m *defaultOpenstack) ListSecurityGroupRules(ctx context.Context, in *ListSecurityGroupRulesReq, opts ...grpc.CallOption) (*ListSecurityGroupRulesResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ListSecurityGroupRules(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) CreateSecurityGroupRule(ctx context.Context, in *CreateSecurityGroupRuleReq, opts ...grpc.CallOption) (*CreateSecurityGroupRuleResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.CreateSecurityGroupRule(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) ShowSecurityGroupRule(ctx context.Context, in *ShowSecurityGroupRuleReq, opts ...grpc.CallOption) (*ShowSecurityGroupRuleResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.ShowSecurityGroupRule(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultOpenstack) DeleteSecurityGroupRule(ctx context.Context, in *DeleteSecurityGroupRuleReq, opts ...grpc.CallOption) (*DeleteSecurityGroupRuleResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
return client.DeleteSecurityGroupRule(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// Images from glance
|
||||
func (m *defaultOpenstack) CreateImage(ctx context.Context, in *CreateImageReq, opts ...grpc.CallOption) (*CreateImageResp, error) {
|
||||
client := openstack.NewOpenstackClient(m.cli.Conn())
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue