From c3a6dd48dca328ac0de11fbfdd0936bd11e223a4 Mon Sep 17 00:00:00 2001 From: devad Date: Fri, 29 Apr 2022 17:41:21 +0800 Subject: [PATCH] ECS impl Signed-off-by: devad --- .../pod_adaptor/service/poder/huawei_cci.go | 10 +- adaptor/pod_adaptor/service/poder/k8s.go | 10 +- adaptor/vm_adaptor/server/ecs/list.go | 21 +- adaptor/vm_adaptor/service/ecser/ali.go | 8 +- adaptor/vm_adaptor/service/ecser/ecser.go | 5 +- adaptor/vm_adaptor/service/ecser/harvester.go | 571 ++++++++ .../service/ecser/harvester_util.go | 444 ++++++ adaptor/vm_adaptor/service/ecser/huawei.go | 8 +- adaptor/vm_adaptor/service/ecser/tencent.go | 9 +- common/server/server_ecs.go | 10 + go.mod | 139 +- idl/pbecs/ecs.proto | 115 +- lan_trans/idl/demo/demo.pb.gw.go | 10 +- lan_trans/idl/pbecs/ecs.pb.go | 1216 +++++++++++++---- lan_trans/idl/pbecs/ecs.pb.gw.go | 151 +- lan_trans/idl/pbecs/ecs_grpc.pb.go | 38 + lan_trans/idl/pbpod/pod.pb.go | 252 ++-- lan_trans/idl/pbpod/pod.pb.gw.go | 70 +- .../openapiv2/idl/demo/demo.swagger.json | 9 +- .../openapiv2/idl/pbecs/ecs.swagger.json | 251 +++- .../openapiv2/idl/pbpod/pod.swagger.json | 73 +- .../idl/pbtenant/tenant.swagger.json | 9 +- 22 files changed, 2837 insertions(+), 592 deletions(-) create mode 100644 adaptor/vm_adaptor/service/ecser/harvester.go create mode 100644 adaptor/vm_adaptor/service/ecser/harvester_util.go diff --git a/adaptor/pod_adaptor/service/poder/huawei_cci.go b/adaptor/pod_adaptor/service/poder/huawei_cci.go index ad3b0b28..7892540f 100644 --- a/adaptor/pod_adaptor/service/poder/huawei_cci.go +++ b/adaptor/pod_adaptor/service/poder/huawei_cci.go @@ -126,7 +126,7 @@ func (cci *HuaweiCci) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (* Status: corev1.PodStatus{}, } - resp, err := cci.cli.CoreV1().Pods(req.Namespace).Create(&pod) + resp, err := cci.cli.CoreV1().Pods(req.Namespace).Create(context.TODO(), &pod, metav1.CreateOptions{}) if err != nil { return nil, errors.Wrap(err, "Huaweiyun CreatePod error") } @@ -148,7 +148,7 @@ func (cci *HuaweiCci) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (* func (cci *HuaweiCci) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) { - err := cci.cli.CoreV1().Pods(req.GetNamespace()).Delete(req.PodName, &metav1.DeleteOptions{}) + err := cci.cli.CoreV1().Pods(req.GetNamespace()).Delete(context.TODO(), req.PodName, metav1.DeleteOptions{}) isFinished := true if err != nil { @@ -169,7 +169,7 @@ func (cci *HuaweiCci) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (* func (cci *HuaweiCci) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) { - qresp, err := cci.cli.CoreV1().Pods(req.GetNamespace()).Get(req.PodName, metav1.GetOptions{}) + qresp, err := cci.cli.CoreV1().Pods(req.GetNamespace()).Get(context.TODO(), req.PodName, metav1.GetOptions{}) if err != nil { return nil, errors.Wrap(err, "Huaweiyun UpdatePod error") } @@ -184,7 +184,7 @@ func (cci *HuaweiCci) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (* Status: qresp.Status, } pod.Spec.Containers[0].Image = req.ContainerImage - resp, err := cci.cli.CoreV1().Pods(req.Namespace).Update(&pod) + resp, err := cci.cli.CoreV1().Pods(req.Namespace).Update(context.TODO(), &pod, metav1.UpdateOptions{}) glog.Info("Huawei update pod resp", resp) if err != nil { return nil, errors.Wrap(err, "Huaweiyun UpdatePod error") @@ -207,7 +207,7 @@ func (cci *HuaweiCci) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (* func (cci *HuaweiCci) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) { - resp, err := cci.cli.CoreV1().Pods(req.GetNamespace()).List(metav1.ListOptions{}) + resp, err := cci.cli.CoreV1().Pods(req.GetNamespace()).List(context.TODO(), metav1.ListOptions{}) if err != nil { return nil, errors.Wrap(err, "Huaweiyun ListDetail pod error") diff --git a/adaptor/pod_adaptor/service/poder/k8s.go b/adaptor/pod_adaptor/service/poder/k8s.go index 25cdbf46..d23048d2 100644 --- a/adaptor/pod_adaptor/service/poder/k8s.go +++ b/adaptor/pod_adaptor/service/poder/k8s.go @@ -112,7 +112,7 @@ func (k *K8SPoder) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbp Status: corev1.PodStatus{}, } - resp, err := k.cli.CoreV1().Pods(req.Namespace).Create(&pod) + resp, err := k.cli.CoreV1().Pods(req.Namespace).Create(context.TODO(), &pod, metav1.CreateOptions{}) if err != nil { return nil, errors.Wrap(err, "K8S CreatePod error") } @@ -137,7 +137,7 @@ func (k K8SPoder) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpo podName := req.PodName fmt.Println("K8S ContainerGroup:", podName, " Deleted") - err := k.cli.CoreV1().Pods(req.Namespace).Delete(podName, &metav1.DeleteOptions{}) + err := k.cli.CoreV1().Pods(req.Namespace).Delete(context.TODO(), podName, metav1.DeleteOptions{}) glog.Infof("--------------------K8S Pod Instance deleted--------------------") @@ -157,7 +157,7 @@ func (k K8SPoder) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpo func (k K8SPoder) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) { - qresp, err := k.cli.CoreV1().Pods(req.GetNamespace()).Get(req.PodName, metav1.GetOptions{}) + qresp, err := k.cli.CoreV1().Pods(req.GetNamespace()).Get(context.TODO(), req.PodName, metav1.GetOptions{}) if err != nil { return nil, errors.Wrap(err, "K8S UpdatePod error") } @@ -172,7 +172,7 @@ func (k K8SPoder) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpo Status: qresp.Status, } pod.Spec.Containers[0].Image = req.ContainerImage - resp, err := k.cli.CoreV1().Pods(req.Namespace).Update(&pod) + resp, err := k.cli.CoreV1().Pods(req.Namespace).Update(context.TODO(), &pod, metav1.UpdateOptions{}) if err != nil { return nil, errors.Wrap(err, "K8S UpdatePod error") } @@ -194,7 +194,7 @@ func (k K8SPoder) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpo } func (k K8SPoder) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) { - resp, err := k.cli.CoreV1().Pods(req.GetNamespace()).List(metav1.ListOptions{}) + resp, err := k.cli.CoreV1().Pods(req.GetNamespace()).List(context.TODO(), metav1.ListOptions{}) if err != nil { return nil, errors.Wrap(err, "K8S ListDetail pod error") } diff --git a/adaptor/vm_adaptor/server/ecs/list.go b/adaptor/vm_adaptor/server/ecs/list.go index 8957ffdd..982f2a9e 100644 --- a/adaptor/vm_adaptor/server/ecs/list.go +++ b/adaptor/vm_adaptor/server/ecs/list.go @@ -212,7 +212,6 @@ func ListAll(ctx context.Context) (*pbecs.ListResp, error) { glog.Errorf("List error %v", err) return } - mutex.Lock() ecses = append(ecses, resp.Ecses...) mutex.Unlock() @@ -223,3 +222,23 @@ func ListAll(ctx context.Context) (*pbecs.ListResp, error) { return &pbecs.ListResp{Ecses: ecses}, nil } + +func ActionEcs(ctx context.Context, req *pbecs.ActionReq) (*pbecs.ActionResp, error) { + var ( + ecs ecser.Ecser + ) + tenanters, err := tenanter.GetTenanters(req.Provider) + region, err := tenanter.NewRegion(req.Provider, req.RegionId) + if err != nil { + return nil, errors.Wrap(err, "get tenanters failed") + } + for _, tenanter := range tenanters { + if req.AccountName == "" || tenanter.AccountName() == req.AccountName { + if ecs, err = ecser.NewEcsClient(req.Provider, region, tenanter); err != nil { + return nil, errors.WithMessage(err, "NewEcsClient error") + } + break + } + } + return ecs.ActionEcs(ctx, req) +} diff --git a/adaptor/vm_adaptor/service/ecser/ali.go b/adaptor/vm_adaptor/service/ecser/ali.go index 5f221323..caef2e76 100644 --- a/adaptor/vm_adaptor/service/ecser/ali.go +++ b/adaptor/vm_adaptor/service/ecser/ali.go @@ -208,8 +208,8 @@ func (ecs *AliEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*p RegionName: ecs.region.GetName(), PublicIps: publicIps, InstanceType: *v.InstanceType, - Cpu: *v.Cpu, - Memory: *v.Memory, + Cpu: string(*v.Cpu), + Memory: string(*v.Memory), Description: *v.Description, Status: *v.Status, CreationTime: *v.CreationTime, @@ -234,3 +234,7 @@ func (ecs *AliEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*p RequestId: *resp.Body.RequestId, }, nil } + +func (ecs *AliEcs) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) { + return nil, nil +} diff --git a/adaptor/vm_adaptor/service/ecser/ecser.go b/adaptor/vm_adaptor/service/ecser/ecser.go index 8be2f824..b1f2a27d 100644 --- a/adaptor/vm_adaptor/service/ecser/ecser.go +++ b/adaptor/vm_adaptor/service/ecser/ecser.go @@ -21,6 +21,7 @@ type Ecser interface { DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (resp *pbecs.DeleteEcsResp, err error) //批量删除ecs UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (resp *pbecs.UpdateEcsResp, err error) //修改ecs ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (resp *pbecs.ListDetailResp, err error) //查询ecs详情 + ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) //操作ecs } func NewEcsClient(provider pbtenant.CloudProvider, region tenanter.Region, tenant tenanter.Tenanter) (ecser Ecser, err error) { @@ -40,8 +41,8 @@ func NewEcsClient(provider pbtenant.CloudProvider, region tenanter.Region, tenan case pbtenant.CloudProvider_huawei: return newHuaweiEcsClient(region, tenant) //TODO aws - //case pbtenant.CloudProvider_aws: - // return newAwsEcsClient(region, tenant) + case pbtenant.CloudProvider_harvester: + return newHarvesterClient(tenant) } err = errors.WithMessagef(ErrEcsListNotSupported, "cloud provider %v region %v", provider, region) diff --git a/adaptor/vm_adaptor/service/ecser/harvester.go b/adaptor/vm_adaptor/service/ecser/harvester.go new file mode 100644 index 00000000..b415c201 --- /dev/null +++ b/adaptor/vm_adaptor/service/ecser/harvester.go @@ -0,0 +1,571 @@ +package ecser + +import ( + "context" + "fmt" + "github.com/harvester/harvester/pkg/apis/harvesterhci.io/v1beta1" + harvClient "github.com/harvester/harvester/pkg/generated/clientset/versioned" + "github.com/longhorn/longhorn-manager/util" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "gitlink.org.cn/JCCE/PCM/common/tenanter" + "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbecs" + "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" + v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + k8smetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + k8s "k8s.io/client-go/kubernetes" + kubirtv1 "kubevirt.io/client-go/api/v1" + "strconv" + "strings" + "time" +) + +const ( + prefix = "harvesterhci.io" + vmAnnotationPVC = prefix + "/volumeClaimTemplates" + vmAnnotationNetworkIps = "network.harvesterhci.io/ips" + defaultCloudInitUserData = "#cloud-config\npackage_update: true\npackages:\n - qemu-guest-agent\nruncmd:\n - - systemctl\n - enable\n - '--now'\n - qemu-guest-agent\n" +) + +type Config struct { + Host string + Token string + Port int +} + +type HarVMer struct { + k8sCli *k8s.Clientset + harvCli *harvClient.Clientset + region tenanter.Region + tenanter tenanter.Tenanter +} + +func newHarvesterClient(tenant tenanter.Tenanter) (Ecser, error) { + var ( + k8sclient *k8s.Clientset + harvesterClient *harvClient.Clientset + err error + ) + switch t := tenant.(type) { + case *tenanter.AccessKeyTenant: + k8sclient, err = GetKubernetesClient(t.GetUrl(), t.GetToken()) + if err != nil { + return nil, err + } + harvesterClient, err = GetHarvesterClient(t.GetUrl(), t.GetToken()) + if err != nil { + return nil, err + } + default: + + } + if err != nil { + return nil, errors.Wrap(err, "init harvester client error") + } + return &HarVMer{ + k8sCli: k8sclient, + harvCli: harvesterClient, + region: nil, + tenanter: tenant, + }, nil +} + +func (h *HarVMer) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (resp *pbecs.CreateEcsResp, err error) { + var ( + vmTemplate *kubirtv1.VirtualMachineInstanceTemplateSpec + vmImage *v1beta1.VirtualMachineImage + ) + if req.ImageId != "" { + vmImage, err = h.harvCli.HarvesterhciV1beta1().VirtualMachineImages(req.GetNamespace()).Get(context.TODO(), req.ImageId, k8smetav1.GetOptions{}) + if err != nil { + return nil, errors.Wrap(err, "get vm image error") + } + } else { + return nil, errors.Wrap(err, "Image ID given does not exist!") + } + storageClassName := vmImage.Status.StorageClassName + vmNameBase := req.InstanceName + + vmLabels := map[string]string{ + prefix + "/creator": "harvester", + } + vmiLabels := vmLabels + _amount := req.Amount + if _amount == 0 { + return nil, fmt.Errorf("VM count provided is 0, no VM will be created") + } + + repAmount := 0 + InstanceIds := make([]string, 0) + for i := 1; i <= int(_amount); i++ { + var ( + vmName string + secretRandomID string + ) + randomID := util.RandomID() + if _amount > 1 { + vmName = vmNameBase + "-" + fmt.Sprint(i) + secretRandomID = vmNameBase + "-" + randomID + } else { + vmName = vmNameBase + secretRandomID = vmNameBase + "-" + randomID + } + + vmiLabels[prefix+"/vmName"] = vmName + vmiLabels[prefix+"/vmNamePrefix"] = vmNameBase + diskRandomID := util.RandomID() + pvcName := vmName + "-disk-0-" + diskRandomID + pvcAnnotation := "[{\"metadata\":{\"name\":\"" + pvcName + "\",\"annotations\":{\"harvesterhci.io/imageId\":\"" + req.GetNamespace() + "/" + req.GetImageId() + "\"}},\"spec\":{\"accessModes\":[\"ReadWriteMany\"],\"resources\":{\"requests\":{\"storage\":\"" + req.GetDiskSize() + "\"}},\"volumeMode\":\"Block\",\"storageClassName\":\"" + storageClassName + "\"}}]" + + vmTemplate, err = buildVMTemplate(int(req.GetCpu()), req.GetMemory(), req.GetSshKey(), h.harvCli, pvcName, vmiLabels, vmNameBase, secretRandomID) + if err != nil { + return nil, errors.Wrap(err, "") + } + vm := &kubirtv1.VirtualMachine{ + ObjectMeta: k8smetav1.ObjectMeta{ + Name: vmName, + Namespace: req.GetNamespace(), + Annotations: map[string]string{ + vmAnnotationPVC: pvcAnnotation, + vmAnnotationNetworkIps: "[]", + }, + Labels: vmLabels, + }, + Spec: kubirtv1.VirtualMachineSpec{ + Running: NewTrue(), + Template: vmTemplate, + }, + } + resp, err1 := h.harvCli.KubevirtV1().VirtualMachines(req.GetNamespace()).Create(context.TODO(), vm, k8smetav1.CreateOptions{}) + if err1 != nil { + return nil, errors.Wrap(err, "VM create failed") + } + + var sshKey *v1beta1.KeyPair + cloudInitSSHSection := "" + if req.GetSshKey() != "" { + sshArr := strings.Split(req.GetSshKey(), "/") + if len(sshArr) != 2 { + return nil, errors.New("sshKeyName should be in format namespace/name") + } + sshKey, err = h.harvCli.HarvesterhciV1beta1().KeyPairs(sshArr[0]).Get(context.TODO(), sshArr[1], k8smetav1.GetOptions{}) + if err != nil { + return nil, errors.Wrap(err, "error during getting keypair from Harvester") + } + cloudInitSSHSection = "\nssh_authorized_keys:\n - >-\n" + sshKey.Spec.PublicKey + "\n" + logrus.Debugf("SSH Key Name %s given does exist!", req.GetSshKey()) + } + if req.UserDataTemplate == "" { + req.UserDataTemplate = defaultCloudInitUserData + } + // Create the secret for the VM + if _, secreterr := createCloudInitDataFromSecret(h.k8sCli, vmName, resp.ObjectMeta.UID, secretRandomID, req.Namespace, req.UserDataTemplate+cloudInitSSHSection, req.NetworkDataTemplate); secreterr != nil { + logrus.Errorf("Create secret failed, %s", secreterr) + return nil, errors.Wrap(secreterr, "Create cloud init data from secret failed") + } + InstanceIds = append(InstanceIds, string(resp.UID)) + repAmount++ + } + isFinished := false + if int32(repAmount) == req.Amount { + isFinished = true + } + return &pbecs.CreateEcsResp{ + Provider: pbtenant.CloudProvider_harvester, + AccountName: h.tenanter.AccountName(), + InstanceIdSets: InstanceIds, + Finished: isFinished, + }, nil +} + +//buildVMTemplate creates a *kubirtv1.VirtualMachineInstanceTemplateSpec from the CLI Flags and some computed values +func buildVMTemplate(vCpu int, memory, sshKeyName string, c *harvClient.Clientset, + pvcName string, vmiLabels map[string]string, vmName string, secretName string) (vmTemplate *kubirtv1.VirtualMachineInstanceTemplateSpec, err error) { + vmTemplate = nil + _memory := resource.MustParse(memory) + if sshKeyName != "" { + sshArr := strings.Split(sshKeyName, "/") + if len(sshArr) != 2 { + return nil, errors.New("sshKeyName should be in format namespace/name") + } + _, keyerr := c.HarvesterhciV1beta1().KeyPairs(sshArr[0]).Get(context.TODO(), sshArr[1], k8smetav1.GetOptions{}) + if keyerr != nil { + return nil, errors.Wrap(keyerr, "error during getting keypair from Harvester") + } + logrus.Debugf("SSH Key Name %s given does exist!", sshKeyName) + } + logrus.Debug("CloudInit: ") + vmTemplate = &kubirtv1.VirtualMachineInstanceTemplateSpec{ + ObjectMeta: k8smetav1.ObjectMeta{ + Annotations: vmiAnnotations(pvcName, sshKeyName), + Labels: vmiLabels, + }, + Spec: kubirtv1.VirtualMachineInstanceSpec{ + Hostname: vmName, + Networks: []kubirtv1.Network{ + { + Name: "default", + NetworkSource: kubirtv1.NetworkSource{ + Multus: &kubirtv1.MultusNetwork{ + NetworkName: "default/service-network", + }, + }, + }, + }, + Volumes: []kubirtv1.Volume{ + { + Name: "disk-0", + VolumeSource: kubirtv1.VolumeSource{ + PersistentVolumeClaim: &kubirtv1.PersistentVolumeClaimVolumeSource{ + PersistentVolumeClaimVolumeSource: v1.PersistentVolumeClaimVolumeSource{ + ClaimName: pvcName, + }, + }, + }, + }, + { + Name: "cloudinitdisk", + VolumeSource: kubirtv1.VolumeSource{ + CloudInitNoCloud: &kubirtv1.CloudInitNoCloudSource{ + UserDataSecretRef: &v1.LocalObjectReference{Name: secretName}, + NetworkDataSecretRef: &v1.LocalObjectReference{Name: secretName}, + }, + }, + }, + }, + Domain: kubirtv1.DomainSpec{ + CPU: &kubirtv1.CPU{ + Cores: uint32(vCpu), + Sockets: uint32(1), + Threads: uint32(1), + }, + Memory: &kubirtv1.Memory{ + Guest: &_memory, + }, + Devices: kubirtv1.Devices{ + Inputs: []kubirtv1.Input{ + { + Bus: "usb", + Type: "tablet", + Name: "tablet", + }, + }, + Interfaces: []kubirtv1.Interface{ + { + Name: "default", + Model: "virtio", + InterfaceBindingMethod: kubirtv1.DefaultBridgeNetworkInterface().InterfaceBindingMethod, + }, + }, + Disks: []kubirtv1.Disk{ + { + BootOrder: PointerToUint(1), + Name: "disk-0", + DiskDevice: kubirtv1.DiskDevice{ + Disk: &kubirtv1.DiskTarget{ + Bus: "virtio", + }, + }, + }, + { + Name: "cloudinitdisk", + DiskDevice: kubirtv1.DiskDevice{ + Disk: &kubirtv1.DiskTarget{ + Bus: "virtio", + }, + }, + }, + }, + }, + Resources: kubirtv1.ResourceRequirements{ + Limits: v1.ResourceList{ + "cpu": resource.MustParse(strconv.Itoa(vCpu)), + "memory": resource.MustParse(memory), + }, + Requests: v1.ResourceList{ + "memory": resource.MustParse(memory), + }, + }, + }, + Affinity: &v1.Affinity{ + PodAntiAffinity: &v1.PodAntiAffinity{ + PreferredDuringSchedulingIgnoredDuringExecution: []v1.WeightedPodAffinityTerm{ + { + Weight: int32(1), + PodAffinityTerm: v1.PodAffinityTerm{ + TopologyKey: "kubernetes.io/hostname", + LabelSelector: &k8smetav1.LabelSelector{ + MatchLabels: map[string]string{ + prefix + "/vmNamePrefix": vmName, + }, + }, + }, + }, + }, + }, + }, + }, + } + return +} + +// vmiAnnotations generates a map of strings to be injected as annotations from a PVC name and an SSK Keyname +func vmiAnnotations(pvcName string, sshKeyName string) map[string]string { + sshKey := "[]" + if sshKeyName != "" { + sshKey = "[\"" + sshKeyName + "\"]" + } + return map[string]string{ + prefix + "/diskNames": "[\"" + pvcName + "\"]", + prefix + "/sshNames": sshKey, + } +} + +//CreateCloudInitDataFromSecret creates a cloud-init configmap from a secret +func createCloudInitDataFromSecret(c *k8s.Clientset, vmName string, uid types.UID, secretName, namespace, userData, networkData string) (secret *v1.Secret, err error) { + toCreate := &v1.Secret{ + TypeMeta: k8smetav1.TypeMeta{ + Kind: "Secret", + APIVersion: "v1", + }, + ObjectMeta: k8smetav1.ObjectMeta{ + Name: secretName, + Namespace: namespace, + Labels: map[string]string{ + prefix + "/cloud-init-template": "harvester", + }, + OwnerReferences: []k8smetav1.OwnerReference{ + { + APIVersion: "kubevirt.io/v1", + Kind: "VirtualMachine", + Name: vmName, + UID: uid, + }, + }, + }, + Type: "secret", + Data: map[string][]byte{ + "userdata": []byte(userData), + "networkdata": []byte(networkData), + }, + } + resp, err := c.CoreV1().Secrets(namespace).Create(context.TODO(), toCreate, k8smetav1.CreateOptions{}) + if err != nil { + return nil, errors.Wrap(err, "error during getting cloud-init secret") + } + return resp, nil +} + +func (h *HarVMer) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (resp *pbecs.DeleteEcsResp, err error) { + if req.Namespace == "" { + return nil, errors.New("namespace is required") + } + vm, err := h.harvCli.KubevirtV1().VirtualMachines(req.GetNamespace()).Get(context.TODO(), req.GetInstanceName(), k8smetav1.GetOptions{}) + if err != nil { + return nil, errors.Wrap(err, "VM does not exist") + } + err = h.harvCli.KubevirtV1().VirtualMachines(req.GetNamespace()).Delete(context.TODO(), req.GetInstanceName(), k8smetav1.DeleteOptions{}) + if err != nil { + logrus.Errorf("delete vm error: %v", err) + return nil, errors.Wrap(err, "VM could not be deleted successfully: %w") + } + //delete vm disk + if req.DiskName != "" { + for _, delName := range strings.Split(req.DiskName, ",") { + for _, disk := range vm.Spec.Template.Spec.Volumes { + if disk.Name == delName { + ClaimName := disk.VolumeSource.PersistentVolumeClaim.ClaimName + err1 := h.k8sCli.CoreV1().PersistentVolumeClaims(req.GetNamespace()).Delete(context.TODO(), ClaimName, k8smetav1.DeleteOptions{}) + if err1 != nil { + logrus.Errorf("delete pvc failed,err:%v", err1) + return nil, errors.Wrap(err, "VM disk not be deleted successfully") + } + } + } + } + } + return &pbecs.DeleteEcsResp{ + Provider: pbtenant.CloudProvider_harvester, + AccountName: h.tenanter.AccountName(), + }, nil +} + +func (h *HarVMer) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (resp *pbecs.UpdateEcsResp, err error) { + //查询删除的vm + vm, err := h.harvCli.KubevirtV1().VirtualMachines(req.GetNamespace()).Get(context.TODO(), req.GetInstanceName(), k8smetav1.GetOptions{}) + if err != nil { + return nil, errors.Wrap(err, "VM does not exist") + } + if req.Cpu != "" && req.Memory != "" { + vm.Spec.Template.Spec.Domain.Resources = kubirtv1.ResourceRequirements{ + Limits: v1.ResourceList{ + "cpu": resource.MustParse(req.Cpu), + "memory": resource.MustParse(req.Memory), + }, + } + } + vm.ObjectMeta.Annotations["field.cattle.io/description"] = req.Description + if req.Cpu != "" { + j, err := strconv.ParseUint(req.Cpu, 10, 32) + if err != nil { + return nil, errors.Wrap(err, "cpu is not a number") + } + vm.Spec.Template.Spec.Domain.CPU = &kubirtv1.CPU{ + Cores: uint32(j), + Sockets: uint32(1), + Threads: uint32(1), + } + } + if req.Memory != "" { + _memory := resource.MustParse(req.Memory) + vm.Spec.Template.Spec.Domain.Memory = &kubirtv1.Memory{ + Guest: &_memory, + } + } + if err != nil { + return nil, errors.Wrap(err, "Harvester client connection failed") + } + //update + _, err = h.harvCli.KubevirtV1().VirtualMachines(req.GetNamespace()).Update(context.TODO(), vm, k8smetav1.UpdateOptions{}) + if err != nil { + return nil, errors.Wrap(err, "VM update failed") + } + if req.IsRestart { + //重启 + err = restartVmByName(h.harvCli, req.GetNamespace(), req.GetInstanceName()) + if err != nil { + return nil, errors.Wrap(err, "VM restart failed") + } + } + return &pbecs.UpdateEcsResp{ + Provider: pbtenant.CloudProvider_harvester, + AccountName: h.tenanter.AccountName(), + }, nil +} + +func (h *HarVMer) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (resp *pbecs.ListDetailResp, err error) { + vmList, err := h.harvCli.KubevirtV1().VirtualMachines(req.GetNamespace()).List(context.TODO(), k8smetav1.ListOptions{}) + if err != nil { + return nil, errors.Wrap(err, "VM list failed") + } + vmiList, err := h.harvCli.KubevirtV1().VirtualMachineInstances(req.GetNamespace()).List(context.TODO(), k8smetav1.ListOptions{}) + if err != nil { + return nil, errors.Wrap(err, "VMI list failed") + } + vmiMap := map[string]kubirtv1.VirtualMachineInstance{} + for _, vmi := range vmiList.Items { + vmiMap[vmi.Name] = vmi + } + var ecses = make([]*pbecs.EcsInstance, len(vmList.Items)) + for k, vm := range vmList.Items { + running := *vm.Spec.Running + var state string + if running { + state = "Running" + } else { + state = "Not Running" + } + IP := make([]string, 0) + if vmiMap[vm.Name].Status.Interfaces == nil { + IP = append(IP, "") + } else { + IP = append(IP, vmiMap[vm.Name].Status.Interfaces[0].IP) + } + ecses[k] = &pbecs.EcsInstance{ + Provider: pbtenant.CloudProvider_harvester, + AccountName: h.tenanter.AccountName(), + Status: state, + InstanceName: vm.Name, + Node: vmiMap[vm.Name].Status.NodeName, + Cpu: vm.Spec.Template.Spec.Domain.Resources.Limits.Cpu().String(), + Memory: vm.Spec.Template.Spec.Domain.Resources.Limits.Memory().String(), + PublicIps: IP, + CreationTime: vm.CreationTimestamp.String(), + Description: vm.ObjectMeta.Annotations["field.cattle.io/description"], + Namespace: vm.Namespace, + } + } + isFinished := false + if len(ecses) > 0 { + isFinished = true + } + return &pbecs.ListDetailResp{ + Ecses: ecses, + Finished: isFinished, + }, nil +} + +func (h *HarVMer) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) { + status := "" + switch req.GetActionType() { + case pbecs.ActionType_start: + err := startVmByName(h.harvCli, req.GetNamespace(), req.GetVmName()) + if err != nil { + return nil, err + } + status = "Running" + case pbecs.ActionType_stop: + err := stopVmByName(h.harvCli, req.GetNamespace(), req.GetVmName()) + if err != nil { + return nil, err + } + status = "Off" + case pbecs.ActionType_restart: + err := restartVmByName(h.harvCli, req.GetNamespace(), req.GetVmName()) + if err != nil { + return nil, err + } + status = "Running" + } + return &pbecs.ActionResp{ + Provider: pbtenant.CloudProvider_harvester, + AccountName: h.tenanter.AccountName(), + Status: status, + }, nil +} + +//startVmByName starts a VM by first issuing a GET using the VM name, then updating the resulting VM object +func startVmByName(c *harvClient.Clientset, namespace, vmName string) error { + vm, err := c.KubevirtV1().VirtualMachines(namespace).Get(context.TODO(), vmName, k8smetav1.GetOptions{}) + if err != nil { + return errors.Wrap(err, "VM not found") + } + *vm.Spec.Running = true + _, err = c.KubevirtV1().VirtualMachines(namespace).Update(context.TODO(), vm, k8smetav1.UpdateOptions{}) + if err != nil { + return errors.Wrap(err, "VM start failed") + } + return nil +} + +//stopVmByName will stop a VM by first finding it by its name and then call stopBMbyRef function +func stopVmByName(c *harvClient.Clientset, namespace, vmName string) error { + vm, err := c.KubevirtV1().VirtualMachines(namespace).Get(context.TODO(), vmName, k8smetav1.GetOptions{}) + if err != nil { + return errors.Wrap(err, "VM not found") + } + *vm.Spec.Running = false + _, err = c.KubevirtV1().VirtualMachines(namespace).Update(context.TODO(), vm, k8smetav1.UpdateOptions{}) + if err != nil { + return errors.Wrap(err, "VM stop failed") + } + return nil +} + +//restartVMbyName will restart a VM by first finding it by its name and then call restartVMbyRef function +func restartVmByName(c *harvClient.Clientset, namespace, vmName string) error { + vm, err := c.KubevirtV1().VirtualMachines(namespace).Get(context.TODO(), vmName, k8smetav1.GetOptions{}) + if err != nil { + return errors.Wrap(err, "VM not found") + } + err = stopVmByName(c, namespace, vm.Name) + if err != nil { + return errors.Wrap(err, "VM stop failed") + } + select { + case <-time.Tick(1 * time.Second): + return startVmByName(c, namespace, vm.Name) + } +} diff --git a/adaptor/vm_adaptor/service/ecser/harvester_util.go b/adaptor/vm_adaptor/service/ecser/harvester_util.go new file mode 100644 index 00000000..bf578e7d --- /dev/null +++ b/adaptor/vm_adaptor/service/ecser/harvester_util.go @@ -0,0 +1,444 @@ +package ecser + +import ( + "bytes" + "crypto/x509" + "encoding/json" + "encoding/pem" + "fmt" + harvclient "github.com/harvester/harvester/pkg/generated/clientset/versioned" + "io/ioutil" + k8s "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "math/rand" + "os" + "path/filepath" + "regexp" + "strings" + "sync" + "time" + + "github.com/docker/docker/pkg/namesgenerator" + "github.com/pkg/errors" + "github.com/rancher/cli/cliclient" + "github.com/rancher/cli/config" + "github.com/rancher/norman/clientbase" + ntypes "github.com/rancher/norman/types" + "github.com/sirupsen/logrus" + "github.com/urfave/cli" + regen "github.com/zach-klippenstein/goregen" + k8sv1 "k8s.io/api/core/v1" +) + +const ( + letters = "abcdefghijklmnopqrstuvwxyz0123456789" + cfgFile = "cli2.json" +) + +var ( + // ManagementResourceTypes lists the types we use the management client for + ManagementResourceTypes = []string{"cluster", "node", "project"} + // ProjectResourceTypes lists the types we use the cluster client for + ProjectResourceTypes = []string{"secret", "namespacedSecret", "workload"} + // ClusterResourceTypes lists the types we use the project client for + ClusterResourceTypes = []string{"persistentVolume", "storageClass", "namespace"} + clientMutex = &sync.Mutex{} +) + +type MemberData struct { + Name string + MemberType string + AccessType string +} + +type RoleTemplate struct { + ID string + Name string + Description string +} + +type RoleTemplateBinding struct { + ID string + User string + Role string + Created string +} + +func loadAndVerifyCert(path string) (string, error) { + caCert, err := ioutil.ReadFile(path) + if err != nil { + return "", err + } + return verifyCert(caCert) +} + +func verifyCert(caCert []byte) (string, error) { + // replace the escaped version of the line break + caCert = bytes.Replace(caCert, []byte(`\n`), []byte("\n"), -1) + + block, _ := pem.Decode(caCert) + + if nil == block { + return "", errors.New("No cert was found") + } + + parsedCert, err := x509.ParseCertificate(block.Bytes) + if err != nil { + return "", err + } + + if !parsedCert.IsCA { + return "", errors.New("CACerts is not valid") + } + return string(caCert), nil +} + +func loadConfig(ctx *cli.Context) (config.Config, error) { + // path will always be set by the global flag default + path := ctx.GlobalString("config") + path = filepath.Join(path, cfgFile) + + cf := config.Config{ + Path: path, + Servers: make(map[string]*config.ServerConfig), + } + + content, err := ioutil.ReadFile(path) + if os.IsNotExist(err) { + return cf, nil + } else if err != nil { + return cf, err + } + + err = json.Unmarshal(content, &cf) + cf.Path = path + + return cf, err +} + +func lookupConfig(ctx *cli.Context) (*config.ServerConfig, error) { + cf, err := loadConfig(ctx) + if err != nil { + return nil, err + } + + cs := cf.FocusedServer() + if cs == nil { + return nil, errors.New("no configuration found, run `login`") + } + + return cs, nil +} + +func GetClient(ctx *cli.Context) (*cliclient.MasterClient, error) { + cf, err := lookupConfig(ctx) + if err != nil { + return nil, err + } + + mc, err := cliclient.NewMasterClient(cf) + if err != nil { + return nil, err + } + + return mc, nil +} + +// GetResourceType maps an incoming resource type to a valid one from the schema +func GetResourceType(c *cliclient.MasterClient, resource string) (string, error) { + if c.ManagementClient != nil { + for key := range c.ManagementClient.APIBaseClient.Types { + if strings.EqualFold(key, resource) { + return key, nil + } + } + } + if c.ProjectClient != nil { + for key := range c.ProjectClient.APIBaseClient.Types { + if strings.EqualFold(key, resource) { + return key, nil + } + } + } + if c.ClusterClient != nil { + for key := range c.ClusterClient.APIBaseClient.Types { + if strings.EqualFold(key, resource) { + return key, nil + } + } + } + return "", fmt.Errorf("unknown resource type: %s", resource) +} + +func Lookup(c *cliclient.MasterClient, name string, types ...string) (*ntypes.Resource, error) { + var byName *ntypes.Resource + + for _, schemaType := range types { + rt, err := GetResourceType(c, schemaType) + if err != nil { + logrus.Debugf("Error GetResourceType: %v", err) + return nil, err + } + var schemaClient clientbase.APIBaseClientInterface + // the schemaType dictates which client we need to use + if c.ManagementClient != nil { + if _, ok := c.ManagementClient.APIBaseClient.Types[rt]; ok { + schemaClient = c.ManagementClient + } + } + if c.ProjectClient != nil { + if _, ok := c.ProjectClient.APIBaseClient.Types[rt]; ok { + schemaClient = c.ProjectClient + } + } + if c.ClusterClient != nil { + if _, ok := c.ClusterClient.APIBaseClient.Types[rt]; ok { + schemaClient = c.ClusterClient + } + } + + // Attempt to get the resource by ID + var resource ntypes.Resource + + if err := schemaClient.ByID(schemaType, name, &resource); !clientbase.IsNotFound(err) && err != nil { + logrus.Debugf("Error schemaClient.ByID: %v", err) + return nil, err + } else if err == nil && resource.ID == name { + return &resource, nil + } + + // Resource was not found assuming the ID, check if it's the name of a resource + var collection ntypes.ResourceCollection + + listOpts := &ntypes.ListOpts{ + Filters: map[string]interface{}{ + "name": name, + "removed_null": 1, + }, + } + + if err := schemaClient.List(schemaType, listOpts, &collection); !clientbase.IsNotFound(err) && err != nil { + logrus.Debugf("Error schemaClient.List: %v", err) + return nil, err + } + + if len(collection.Data) > 1 { + ids := []string{} + for _, data := range collection.Data { + ids = append(ids, data.ID) + } + return nil, fmt.Errorf("multiple resources of type %s found for name %s: %v", schemaType, name, ids) + } + + // No matches for this schemaType, try the next one + if len(collection.Data) == 0 { + continue + } + + if byName != nil { + return nil, fmt.Errorf("multiple resources named %s: %s:%s, %s:%s", name, collection.Data[0].Type, + collection.Data[0].ID, byName.Type, byName.ID) + } + + byName = &collection.Data[0] + + } + + if byName == nil { + return nil, fmt.Errorf("not found: %s", name) + } + + return byName, nil +} + +func RandomName() string { + return strings.Replace(namesgenerator.GetRandomName(0), "_", "-", -1) +} + +// RandomLetters returns a string with random letters of length n +func RandomLetters(n int) string { + rand.Seed(time.Now().UnixNano()) + b := make([]byte, n) + for i := range b { + b[i] = letters[rand.Intn(len(letters))] + } + return string(b) +} + +func appendTabDelim(buf *bytes.Buffer, value string) { + if buf.Len() == 0 { + buf.WriteString(value) + } else { + buf.WriteString("\t") + buf.WriteString(value) + } +} + +func SimpleFormat(values [][]string) (string, string) { + headerBuffer := bytes.Buffer{} + valueBuffer := bytes.Buffer{} + for _, v := range values { + appendTabDelim(&headerBuffer, v[0]) + if strings.Contains(v[1], "{{") { + appendTabDelim(&valueBuffer, v[1]) + } else { + appendTabDelim(&valueBuffer, "{{."+v[1]+"}}") + } + } + + headerBuffer.WriteString("\n") + valueBuffer.WriteString("\n") + + return headerBuffer.String(), valueBuffer.String() +} + +func defaultAction(fn func(ctx *cli.Context) error) func(ctx *cli.Context) error { + return func(ctx *cli.Context) error { + if ctx.Bool("help") { + err := cli.ShowAppHelp(ctx) + if err != nil { + logrus.Info("Issue encountered during executing help command") + } + return nil + } + return fn(ctx) + } +} + +func SplitOnColon(s string) []string { + return strings.Split(s, ":") +} + +func parseClusterAndProjectID(id string) (string, string, error) { + // Validate id + // Examples: + // c-qmpbm:p-mm62v + // c-qmpbm:project-mm62v + // See https://github.com/rancher/rancher/issues/14400 + if match, _ := regexp.MatchString("((local)|(c-[[:alnum:]]{5})):(p|project)-[[:alnum:]]{5}", id); match { + parts := SplitOnColon(id) + return parts[0], parts[1], nil + } + return "", "", fmt.Errorf("unable to extract clusterid and projectid from [%s]", id) +} + +// getClusterNames maps cluster ID to name and defaults to ID if name is blank +func getClusterNames(ctx *cli.Context, c *cliclient.MasterClient) (map[string]string, error) { + clusterNames := make(map[string]string) + clusterCollection, err := c.ManagementClient.Cluster.List(defaultListOpts(ctx)) + if err != nil { + return clusterNames, err + } + + for _, cluster := range clusterCollection.Data { + if cluster.Name == "" { + clusterNames[cluster.ID] = cluster.ID + } else { + clusterNames[cluster.ID] = cluster.Name + } + } + return clusterNames, nil +} + +func baseListOpts() *ntypes.ListOpts { + return &ntypes.ListOpts{ + Filters: map[string]interface{}{ + "limit": -1, + "all": true, + }, + } +} + +func defaultListOpts(ctx *cli.Context) *ntypes.ListOpts { + listOpts := baseListOpts() + if ctx != nil && !ctx.Bool("all") { + listOpts.Filters["removed_null"] = "1" + listOpts.Filters["state_ne"] = []string{ + "inactive", + "stopped", + "removing", + } + delete(listOpts.Filters, "all") + } + if ctx != nil && ctx.Bool("system") { + delete(listOpts.Filters, "system") + } else { + listOpts.Filters["system"] = "false" + } + return listOpts +} + +//NewTrue returns a pointer to true +func NewTrue() *bool { + b := true + return &b +} + +// RandomID returns a random string used as an ID internally in Harvester. +func RandomID() string { + res, err := regen.Generate("[a-z]{3}[0-9][a-z]") + if err != nil { + fmt.Println("Random function was not successful!") + return "" + } + return res +} + +// GetHarvesterClient creates a Client for Harvester from Config input +func GetHarvesterClient(host string, token string) (*harvclient.Clientset, error) { + clientConfig := &rest.Config{ + Host: host, + BearerToken: token, + TLSClientConfig: rest.TLSClientConfig{ + Insecure: true, + }, + } + clientConfig.Host = host + clientMutex.Lock() + forConfig, err := harvclient.NewForConfig(clientConfig) + clientMutex.Unlock() + if err != nil { + return nil, err + } + return forConfig, nil +} + +// GetKubernetesClient creates a Client for Kubernetes from Config input +func GetKubernetesClient(host string, token string) (*k8s.Clientset, error) { + clientConfig := &rest.Config{ + Host: fmt.Sprintf("%s:%d", host, 6443), + BearerToken: token, + TLSClientConfig: rest.TLSClientConfig{ + Insecure: true, + }, + } + + clientConfig.Host = host + clientMutex.Lock() + k8sCli, err := k8s.NewForConfig(clientConfig) + clientMutex.Unlock() + if err != nil { + return nil, err + } + return k8sCli, nil +} + +func MustPVCTemplatesToString(pvcs []k8sv1.PersistentVolumeClaim) string { + result, err := PVCTemplatesToString(pvcs) + if err != nil { + panic(err) + } + return result +} + +func PVCTemplatesToString(pvcs []k8sv1.PersistentVolumeClaim) (string, error) { + b, err := json.Marshal(pvcs) + if err != nil { + return "", err + } + return string(b), nil +} + +func PointerToUint(i uint) *uint { + return &i +} diff --git a/adaptor/vm_adaptor/service/ecser/huawei.go b/adaptor/vm_adaptor/service/ecser/huawei.go index 92c925eb..cec42fa1 100644 --- a/adaptor/vm_adaptor/service/ecser/huawei.go +++ b/adaptor/vm_adaptor/service/ecser/huawei.go @@ -237,8 +237,8 @@ func (ecs *HuaweiEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) InstanceType: v.Flavor.Name, PublicIps: PublicIps, InnerIps: InnerIps, - Cpu: int32(vCpu), - Memory: int32(vMemory), + Cpu: strconv.FormatInt(vCpu, 10), + Memory: strconv.FormatInt(vMemory, 10), Description: *v.Description, Status: v.Status, CreationTime: v.Created, @@ -261,3 +261,7 @@ func (ecs *HuaweiEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) RequestId: "", }, nil } + +func (ecs *HuaweiEcs) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) { + return nil, nil +} diff --git a/adaptor/vm_adaptor/service/ecser/tencent.go b/adaptor/vm_adaptor/service/ecser/tencent.go index 953d8859..8de62850 100644 --- a/adaptor/vm_adaptor/service/ecser/tencent.go +++ b/adaptor/vm_adaptor/service/ecser/tencent.go @@ -2,6 +2,7 @@ package ecser import ( "context" + "strconv" string_ "github.com/alibabacloud-go/darabonba-string/client" util "github.com/alibabacloud-go/tea-utils/service" @@ -151,8 +152,8 @@ func (ecs *TencentCvm) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) RegionName: ecs.region.GetName(), PublicIps: make([]string, len(v.PublicIpAddresses)), InstanceType: *v.InstanceType, - Cpu: int32(*v.CPU), - Memory: int32(*v.Memory), + Cpu: strconv.FormatInt(*v.CPU, 10), + Memory: strconv.FormatInt(*v.Memory, 10), Description: "", Status: *v.InstanceState, CreationTime: *v.CreatedTime, @@ -184,3 +185,7 @@ func (ecs *TencentCvm) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) RequestId: *resp.Response.RequestId, }, nil } + +func (ecs *TencentCvm) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) { + return nil, nil +} diff --git a/common/server/server_ecs.go b/common/server/server_ecs.go index bb40a2fb..28bfc28e 100644 --- a/common/server/server_ecs.go +++ b/common/server/server_ecs.go @@ -80,3 +80,13 @@ func (s *Server) ListEcsAll(ctx context.Context, req *pbecs.ListAllReq) (*pbecs. } return resp, nil } + +// ActionEcs return ecs action +func (s *Server) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (*pbecs.ActionResp, error) { + resp, err := ecs.ActionEcs(ctx, req) + if err != nil { + glog.Errorf("ActionEcs error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} diff --git a/go.mod b/go.mod index b8706aee..88dc23e0 100644 --- a/go.mod +++ b/go.mod @@ -10,52 +10,157 @@ require ( github.com/alibabacloud-go/tea-utils v1.3.9 github.com/aliyun/alibaba-cloud-sdk-go v1.61.1530 github.com/bitly/go-simplejson v0.5.0 + github.com/docker/docker v20.10.6+incompatible github.com/go-yaml/yaml v2.1.0+incompatible github.com/golang/glog v1.0.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.10.0 + github.com/harvester/harvester v1.0.0 github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.0.82 + github.com/longhorn/longhorn-manager v1.2.3-rc2 github.com/pkg/errors v0.9.1 + github.com/rancher/cli v2.2.0+incompatible + github.com/rancher/norman v0.0.0-20211201154850-abe17976423e + github.com/sirupsen/logrus v1.8.1 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.377 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.377 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.377 + github.com/urfave/cli v1.22.2 + github.com/zach-klippenstein/goregen v0.0.0-20160303162051-795b5e3961ea google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e google.golang.org/grpc v1.45.0 google.golang.org/protobuf v1.28.0 - k8s.io/api v0.0.0-20190620084959-7cf5895f2711 - k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719 - k8s.io/client-go v0.0.0-20190620085101-78d2af792bab + k8s.io/api v0.22.3 + k8s.io/apimachinery v0.22.3 + k8s.io/client-go v12.0.0+incompatible + kubevirt.io/client-go v0.45.0 ) require ( + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68 // indirect github.com/alibabacloud-go/endpoint-util v1.1.0 // indirect github.com/alibabacloud-go/openapi-util v0.0.7 // indirect github.com/aliyun/credentials-go v1.1.2 // indirect - github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/blang/semver v3.5.1+incompatible // indirect + github.com/c9s/goprocinfo v0.0.0-20210130143923-c95fcf8c64a8 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415 // indirect + github.com/emicklei/go-restful v2.10.0+incompatible // indirect + github.com/evanphx/json-patch v4.11.0+incompatible // indirect + github.com/fsnotify/fsnotify v1.5.1 // indirect + github.com/ghodss/yaml v1.0.0 // indirect + github.com/go-logr/logr v0.4.0 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.19.5 // indirect + github.com/go-openapi/spec v0.20.3 // indirect + github.com/go-openapi/swag v0.19.14 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/gofuzz v1.0.0 // indirect - github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d // indirect - github.com/imdario/mergo v0.3.5 // indirect - github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect - github.com/json-iterator/go v1.1.10 // indirect + github.com/google/go-cmp v0.5.7 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/google/gxui v0.0.0-20151028112939-f85e0a97b3a4 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/gnostic v0.5.5 // indirect + github.com/gorilla/handlers v1.4.2 // indirect + github.com/gorilla/websocket v1.4.2 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/imdario/mergo v0.3.12 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.11 // indirect + github.com/k8snetworkplumbingwg/network-attachment-definition-client v0.0.0-20200331171230-d50e42f2b669 // indirect + github.com/kubernetes-csi/external-snapshotter/v2 v2.1.1 // indirect + github.com/longhorn/go-iscsi-helper v0.0.0-20201111045018-ee87992ec536 // indirect + github.com/mailru/easyjson v0.7.6 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.1 // indirect - github.com/spf13/pflag v1.0.1 // indirect + github.com/openshift/custom-resource-status v0.0.0-20200602122900-c002fd1547ca // indirect + github.com/pborman/uuid v1.2.0 // indirect + github.com/prometheus/client_golang v1.11.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.32.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/rancher/lasso v0.0.0-20210709145333-6c6cd7fd6607 // indirect + github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20210727200656-10b094e30007 // indirect + github.com/rancher/types v0.0.0-20220328215343-4370ff10ecd5 // indirect + github.com/rancher/wrangler v0.8.10 // indirect + github.com/russross/blackfriday/v2 v2.0.1 // indirect + github.com/satori/go.uuid v1.2.0 // indirect + github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect github.com/tjfoc/gmsm v1.3.2 // indirect - golang.org/x/crypto v0.0.0-20210920023735-84f357641f63 // indirect + golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a // indirect + golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect - google.golang.org/appengine v1.6.6 // indirect - gopkg.in/inf.v0 v0.9.0 // indirect + golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/klog v0.3.1 // indirect - k8s.io/utils v0.0.0-20190221042446-c2654d5206da // indirect + k8s.io/apiextensions-apiserver v0.22.3 // indirect + k8s.io/component-base v0.21.4 // indirect + k8s.io/klog/v2 v2.10.0 // indirect + k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect + k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a // indirect + kubevirt.io/containerized-data-importer v1.36.0 // indirect + kubevirt.io/controller-lifecycle-operator-sdk v0.2.0 // indirect + sigs.k8s.io/cluster-api v0.4.4 // indirect + sigs.k8s.io/controller-runtime v0.9.7 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) + +replace ( + github.com/dgrijalva/jwt-go => github.com/dgrijalva/jwt-go v3.2.1-0.20200107013213-dc14462fd587+incompatible + github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d + github.com/docker/docker => github.com/docker/docker v1.4.2-0.20200203170920-46ec8731fbce + github.com/go-kit/kit => github.com/go-kit/kit v0.3.0 + github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.4.1 + github.com/knative/pkg => github.com/rancher/pkg v0.0.0-20190514055449-b30ab9de040e + github.com/openshift/api => github.com/openshift/api v0.0.0-20191219222812-2987a591a72c + github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20200521150516-05eb9880269c + github.com/operator-framework/operator-lifecycle-manager => github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190128024246-5eb7ae5bdb7a + github.com/rancher/rancher/pkg/apis => github.com/rancher/rancher/pkg/apis v0.0.0-20211208233239-77392a65423d + github.com/rancher/rancher/pkg/client => github.com/rancher/rancher/pkg/client v0.0.0-20211208233239-77392a65423d + + helm.sh/helm/v3 => github.com/rancher/helm/v3 v3.5.4-rancher.1 + k8s.io/api => k8s.io/api v0.21.2 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.21.2 + k8s.io/apimachinery => k8s.io/apimachinery v0.21.2 + k8s.io/apiserver => k8s.io/apiserver v0.21.2 + k8s.io/cli-runtime => k8s.io/cli-runtime v0.21.2 + k8s.io/client-go => k8s.io/client-go v0.21.2 + k8s.io/cloud-provider => k8s.io/cloud-provider v0.21.2 + k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.21.2 + k8s.io/code-generator => k8s.io/code-generator v0.21.2 + k8s.io/component-base => k8s.io/component-base v0.21.2 + k8s.io/component-helpers => k8s.io/component-helpers v0.21.2 + k8s.io/controller-manager => k8s.io/controller-manager v0.21.2 + k8s.io/cri-api => k8s.io/cri-api v0.21.2 + k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.21.2 + k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.21.2 + k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.21.2 + k8s.io/kube-proxy => k8s.io/kube-proxy v0.21.2 + k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.21.2 + k8s.io/kubectl => k8s.io/kubectl v0.21.2 + k8s.io/kubelet => k8s.io/kubelet v0.21.2 + k8s.io/kubernetes => k8s.io/kubernetes v1.21.2 + k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.21.2 + k8s.io/metrics => k8s.io/metrics v0.21.2 + k8s.io/mount-utils => k8s.io/mount-utils v0.21.2 + k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.21.2 + + kubevirt.io/client-go => github.com/kubevirt/client-go v0.45.0 + kubevirt.io/containerized-data-importer => github.com/rancher/kubevirt-containerized-data-importer v1.26.1-0.20210802100720-9bcf4e7ba0ce + sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v0.4.4 +) diff --git a/idl/pbecs/ecs.proto b/idl/pbecs/ecs.proto index e282082b..63bbda8a 100644 --- a/idl/pbecs/ecs.proto +++ b/idl/pbecs/ecs.proto @@ -23,9 +23,9 @@ message EcsInstance { // 实例类型 string instance_type = 7; // vcpu数 - int32 cpu = 8; + string cpu = 8; // 内存MB - int32 memory = 9; + string memory = 9; // 实例描述 string description = 10; // 状态 @@ -42,6 +42,11 @@ message EcsInstance { string resource_group_id = 16; // 收费类型 string instance_charge_type = 17; + // -----------harvester--------- + //虚拟机所在的节点 + string node = 18; + //namespace + string namespace =20; } //网络计费类型 @@ -104,6 +109,45 @@ message CreateEcsReq { string vpc_id = 18; //待创建云服务器所在的子网信息。需要指定vpcid对应VPC下已创建的子网(subnet)的网络ID,UUID格式。华为云必需 string subnet_id =19; + //-------------harvester--------------- + //命名空间 + string namespace =20; + //vCpu + int32 cpu = 21; + //memory + string memory = 22; + //ssh_key + string ssh_key = 23; + //diskName + string disk_name = 24; + //disk类型 disk,cd-rom + string disk_type = 25; + //卷大小 + string disk_size = 26; + //bus 总线指示要模拟的磁盘设备的类型,支持virtio, sata, scsi. + string bus = 27; + //网络名称 + string network_name =28; + //network_model 网络模式,支持e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio. + string network_model=29; + //网络 + string network =30; + //网络连接方法,默认bridge + string network_type =31; + //osType //系统类型 + string os_type = 32; + //machineType //机器类型 none、q35、pc + string machine_type = 33; + //machineName //主机名称,默认为虚拟机名称 + string machine_name =34; + //userDataTemplate //用户数据模板 + string user_data_template = 35; + //networkDataTemplate //网络数据模板 + string network_data_template = 36; + //vmTemplateName //模板名称 + string vm_template_name =37; + //vmTemplateVersion //版本号 + string vm_template_version = 38; } //系统磁盘 @@ -166,6 +210,13 @@ message DeleteEcsReq { //配置删除云服务器是否删除云服务器对应的数据盘,如果选择不删除,则系统仅做卸载操作,保留云硬盘资源。默认为false。 //取值为true或false。默认false;华为云 string delete_volume = 9; + //----------------harvester---------------- + //虚拟机名称 + string instance_name = 10; + //namespace + string namespace = 11; + //diskName,以“,” 分割 + string disk_name = 12; } //删除ECS返回值 @@ -199,7 +250,16 @@ message UpdateEcsReq { //实例描述 string description = 8; //实例重新加入的安全组列表,安全组ID不能重复。以”,“分割 - string security_group_ids = 9; + string security_group_ids = 9; + //---------------harvester----------------- + //namespace + string namespace = 10; + //cpu + string cpu = 11; + //memory + string memory = 12; + //修改配置后是否重启 + bool is_restart = 13; } //更新ECS返回值 @@ -228,6 +288,9 @@ message ListDetailReq { int32 page_size = 5; // 分页相关参数,下一页的token string next_token = 6; + //--------harvester--------- + //namespace + string namespace = 7; } //查询ECS返回值 @@ -246,6 +309,44 @@ message ListDetailResp { string request_id = 6; } +//虚拟机状态操作 +enum ActionType { + //启动 + start = 0; + //停止 + stop = 1; + //重启 + restart = 2; +} + +message ActionReq { + // 云名称 + pbtenant.CloudProvider provider = 1; + // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 + string account_name = 2; + // 区域Id,参考 tenant.proto 中的各个云的区域 + int32 region_id = 3; + //命名空间 + string namespace = 4; + //虚拟机名称 + string vm_name = 5 ; + //虚拟机操作状态 + ActionType action_type = 6 ; +} + +message ActionResp { + // 云名称 + pbtenant.CloudProvider provider = 1; + // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 + string account_name = 2; + // Ecs 机器集合 + repeated EcsInstance ecses = 3; + // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 + bool finished = 4; + //vm状态 + string status = 5; +} + message ListReq { // 云名称 pbtenant.CloudProvider provider = 1; @@ -318,4 +419,12 @@ service EcsService { get : "/apis/ecs/all" }; } + + //操作ecs(start-stop-restart) + rpc ActionEcs(ActionReq) returns (ActionResp){ + option (google.api.http) = { + post : "/apis/ecs/action" + body : "*" + }; + } } \ No newline at end of file diff --git a/lan_trans/idl/demo/demo.pb.gw.go b/lan_trans/idl/demo/demo.pb.gw.go index 5fedd6b4..66ed1dcd 100644 --- a/lan_trans/idl/demo/demo.pb.gw.go +++ b/lan_trans/idl/demo/demo.pb.gw.go @@ -77,13 +77,12 @@ func RegisterDemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/demo.DemoService/Echo", runtime.WithHTTPPathPattern("/apis/demo")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/demo.DemoService/Echo") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_DemoService_Echo_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_DemoService_Echo_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -140,13 +139,12 @@ func RegisterDemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/demo.DemoService/Echo", runtime.WithHTTPPathPattern("/apis/demo")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/demo.DemoService/Echo") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_DemoService_Echo_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_DemoService_Echo_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/lan_trans/idl/pbecs/ecs.pb.go b/lan_trans/idl/pbecs/ecs.pb.go index 1bd2bc17..8aad1ac6 100644 --- a/lan_trans/idl/pbecs/ecs.pb.go +++ b/lan_trans/idl/pbecs/ecs.pb.go @@ -71,6 +71,59 @@ func (InternetChargeType) EnumDescriptor() ([]byte, []int) { return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{0} } +//虚拟机状态操作 +type ActionType int32 + +const ( + //启动 + ActionType_start ActionType = 0 + //停止 + ActionType_stop ActionType = 1 + //重启 + ActionType_restart ActionType = 2 +) + +// Enum value maps for ActionType. +var ( + ActionType_name = map[int32]string{ + 0: "start", + 1: "stop", + 2: "restart", + } + ActionType_value = map[string]int32{ + "start": 0, + "stop": 1, + "restart": 2, + } +) + +func (x ActionType) Enum() *ActionType { + p := new(ActionType) + *p = x + return p +} + +func (x ActionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ActionType) Descriptor() protoreflect.EnumDescriptor { + return file_idl_pbecs_ecs_proto_enumTypes[1].Descriptor() +} + +func (ActionType) Type() protoreflect.EnumType { + return &file_idl_pbecs_ecs_proto_enumTypes[1] +} + +func (x ActionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ActionType.Descriptor instead. +func (ActionType) EnumDescriptor() ([]byte, []int) { + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{1} +} + //ECS 实例 type EcsInstance struct { state protoimpl.MessageState @@ -92,9 +145,9 @@ type EcsInstance struct { // 实例类型 InstanceType string `protobuf:"bytes,7,opt,name=instance_type,json=instanceType,proto3" json:"instance_type,omitempty"` // vcpu数 - Cpu int32 `protobuf:"varint,8,opt,name=cpu,proto3" json:"cpu,omitempty"` + Cpu string `protobuf:"bytes,8,opt,name=cpu,proto3" json:"cpu,omitempty"` // 内存MB - Memory int32 `protobuf:"varint,9,opt,name=memory,proto3" json:"memory,omitempty"` + Memory string `protobuf:"bytes,9,opt,name=memory,proto3" json:"memory,omitempty"` // 实例描述 Description string `protobuf:"bytes,10,opt,name=description,proto3" json:"description,omitempty"` // 状态 @@ -111,6 +164,11 @@ type EcsInstance struct { ResourceGroupId string `protobuf:"bytes,16,opt,name=resource_group_id,json=resourceGroupId,proto3" json:"resource_group_id,omitempty"` // 收费类型 InstanceChargeType string `protobuf:"bytes,17,opt,name=instance_charge_type,json=instanceChargeType,proto3" json:"instance_charge_type,omitempty"` + // -----------harvester--------- + //虚拟机所在的节点 + Node string `protobuf:"bytes,18,opt,name=node,proto3" json:"node,omitempty"` + //namespace + Namespace string `protobuf:"bytes,20,opt,name=namespace,proto3" json:"namespace,omitempty"` } func (x *EcsInstance) Reset() { @@ -194,18 +252,18 @@ func (x *EcsInstance) GetInstanceType() string { return "" } -func (x *EcsInstance) GetCpu() int32 { +func (x *EcsInstance) GetCpu() string { if x != nil { return x.Cpu } - return 0 + return "" } -func (x *EcsInstance) GetMemory() int32 { +func (x *EcsInstance) GetMemory() string { if x != nil { return x.Memory } - return 0 + return "" } func (x *EcsInstance) GetDescription() string { @@ -264,6 +322,20 @@ func (x *EcsInstance) GetInstanceChargeType() string { return "" } +func (x *EcsInstance) GetNode() string { + if x != nil { + return x.Node + } + return "" +} + +func (x *EcsInstance) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + //创建多家云ECS入参 type CreateEcsMultipleReq struct { state protoimpl.MessageState @@ -414,6 +486,45 @@ type CreateEcsReq struct { VpcId string `protobuf:"bytes,18,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"` //待创建云服务器所在的子网信息。需要指定vpcid对应VPC下已创建的子网(subnet)的网络ID,UUID格式。华为云必需 SubnetId string `protobuf:"bytes,19,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` + //-------------harvester--------------- + //命名空间 + Namespace string `protobuf:"bytes,20,opt,name=namespace,proto3" json:"namespace,omitempty"` + //vCpu + Cpu int32 `protobuf:"varint,21,opt,name=cpu,proto3" json:"cpu,omitempty"` + //memory + Memory string `protobuf:"bytes,22,opt,name=memory,proto3" json:"memory,omitempty"` + //ssh_key + SshKey string `protobuf:"bytes,23,opt,name=ssh_key,json=sshKey,proto3" json:"ssh_key,omitempty"` + //diskName + DiskName string `protobuf:"bytes,24,opt,name=disk_name,json=diskName,proto3" json:"disk_name,omitempty"` + //disk类型 disk,cd-rom + DiskType string `protobuf:"bytes,25,opt,name=disk_type,json=diskType,proto3" json:"disk_type,omitempty"` + //卷大小 + DiskSize string `protobuf:"bytes,26,opt,name=disk_size,json=diskSize,proto3" json:"disk_size,omitempty"` + //bus 总线指示要模拟的磁盘设备的类型,支持virtio, sata, scsi. + Bus string `protobuf:"bytes,27,opt,name=bus,proto3" json:"bus,omitempty"` + //网络名称 + NetworkName string `protobuf:"bytes,28,opt,name=network_name,json=networkName,proto3" json:"network_name,omitempty"` + //network_model 网络模式,支持e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio. + NetworkModel string `protobuf:"bytes,29,opt,name=network_model,json=networkModel,proto3" json:"network_model,omitempty"` + //网络 + Network string `protobuf:"bytes,30,opt,name=network,proto3" json:"network,omitempty"` + //网络连接方法,默认bridge + NetworkType string `protobuf:"bytes,31,opt,name=network_type,json=networkType,proto3" json:"network_type,omitempty"` + //osType //系统类型 + OsType string `protobuf:"bytes,32,opt,name=os_type,json=osType,proto3" json:"os_type,omitempty"` + //machineType //机器类型 none、q35、pc + MachineType string `protobuf:"bytes,33,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"` + //machineName //主机名称,默认为虚拟机名称 + MachineName string `protobuf:"bytes,34,opt,name=machine_name,json=machineName,proto3" json:"machine_name,omitempty"` + //userDataTemplate //用户数据模板 + UserDataTemplate string `protobuf:"bytes,35,opt,name=user_data_template,json=userDataTemplate,proto3" json:"user_data_template,omitempty"` + //networkDataTemplate //网络数据模板 + NetworkDataTemplate string `protobuf:"bytes,36,opt,name=network_data_template,json=networkDataTemplate,proto3" json:"network_data_template,omitempty"` + //vmTemplateName //模板名称 + VmTemplateName string `protobuf:"bytes,37,opt,name=vm_template_name,json=vmTemplateName,proto3" json:"vm_template_name,omitempty"` + //vmTemplateVersion //版本号 + VmTemplateVersion string `protobuf:"bytes,38,opt,name=vm_template_version,json=vmTemplateVersion,proto3" json:"vm_template_version,omitempty"` } func (x *CreateEcsReq) Reset() { @@ -581,6 +692,139 @@ func (x *CreateEcsReq) GetSubnetId() string { return "" } +func (x *CreateEcsReq) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *CreateEcsReq) GetCpu() int32 { + if x != nil { + return x.Cpu + } + return 0 +} + +func (x *CreateEcsReq) GetMemory() string { + if x != nil { + return x.Memory + } + return "" +} + +func (x *CreateEcsReq) GetSshKey() string { + if x != nil { + return x.SshKey + } + return "" +} + +func (x *CreateEcsReq) GetDiskName() string { + if x != nil { + return x.DiskName + } + return "" +} + +func (x *CreateEcsReq) GetDiskType() string { + if x != nil { + return x.DiskType + } + return "" +} + +func (x *CreateEcsReq) GetDiskSize() string { + if x != nil { + return x.DiskSize + } + return "" +} + +func (x *CreateEcsReq) GetBus() string { + if x != nil { + return x.Bus + } + return "" +} + +func (x *CreateEcsReq) GetNetworkName() string { + if x != nil { + return x.NetworkName + } + return "" +} + +func (x *CreateEcsReq) GetNetworkModel() string { + if x != nil { + return x.NetworkModel + } + return "" +} + +func (x *CreateEcsReq) GetNetwork() string { + if x != nil { + return x.Network + } + return "" +} + +func (x *CreateEcsReq) GetNetworkType() string { + if x != nil { + return x.NetworkType + } + return "" +} + +func (x *CreateEcsReq) GetOsType() string { + if x != nil { + return x.OsType + } + return "" +} + +func (x *CreateEcsReq) GetMachineType() string { + if x != nil { + return x.MachineType + } + return "" +} + +func (x *CreateEcsReq) GetMachineName() string { + if x != nil { + return x.MachineName + } + return "" +} + +func (x *CreateEcsReq) GetUserDataTemplate() string { + if x != nil { + return x.UserDataTemplate + } + return "" +} + +func (x *CreateEcsReq) GetNetworkDataTemplate() string { + if x != nil { + return x.NetworkDataTemplate + } + return "" +} + +func (x *CreateEcsReq) GetVmTemplateName() string { + if x != nil { + return x.VmTemplateName + } + return "" +} + +func (x *CreateEcsReq) GetVmTemplateVersion() string { + if x != nil { + return x.VmTemplateVersion + } + return "" +} + //系统磁盘 type SystemDisk struct { state protoimpl.MessageState @@ -815,6 +1059,13 @@ type DeleteEcsReq struct { //配置删除云服务器是否删除云服务器对应的数据盘,如果选择不删除,则系统仅做卸载操作,保留云硬盘资源。默认为false。 //取值为true或false。默认false;华为云 DeleteVolume string `protobuf:"bytes,9,opt,name=delete_volume,json=deleteVolume,proto3" json:"delete_volume,omitempty"` + //----------------harvester---------------- + //虚拟机名称 + InstanceName string `protobuf:"bytes,10,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` + //namespace + Namespace string `protobuf:"bytes,11,opt,name=namespace,proto3" json:"namespace,omitempty"` + //diskName,以“,” 分割 + DiskName string `protobuf:"bytes,12,opt,name=disk_name,json=diskName,proto3" json:"disk_name,omitempty"` } func (x *DeleteEcsReq) Reset() { @@ -912,6 +1163,27 @@ func (x *DeleteEcsReq) GetDeleteVolume() string { return "" } +func (x *DeleteEcsReq) GetInstanceName() string { + if x != nil { + return x.InstanceName + } + return "" +} + +func (x *DeleteEcsReq) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *DeleteEcsReq) GetDiskName() string { + if x != nil { + return x.DiskName + } + return "" +} + //删除ECS返回值 type DeleteEcsResp struct { state protoimpl.MessageState @@ -1012,6 +1284,15 @@ type UpdateEcsReq struct { Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` //实例重新加入的安全组列表,安全组ID不能重复。以”,“分割 SecurityGroupIds string `protobuf:"bytes,9,opt,name=security_group_ids,json=securityGroupIds,proto3" json:"security_group_ids,omitempty"` + //---------------harvester----------------- + //namespace + Namespace string `protobuf:"bytes,10,opt,name=namespace,proto3" json:"namespace,omitempty"` + //cpu + Cpu string `protobuf:"bytes,11,opt,name=cpu,proto3" json:"cpu,omitempty"` + //memory + Memory string `protobuf:"bytes,12,opt,name=memory,proto3" json:"memory,omitempty"` + //修改配置后是否重启 + IsRestart bool `protobuf:"varint,13,opt,name=is_restart,json=isRestart,proto3" json:"is_restart,omitempty"` } func (x *UpdateEcsReq) Reset() { @@ -1109,6 +1390,34 @@ func (x *UpdateEcsReq) GetSecurityGroupIds() string { return "" } +func (x *UpdateEcsReq) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *UpdateEcsReq) GetCpu() string { + if x != nil { + return x.Cpu + } + return "" +} + +func (x *UpdateEcsReq) GetMemory() string { + if x != nil { + return x.Memory + } + return "" +} + +func (x *UpdateEcsReq) GetIsRestart() bool { + if x != nil { + return x.IsRestart + } + return false +} + //更新ECS返回值 type UpdateEcsResp struct { state protoimpl.MessageState @@ -1203,6 +1512,9 @@ type ListDetailReq struct { PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 分页相关参数,下一页的token NextToken string `protobuf:"bytes,6,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` + //--------harvester--------- + //namespace + Namespace string `protobuf:"bytes,7,opt,name=namespace,proto3" json:"namespace,omitempty"` } func (x *ListDetailReq) Reset() { @@ -1279,6 +1591,13 @@ func (x *ListDetailReq) GetNextToken() string { return "" } +func (x *ListDetailReq) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + //查询ECS返回值 type ListDetailResp struct { state protoimpl.MessageState @@ -1373,6 +1692,183 @@ func (x *ListDetailResp) GetRequestId() string { return "" } +type ActionReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 云名称 + Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` + // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 + AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` + // 区域Id,参考 tenant.proto 中的各个云的区域 + RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` + //命名空间 + Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"` + //虚拟机名称 + VmName string `protobuf:"bytes,5,opt,name=vm_name,json=vmName,proto3" json:"vm_name,omitempty"` + //虚拟机操作状态 + ActionType ActionType `protobuf:"varint,6,opt,name=action_type,json=actionType,proto3,enum=pbecs.ActionType" json:"action_type,omitempty"` +} + +func (x *ActionReq) Reset() { + *x = ActionReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbecs_ecs_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionReq) ProtoMessage() {} + +func (x *ActionReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbecs_ecs_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionReq.ProtoReflect.Descriptor instead. +func (*ActionReq) Descriptor() ([]byte, []int) { + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{12} +} + +func (x *ActionReq) GetProvider() pbtenant.CloudProvider { + if x != nil { + return x.Provider + } + return pbtenant.CloudProvider(0) +} + +func (x *ActionReq) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *ActionReq) GetRegionId() int32 { + if x != nil { + return x.RegionId + } + return 0 +} + +func (x *ActionReq) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ActionReq) GetVmName() string { + if x != nil { + return x.VmName + } + return "" +} + +func (x *ActionReq) GetActionType() ActionType { + if x != nil { + return x.ActionType + } + return ActionType_start +} + +type ActionResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 云名称 + Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` + // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 + AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` + // Ecs 机器集合 + Ecses []*EcsInstance `protobuf:"bytes,3,rep,name=ecses,proto3" json:"ecses,omitempty"` + // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 + Finished bool `protobuf:"varint,4,opt,name=finished,proto3" json:"finished,omitempty"` + //vm状态 + Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *ActionResp) Reset() { + *x = ActionResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbecs_ecs_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionResp) ProtoMessage() {} + +func (x *ActionResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbecs_ecs_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionResp.ProtoReflect.Descriptor instead. +func (*ActionResp) Descriptor() ([]byte, []int) { + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{13} +} + +func (x *ActionResp) GetProvider() pbtenant.CloudProvider { + if x != nil { + return x.Provider + } + return pbtenant.CloudProvider(0) +} + +func (x *ActionResp) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *ActionResp) GetEcses() []*EcsInstance { + if x != nil { + return x.Ecses + } + return nil +} + +func (x *ActionResp) GetFinished() bool { + if x != nil { + return x.Finished + } + return false +} + +func (x *ActionResp) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + type ListReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1385,7 +1881,7 @@ type ListReq struct { func (x *ListReq) Reset() { *x = ListReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[12] + mi := &file_idl_pbecs_ecs_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1398,7 +1894,7 @@ func (x *ListReq) String() string { func (*ListReq) ProtoMessage() {} func (x *ListReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[12] + mi := &file_idl_pbecs_ecs_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1411,7 +1907,7 @@ func (x *ListReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListReq.ProtoReflect.Descriptor instead. func (*ListReq) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{12} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{14} } func (x *ListReq) GetProvider() pbtenant.CloudProvider { @@ -1433,7 +1929,7 @@ type ListResp struct { func (x *ListResp) Reset() { *x = ListResp{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[13] + mi := &file_idl_pbecs_ecs_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1446,7 +1942,7 @@ func (x *ListResp) String() string { func (*ListResp) ProtoMessage() {} func (x *ListResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[13] + mi := &file_idl_pbecs_ecs_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1459,7 +1955,7 @@ func (x *ListResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ListResp.ProtoReflect.Descriptor instead. func (*ListResp) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{13} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{15} } func (x *ListResp) GetEcses() []*EcsInstance { @@ -1478,7 +1974,7 @@ type ListAllReq struct { func (x *ListAllReq) Reset() { *x = ListAllReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[14] + mi := &file_idl_pbecs_ecs_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1491,7 +1987,7 @@ func (x *ListAllReq) String() string { func (*ListAllReq) ProtoMessage() {} func (x *ListAllReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[14] + mi := &file_idl_pbecs_ecs_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1504,7 +2000,7 @@ func (x *ListAllReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAllReq.ProtoReflect.Descriptor instead. func (*ListAllReq) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{14} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{16} } var File_idl_pbecs_ecs_proto protoreflect.FileDescriptor @@ -1515,7 +2011,7 @@ var file_idl_pbecs_ecs_proto_rawDesc = []byte{ 0x6c, 0x2f, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x04, 0x0a, 0x0b, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfe, 0x04, 0x0a, 0x0b, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, @@ -1533,8 +2029,8 @@ var file_idl_pbecs_ecs_proto_rawDesc = []byte{ 0x49, 0x70, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, - 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, + 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, @@ -1552,118 +2048,204 @@ var file_idl_pbecs_ecs_proto_rawDesc = []byte{ 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x22, 0x51, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, - 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x39, 0x0a, 0x0d, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x73, 0x22, 0x52, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x45, 0x63, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, - 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x22, 0xe0, 0x05, 0x0a, 0x0c, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, - 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, - 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, - 0x1e, 0x0a, 0x0b, 0x76, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, - 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x7a, 0x6f, 0x6e, 0x65, 0x49, 0x64, 0x12, - 0x32, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, - 0x69, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x64, - 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x72, - 0x79, 0x52, 0x75, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, - 0x12, 0x4b, 0x0a, 0x14, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x63, 0x68, 0x61, - 0x72, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, - 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, - 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, - 0x1a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, - 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x42, 0x61, - 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x4f, 0x75, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x76, 0x70, - 0x63, 0x5f, 0x69, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x70, 0x63, 0x49, - 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x13, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x22, 0xdf, - 0x01, 0x0a, 0x0a, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x12, 0x0a, - 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1b, 0x0a, - 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, - 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x35, 0x0a, 0x17, 0x61, 0x75, 0x74, - 0x6f, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, 0x75, 0x74, 0x6f, - 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, - 0x22, 0xa5, 0x02, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, - 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, - 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, - 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, - 0x64, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x53, 0x65, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, - 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, - 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x22, 0xda, 0x02, 0x0a, 0x0c, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, - 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, - 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x17, - 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x35, 0x0a, - 0x16, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x74, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x69, 0x70, - 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x51, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x45, 0x63, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x39, + 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x73, 0x22, 0x52, 0x0a, 0x15, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, + 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x22, 0xca, 0x0a, + 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x33, + 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x30, + 0x0a, 0x14, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x67, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, + 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x76, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x49, + 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x7a, 0x6f, 0x6e, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x7a, 0x6f, 0x6e, 0x65, 0x49, + 0x64, 0x12, 0x32, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x64, 0x69, 0x73, 0x6b, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, + 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, + 0x72, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, + 0x72, 0x79, 0x12, 0x4b, 0x0a, 0x14, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x63, + 0x68, 0x61, 0x72, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x19, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x3b, 0x0a, 0x1a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x78, 0x5f, + 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x4d, 0x61, 0x78, + 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x4f, 0x75, 0x74, 0x12, 0x15, 0x0a, 0x06, + 0x76, 0x70, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x70, + 0x63, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, + 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x14, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63, 0x70, 0x75, + 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, + 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x18, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, + 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, + 0x69, 0x73, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x64, 0x69, 0x73, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x75, 0x73, 0x18, + 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x62, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, + 0x0d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x1d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x1e, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x21, 0x0a, 0x0c, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x1f, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x17, 0x0a, 0x07, 0x6f, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x20, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x22, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, + 0x0a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, + 0x44, 0x61, 0x74, 0x61, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x32, 0x0a, 0x15, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x12, 0x28, 0x0a, 0x10, 0x76, 0x6d, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, 0x6d, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x6d, + 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x26, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x76, 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xdf, 0x01, 0x0a, 0x0a, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, + 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, + 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x35, 0x0a, 0x17, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x22, 0xa5, 0x02, 0x0a, + 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, + 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x02, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28, + 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x73, 0x65, + 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x49, 0x64, 0x53, 0x65, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, + 0x73, 0x68, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, + 0x73, 0x68, 0x65, 0x64, 0x22, 0xba, 0x03, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, + 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, + 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, + 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x72, 0x79, + 0x52, 0x75, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x16, 0x74, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x74, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x49, 0x64, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x69, 0x70, 0x12, 0x23, 0x0a, 0x0d, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x61, 0x6d, + 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0xbb, 0x03, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, + 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x21, 0x0a, + 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x63, 0x70, 0x75, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x16, + 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x52, 0x65, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x22, 0xa3, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, @@ -1673,120 +2255,125 @@ var file_idl_pbecs_ecs_proto_rawDesc = []byte{ 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0xd4, 0x02, 0x0a, 0x0c, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, - 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, - 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x10, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x64, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, - 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, - 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, - 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, - 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, - 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, - 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, - 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xd2, 0x01, 0x0a, - 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x28, 0x0a, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x52, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, - 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, - 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, - 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, - 0x64, 0x22, 0x3e, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, - 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x22, 0x34, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, - 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, - 0x62, 0x65, 0x63, 0x73, 0x2e, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x52, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x22, 0x0c, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x2a, 0x3a, 0x0a, 0x12, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x50, - 0x61, 0x79, 0x42, 0x79, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x10, 0x00, 0x12, - 0x10, 0x0a, 0x0c, 0x50, 0x61, 0x79, 0x42, 0x79, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x10, - 0x01, 0x32, 0xe0, 0x04, 0x0a, 0x0a, 0x45, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x73, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, - 0x6c, 0x65, 0x45, 0x63, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, - 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x45, 0x63, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x65, 0x63, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, - 0x6c, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x53, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, - 0x63, 0x73, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, - 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x53, 0x0a, 0x09, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, - 0x62, 0x65, 0x63, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, - 0x53, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x12, 0x13, 0x2e, 0x70, - 0x62, 0x65, 0x63, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, - 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x1a, - 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x56, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x44, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, - 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x3d, 0x0a, 0x07, - 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x12, 0x0e, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, - 0x12, 0x09, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x4c, - 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x41, 0x6c, 0x6c, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x65, 0x63, - 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, - 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x15, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, - 0x2f, 0x61, 0x6c, 0x6c, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, - 0x6f, 0x72, 0x67, 0x2e, 0x63, 0x6e, 0x2f, 0x4a, 0x43, 0x43, 0x45, 0x2f, 0x50, 0x43, 0x4d, 0x2f, - 0x6c, 0x61, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x2f, 0x69, 0x64, 0x6c, 0x2f, 0x70, 0x62, - 0x65, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0xff, 0x01, 0x0a, 0x0d, + 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, + 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xd2, 0x01, + 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x28, 0x0a, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, + 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, + 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x49, 0x64, 0x22, 0xeb, 0x01, 0x0a, 0x09, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x76, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x0b, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x22, 0xc2, 0x01, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x45, + 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x65, 0x63, 0x73, 0x65, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3e, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, + 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x34, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x22, 0x0c, 0x0a, 0x0a, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x2a, 0x3a, 0x0a, 0x12, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x12, 0x0a, 0x0e, 0x50, 0x61, 0x79, 0x42, 0x79, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x61, 0x79, 0x42, 0x79, 0x54, 0x72, 0x61, 0x66, + 0x66, 0x69, 0x63, 0x10, 0x01, 0x2a, 0x2e, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x10, 0x00, 0x12, 0x08, + 0x0a, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x10, 0x02, 0x32, 0xaf, 0x05, 0x0a, 0x0a, 0x45, 0x63, 0x73, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x73, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x75, + 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x45, 0x63, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x65, 0x63, + 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, + 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x18, 0x2f, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x75, + 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x53, 0x0a, 0x09, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, + 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x53, + 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x12, 0x13, 0x2e, 0x70, 0x62, + 0x65, 0x63, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, + 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, + 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, + 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x3a, 0x01, 0x2a, 0x12, 0x53, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, + 0x12, 0x13, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, + 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x15, 0x1a, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x56, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, + 0x45, 0x63, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x65, 0x63, + 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, + 0x15, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, + 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x12, 0x3d, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x12, 0x0e, 0x2e, 0x70, 0x62, + 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x62, + 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x11, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x12, + 0x47, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x41, 0x6c, 0x6c, 0x12, 0x11, 0x2e, + 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, + 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x61, 0x6c, 0x6c, 0x12, 0x4d, 0x0a, 0x09, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x45, 0x63, 0x73, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x01, 0x2a, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x6c, 0x69, + 0x6e, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x63, 0x6e, 0x2f, 0x4a, 0x43, 0x43, 0x45, 0x2f, 0x50, + 0x43, 0x4d, 0x2f, 0x6c, 0x61, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x2f, 0x69, 0x64, 0x6c, + 0x2f, 0x70, 0x62, 0x65, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1801,61 +2388,70 @@ func file_idl_pbecs_ecs_proto_rawDescGZIP() []byte { return file_idl_pbecs_ecs_proto_rawDescData } -var file_idl_pbecs_ecs_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_idl_pbecs_ecs_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_idl_pbecs_ecs_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_idl_pbecs_ecs_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_idl_pbecs_ecs_proto_goTypes = []interface{}{ (InternetChargeType)(0), // 0: pbecs.InternetChargeType - (*EcsInstance)(nil), // 1: pbecs.EcsInstance - (*CreateEcsMultipleReq)(nil), // 2: pbecs.CreateEcsMultipleReq - (*CreateEcsMultipleResp)(nil), // 3: pbecs.CreateEcsMultipleResp - (*CreateEcsReq)(nil), // 4: pbecs.CreateEcsReq - (*SystemDisk)(nil), // 5: pbecs.SystemDisk - (*CreateEcsResp)(nil), // 6: pbecs.CreateEcsResp - (*DeleteEcsReq)(nil), // 7: pbecs.DeleteEcsReq - (*DeleteEcsResp)(nil), // 8: pbecs.DeleteEcsResp - (*UpdateEcsReq)(nil), // 9: pbecs.UpdateEcsReq - (*UpdateEcsResp)(nil), // 10: pbecs.UpdateEcsResp - (*ListDetailReq)(nil), // 11: pbecs.ListDetailReq - (*ListDetailResp)(nil), // 12: pbecs.ListDetailResp - (*ListReq)(nil), // 13: pbecs.ListReq - (*ListResp)(nil), // 14: pbecs.ListResp - (*ListAllReq)(nil), // 15: pbecs.ListAllReq - (pbtenant.CloudProvider)(0), // 16: pbtenant.CloudProvider + (ActionType)(0), // 1: pbecs.ActionType + (*EcsInstance)(nil), // 2: pbecs.EcsInstance + (*CreateEcsMultipleReq)(nil), // 3: pbecs.CreateEcsMultipleReq + (*CreateEcsMultipleResp)(nil), // 4: pbecs.CreateEcsMultipleResp + (*CreateEcsReq)(nil), // 5: pbecs.CreateEcsReq + (*SystemDisk)(nil), // 6: pbecs.SystemDisk + (*CreateEcsResp)(nil), // 7: pbecs.CreateEcsResp + (*DeleteEcsReq)(nil), // 8: pbecs.DeleteEcsReq + (*DeleteEcsResp)(nil), // 9: pbecs.DeleteEcsResp + (*UpdateEcsReq)(nil), // 10: pbecs.UpdateEcsReq + (*UpdateEcsResp)(nil), // 11: pbecs.UpdateEcsResp + (*ListDetailReq)(nil), // 12: pbecs.ListDetailReq + (*ListDetailResp)(nil), // 13: pbecs.ListDetailResp + (*ActionReq)(nil), // 14: pbecs.ActionReq + (*ActionResp)(nil), // 15: pbecs.ActionResp + (*ListReq)(nil), // 16: pbecs.ListReq + (*ListResp)(nil), // 17: pbecs.ListResp + (*ListAllReq)(nil), // 18: pbecs.ListAllReq + (pbtenant.CloudProvider)(0), // 19: pbtenant.CloudProvider } var file_idl_pbecs_ecs_proto_depIdxs = []int32{ - 16, // 0: pbecs.EcsInstance.provider:type_name -> pbtenant.CloudProvider - 4, // 1: pbecs.CreateEcsMultipleReq.createEcsReqs:type_name -> pbecs.CreateEcsReq - 16, // 2: pbecs.CreateEcsReq.provider:type_name -> pbtenant.CloudProvider - 5, // 3: pbecs.CreateEcsReq.system_disk:type_name -> pbecs.SystemDisk + 19, // 0: pbecs.EcsInstance.provider:type_name -> pbtenant.CloudProvider + 5, // 1: pbecs.CreateEcsMultipleReq.createEcsReqs:type_name -> pbecs.CreateEcsReq + 19, // 2: pbecs.CreateEcsReq.provider:type_name -> pbtenant.CloudProvider + 6, // 3: pbecs.CreateEcsReq.system_disk:type_name -> pbecs.SystemDisk 0, // 4: pbecs.CreateEcsReq.internet_charge_type:type_name -> pbecs.InternetChargeType - 16, // 5: pbecs.CreateEcsResp.provider:type_name -> pbtenant.CloudProvider - 16, // 6: pbecs.DeleteEcsReq.provider:type_name -> pbtenant.CloudProvider - 16, // 7: pbecs.DeleteEcsResp.provider:type_name -> pbtenant.CloudProvider - 16, // 8: pbecs.UpdateEcsReq.provider:type_name -> pbtenant.CloudProvider - 16, // 9: pbecs.UpdateEcsResp.provider:type_name -> pbtenant.CloudProvider - 16, // 10: pbecs.ListDetailReq.provider:type_name -> pbtenant.CloudProvider - 1, // 11: pbecs.ListDetailResp.ecses:type_name -> pbecs.EcsInstance - 16, // 12: pbecs.ListReq.provider:type_name -> pbtenant.CloudProvider - 1, // 13: pbecs.ListResp.ecses:type_name -> pbecs.EcsInstance - 2, // 14: pbecs.EcsService.CreateMultipleEcs:input_type -> pbecs.CreateEcsMultipleReq - 4, // 15: pbecs.EcsService.CreateEcs:input_type -> pbecs.CreateEcsReq - 7, // 16: pbecs.EcsService.DeleteEcs:input_type -> pbecs.DeleteEcsReq - 9, // 17: pbecs.EcsService.UpdateEcs:input_type -> pbecs.UpdateEcsReq - 11, // 18: pbecs.EcsService.ListEcsDetail:input_type -> pbecs.ListDetailReq - 13, // 19: pbecs.EcsService.ListEcs:input_type -> pbecs.ListReq - 15, // 20: pbecs.EcsService.ListEcsAll:input_type -> pbecs.ListAllReq - 3, // 21: pbecs.EcsService.CreateMultipleEcs:output_type -> pbecs.CreateEcsMultipleResp - 6, // 22: pbecs.EcsService.CreateEcs:output_type -> pbecs.CreateEcsResp - 8, // 23: pbecs.EcsService.DeleteEcs:output_type -> pbecs.DeleteEcsResp - 10, // 24: pbecs.EcsService.UpdateEcs:output_type -> pbecs.UpdateEcsResp - 12, // 25: pbecs.EcsService.ListEcsDetail:output_type -> pbecs.ListDetailResp - 14, // 26: pbecs.EcsService.ListEcs:output_type -> pbecs.ListResp - 14, // 27: pbecs.EcsService.ListEcsAll:output_type -> pbecs.ListResp - 21, // [21:28] is the sub-list for method output_type - 14, // [14:21] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 19, // 5: pbecs.CreateEcsResp.provider:type_name -> pbtenant.CloudProvider + 19, // 6: pbecs.DeleteEcsReq.provider:type_name -> pbtenant.CloudProvider + 19, // 7: pbecs.DeleteEcsResp.provider:type_name -> pbtenant.CloudProvider + 19, // 8: pbecs.UpdateEcsReq.provider:type_name -> pbtenant.CloudProvider + 19, // 9: pbecs.UpdateEcsResp.provider:type_name -> pbtenant.CloudProvider + 19, // 10: pbecs.ListDetailReq.provider:type_name -> pbtenant.CloudProvider + 2, // 11: pbecs.ListDetailResp.ecses:type_name -> pbecs.EcsInstance + 19, // 12: pbecs.ActionReq.provider:type_name -> pbtenant.CloudProvider + 1, // 13: pbecs.ActionReq.action_type:type_name -> pbecs.ActionType + 19, // 14: pbecs.ActionResp.provider:type_name -> pbtenant.CloudProvider + 2, // 15: pbecs.ActionResp.ecses:type_name -> pbecs.EcsInstance + 19, // 16: pbecs.ListReq.provider:type_name -> pbtenant.CloudProvider + 2, // 17: pbecs.ListResp.ecses:type_name -> pbecs.EcsInstance + 3, // 18: pbecs.EcsService.CreateMultipleEcs:input_type -> pbecs.CreateEcsMultipleReq + 5, // 19: pbecs.EcsService.CreateEcs:input_type -> pbecs.CreateEcsReq + 8, // 20: pbecs.EcsService.DeleteEcs:input_type -> pbecs.DeleteEcsReq + 10, // 21: pbecs.EcsService.UpdateEcs:input_type -> pbecs.UpdateEcsReq + 12, // 22: pbecs.EcsService.ListEcsDetail:input_type -> pbecs.ListDetailReq + 16, // 23: pbecs.EcsService.ListEcs:input_type -> pbecs.ListReq + 18, // 24: pbecs.EcsService.ListEcsAll:input_type -> pbecs.ListAllReq + 14, // 25: pbecs.EcsService.ActionEcs:input_type -> pbecs.ActionReq + 4, // 26: pbecs.EcsService.CreateMultipleEcs:output_type -> pbecs.CreateEcsMultipleResp + 7, // 27: pbecs.EcsService.CreateEcs:output_type -> pbecs.CreateEcsResp + 9, // 28: pbecs.EcsService.DeleteEcs:output_type -> pbecs.DeleteEcsResp + 11, // 29: pbecs.EcsService.UpdateEcs:output_type -> pbecs.UpdateEcsResp + 13, // 30: pbecs.EcsService.ListEcsDetail:output_type -> pbecs.ListDetailResp + 17, // 31: pbecs.EcsService.ListEcs:output_type -> pbecs.ListResp + 17, // 32: pbecs.EcsService.ListEcsAll:output_type -> pbecs.ListResp + 15, // 33: pbecs.EcsService.ActionEcs:output_type -> pbecs.ActionResp + 26, // [26:34] is the sub-list for method output_type + 18, // [18:26] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name } func init() { file_idl_pbecs_ecs_proto_init() } @@ -2009,7 +2605,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListReq); i { + switch v := v.(*ActionReq); i { case 0: return &v.state case 1: @@ -2021,7 +2617,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResp); i { + switch v := v.(*ActionResp); i { case 0: return &v.state case 1: @@ -2033,6 +2629,30 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_pbecs_ecs_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_pbecs_ecs_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListAllReq); i { case 0: return &v.state @@ -2050,8 +2670,8 @@ func file_idl_pbecs_ecs_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_idl_pbecs_ecs_proto_rawDesc, - NumEnums: 1, - NumMessages: 15, + NumEnums: 2, + NumMessages: 17, NumExtensions: 0, NumServices: 1, }, diff --git a/lan_trans/idl/pbecs/ecs.pb.gw.go b/lan_trans/idl/pbecs/ecs.pb.gw.go index 42f8e1da..9f151521 100644 --- a/lan_trans/idl/pbecs/ecs.pb.gw.go +++ b/lan_trans/idl/pbecs/ecs.pb.gw.go @@ -257,6 +257,40 @@ func local_request_EcsService_ListEcsAll_0(ctx context.Context, marshaler runtim } +func request_EcsService_ActionEcs_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ActionReq + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ActionEcs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_EcsService_ActionEcs_0(ctx context.Context, marshaler runtime.Marshaler, server EcsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ActionReq + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ActionEcs(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterEcsServiceHandlerServer registers the http handlers for service EcsService to "mux". // UnaryRPC :call EcsServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -269,13 +303,12 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/CreateMultipleEcs", runtime.WithHTTPPathPattern("/apis/ecs/createMultiple")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/CreateMultipleEcs") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_CreateMultipleEcs_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_CreateMultipleEcs_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -293,13 +326,12 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/CreateEcs", runtime.WithHTTPPathPattern("/apis/ecs/create")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/CreateEcs") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_CreateEcs_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_CreateEcs_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -317,13 +349,12 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/DeleteEcs", runtime.WithHTTPPathPattern("/apis/ecs/delete")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/DeleteEcs") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_DeleteEcs_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_DeleteEcs_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -341,13 +372,12 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/UpdateEcs", runtime.WithHTTPPathPattern("/apis/ecs/update")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/UpdateEcs") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_UpdateEcs_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_UpdateEcs_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -365,13 +395,12 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcsDetail", runtime.WithHTTPPathPattern("/apis/ecs/detail")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcsDetail") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_ListEcsDetail_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_ListEcsDetail_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -389,13 +418,12 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcs", runtime.WithHTTPPathPattern("/apis/ecs")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcs") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_ListEcs_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_ListEcs_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -413,13 +441,12 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcsAll", runtime.WithHTTPPathPattern("/apis/ecs/all")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcsAll") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_ListEcsAll_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_ListEcsAll_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -431,6 +458,29 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, }) + mux.Handle("POST", pattern_EcsService_ActionEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ActionEcs") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_EcsService_ActionEcs_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_EcsService_ActionEcs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -476,13 +526,12 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/CreateMultipleEcs", runtime.WithHTTPPathPattern("/apis/ecs/createMultiple")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/CreateMultipleEcs") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_CreateMultipleEcs_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_CreateMultipleEcs_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -497,13 +546,12 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/CreateEcs", runtime.WithHTTPPathPattern("/apis/ecs/create")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/CreateEcs") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_CreateEcs_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_CreateEcs_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -518,13 +566,12 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/DeleteEcs", runtime.WithHTTPPathPattern("/apis/ecs/delete")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/DeleteEcs") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_DeleteEcs_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_DeleteEcs_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -539,13 +586,12 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/UpdateEcs", runtime.WithHTTPPathPattern("/apis/ecs/update")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/UpdateEcs") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_UpdateEcs_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_UpdateEcs_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -560,13 +606,12 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcsDetail", runtime.WithHTTPPathPattern("/apis/ecs/detail")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcsDetail") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_ListEcsDetail_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_ListEcsDetail_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -581,13 +626,12 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcs", runtime.WithHTTPPathPattern("/apis/ecs")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcs") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_ListEcs_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_ListEcs_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -602,13 +646,12 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcsAll", runtime.WithHTTPPathPattern("/apis/ecs/all")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcsAll") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_ListEcsAll_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_ListEcsAll_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -619,6 +662,26 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, }) + mux.Handle("POST", pattern_EcsService_ActionEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ActionEcs") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_EcsService_ActionEcs_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_EcsService_ActionEcs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -636,6 +699,8 @@ var ( pattern_EcsService_ListEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"apis", "ecs"}, "")) pattern_EcsService_ListEcsAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "all"}, "")) + + pattern_EcsService_ActionEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "action"}, "")) ) var ( @@ -652,4 +717,6 @@ var ( forward_EcsService_ListEcs_0 = runtime.ForwardResponseMessage forward_EcsService_ListEcsAll_0 = runtime.ForwardResponseMessage + + forward_EcsService_ActionEcs_0 = runtime.ForwardResponseMessage ) diff --git a/lan_trans/idl/pbecs/ecs_grpc.pb.go b/lan_trans/idl/pbecs/ecs_grpc.pb.go index 847975fb..a2b1bcbe 100644 --- a/lan_trans/idl/pbecs/ecs_grpc.pb.go +++ b/lan_trans/idl/pbecs/ecs_grpc.pb.go @@ -36,6 +36,8 @@ type EcsServiceClient interface { ListEcs(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) // 查询所有云的ECS ListEcsAll(ctx context.Context, in *ListAllReq, opts ...grpc.CallOption) (*ListResp, error) + //操作ecs(start-stop-restart) + ActionEcs(ctx context.Context, in *ActionReq, opts ...grpc.CallOption) (*ActionResp, error) } type ecsServiceClient struct { @@ -109,6 +111,15 @@ func (c *ecsServiceClient) ListEcsAll(ctx context.Context, in *ListAllReq, opts return out, nil } +func (c *ecsServiceClient) ActionEcs(ctx context.Context, in *ActionReq, opts ...grpc.CallOption) (*ActionResp, error) { + out := new(ActionResp) + err := c.cc.Invoke(ctx, "/pbecs.EcsService/ActionEcs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // EcsServiceServer is the server API for EcsService service. // All implementations must embed UnimplementedEcsServiceServer // for forward compatibility @@ -127,6 +138,8 @@ type EcsServiceServer interface { ListEcs(context.Context, *ListReq) (*ListResp, error) // 查询所有云的ECS ListEcsAll(context.Context, *ListAllReq) (*ListResp, error) + //操作ecs(start-stop-restart) + ActionEcs(context.Context, *ActionReq) (*ActionResp, error) mustEmbedUnimplementedEcsServiceServer() } @@ -155,6 +168,9 @@ func (UnimplementedEcsServiceServer) ListEcs(context.Context, *ListReq) (*ListRe func (UnimplementedEcsServiceServer) ListEcsAll(context.Context, *ListAllReq) (*ListResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListEcsAll not implemented") } +func (UnimplementedEcsServiceServer) ActionEcs(context.Context, *ActionReq) (*ActionResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ActionEcs not implemented") +} func (UnimplementedEcsServiceServer) mustEmbedUnimplementedEcsServiceServer() {} // UnsafeEcsServiceServer may be embedded to opt out of forward compatibility for this service. @@ -294,6 +310,24 @@ func _EcsService_ListEcsAll_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _EcsService_ActionEcs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ActionReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EcsServiceServer).ActionEcs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbecs.EcsService/ActionEcs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EcsServiceServer).ActionEcs(ctx, req.(*ActionReq)) + } + return interceptor(ctx, in, info, handler) +} + // EcsService_ServiceDesc is the grpc.ServiceDesc for EcsService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -329,6 +363,10 @@ var EcsService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListEcsAll", Handler: _EcsService_ListEcsAll_Handler, }, + { + MethodName: "ActionEcs", + Handler: _EcsService_ActionEcs_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "idl/pbecs/ecs.proto", diff --git a/lan_trans/idl/pbpod/pod.pb.go b/lan_trans/idl/pbpod/pod.pb.go index d8bd2820..d890fddb 100644 --- a/lan_trans/idl/pbpod/pod.pb.go +++ b/lan_trans/idl/pbpod/pod.pb.go @@ -201,7 +201,7 @@ type CreatePodsReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // 云类型 + // 创建请求集合 CreatePodReq []*CreatePodReq `protobuf:"bytes,1,rep,name=createPodReq,proto3" json:"createPodReq,omitempty"` } @@ -462,12 +462,14 @@ type CreatePodResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Pod集合 - Pods []*PodInstance `protobuf:"bytes,1,rep,name=pods,proto3" json:"pods,omitempty"` // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - Finished bool `protobuf:"varint,2,opt,name=finished,proto3" json:"finished,omitempty"` + Finished bool `protobuf:"varint,1,opt,name=finished,proto3" json:"finished,omitempty"` // 请求id,出现问题后提供给云厂商,排查问题 - RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // podId + PodId string `protobuf:"bytes,3,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"` + // podName + PodName string `protobuf:"bytes,4,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` } func (x *CreatePodResp) Reset() { @@ -502,13 +504,6 @@ func (*CreatePodResp) Descriptor() ([]byte, []int) { return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{4} } -func (x *CreatePodResp) GetPods() []*PodInstance { - if x != nil { - return x.Pods - } - return nil -} - func (x *CreatePodResp) GetFinished() bool { if x != nil { return x.Finished @@ -523,6 +518,20 @@ func (x *CreatePodResp) GetRequestId() string { return "" } +func (x *CreatePodResp) GetPodId() string { + if x != nil { + return x.PodId + } + return "" +} + +func (x *CreatePodResp) GetPodName() string { + if x != nil { + return x.PodName + } + return "" +} + type DeletePodReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -621,12 +630,14 @@ type DeletePodResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Pod集合 - Pods []*PodInstance `protobuf:"bytes,1,rep,name=pods,proto3" json:"pods,omitempty"` // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - Finished bool `protobuf:"varint,2,opt,name=finished,proto3" json:"finished,omitempty"` + Finished bool `protobuf:"varint,1,opt,name=finished,proto3" json:"finished,omitempty"` // 请求id,出现问题后提供给云厂商,排查问题 - RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // podId + PodId string `protobuf:"bytes,3,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"` + // podName + PodName string `protobuf:"bytes,4,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` } func (x *DeletePodResp) Reset() { @@ -661,13 +672,6 @@ func (*DeletePodResp) Descriptor() ([]byte, []int) { return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{6} } -func (x *DeletePodResp) GetPods() []*PodInstance { - if x != nil { - return x.Pods - } - return nil -} - func (x *DeletePodResp) GetFinished() bool { if x != nil { return x.Finished @@ -682,6 +686,20 @@ func (x *DeletePodResp) GetRequestId() string { return "" } +func (x *DeletePodResp) GetPodId() string { + if x != nil { + return x.PodId + } + return "" +} + +func (x *DeletePodResp) GetPodName() string { + if x != nil { + return x.PodName + } + return "" +} + type UpdatePodReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -834,12 +852,14 @@ type UpdatePodResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Pod集合 - Pod *PodInstance `protobuf:"bytes,1,opt,name=pod,proto3" json:"pod,omitempty"` // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 - Finished bool `protobuf:"varint,2,opt,name=finished,proto3" json:"finished,omitempty"` + Finished bool `protobuf:"varint,1,opt,name=finished,proto3" json:"finished,omitempty"` // 请求id,出现问题后提供给云厂商,排查问题 - RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // podId + PodId string `protobuf:"bytes,3,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"` + // podName + PodName string `protobuf:"bytes,4,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` } func (x *UpdatePodResp) Reset() { @@ -874,13 +894,6 @@ func (*UpdatePodResp) Descriptor() ([]byte, []int) { return file_idl_pbpod_pod_proto_rawDescGZIP(), []int{8} } -func (x *UpdatePodResp) GetPod() *PodInstance { - if x != nil { - return x.Pod - } - return nil -} - func (x *UpdatePodResp) GetFinished() bool { if x != nil { return x.Finished @@ -895,6 +908,20 @@ func (x *UpdatePodResp) GetRequestId() string { return "" } +func (x *UpdatePodResp) GetPodId() string { + if x != nil { + return x.PodId + } + return "" +} + +func (x *UpdatePodResp) GetPodName() string { + if x != nil { + return x.PodName + } + return "" +} + type ListPodDetailReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1424,35 +1451,15 @@ var file_idl_pbpod_pod_proto_rawDesc = []byte{ 0x70, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x70, 0x63, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x22, 0x72, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x26, 0x0a, 0x04, 0x70, 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x70, 0x62, 0x70, 0x6f, 0x64, 0x2e, 0x50, 0x6f, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x52, 0x04, 0x70, 0x6f, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, - 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, - 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x49, 0x64, 0x22, 0xd3, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, - 0x6f, 0x64, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, - 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, - 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, - 0x6f, 0x64, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, - 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x72, 0x0a, 0x0d, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x04, 0x70, - 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x70, 0x6f, - 0x64, 0x2e, 0x50, 0x6f, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x70, - 0x6f, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0x9a, - 0x03, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x12, + 0x22, 0x7c, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, + 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, + 0x64, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xd3, + 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, @@ -1465,26 +1472,48 @@ var file_idl_pbpod_pod_proto_rawDesc = []byte{ 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x72, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, - 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, - 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x70, 0x75, 0x5f, 0x70, 0x6f, 0x64, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x70, 0x75, 0x50, 0x6f, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x6f, 0x64, 0x12, 0x25, 0x0a, 0x0e, - 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x70, 0x0a, 0x0d, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x03, - 0x70, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x70, 0x6f, - 0x64, 0x2e, 0x50, 0x6f, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x03, 0x70, - 0x6f, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1d, - 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0xba, 0x02, + 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x7c, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, + 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, + 0x12, 0x15, 0x0a, 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x70, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, + 0x6d, 0x65, 0x22, 0x9a, 0x03, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, + 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x70, + 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x64, + 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x70, 0x75, 0x5f, + 0x70, 0x6f, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x70, 0x75, 0x50, 0x6f, + 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x64, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x6f, 0x64, + 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, + 0x7c, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x70, + 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x64, + 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xba, 0x02, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, @@ -1618,36 +1647,33 @@ var file_idl_pbpod_pod_proto_depIdxs = []int32{ 16, // 0: pbpod.PodInstance.provider:type_name -> pbtenant.CloudProvider 3, // 1: pbpod.CreatePodsReq.createPodReq:type_name -> pbpod.CreatePodReq 16, // 2: pbpod.CreatePodReq.provider:type_name -> pbtenant.CloudProvider - 0, // 3: pbpod.CreatePodResp.pods:type_name -> pbpod.PodInstance - 16, // 4: pbpod.DeletePodReq.provider:type_name -> pbtenant.CloudProvider - 0, // 5: pbpod.DeletePodResp.pods:type_name -> pbpod.PodInstance - 16, // 6: pbpod.UpdatePodReq.provider:type_name -> pbtenant.CloudProvider - 0, // 7: pbpod.UpdatePodResp.pod:type_name -> pbpod.PodInstance - 16, // 8: pbpod.ListPodDetailReq.provider:type_name -> pbtenant.CloudProvider - 0, // 9: pbpod.ListPodDetailResp.pods:type_name -> pbpod.PodInstance - 16, // 10: pbpod.ListPodReq.provider:type_name -> pbtenant.CloudProvider - 0, // 11: pbpod.ListPodResp.pods:type_name -> pbpod.PodInstance - 16, // 12: pbpod.GetPodRegionReq.provider:type_name -> pbtenant.CloudProvider - 17, // 13: pbpod.GetPodRegionResp.regions:type_name -> pbtenant.Region - 1, // 14: pbpod.PodService.CreatePods:input_type -> pbpod.CreatePodsReq - 3, // 15: pbpod.PodService.CreatePod:input_type -> pbpod.CreatePodReq - 5, // 16: pbpod.PodService.DeletePod:input_type -> pbpod.DeletePodReq - 7, // 17: pbpod.PodService.UpdatePod:input_type -> pbpod.UpdatePodReq - 9, // 18: pbpod.PodService.ListPodDetail:input_type -> pbpod.ListPodDetailReq - 11, // 19: pbpod.PodService.ListPod:input_type -> pbpod.ListPodReq - 15, // 20: pbpod.PodService.ListPodAll:input_type -> pbpod.ListPodAllReq - 2, // 21: pbpod.PodService.CreatePods:output_type -> pbpod.CreatePodsResp - 4, // 22: pbpod.PodService.CreatePod:output_type -> pbpod.CreatePodResp - 6, // 23: pbpod.PodService.DeletePod:output_type -> pbpod.DeletePodResp - 8, // 24: pbpod.PodService.UpdatePod:output_type -> pbpod.UpdatePodResp - 10, // 25: pbpod.PodService.ListPodDetail:output_type -> pbpod.ListPodDetailResp - 12, // 26: pbpod.PodService.ListPod:output_type -> pbpod.ListPodResp - 12, // 27: pbpod.PodService.ListPodAll:output_type -> pbpod.ListPodResp - 21, // [21:28] is the sub-list for method output_type - 14, // [14:21] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 16, // 3: pbpod.DeletePodReq.provider:type_name -> pbtenant.CloudProvider + 16, // 4: pbpod.UpdatePodReq.provider:type_name -> pbtenant.CloudProvider + 16, // 5: pbpod.ListPodDetailReq.provider:type_name -> pbtenant.CloudProvider + 0, // 6: pbpod.ListPodDetailResp.pods:type_name -> pbpod.PodInstance + 16, // 7: pbpod.ListPodReq.provider:type_name -> pbtenant.CloudProvider + 0, // 8: pbpod.ListPodResp.pods:type_name -> pbpod.PodInstance + 16, // 9: pbpod.GetPodRegionReq.provider:type_name -> pbtenant.CloudProvider + 17, // 10: pbpod.GetPodRegionResp.regions:type_name -> pbtenant.Region + 1, // 11: pbpod.PodService.CreatePods:input_type -> pbpod.CreatePodsReq + 3, // 12: pbpod.PodService.CreatePod:input_type -> pbpod.CreatePodReq + 5, // 13: pbpod.PodService.DeletePod:input_type -> pbpod.DeletePodReq + 7, // 14: pbpod.PodService.UpdatePod:input_type -> pbpod.UpdatePodReq + 9, // 15: pbpod.PodService.ListPodDetail:input_type -> pbpod.ListPodDetailReq + 11, // 16: pbpod.PodService.ListPod:input_type -> pbpod.ListPodReq + 15, // 17: pbpod.PodService.ListPodAll:input_type -> pbpod.ListPodAllReq + 2, // 18: pbpod.PodService.CreatePods:output_type -> pbpod.CreatePodsResp + 4, // 19: pbpod.PodService.CreatePod:output_type -> pbpod.CreatePodResp + 6, // 20: pbpod.PodService.DeletePod:output_type -> pbpod.DeletePodResp + 8, // 21: pbpod.PodService.UpdatePod:output_type -> pbpod.UpdatePodResp + 10, // 22: pbpod.PodService.ListPodDetail:output_type -> pbpod.ListPodDetailResp + 12, // 23: pbpod.PodService.ListPod:output_type -> pbpod.ListPodResp + 12, // 24: pbpod.PodService.ListPodAll:output_type -> pbpod.ListPodResp + 18, // [18:25] is the sub-list for method output_type + 11, // [11:18] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_idl_pbpod_pod_proto_init() } diff --git a/lan_trans/idl/pbpod/pod.pb.gw.go b/lan_trans/idl/pbpod/pod.pb.gw.go index 8aed6f35..8a65b392 100644 --- a/lan_trans/idl/pbpod/pod.pb.gw.go +++ b/lan_trans/idl/pbpod/pod.pb.gw.go @@ -269,13 +269,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePods", runtime.WithHTTPPathPattern("/apis/pod/createMulti")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePods") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_CreatePods_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_CreatePods_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -293,13 +292,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePod", runtime.WithHTTPPathPattern("/apis/pod/create")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePod") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_CreatePod_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_CreatePod_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -317,13 +315,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/DeletePod", runtime.WithHTTPPathPattern("/apis/pod/delete")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/DeletePod") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_DeletePod_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_DeletePod_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -341,13 +338,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/UpdatePod", runtime.WithHTTPPathPattern("/apis/pod/update")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/UpdatePod") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_UpdatePod_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_UpdatePod_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -365,13 +361,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail", runtime.WithHTTPPathPattern("/apis/pod/detail")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_ListPodDetail_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_ListPodDetail_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -389,13 +384,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPod", runtime.WithHTTPPathPattern("/apis/pod")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPod") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_ListPod_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_ListPod_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -413,13 +407,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodAll", runtime.WithHTTPPathPattern("/apis/pod/all")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodAll") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_ListPodAll_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_ListPodAll_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -476,13 +469,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePods", runtime.WithHTTPPathPattern("/apis/pod/createMulti")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePods") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_CreatePods_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_CreatePods_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -497,13 +489,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePod", runtime.WithHTTPPathPattern("/apis/pod/create")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePod") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_CreatePod_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_CreatePod_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -518,13 +509,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/DeletePod", runtime.WithHTTPPathPattern("/apis/pod/delete")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/DeletePod") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_DeletePod_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_DeletePod_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -539,13 +529,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/UpdatePod", runtime.WithHTTPPathPattern("/apis/pod/update")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/UpdatePod") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_UpdatePod_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_UpdatePod_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -560,13 +549,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail", runtime.WithHTTPPathPattern("/apis/pod/detail")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_ListPodDetail_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_ListPodDetail_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -581,13 +569,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPod", runtime.WithHTTPPathPattern("/apis/pod")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPod") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_ListPod_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_ListPod_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -602,13 +589,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodAll", runtime.WithHTTPPathPattern("/apis/pod/all")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodAll") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_ListPodAll_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_ListPodAll_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/lan_trans/openapiv2/idl/demo/demo.swagger.json b/lan_trans/openapiv2/idl/demo/demo.swagger.json index d7db3be6..a969e31b 100644 --- a/lan_trans/openapiv2/idl/demo/demo.swagger.json +++ b/lan_trans/openapiv2/idl/demo/demo.swagger.json @@ -68,11 +68,14 @@ "protobufAny": { "type": "object", "properties": { - "@type": { + "typeUrl": { "type": "string" + }, + "value": { + "type": "string", + "format": "byte" } - }, - "additionalProperties": {} + } }, "rpcStatus": { "type": "object", diff --git a/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json b/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json index 123ca380..64288cb0 100644 --- a/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json +++ b/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json @@ -37,7 +37,7 @@ "parameters": [ { "name": "provider", - "description": "云名称\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", + "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", "in": "query", "required": false, "type": "string", @@ -56,6 +56,39 @@ ] } }, + "/apis/ecs/action": { + "post": { + "summary": "操作ecs(start-stop-restart)", + "operationId": "EcsService_ActionEcs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/pbecsActionResp" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/pbecsActionReq" + } + } + ], + "tags": [ + "EcsService" + ] + } + }, "/apis/ecs/all": { "get": { "summary": "查询所有云的ECS", @@ -199,7 +232,7 @@ "parameters": [ { "name": "provider", - "description": "云名称\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", + "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", "in": "query", "required": false, "type": "string", @@ -214,14 +247,14 @@ }, { "name": "accountName", - "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户", + "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户.", "in": "query", "required": false, "type": "string" }, { "name": "regionId", - "description": "区域Id,参考 tenant.proto 中的各个云的区域", + "description": "区域Id,参考 tenant.proto 中的各个云的区域.", "in": "query", "required": false, "type": "integer", @@ -229,7 +262,7 @@ }, { "name": "pageNumber", - "description": "分页相关参数,页码", + "description": "分页相关参数,页码.", "in": "query", "required": false, "type": "integer", @@ -237,7 +270,7 @@ }, { "name": "pageSize", - "description": "分页相关参数,每页数量", + "description": "分页相关参数,每页数量.", "in": "query", "required": false, "type": "integer", @@ -245,7 +278,14 @@ }, { "name": "nextToken", - "description": "分页相关参数,下一页的token", + "description": "分页相关参数,下一页的token.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "namespace", + "description": "--------harvester---------\nnamespace.", "in": "query", "required": false, "type": "string" @@ -291,6 +331,75 @@ } }, "definitions": { + "pbecsActionReq": { + "type": "object", + "properties": { + "provider": { + "$ref": "#/definitions/pbtenantCloudProvider", + "title": "云名称" + }, + "accountName": { + "type": "string", + "title": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户" + }, + "regionId": { + "type": "integer", + "format": "int32", + "title": "区域Id,参考 tenant.proto 中的各个云的区域" + }, + "namespace": { + "type": "string", + "title": "命名空间" + }, + "vmName": { + "type": "string", + "title": "虚拟机名称" + }, + "actionType": { + "$ref": "#/definitions/pbecsActionType", + "title": "虚拟机操作状态" + } + } + }, + "pbecsActionResp": { + "type": "object", + "properties": { + "provider": { + "$ref": "#/definitions/pbtenantCloudProvider", + "title": "云名称" + }, + "accountName": { + "type": "string", + "title": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户" + }, + "ecses": { + "type": "array", + "items": { + "$ref": "#/definitions/pbecsEcsInstance" + }, + "title": "Ecs 机器集合" + }, + "finished": { + "type": "boolean", + "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" + }, + "status": { + "type": "string", + "title": "vm状态" + } + } + }, + "pbecsActionType": { + "type": "string", + "enum": [ + "start", + "stop", + "restart" + ], + "default": "start", + "description": "- start: 启动\n - stop: 停止\n - restart: 重启", + "title": "虚拟机状态操作" + }, "pbecsCreateEcsMultipleReq": { "type": "object", "properties": { @@ -401,6 +510,83 @@ "subnetId": { "type": "string", "title": "待创建云服务器所在的子网信息。需要指定vpcid对应VPC下已创建的子网(subnet)的网络ID,UUID格式。华为云必需" + }, + "namespace": { + "type": "string", + "title": "-------------harvester---------------\n命名空间" + }, + "cpu": { + "type": "integer", + "format": "int32", + "title": "vCpu" + }, + "memory": { + "type": "string", + "title": "memory" + }, + "sshKey": { + "type": "string", + "title": "ssh_key" + }, + "diskName": { + "type": "string", + "title": "diskName" + }, + "diskType": { + "type": "string", + "title": "disk类型 disk,cd-rom" + }, + "diskSize": { + "type": "string", + "title": "卷大小" + }, + "bus": { + "type": "string", + "description": "bus 总线指示要模拟的磁盘设备的类型,支持virtio, sata, scsi." + }, + "networkName": { + "type": "string", + "title": "网络名称" + }, + "networkModel": { + "type": "string", + "description": "network_model 网络模式,支持e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio." + }, + "network": { + "type": "string", + "title": "网络" + }, + "networkType": { + "type": "string", + "title": "网络连接方法,默认bridge" + }, + "osType": { + "type": "string", + "title": "osType //系统类型" + }, + "machineType": { + "type": "string", + "title": "machineType //机器类型 none、q35、pc" + }, + "machineName": { + "type": "string", + "title": "machineName //主机名称,默认为虚拟机名称" + }, + "userDataTemplate": { + "type": "string", + "title": "userDataTemplate //用户数据模板" + }, + "networkDataTemplate": { + "type": "string", + "title": "networkDataTemplate //网络数据模板" + }, + "vmTemplateName": { + "type": "string", + "title": "vmTemplateName //模板名称" + }, + "vmTemplateVersion": { + "type": "string", + "title": "vmTemplateVersion //版本号" } }, "title": "创建ECS入参" @@ -487,6 +673,18 @@ "deleteVolume": { "type": "string", "title": "配置删除云服务器是否删除云服务器对应的数据盘,如果选择不删除,则系统仅做卸载操作,保留云硬盘资源。默认为false。\n取值为true或false。默认false;华为云" + }, + "instanceName": { + "type": "string", + "title": "----------------harvester----------------\n虚拟机名称" + }, + "namespace": { + "type": "string", + "title": "namespace" + }, + "diskName": { + "type": "string", + "title": "diskName,以“,” 分割" } }, "title": "删除ECS入参" @@ -549,13 +747,11 @@ "title": "实例类型" }, "cpu": { - "type": "integer", - "format": "int32", + "type": "string", "title": "vcpu数" }, "memory": { - "type": "integer", - "format": "int32", + "type": "string", "title": "内存MB" }, "description": { @@ -592,6 +788,14 @@ "instanceChargeType": { "type": "string", "title": "收费类型" + }, + "node": { + "type": "string", + "title": "-----------harvester---------\n虚拟机所在的节点" + }, + "namespace": { + "type": "string", + "title": "namespace" } }, "title": "ECS 实例" @@ -722,6 +926,22 @@ "securityGroupIds": { "type": "string", "title": "实例重新加入的安全组列表,安全组ID不能重复。以”,“分割" + }, + "namespace": { + "type": "string", + "title": "---------------harvester-----------------\nnamespace" + }, + "cpu": { + "type": "string", + "title": "cpu" + }, + "memory": { + "type": "string", + "title": "memory" + }, + "isRestart": { + "type": "boolean", + "title": "修改配置后是否重启" } }, "title": "更新ECS入参" @@ -765,11 +985,14 @@ "protobufAny": { "type": "object", "properties": { - "@type": { + "typeUrl": { "type": "string" + }, + "value": { + "type": "string", + "format": "byte" } - }, - "additionalProperties": {} + } }, "rpcStatus": { "type": "object", diff --git a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json index 8e6fb7e5..62f0e151 100644 --- a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json +++ b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json @@ -37,7 +37,7 @@ "parameters": [ { "name": "provider", - "description": "cloud name\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", + "description": "cloud name.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", "in": "query", "required": false, "type": "string", @@ -205,7 +205,7 @@ "parameters": [ { "name": "provider", - "description": "云名称\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", + "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", "in": "query", "required": false, "type": "string", @@ -220,14 +220,14 @@ }, { "name": "accountName", - "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户", + "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户.", "in": "query", "required": false, "type": "string" }, { "name": "regionId", - "description": "区域Id,参考 tenant.proto 中的各个云的区域", + "description": "区域Id,参考 tenant.proto 中的各个云的区域.", "in": "query", "required": false, "type": "integer", @@ -235,7 +235,7 @@ }, { "name": "regionName", - "description": "区域名称,各云厂商自定义的region name", + "description": "区域名称,各云厂商自定义的region name.", "in": "query", "required": false, "type": "integer", @@ -243,7 +243,7 @@ }, { "name": "podId", - "description": "podID", + "description": "podID.", "in": "query", "required": false, "type": "integer", @@ -251,7 +251,7 @@ }, { "name": "pageNumber", - "description": "分页相关参数,页码", + "description": "分页相关参数,页码.", "in": "query", "required": false, "type": "integer", @@ -259,7 +259,7 @@ }, { "name": "pageSize", - "description": "分页相关参数,每页数量", + "description": "分页相关参数,每页数量.", "in": "query", "required": false, "type": "integer", @@ -267,14 +267,14 @@ }, { "name": "nextToken", - "description": "分页相关参数,下一页的token", + "description": "分页相关参数,下一页的token.", "in": "query", "required": false, "type": "string" }, { "name": "namespace", - "description": "namespace", + "description": "namespace.", "in": "query", "required": false, "type": "string" @@ -381,13 +381,6 @@ "pbpodCreatePodResp": { "type": "object", "properties": { - "pods": { - "type": "array", - "items": { - "$ref": "#/definitions/pbpodPodInstance" - }, - "title": "Pod集合" - }, "finished": { "type": "boolean", "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" @@ -395,6 +388,14 @@ "requestId": { "type": "string", "title": "请求id,出现问题后提供给云厂商,排查问题" + }, + "podId": { + "type": "string", + "title": "podId" + }, + "podName": { + "type": "string", + "title": "podName" } } }, @@ -406,7 +407,7 @@ "items": { "$ref": "#/definitions/pbpodCreatePodReq" }, - "title": "云类型" + "title": "创建请求集合" } } }, @@ -459,13 +460,6 @@ "pbpodDeletePodResp": { "type": "object", "properties": { - "pods": { - "type": "array", - "items": { - "$ref": "#/definitions/pbpodPodInstance" - }, - "title": "Pod集合" - }, "finished": { "type": "boolean", "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" @@ -473,6 +467,14 @@ "requestId": { "type": "string", "title": "请求id,出现问题后提供给云厂商,排查问题" + }, + "podId": { + "type": "string", + "title": "podId" + }, + "podName": { + "type": "string", + "title": "podName" } } }, @@ -645,10 +647,6 @@ "pbpodUpdatePodResp": { "type": "object", "properties": { - "pod": { - "$ref": "#/definitions/pbpodPodInstance", - "title": "Pod集合" - }, "finished": { "type": "boolean", "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" @@ -656,6 +654,14 @@ "requestId": { "type": "string", "title": "请求id,出现问题后提供给云厂商,排查问题" + }, + "podId": { + "type": "string", + "title": "podId" + }, + "podName": { + "type": "string", + "title": "podName" } } }, @@ -675,11 +681,14 @@ "protobufAny": { "type": "object", "properties": { - "@type": { + "typeUrl": { "type": "string" + }, + "value": { + "type": "string", + "format": "byte" } - }, - "additionalProperties": {} + } }, "rpcStatus": { "type": "object", diff --git a/lan_trans/openapiv2/idl/pbtenant/tenant.swagger.json b/lan_trans/openapiv2/idl/pbtenant/tenant.swagger.json index 0a73b355..636ce737 100644 --- a/lan_trans/openapiv2/idl/pbtenant/tenant.swagger.json +++ b/lan_trans/openapiv2/idl/pbtenant/tenant.swagger.json @@ -15,11 +15,14 @@ "protobufAny": { "type": "object", "properties": { - "@type": { + "typeUrl": { "type": "string" + }, + "value": { + "type": "string", + "format": "byte" } - }, - "additionalProperties": {} + } }, "rpcStatus": { "type": "object",