Hi All,

I have started testing the CLI for Import and Export Applications and APIs
(Following the docs [1] and [2]). As an initial step, I have modified the
CLI and the README to the latest API Manager version (API Manager 2.2.0) in
[3] and built the packs for all the platforms (which will be uploading to
the relevant doc spaces). While testing, I'll modify/fix if there are any
issues in the documentation as well. Will update the thread with the
progress.

[1]
https://docs.wso2.com/display/AM2xx/Migrating+Applications+to+a+Different+Environment
[2]
https://docs.wso2.com/display/AM2xx/Migrating+the+APIs+to+a+Different+Environment
[3] https://github.com/wso2/product-apim-tooling/pull/21

Thanks,
Naduni

On Wed, Feb 28, 2018 at 11:11 AM, Randilu Soysa <[email protected]> wrote:

>
>
>
>
> *Hi everyone,I have completed the process of introducing new commands to
> the import-export CLI tool successfully.  Find the finalized set of
> commands below with the sample responses, thank you for all the insights
> and suggestions you’ve provided! Exports an Application from a desired
> environmentCommandsexport-app Flags Required -n, --name string Name of the
> Application to be exported -o, --owner string Owner of the Application to
> be exported -e, --environment string Environment to which the Application
> should be exported Optional -u, --username string Username -p, --password
> string Password -h, --help Help for export-app -k, --insecure Allow
> connections to SSL endpoints without certs --verbose Enable verbose mode
> apimcli export-app (--name <name-of-the-application> --owner
> <owner-of-the-application> --environment
> <environment-from-which-the-app-should-be-exported>) [flags] Examples:
> apimcli export-app -n SampleApp -o admin -e dev apimcli export-app -n
> SampleApp -o admin -e prod Sample Response: Succesfully exported
> Application! Find the exported Application at
> /home/user/.wso2apimcli/exported/apps/dev/admin_sampleApp.zip
> <https://github.com/randilu/WatchOver/blob/master/README.md#imports-an-application-to-a-desired-environment>Imports
> an Application to a desired environmentCommandsimport-app Flags Required
> -f, --file string Name of the Application to be imported -e, --environment
> string Environment from the which the Application should be imported
> (default "default") Optional -s, --skipSubscriptions Skips subscriptions of
> the Application -o, --owner string Name of the target Owner of the
> Application as desired by the Importer -r, --preserveOwner Preserves app
> owner from the original Environment -u, --username string Username -p,
> --password string Password -h, --help Help for import-app -k, --insecure
> Allow connections to SSL endpoints without certs --verbose Enable verbose
> mode apimcli import-app (--file <app-zip-file> --environment
> <environment-to-which-the-app-should-be-imported>) [flags] Examples:
> apimcli import-app -f qa/sampleApp.zip -e dev apimcli Import App -f
> staging/sampleApp.zip -e prod -o testUser -u admin -p admin apimcli
> import-app -f qa/sampleApp.zip --preserveOwner --skipSubscriptions -e
> staging Sample Response: ZipFilePath:
> /home/user/.wso2apimcli/exported/apps/staging/admin_sampleApp.zip
> Succesfully imported Application!
> <https://github.com/randilu/WatchOver/blob/master/README.md#display-a-list-of-applications-in-an-environment-specific-to-an-owner>Display
> a list of Applications in an environment specific to an ownerCommandslist
> apps Flags Required -e, --environment Environment to be searched -o,
> --owner string Owner of the Application Optional -u, --username Username
> -p, --password Password -h, --help Help for list apps Examples: apimcli
> list apps -e dev -o admin apimcli list apps -e staging -o sampleUser -u
> admin -p 123456 Sample Response: Environment: dev No. of Applications: 3
> +--------------------------------------+-----------+-------+----------+----------+
> | ID | NAME | OWNER | STATUS | GROUP-ID |
> +--------------------------------------+-----------+-------+----------+----------+
> | 0e09806c-65bb-4114-b483-3f7521e51a70 | adminApp1 | admin | APPROVED | | |
> d2b2a966-97e6-40da-9f73-7202d6c2bf9b | sampleApp | admin | APPROVED | | |
> 2817069d-ce62-410c-9f10-9f3910912bee | sharedApp | admin | APPROVED |
> testGrp |
> +--------------------------------------+-----------+-------+----------+----------+
> *
>
>
> On Thu, Jan 25, 2018 at 5:41 PM, Randilu Soysa <[email protected]> wrote:
>
>> Hi everyone,
>>
>> I’m working on a project to introduce commands to provide application
>> import export support for the import-export-cli for APIM 2.x. I am planning
>> to introduce commands in order to list available applications of a specific
>> user, export an application from a desired environment and import an
>> application to a desired environment.
>>
>>
>> The commands are as follows,
>>
>>
>> Exports an Application from a desired environment
>>
>> Commands
>>
>> export-app
>>
>>     Flags
>>       Required
>>         -n, --name string          Name of the Application to be exported
>>         -i, --uuid string          UUID of the Application to be exported
>>         -e, --environment string   Environment from which the Application 
>> should be exported
>>       Optional
>>         -p, --password string      Password
>>         -u, --username string      Username
>>
>>         -k, --insecure             Allow connections to SSL endpoints 
>> without certs
>>             --verbose              Enable verbose mode
>>
>> apimcli export-app (--name <name-of-the-application> --uuid 
>> <uuid-of-the-application> --environment 
>> <environment-from-which-the-app-should-be-exported>) [flags]
>>
>> Examples:
>>
>>         apimcli export-app -n SampleApp 9f6affe2-4c97-4817-bded-717f8b01eee8 
>> -e dev
>>         apimcli export-app -n SampleApp 7bc2b94e-c6d2-4d4f-beb1-cdccb08cd87f 
>> -e prod
>>
>>
>>
>> <https://github.com/randilu/WatchOver/new/master?readme=1#imports-an-application-to-a-desired-environment>Imports
>> an Application to a desired environment
>>
>> Commands
>>
>> import-app
>>
>>     Flags
>>         Required
>>           -f, --file string          Name of the Application to be imported
>>           -e, --environment string   Environment from the which the 
>> Application should be imported
>>         Optional
>>           -s, --addSubscriptions     Adds subscriptions of the Application
>>           -o, --perserveOwner        Preserves app owner from the original 
>> Environment
>>           -p, --password string      Password
>>           -u, --username string      Username
>>
>>           -k, --insecure             Allow connections to SSL endpoints 
>> without certs
>>               --verbose              Enable verbose mode
>>
>> apimcli import-app (--file <app-zip-file> --environment 
>> <environment-to-which-the-app-should-be-imported>) [flags]
>>
>> Examples:
>>
>>         apimcli import-app -f qa/sampleApp.zip -e dev
>>         apimcli import-app -f staging/sampleApp.zip -e prod -u admin -p admin
>>         apimcli import-app -f qa/sampleApp.zip --preserveOwner 
>> --addSubscriptions -e prod
>>
>>
>>
>> <https://github.com/randilu/WatchOver/new/master?readme=1#lists-the-applications-available-for-a-certain-user>Lists
>> the Applications available for a certain user
>>
>> Commands
>>
>> list apps
>>
>>     Flags
>>         Required
>>             -e, --environment
>>         Optional
>>             -u, --username
>>             -p, --password
>>
>>
>> Examples:
>>
>>         apimcli list apps -e dev
>>         apimcli list apps -e staging
>>         apimcli list apps -e staging -u admin -p 123456
>>         apimcli list apps -e staging -u admin
>>         apimcli list apps -e staging -p 123456
>>
>>
>> Your suggestions and feedback on this is highly appreciated!
>>
>>
>> --
>> *Randilu Soysa*
>> Software Engineering Intern | WSO2
>>
>> Email    : [email protected]
>> Mobile   : +94 77 197 5078 <+94%2077%20197%205078>
>> linkedin : linkedin.com/in/randilusoysa
>> Web      : http://wso2.com
>>
>> <http://wso2.com/signature>
>>
>
>
>
> --
> *Randilu Soysa*
> Software Engineering Intern | WSO2
>
> Email    : [email protected]
> Mobile   : +94 77 197 5078
> linkedin : linkedin.com/in/randilusoysa
> Web      : http://wso2.com
>
> <http://wso2.com/signature>
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
*Naduni Pamudika*
Software Engineer | WSO2
Mobile: +94 719 143658 <+94%2071%20914%203658>
[image: http://wso2.com/signature] <http://wso2.com/signature>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to