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

DE2222 and IQN update. #205

Merged
merged 5 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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: 6 additions & 3 deletions internal/resources/resource_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ func resourceMetalHostCreate(d *schema.ResourceData, meta interface{}) (err erro
Pending: []string{
string(rest.HOSTSTATE_NEW),
string(rest.HOSTSTATE_IMAGING_PREP),
string(rest.HOSTSTATE_ISCSI_ATTACHING),
Copy link
Contributor

@dbozzato81 dbozzato81 Jun 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In line 514 is

string(rest.HOSTSTATE_ATTACHING)

only for FC?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In line 514 is

string(rest.HOSTSTATE_ATTACHING)

only for FC?

Yes, sort of, it's for all but iSCSI. For now, it's only FC.

string(rest.HOSTSTATE_IMAGING),
string(rest.HOSTSTATE_CONNECTING),
string(rest.HOSTSTATE_ATTACHING),
Expand Down Expand Up @@ -761,8 +762,10 @@ func resourceMetalHostUpdate(d *schema.ResourceData, meta interface{}) (err erro

// initiator name
updInitiatorName, ok := d.Get(hInitiatorName).(string)
if ok && updInitiatorName != "" && updInitiatorName != host.ISCSIConfig.InitiatorName {
updateHost.ISCSIConfig.InitiatorName = updInitiatorName
if (ok && updInitiatorName != "") && (updInitiatorName != host.ISCSIConfig.InitiatorName) {
updateHost.ISCSIConfig = &rest.UpdateHostIscsiConfig{
InitiatorName: updInitiatorName,
}
}

// set the network ids
Expand Down Expand Up @@ -886,7 +889,7 @@ func resourceMetalHostDelete(d *schema.ResourceData, meta interface{}) (err erro
// the delete operation from Terraform (since it has no reference to the resource).
deleteStateConf := &retry.StateChangeConf{
Pending: []string{
string(rest.HOSTSTATE_DETACHING),
mchuang3 marked this conversation as resolved.
Show resolved Hide resolved
string(rest.HOSTSTATE_ALL_DETACHING),
string(rest.HOSTSTATE_DELETING),
},
Target: []string{
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.54
1.3.56
Loading