Skip to content

Commit

Permalink
add: response for package (#190)
Browse files Browse the repository at this point in the history
Co-authored-by: sapd <sapd@vccloud.vn>
  • Loading branch information
greatbn and sapd authored Aug 13, 2024
1 parent a419013 commit 6b92228
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
1 change: 1 addition & 0 deletions kubernetes_engine_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ type Cluster struct {
UID string `json:"uid" yaml:"uid"`
Name string `json:"name" yaml:"name"`
Version ControllerVersion `json:"version" yaml:"version"`
ClusterPackage KubernetesPackage `json:"package" yaml:"package"`
VPCNetworkID string `json:"private_network_id" yaml:"private_network_id"`
SubnetID string `json:"private_subnet_id"`
AutoUpgrade bool `json:"auto_upgrade" yaml:"auto_upgrade"`
Expand Down
65 changes: 65 additions & 0 deletions kubernetes_engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ func TestClusterList(t *testing.T) {
"description": null,
"kubernetes_version": "v1.18.6"
},
"package": {
"id": "6609972809ba00eb5adc95e6",
"name": "STANDARD - 1",
"max_nodes": 50,
"memory": 8,
"high_availability": true,
"sla": "99.99",
"price": {
"amount": 1386000,
"billing_cycle": "month"
},
"specify": "standard"
},
"auto_upgrade": true,
"tags": [],
"provision_status": "PROVISIONED",
Expand Down Expand Up @@ -67,6 +80,19 @@ func TestClusterGet(t *testing.T) {
"description": null,
"kubernetes_version": "v1.18.6"
},
"package": {
"id": "6609972809ba00eb5adc95e6",
"name": "STANDARD - 1",
"max_nodes": 50,
"memory": 8,
"high_availability": true,
"sla": "99.99",
"price": {
"amount": 1386000,
"billing_cycle": "month"
},
"specify": "standard"
},
"auto_upgrade": true,
"tags": [],
"provision_status": "PROVISIONED",
Expand Down Expand Up @@ -138,6 +164,19 @@ func TestClusterCreate(t *testing.T) {
"description": "Kubernetes v1.18.6 on Bizfly Cloud",
"kubernetes_version": "v1.18.6"
},
"package": {
"id": "6609972809ba00eb5adc95e6",
"name": "STANDARD - 1",
"max_nodes": 50,
"memory": 8,
"high_availability": true,
"sla": "99.99",
"price": {
"amount": 1386000,
"billing_cycle": "month"
},
"specify": "standard"
},
"private_network_id": "727caa8c-1ed1-4302-b659-5a92864dcdef",
"auto_upgrade": true,
"tags": [
Expand Down Expand Up @@ -244,6 +283,19 @@ func TestClusterUpdate(t *testing.T) {
"kube-router"
]
},
"package": {
"id": "6609972809ba00eb5adc95e6",
"name": "STANDARD - 1",
"max_nodes": 50,
"memory": 8,
"high_availability": true,
"sla": "99.99",
"price": {
"amount": 1386000,
"billing_cycle": "month"
},
"specify": "standard"
},
"provision_type": "standard",
"private_network_id": "2d70b001-5634-4dbe-8c3e-fe75a742a1ec",
"private_subnet_id": "1b9816a6-b647-4970-92ff-4996d39f5192",
Expand Down Expand Up @@ -468,6 +520,19 @@ func TestGetClusterWorkerPool(t *testing.T) {
"id": "5f959e0ac0b18944d0a4f13a",
"name": "pool-curdcqn2",
"version": "v1.18.6",
"package": {
"id": "6609972809ba00eb5adc95e6",
"name": "STANDARD - 1",
"max_nodes": 50,
"memory": 8,
"high_availability": true,
"sla": "99.99",
"price": {
"amount": 1386000,
"billing_cycle": "month"
},
"specify": "standard"
},
"flavor": "3c_6g_enterprise",
"flavor_detail": {
"name": "3c_6g_enterprise",
Expand Down

0 comments on commit 6b92228

Please sign in to comment.