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

Cloud database servers refresh support #513

Merged

Conversation

nasark
Copy link
Member

@nasark nasark commented Jul 7, 2022

i.e.

 #<ManageIQ::Providers::Azure::CloudManager::CloudDatabaseServer:0x00007febc4205f78
  id: 9,
  name: "miq-sql-server",
  ems_ref:
   "/subscriptions/2b01dec2-6684-4f25-abfc-a2453e0ae52f/resourceGroups/test-group/providers/Microsoft.Sql/servers/miq-sql-server",
  ems_id: 15,
  server_type: "SQL",
  region: "East US",
  status: "Ready",
  version: "12.0",
  resource_group_id: 6>,

Dependent:

@miq-bot assign @agrare
@miq-bot add_label enhancement

@nasark nasark changed the title Cloud database servers refresh support [WIP] Cloud database servers refresh support Jul 7, 2022
@miq-bot miq-bot added the wip label Jul 7, 2022
@agrare
Copy link
Member

agrare commented Jul 11, 2022

miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request Jul 11, 2022
@nasark nasark changed the title [WIP] Cloud database servers refresh support Cloud database servers refresh support Jul 11, 2022
@miq-bot miq-bot removed the wip label Jul 11, 2022
:name => server.name,
:server_type => 'SQL',
:region => server.location,
:status => server.properties&.state,
Copy link
Member

Choose a reason for hiding this comment

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

@agrare Do we need some sort of normalization on the status field? Or perhaps a raw_status vs normalized_status?

Copy link
Member

Choose a reason for hiding this comment

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

👍 yeah we should map all of the possible azure states onto a a set that would work across providers

Copy link
Member Author

@nasark nasark Jul 12, 2022

Choose a reason for hiding this comment

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

@agrare @Fryguy I was not able to replicate any other states aside from "Ready". The Azure docs also do not provide the possible states https://docs.microsoft.com/en-us/rest/api/sql/2021-11-01-preview/servers/get#server. As a result, I have left it as https://github.com/ManageIQ/manageiq-providers-azure/pull/513/files#diff-0d177831b5af9863211ff4fa5e8c6810dac1b79b9cf5e132680b8db96f7b6f5cR573-R580. Since deleted servers don't persist on Azure and "Ready" seems to be the only available state, I am wondering whether the status column is even necessary at this point? Let me know

:ems_ref => server.id,
:name => server.name,
:server_type => 'SQL',
:region => server.location,
Copy link
Member

Choose a reason for hiding this comment

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

I think the region was removed in the schema.

@nasark nasark force-pushed the cloud_database_servers_refresh_support branch from 96c21ca to d5a11bb Compare July 12, 2022 14:18
@nasark

This comment was marked as outdated.

miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request Jul 12, 2022
@nasark
Copy link
Member Author

nasark commented Jul 12, 2022

miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request Jul 12, 2022
miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request Jul 12, 2022
@nasark nasark force-pushed the cloud_database_servers_refresh_support branch from d5a11bb to ed99303 Compare July 12, 2022 16:00
@miq-bot
Copy link
Member

miq-bot commented Jul 12, 2022

Checked commit nasark@ed99303 with ruby 2.6.9, rubocop 1.19.1, haml-lint 0.35.0, and yamllint
4 files checked, 0 offenses detected
Everything looks fine. ⭐

@nasark
Copy link
Member Author

nasark commented Jul 12, 2022

@agrare Aside from this comment #513 (comment), I think this PR and all its dependents are ready for another look. Thanks

@agrare agrare closed this Jul 14, 2022
@agrare agrare reopened this Jul 14, 2022
@agrare agrare merged commit 6a16243 into ManageIQ:master Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants