Bug 714158 - Provide default config for NitrateKerbXmlrpc
Provide default config for NitrateKerbXmlrpc
Product: TCMS
Classification: Other
Component: Application (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Yuguang Wang
: Patch, TestOnly
Depends On:
Blocks: 593666
  Show dependency treegraph
Reported: 2011-06-17 09:36 EDT by Petr Šplíchal
Modified: 2016-05-31 21:42 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-05-25 04:01:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch implementig user config for NitrateKerbXmlrpc (2.32 KB, patch)
2011-06-17 09:36 EDT, Petr Šplíchal
no flags Details | Diff

  None (edit)
Description Petr Šplíchal 2011-06-17 09:36:39 EDT
Created attachment 505275 [details]
Patch implementig user config for NitrateKerbXmlrpc

Description of problem:

It would be nice if the python driver read the Nitrate server url
from user config file so that it does not have to be hard-coded in
respective scripts. I suggest to use ~/.nitrate in user home dir.

The resulting code could look like this:

    from nitrate import NitrateKerbXmlrpc
    n = nitrate.NitrateKerbXmlrpc()

The config file would look like this:

    url = https://tcms.engineering.redhat.com/xmlrpc/

Attaching patch for the desired functionality.
Comment 1 Yuguang Wang 2011-06-20 22:30:29 EDT
Hey Petr,

Adding config file is more convenient, will consider this.
Thanks for your patch.
BTW, feel free to customize your nitrate.py to meet your needs for now :)
Comment 2 Petr Šplíchal 2011-06-21 02:30:04 EDT
Thanks for considering the patch. I think the best approach here
would be to make it work fine for both krb and non-krb auth. The
user would do just general

    connection = NitrateXmlrpc()

and based on the user configuration krb/basic auth method would be
automatically chosen.

Note You need to log in before you can comment on or make changes to this bug.