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

Add support for lifecycle operations #38

Merged
merged 4 commits into from
Apr 25, 2022

Conversation

gberginc
Copy link
Contributor

@gberginc gberginc commented Apr 5, 2022

This commit adds support for decommission and recommission lifecycle
operations of Cisco Intersight provider.

@gberginc
Copy link
Contributor Author

@agrare Following some additional design, I've decided to add toolbar buttons to the provider overrides instead of the classic UI - these are very specific to the Cisco Intersight so I think this is much better. Also, there will be some more operations, specifically for this provider.

I've added a small patch to the inventory parser that came to play after recommissioning a server.

@gberginc gberginc requested a review from agrare April 24, 2022 17:58
@agrare agrare added the enhancement New feature or request label Apr 25, 2022
@agrare
Copy link
Member

agrare commented Apr 25, 2022

Overall looks good, @kavyanekkalapu can you review the two dialogs here?

This commit adds support for decommission and recommission lifecycle
operations of Cisco Intersight provider.
In order for the two operations to exist in the UI we need to add them
to the UI. We have chosen a dedicated toolbar button group for Cisco
Intersight provider as there will be some more in the future. These
operations do not make much sense for other providers, though.
When a server is recommissioned it enters a server discovery state.
During this the existing parser failed to parse certain parts of
a server due to them being empty. This commit fixes this.
@kavyanekkalapu
Copy link
Member

@gberginc Could you add before and after screenshots?

@gberginc
Copy link
Contributor Author

gberginc commented Apr 25, 2022

@gberginc Could you add before and after screenshots?

This just adds a toolbar button group called Cisco Intersight with two buttons for server Decommission and Recommission. The same for the list of servers.

Screenshot 2022-04-25 at 19 01 54

def recommission_server(server, options)
_log.info("Requesting server recommission #{server.ems_ref}.")

with_provider_connection do |_client|
Copy link
Member

Choose a reason for hiding this comment

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

Not for this PR but I think we'd be better off building a new IntersightClient::Configuration and passing that to the IntersightClient::ApiClient and yielding that to the block rather than setting the api_key to the @@default. Just reducing any possibility of races when running with multiple intersight providers in the same process (aka GenericWorker)

@gberginc
Copy link
Contributor Author

Thanks, @agrare for those whitespaces. Fixed as well.

Copy link
Member

@agrare agrare left a comment

Choose a reason for hiding this comment

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

LGTM, will merge pending @kavyanekkalapu 's review

@kavyanekkalapu
Copy link
Member

I don't have cisco provider to test but code and screenshots looks good to me.
cc @agrare

@agrare agrare merged commit 3e1f286 into ManageIQ:master Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants