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

getKVMsEnvironment method has a defect #9

Open
rohanakar opened this issue Sep 1, 2021 · 1 comment
Open

getKVMsEnvironment method has a defect #9

rohanakar opened this issue Sep 1, 2021 · 1 comment

Comments

@rohanakar
Copy link

rohanakar commented Sep 1, 2021

/lib/apigee-sdk-mgmt-api.js method getKVMsEnvironment() makes this call =>
curl -X GET undefined/v1/organizations/undefined/environments/dev1/keyvaluemaps

as the variable apigee_profile passed to this function is of the form =>
/{'test' : {url_mgmt : 'https://api.enterprise.apigee.com', org : grunt.option('org'), env : grunt.option('env'), username : grunt.option('username'), password : grunt.option('password')}, env : grunt.option('env')},/

The variables accesed in this function are at wrong level based on the request object.
trying to access apigee_profile[url_mgmt] instead of apigee_profile['test']['url_mgmt']

Please change
var apigeel = apigee_profile ;
to
var apigeel = apigee_profiles[apigee_profiles.env];

@rohanakar
Copy link
Author

There was a PR closed for this issue. There the user has created wrong configuration file.
This piece of code is used in https://github.com/grunt-apigee/grunt-apigee-kvm/blob/master/tasks/apigee_kvm.js .

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

No branches or pull requests

1 participant