Skip to content

Commit

Permalink
Merge 0884c75 into 25a84d5
Browse files Browse the repository at this point in the history
  • Loading branch information
lingxiankong committed Aug 12, 2019
2 parents 25a84d5 + 0884c75 commit 8f2a93d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions openstack/containerinfra/v1/clusters/requests.go
Expand Up @@ -25,6 +25,7 @@ type CreateOpts struct {
MasterFlavorID string `json:"master_flavor_id,omitempty"`
Name string `json:"name"`
NodeCount *int `json:"node_count,omitempty"`
FixedNetwork string `json:"fixed_network,omitempty"`
}

// ToClusterCreateMap constructs a request body from CreateOpts.
Expand Down
1 change: 1 addition & 0 deletions openstack/containerinfra/v1/clusters/results.go
Expand Up @@ -87,6 +87,7 @@ type Cluster struct {
UUID string `json:"uuid"`
UpdatedAt time.Time `json:"updated_at"`
UserID string `json:"user_id"`
FixedNetwork string `json:"fixed_network"`
}

type ClusterPage struct {
Expand Down
11 changes: 8 additions & 3 deletions openstack/containerinfra/v1/clusters/testing/fixtures.go
Expand Up @@ -49,6 +49,7 @@ var ExpectedCluster = clusters.Cluster{
StatusReason: "Stack CREATE completed successfully",
UpdatedAt: time.Date(2016, 8, 29, 6, 53, 24, 0, time.UTC),
UUID: clusterUUID,
FixedNetwork: "private_network",
}

var ExpectedCluster2 = clusters.Cluster{
Expand Down Expand Up @@ -79,6 +80,7 @@ var ExpectedCluster2 = clusters.Cluster{
StatusReason: "Stack CREATE completed successfully",
UpdatedAt: time.Date(2016, 8, 29, 6, 53, 24, 0, time.UTC),
UUID: clusterUUID2,
FixedNetwork: "private_network",
}

var ExpectedClusterUUID = clusterUUID
Expand Down Expand Up @@ -140,7 +142,8 @@ var ClusterGetResponse = fmt.Sprintf(`
],
"status_reason":"Stack CREATE completed successfully",
"create_timeout":60,
"name":"k8s"
"name":"k8s",
"fixed_network": "private_network"
}`, clusterUUID)

var ClusterListResponse = fmt.Sprintf(`
Expand Down Expand Up @@ -177,7 +180,8 @@ var ClusterListResponse = fmt.Sprintf(`
"status":"CREATE_COMPLETE",
"status_reason":"Stack CREATE completed successfully",
"updated_at":"2016-08-29T06:53:24+00:00",
"uuid":"%s"
"uuid":"%s",
"fixed_network": "private_network"
},
{
"api_address":"https://172.24.4.6:6443",
Expand Down Expand Up @@ -210,7 +214,8 @@ var ClusterListResponse = fmt.Sprintf(`
"status":"CREATE_COMPLETE",
"status_reason":"Stack CREATE completed successfully",
"updated_at":null,
"uuid":"%s"
"uuid":"%s",
"fixed_network": "private_network"
}
]
}`, clusterUUID, clusterUUID2)
Expand Down
Expand Up @@ -29,6 +29,7 @@ func TestCreateCluster(t *testing.T) {
MasterFlavorID: "m1.small",
Name: "k8s",
NodeCount: &nodeCount,
FixedNetwork: "private_network",
}

sc := fake.ServiceClient()
Expand Down

0 comments on commit 8f2a93d

Please sign in to comment.