Compare commits
No commits in common. "master" and "master" have entirely different histories.
|
|
@ -39,7 +39,7 @@ workflow:
|
|||
name: git clone
|
||||
task: git_clone@1.2.6
|
||||
input:
|
||||
remote_url: '"https://gitlink.org.cn/JointCloud/pcm-openstack.git"'
|
||||
remote_url: '"https://gitlink.org.cn/jcce-pcm/pcm-openstack.git"'
|
||||
ref: '"refs/heads/master"'
|
||||
commit_id: '""'
|
||||
depth: 1
|
||||
|
|
|
|||
|
|
@ -1,63 +0,0 @@
|
|||
name: Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
tags: [ 'v*.*.*' ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
workflow_dispatch: # 允许手动触发
|
||||
|
||||
env:
|
||||
REGISTRY: registry.cn-hangzhou.aliyuncs.com # 修改为你的阿里云镜像仓库地址
|
||||
IMAGE_NAME: jcce/pcm-openstack # 修改为你的阿里云镜像仓库名称
|
||||
IMAGE_TAG: latest
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.ALIYUN_USERNAME }}
|
||||
password: ${{ secrets.ALIYUN_PASSWORD }}
|
||||
|
||||
- name: Get commit ID and build time
|
||||
id: get_tags
|
||||
run: |
|
||||
echo "::set-output name=build_time::$(date +'%Y%m%d%H%M%S')"
|
||||
|
||||
- name: Build and push multi-arch image
|
||||
run: |
|
||||
docker buildx build \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} \
|
||||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.get_tags.outputs.build_time }} \
|
||||
--push .
|
||||
|
||||
- name: Set up Kubernetes CLI
|
||||
uses: azure/setup-kubectl@v1
|
||||
|
||||
- name: Configure kubeconfig
|
||||
run: |
|
||||
mkdir -p ~/.kube
|
||||
echo "${{ secrets.KUBECONFIG }}" > ~/.kube/config
|
||||
|
||||
- name: Restart Deployment
|
||||
run: kubectl rollout restart deployment ${{ secrets.SSH_DEPLOYMENT }}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
name: Sync Mirror Repository
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 */8 * * *' # 每小时同步一次
|
||||
workflow_dispatch: # 允许手动触发
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
timeout-minutes: 10 # 设置作业的超时时间为10分钟
|
||||
|
||||
steps:
|
||||
- name: Checkout target repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1 # 获取完整的提交历史
|
||||
|
||||
- name: Mirror source repository
|
||||
uses: wearerequired/git-mirror-action@v1
|
||||
with:
|
||||
source-repo: "https://gitlink.org.cn/JointCloud/pcm-openstack.git" # 源仓库的URL
|
||||
destination-repo: "git@github.com:${{ github.repository }}.git" # 目标仓库的URL
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
33
Dockerfile
33
Dockerfile
|
|
@ -1,29 +1,32 @@
|
|||
FROM --platform=$BUILDPLATFORM golang:1.22.4-alpine3.20 AS builder
|
||||
FROM golang:1.20.2-alpine3.17 AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
LABEL stage=gobuilder
|
||||
ENV CGO_ENABLED 0
|
||||
ENV GOARCH amd64
|
||||
ENV GOPROXY https://goproxy.cn,direct
|
||||
|
||||
COPY . .
|
||||
COPY etc/ /app/
|
||||
RUN go mod download && go build -o pcm-openstack /app/pcmopenstack.go
|
||||
|
||||
ENV GO111MODULE=on GOPROXY=https://goproxy.cn,direct
|
||||
RUN go mod download
|
||||
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
# 使用 GOOS 和 GOARCH 环境变量来构建不同架构的二进制文件
|
||||
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="-w -s" -o pcm-openstack
|
||||
|
||||
FROM --platform=$TARGETPLATFORM alpine:latest
|
||||
FROM alpine:3.16.2
|
||||
WORKDIR /app
|
||||
|
||||
#修改alpine源为上海交通大学
|
||||
RUN apk add --no-cache ca-certificates && update-ca-certificates && \
|
||||
#修改alpine源为上海交通大学
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.sjtug.sjtu.edu.cn/g' /etc/apk/repositories && \
|
||||
apk update && \
|
||||
apk upgrade && \
|
||||
apk add --no-cache ca-certificates && update-ca-certificates && \
|
||||
apk add --update tzdata && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
COPY --from=builder /app/pcm-openstack .
|
||||
COPY --from=builder /app/etc/pcmopenstack.yaml .
|
||||
COPY etc/pcmopenstack.yaml .
|
||||
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
||||
EXPOSE 2010
|
||||
EXPOSE 2003
|
||||
|
||||
ENTRYPOINT ./pcm-openstack --f pcmopenstack.yaml
|
||||
ENTRYPOINT ./pcm-openstack -f pcmopenstack.yaml
|
||||
4
Makefile
4
Makefile
|
|
@ -1,5 +1,5 @@
|
|||
rpc-gen:
|
||||
goctl rpc protoc ./pb/*.proto --go_out=./ --go-grpc_out=./ --zrpc_out=.
|
||||
|
||||
pcm-openstack:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o pcm-openstack openstack.go
|
||||
pcm-participant-openstack:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o pcm-participant-openstack openstack.go
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
[# What's New
|
||||
## Upgrading support
|
||||
The upgrade supports the Electric cloud openstack cluster. Includes instances, networks, images, storage, and more
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# What's New
|
||||
## Upgrading support
|
||||
This upgrade supports the lylin Cloud openstack cluster. Includes instances, networks, images, storage, and more
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
Name: pcm.openstack.rpc
|
||||
ListenOn: 0.0.0.0:2010
|
||||
AdapterId: 1706858330967773113
|
||||
CoreUrl: "http://127.0.0.1:8999"
|
||||
|
||||
Timeout: 100000 # 100s,设置rpc服务的响应的超时时间,若超过10s还未返回则结束请求
|
||||
|
||||
|
|
@ -12,19 +10,12 @@ Participant:
|
|||
Type: "0"
|
||||
TenantId: 1 #租户id
|
||||
TenantName: "host" #租户名
|
||||
|
||||
CoreClientConf:
|
||||
#Url: "localhost:8999"
|
||||
#DataSource: ""
|
||||
AdapterId: 1706858330967773113
|
||||
CoreUrl: "http://127.0.0.1:8999"
|
||||
|
||||
|
||||
# Labels: 1
|
||||
|
||||
openstackConfig:
|
||||
Status_created: 201
|
||||
TokenHeader: "X-Subject-Token"
|
||||
ZhiJiang_Openstack_T:
|
||||
ZhiJiang:
|
||||
USER: "admin"
|
||||
PASSWORD: "Nudt@123"
|
||||
DOMAIN: "Default"
|
||||
|
|
@ -39,64 +30,31 @@ openstackConfig:
|
|||
OpenstackVolumev2Url: "http://10.105.20.9:8776/v2/aa7366b7f0e9453a9ba8bc699aa97b1e"
|
||||
OpenstackLimitsUrl: "http://10.105.20.9:8774"
|
||||
OpenstackBareMetalUrl: ""
|
||||
Platform: "ZhiJiang_Openstack_T"
|
||||
Platform: "ZhiJiang"
|
||||
Id: "default"
|
||||
Nudt_Openstack_T:
|
||||
Nudt:
|
||||
USER: "admin"
|
||||
PASSWORD: "Nudt@1234"
|
||||
PASSWORD: "KzNGIS7EkDwalZmqgdpa2b9bNWFpa7GdnBLhjaxP"
|
||||
DOMAIN: "Default"
|
||||
TokenUrl: "http://192.168.249.113:5000/v3/auth/tokens?nocatalog"
|
||||
TokenUrl: "http://172.20.184.1:35357/v3/auth/tokens?nocatalog"
|
||||
Status_created: 201
|
||||
ProjectName: "admin"
|
||||
TokenHeader: X-Subject-Token
|
||||
AuthMethod: "password"
|
||||
OpenstackNetworkUrl: "http://192.168.249.113:9696"
|
||||
OpenstackImageUrl: "http://192.168.249.113:9292"
|
||||
OpenstackComputeUrl: "http://192.168.249.113:8774/v2.1/96f6c96fb5d44dc99f0820b723339495"
|
||||
OpenstackVolumev2Url: "http://192.168.249.113:8776/v2/96f6c96fb5d44dc99f0820b723339495"
|
||||
OpenstackLimitsUrl: "http://192.168.249.113:8774"
|
||||
OpenstackNetworkUrl: "http://172.20.184.1:9696"
|
||||
OpenstackImageUrl: "http://172.20.184.1:9292"
|
||||
OpenstackComputeUrl: "http://172.20.184.1:8774/v2.1/9f6db6c0f4704390b34991faf60c1822"
|
||||
OpenstackVolumev2Url: "http://172.20.184.1:8776/v2/9f6db6c0f4704390b34991faf60c1822"
|
||||
OpenstackLimitsUrl: "http://172.20.184.1:8774"
|
||||
OpenstackBareMetalUrl: ""
|
||||
Platform: "Nudt_Openstack_T"
|
||||
Id: "default"
|
||||
Keylin_Openstack_T:
|
||||
USER: "admin"
|
||||
PASSWORD: "3d53f0a417f14e48"
|
||||
DOMAIN: "Default"
|
||||
TokenUrl: "http://10.200.1.82:5000/v3/auth/tokens?nocatalog"
|
||||
Status_created: 201
|
||||
ProjectName: "admin"
|
||||
TokenHeader: X-Subject-Token
|
||||
AuthMethod: "password"
|
||||
OpenstackNetworkUrl: "http://10.200.1.82:9696"
|
||||
OpenstackImageUrl: "http://10.200.1.82:9292"
|
||||
OpenstackComputeUrl: "http://10.200.1.82:8774/v2.1/cdda0b55c2034012b255389f96d894db"
|
||||
OpenstackVolumev2Url: "http://10.200.1.82:8776/v2/cdda0b55c2034012b255389f96d894db"
|
||||
OpenstackLimitsUrl: "http://10.200.1.82:8774"
|
||||
OpenstackBareMetalUrl: ""
|
||||
Platform: "Keylin_Openstack_T"
|
||||
Id: "default"
|
||||
DianKe_Openstack_R:
|
||||
USER: "admin"
|
||||
PASSWORD: "nrfD3plQn9ro3WZ3nFmejFA3F7y5VpGwL0KARvlq"
|
||||
DOMAIN: "Default"
|
||||
TokenUrl: "http://10.200.15.121:35357/v3/auth/tokens?nocatalog"
|
||||
Status_created: 201
|
||||
ProjectName: "admin"
|
||||
TokenHeader: X-Subject-Token
|
||||
AuthMethod: "password"
|
||||
OpenstackNetworkUrl: "http://10.200.15.121:9696"
|
||||
OpenstackImageUrl: "http://10.200.15.121:9292"
|
||||
OpenstackComputeUrl: "http://10.200.15.121:8774/v2.1/c2b8be0fe8ad48329556f1989700c091"
|
||||
OpenstackVolumev2Url: "http://10.200.15.121:8776/v2/c2b8be0fe8ad48329556f1989700c091"
|
||||
OpenstackLimitsUrl: "http://10.200.15.121:8774"
|
||||
OpenstackBareMetalUrl: ""
|
||||
Platform: "DianKe_Openstack_R"
|
||||
Platform: "Nudt"
|
||||
Id: "default"
|
||||
|
||||
# core rpc
|
||||
PcmCoreRpcConf:
|
||||
# target: nacos://10.101.15.7:8848/pcm.core.rpc?timeout=30s&namespaceid=storage&groupname=DEFAULT_GROUP&appName=pcm.core.rpc
|
||||
Endpoints:
|
||||
- pcm-core-rpc:2004
|
||||
target: nacos://10.101.15.7:8848/pcm.core.rpc?timeout=30s&namespaceid=storage&groupname=DEFAULT_GROUP&appName=pcm.core.rpc
|
||||
# Endpoints:
|
||||
# - 127.0.0.1:8888
|
||||
NonBlock: true
|
||||
|
||||
ParticipantId: 0
|
||||
|
|
|
|||
123
go.mod
123
go.mod
|
|
@ -1,101 +1,100 @@
|
|||
module gitlink.org.cn/JointCloud/pcm-openstack
|
||||
module gitlink.org.cn/jcce-pcm/pcm-participant-openstack
|
||||
|
||||
go 1.22.0
|
||||
|
||||
toolchain go1.22.4
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/go-resty/resty/v2 v2.12.0
|
||||
github.com/prometheus/client_golang v1.19.1
|
||||
github.com/prometheus/common v0.54.0
|
||||
github.com/prometheus/client_golang v1.17.0
|
||||
github.com/prometheus/common v0.45.0
|
||||
github.com/robfig/cron/v3 v3.0.1
|
||||
github.com/zeromicro/go-zero v1.6.5
|
||||
gitlink.org.cn/JointCloud/pcm-coordinator v0.0.0-20240627015651-e96dddf8fe10
|
||||
google.golang.org/grpc v1.64.0
|
||||
google.golang.org/protobuf v1.34.2
|
||||
k8s.io/apimachinery v0.30.2
|
||||
github.com/zeromicro/go-zero v1.6.0
|
||||
gitlink.org.cn/jcce-pcm/pcm-coordinator v0.1.12
|
||||
gitlink.org.cn/jcce-pcm/utils v0.0.2
|
||||
google.golang.org/grpc v1.59.0
|
||||
google.golang.org/protobuf v1.31.0
|
||||
k8s.io/apimachinery v0.28.3
|
||||
k8s.io/client-go v0.28.3
|
||||
)
|
||||
|
||||
require (
|
||||
filippo.io/edwards25519 v1.1.0 // indirect
|
||||
github.com/JCCE-nudt/apigw-go-sdk v0.0.0-20230525025609-34159d6f2818 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bwmarrin/snowflake v0.3.0 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/coreos/go-semver v0.3.1 // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
|
||||
github.com/fatih/color v1.17.0 // indirect
|
||||
github.com/go-logr/logr v1.4.2 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
|
||||
github.com/fatih/color v1.16.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/go-logr/logr v1.3.0 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.21.0 // indirect
|
||||
github.com/go-openapi/jsonreference v0.21.0 // indirect
|
||||
github.com/go-openapi/swag v0.23.0 // indirect
|
||||
github.com/go-sql-driver/mysql v1.8.1 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.20.0 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.2 // indirect
|
||||
github.com/go-openapi/swag v0.22.4 // indirect
|
||||
github.com/go-redis/redis/v8 v8.11.5 // indirect
|
||||
github.com/go-resty/resty/v2 v2.10.0 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/mock v1.6.0 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
|
||||
github.com/google/go-cmp v0.6.0 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
|
||||
github.com/google/pprof v0.0.0-20211214055906-6f57359322fd // indirect
|
||||
github.com/google/uuid v1.4.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect
|
||||
github.com/jinzhu/copier v0.4.0 // indirect
|
||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/openzipkin/zipkin-go v0.4.3 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
|
||||
github.com/nacos-group/nacos-sdk-go/v2 v2.2.3 // indirect
|
||||
github.com/openzipkin/zipkin-go v0.4.2 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/prometheus/client_model v0.6.1 // indirect
|
||||
github.com/prometheus/procfs v0.15.1 // indirect
|
||||
github.com/redis/go-redis/v9 v9.5.3 // indirect
|
||||
github.com/prometheus/client_model v0.5.0 // indirect
|
||||
github.com/prometheus/procfs v0.12.0 // indirect
|
||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.5.14 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.14 // indirect
|
||||
go.etcd.io/etcd/client/v3 v3.5.14 // indirect
|
||||
go.opentelemetry.io/otel v1.27.0 // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.5.10 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect
|
||||
go.etcd.io/etcd/client/v3 v3.5.10 // indirect
|
||||
go.opentelemetry.io/otel v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/zipkin v1.27.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.27.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.27.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.27.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/zipkin v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.19.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
|
||||
go.uber.org/automaxprocs v1.5.3 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
golang.org/x/net v0.26.0 // indirect
|
||||
golang.org/x/oauth2 v0.21.0 // indirect
|
||||
golang.org/x/sys v0.21.0 // indirect
|
||||
golang.org/x/term v0.21.0 // indirect
|
||||
golang.org/x/text v0.16.0 // indirect
|
||||
golang.org/x/time v0.5.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect
|
||||
go.uber.org/zap v1.26.0 // indirect
|
||||
golang.org/x/net v0.17.0 // indirect
|
||||
golang.org/x/oauth2 v0.13.0 // indirect
|
||||
golang.org/x/sys v0.14.0 // indirect
|
||||
golang.org/x/term v0.14.0 // indirect
|
||||
golang.org/x/text v0.14.0 // indirect
|
||||
golang.org/x/time v0.4.0 // indirect
|
||||
google.golang.org/appengine v1.6.8 // indirect
|
||||
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
gorm.io/driver/mysql v1.5.2 // indirect
|
||||
gorm.io/gorm v1.25.5 // indirect
|
||||
k8s.io/api v0.30.2 // indirect
|
||||
k8s.io/client-go v0.30.2 // indirect
|
||||
k8s.io/klog/v2 v2.130.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20240620174524-b456828f718b // indirect
|
||||
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect
|
||||
k8s.io/api v0.28.3 // indirect
|
||||
k8s.io/klog/v2 v2.110.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
|
||||
sigs.k8s.io/yaml v1.4.0 // indirect
|
||||
|
|
|
|||
313
go.sum
313
go.sum
|
|
@ -1,95 +1,90 @@
|
|||
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||
github.com/JCCE-nudt/apigw-go-sdk v0.0.0-20230525025609-34159d6f2818 h1:QLulhUyxPDs9FFieVZwmKAnUBLeRDhsVNehotAAL/FE=
|
||||
github.com/JCCE-nudt/apigw-go-sdk v0.0.0-20230525025609-34159d6f2818/go.mod h1:j+am5/1URgsvyhOAyURFR9vH3malaW7Tq6d33OyPsnM=
|
||||
github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302 h1:uvdUDbHQHO85qeSydJtItA4T55Pw6BtAejd0APRJOCE=
|
||||
github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
|
||||
github.com/alicebob/miniredis/v2 v2.32.1 h1:Bz7CciDnYSaa0mX5xODh6GUITRSx+cVhjNoOR4JssBo=
|
||||
github.com/alicebob/miniredis/v2 v2.32.1/go.mod h1:AqkLNAfUm0K07J28hnAyyQKf/x0YkCY/g5DCtuL01Mw=
|
||||
github.com/alicebob/miniredis/v2 v2.31.0 h1:ObEFUNlJwoIiyjxdrYF0QIDE7qXcLc7D3WpSH4c22PU=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
|
||||
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
|
||||
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
|
||||
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
|
||||
github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0=
|
||||
github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE=
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
|
||||
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
|
||||
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
|
||||
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4=
|
||||
github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec=
|
||||
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
|
||||
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU=
|
||||
github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4=
|
||||
github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI=
|
||||
github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g=
|
||||
github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
|
||||
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
|
||||
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
|
||||
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
|
||||
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY=
|
||||
github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ=
|
||||
github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY=
|
||||
github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ=
|
||||
github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4=
|
||||
github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE=
|
||||
github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
|
||||
github.com/go-resty/resty/v2 v2.12.0 h1:rsVL8P90LFvkUYq/V5BTVe203WfRIU4gvcf+yfzJzGA=
|
||||
github.com/go-resty/resty/v2 v2.12.0/go.mod h1:o0yGPrkS3lOe1+eFajk6kBW8ScXzwU3hD69/gt2yB/0=
|
||||
github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
|
||||
github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
|
||||
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
|
||||
github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
|
||||
github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ=
|
||||
github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA=
|
||||
github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
|
||||
github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
|
||||
github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
|
||||
github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU=
|
||||
github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-resty/resty/v2 v2.10.0 h1:Qla4W/+TMmv0fOeeRqzEpXPLfTUnR5HZ1+lGs+CkiCo=
|
||||
github.com/go-resty/resty/v2 v2.10.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A=
|
||||
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
|
||||
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 h1:0VpGH+cDhbDtdcweoyCVsF3fhN8kejK6rFe/2FFX2nU=
|
||||
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49/go.mod h1:BkkQ4L1KS1xMt2aWSPStnn55ChGC0DPOn2FQYj+f25M=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
|
||||
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg=
|
||||
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k=
|
||||
github.com/google/pprof v0.0.0-20211214055906-6f57359322fd h1:1FjCyPC+syAzJ5/2S8fqdZK1R22vvA0J7JZKcuOIQ7Y=
|
||||
github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg=
|
||||
github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4=
|
||||
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 h1:6UKoz5ujsI55KNpsJH3UwCq3T8kKbZwNZBNPuTTje8U=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1/go.mod h1:YvJ2f6MplWDhfxiUC3KpyTy76kYUZA4W3pTv/wdKQ9Y=
|
||||
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw=
|
||||
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
|
||||
github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8=
|
||||
github.com/jinzhu/copier v0.4.0/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg=
|
||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
||||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
|
||||
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
|
||||
|
|
@ -99,6 +94,8 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk
|
|||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=
|
||||
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
|
|
@ -107,102 +104,96 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY
|
|||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g=
|
||||
github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc=
|
||||
github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk=
|
||||
github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0=
|
||||
github.com/openzipkin/zipkin-go v0.4.3 h1:9EGwpqkgnwdEIJ+Od7QVSEIH+ocmm5nPat0G7sjsSdg=
|
||||
github.com/openzipkin/zipkin-go v0.4.3/go.mod h1:M9wCJZFWCo2RiY+o1eBCEMe0Dp2S5LDHcMZmk3RmK7c=
|
||||
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
|
||||
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
|
||||
github.com/nacos-group/nacos-sdk-go/v2 v2.2.3 h1:sUQx4f1bXDeeOOEQZjGAitzxYApbYY9fVDbxVCaBW+I=
|
||||
github.com/nacos-group/nacos-sdk-go/v2 v2.2.3/go.mod h1:UL4U89WYdnyajgKJUMpuT1Rr6iNmbjrxOO40JRgtA00=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU=
|
||||
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
|
||||
github.com/openzipkin/zipkin-go v0.4.2 h1:zjqfqHjUpPmB3c1GlCvvgsM1G4LkvqQbBDueDOCg/jA=
|
||||
github.com/openzipkin/zipkin-go v0.4.2/go.mod h1:ZeVkFjuuBiSy13y8vpSDCjMi9GoI3hPpCJSBx/EYFhY=
|
||||
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
|
||||
github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
|
||||
github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
|
||||
github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE=
|
||||
github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho=
|
||||
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
|
||||
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
|
||||
github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8=
|
||||
github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ=
|
||||
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
|
||||
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
|
||||
github.com/redis/go-redis/v9 v9.5.3 h1:fOAp1/uJG+ZtcITgZOfYFmTKPE7n4Vclj1wZFgRciUU=
|
||||
github.com/redis/go-redis/v9 v9.5.3/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M=
|
||||
github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q=
|
||||
github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY=
|
||||
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
|
||||
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
|
||||
github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM=
|
||||
github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY=
|
||||
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
|
||||
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
|
||||
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
|
||||
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
|
||||
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
|
||||
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
|
||||
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
|
||||
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
|
||||
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
|
||||
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M=
|
||||
github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
|
||||
github.com/zeromicro/go-zero v1.6.5 h1:JgsBa25/knnEL7+KQksbwktudIkNQvaAin0nisVgnSA=
|
||||
github.com/zeromicro/go-zero v1.6.5/go.mod h1:XjbssEVEzFKueAh0Fie5kNf+cRqFlQQk46fY9WgEGaM=
|
||||
gitlink.org.cn/JointCloud/pcm-coordinator v0.0.0-20240627015651-e96dddf8fe10 h1:Dot5FZG9B+CwuT96K6a0CvT9j8dObPG82Bohg0r2Jdo=
|
||||
gitlink.org.cn/JointCloud/pcm-coordinator v0.0.0-20240627015651-e96dddf8fe10/go.mod h1:d1gOCLUqJVXLbMsqde3Mkns5ejj99oQ7/C02xRf38f4=
|
||||
go.etcd.io/etcd/api/v3 v3.5.14 h1:vHObSCxyB9zlF60w7qzAdTcGaglbJOpSj1Xj9+WGxq0=
|
||||
go.etcd.io/etcd/api/v3 v3.5.14/go.mod h1:BmtWcRlQvwa1h3G2jvKYwIQy4PkHlDej5t7uLMUdJUU=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.14 h1:SaNH6Y+rVEdxfpA2Jr5wkEvN6Zykme5+YnbCkxvuWxQ=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.14/go.mod h1:8uMgAokyG1czCtIdsq+AGyYQMvpIKnSvPjFMunkgeZI=
|
||||
go.etcd.io/etcd/client/v3 v3.5.14 h1:CWfRs4FDaDoSz81giL7zPpZH2Z35tbOrAJkkjMqOupg=
|
||||
go.etcd.io/etcd/client/v3 v3.5.14/go.mod h1:k3XfdV/VIHy/97rqWjoUzrj9tk7GgJGH9J8L4dNXmAk=
|
||||
go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg=
|
||||
go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ=
|
||||
github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE=
|
||||
github.com/zeromicro/go-zero v1.6.0 h1:UwSOR1lGZ2g7L0S07PM8RoneAcubtd5x//EfbuNucQ0=
|
||||
github.com/zeromicro/go-zero v1.6.0/go.mod h1:E9GCFPb0SwsTKFBcFr9UynGvXiDMmfc6fI5F15vqvAQ=
|
||||
gitlink.org.cn/jcce-pcm/pcm-coordinator v0.1.12 h1:b0L8x4yyaIKRhvENFiJwlNzBwOl663YNHETxLqclRNk=
|
||||
gitlink.org.cn/jcce-pcm/pcm-coordinator v0.1.12/go.mod h1:rBCt8bThzy5x4AesXPZ8Dv9uGcZLB9XX6376WXWe/wM=
|
||||
gitlink.org.cn/jcce-pcm/utils v0.0.2 h1:Stif8W9C9TOCS2hw4g+OlOywDrsVYNrkiyKfBrWkT0w=
|
||||
gitlink.org.cn/jcce-pcm/utils v0.0.2/go.mod h1:u8PTlBpzUyOlbQJgfSiutq91q/JtrJIQiPNDe4S/pGs=
|
||||
go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k=
|
||||
go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U=
|
||||
go.etcd.io/etcd/client/v3 v3.5.10 h1:W9TXNZ+oB3MCd/8UjxHTWK5J9Nquw9fQBLJd5ne5/Ao=
|
||||
go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc=
|
||||
go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs=
|
||||
go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY=
|
||||
go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4=
|
||||
go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY=
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 h1:/0YaXu3755A/cFbtXp+21lkXgI0QE5avTWA2HjU9/WE=
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0/go.mod h1:m7SFxp0/7IxmJPLIY3JhOcU9CoFzDaCPL6xxQIxhA+o=
|
||||
go.opentelemetry.io/otel/exporters/zipkin v1.27.0 h1:aXcxb7F6ZDC1o2Z52LDfS2g6M2FB5CrxdR2gzY4QRNs=
|
||||
go.opentelemetry.io/otel/exporters/zipkin v1.27.0/go.mod h1:+WMURoi4KmVB7ypbFPx3xtZTWen2Ca3lRK9u6DVTO5M=
|
||||
go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik=
|
||||
go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak=
|
||||
go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI=
|
||||
go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A=
|
||||
go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw=
|
||||
go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4=
|
||||
go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0=
|
||||
go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 h1:3d+S281UTjM+AbF31XSOYn1qXn3BgIdWl8HNEpx08Jk=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h1:0+KuTDyKL4gjKCF75pHOX4wuzYDUZYfAQdSu43o+Z2I=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU=
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.19.0 h1:Nw7Dv4lwvGrI68+wULbcq7su9K2cebeCUrDjVrUJHxM=
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.19.0/go.mod h1:1MsF6Y7gTqosgoZvHlzcaaM8DIMNZgJh87ykokoNH7Y=
|
||||
go.opentelemetry.io/otel/exporters/zipkin v1.19.0 h1:EGY0h5mGliP9o/nIkVuLI0vRiQqmsYOcbwCuotksO1o=
|
||||
go.opentelemetry.io/otel/exporters/zipkin v1.19.0/go.mod h1:JQgTGJP11yi3o4GHzIWYodhPisxANdqxF1eHwDSnJrI=
|
||||
go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE=
|
||||
go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8=
|
||||
go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o=
|
||||
go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A=
|
||||
go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg=
|
||||
go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo=
|
||||
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
|
||||
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
|
||||
go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8=
|
||||
go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
|
||||
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
||||
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||
go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo=
|
||||
go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
|
||||
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
|
|
@ -217,12 +208,10 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b
|
|||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
||||
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
|
||||
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
|
||||
golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs=
|
||||
golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
|
||||
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
|
||||
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
||||
golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY=
|
||||
golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
|
@ -236,34 +225,36 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
|
||||
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
|
||||
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
|
||||
golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA=
|
||||
golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
|
||||
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
|
||||
golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8=
|
||||
golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
|
||||
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
|
||||
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
|
||||
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY=
|
||||
golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
|
|
@ -271,50 +262,52 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f
|
|||
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA=
|
||||
golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c=
|
||||
golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 h1:MuYw1wJzT+ZkybKfaOXKp5hJiZDn2iHaXRw0mRYdHSc=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4/go.mod h1:px9SlOOZBg1wM1zdnr8jEL4CNGUBZ+ZKYtNPApNQc4c=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 h1:Di6ANFilr+S60a4S61ZM00vLdw0IrQOSMS2/6mrnOU0=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=
|
||||
google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY=
|
||||
google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg=
|
||||
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
|
||||
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
|
||||
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
|
||||
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
|
||||
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ=
|
||||
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA=
|
||||
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
|
||||
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
|
||||
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY=
|
||||
gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0=
|
||||
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gorm.io/driver/mysql v1.5.2 h1:QC2HRskSE75wBuOxe0+iCkyJZ+RqpudsQtqkp+IMuXs=
|
||||
gorm.io/driver/mysql v1.5.2/go.mod h1:pQLhh1Ut/WUAySdTHwBpBv6+JKcj+ua4ZFx1QQTBzb8=
|
||||
gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
|
||||
gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls=
|
||||
gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
||||
k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI=
|
||||
k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI=
|
||||
k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg=
|
||||
k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc=
|
||||
k8s.io/client-go v0.30.2 h1:sBIVJdojUNPDU/jObC+18tXWcTJVcwyqS9diGdWHk50=
|
||||
k8s.io/client-go v0.30.2/go.mod h1:JglKSWULm9xlJLx4KCkfLLQ7XwtlbflV6uFFSHTMgVs=
|
||||
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
|
||||
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
|
||||
k8s.io/kube-openapi v0.0.0-20240620174524-b456828f718b h1:Q9xmGWBvOGd8UJyccgpYlLosk/JlfP3xQLNkQlHJeXw=
|
||||
k8s.io/kube-openapi v0.0.0-20240620174524-b456828f718b/go.mod h1:UxDHUPsUwTOOxSU+oXURfFBcAS6JwiRXTYqYwfuGowc=
|
||||
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak=
|
||||
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM=
|
||||
k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc=
|
||||
k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A=
|
||||
k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8=
|
||||
k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4=
|
||||
k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo=
|
||||
k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0=
|
||||
k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo=
|
||||
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780=
|
||||
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=
|
||||
|
|
|
|||
|
|
@ -2,6 +2,31 @@ package common
|
|||
|
||||
import "time"
|
||||
|
||||
/*type Auth struct {
|
||||
Auth struct {
|
||||
Identity struct {
|
||||
Methods []string `json:"methods"`
|
||||
Password struct {
|
||||
User struct {
|
||||
Name string `json:"name"`
|
||||
Password string `json:"password"`
|
||||
Domain struct {
|
||||
Name string `json:"name"`
|
||||
} `json:"domain"`
|
||||
} `json:"user"`
|
||||
} `json:"password"`
|
||||
} `json:"identity"`
|
||||
Scope struct {
|
||||
Project struct {
|
||||
Name string `json:"name"`
|
||||
Domain struct {
|
||||
Name string `json:"name"`
|
||||
} `json:"domain"`
|
||||
} `json:"project"`
|
||||
} `json:"scope"`
|
||||
} `json:"auth"`
|
||||
}*/
|
||||
|
||||
type Auth struct {
|
||||
Auth struct {
|
||||
Identity struct {
|
||||
|
|
|
|||
|
|
@ -1,53 +0,0 @@
|
|||
package common
|
||||
|
||||
type CreateSerReq struct {
|
||||
Platform string `json:"platform,omitempty"`
|
||||
CrServer CrServer `json:"crServer,omitempty"`
|
||||
}
|
||||
|
||||
type CrServer struct {
|
||||
Server Server `json:"server,omitempty"`
|
||||
}
|
||||
|
||||
type Server struct {
|
||||
FlavorRef string `json:"flavorRef,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Networks []Networks `json:"networks,omitempty"`
|
||||
ImageRef string `json:"imageRef,omitempty"`
|
||||
AccessIPv4 string `json:"accessIPv4,omitempty"`
|
||||
AccessIPv6 string `json:"accessIPv6,omitempty"`
|
||||
AdminPass string `json:"adminPass,omitempty"`
|
||||
MinCount int64 `json:"min_count,omitempty"`
|
||||
}
|
||||
|
||||
type Networks struct {
|
||||
Uuid string `json:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type CreateServerResp struct {
|
||||
Code int64 `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Data string `json:"data"`
|
||||
Server ServerResp `json:"server,omitempty"`
|
||||
}
|
||||
|
||||
type ServerResp struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
type GetServersDetailedByIdReq struct {
|
||||
ServerId string `json:"server_id,omitempty"`
|
||||
Platform string `json:"platform,omitempty"`
|
||||
}
|
||||
|
||||
type GetServersDetailedByIdResp struct {
|
||||
Code int64 `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
// Data string `json:"data"`
|
||||
Server ServerDetailed `json:"server,omitempty"`
|
||||
}
|
||||
|
||||
type ServerDetailed struct {
|
||||
Status string `json:"status,omitempty"`
|
||||
Id string `json:"id,omitempty"`
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@ package common
|
|||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/config"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/config"
|
||||
"io"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"log"
|
||||
|
|
@ -14,23 +14,83 @@ import (
|
|||
var FileName string
|
||||
var C config.Config
|
||||
|
||||
//var (
|
||||
// token, expiredAt = GenerateToken()
|
||||
//)
|
||||
|
||||
var (
|
||||
token string
|
||||
expiredAt time.Time
|
||||
platform string
|
||||
)
|
||||
|
||||
/*func GenerateToken() (string, string, time.Time) {
|
||||
a := Auth{}
|
||||
var (
|
||||
TokenUrl string
|
||||
)
|
||||
switch Platform {
|
||||
case C.OpenstackConfig.ZhiJiang.Platform:
|
||||
a.Auth.Scope.Project.Name = C.OpenstackConfig.ZhiJiang.USER
|
||||
a.Auth.Scope.Project.Domain.Id = C.OpenstackConfig.ZhiJiang.Id
|
||||
a.Auth.Identity.Methods = append(a.Auth.Identity.Methods, C.OpenstackConfig.ZhiJiang.AuthMethod)
|
||||
a.Auth.Identity.Password.User.Name = C.OpenstackConfig.ZhiJiang.USER
|
||||
a.Auth.Identity.Password.User.Password = C.OpenstackConfig.ZhiJiang.PASSWORD
|
||||
a.Auth.Identity.Password.User.Domain.Name = C.OpenstackConfig.ZhiJiang.DOMAIN
|
||||
TokenUrl = C.OpenstackConfig.ZhiJiang.TokenUrl
|
||||
case C.OpenstackConfig.Nudt.Platform:
|
||||
a.Auth.Scope.Project.Name = C.OpenstackConfig.Nudt.USER
|
||||
a.Auth.Scope.Project.Domain.Id = C.OpenstackConfig.Nudt.Id
|
||||
a.Auth.Identity.Methods = append(a.Auth.Identity.Methods, C.OpenstackConfig.Nudt.AuthMethod)
|
||||
a.Auth.Identity.Password.User.Name = C.OpenstackConfig.Nudt.USER
|
||||
a.Auth.Identity.Password.User.Password = C.OpenstackConfig.Nudt.PASSWORD
|
||||
a.Auth.Identity.Password.User.Domain.Name = C.OpenstackConfig.Nudt.DOMAIN
|
||||
TokenUrl = C.OpenstackConfig.Nudt.TokenUrl
|
||||
default:
|
||||
//return nil, fmt.Errorf("platform %s not supported", Platform)
|
||||
}
|
||||
jsonStr, _ := json.Marshal(a)
|
||||
req_url, err := http.NewRequest("POST", TokenUrl, bytes.NewBuffer(jsonStr))
|
||||
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
c := http.Client{Timeout: time.Duration(3) * time.Second}
|
||||
|
||||
respUrl, err := c.Do(req_url)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if respUrl.StatusCode != C.OpenstackConfig.Status_created {
|
||||
panic("获取token失败")
|
||||
}
|
||||
|
||||
defer respUrl.Body.Close()
|
||||
|
||||
var t Token
|
||||
|
||||
result, _ := io.ReadAll(respUrl.Body)
|
||||
json.Unmarshal(result, &t)
|
||||
|
||||
return Platform, respUrl.Header.Get(C.OpenstackConfig.TokenHeader), t.Token.ExpiresAt
|
||||
}*/
|
||||
|
||||
/*func GetToken() string {
|
||||
if time.Now().After(expiredAt) {
|
||||
Platform, token, expiredAt = GenerateToken()
|
||||
}
|
||||
return token
|
||||
}*/
|
||||
|
||||
func GetOpenstackConfWithPlatform(platform string) (*config.Conf, error) {
|
||||
var conf config.Conf
|
||||
switch platform {
|
||||
case C.OpenstackConfig.Nudt_Openstack_T.Platform:
|
||||
conf = C.OpenstackConfig.Nudt_Openstack_T
|
||||
case C.OpenstackConfig.ZhiJiang_Openstack_T.Platform:
|
||||
conf = C.OpenstackConfig.ZhiJiang_Openstack_T
|
||||
case C.OpenstackConfig.Keylin_Openstack_T.Platform:
|
||||
conf = C.OpenstackConfig.Keylin_Openstack_T
|
||||
case C.OpenstackConfig.DianKe_Openstack_R.Platform:
|
||||
conf = C.OpenstackConfig.DianKe_Openstack_R
|
||||
case C.OpenstackConfig.Nudt.Platform:
|
||||
conf = C.OpenstackConfig.Nudt
|
||||
case C.OpenstackConfig.ZhiJiang.Platform:
|
||||
conf = C.OpenstackConfig.ZhiJiang
|
||||
default:
|
||||
return nil, fmt.Errorf("platform not supported")
|
||||
}
|
||||
|
|
@ -43,38 +103,22 @@ func GetToken(Platform string) (token string) {
|
|||
TokenUrl string
|
||||
)
|
||||
switch Platform {
|
||||
case C.OpenstackConfig.ZhiJiang_Openstack_T.Platform:
|
||||
a.Auth.Scope.Project.Name = C.OpenstackConfig.ZhiJiang_Openstack_T.USER
|
||||
a.Auth.Scope.Project.Domain.Id = C.OpenstackConfig.ZhiJiang_Openstack_T.Id
|
||||
a.Auth.Identity.Methods = append(a.Auth.Identity.Methods, C.OpenstackConfig.ZhiJiang_Openstack_T.AuthMethod)
|
||||
a.Auth.Identity.Password.User.Name = C.OpenstackConfig.ZhiJiang_Openstack_T.USER
|
||||
a.Auth.Identity.Password.User.Password = C.OpenstackConfig.ZhiJiang_Openstack_T.PASSWORD
|
||||
a.Auth.Identity.Password.User.Domain.Name = C.OpenstackConfig.ZhiJiang_Openstack_T.DOMAIN
|
||||
TokenUrl = C.OpenstackConfig.ZhiJiang_Openstack_T.TokenUrl
|
||||
case C.OpenstackConfig.Nudt_Openstack_T.Platform:
|
||||
a.Auth.Scope.Project.Name = C.OpenstackConfig.Nudt_Openstack_T.USER
|
||||
a.Auth.Scope.Project.Domain.Id = C.OpenstackConfig.Nudt_Openstack_T.Id
|
||||
a.Auth.Identity.Methods = append(a.Auth.Identity.Methods, C.OpenstackConfig.Nudt_Openstack_T.AuthMethod)
|
||||
a.Auth.Identity.Password.User.Name = C.OpenstackConfig.Nudt_Openstack_T.USER
|
||||
a.Auth.Identity.Password.User.Password = C.OpenstackConfig.Nudt_Openstack_T.PASSWORD
|
||||
a.Auth.Identity.Password.User.Domain.Name = C.OpenstackConfig.Nudt_Openstack_T.DOMAIN
|
||||
TokenUrl = C.OpenstackConfig.Nudt_Openstack_T.TokenUrl
|
||||
case C.OpenstackConfig.Keylin_Openstack_T.Platform:
|
||||
a.Auth.Scope.Project.Name = C.OpenstackConfig.Keylin_Openstack_T.USER
|
||||
a.Auth.Scope.Project.Domain.Id = C.OpenstackConfig.Keylin_Openstack_T.Id
|
||||
a.Auth.Identity.Methods = append(a.Auth.Identity.Methods, C.OpenstackConfig.Keylin_Openstack_T.AuthMethod)
|
||||
a.Auth.Identity.Password.User.Name = C.OpenstackConfig.Keylin_Openstack_T.USER
|
||||
a.Auth.Identity.Password.User.Password = C.OpenstackConfig.Keylin_Openstack_T.PASSWORD
|
||||
a.Auth.Identity.Password.User.Domain.Name = C.OpenstackConfig.Keylin_Openstack_T.DOMAIN
|
||||
TokenUrl = C.OpenstackConfig.Keylin_Openstack_T.TokenUrl
|
||||
case C.OpenstackConfig.DianKe_Openstack_R.Platform:
|
||||
a.Auth.Scope.Project.Name = C.OpenstackConfig.DianKe_Openstack_R.USER
|
||||
a.Auth.Scope.Project.Domain.Id = C.OpenstackConfig.DianKe_Openstack_R.Id
|
||||
a.Auth.Identity.Methods = append(a.Auth.Identity.Methods, C.OpenstackConfig.DianKe_Openstack_R.AuthMethod)
|
||||
a.Auth.Identity.Password.User.Name = C.OpenstackConfig.DianKe_Openstack_R.USER
|
||||
a.Auth.Identity.Password.User.Password = C.OpenstackConfig.DianKe_Openstack_R.PASSWORD
|
||||
a.Auth.Identity.Password.User.Domain.Name = C.OpenstackConfig.DianKe_Openstack_R.DOMAIN
|
||||
TokenUrl = C.OpenstackConfig.DianKe_Openstack_R.TokenUrl
|
||||
case C.OpenstackConfig.ZhiJiang.Platform:
|
||||
a.Auth.Scope.Project.Name = C.OpenstackConfig.ZhiJiang.USER
|
||||
a.Auth.Scope.Project.Domain.Id = C.OpenstackConfig.ZhiJiang.Id
|
||||
a.Auth.Identity.Methods = append(a.Auth.Identity.Methods, C.OpenstackConfig.ZhiJiang.AuthMethod)
|
||||
a.Auth.Identity.Password.User.Name = C.OpenstackConfig.ZhiJiang.USER
|
||||
a.Auth.Identity.Password.User.Password = C.OpenstackConfig.ZhiJiang.PASSWORD
|
||||
a.Auth.Identity.Password.User.Domain.Name = C.OpenstackConfig.ZhiJiang.DOMAIN
|
||||
TokenUrl = C.OpenstackConfig.ZhiJiang.TokenUrl
|
||||
case C.OpenstackConfig.Nudt.Platform:
|
||||
a.Auth.Scope.Project.Name = C.OpenstackConfig.Nudt.USER
|
||||
a.Auth.Scope.Project.Domain.Id = C.OpenstackConfig.Nudt.Id
|
||||
a.Auth.Identity.Methods = append(a.Auth.Identity.Methods, C.OpenstackConfig.Nudt.AuthMethod)
|
||||
a.Auth.Identity.Password.User.Name = C.OpenstackConfig.Nudt.USER
|
||||
a.Auth.Identity.Password.User.Password = C.OpenstackConfig.Nudt.PASSWORD
|
||||
a.Auth.Identity.Password.User.Domain.Name = C.OpenstackConfig.Nudt.DOMAIN
|
||||
TokenUrl = C.OpenstackConfig.Nudt.TokenUrl
|
||||
default:
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,16 +11,12 @@ const (
|
|||
)
|
||||
|
||||
type Config struct {
|
||||
//AdapterId int `yaml:"AdapterId"`
|
||||
zrpc.RpcServerConf
|
||||
OpenstackConfig OpenstackConfig
|
||||
CoreClientConf CoreClientConf
|
||||
LogConf logx.LogConf
|
||||
PcmCoreRpcConf zrpc.RpcClientConf
|
||||
AdapterId int64
|
||||
Participant Participant
|
||||
CoreUrl string
|
||||
ParticipantId int64
|
||||
Participant Participant
|
||||
}
|
||||
|
||||
type Participant struct {
|
||||
|
|
@ -30,10 +26,3 @@ type Participant struct {
|
|||
TenantName string `json:"tenantName"`
|
||||
Labels map[string]string
|
||||
}
|
||||
|
||||
type CoreClientConf struct {
|
||||
/* Url string `yaml:"Url"`
|
||||
DataSource string `yaml:"DataSource"`*/
|
||||
AdapterId int64 `json:"AdapterId"`
|
||||
CoreUrl string `json:"CoreUrl"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
package config
|
||||
|
||||
type OpenstackConfig struct {
|
||||
ZhiJiang_Openstack_T Conf `json:"ZhiJiang_Openstack_T"`
|
||||
Nudt_Openstack_T Conf `json:"Nudt_Openstack_T"`
|
||||
Keylin_Openstack_T Conf `json:"Keylin_Openstack_T"`
|
||||
DianKe_Openstack_R Conf `json:"DianKe_Openstack_R"`
|
||||
Status_created int `json:"Status_created"`
|
||||
TokenHeader string `json:"TokenHeader"`
|
||||
ZhiJiang Conf `json:"ZhiJiang"`
|
||||
Nudt Conf `json:"Nudt"`
|
||||
Status_created int `json:"Status_created"`
|
||||
TokenHeader string `json:"TokenHeader"`
|
||||
}
|
||||
|
||||
type Conf struct {
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
package logic
|
||||
|
||||
/*type ListServersDetailedLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
*/
|
||||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ func (l *AddSecurityGroupToServerLogic) AddSecurityGroupToServer(in *openstack.A
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackComputeUrl
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -40,7 +39,7 @@ func (l *BulkCreateNetworksLogic) BulkCreateNetworks(in *openstack.BulkCreateNet
|
|||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/networks", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/networks", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ func (l *ChangeAdministrativePasswordLogic) ChangeAdministrativePassword(in *ope
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackComputeUrl
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ func (l *CreateFirewallGroupLogic) CreateFirewallGroup(in *openstack.CreateFirew
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/v2.0/fwaas/firewall_groups", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/v2.0/fwaas/firewall_groups", payload, token)
|
||||
if statusCode == 202 {
|
||||
err := json.Unmarshal(body, &resp)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ func (l *CreateFirewallPolicyLogic) CreateFirewallPolicy(in *openstack.CreateFir
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/v2.0/fwaas/firewall_policies", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/v2.0/fwaas/firewall_policies", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ func (l *CreateFirewallRuleLogic) CreateFirewallRule(in *openstack.CreateFirewal
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/v2.0/fwaas/firewall_rules", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/v2.0/fwaas/firewall_rules", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ func (l *CreateFlavorLogic) CreateFlavor(in *openstack.CreateFlavorReq) (*openst
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackComputeUrl
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/flavors", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/flavors", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ func (l *CreateFloatingIPLogic) CreateFloatingIP(in *openstack.CreateFloatingIPR
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/v2.0/floatingips", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/v2.0/floatingips", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -40,7 +39,7 @@ func (l *CreateImageLogic) CreateImage(in *openstack.CreateImageReq) (*openstack
|
|||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackImageUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/v2/images", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/v2/images", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -39,7 +38,7 @@ func (l *CreateNetworkLogic) CreateNetwork(in *openstack.CreateNetworkReq) (*ope
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/v2.0/networks", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/v2.0/networks", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ func (l *CreateNetworkSegmentRangeLogic) CreateNetworkSegmentRange(in *openstack
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/v2.0/network_segment_ranges", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/v2.0/network_segment_ranges", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -39,7 +38,7 @@ func (l *CreateNodeLogic) CreateNode(in *openstack.CreateNodeReq) (*openstack.Cr
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackComputeUrl
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/v1/nodes", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/v1/nodes", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ func (l *CreatePortLogic) CreatePort(in *openstack.CreatePortReq) (*openstack.Cr
|
|||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/v2.0/ports", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/v2.0/ports", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ func (l *CreateRouterLogic) CreateRouter(in *openstack.CreateRouterReq) (*openst
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/v2.0/routers", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/v2.0/routers", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ func (l *CreateSecurityGroupLogic) CreateSecurityGroup(in *openstack.CreateSecur
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/v2.0/security-groups", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/v2.0/security-groups", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ func (l *CreateSecurityGroupRuleLogic) CreateSecurityGroupRule(in *openstack.Cre
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/v2.0/security-group-rules", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/v2.0/security-group-rules", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"strings"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
|
|
@ -31,20 +31,17 @@ func (l *CreateServerLogic) CreateServer(in *openstack.CreateServerReq) (*openst
|
|||
// todo: add your logic here and delete this line
|
||||
var resp openstack.CreateServerResp
|
||||
platform, err := common.GetOpenstackConfWithPlatform(in.Platform)
|
||||
reqByte, err := json.Marshal(in)
|
||||
token := common.GetToken(in.Platform)
|
||||
fmt.Println("错误", err)
|
||||
reqByte, err := json.Marshal(in.CrServer)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackComputeUrl
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/servers", payload, token)
|
||||
fmt.Println("返回值", body)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
logx.Infof("pcm-openstack call createServer 返回结果! statusCode %s: ,\n body: %s ,\n err: %s", statusCode, body, err)
|
||||
if statusCode == 202 {
|
||||
err := json.Unmarshal(body, &resp)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@ import (
|
|||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ func (l *CreateSubnetLogic) CreateSubnet(in *openstack.CreateSubnetReq) (*openst
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/v2.0/subnets", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/v2.0/subnets", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -39,7 +38,7 @@ func (l *CreateVolumeLogic) CreateVolume(in *openstack.CreateVolumeReq) (*openst
|
|||
token := common.GetToken(in.Platform)
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackVolumev2Url
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/volumes", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/volumes", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -39,7 +38,7 @@ func (l *CreateVolumeTypesLogic) CreateVolumeTypes(in *openstack.CreateVolumeTyp
|
|||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackVolumev2Url
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/types", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/types", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -37,7 +36,7 @@ func (l *DeleteFirewallGroupLogic) DeleteFirewallGroup(in *openstack.DeleteFirew
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/v2.0/fwaas/firewall_groups/"+in.FirewallGroupId, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/v2.0/fwaas/firewall_groups/"+in.FirewallGroupId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
)
|
||||
|
|
@ -36,7 +35,7 @@ func (l *DeleteFirewallPolicyLogic) DeleteFirewallPolicy(in *openstack.DeleteFir
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/v2.0/fwaas/firewall_policies/"+in.FirewallPolicyId, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/v2.0/fwaas/firewall_policies/"+in.FirewallPolicyId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -37,7 +36,7 @@ func (l *DeleteFirewallRuleLogic) DeleteFirewallRule(in *openstack.DeleteFirewal
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/v2.0/fwaas/firewall_rules/"+in.FirewallRuleId, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/v2.0/fwaas/firewall_rules/"+in.FirewallRuleId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -37,7 +36,7 @@ func (l *DeleteFlavorLogic) DeleteFlavor(in *openstack.DeleteFlavorReq) (*openst
|
|||
}
|
||||
openstackUrl := platform.OpenstackImageUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/flavors/"+in.FlavorId, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/flavors/"+in.FlavorId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -37,7 +36,7 @@ func (l *DeleteFloatingIPLogic) DeleteFloatingIP(in *openstack.DeleteFloatingIPR
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/v2.0/floatingips/"+in.FloatingipId, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/v2.0/floatingips/"+in.FloatingipId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
)
|
||||
|
|
@ -36,7 +35,7 @@ func (l *DeleteImageLogic) DeleteImage(in *openstack.DeleteImageReq) (*openstack
|
|||
}
|
||||
openstackUrl := platform.OpenstackImageUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/v2/images/"+in.ImageId, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/v2/images/"+in.ImageId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
)
|
||||
|
|
@ -36,7 +35,7 @@ func (l *DeleteNetworkLogic) DeleteNetwork(in *openstack.DeleteNetworkReq) (*ope
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/v2.0/networks/"+in.NetworkId, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/v2.0/networks/"+in.NetworkId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -37,7 +36,7 @@ func (l *DeleteNetworkSegmentRangesLogic) DeleteNetworkSegmentRanges(in *opensta
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/v2.0/network_segment_ranges/"+in.NetworkSegmentRangeId, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/v2.0/network_segment_ranges/"+in.NetworkSegmentRangeId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
)
|
||||
|
|
@ -36,7 +35,7 @@ func (l *DeleteNodeLogic) DeleteNode(in *openstack.DeleteNodeReq) (*openstack.De
|
|||
}
|
||||
openstackUrl := platform.OpenstackBareMetalUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/v1/nodes/"+in.NodeIdent, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/v1/nodes/"+in.NodeIdent, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -37,7 +36,7 @@ func (l *DeletePortLogic) DeletePort(in *openstack.DeletePortReq) (*openstack.De
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/v2.0/ports/"+in.PortId, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/v2.0/ports/"+in.PortId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -37,7 +36,7 @@ func (l *DeleteRouterLogic) DeleteRouter(in *openstack.DeleteRouterReq) (*openst
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/v2.0/routers/"+in.RouterId, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/v2.0/routers/"+in.RouterId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
)
|
||||
|
|
@ -36,7 +35,7 @@ func (l *DeleteSecurityGroupLogic) DeleteSecurityGroup(in *openstack.DeleteSecur
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/v2.0/security-groups/"+in.SecurityGroupId, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/v2.0/security-groups/"+in.SecurityGroupId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -37,7 +36,7 @@ func (l *DeleteSecurityGroupRuleLogic) DeleteSecurityGroupRule(in *openstack.Del
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/v2.0/security-groups/"+in.SecurityGroupRuleId, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/v2.0/security-groups/"+in.SecurityGroupRuleId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
)
|
||||
|
|
@ -36,7 +35,7 @@ func (l *DeleteServerLogic) DeleteServer(in *openstack.DeleteServerReq) (*openst
|
|||
}
|
||||
openstackUrl := platform.OpenstackComputeUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/servers/"+in.ServerId, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/servers/"+in.ServerId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -38,7 +37,7 @@ func (l *DeleteSubnetLogic) DeleteSubnet(in *openstack.DeleteSubnetReq) (*openst
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/v2.0/subnets/"+in.SubnetId, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/v2.0/subnets/"+in.SubnetId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
)
|
||||
|
|
@ -36,7 +35,7 @@ func (l *DeleteVolumeLogic) DeleteVolume(in *openstack.DeleteVolumeReq) (*openst
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/v2.0/subnets/"+in.VolumeId, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/v2.0/subnets/"+in.VolumeId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
)
|
||||
|
|
@ -36,7 +35,7 @@ func (l *DeleteVolumeTypesLogic) DeleteVolumeTypes(in *openstack.DeleteVolumeTyp
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.DELETE, openstackUrl+"/types/"+in.VolumeTypeId, strings.NewReader(``), token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.DELETE, openstackUrl+"/types/"+in.VolumeTypeId, strings.NewReader(``), token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@ import (
|
|||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
)
|
||||
|
||||
type GetComputeLimitsLogic struct {
|
||||
|
|
@ -33,7 +34,7 @@ func (l *GetComputeLimitsLogic) GetComputeLimits(in *openstack.GetComputeLimitsR
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2/limits", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2/limits", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ func (l *GetServersDetailedByIdLogic) GetServersDetailedById(in *openstack.GetSe
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/servers/"+in.ServerId, nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/servers/"+in.ServerId, nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ func (l *GetVolumeDetailedByIdLogic) GetVolumeDetailedById(in *openstack.GetVolu
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/volumes/"+in.VolumeId, nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/volumes/"+in.VolumeId, nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ func (l *GetVolumeLimitsLogic) GetVolumeLimits(in *openstack.GetVolumeLimitsReq)
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/limits", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/limits", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
|
|
@ -37,7 +36,7 @@ func (l *ListFirewallGroupsLogic) ListFirewallGroups(in *openstack.ListFirewallG
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/fwaas/firewall_groups", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/fwaas/firewall_groups", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ func (l *ListFirewallPoliciesLogic) ListFirewallPolicies(in *openstack.ListFirew
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/fwaas/firewall_policies", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/fwaas/firewall_policies", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ func (l *ListFirewallRulesLogic) ListFirewallRules(in *openstack.ListFirewallRul
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/fwaas/firewall_rules", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/fwaas/firewall_rules", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@ import (
|
|||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
)
|
||||
|
||||
type ListFlavorsDetailLogic struct {
|
||||
|
|
@ -34,7 +35,7 @@ func (l *ListFlavorsDetailLogic) ListFlavorsDetail(in *openstack.ListFlavorsDeta
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/flavors/detail", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/flavors/detail", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ func (l *ListFloatingIPsLogic) ListFloatingIPs(in *openstack.ListFloatingIPsReq)
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/floatingips", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/floatingips", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ func (l *ListImagesLogic) ListImages(in *openstack.ListImagesReq) (*openstack.Li
|
|||
}
|
||||
openstackUrl := platform.OpenstackImageUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2/images", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2/images", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ func (l *ListNetworkSegmentRangesLogic) ListNetworkSegmentRanges(in *openstack.L
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/network_segment_ranges", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/network_segment_ranges", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
|
|
@ -36,7 +35,7 @@ func (l *ListNetworksLogic) ListNetworks(in *openstack.ListNetworksReq) (*openst
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/networks", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/networks", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
|
|
@ -37,7 +36,7 @@ func (l *ListNodesLogic) ListNodes(in *openstack.ListNodesReq) (*openstack.ListN
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v1/nodes/", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v1/nodes/", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ func (l *ListPortsLogic) ListPorts(in *openstack.ListPortsReq) (*openstack.ListP
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/ports", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/ports", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ func (l *ListRoutersLogic) ListRouters(in *openstack.ListRoutersReq) (*openstack
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/routers", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/routers", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ func (l *ListSecurityGroupRulesLogic) ListSecurityGroupRules(in *openstack.ListS
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/security-group-rules", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/security-group-rules", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ func (l *ListSecurityGroupsLogic) ListSecurityGroups(in *openstack.ListSecurityG
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/security-groups", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/security-groups", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,12 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
"time"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"encoding/json"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -27,235 +26,24 @@ func NewListServersDetailedLogic(ctx context.Context, svcCtx *svc.ServiceContext
|
|||
}
|
||||
}
|
||||
|
||||
type ServersDetailedResp struct {
|
||||
Servers []ServersData `json:"servers"`
|
||||
Code int32 `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Error_msg string `json:"error_msg"`
|
||||
}
|
||||
|
||||
type ServersData struct {
|
||||
OSTaskState string `json:"OS-EXT-STS:task_state"`
|
||||
VmState string `json:"OS-EXT-STS:vm_state"`
|
||||
InstanceName string `json:"OS-EXT-SRV-ATTR:instance_name"`
|
||||
OS_SRV_USG_Launched_At string `json:"OS-SRV-USG:launched_at"`
|
||||
OS_DCF_DiskConfig string `json:"OS-DCF:diskConfig"`
|
||||
OS_EXT_STS_Power_State int32 `json:"OS-EXT-SRV-ATTR:power_state"`
|
||||
OS_EXT_AZ_availability_zone string `json:"OS-EXT-AZ:availability_zone"`
|
||||
OS_EXT_SRV_ATTR_Host string `json:"OS-EXT-SRV-ATTR:host"`
|
||||
OS_SRV_USG_Terminated_At string `json:"OS-SRV-USG:terminated_at"`
|
||||
Os_extended_volumes_volumes_attached []string `json:"os-extended-volumes:volumes_attached"`
|
||||
OS_EXT_SRV_ATTR_Hypervisor_Hostname string `json:"OS-EXT-SRV-ATTR:hypervisor_hostname"`
|
||||
AccessIPv4 string `json:"accessIPv4"`
|
||||
AccessIPv6 string `json:"accessIPv6"`
|
||||
Addresses Addresses `json:"addresses"`
|
||||
Config_drive string `json:"config_drive"`
|
||||
Description string `json:"description"`
|
||||
Flavor Flavor `json:"flavor"`
|
||||
HostId string `json:"hostId"`
|
||||
Host_status string `json:"host_status"`
|
||||
Id string `json:"id"`
|
||||
Image Image `json:"image"`
|
||||
Key_name string `json:"key_name"`
|
||||
Links []Links `json:"links"`
|
||||
Locked bool `json:"locked"`
|
||||
Locked_reason string `json:"locked_reason"`
|
||||
Metadata Metadata `json:"metadata"`
|
||||
Name string `json:"name"`
|
||||
Created string `json:"created"`
|
||||
Progress uint32 `json:"progress"`
|
||||
Security_groups []Security_groups `json:"security_groups"`
|
||||
Status string `json:"status"`
|
||||
Tags []string `json:"tags"`
|
||||
Trusted_image_certificates string `json:"trusted_image_certificates"`
|
||||
Updated string `json:"updated"`
|
||||
User_id string `json:"user_id"`
|
||||
}
|
||||
|
||||
// Addresses 结构体表示网络地址的集合
|
||||
type Addresses map[string][]Address
|
||||
|
||||
type Address struct {
|
||||
OSEXTIPSMACMacAddr string `json:"OS-EXT-IPS-MAC:mac_addr"`
|
||||
Version int `json:"version"`
|
||||
Addr string `json:"addr"`
|
||||
OSEXTIPSType string `json:"OS-EXT-IPS:type"`
|
||||
}
|
||||
|
||||
type Flavor struct {
|
||||
Id string `json:"id"`
|
||||
Links []Links `json:"links"`
|
||||
}
|
||||
|
||||
type Image struct {
|
||||
Id string `json:"id"`
|
||||
Links []Link `json:"links"`
|
||||
}
|
||||
|
||||
type Links struct {
|
||||
Href string `json:"href"`
|
||||
Rel string `json:"rel"`
|
||||
}
|
||||
|
||||
type Link struct {
|
||||
Href string `json:"href"`
|
||||
Rel string `json:"rel"`
|
||||
}
|
||||
|
||||
type Metadata struct {
|
||||
}
|
||||
|
||||
type Security_groups struct {
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type Private struct {
|
||||
}
|
||||
|
||||
type ServersWrapper struct {
|
||||
// 其他字段...
|
||||
Servers []ServersDetailed `json:"servers"`
|
||||
// 其他字段...
|
||||
}
|
||||
|
||||
type ServersDetailed struct {
|
||||
// 其他字段...
|
||||
OSTaskState string `json:"OSTaskState"`
|
||||
Status string `json:"status"`
|
||||
VmState string `json:"VmState"`
|
||||
OS_EXT_SRV_ATTR_Instance_Name string `json:"OS_EXT_SRV_ATTR_Instance_Name"`
|
||||
Created string `json:"Created"`
|
||||
Updated string `json:"Updated"`
|
||||
HostId string `json:"HostId"`
|
||||
Ip string `json:"Ip"`
|
||||
Image string `json:"Image"`
|
||||
Flavor string `json:"Flavor"`
|
||||
Id string `json:"Id"`
|
||||
Name string `json:"Name"`
|
||||
Key_name string `json:"Key_name"`
|
||||
Survival_time int32 `json:"Survival_time"`
|
||||
// 其他字段...
|
||||
}
|
||||
|
||||
func (l *ListServersDetailedLogic) ListServersDetailed(in *openstack.ListServersDetailedReq) (*openstack.ListServersDetailedResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
var response ServersDetailedResp
|
||||
var resp openstack.ListServersDetailedResp
|
||||
platform, err := common.GetOpenstackConfWithPlatform(in.Platform)
|
||||
fmt.Println("集群名", platform)
|
||||
openstackUrl := platform.OpenstackComputeUrl
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/servers/detail", nil, token)
|
||||
fmt.Println("返回openstack结果", body)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/servers/detail", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if statusCode == 200 {
|
||||
err := json.Unmarshal(body, &response)
|
||||
err := json.Unmarshal(body, &resp)
|
||||
if err != nil {
|
||||
fmt.Println("错误结果", err)
|
||||
fmt.Println(err)
|
||||
}
|
||||
fmt.Println("错误结果1", "aaaaaaaaaaaa")
|
||||
var newList []interface{}
|
||||
fmt.Println("错误结果2", "bbbbbbbbbb")
|
||||
var days int32
|
||||
for _, server := range response.Servers {
|
||||
fmt.Println("错误结果3", response.Servers)
|
||||
if len(server.Addresses) > 0 {
|
||||
for _, network := range server.Addresses {
|
||||
fmt.Println("错误结果4", server.Addresses)
|
||||
for _, addr := range network {
|
||||
fmt.Println("错误结果5", addr.Addr)
|
||||
ip := addr.Addr
|
||||
fmt.Println("addr:", addr.Addr)
|
||||
//computing time
|
||||
now := time.Now()
|
||||
// 获取当前时间的Unix时间戳(秒)
|
||||
unixTimestampSeconds := now.Unix()
|
||||
fmt.Println("Unix时间戳(秒):", unixTimestampSeconds)
|
||||
|
||||
// 解析ISO 8601格式的字符串为time.Time对象
|
||||
t, err := time.Parse(time.RFC3339, server.Created)
|
||||
if err != nil {
|
||||
panic(err) // 如果解析出错,这里使用panic来演示,实际应用中应做适当的错误处理
|
||||
}
|
||||
|
||||
// 获取Unix时间戳(秒)
|
||||
unixTimestampSecondsCreated := t.Unix()
|
||||
fmt.Println("Unix时间戳(秒):", unixTimestampSecondsCreated)
|
||||
|
||||
timestamp1 := int64(unixTimestampSecondsCreated)
|
||||
timestamp2 := int64(unixTimestampSeconds)
|
||||
|
||||
// 将时间戳转换为time.Time对象
|
||||
time1 := time.Unix(timestamp1, 0)
|
||||
time2 := time.Unix(timestamp2, 0)
|
||||
|
||||
// 计算时间差
|
||||
diff := time2.Sub(time1)
|
||||
|
||||
// 将时间差转换为天数
|
||||
days := int(diff.Hours() / 24)
|
||||
|
||||
fmt.Println("相差天数:", days)
|
||||
// 假设我们想要提取任务状态(task_state)和状态(status)
|
||||
newList = append(newList, map[string]interface{}{
|
||||
"OSTaskState": server.OSTaskState,
|
||||
"Status": server.Status,
|
||||
"VmState": server.VmState,
|
||||
"OS_EXT_SRV_ATTR_Instance_Name": server.InstanceName,
|
||||
"Created": server.Created,
|
||||
"Updated": server.Updated,
|
||||
"HostId": server.HostId,
|
||||
"Ip": ip,
|
||||
"Image": server.Image.Id,
|
||||
"Flavor": server.Flavor.Id,
|
||||
"Id": server.Id,
|
||||
"Name": server.Name,
|
||||
"Key_name": server.Key_name,
|
||||
"Survival_time": days,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
// 假设我们想要提取任务状态(task_state)和状态(status)
|
||||
newList = append(newList, map[string]interface{}{
|
||||
"OSTaskState": server.OSTaskState,
|
||||
"Status": server.Status,
|
||||
"VmState": server.VmState,
|
||||
"OS_EXT_SRV_ATTR_Instance_Name": server.InstanceName,
|
||||
"Created": server.Created,
|
||||
"Updated": server.Updated,
|
||||
"HostId": server.HostId,
|
||||
//"Ip": ip,
|
||||
"Image": server.Image.Id,
|
||||
"Flavor": server.Flavor.Id,
|
||||
"Id": server.Id,
|
||||
"Name": server.Name,
|
||||
"Key_name": server.Key_name,
|
||||
"Survival_time": days,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
jsonData, err := json.Marshal(newList)
|
||||
var serversDetailed []ServersDetailed
|
||||
err2 := json.Unmarshal(jsonData, &serversDetailed)
|
||||
if err2 != nil {
|
||||
fmt.Println("Error parsing JSON array:", err)
|
||||
}
|
||||
serversWrapper := ServersWrapper{
|
||||
Servers: serversDetailed,
|
||||
}
|
||||
jsonData2, err := json.Marshal(serversWrapper)
|
||||
if err != nil {
|
||||
fmt.Println("Error marshalling JSON:", err)
|
||||
}
|
||||
json.Unmarshal(jsonData2, &resp)
|
||||
resp.Code = 200
|
||||
resp.Msg = "Success"
|
||||
} else if statusCode != 200 {
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
|
|
@ -36,7 +35,7 @@ func (l *ListServersLogic) ListServers(in *openstack.ListServersReq) (*openstack
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/servers", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/servers", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
|
|
@ -36,7 +35,7 @@ func (l *ListSubnetsLogic) ListSubnets(in *openstack.ListSubnetsReq) (*openstack
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/subnets", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/subnets", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@ import (
|
|||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
)
|
||||
|
||||
type ListVolumesDetailLogic struct {
|
||||
|
|
@ -35,7 +36,7 @@ func (l *ListVolumesDetailLogic) ListVolumesDetail(in *openstack.ListVolumesDeta
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/volumes/detail", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/volumes/detail", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
|
|
@ -38,7 +37,7 @@ func (l *ListVolumesLogic) ListVolumes(in *openstack.ListVolumesReq) (*openstack
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/volumes", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/volumes", nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
|
|
@ -37,7 +36,7 @@ func (l *ListVolumeTypesLogic) ListVolumeTypes(in *openstack.ListVolumeTypesReq)
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/types", nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/types", nil, token)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ func (l *MigrateServerLogic) MigrateServer(in *openstack.MigrateServerReq) (*ope
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -42,7 +41,7 @@ func (l *PauseServerLogic) PauseServer(in *openstack.PauseServerReq) (*openstack
|
|||
return nil, err
|
||||
}
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -39,7 +38,7 @@ func (l *RebootServerLogic) RebootServer(in *openstack.RebootServerReq) (*openst
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ func (l *RebuildServerLogic) RebuildServer(in *openstack.RebuildServerReq) (*ope
|
|||
token := common.GetToken(in.Platform)
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackVolumev2Url
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ func (l *RemoveSecurityGroupLogic) RemoveSecurityGroup(in *openstack.RemoveSecur
|
|||
token := common.GetToken(in.Platform)
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackVolumev2Url
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ func (l *RescueServerLogic) RescueServer(in *openstack.RescueServerReq) (*openst
|
|||
token := common.GetToken(in.Platform)
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackVolumev2Url
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ func (l *ResizeServerLogic) ResizeServer(in *openstack.ResizeServerReq) (*openst
|
|||
token := common.GetToken(in.Platform)
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
openstackUrl := platform.OpenstackVolumev2Url
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ func (l *ShelveServerLogic) ShelveServer(in *openstack.ShelveServerReq) (*openst
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
|
|
@ -36,7 +35,7 @@ func (l *ShowFirewallGroupDetailsLogic) ShowFirewallGroupDetails(in *openstack.S
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/fwaas/firewall_groups/"+in.FirewallGroupId, nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/fwaas/firewall_groups/"+in.FirewallGroupId, nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ func (l *ShowFirewallPolicyDetailsLogic) ShowFirewallPolicyDetails(in *openstack
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/fwaas/firewall_policies/"+in.FirewallPolicyId, nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/fwaas/firewall_policies/"+in.FirewallPolicyId, nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ func (l *ShowFirewallRuleDetailsLogic) ShowFirewallRuleDetails(in *openstack.Sho
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/fwaas/firewall_rules/"+in.FirewallRuleId, nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/fwaas/firewall_rules/"+in.FirewallRuleId, nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ func (l *ShowFloatingIPDetailsLogic) ShowFloatingIPDetails(in *openstack.ShowFlo
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/floatingips/"+in.FloatingipId, nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/floatingips/"+in.FloatingipId, nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
)
|
||||
|
||||
|
|
@ -36,7 +35,7 @@ func (l *ShowNetworkDetailsLogic) ShowNetworkDetails(in *openstack.ShowNetworkDe
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/networks/"+in.NetworkId, nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/networks/"+in.NetworkId, nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -35,7 +36,7 @@ func (l *ShowNetworkSegmentRangeDetailsLogic) ShowNetworkSegmentRangeDetails(in
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/network_segment_ranges/"+in.NetworkSegmentRangeId, nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/network_segment_ranges/"+in.NetworkSegmentRangeId, nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
)
|
||||
|
||||
|
|
@ -35,7 +34,7 @@ func (l *ShowNodeDetailsLogic) ShowNodeDetails(in *openstack.ShowNodeDetailsReq)
|
|||
}
|
||||
openstackUrl := platform.OpenstackBareMetalUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v1/nodes/"+in.NodeIdent, nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v1/nodes/"+in.NodeIdent, nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ func (l *ShowPortDetailsLogic) ShowPortDetails(in *openstack.ShowPortDetailsReq)
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/ports/"+in.PortId, nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/ports/"+in.PortId, nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ func (l *ShowRouterDetailsLogic) ShowRouterDetails(in *openstack.ShowRouterDetai
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/routers"+in.RouterId, nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/routers"+in.RouterId, nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ func (l *ShowSecurityGroupLogic) ShowSecurityGroup(in *openstack.ShowSecurityGro
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/security-groups/"+in.SecurityGroupId, nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/security-groups/"+in.SecurityGroupId, nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ func (l *ShowSecurityGroupRuleLogic) ShowSecurityGroupRule(in *openstack.ShowSec
|
|||
}
|
||||
openstackUrl := platform.OpenstackNetworkUrl
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.GET, openstackUrl+"/v2.0/security-group-rules/"+in.SecurityGroupRuleId, nil, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.GET, openstackUrl+"/v2.0/security-group-rules/"+in.SecurityGroupRuleId, nil, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -42,7 +41,7 @@ func (l *StartServerLogic) StartServer(in *openstack.StartServerReq) (*openstack
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -42,7 +41,7 @@ func (l *StopServerLogic) StopServer(in *openstack.StopServerReq) (*openstack.St
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ func (l *SuspendServerLogic) SuspendServer(in *openstack.SuspendServerReq) (*ope
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ func (l *UnpauseServerLogic) UnpauseServer(in *openstack.UnpauseServerReq) (*ope
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ package logic
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/common"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"strings"
|
||||
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/internal/svc"
|
||||
"gitlink.org.cn/jcce-pcm/pcm-participant-openstack/openstack"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ func (l *UnRescueLogic) UnRescue(in *openstack.UnRescueServerReq) (*openstack.Un
|
|||
}
|
||||
payload := strings.NewReader(string(reqByte))
|
||||
token := common.GetToken(in.Platform)
|
||||
statusCode, body, err := httputils.HttpClientWithBodyAndCode(httputils.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
statusCode, body, err := tool.HttpClientWithBodyAndCode(tool.POST, openstackUrl+"/servers/"+in.ServerId+"/action", payload, token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue