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 Transform VM service dialog #13794

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions db/fixtures/miq_product_features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5942,6 +5942,10 @@
:description: Edit a VM
:feature_type: admin
:identifier: vm_edit
- :name: Transform
:description: Transform VM
:feature_type: admin
:identifier: vm_transform
- :name: Edit EVM Server Relationship
:description: Edit EVM Server Relationship
:feature_type: admin
Expand Down
221 changes: 221 additions & 0 deletions product/dialogs/service_dialogs/transform-vm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
---
- description: Transform VM
buttons: submit,cancel
label: Transform VM
blueprint_id:
dialog_tabs:
- description:
display: edit
label: Main
display_method:
display_method_options:
position: 0
dialog_groups:
- description: Import given virtual machine to another infrastructure provider
Copy link
Contributor

Choose a reason for hiding this comment

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

@matobet
This might read better as
Import a virtual machine to another infrastructure provider

display: edit
label: Transform Virtual Machine
display_method:
display_method_options:
position: 0
dialog_fields:
- name: name
description: Name of the newly created virtual machine
data_type:
notes:
notes_display:
display: edit
display_method:
display_method_options: {}
required: true
required_method:
required_method_options: {}
default_value: ''
values:
values_method:
values_method_options: {}
options:
:protected: false
label: Name
position: 0
validator_type:
validator_rule:
reconfigurable:
dynamic: false
show_refresh_button:
load_values_on_init:
read_only:
auto_refresh:
trigger_auto_refresh:
visible: true
type: DialogFieldTextBox
resource_action:
action:
resource_type: DialogField
ae_namespace:
ae_class:
ae_instance:
ae_message:
ae_attributes: {}
- name: provider
description: Target infrastructure provider to which this virtual machine
should be imported.
Copy link
Contributor

Choose a reason for hiding this comment

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

... should be imported to.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not a native speaker of course, but IMHO the 2 possibilities here are "... provider which this VM should be imported to" or "provider to which this VM should be imported", but not with 2 "to"s :-)

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, two to are too much 👍 .

data_type: string
notes:
notes_display:
display: edit
display_method:
display_method_options: {}
required: true
required_method:
required_method_options: {}
default_value: ''
values: []
values_method:
values_method_options: {}
options:
:sort_by: :value
label: Provider
position: 1
validator_type:
validator_rule:
reconfigurable:
dynamic: true
show_refresh_button:
load_values_on_init:
read_only:
auto_refresh:
trigger_auto_refresh: true
visible: true
type: DialogFieldDropDownList
resource_action:
action:
resource_type: DialogField
ae_namespace: Infrastructure/VM/Transform
ae_class: Import
ae_instance: list_infra_providers
ae_message:
ae_attributes: {}
- name: cluster
description: Target cluster
data_type: string
notes:
notes_display:
display: edit
display_method:
display_method_options: {}
required: true
required_method:
required_method_options: {}
default_value: ''
values: []
values_method:
values_method_options: {}
options:
:sort_by: :value
label: Cluster
position: 2
validator_type:
validator_rule:
reconfigurable: false
dynamic: true
show_refresh_button: false
load_values_on_init: false
read_only:
auto_refresh: true
trigger_auto_refresh: true
visible: true
type: DialogFieldDropDownList
resource_action:
action:
resource_type: DialogField
ae_namespace: Infrastructure/VM/Transform
ae_class: Import
ae_instance: list_clusters
ae_message:
ae_attributes: {}
- name: storage
description: Target storage
data_type: string
notes:
notes_display:
display: edit
display_method:
display_method_options: {}
required: true
required_method:
required_method_options: {}
default_value: ''
values: []
values_method:
values_method_options: {}
options:
:sort_by: :value
label: Storage
position: 3
validator_type:
validator_rule:
reconfigurable:
dynamic: true
show_refresh_button: false
load_values_on_init: true
read_only:
auto_refresh: true
trigger_auto_refresh: false
visible: true
type: DialogFieldDropDownList
resource_action:
action:
resource_type: DialogField
ae_namespace: Infrastructure/VM/Transform
ae_class: Import
ae_instance: list_storages
ae_message:
ae_attributes: {}
- name: sparse
description: Use thin allocation for virtual disks
data_type:
notes:
notes_display:
display: edit
display_method:
display_method_options: {}
required: false
required_method:
required_method_options: {}
default_value: f
values:
values_method:
values_method_options: {}
options: {}
label: Thin provisioning
position: 4
validator_type:
validator_rule:
reconfigurable:
dynamic:
show_refresh_button:
load_values_on_init:
read_only:
auto_refresh:
trigger_auto_refresh:
visible: true
type: DialogFieldCheckBox
resource_action:
action:
resource_type: DialogField
ae_namespace:
ae_class:
ae_instance:
ae_message:
ae_attributes: {}
resource_actions:
- action:
ae_namespace: SYSTEM
ae_class: PROCESS
ae_instance: Request
ae_message:
ae_attributes:
Class: Import
Instance: ImportVm
Namespace: ManageIQ/Infrastructure/VM/Transform
request: Call_Instance