grunt-apigee / grunt-apigee-kvm-export

Exports Apigee Edge KVM entries to a directory.
MIT License
0 stars 1 forks source link

Error encountered required property #1

Open denz96 opened 9 years ago

denz96 commented 9 years ago

Hi I'm new to grunt and I am trying to run this plugin and encountering this error. Can you please help me understand what's wrong here? It seems that my org is added by "apigee_kvm_export." Running "apigee_kvm_export:denz237" (apigee_kvm_export) task Verifying property apigee_kvm_export.denz237 exists in config...ERROR

Unable to process task. Warning: Required config property "apigee_kvm_export.denz237" missing. Use --for ce to continue. Error: Required config property "apigee_kvm_export.denz237" missing. at Object.util.error (C:\Users\Videos\grunt-apigee-kvm-export -master\node_modules\grunt\node_modules\grunt-legacy-util\index.js:54:39) at Object.config.requires as requiresConfig at Object. (C:\Users\Videos\grunt-apigee-kvm-expor t-master\node_modules\grunt\lib\grunt\task.js:234:10) at Object.thisTask.fn (C:\Users\Videos\grunt-apigee-kvm-expor t-master\node_modules\grunt\lib\grunt\task.js:82:16) at Object. (C:\Users\Videos\grunt-apigee-kvm-expor t-master\node_modules\grunt\lib\util\task.js:301:30) at Task.runTaskFn (C:\Users\Videos\grunt-apigee-kvm-export-ma ster\node_modules\grunt\lib\util\task.js:251:24) at Task. (C:\Users\Videos\grunt-apigee-kvm-export- master\node_modules\grunt\lib\util\task.js:300:12) at C:\Users\Videos\grunt-apigee-kvm-export-master\node_module s\grunt\lib\util\task.js:227:11 at process._tickDomainCallback (node.js:381:11) at Function.Module.runMain (module.js:503:11)

Aborted due to warnings.

dzuluaga commented 9 years ago

Hi there,

Did you try configuring the entries specified here? Your entries should match you org and env configurations.

https://www.npmjs.com/package/grunt-apigee-kvm-export#usage-examples

Regards, Diego

Diego Zuluaga | Customer Success | apigee | m: +1.415.299.9983 | Apigee Community for answers, ideas and support! On Jul 14, 2015 11:59 PM, "denz96" notifications@github.com wrote:

Hi I'm new to grunt and I am trying to run this plugin and encountering this error. Can you please help me understand what's wrong here? Running "apigee_kvm_export:denz237" (apigee_kvm_export) task Verifying property apigee_kvm_export.denz237 exists in config...ERROR

Unable to process task. Warning: Required config property "apigee_kvm_export.denz237" missing. Use --for ce to continue. Error: Required config property "apigee_kvm_export.denz237" missing. at Object.util.error (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-export -master\node_modules\grunt\node_modules\grunt-legacy-util\index.js:54:39) at Object.config.requires as requiresConfig at Object. (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-expor t-master\node_modules\grunt\lib\grunt\task.js:234:10) at Object.thisTask.fn (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-expor t-master\node_modules\grunt\lib\grunt\task.js:82:16) at Object. (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-expor t-master\node_modules\grunt\lib\util\task.js:301:30) at Task.runTaskFn (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-export-ma ster\node_modules\grunt\lib\util\task.js:251:24) at Task. (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-export- master\node_modules\grunt\lib\util\task.js:300:12) at C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-export-master\node_module s\grunt\lib\util\task.js:227:11 at process._tickDomainCallback (node.js:381:11) at Function.Module.runMain (module.js:503:11)

Aborted due to warnings.

— Reply to this email directly or view it on GitHub https://github.com/grunt-apigee/grunt-apigee-kvm-export/issues/1.

denz96 commented 9 years ago

Hi Diego,

       You mean by entries, are the org and env in the apigee config file?

