Skip to content

Commit

Permalink
Merge pull request #84 from project-kessel/Fix-relationship-api
Browse files Browse the repository at this point in the history
complete relationship api fixes
  • Loading branch information
randymgeorge authored Sep 3, 2024
2 parents c6f6d49 + 4a3ee8d commit b5b28f6
Show file tree
Hide file tree
Showing 13 changed files with 455 additions and 635 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ package kessel.inventory.v1beta1.relationships;
import "google/api/annotations.proto";

import "kessel/inventory/v1beta1/relationships/k8spolicy_ispropagatedto_k8scluster.proto";
import "kessel/inventory/v1beta1/relationships/update_resource_relationship_by_urnhs_resources_parameter.proto";
import "kessel/inventory/v1beta1/relationships/resource_relationship_by_urnhs_hcrns_parameter.proto";

option go_package = "github.com/project-kessel/inventory-api/api/kessel/inventory/v1beta1/relationships";
option java_multiple_files = true;
option java_package = "org.project_kessel.api.inventory.v1beta1.relationships";

message CreateK8SPolicyIsPropagatedToK8SClusterRequest {
// The resource relationship to create in Kessel Asset Inventory
K8SPolicyIsPropagatedToK8SCluster policy_relationship = 1;
K8SPolicyIsPropagatedToK8SCluster k8spolicy_ispropagatedto_k8scluster = 1;
}

message CreateK8SPolicyIsPropagatedToK8SClusterResponse {}


message UpdateResourceRelationshipByUrnHsRequest {
message UpdateK8SPolicyIsPropagatedToK8SClusterRequest {
// The subject {resource} and the object {resource}. A relationship is between
// a Subject and an Object, e.g. a k8s-policy (subject) has a is-propagated-to
// relationship to an k8s-cluster (object)
UpdateResourceRelationshipByUrnHsResourcesParameter resources = 1;
ResourceRelationshipByUrnHsHcrnsParameter resources = 1;
// Update a resource relationship in Kessel Asset Inventory by the {subject
// resource, object resource}. A relationship is between a Subject and an
// Object, e.g. a k8s-policy (subject) has a is-propagated-to
Expand All @@ -32,16 +32,16 @@ message UpdateResourceRelationshipByUrnHsRequest {
K8SPolicyIsPropagatedToK8SCluster k8spolicy_ispropagatedto_k8scluster = 2;
}

message UpdateResourceRelationshipByUrnHsResponse {}
message UpdateK8SPolicyIsPropagatedToK8SClusterResponse {}

message DeleteResourceRelationshipByUrnRequest {
message DeleteK8SPolicyIsPropagatedToK8SClusterRequest {
// The subject {resource} and the object {resource}. A relationship is between
// a Subject and an Object, e.g. a k8s-policy (subject) has a is-propagated-to
// relationship to an k8s-cluster (object)
UpdateResourceRelationshipByUrnHsResourcesParameter resources = 1;
ResourceRelationshipByUrnHsHcrnsParameter resources = 1;
}

message DeleteResourceRelationshipByUrnResponse {}
message DeleteK8SPolicyIsPropagatedToK8SClusterResponse {}

service KesselK8SPolicyIsPropagatedToK8SClusterService {
rpc CreateK8SPolicyIsPropagatedToK8SCluster (CreateK8SPolicyIsPropagatedToK8SClusterRequest) returns (CreateK8SPolicyIsPropagatedToK8SClusterResponse) {
Expand All @@ -51,14 +51,14 @@ service KesselK8SPolicyIsPropagatedToK8SClusterService {
};
};

rpc UpdateResourceRelationshipByUrnHs(UpdateResourceRelationshipByUrnHsRequest) returns (UpdateResourceRelationshipByUrnHsResponse) {
rpc UpdateK8SPolicyIsPropagatedToK8SCluster(UpdateK8SPolicyIsPropagatedToK8SClusterRequest) returns (UpdateK8SPolicyIsPropagatedToK8SClusterResponse) {
option (google.api.http) = {
put: "/api/inventory/v1beta1/resource-relationships/k8s-policy.is-propagated.to-k8s-cluster"
body : "*"
};
};

rpc DeleteResourceRelationshipByUrn(DeleteResourceRelationshipByUrnRequest) returns (DeleteResourceRelationshipByUrnResponse) {
rpc DeleteK8SPolicyIsPropagatedToK8SCluster(DeleteK8SPolicyIsPropagatedToK8SClusterRequest) returns (DeleteK8SPolicyIsPropagatedToK8SClusterResponse) {
option (google.api.http) = {
delete: "/api/inventory/v1beta1/resource-relationships/k8s-policy.is-propagated.to-k8s-cluster"
};
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b5b28f6

Please sign in to comment.