Skip to content

Commit

Permalink
Merge pull request #30 from Rey-Lane/add_floating_ips_to_datastore_cr…
Browse files Browse the repository at this point in the history
…eation

Add floating IPs schema to datastore creation
  • Loading branch information
Gogen120 authored Feb 12, 2024
2 parents 76cfb62 + 594a454 commit b8db2ad
Show file tree
Hide file tree
Showing 2 changed files with 325 additions and 187 deletions.
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

0 comments on commit b8db2ad

Please sign in to comment.