mirror of
https://github.com/jbowdre/phpIPAM-for-vRA8.git
synced 2024-12-04 12:22:19 +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>
|
<properties>
|
||||||
<provider.name>phpIPAM</provider.name>
|
<provider.name>phpIPAM</provider.name>
|
||||||
<provider.description>phpIPAM integration for vRA</provider.description>
|
<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.supportsAddressSpaces>false</provider.supportsAddressSpaces>
|
||||||
<provider.supportsUpdateRecord>true</provider.supportsUpdateRecord>
|
<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):
|
def allocate_in_range(range_id, resource, allocation, context, endpoint, bundle):
|
||||||
if int(allocation['size']) ==1:
|
if int(allocation['size']) ==1:
|
||||||
vmName = resource['name']
|
vmName = resource['name']
|
||||||
owner = resource['owner']
|
|
||||||
uri = bundle['uri']
|
uri = bundle['uri']
|
||||||
token = bundle['token']
|
token = bundle['token']
|
||||||
cert = bundle['cert']
|
cert = bundle['cert']
|
||||||
payload = {
|
payload = {
|
||||||
'hostname': vmName,
|
'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_uri = f'{uri}/addresses/first_free/{str(range_id)}/'
|
||||||
allocate_req = requests.post(allocate_uri, data=payload, headers=token, verify=cert)
|
allocate_req = requests.post(allocate_uri, data=payload, headers=token, verify=cert)
|
||||||
|
|
Loading…
Reference in a new issue