Skip to content

Commit

Permalink
fix: pass any extra EHN fields wholesale to the API
Browse files Browse the repository at this point in the history
Fixes specifically the fact that some EHNs will specify a `useCases`
or `slotNumber` field which would cause a bossman error on apply
because all args are otherwise explicitly declared.
  • Loading branch information
ynohat committed Oct 11, 2024
1 parent ee639f3 commit a1b5bfb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bossman/plugins/akamai/lib/papi.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def get_edgehostnames(self, contractId, groupId):
edgeHostnames = list(PAPIEdgeHostname(**item) for item in response.json().get("edgeHostnames", {}).get("items", []))
return edgeHostnames

def create_edgehostname(self, contractId, groupId, domainPrefix, domainSuffix, productId, ipVersionBehavior, secureNetwork, certEnrollmentId=None):
def create_edgehostname(self, contractId, groupId, domainPrefix, domainSuffix, productId, ipVersionBehavior, secureNetwork, certEnrollmentId=None, **kwargs):
self.logger.debug(f'create_edgehostnames {domainPrefix}.{domainSuffix} contractId=${contractId} groupId=${groupId}')
params=dict(contractId=contractId, groupId=groupId)
body=dict(
Expand All @@ -188,6 +188,7 @@ def create_edgehostname(self, contractId, groupId, domainPrefix, domainSuffix, p
productId=productId,
ipVersionBehavior=ipVersionBehavior,
secureNetwork=secureNetwork,
**kwargs
)
if certEnrollmentId != None:
body['certEnrollmentId'] = certEnrollmentId
Expand Down

0 comments on commit a1b5bfb

Please sign in to comment.