Yes, I have modified those same in my account. Actually, I tried the import kvm script and it was successful with same entries in apigee config.

Thanks, Dennis

On Wed, Jul 15, 2015 at 7:08 PM, Diego Zuluaga notifications@github.com wrote:

Hi there,

Did you try configuring the entries specified here? Your entries should match you org and env configurations.

https://www.npmjs.com/package/grunt-apigee-kvm-export#usage-examples

Regards, Diego

Diego Zuluaga | Customer Success | apigee | m: +1.415.299.9983 | Apigee Community for answers, ideas and support! On Jul 14, 2015 11:59 PM, "denz96" notifications@github.com wrote:

Hi I'm new to grunt and I am trying to run this plugin and encountering this error. Can you please help me understand what's wrong here? Running "apigee_kvm_export:denz237" (apigee_kvm_export) task Verifying property apigee_kvm_export.denz237 exists in config...ERROR

Unable to process task. Warning: Required config property "apigee_kvm_export.denz237" missing. Use --for ce to continue. Error: Required config property "apigee_kvm_export.denz237" missing. at Object.util.error (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-export -master\node_modules\grunt\node_modules\grunt-legacy-util\index.js:54:39) at Object.config.requires as requiresConfig at Object. (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-expor t-master\node_modules\grunt\lib\grunt\task.js:234:10) at Object.thisTask.fn (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-expor t-master\node_modules\grunt\lib\grunt\task.js:82:16) at Object. (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-expor t-master\node_modules\grunt\lib\util\task.js:301:30) at Task.runTaskFn (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-export-ma ster\node_modules\grunt\lib\util\task.js:251:24) at Task. (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-export- master\node_modules\grunt\lib\util\task.js:300:12) at C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-export-master\node_module s\grunt\lib\util\task.js:227:11 at process._tickDomainCallback (node.js:381:11) at Function.Module.runMain (module.js:503:11)

Aborted due to warnings.

— Reply to this email directly or view it on GitHub https://github.com/grunt-apigee/grunt-apigee-kvm-export/issues/1.

— Reply to this email directly or view it on GitHub https://github.com/grunt-apigee/grunt-apigee-kvm-export/issues/1#issuecomment-121620087 .

dzuluaga commented 9 years ago

Yes. Depending on what you're trying to export. Can you please email it to me?

dzuluaga@apigee.com

Diego Zuluaga | Customer Success | apigee | m: +1.415.299.9983 | Apigee Community for answers, ideas and support! On Jul 15, 2015 10:19 AM, "denz96" notifications@github.com wrote:

Hi Diego,

You mean by entity the ord and env in the apigee config file? Yes, I have modified those same in my account. denz237 is my org. Thanks, Dennis

On Wed, Jul 15, 2015 at 7:08 PM, Diego Zuluaga notifications@github.com wrote:

Hi there,

Did you try configuring the entries specified here? Your entries should match you org and env configurations.

https://www.npmjs.com/package/grunt-apigee-kvm-export#usage-examples

Regards, Diego

Diego Zuluaga | Customer Success | apigee | m: +1.415.299.9983 | Apigee Community for answers, ideas and support! On Jul 14, 2015 11:59 PM, "denz96" notifications@github.com wrote:

Hi I'm new to grunt and I am trying to run this plugin and encountering this error. Can you please help me understand what's wrong here? Running "apigee_kvm_export:denz237" (apigee_kvm_export) task Verifying property apigee_kvm_export.denz237 exists in config...ERROR

Unable to process task. Warning: Required config property "apigee_kvm_export.denz237" missing. Use --for ce to continue. Error: Required config property "apigee_kvm_export.denz237" missing. at Object.util.error (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-export

-master\node_modules\grunt\node_modules\grunt-legacy-util\index.js:54:39) at Object.config.requires as requiresConfig at Object. (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-expor t-master\node_modules\grunt\lib\grunt\task.js:234:10) at Object.thisTask.fn (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-expor t-master\node_modules\grunt\lib\grunt\task.js:82:16) at Object. (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-expor t-master\node_modules\grunt\lib\util\task.js:301:30) at Task.runTaskFn (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-export-ma ster\node_modules\grunt\lib\util\task.js:251:24) at Task. (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-export- master\node_modules\grunt\lib\util\task.js:300:12) at

