-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
63acc33
to
4666abc
Compare
@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. |
app/models/manageiq/providers/cisco_intersight/inventory/parser/physical_infra_manager.rb
Outdated
Show resolved
Hide resolved
app/models/manageiq/providers/cisco_intersight/inventory/parser/physical_infra_manager.rb
Outdated
Show resolved
Hide resolved
app/models/manageiq/providers/cisco_intersight/physical_infra_manager/operations/lifecycle.rb
Outdated
Show resolved
Hide resolved
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.
4666abc
to
01946c2
Compare
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.
01946c2
to
f0570e1
Compare
app/helpers/manageiq/providers/cisco_intersight/toolbar_overrides/physical_servers_center.rb
Outdated
Show resolved
Hide resolved
app/models/manageiq/providers/cisco_intersight/inventory/parser/physical_infra_manager.rb
Outdated
Show resolved
Hide resolved
@gberginc Could you add before and after screenshots? |
This just adds a toolbar button group called |
def recommission_server(server, options) | ||
_log.info("Requesting server recommission #{server.ems_ref}.") | ||
|
||
with_provider_connection do |_client| |
There was a problem hiding this comment.
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)
Thanks, @agrare for those whitespaces. Fixed as well. |
There was a problem hiding this 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
I don't have cisco provider to test but code and screenshots looks good to me. |
This commit adds support for decommission and recommission lifecycle
operations of Cisco Intersight provider.