Commit f519ddbf authored by Rajendra Kadam's avatar Rajendra Kadam Committed by Stan Hu

Separate cluster entities into own class files

parent 45176203
---
title: Separate cluster entities into own class files
merge_request: 25121
author: Rajendra Kadam
type: added
......@@ -655,23 +655,6 @@ module API
end
end
class Cluster < Grape::Entity
expose :id, :name, :created_at, :domain
expose :provider_type, :platform_type, :environment_scope, :cluster_type
expose :user, using: Entities::UserBasic
expose :platform_kubernetes, using: Entities::Platform::Kubernetes
expose :provider_gcp, using: Entities::Provider::Gcp
expose :management_project, using: Entities::ProjectIdentity
end
class ClusterProject < Cluster
expose :project, using: Entities::BasicProjectDetails
end
class ClusterGroup < Cluster
expose :group, using: Entities::BasicGroupDetails
end
module InternalPostReceive
class Message < Grape::Entity
expose :message
......
# frozen_string_literal: true
module API
module Entities
class Cluster < Grape::Entity
expose :id, :name, :created_at, :domain
expose :provider_type, :platform_type, :environment_scope, :cluster_type
expose :user, using: Entities::UserBasic
expose :platform_kubernetes, using: Entities::Platform::Kubernetes
expose :provider_gcp, using: Entities::Provider::Gcp
expose :management_project, using: Entities::ProjectIdentity
end
end
end
# frozen_string_literal: true
module API
module Entities
class ClusterGroup < Entities::Cluster
expose :group, using: Entities::BasicGroupDetails
end
end
end
# frozen_string_literal: true
module API
module Entities
class ClusterProject < Entities::Cluster
expose :project, using: Entities::BasicProjectDetails
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment