rht-labs / api-design Goto Github PK
View Code? Open in Web Editor NEWNO LONGER ACTIVE - Home of our Swagger / OpenAPI Specifications, System Designs and Documentation
License: Apache License 2.0
NO LONGER ACTIVE - Home of our Swagger / OpenAPI Specifications, System Designs and Documentation
License: Apache License 2.0
Needs to be modelled independent of an Engagement
These will need an SSH key somewhere in Jenkins as well as OCP BuildConfigs
We are currently trying to implement the automation of users into the IdM. The api spec currently has a list of users at the engagement level called team. However, this does not support the idea that users can belong to different groups on the team.
Current:
"team": [
{ "user_name": "kmcanoy" },
{ "user_name": "obedin" },
{ "user_name": "jholmes" }
]
Instead we would like to add the groups as well and have the users be attached to the groups that they belong to
"team": {
"users" : [
{ "user_name": "kmcanoy" },
{ "user_name": "obedin" },
{ "user_name": "jholmes" }
],
"groups": [
{
"name": "admin",
"members": [
{ "user_name": "kmcanoy" },
{ "user_name": "obedin" },
{ "user_name": "jholmes" }
]
},
{
"name": "devops",
"members": [
{ "user_name": "jholmes" }
]
},
{
"name": "developer",
"users": [
{ "user_name": "kmcanoy" }
]
}
]
}
}
Requires new team object with user array and group array. Modified group object with user array
This won't effect the group_to_role mapping
Check out https://github.com/rht-labs/api-design/blob/master/swagger.yaml#L1044
The definition OpenshiftCluster is referencing openshift but there is no Openshift defined.
OpenshiftCluster:
....
openshift:
$ref: '#/definitions/Openshift'
openshift_resources_to_create:
$ref: '#/definitions/OpenshiftResources'
openshift_host_env:
type: string
image_registry:
$ref: "#/definitions/ImageRegistry
Add timestamp to enable the expiration of a user
There is no 201 for the resources.
e.g. oc tag
vs docker pull/tag/push
The id in the model route is specified as string. It should be configured so that the code-gen creates a Long instead of a String in Java.
See rht-labs/ansible-stacks#30
Cluster should have volumes
Project should have claim
App should use the claim name
The model is built around single container pods, and thus all the down stream automation is as well. This is a common scenario, so likely not problematic.
Currently we require implementations to infer the existence of images that can be promoted between namespaces. This should be made explicit, so tools know what images can be promoted and therefore can ensure the prerequisites are in place.
Where it makes sense, align our language to http://label-schema.org/rc1/
So we can support oc expose svc --path
Move to infra focused API object
e.g. slack / jira need to be supported
So we can do stuff like
oc policy add-role-to-group view system:serviceaccounts
consider an abstraction vs concretion domain split in the model
e.g. sonar and cucumber
This is currently supported as a private feature of stacks. See rht-labs/ansible-stacks#71
OpenshiftCluster => OpenShiftCluster
revaluate ImageRegistry object
app is missing buildTool, buildAppCommands, buildImageCommands and deployImageCommands
also ask ourselves if all deployments need to be image centric? perhaps change the name deployApp / buildApp?
Add ids to model.
Actual:
role_mapping/json
role/json
Expected:
application/json
Will add more as needed
The current swagger api definition has one sided references between models, this cause an issue with JPA xml, as there are no elements in the xml for the corresponding elements.
We are running into an issue in ansible-stacks because when we pass an engagement json to ansible with the field groups we then have to access it like {{ groups }}
which is a reserved variable in ansible. Instead use the term user_groups. See ansible-stacks issue rht-labs/ansible-stacks#61
We should leverage the Description field better to document the API, in particular any decisions made that will be hard to backtrack later on - i.e.: if a field is added that doesn't directly map to a core feature/functionality, we need to ensure it is documented for future reference. Overall, just need better documentation.
Look to use one of the tools in http://swagger.io/open-source-integrations/
Also add in service account
https://github.com/rht-labs/api-design/blob/master/ansible-stack-swagger-.0.2.0.yaml#L132
As an alternative to granting access to a long list of users, we should support using group memberships (i.e.: part of LDAP) for granting roles, etc.
The model is built around single container pods, and thus all the down stream automation is as well. This is a common scenario, so likely not problematic. This ticket is here just to capture that we have this limitation
Essentially this would make our API Application centric, as opposed to Engagement or OpenShiftCluster centric
Here is the relevant output of the code gen for SpringBoot
return new ApiInfoBuilder()
.title("EMdP modeling and API design")
.description("No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)")
.license("")
.licenseUrl("")
.termsOfServiceUrl("")
.version("0.2.0")
.contact(new Contact("","", ""))
.build();
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.