Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Add floating IPs schema to datastore creation #30

Merged
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
17 changes: 13 additions & 4 deletions datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ import (

// Instances represents datastore's instances.
type Instances struct {
IP string `json:"ip"`
Role string `json:"role"`
Status Status `json:"status"`
Hostname string `json:"hostname"`
ID string `json:"id"`
IP string `json:"ip"`
FloatingIP string `json:"floating_ip"`
Role string `json:"role"`
Status Status `json:"status"`
Hostname string `json:"hostname"`
}

// Flavor represents datastore's flavor.
Expand All @@ -39,6 +41,12 @@ type Firewall struct {
IP string `json:"ip"`
}

// FloatingIPs represents floating IPs creation schema.
type FloatingIPs struct {
Master int `json:"master"`
Replica int `json:"replica"`
}

// Datastore is the API response for the datastores.
type Datastore struct {
ID string `json:"id"`
Expand Down Expand Up @@ -69,6 +77,7 @@ type DatastoreCreateOpts struct {
Flavor *Flavor `json:"flavor,omitempty"`
Restore *Restore `json:"restore,omitempty"`
Pooler *Pooler `json:"pooler,omitempty"`
FloatingIPs *FloatingIPs `json:"floating_ips,omitempty"`
Config map[string]interface{} `json:"config,omitempty"`
Name string `json:"name"`
TypeID string `json:"type_id"`
Expand Down
Loading
Loading