Skip to content

Commit

Permalink
FE4915/US38004: Support host initiator name update. (#17)
Browse files Browse the repository at this point in the history
* Update host-update docs.

* Review feedback - make ISCSIConfig nullable.

* Address review comments.
  • Loading branch information
anurag-shrivastav authored Jul 8, 2022
1 parent 855f297 commit 4a52c68
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 11 deletions.
3 changes: 3 additions & 0 deletions v1/api/swagger/components/schemas/HostISCSIConfig.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
type: object
nullable: true
required:
- InitiatorName
properties:
InitiatorName:
type: string
Expand Down
4 changes: 3 additions & 1 deletion v1/api/swagger/paths/hosts@{hostId}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ put:
description: >-
Updates the Host with the matching ID. Update is permitted only if the host
is in the 'Ready' or 'Connection Updating Failed' state. Only the Host
'Description', 'Networks', and 'NetworkForDefaultRoute' can be updated.
'Description', 'Networks', 'NetworkForDefaultRoute', and 'ISCSIConfig:InitiatorName'
can be updated. 'ISCSIConfig:InitiatorName' can be updated only if the host has
no volumes attached.
operationId: Host_update
parameters:
- name: hostId
Expand Down
7 changes: 6 additions & 1 deletion v1/pkg/client/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,9 @@ paths:
put:
description: Updates the Host with the matching ID. Update is permitted only
if the host is in the 'Ready' or 'Connection Updating Failed' state. Only
the Host 'Description', 'Networks', and 'NetworkForDefaultRoute' can be updated.
the Host 'Description', 'Networks', 'NetworkForDefaultRoute', and 'ISCSIConfig:InitiatorName'
can be updated. 'ISCSIConfig:InitiatorName' can be updated only if the host
has no volumes attached.
operationId: Host_update
parameters:
- description: ID of host to update
Expand Down Expand Up @@ -3197,6 +3199,7 @@ components:
'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxv1C5uOeG9BBjfQbum9GupGthTFcifS4FNYxZ2ZakN9UcpD05L2lKp4OI6mfCfciOhJ9SHduZWJFM0pYfC99hIsPAHhEwWOjh3/rHKxB/U4RYN4VFWM+ShDv92+k0Hse73HhuiHKVtmRj/fltAeCFm/mPlL+McMYFhFYMIK8b/spKpXxdEBCSowHPGIn3yi0ivPWhC4wcIa9jDIela/a0t/oDnYTeIp2WMLDbpZyQsGHmKopAAvb+83JhwytQMVTI/g5pMerbqPyxKtWaWDVDtpQ7O8G877T5U3kkl4jLLOJywxrvLrfHh1UNdNvPmvRFd+ct9Q5ugj5CIMJHqWTj [email protected]'
type: string
HostISCSIConfig:
nullable: true
properties:
InitiatorName:
description: |
Expand All @@ -3212,6 +3215,8 @@ components:
type: string
ISCSIDiscoveryAddress:
type: string
required:
- InitiatorName
type: object
HostConnection:
properties:
Expand Down
2 changes: 1 addition & 1 deletion v1/pkg/client/api_hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,7 @@ func (a *HostsApiService) Replace(ctx _context.Context, hostId string) (Host, *_

/*
Update Update an existing Host
Updates the Host with the matching ID. Update is permitted only if the host is in the 'Ready' or 'Connection Updating Failed' state. Only the Host 'Description', 'Networks', and 'NetworkForDefaultRoute' can be updated.
Updates the Host with the matching ID. Update is permitted only if the host is in the 'Ready' or 'Connection Updating Failed' state. Only the Host 'Description', 'Networks', 'NetworkForDefaultRoute', and 'ISCSIConfig:InitiatorName' can be updated. 'ISCSIConfig:InitiatorName' can be updated only if the host has no volumes attached.
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param hostId ID of host to update
* @param host Updated Host
Expand Down
2 changes: 1 addition & 1 deletion v1/pkg/client/docs/Host.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Name | Type | Description | Notes
**ServiceNetsProviderMAC** | **map[string]string** | The map of Service Network (Provider) ID to Provider MAC address. The Service Network must be a provider network provisioned to this host. Any Service Networks not included here will default to the physical MAC learned during machine discovery. | [optional]
**UserData** | **string** | User-provided data attached to the image configuration data when the host was provisioned | [optional]
**NodeID** | **string** | User-provided data to represent the identity of the host within an application environment. For example, this could be set to represent the Kubernetes node ID if the host is provisioned as a Kubernetes node. | [optional]
**ISCSIConfig** | [**HostIscsiConfig**](HostISCSIConfig.md) | | [optional]
**ISCSIConfig** | Pointer to [**HostIscsiConfig**](HostISCSIConfig.md) | | [optional]
**Connections** | [**[]HostConnection**](HostConnection.md) | Details describing host network connections | [optional]
**Deleted** | **bool** | True if the Host has been deleted. | [optional]
**PortalCommOkay** | **bool** | Describes if the portal is in active communication to the device | [optional]
Expand Down
2 changes: 1 addition & 1 deletion v1/pkg/client/docs/HostAllOf.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Name | Type | Description | Notes
**ServiceNetsProviderMAC** | **map[string]string** | The map of Service Network (Provider) ID to Provider MAC address. The Service Network must be a provider network provisioned to this host. Any Service Networks not included here will default to the physical MAC learned during machine discovery. | [optional]
**UserData** | **string** | User-provided data attached to the image configuration data when the host was provisioned | [optional]
**NodeID** | **string** | User-provided data to represent the identity of the host within an application environment. For example, this could be set to represent the Kubernetes node ID if the host is provisioned as a Kubernetes node. | [optional]
**ISCSIConfig** | [**HostIscsiConfig**](HostISCSIConfig.md) | | [optional]
**ISCSIConfig** | Pointer to [**HostIscsiConfig**](HostISCSIConfig.md) | | [optional]
**Connections** | [**[]HostConnection**](HostConnection.md) | Details describing host network connections | [optional]
**Deleted** | **bool** | True if the Host has been deleted. | [optional]
**PortalCommOkay** | **bool** | Describes if the portal is in active communication to the device | [optional]
Expand Down
2 changes: 1 addition & 1 deletion v1/pkg/client/docs/HostIscsiConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**InitiatorName** | **string** | Fully qualified iSCSI intiator name of this host. This is generated when a host is created and the information is pushed to the new host | [optional]
**InitiatorName** | **string** | Fully qualified iSCSI intiator name of this host. This is generated when a host is created and the information is pushed to the new host |
**CHAPSecret** | **string** | CHAP secret as generated by the system when attaching a volume. Visible in VolumeAttachment object. | [optional]
**CHAPUser** | **string** | CHAP user as generated by the system when attaching a volume. Visible in VolumeAttachment object. | [optional]
**ISCSIDiscoveryAddress** | **string** | | [optional]
Expand Down
2 changes: 1 addition & 1 deletion v1/pkg/client/docs/HostsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ Name | Type | Description | Notes
Update an existing Host

Updates the Host with the matching ID. Update is permitted only if the host is in the 'Ready' or 'Connection Updating Failed' state. Only the Host 'Description', 'Networks', and 'NetworkForDefaultRoute' can be updated.
Updates the Host with the matching ID. Update is permitted only if the host is in the 'Ready' or 'Connection Updating Failed' state. Only the Host 'Description', 'Networks', 'NetworkForDefaultRoute', and 'ISCSIConfig:InitiatorName' can be updated. 'ISCSIConfig:InitiatorName' can be updated only if the host has no volumes attached.

### Required Parameters

Expand Down
2 changes: 1 addition & 1 deletion v1/pkg/client/interface_hosts.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion v1/pkg/client/model_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type Host struct {
UserData string `json:"UserData,omitempty"`
// User-provided data to represent the identity of the host within an application environment. For example, this could be set to represent the Kubernetes node ID if the host is provisioned as a Kubernetes node.
NodeID string `json:"NodeID,omitempty"`
ISCSIConfig HostIscsiConfig `json:"ISCSIConfig,omitempty"`
ISCSIConfig *HostIscsiConfig `json:"ISCSIConfig,omitempty"`
// Details describing host network connections
Connections []HostConnection `json:"Connections,omitempty"`
// True if the Host has been deleted.
Expand Down
2 changes: 1 addition & 1 deletion v1/pkg/client/model_host_all_of.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type HostAllOf struct {
UserData string `json:"UserData,omitempty"`
// User-provided data to represent the identity of the host within an application environment. For example, this could be set to represent the Kubernetes node ID if the host is provisioned as a Kubernetes node.
NodeID string `json:"NodeID,omitempty"`
ISCSIConfig HostIscsiConfig `json:"ISCSIConfig,omitempty"`
ISCSIConfig *HostIscsiConfig `json:"ISCSIConfig,omitempty"`
// Details describing host network connections
Connections []HostConnection `json:"Connections,omitempty"`
// True if the Host has been deleted.
Expand Down
2 changes: 1 addition & 1 deletion v1/pkg/client/model_host_iscsi_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ package client
// HostIscsiConfig struct for HostIscsiConfig
type HostIscsiConfig struct {
// Fully qualified iSCSI intiator name of this host. This is generated when a host is created and the information is pushed to the new host
InitiatorName string `json:"InitiatorName,omitempty"`
InitiatorName string `json:"InitiatorName"`
// CHAP secret as generated by the system when attaching a volume. Visible in VolumeAttachment object.
CHAPSecret string `json:"CHAPSecret,omitempty"`
// CHAP user as generated by the system when attaching a volume. Visible in VolumeAttachment object.
Expand Down

0 comments on commit 4a52c68

Please sign in to comment.