mirror of
https://github.com/jbowdre/phpIPAM-for-vRA8.git
synced 2024-12-03 12:02:17 +00:00
remove reference to resourceInfo['owner'] to work around problem with vRA 8.6
This commit is contained in:
parent
3797a59310
commit
21ed9d7c66
2 changed files with 2 additions and 3 deletions
2
pom.xml
2
pom.xml
|
@ -23,7 +23,7 @@ conditions of the subcomponent's license, as noted in the LICENSE file.
|
|||
<properties>
|
||||
<provider.name>phpIPAM</provider.name>
|
||||
<provider.description>phpIPAM integration for vRA</provider.description>
|
||||
<provider.version>1.0.3</provider.version>
|
||||
<provider.version>1.0.4</provider.version>
|
||||
|
||||
<provider.supportsAddressSpaces>false</provider.supportsAddressSpaces>
|
||||
<provider.supportsUpdateRecord>true</provider.supportsUpdateRecord>
|
||||
|
|
|
@ -142,13 +142,12 @@ def allocate(resource, allocation, context, endpoint, bundle):
|
|||
def allocate_in_range(range_id, resource, allocation, context, endpoint, bundle):
|
||||
if int(allocation['size']) ==1:
|
||||
vmName = resource['name']
|
||||
owner = resource['owner']
|
||||
uri = bundle['uri']
|
||||
token = bundle['token']
|
||||
cert = bundle['cert']
|
||||
payload = {
|
||||
'hostname': vmName,
|
||||
'description': f'Reserved by vRA for {owner} at {datetime.now()}'
|
||||
'description': f'Reserved by vRA at {datetime.now()}'
|
||||
}
|
||||
allocate_uri = f'{uri}/addresses/first_free/{str(range_id)}/'
|
||||
allocate_req = requests.post(allocate_uri, data=payload, headers=token, verify=cert)
|
||||
|
|
Loading…
Reference in a new issue