Bug 714158

Summary: Provide default config for NitrateKerbXmlrpc
Product: [Other] TCMS Reporter: Petr Šplíchal <psplicha>
Component: ApplicationAssignee: Yuguang Wang <yuwang>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.4.1CC: ctang, junzhang, jzhao, llim, nli, ohudlick, vchen
Target Milestone: ---Keywords: Patch, TestOnly
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-25 08:01:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 593666    
Attachments:
Description Flags
Patch implementig user config for NitrateKerbXmlrpc none

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.