C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-export-master\node_module s\grunt\lib\util\task.js:227:11 at process._tickDomainCallback (node.js:381:11) at Function.Module.runMain (module.js:503:11)

Aborted due to warnings.

— Reply to this email directly or view it on GitHub https://github.com/grunt-apigee/grunt-apigee-kvm-export/issues/1.

— Reply to this email directly or view it on GitHub < https://github.com/grunt-apigee/grunt-apigee-kvm-export/issues/1#issuecomment-121620087

.

— Reply to this email directly or view it on GitHub https://github.com/grunt-apigee/grunt-apigee-kvm-export/issues/1#issuecomment-121684825 .

denz96 commented 9 years ago

Hi,

Here's the step I did. I imported the KVM using import kvm sample, then

I run the apigee_kvm_export with changes in the org name and env name. I see this in apiproxy is it necessary? exports.profiles = function(grunt){ return { env : grunt.option('env'), // replace with environment 'test' : { apiproxy : 'forecastweather-grunt-plugin-api', org : 'denz237', // replace with organization env : 'test', // replace with environment url_mgmt : 'https://api.enterprise.apigee.com', // for cloud environments, leave as is username : grunt.option('username'), //|| process.env.ae_username, // pass credentials as arguments as grunt task --username=$ae_username --password=$ae_password password : grunt.option('password'), //|| process.env.ae_password, // use ae_username and ae_password are defined as environment variables and no arguments are passed revision : grunt.option('revision'), // provide revision to be undeployed by passing argument as --revision=X override : grunt.option('override') || true, delay : grunt.option('delay') || 10 },

{ "keyValueMap": [ { "entry": [ { "name": "dzuluaga+testoauth@apigee.com", "value": "b002625528157aeb315c91f3ae74cad9e5708af8:Q5ENLG2CoLQvyfSo4FQyRjQa4TEST" } ], "name": "passwords" }, { "entry": [ { "name": "Key1", "value": "value_one-test" }, { "name": "Key2", "value": "value_two-test" } ], "name": "targets4" } ]}

On Wed, Jul 15, 2015 at 11:52 PM, Diego Zuluaga notifications@github.com wrote:

Yes. Depending on what you're trying to export. Can you please email it to me?

dzuluaga@apigee.com

Diego Zuluaga | Customer Success | apigee | m: +1.415.299.9983 | Apigee Community for answers, ideas and support! On Jul 15, 2015 10:19 AM, "denz96" notifications@github.com wrote:

Hi Diego,

You mean by entity the ord and env in the apigee config file? Yes, I have modified those same in my account. denz237 is my org. Thanks, Dennis

On Wed, Jul 15, 2015 at 7:08 PM, Diego Zuluaga <notifications@github.com

wrote:

Hi there,

Did you try configuring the entries specified here? Your entries should match you org and env configurations.

https://www.npmjs.com/package/grunt-apigee-kvm-export#usage-examples

Regards, Diego

Diego Zuluaga | Customer Success | apigee | m: +1.415.299.9983 | Apigee Community for answers, ideas and support! On Jul 14, 2015 11:59 PM, "denz96" notifications@github.com wrote:

Hi I'm new to grunt and I am trying to run this plugin and encountering this error. Can you please help me understand what's wrong here? Running "apigee_kvm_export:denz237" (apigee_kvm_export) task Verifying property apigee_kvm_export.denz237 exists in config...ERROR

Unable to process task. Warning: Required config property "apigee_kvm_export.denz237" missing. Use --for ce to continue. Error: Required config property "apigee_kvm_export.denz237" missing. at Object.util.error (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-export

-master\node_modules\grunt\node_modules\grunt-legacy-util\index.js:54:39) at Object.config.requires as requiresConfig at Object. (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-expor t-master\node_modules\grunt\lib\grunt\task.js:234:10) at Object.thisTask.fn (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-expor t-master\node_modules\grunt\lib\grunt\task.js:82:16) at Object. (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-expor t-master\node_modules\grunt\lib\util\task.js:301:30) at Task.runTaskFn (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-export-ma ster\node_modules\grunt\lib\util\task.js:251:24) at Task. (C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-export- master\node_modules\grunt\lib\util\task.js:300:12) at

C:\Users\dennis.c.dolfo\Videos\grunt-apigee-kvm-export-master\node_module s\grunt\lib\util\task.js:227:11 at process._tickDomainCallback (node.js:381:11) at Function.Module.runMain (module.js:503:11)

Aborted due to warnings.

— Reply to this email directly or view it on GitHub https://github.com/grunt-apigee/grunt-apigee-kvm-export/issues/1.

— Reply to this email directly or view it on GitHub <

https://github.com/grunt-apigee/grunt-apigee-kvm-export/issues/1#issuecomment-121620087

.

— Reply to this email directly or view it on GitHub < https://github.com/grunt-apigee/grunt-apigee-kvm-export/issues/1#issuecomment-121684825

.

— Reply to this email directly or view it on GitHub https://github.com/grunt-apigee/grunt-apigee-kvm-export/issues/1#issuecomment-121703456 .

denz96 commented 9 years ago

apigee_kvmexport: { "testmyapi" : { <--- do I have to change this to my org name? options: { type: "org", dest: 'config/kvm/testmyapi', match: /^(passwords|targets)$/ // exports all KVMs by default or /(.?)$/ } }, "testmyapi-prod" : {<--- do I have to change this to my org name? options: { type: "env", dest: 'config/kvm/testmyapi/testmyapi-prod', match: /^(passwords|targets)$/ // exports all KVMs by default or /(._?)$/ } }, "testmyapi-test" : {<--- do I have to change this to my org name? options: { type: "env", dest: 'config/kvm/testmyapi/testmyapi-test', match: /^(passwords|targets)$/ // exports all KVMs by default or /(.*?)$/ } }

dzuluaga commented 9 years ago

Yes. You got it.

On Wed, Jul 15, 2015 at 1:03 PM, denz96 notifications@github.com wrote:

apigee_kvm_export: { "testmyapi" : { <--- do I have to change this to my org name? options: { type: "org", dest: 'config/kvm/testmyapi', match: /^(passwords|targets)$/ // exports all KVMs by default or /(.

?)$/ } }, "testmyapi-prod" : {<--- do I have to change this to my org name? options: { type: "env", dest: 'config/kvm/testmyapi/testmyapi-prod', match: /^(passwords|targets)$/ // exports all KVMs by default or /(.?)$/ } }, "testmyapi-test" : {<--- do I have to change this to my org name? options: { type: "env", dest: 'config/kvm/testmyapi/testmyapi-test', match: /^(passwords|targets)$/ // exports all KVMs by default or /(.*?)$/ } }

— Reply to this email directly or view it on GitHub https://github.com/grunt-apigee/grunt-apigee-kvm-export/issues/1#issuecomment-121730285 .

Diego Zuluaga | apigee http://www.apigee.com/ | m: +1.415.299.9983 | twitter @dzuluaga http://twitter.com/dzuluaga @apigee https://twitter.com/apigee | skype dzuluaga | Apigee Community http://community.apigee.com/ for answers, ideas and support! [image: http://iloveapis.com/] http://iloveapis.com/ "First do it, then do it right, then do it better - this is my mantra for successfully getting things done. It's all about the iteration." Addy Osmani https://twitter.com/addyosmani/status/314785735171518464

denz96 commented 9 years ago

when I changed the testmyapi, testmyapi-prod I encountered this error Running "apigee_kvm_export:denz237" (apigee_kvm_export) task Warning: undefined is not a function Use --force to continue.

dzuluaga commented 9 years ago

Good catch. I've just fixed it (apigee-sdk-mgmt-sdk module). Please reinstall it grunt plug-in. Thanks.

On Wed, Jul 15, 2015 at 8:37 PM, denz96 notifications@github.com wrote:

when I changed the testmyapi, testmyapi-prod I encountered this error Running "apigee_kvm_export:denz237" (apigee_kvm_export) task Warning: undefined is not a function Use --force to continue.

— Reply to this email directly or view it on GitHub https://github.com/grunt-apigee/grunt-apigee-kvm-export/issues/1#issuecomment-121817774 .

Diego Zuluaga | apigee http://www.apigee.com/ | m: +1.415.299.9983 | twitter @dzuluaga http://twitter.com/dzuluaga @apigee https://twitter.com/apigee | skype dzuluaga | Apigee Community http://community.apigee.com/ for answers, ideas and support! [image: http://iloveapis.com/] http://iloveapis.com/ "First do it, then do it right, then do it better - this is my mantra for successfully getting things done. It's all about the iteration." Addy Osmani https://twitter.com/addyosmani/status/314785735171518464

denz96 commented 9 years ago

Thanks dzuluaga for fixing the code it will be a great help plugin

denz96 commented 9 years ago

btw, can you share what's the error in the sdk?

dzuluaga commented 9 years ago

Just so you know there's an article in Apigee Community of something related to KVM and Grunt. https://community.apigee.com/articles/3424/how-to-safely-store-and-import-passwords-in-source.html

The error was happening because the plug-in was using an old version of the SDK. getKVMList function https://github.com/dzuluaga/apigee-sdk-mgmt-api/blob/master/lib/apigee-sdk-mgmt-api.js#L283-L293 was missing.

Feel free to post these questions on the community.

On Wed, Jul 15, 2015 at 10:25 PM, denz96 notifications@github.com wrote:

btw, can you share what's the error in the sdk?

— Reply to this email directly or view it on GitHub https://github.com/grunt-apigee/grunt-apigee-kvm-export/issues/1#issuecomment-121833465 .

Diego Zuluaga | apigee http://www.apigee.com/ | m: +1.415.299.9983 | twitter @dzuluaga http://twitter.com/dzuluaga @apigee https://twitter.com/apigee | skype dzuluaga | Apigee Community http://community.apigee.com/ for answers, ideas and support! [image: http://iloveapis.com/] http://iloveapis.com/ "First do it, then do it right, then do it better - this is my mantra for successfully getting things done. It's all about the iteration." Addy Osmani https://twitter.com/addyosmani/status/314785735171518464

denz96 commented 9 years ago

thanks for sharing dzuluaga!

denz96 commented 9 years ago

Hi, I got it working both the import and export, I'm currently trying to merge the import and export, what I'm trying to achieve is export KVMs from test then import to prod for now (but main goal is to transfer those also to another org).Is it possible to change the env config from test to prod when importing the KVMs?

dzuluaga commented 9 years ago

Yes. It's doable. Do you mind posting this question on Apigee Community? Our interaction is very valuable to more users with similar questions.

Regards, Diego

Diego Zuluaga | Customer Success | apigee | m: +1.415.299.9983 | Apigee Community for answers, ideas and support! On Jul 17, 2015 3:14 AM, "denz96" notifications@github.com wrote:

Hi, I got it working both the import and export, I'm currently trying to merge the import and export, what I'm trying to achieve is export KVMs from test then import to prod for now (but main goal is to transfer those also to another org).Is it possible to change the env config from test to prod when importing the KVMs?

— Reply to this email directly or view it on GitHub https://github.com/grunt-apigee/grunt-apigee-kvm-export/issues/1#issuecomment-122200468 .

denz96 commented 9 years ago

sure!