From 43f59677a1994d8f556eb1376980b588ab4866c4 Mon Sep 17 00:00:00 2001 From: Daniel Barnes Date: Wed, 5 Apr 2023 03:18:48 +0000 Subject: [PATCH] DEVOPS-2428 dxcon deletion --- CHANGELOG.md | 5 +++++ service/vxc/aws.go | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index abf4334..1371364 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 0.1.15 Release + +## New Features + - Support for extracting AWS Hosted Connection ID's. + # 0.1.14 Release ## New Features diff --git a/service/vxc/aws.go b/service/vxc/aws.go index e85bae4..ec88d41 100644 --- a/service/vxc/aws.go +++ b/service/vxc/aws.go @@ -65,7 +65,7 @@ func (v *VXC) BuyAWSVXC( func (v *VXC) ExtractAwsId(vxcDetails types.VXC) string { - // extract fid id from csp connection data + // extract vif id from csp connection data cspConnection := v.GetCspConnection("connectType", "AWS", vxcDetails) if cspConnection != nil { @@ -77,6 +77,20 @@ func (v *VXC) ExtractAwsId(vxcDetails types.VXC) string { return "" } +func (v *VXC) ExtractConnectionId(vxcDetails types.VXC) string { + + // extract connection id from csp connection data + cspConnection := v.GetCspConnection("connectType", "AWSHC", vxcDetails) + + if cspConnection != nil { + if _, exists := cspConnection["connectionId"]; exists { + return cspConnection["connectionId"].(string) + } + } + + return "" +} + // Extract AWS CSP details from VXC CspConnection func (v *VXC) ExtractAWSPartnerConfig(vxcDetails types.VXC) (*types.AWSVXCOrderBEndPartnerConfig, error) {