Skip to content

Commit

Permalink
Merge pull request #83 from megaport/fix/oracle-vxc
Browse files Browse the repository at this point in the history
fix: add oracle csp connection to switch case for map
  • Loading branch information
MegaportPhilipBrowne authored Nov 5, 2024
2 parents 3fcdb48 + 21b1e63 commit dfa9091
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions vxc_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,16 @@ func (c *CSPConnection) UnmarshalJSON(data []byte) error {
return err
}
c.CSPConnection = append(c.CSPConnection, transit)
case "ORACLE":
marshaled, err := json.Marshal(cn)
if err != nil {
return err
}
oracle := CSPConnectionOracle{}
if err := json.Unmarshal(marshaled, &oracle); err != nil {
return err
}
c.CSPConnection = append(c.CSPConnection, oracle)
default: // Any other cases will be marshaled into a map[string]interface{}
marshaled, err := json.Marshal(cn)
if err != nil {
Expand Down

0 comments on commit dfa9091

Please sign in to comment.