@@ -13,26 +13,26 @@ type KfCluster struct {
13
13
ID string `json:"id"`
14
14
Name string `json:"name"`
15
15
NetworkID string `json:"network_id"`
16
- FirewallID string `json:"firewall_id"`
17
- Size string `json:"size"`
18
- KubeflowReady string `json:"kubeflow_ready"`
19
- DashboardURL string `json:"dashboard_url"`
20
- CreatedAt time.Time `json:"created_at"`
16
+ FirewallID string `json:"firewall_id,omitempty "`
17
+ Size string `json:"size,omitempty "`
18
+ KubeflowReady string `json:"kubeflow_ready,omitempty "`
19
+ DashboardURL string `json:"dashboard_url,omitempty "`
20
+ CreatedAt time.Time `json:"created_at,omitempty "`
21
21
}
22
22
23
23
// CreateKfClusterReq is the request for creating a KfCluster.
24
24
type CreateKfClusterReq struct {
25
25
Name string `json:"name" validate:"required"`
26
26
NetworkID string `json:"network_id" validate:"required"`
27
- FirewallID string `json:"firewall_id"`
28
- Size string `json:"size"`
29
- Region string `json:"region"`
27
+ FirewallID string `json:"firewall_id,omitempty "`
28
+ Size string `json:"size,omitempty "`
29
+ Region string `json:"region,omitempty "`
30
30
}
31
31
32
32
// UpdateKfClusterReq is the request for updating a KfCluster.
33
33
type UpdateKfClusterReq struct {
34
- Name string `json:"name"`
35
- Region string `json:"region"`
34
+ Name string `json:"name,omitempty "`
35
+ Region string `json:"region,omitempty "`
36
36
// Size string `json:"size"`
37
37
}
38
38
@@ -110,6 +110,7 @@ func (c *Client) FindKfCluster(search string) (*KfCluster, error) {
110
110
111
111
// CreateKfCluster creates a new kubeflow cluster
112
112
func (c * Client ) CreateKfCluster (req CreateKfClusterReq ) (* KfCluster , error ) {
113
+ req .Region = c .Region
113
114
body , err := c .SendPostRequest ("/v2/kfclusters" , req )
114
115
if err != nil {
115
116
return nil , decodeError (err )
0 commit comments