massive zrokEdgeSdk cleanups around service policies (#112)

This commit is contained in:
Michael Quigley
2022-12-14 17:17:19 -05:00
parent d9148490a3
commit 1c5b030472
7 changed files with 60 additions and 170 deletions

View File

@@ -73,7 +73,7 @@ func (h *createIdentityHandler) Handle(params admin.CreateIdentityParams, princi
svcZId := *listSvcResp.Payload.Data[0].ID
spName := fmt.Sprintf("%v-%v-dial", name, cfg.Metrics.ServiceName)
if err := zrokEdgeSdk.CreateNamedDialServicePolicy(spName, svcZId, zId, edge); err != nil {
if _, err := zrokEdgeSdk.CreateServicePolicy(spName, rest_model_edge.SemanticAllOf, []string{zId}, []string{svcZId}, nil, zrokEdgeSdk.ServicePolicyDial, edge); err != nil {
logrus.Errorf("error creating named dial service policy '%v': %v", spName, err)
return admin.NewCreateIdentityInternalServerError()
}