Skip to content

Commit

Permalink
Renamed endpoints for noc certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
Artemkaaas committed Nov 5, 2024
1 parent f22ed9f commit 86c7f69
Show file tree
Hide file tree
Showing 4 changed files with 171 additions and 170 deletions.
6 changes: 3 additions & 3 deletions integration_tests/grpc_rest/pki/noc_cert_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func GetNocX509Cert(suite *utils.TestSuite, subject string, subjectKeyID string)
var resp pkitypes.QueryGetNocCertificatesResponse
err := suite.QueryREST(
fmt.Sprintf(
"/dcl/pki/noc-certificates/%s/%s",
"/dcl/pki/all-noc-certificates/%s/%s",
url.QueryEscape(subject), url.QueryEscape(subjectKeyID),
),
&resp,
Expand Down Expand Up @@ -67,7 +67,7 @@ func GetAllNocX509CertsBySubject(suite *utils.TestSuite, subject string) (*pkity
var resp pkitypes.QueryGetNocCertificatesBySubjectResponse
err := suite.QueryREST(
fmt.Sprintf(
"/dcl/pki/noc-certificates/%s",
"/dcl/pki/all-noc-certificates/%s",
url.QueryEscape(subject),
),
&resp,
Expand Down Expand Up @@ -108,7 +108,7 @@ func GetAllNocX509certsBySubjectKeyID(suite *utils.TestSuite, subjectKeyID strin
func getAllNocX509Certs(suite *utils.TestSuite, subjectKeyID string) (res []pkitypes.NocCertificates, err error) {
if suite.Rest {
var resp pkitypes.QueryNocCertificatesResponse
err := suite.QueryREST(fmt.Sprintf("/dcl/pki/noc-certificates?subjectKeyId=%s", subjectKeyID), &resp)
err := suite.QueryREST(fmt.Sprintf("/dcl/pki/all-noc-certificates?subjectKeyId=%s", subjectKeyID), &resp)
if err != nil {
return nil, err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ service Query {

// Queries a list of NocCertificates items.
rpc NocCertificatesAll(QueryNocCertificatesRequest) returns (QueryNocCertificatesResponse) {
option (google.api.http).get = "/dcl/pki/noc-certificates";
option (google.api.http).get = "/dcl/pki/all-noc-certificates";
}
// Queries a NocCertificatesBySubject by index.
rpc NocCertificatesBySubject(QueryGetNocCertificatesBySubjectRequest) returns (QueryGetNocCertificatesBySubjectResponse) {
option (google.api.http).get = "/dcl/pki/noc-certificates/{subject}";
option (google.api.http).get = "/dcl/pki/all-noc-certificates/{subject}";
}
// Queries a NocCertificates by index.
rpc NocCertificates(QueryGetNocCertificatesRequest) returns (QueryGetNocCertificatesResponse) {
option (google.api.http).get = "/dcl/pki/noc-certificates/{subject}/{subjectKeyId}";
option (google.api.http).get = "/dcl/pki/all-noc-certificates/{subject}/{subjectKeyId}";
}

// Queries a NocCertificatesByVidAndSkid by index.
Expand Down
Loading

0 comments on commit 86c7f69

Please sign in to comment.