Bug 714158 - Provide default config for NitrateKerbXmlrpc
Summary: Provide default config for NitrateKerbXmlrpc
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: TCMS
Classification: Other
Component: Application
Version: 3.4.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Yuguang Wang
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks: 593666
TreeView+ depends on / blocked
 
Reported: 2011-06-17 13:36 UTC by Petr Šplíchal
Modified: 2016-06-01 01:42 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-05-25 08:01:06 UTC
Embargoed:


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

Description Petr Šplíchal 2011-06-17 13:36:39 UTC
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:

    [nitrate]
    url = https://tcms.engineering.redhat.com/xmlrpc/

Attaching patch for the desired functionality.

Comment 1 Yuguang Wang 2011-06-21 02:30:29 UTC
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 06:30:04 UTC
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.