Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
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
9 changes: 8 additions & 1 deletion openstack/cce/v3/nodes/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,14 @@ type Status struct {

type LoginSpec struct {
// Select the key pair name when logging in by key pair mode
SshKey string `json:"sshKey" required:"true"`
SshKey string `json:"sshKey,omitempty"`
// Select the user/password when logging in
UserPassword UserPassword `json:"userPassword,omitempty"`
}

type UserPassword struct {
Username string `json:"username" required:"true"`
Password string `json:"password" required:"true"`
}

type VolumeSpec struct {
Expand Down
6 changes: 5 additions & 1 deletion openstack/cce/v3/nodes/testing/requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ func TestCreateV3Node(t *testing.T) {
],
"flavor": "s3.large.2",
"login": {
"sshKey": "test-keypair"
"sshKey": "test-keypair",
"userPassword": {
"password": "",
"username": ""
}
},
"publicIP": {
"eip": {
Expand Down