Skip to content

Commit 89b3519

Browse files
authored
Merge pull request #641 from hidekazuna/refactor_instance
Refactor creating/deleting instance
2 parents d5e9460 + 4af658e commit 89b3519

File tree

8 files changed

+543
-342
lines changed

8 files changed

+543
-342
lines changed

api/v1alpha3/openstackcluster_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ type OpenStackClusterStatus struct {
136136

137137
BastionSecurityGroup *SecurityGroup `json:"bastionSecurityGroup,omitempty"`
138138

139-
Bastion *Bastion `json:"bastion,omitempty"`
139+
Bastion *Instance `json:"bastion,omitempty"`
140140
}
141141

142142
// +kubebuilder:object:root=true

api/v1alpha3/types.go

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,27 @@ type APIEndpoint struct {
125125
Port int `json:"port"`
126126
}
127127

128+
type Instance struct {
129+
ID string `json:"id,omitempty"`
130+
Name string `json:"name,omitempty"`
131+
Trunk bool `json:"trunk,omitempty"`
132+
FailureDomain string `json:"failureDomain,omitempty"`
133+
SecurityGroups *[]string `json:"securigyGroups,omitempty"`
134+
Networks *[]Network `json:"networks,omitempty"`
135+
Tags []string `json:"tags,omitempty"`
136+
Image string `json:"image,omitempty"`
137+
Flavor string `json:"flavor,omitempty"`
138+
SSHKeyName string `json:"sshKeyName,omitempty"`
139+
UserData string `json:"userData,omitempty"`
140+
Metadata map[string]string `json:"metadata,omitempty"`
141+
ConfigDrive *bool `json:"configDrive,omitempty"`
142+
RootVolume *RootVolume `json:"rootVolume,omitempty"`
143+
ServerGroupID string `json:"serverGroupID,omitempty"`
144+
State InstanceState `json:"state,omitempty"`
145+
IP string `json:"ip,omitempty"`
146+
FloatingIP string `json:"floatingIP,omitempty"`
147+
}
148+
128149
type RootVolume struct {
129150
SourceType string `json:"sourceType,omitempty"`
130151
SourceUUID string `json:"sourceUUID,omitempty"`
@@ -249,7 +270,9 @@ type Bastion struct {
249270
//+optional
250271
SSHKeyName string `json:"sshKeyName,omitempty"`
251272
//+optional
252-
SecurityGroups []SecurityGroupParam `json:"securityGroups,omitempty"`
273+
Networks []NetworkParam `json:"networks,omitempty"`
253274
//+optional
254275
FloatingIP string `json:"floatingIP,omitempty"`
276+
//+optional
277+
SecurityGroups []SecurityGroupParam `json:"securityGroups,omitempty"`
255278
}

api/v1alpha3/zz_generated.deepcopy.go

Lines changed: 65 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)