Skip to content
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

add multi-gateways support to api command and plan support to declarative command #24

Closed
wants to merge 13 commits into from

Conversation

jquantin
Copy link

Hi,

This is 2 things :

  • a small modification of the api command to use more than one gateway to create an API.
    I only add a new param "gateways" (with a s) and let the old one "gateway" (without s) to be sure to not break things. I can merge the 2 params together (the one without s) if its preferable.
  • the support for plans on the declaratives command. Works with a "plans" section on the root of organisation and with the sames policies declarations than those inside api.

thanks

@@ -62,6 +67,9 @@
@Option(name = "--gateway", aliases = {"-g"}, usage = "Gateway")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make the gateway argument a List<String>? Args4j will do the rest.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I remove the "gateways" arg and make the "gateway" one, being a List (can occurs more than once)
for instance : "-g gw1 -g gw2"

@@ -81,11 +89,23 @@ public void performAction(CmdLineParser parser) throws CommandException {
description,
initialVersion);

final List gatewaysList = Lists.newArrayList();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't be needed anymore if we make the private field a List<String>

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I steel use it for creating a list of GatewayApi Objects

* Never clone a previous version when creating a new version.
*/
@JsonProperty
final private boolean clone = false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed for plan creation?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it works like the POST of api's version (@post("/organizations/{orgName}/plans/{planName}/versions")
The clone's mecanism is the same as Api one.

@EricWittmann EricWittmann changed the title add multi-gateways support to api command and plan support to declaratice command add multi-gateways support to api command and plan support to declarative command Aug 30, 2017
@msavy
Copy link
Member

msavy commented Nov 6, 2017

Hi @jquantin I haven't forgotten about this. As soon as my main PR is resolved, I'll be looking to get your work in (I'll refactor it).

@jquantin
Copy link
Author

jquantin commented Nov 6, 2017

Cool !
I started to merge with your attempt on this branch : https://github.com/jquantin/apiman-cli/tree/OrgAPI
And I add a lot more inside : work to serialize an organization with clients, contracts, plans and apis (use the manager api) and other works to use this on entry of declarative Command. I think that it could be compatible with your description here : #28 (comment).
Don't hesitate to call or mail me.

Thank-you

@msavy
Copy link
Member

msavy commented Nov 20, 2017

Hey @jquantin is the branch you reference (OrgAPI) still the latest? Looking to merge in your work on my branch.

@jquantin
Copy link
Author

Hi,
Yes this is my last tag. All i have done is in this one.
Thanks

@outofcoffee
Copy link
Collaborator

Superseded by #36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants