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

feat(instance): add zone field in instance resources response #331

Merged
merged 1 commit into from
Feb 18, 2020
Merged
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
20 changes: 20 additions & 0 deletions api/instance/v1/instance_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,8 @@ type Bootscript struct {
//
// Default value: x86_64
Arch Arch `json:"arch"`
// Zone the zone in which is the bootscript
Zone scw.Zone `json:"zone"`
}

type CreateIPResponse struct {
Expand Down Expand Up @@ -739,6 +741,8 @@ type IP struct {
Server *ServerSummary `json:"server"`

Organization string `json:"organization"`

Zone scw.Zone `json:"zone"`
}

type Image struct {
Expand Down Expand Up @@ -769,6 +773,8 @@ type Image struct {
//
// Default value: available
State ImageState `json:"state"`

Zone scw.Zone `json:"zone"`
}

type ListBootscriptsResponse struct {
Expand Down Expand Up @@ -863,6 +869,8 @@ type PlacementGroup struct {
PolicyType PlacementGroupPolicyType `json:"policy_type"`
// PolicyRespected returns true if the policy is respected, false otherwise
PolicyRespected bool `json:"policy_respected"`
// Zone the zone in which is the placement group
Zone scw.Zone `json:"zone"`
}

type PlacementGroupServer struct {
Expand Down Expand Up @@ -903,6 +911,8 @@ type SecurityGroup struct {
Servers []*ServerSummary `json:"servers"`
// Stateful true if the security group is stateful
Stateful bool `json:"stateful"`
// Zone the zone in which is the security group
Zone scw.Zone `json:"zone"`
}

type SecurityGroupRule struct {
Expand All @@ -929,6 +939,8 @@ type SecurityGroupRule struct {
Position uint32 `json:"position"`

Editable bool `json:"editable"`

Zone scw.Zone `json:"zone"`
}

type SecurityGroupSummary struct {
Expand Down Expand Up @@ -1003,6 +1015,8 @@ type Server struct {
Arch Arch `json:"arch"`
// PlacementGroup the server placement group
PlacementGroup *PlacementGroup `json:"placement_group"`
// Zone the zone in which is the server
Zone scw.Zone `json:"zone"`
}

type ServerActionResponse struct {
Expand Down Expand Up @@ -1132,6 +1146,8 @@ type Snapshot struct {
CreationDate time.Time `json:"creation_date"`

ModificationDate time.Time `json:"modification_date"`

Zone scw.Zone `json:"zone"`
}

type SnapshotBaseVolume struct {
Expand Down Expand Up @@ -1160,6 +1176,8 @@ type Task struct {
HrefFrom string `json:"href_from"`

HrefResult string `json:"href_result"`
// Zone the zone in which is the task
Zone scw.Zone `json:"zone"`
}

type UpdateIPResponse struct {
Expand Down Expand Up @@ -1204,6 +1222,8 @@ type Volume struct {
//
// Default value: available
State VolumeState `json:"state"`
// Zone the zone in which is the volume
Zone scw.Zone `json:"zone"`
}

type VolumeSummary struct {
Expand Down