david-caro / python-foreman

Small low level python wrapper around Foreman API
GNU General Public License v2.0
57 stars 37 forks source link

/api/template/import breaks python-foreman #84

Closed Ntr0 closed 7 years ago

Ntr0 commented 7 years ago

MethodApiDescription.generatefunc tries to generate a method "import" which leads to a syntax error. This could be fixed by renaming the function to "import" in "MethodApiDescription._get_name" method.

Ntr0 commented 7 years ago

I just realized that this is a duplicate of #77

david-caro commented 7 years ago

Yep :), there I was waiting for the api definition too, if you can pass it we can solve both at the same time.

Ntr0 commented 7 years ago

Here it is. The API def is from foreman R1.15_RC2 & Katello R3.4 RC2 with some required & additional plugins.

foreman_1.15_rc2.json.tar.gz

Ntr0 commented 7 years ago

Previous json was direct dump from foreman/apidoc. Here the tar gz from python-foreman cache. Contains other foreman development versions as well. As stated above, katello is always integrated, as well as other plugins.

foreman_1.14_1.15_api_def.tar.gz

Ntr0 commented 7 years ago

@david-caro Please tell me, if you want the api defs from python-cache in the pull request itself. I'm not sure about this, since the definitons contain endpoints from various optional plugins like katello, discovery etc. But if thats ok, I can add this easily.

david-caro commented 7 years ago

The issue is that they are quite big by themselves, so I don't think that it's nice to add them to the packaged, but we can try to add something minimal that reproduces the issue to a test in order to avoid regression, I did not have time to add it myself yet, probably during the weekend, but if you have some time I'll really appreciate it :)

Ntr0 commented 7 years ago

So, finally here it is. Foreman vanilla R1.15.0-v1 Rest API doc.

foreman_1.15.0-v1.tar.gz

Ntr0 commented 7 years ago

Bump