Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

override for type in migratable_vc_domains #432

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
11 changes: 6 additions & 5 deletions examples/migratable_vc_domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@


config = {
"ip": "172.16.102.59",
"ip": "172.168.100.251",
"credentials": {
"userName": "Administrator",
"password": ""
"password": "GSE#admin1"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove password

},
"enclosure_hostname": "172.178.209.32",
"enclosure_hostname": "172.168.100.32",
"enclosure_username": "Administrator",
"enclosure_password": "",
"enclosure_password": "Password",
"vcmUsername": "Administrator",
"vcmPassword": "",
"vcmPassword": "Password",
"enclosure_group_uri": None
}

Expand All @@ -57,6 +57,7 @@
config['enclosure_username'],
config['enclosure_password'],
config['vcmUsername'], config['vcmPassword'],
type = 'MigratableVcDomainV300',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove extra line

enclosureGroupUri=config['enclosure_group_uri'])

# Start a migration by first creating a compatibility report
Expand Down
4 changes: 2 additions & 2 deletions hpOneView/resources/servers/migratable_vc_domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(self, connection):

@staticmethod
def make_migration_information(oaIpAddress, oaUsername, oaPassword, vcmUsername, vcmPassword,
iloLicenseType='OneView', enclosureGroupUri=None):
type = 'migratable-vc-domains', iloLicenseType='OneView', enclosureGroupUri=None):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Adding type filed here is not a good idea.
Add DEFAULT_VALUES class variable to support type field for different versions.

Refer this file, https://github.com/HewlettPackard/python-hpOneView/blob/master/hpOneView/resources/networking/fc_networks.py

return {
'credentials': {
'oaIpAddress': oaIpAddress,
Expand All @@ -61,7 +61,7 @@ def make_migration_information(oaIpAddress, oaUsername, oaPassword, vcmUsername,
},
'iloLicenseType': iloLicenseType,
'enclosureGroupUri': enclosureGroupUri,
'type': 'migratable-vc-domains',
'type': type,
'category': 'migratable-vc-domains'
}

Expand Down