Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f519ddbf
Commit
f519ddbf
authored
Feb 13, 2020
by
Rajendra Kadam
Committed by
Stan Hu
Feb 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate cluster entities into own class files
parent
45176203
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
17 deletions
+37
-17
changelogs/unreleased/refactoring-entities-file-32.yml
changelogs/unreleased/refactoring-entities-file-32.yml
+5
-0
lib/api/entities.rb
lib/api/entities.rb
+0
-17
lib/api/entities/cluster.rb
lib/api/entities/cluster.rb
+14
-0
lib/api/entities/cluster_group.rb
lib/api/entities/cluster_group.rb
+9
-0
lib/api/entities/cluster_project.rb
lib/api/entities/cluster_project.rb
+9
-0
No files found.
changelogs/unreleased/refactoring-entities-file-32.yml
0 → 100644
View file @
f519ddbf
---
title
:
Separate cluster entities into own class files
merge_request
:
25121
author
:
Rajendra Kadam
type
:
added
lib/api/entities.rb
View file @
f519ddbf
...
...
@@ -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
...
...
lib/api/entities/cluster.rb
0 → 100644
View file @
f519ddbf
# 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
lib/api/entities/cluster_group.rb
0 → 100644
View file @
f519ddbf
# frozen_string_literal: true
module
API
module
Entities
class
ClusterGroup
<
Entities
::
Cluster
expose
:group
,
using:
Entities
::
BasicGroupDetails
end
end
end
lib/api/entities/cluster_project.rb
0 → 100644
View file @
f519ddbf
# frozen_string_literal: true
module
API
module
Entities
class
ClusterProject
<
Entities
::
Cluster
expose
:project
,
using:
Entities
::
BasicProjectDetails
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment