This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate one POST request per selected host
- Loading branch information
Showing
5 changed files
with
39 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 22 additions & 9 deletions
31
...nHostsSettings/components/ConversionHostWizard/ConversionHostWizardResultsStep/helpers.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
export const getConfigureConversionHostPostBody = (locationStepValues, hostsStepValues, authStepValues) => { | ||
console.log('TODO: use location step values:', locationStepValues); | ||
console.log('TODO: use hosts step values:', hostsStepValues); | ||
console.log('TODO: use auth step values: ', authStepValues); | ||
// TODO | ||
return { | ||
foo: 'bar' | ||
}; | ||
}; | ||
import { OPENSTACK } from '../../../../../../../../../common/constants'; | ||
import { VDDK } from '../ConversionHostWizardConstants'; | ||
|
||
export const getConfigureConversionHostPostBodies = (locationStepValues, hostsStepValues, authStepValues) => | ||
hostsStepValues.hosts.map(host => { | ||
const openstackSpecificProperties = | ||
locationStepValues.providerType === OPENSTACK ? { auth_user: authStepValues.openstackUser } : {}; | ||
const vddkSpecificProperties = | ||
authStepValues.transformationMethod === VDDK | ||
? { param_v2v_vddk_package_url: authStepValues.vddkLibraryPath } | ||
: {}; | ||
return { | ||
name: host.name, | ||
resource_type: host.type, | ||
resource_id: host.id, | ||
...openstackSpecificProperties, | ||
...vddkSpecificProperties | ||
}; | ||
// TODO: handle authStepValues.conversionHostSshKey | ||
// TODO: handle authStepValues.transformationMethod (explicitly?) | ||
// TODO: handle authStepValues.vmwareSshKey (if transformationMethod === SSH) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters