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

[#690] Add warning to mapping wizard when no OSP conversion hosts are present #812

Merged
merged 7 commits into from Dec 3, 2018
Prev

Replace unwiedly snapshot with simpler test

  • Loading branch information
mturley committed Dec 3, 2018
commit 291ab76f4040b20edcd420facdee1f2584eccea8
@@ -51,7 +51,7 @@ describe('fetching conversion hosts', () => {
payload
};
const state = generalStepReducer(prevState, action);
expect(state).toMatchSnapshot();
expect(state.conversionHosts).toHaveLength(3);
});

test('and there is no data', () => {
@@ -20,314 +20,6 @@ Object {
}
`;

exports[`fetching conversion hosts is successful and there is data 1`] = `
Object {
"conversionHosts": Array [
Object {
"address": null,
"blockio_limit": null,
"concurrent_transformation_limit": null,
"cpu_limit": null,
"created_at": "2018-11-06T02:07:08Z",
"href": "http://0.0.0.0:8080/api/conversion_hosts/42000000000001",
"id": "42000000000001",
"max_concurrent_tasks": null,
"memory_limit": null,
"name": "conversion_host_1",
"network_limit": null,
"resource": Object {
"autostart": null,
"availability_zone_id": "42000000000001",
"boot_time": null,
"busy": null,
"cloud": true,
"cloud_network_id": null,
"cloud_subnet_id": null,
"cloud_tenant_id": "42000000000001",
"config_xml": null,
"connection_state": "connected",
"cpu_affinity": null,
"cpu_hot_add_enabled": null,
"cpu_hot_remove_enabled": null,
"cpu_limit": null,
"cpu_reserve": null,
"cpu_reserve_expand": null,
"cpu_shares": null,
"cpu_shares_level": null,
"created_on": "2018-11-06T02:04:54Z",
"deprecated": null,
"description": null,
"ems_cluster_id": null,
"ems_created_on": null,
"ems_id": "42000000000004",
"ems_ref": "15332bb4-74f5-496b-83cb-837b3f10010b",
"ems_ref_obj": null,
"evm_owner_id": null,
"fault_tolerance": null,
"flavor_id": "42000000000005",
"format": null,
"guid": "d8aef775-81c1-4ec0-b629-511bcfee98cb",
"host_id": null,
"hostname": null,
"id": "42000000000110",
"last_perf_capture_on": null,
"last_scan_attempt_on": null,
"last_scan_on": null,
"last_sync_on": null,
"linked_clone": null,
"location": "unknown",
"memory_hot_add_enabled": null,
"memory_hot_add_increment": null,
"memory_hot_add_limit": null,
"memory_limit": null,
"memory_reserve": null,
"memory_reserve_expand": null,
"memory_shares": null,
"memory_shares_level": null,
"miq_group_id": "42000000000001",
"name": "conversion_host_1",
"orchestration_stack_id": null,
"power_state": "on",
"previous_state": null,
"publicly_available": null,
"raw_power_state": "ACTIVE",
"registered": null,
"resource_group_id": null,
"retired": null,
"retirement_last_warn": null,
"retirement_requester": null,
"retirement_state": null,
"retirement_warn": null,
"retires_on": null,
"smart": null,
"standby_action": null,
"state_changed_on": "2018-11-06T02:04:54Z",
"storage_id": null,
"storage_profile_id": null,
"template": false,
"tenant_id": "42000000000001",
"tools_status": null,
"type": "ManageIQ::Providers::Openstack::CloudManager::Vm",
"uid_ems": "15332bb4-74f5-496b-83cb-837b3f10010b",
"updated_on": "2018-11-06T02:04:54Z",
"vendor": "openstack",
"version": null,
"vnc_port": null,
},
"resource_id": "42000000000110",
"resource_type": "VmOrTemplate",
"ssh_transport_supported": null,
"type": null,
"updated_at": "2018-11-06T02:07:08Z",
"vddk_transport_supported": true,
"version": null,
},
Object {
"address": null,
"blockio_limit": null,
"concurrent_transformation_limit": null,
"cpu_limit": null,
"created_at": "2018-11-06T02:07:19Z",
"href": "http://0.0.0.0:8080/api/conversion_hosts/42000000000002",
"id": "42000000000002",
"max_concurrent_tasks": null,
"memory_limit": null,
"name": "conversion_host_2",
"network_limit": null,
"resource": Object {
"autostart": null,
"availability_zone_id": "42000000000001",
"boot_time": null,
"busy": null,
"cloud": true,
"cloud_network_id": null,
"cloud_subnet_id": null,
"cloud_tenant_id": "42000000000001",
"config_xml": null,
"connection_state": "connected",
"cpu_affinity": null,
"cpu_hot_add_enabled": null,
"cpu_hot_remove_enabled": null,
"cpu_limit": null,
"cpu_reserve": null,
"cpu_reserve_expand": null,
"cpu_shares": null,
"cpu_shares_level": null,
"created_on": "2018-11-06T02:04:54Z",
"deprecated": null,
"description": null,
"ems_cluster_id": null,
"ems_created_on": null,
"ems_id": "42000000000004",
"ems_ref": "d43ce336-5ed3-4d02-8434-5edd70450a32",
"ems_ref_obj": null,
"evm_owner_id": null,
"fault_tolerance": null,
"flavor_id": "42000000000005",
"format": null,
"guid": "0a8fbcd1-ab05-4468-a635-48c964e176b6",
"host_id": null,
"hostname": null,
"id": "42000000000109",
"last_perf_capture_on": null,
"last_scan_attempt_on": null,
"last_scan_on": null,
"last_sync_on": null,
"linked_clone": null,
"location": "unknown",
"memory_hot_add_enabled": null,
"memory_hot_add_increment": null,
"memory_hot_add_limit": null,
"memory_limit": null,
"memory_reserve": null,
"memory_reserve_expand": null,
"memory_shares": null,
"memory_shares_level": null,
"miq_group_id": "42000000000001",
"name": "conversion_host_2",
"orchestration_stack_id": null,
"power_state": "on",
"previous_state": null,
"publicly_available": null,
"raw_power_state": "ACTIVE",
"registered": null,
"resource_group_id": null,
"retired": null,
"retirement_last_warn": null,
"retirement_requester": null,
"retirement_state": null,
"retirement_warn": null,
"retires_on": null,
"smart": null,
"standby_action": null,
"state_changed_on": "2018-11-06T02:04:54Z",
"storage_id": null,
"storage_profile_id": null,
"template": false,
"tenant_id": "42000000000001",
"tools_status": null,
"type": "ManageIQ::Providers::Openstack::CloudManager::Vm",
"uid_ems": "d43ce336-5ed3-4d02-8434-5edd70450a32",
"updated_on": "2018-11-06T02:04:54Z",
"vendor": "openstack",
"version": null,
"vnc_port": null,
},
"resource_id": "42000000000109",
"resource_type": "VmOrTemplate",
"ssh_transport_supported": null,
"type": null,
"updated_at": "2018-11-06T02:07:19Z",
"vddk_transport_supported": true,
"version": null,
},
Object {
"address": null,
"blockio_limit": null,
"concurrent_transformation_limit": null,
"cpu_limit": null,
"created_at": "2018-11-08T21:08:05Z",
"href": "http://0.0.0.0:8080/api/conversion_hosts/42000000000003",
"id": "42000000000003",
"max_concurrent_tasks": null,
"memory_limit": null,
"name": "conversion_host_jerryk",
"network_limit": null,
"resource": Object {
"autostart": null,
"availability_zone_id": "42000000000001",
"boot_time": null,
"busy": null,
"cloud": true,
"cloud_network_id": null,
"cloud_subnet_id": null,
"cloud_tenant_id": "42000000000007",
"config_xml": null,
"connection_state": "connected",
"cpu_affinity": null,
"cpu_hot_add_enabled": null,
"cpu_hot_remove_enabled": null,
"cpu_limit": null,
"cpu_reserve": null,
"cpu_reserve_expand": null,
"cpu_shares": null,
"cpu_shares_level": null,
"created_on": "2018-11-08T15:36:37Z",
"deprecated": null,
"description": null,
"ems_cluster_id": null,
"ems_created_on": null,
"ems_id": "42000000000004",
"ems_ref": "bd4a7620-88ac-4457-bcee-d1a0736dacd8",
"ems_ref_obj": null,
"evm_owner_id": null,
"fault_tolerance": null,
"flavor_id": "42000000000005",
"format": null,
"guid": "e8f91062-cb3c-41fa-95f6-5551d21976d8",
"host_id": null,
"hostname": null,
"id": "42000000000174",
"last_perf_capture_on": null,
"last_scan_attempt_on": null,
"last_scan_on": null,
"last_sync_on": null,
"linked_clone": null,
"location": "unknown",
"memory_hot_add_enabled": null,
"memory_hot_add_increment": null,
"memory_hot_add_limit": null,
"memory_limit": null,
"memory_reserve": null,
"memory_reserve_expand": null,
"memory_shares": null,
"memory_shares_level": null,
"miq_group_id": "42000000000001",
"name": "conversion_host_jerryk",
"orchestration_stack_id": null,
"power_state": "on",
"previous_state": null,
"publicly_available": null,
"raw_power_state": "ACTIVE",
"registered": null,
"resource_group_id": null,
"retired": null,
"retirement_last_warn": null,
"retirement_requester": null,
"retirement_state": null,
"retirement_warn": null,
"retires_on": null,
"smart": null,
"standby_action": null,
"state_changed_on": "2018-11-08T15:36:37Z",
"storage_id": null,
"storage_profile_id": null,
"template": false,
"tenant_id": "42000000000001",
"tools_status": null,
"type": "ManageIQ::Providers::Openstack::CloudManager::Vm",
"uid_ems": "bd4a7620-88ac-4457-bcee-d1a0736dacd8",
"updated_on": "2018-11-08T15:36:37Z",
"vendor": "openstack",
"version": null,
"vnc_port": null,
},
"resource_id": "42000000000174",
"resource_type": "VmOrTemplate",
"ssh_transport_supported": null,
"type": null,
"updated_at": "2018-11-08T21:08:05Z",
"vddk_transport_supported": null,
"version": null,
},
],
"editingMapping": null,
"errorFetchingConversionHosts": null,
"isFetchingConversionHosts": false,
"isRejectedConversionHosts": false,
}
`;

exports[`fetching conversion hosts is successful and there is no data 1`] = `
Object {
"conversionHosts": Array [],
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.