Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions openstack/cce/v3/clusters/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ type Spec struct {
HostNetwork HostNetworkSpec `json:"hostNetwork" required:"true"`
//Container network parameters
ContainerNetwork ContainerNetworkSpec `json:"containerNetwork" required:"true"`
//Authentication parameters
Authentication AuthenticationSpec `json:"authentication,omitempty"`
// Charging mode of the cluster, which is 0 (on demand)
BillingMode int `json:"billingMode,omitempty"`
//Extended parameter for a cluster
Expand All @@ -79,6 +81,13 @@ type ContainerNetworkSpec struct {
Cidr string `json:"cidr,omitempty"`
}

//Authentication parameters
type AuthenticationSpec struct {
//Authentication mode: rbac , x509 or authenticating_proxy
Mode string `json:"mode" required:"true"`
AuthenticatingProxy map[string]string `json:"authenticatingProxy" required:"true"`
}

type Status struct {
//The state of the cluster
Phase string `json:"phase"`
Expand Down
7 changes: 7 additions & 0 deletions openstack/cce/v3/clusters/testing/requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ func TestCreateV3Cluster(t *testing.T) {
},
"containerNetwork": {
"mode": "overlay_l2"
},
"authentication": {
"mode": "rbac",
"authenticatingProxy": {}
}
}

Expand All @@ -149,6 +153,9 @@ func TestCreateV3Cluster(t *testing.T) {
VpcId: "3305eb40-2707-4940-921c-9f335f84a2ca",
SubnetId: "00e41db7-e56b-4946-bf91-27bb9effd664"},
ContainerNetwork: clusters.ContainerNetworkSpec{Mode: "overlay_l2"},
Authentication: clusters.AuthenticationSpec{
Mode: "rbac",
AuthenticatingProxy: make(map[string]string)},
},
}
actual, err := clusters.Create(fake.ServiceClient(), options).Extract()
Expand Down