Skip to content

Commit

Permalink
Merge pull request #70 from HewlettPackard/fix_integration
Browse files Browse the repository at this point in the history
Fix integration
  • Loading branch information
reubenur-rahman authored Feb 23, 2024
2 parents 7d6b604 + d3fd345 commit 1ec3f0d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pkg/client/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,27 @@ func (r *RouterAPIService) GetNetworkServices(
return routerResp, err
}

func (r *RouterAPIService) RefreshNetworkServices(
ctx context.Context,
serverID int,
queryParams map[string]string,
) (models.SuccessOrErrorMessage, error) {
serverResp := models.SuccessOrErrorMessage{}
serverAPI := &api{
compatibleVersion: consts.CMPSixZeroFiveVersion,
method: "POST",
path: fmt.Sprintf("%s/%s/%d/%s", consts.NetworksPath,
consts.ServerPath, serverID, consts.RefreshPath),
client: r.Client,
jsonParser: func(body []byte) error {
return json.Unmarshal(body, &serverResp)
},
}
err := serverAPI.do(ctx, nil, queryParams)

return serverResp, err
}

func (r *RouterAPIService) CreateRouterNat(
ctx context.Context,
routerID int,
Expand Down
4 changes: 4 additions & 0 deletions pkg/common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,14 @@ const (
RouterBgpNeighborPath = "bgp-neighbors"
NetworkEdgeClusterPath = "edge-clusters"
DhcpServerPath = "dhcp-servers"
RefreshPath = "refresh"
// Whoami Path
WhoamiPath = "whoami"
LBSSLCertificatesPath = "certificates"

// headers
ContentType = "application/json"

// Morpheus version
CMPSixZeroFiveVersion = "6.0.5"
)

0 comments on commit 1ec3f0d

Please sign in to comment.