Skip to content

Commit

Permalink
Merge pull request #69 from megaport/fix/oracle-csp-connection
Browse files Browse the repository at this point in the history
fix: update to correct JSON for Oracle VXC CSP Config, Correct JSON for Azure Peering Config
  • Loading branch information
MegaportPhilipBrowne authored Sep 12, 2024
2 parents 000dc78 + 77284e5 commit e88686a
Showing 1 changed file with 41 additions and 12 deletions.
53 changes: 41 additions & 12 deletions vxc_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ type VXCOrderConfiguration struct {
type VXCOrderEndpointConfiguration struct {
ProductUID string `json:"productUid,omitempty"`
VLAN int `json:"vlan,omitempty"`
DiversityZone string `json:"diversityZone,omitempty"`
PartnerConfig VXCPartnerConfiguration `json:"partnerConfig,omitempty"`
*VXCOrderMVEConfig
}
Expand Down Expand Up @@ -442,16 +443,27 @@ type CSPConnectionAWSHC struct {
// CSPConnectionAzure represents the configuration of a CSP connection for Azure ExpressRoute.
type CSPConnectionAzure struct {
CSPConnectionConfig
ConnectType string `json:"connectType"`
ResourceName string `json:"resource_name"`
ResourceType string `json:"resource_type"`
Bandwidth int `json:"bandwidth"`
Managed bool `json:"managed"`
Megaports []CSPConnectionAzureMegaport `json:"megaports"`
Ports []CSPConnectionAzurePort `json:"ports"`
ServiceKey string `json:"service_key"`
VLAN int `json:"vlan"`
Peers []PartnerOrderAzurePeeringConfig `json:"peers"`
ConnectType string `json:"connectType"`
ResourceName string `json:"resource_name"`
ResourceType string `json:"resource_type"`
Bandwidth int `json:"bandwidth"`
Managed bool `json:"managed"`
Megaports []CSPConnectionAzureMegaport `json:"megaports"`
Ports []CSPConnectionAzurePort `json:"ports"`
ServiceKey string `json:"service_key"`
VLAN int `json:"vlan"`
Peers []CSPConnectionAzurePeeringConfig `json:"peers"`
}

// CSPConnectionAzurePeeringConfig represents the configuration of an Azure peering partner.
type CSPConnectionAzurePeeringConfig struct {
Type string `json:"type"`
PeerASN int `json:"peer_asn"`
PrimarySubnet string `json:"primary_subnet"`
SecondarySubnet string `json:"secondary_subnet"`
Prefixes string `json:"prefixes,omitempty"`
SharedKey string `json:"shared_key,omitempty"`
VLAN int `json:"vlan"`
}

// CSPConnectionAzureMegaport represents the configuration of a CSP connection for Azure ExpressRoute megaport.
Expand Down Expand Up @@ -517,8 +529,25 @@ type CSPConnectionVirtualRouterInterface struct {

type CSPConnectionOracle struct {
CSPConnectionConfig
ConnectType string `json:"connectType"`
VirtualCircuitId string `json:"virtualCircuitId"`
ConnectType string `json:"connectType"`
ResourceName string `json:"resource_name"`
ResourceType string `json:"resource_type"`
CSPName string `json:"csp_name"`
Bandwidth int `json:"bandwidth"`
Megaports []CSPConnectionOracleMegaport `json:"megaports"`
Ports []CSPConnectionOraclePort `json:"ports"`
VirtualCircuitId string `json:"virtualCircuitId"`
}

type CSPConnectionOracleMegaport struct {
Port int `json:"port"`
VXC int `json:"vxc"`
}

type CSPConnectionOraclePort struct {
ServiceID int `json:"service_id"`
VXCServiceIDs []int `json:"vxc_service_ids"`
FirstVXCServiceID int `json:"firstVxcServiceId,omitempty"`
}

// CSPConnectionTransit represents the configuration of a CSP connection for a Transit VXC.
Expand Down

0 comments on commit e88686a

Please sign in to comment.