-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add v1beta1 api endpoints #70
Conversation
routes: routes, | ||
secrets: secrets, | ||
services: services | ||
buildconfigs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh, i actually have this changed in my branch where i'm switching to XO, so +1 :)
lib/deployments.js
Outdated
.apps}/namespaces/${clientConfig | ||
.context.namespace}/deployments`; | ||
|
||
console.log('find all at ', url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably remove this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops - that's a stray.
@lance i agree about the refactoring. in fact, there could be a lot more than just what you mentioned, that actually removes a lot of code since most, probably all, GET, POST, etc... are the same. But you are right, that shouldn't really be part of this PR, but a major version release after the refactor. |
speaking of endpoints, #42. i forgot about this one. i wonder during the refactor, if we should be changing the apis to look like this |
This commit adds the set of v1beta1 endpoint URLs documented here: https://docs.openshift.com/container-platform/3.7/rest_api/index.html The only functional endpoint at the moment is for deployments. All of the others simply expose the endpoint URL but do expose any functional behavior. I've added a `client.apis` object which maps to the the 3 semi-supported APIs at the moment. ```js client.apis.oapi // { version: config.apiVersion, baseUrl: client.apiUrl } client.apis.kube // { version: config.apiVersion, baseUrl: client.kubeUrl } client.apis.v1beta1 // function endpoints() returning array of endpoint URLs ``` Not sure if this is ready to merge or not. I think it's a good first step, and will give me what I need in nodeshift for nodeshift/nodeshift#228 but it almost feels like there's a major refactoring that could take place where the `lib` directory is split between the various supported APIs. For example: ```bash . └── lib ├── kube ├── oapi └── v1beta1 ``` To actually do all of this could be quite large, however. So maybe this commit is good for a minor version release, and the bigger changes can come later with a major version bump.
This commit adds the set of v1beta1 endpoint URLs documented here:
https://docs.openshift.com/container-platform/3.7/rest_api/index.html
The only functional endpoint at the moment is for deployments. All of
the others simply expose the endpoint URL but do expose any functional
behavior.
I've added a
client.apis
object which maps to the the 3 semi-supportedAPIs at the moment.
Not sure if this is ready to merge or not. I think it's a good first step,
and will give me what I need in nodeshift for nodeshift/nodeshift#228
but it almost feels like there's a major refactoring that could take place
where the
lib
directory is split between the various supported APIs.For example:
. └── lib ├── kube ├── oapi └── v1beta1
To actually do all of this could be quite large, however. So maybe this
commit is good for a minor version release, and the bigger changes can
come later with a major version bump.
Connects to: #69