GithubHelp home page GithubHelp logo

dixudx / rtcclient Goto Github PK

View Code? Open in Web Editor NEW
36.0 10.0 43.0 587 KB

RTCClient for Rational Team Concert

Home Page: https://readthedocs.org/projects/rtcclient/

License: Apache License 2.0

Python 100.00%
rtc python python-library rational-team-concert

rtcclient's Introduction

rtcclient

image

image

image

image

image

A Python-based Client/API for Rational Team Concert (RTC)

About this library

IBM® Rational Team Concert™, is built on the Jazz platform, allowing application development teams to use one tool to plan across teams, code, run standups, plan sprints, and track work. For more info, please refer to here.

IMPORTANT NOTE: This is NOT an official-released Python-based RTC Client.

This library can help you:

  • Interacts with an RTC server to retrieve objects which contain the detailed information/configuration, including Project Areas, Team Areas, Workitems and etc;
  • Creates all kinds of Workitems through self-customized templates or copies from some existing Workitems;
  • Performs some actions on the retrieved Workitems, including get/add Comments, get/add/remove Subscribers/Children/Parent, get/upload Attachments and etc;
  • Query Workitems using specified filtered rules or directly from your saved queries;
  • Logs all the activities and messages during your operation;

Python & Rational Team Concert Versions

This project has been tested against multiple Python versions, such as "3.7", "3.8", "3.9", "3.10" and "3.11".

Please install rtcclient with version >= 0.9.0, which works well with Rational Team Concert 6.0.6.1, 5.0.1, 5.0.2 and ELM 7.0.

Support and bug-reports: https://github.com/dixudx/rtcclient/issues?q=is%3Aopen+sort%3Acomments-desc

Project source code: https://github.com/dixudx/rtcclient

Project documentation: https://readthedocs.org/projects/rtcclient/

Installation

To install rtcclient, simply:

$ pip install rtcclient

Example

RTCClient is intended to map the objects in RTC (e.g. Project Areas, Team Areas, Workitems) into easily managed Python objects:

>>> from rtcclient.utils import setup_basic_logging
>>> from rtcclient import RTCClient
# you can remove this if you don't need logging
# default debug logging for console output
>>> setup_basic_logging()
# url ends with jazz
>>> url = "https://your_domain:9443/jazz"
>>> username = "your_username"
>>> password = "your_password"
# If your rtc server is behind a proxy, remember to set "proxies" explicitly.
# If your url ends with ccm, set ends_with_jazz to False.
# Please refer to issue #68 for detailed explanation
# If your rtc server is too old (such as Rational Team Concert 5.0.1, 5.0.2), please set old_rtc_authentication to True
>>> myclient = RTCClient(url, username, password, ends_with_jazz=True, old_rtc_authentication=False)
# it will be faster if returned properties is specified
# see in below query example
>>> wk = myclient.getWorkitem(123456) # get a workitem whose id is 123456
# get all workitems
# If both projectarea_id and projectarea_name are None, all the workitems
# in all ProjectAreas will be returned
>>> workitems_list = myclient.getWorkitems(projectarea_id=None,
                                           projectarea_name=None)
>>> myquery = myclient.query # query class
>>> projectarea_name = "your_projectarea_name"
# customize your query string
# below query string means: query all the workitems with title "use case 1"
>>> myquerystr = 'dc:title="use case 1"'
# specify the returned properties: title, id, state, owner
# This is optional. All properties will be returned if not specified
>>> returned_prop = "dc:title,dc:identifier,rtc_cm:state,rtc_cm:ownedBy"
>>> queried_wis = myquery.queryWorkitems(query_str=myquerystr,
                                         projectarea_name=projectarea_name,
                                         returned_properties=returned_prop)

Testing

Using a virtualenv is recommended. Setuptools will automatically fetch missing test dependencies.

If you have installed the tox on your system already, you can run the tests using pytest with the following command:

virtualenv
source .venv/bin/active
(venv) tox -e test
(venv) tox -e flake
(venv) tox -e pycodestyle

Testing with Poetry

When using poetry , all dependencies and test environment are managed by this tool even when using tox.

If you have already globally installed poetry on your system, you can run the tests using pytest with the following command:

poetry install --with devel
poetry run tox -e test
poetry run tox -e flake
poetry run tox -e pycodestyle

rtcclient's People

Contributors

casabre avatar dependabot[bot] avatar dixudx avatar feliperuhland avatar gpongelli avatar ojima-ryou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rtcclient's Issues

RTCClient: Failed POST request at authenticated/j_security_check with response: Error 404: Not Found

@dixudx !
I am implementing integration with RTC v6.0.5 for my Python Flask app.

Problem is that POST request generated by the package fails (complete log):

2018-04-17 12:31:16,513 DEBUG client.RTCClient: Get response from https://host/jazz/authenticated/identity
2018-04-17 12:31:16,522 DEBUG urllib3.connectionpool: Starting new HTTPS connection (1): host
2018-04-17 12:31:17,365 DEBUG urllib3.connectionpool: https://host:443 "GET /jazz/authenticated/identity HTTP/1.1" 302 0
2018-04-17 12:31:17,533 DEBUG urllib3.connectionpool: https://host:443 "GET /jazz/auth/authrequired HTTP/1.1" 200 None
2018-04-17 12:37:02,332 DEBUG client.RTCClient: Post a request to https://host/jazz/authenticated/j_security_check with data: j_username=username%40us.ibm.com&j_password=password and json: None
2018-04-17 12:37:02,335 DEBUG urllib3.connectionpool: Starting new HTTPS connection (1): host
2018-04-17 12:37:03,339 DEBUG urllib3.connectionpool: https://host:443 "POST /jazz/authenticated/j_security_check HTTP/1.1" 302 0
2018-04-17 12:37:03,582 DEBUG urllib3.connectionpool: https://host:443 "GET /jazz/authenticated/ HTTP/1.1" 404 None
2018-04-17 12:37:03,585 ERROR client.RTCClient: Failed POST request at https://host/jazz/authenticated/j_security_check with response: Error 404: Not Found

Any suggestion please? Can it be that in RTC 6.0.5 another endpoint than '/authenticated/j_security_check' to be used?

Create Workitem - HTTP 500

Hi dixudx,

Thanks for this project. You already helped me a lot. The last piece that is currently not working for me is creating RTC workitems.

It results in a HTTP 500 error:

End of log (HTTP error 500):
DEBUG requests.packages.urllib3.connectionpool: https://rtchost:443 "POST /ccm/oslc/contexts/_qi848CJaEeSy9NmiE0zU4Q/workitems/task HTTP/1.1" 500 184
ERROR client.RTCClient: Failed POST request at <https://rtchost/ccm/oslc/contexts/_qi848CJaEeSy9NmiE0zU4Q/workitems/task> with response: <?xml version="1.0" encoding="UTF-8"?><oslc_cm:error xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/">
<oslc_cm:status>500</oslc_cm:status>
<oslc_cm:message/>
</oslc_cm:error>

Trying to access .../shapes/workitems/task manually results in the following. I think the OSLC format of the workitem creation is no longer supported. Is this possible?

<oslc_cm:error>
<oslc_cm:status>406</oslc_cm:status>
<oslc_cm:message>**OSLC Version '1.0' is not supported.**</oslc_cm:message>
</oslc_cm:error>

Status 400 when trying to add comment to WorkItem with Jazz 6.0.4

Hi @dixudx,

I'm currently seeing the following error when trying to create comments to "some" Tasks. "Some" because it's working for some tasks and for others it's never working. I try to reproduce it.

Error output:

<oslc_cm:error xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/">
<oslc_cm:status>400</oslc_cm:status>
<oslc_cm:message>Not a comment identifier: oslc:comment</oslc_cm:message>
</oslc_cm:error>

failed to install rtcclient with conda

I tried
conda install rtcclient
but got the below error

PackageNotFoundError: Package missing in current win-64 channels:
  - rtcclient

my question is, how to add it to the channels list of anaconda.org

PS:I don't think this is a bug, it's just a missing feature I guess and due to the lack of community I have posted this here.

No Authentication Exception Raised and Client Session Expired

During my experiment, I just found one issue,

  1. I found when I entered a wrong password, actually it does not raise an Authentication failed exception , but a TypeError, maybe this should be changed.

  2. Another is about if could add a new feature to decide is a client session is available or not, or reload this client session when it is unavailable.

How do I query RTC work items with a time range?

I am trying to use the RTC python API ( https://pypi.python.org/pypi/rtcclient/0.2.0 ) to query workitems that have been created within a certain time frame (i.e between July 1 and Jan 1).

I am using the queryWorkitems call and the property dc:created to do that but not having much luck with the format / syntax for a range.

This is what I am trying to do and it fails with a - TypeError: 'NoneType' object is not iterable

query_string = ('dc:created>="07-01-2015T01:00:00Z" and dc:created<"01-01-2016T01:00:00Z"')

I have tried reversing the > and < and didn't have much luck either

turning on debug shows - INFO query:Query: Start to query workitems with query string: dc:created>="07-01-2015T01:00:00Z" and dc:created<"01-01-2016T01:00:00Z"

I am able to get data for

query_string = ('dc:created>="07-01-2015T01:00:00Z"')

and also this works

query_string = ('dc:created>="07-01-2015T01:00:00Z" and dc:type="defect"')

Any help would be greatly appreciated.

addChild fails for newly created Workitem

Calling

wi = client.createWorkitem(...)
wi.addChild(123456)

fails in workitem.py:611 due to self.getChildren(...) (Line 610) returning None and for ... in ... raising

cur_child_ids = [cur_child.identifier for cur_child in cur_children]
TypeError: 'NoneType' object is not iterable

How do I determine the string to use in a search by state?

If I look at the resource definition of one of the workitem I can want to find in a search by state I can see the state is:

<rtc_cm:state rdf:resource="https://HOST:PORT/ccm/oslc/workflows/_QkWKkBrqEeOPqO0PvYSycg/states/com.ibm.team.workitem.defectWorkflow/3"/>

In the documentation it states that to search by state you should do something like:

query_str = ('dc:type="defect" and ''rtc_cm:state!="default_workflow.state.s1" and ''dc:subject="bvt"')

How do I convert from what I see in the resource I am trying to find into what I should be entering in my query? I have tried all kinds of variants of something.state.somethingElse that I can think of based on the rdf value, none of which return any result.

Is there a way I can get the state object of something I retrieve using this client library and call getStringId() or somesuch to work backwards from having the state object to getting the string ID I need to use in a query perhaps?

OwnedBy attribute is not set if keep=True

Hi @dixudx,

I'm currently working with the latest changes to RTCClient and I see the following behaviour. When creating a task with keep=True and ownedBy="[email protected]" the ownedBy attribute is passed to temp.render (template.py:141) but in the resulting raw_wi the ownedBy is set to the one of the copied_wi.

Do I misunderstand the keep attribute and this behaviour is intended?

Disable xmltodict.parse for File Contents/non-XML-responses?

utils.py:29 is raising an ExpatError for correct content retrieved by fetchBeforeStateFile (of a Change).

  File "[...]rtcclient\models.py", line 248, in fetchBeforeStateFile
    return self._fetchFile(self.before, file_folder, override=False)
  File "[...]rtcclient\models.py", line 298, in _fetchFile
    headers=self.rtc_obj.headers)
  File "[...]rtcclient\utils.py", line 44, in wrapper
    raise ExpatError(excp)
xml.parsers.expat.ExpatError: syntax error: line 1, column 0

PlannedFor lookup is limited to the first 1000 iterations

Hi @dixudx,

I'm seeing the following behaviour in Jazz 6.0.3.

With an example server containing 2738 iterations the lookup of the iterations in _getPlannedFors will only return the first 1000 iterations and thus resulting in an error if creating an WorkItem of a newer iteration.

This happens because the first request results in:

<oslc_cm:Collection oslc_cm:next="jazzhost.com/ccm/oslc/iterations?oslc_cm.pageSize=100&_resultToken=_IS2hQHgeEee2bfthPc5aiA&_startIndex=100" oslc_cm:totalCount="2738">

But following the next link the totalCount has changed and thus limiting the logic in client.py:1410 to the first 1000 iterations.

<oslc_cm:Collection oslc_cm:next="jazzhost.com/ccm/oslc/iterations?oslc_cm.pageSize=100&_resultToken=_IS2hQHgeEee2bfthPc5aiA&_startIndex=200" oslc_cm:previous="jazzhost.com/ccm/oslc/iterations?oslc_cm.pageSize=100&_resultToken=_IS2hQHgeEee2bfthPc5aiA&_startIndex=0" oslc_cm:totalCount="1000">

I'm experimenting on how to avoid this limit.

Problems with getProjectArea

Traceback (most recent call last): File "path", line 41, in <module> myclient.getProjectArea(projectarea_name, archived=False, returned_properties=None) File "path", line 183, in getProjectArea projectarea_name=projectarea_name) File "path", line 212, in _getProjectAreas filter_rule=filter_rule) File "path", line 1371, in _get_paged_resources entries = (raw_data.get("oslc_cm:Collection") AttributeError: 'NoneType' object has no attribute 'get'

Do you know what may be the cause of this problem, when I want to use :
myclient = RTCClient(url, username, password,ends_with_jazz=True) myclient.getProjectArea(projectarea_name, archived=False, returned_properties=None)

Time spent

Is there a facility to add time spent to a work item?

We use this alot in our company and I would like to have this facility.

Ability to manage members in project/team area?

Looking at the project_area.py code, unless I'm mistaken there is only read access to the members list via this library right now? I'm interested in the possibility of automating the management of project/team members, I was wondering if this is something you had already looked at/considered the faesability of?

Create workitem of type 'Epic' - HTTP 404

Hi @dixudx

When trying to create a workitem with a task_type of 'Epic' the task_type will be found by projectarea.getItemType(item_type) but on creation it will report:

requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://<jazzhost>/ccm/oslc/contexts/_qi848CJaEeSy9NmiE0zU4Q/workitems/com.ibm.team.apt.workitemtype.epic

In the log it's visible as:

<oslc_cm:status>404</oslc_cm:status>
<oslc_cm:message>Not found: com.ibm.team.apt.workitemtype.epic</oslc_cm:message>
</oslc_cm:error>

Properties with "." in the name are not accessible

Due to the check for dots in the name of a property at below code location, properties that have one or more dots in its name are not accessible to users of the library.

rtcclient/rtcclient/base.py

Lines 267 to 273 in 1721dd0

attr_list = attr.split(".")
# ignore long attributes
if len(attr_list) > 1:
# attr = "_".join([attr_list[-2],
# attr_list[-1]])
continue

I wonder if this by intention or if this is a bug? I ran into this issue because story points are stored in a property called com.ibm.team.apt.attribute.complexity and I wasn't able to find it using rtcclient even though it was visible in the raw response from RTC.

Once I comment out this code location I can access the story points.

Authentication not working for bad login in 6.0.3

We are running RTC 6.0.3

If I create an RTCClient object with a bad login I do not get an exception.

In client.py inside _get_headers there is a check for authfailed. This returns None for a good or bad login and not the text tested for.

For a bad login the headers returned are:

{'Transfer-Encoding': 'chunked', 'Date': 'Wed, 07 Jun 2017 15:12:30 GMT', 'Location': 'http://rtc/ccm/auth/authfailed', 'Content-Language': 'en-GB', 'X-Powered-By': 'Servlet/3.0'}

For a good login you get:

{'Content-Language': 'en-GB', 'X-Powered-By': 'Servlet/3.0', 'Transfer-Encoding': 'chunked', 'Set-Cookie': 'LtpaToken2=YjuJyUMB45rO29l9o2USsHEpz+Culer2BO9H0WLRRIKeBCBz3oDytevUzg68tl2MwxxLM6hrv8YyX/jxSMXFuYgrmHMR+7hiUkfZGM8zlTF+2aZATavcVGwXSpGx5h+hi3n9pysPUXfmBFALVgf6eO0s6quLqCaCXyIlPYkTyfpcTTl7ncAdo0TvncHSytESXNh0lM19R+OP+KPXBXoZfZWZi8jWXJk+ErHZyjzWcJ2WN7mnjet6NZ1Kc7aQ5wQpI9fvGDFXlUTz3W9PTx9qSDcL4ipvk7HE2Nw94A6Wf8nbukMUhUb9LkKkTRYmvyvs; Path=/; HttpOnly, WASReqURL=""; Expires=Thu, 01 Dec 1994 16:00:00 GMT; Path=/; HttpOnly', 'Expires': 'Thu, 01 Dec 1994 16:00:00 GMT', 'Location': 'http://rtc/ccm/authenticated/identity', 'Cache-Control': 'no-cache="set-cookie, set-cookie2"', 'Date': 'Wed, 07 Jun 2017 15:13:10 GMT'}

Can this be fixed please?

Error while adding a new child to a workitem

client = RTCClient(server, username = username, password = password, ends_with_jazz = True)
workitem = client.getWorkitem(133350)

workitem.addChild(133451)

the code works fine until getting a workitem, and when I try to add a child to it, I get the below error.

'NoneType' object is not iterable

I can assure that the workitem I am willing to add as a child already exists.

Check condition for missing params seems wrong

when missing_attributes is "[]", the check condition will return true, and will output

rtcclient.exception.EmptyAttrib: Missing Parameters: []

so seems we need to change it to

missing_attributes = parameters.difference(input_attributes)
if missing_attributes:
    error_msg = "Missing Parameters: %s" % list(missing_attributes)
    self.log.error(error_msg)
    raise exception.EmptyAttrib(error_msg)
else:
    self.log.debug("No missing parameters")

https://github.com/dixudx/rtcclient/blob/master/rtcclient/client.py#L1154

User information

Is there a way to get a list of users without having to go through members in a project area?

I need to get the user details, ideally just for the logged on user.
Maybe something like myclient.getUser(email_address) to return a "User" object.
I wanted to get the title of the user.

Unable to log-in with single sign-on enabled on CLM 6.0.4

With a recent update to CLM 6.0.4 a single sign-on feature was enabled for our RTC servers. Before the update everything was working correctly using this client, but now I am unable to log in.
Here is a log:

2018-05-21 17:42:19,767 DEBUG client.RTCClient: Get response from https://host:9443/ccm3/authenticated/identity
2018-05-21 17:42:19,829 DEBUG urllib3.connectionpool: Starting new HTTPS connection (1): host
2018-05-21 17:42:20,204 DEBUG urllib3.connectionpool: https://host:9443 "GET /ccm3/authenticated/identity HTTP/1.1" 302 0
2018-05-21 17:42:20,219 ERROR client.RTCClient: Failed GET request at https://host:9443/ccm3/authenticated/identity with response: b''
2018-05-21 17:42:20,219 DEBUG client.RTCClient: Post a request to https://host:9443/ccm3/authenticated/j_security_check with data: j_username=user&j_password=pass and json: None
2018-05-21 17:42:20,219 DEBUG urllib3.connectionpool: Starting new HTTPS connection (1): host
2018-05-21 17:42:20,407 DEBUG urllib3.connectionpool: https://host:9443 "POST /ccm3/authenticated/j_security_check HTTP/1.1" 302 0
2018-05-21 17:42:20,407 ERROR client.RTCClient: Failed POST request at https://host:9443/ccm3/authenticated/j_security_check with response: b''
2018-05-21 17:42:20,422 INFO client.RTCClient: 302
2018-05-21 17:42:20,422 DEBUG client.RTCClient: Get response from https://host:9443/ccm3/authenticated/identity
2018-05-21 17:42:20,422 DEBUG urllib3.connectionpool: Starting new HTTPS connection (1): host
2018-05-21 17:42:20,516 DEBUG urllib3.connectionpool: https://host:9443 "GET /ccm3/authenticated/identity HTTP/1.1" 302 0
2018-05-21 17:42:20,563 ERROR client.RTCClient: Failed GET request at https://host:9443/ccm3/authenticated/identity with response: b''
Traceback (most recent call last):
File "C:\Users\user\Desktop\SCRUM\script - Copy.py", line 53, in
myClient = RTCClient(url, username, password, ends_with_jazz = False)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\rtcclient\client.py", line 65, in init
self.headers = self._get_headers()
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\rtcclient\client.py", line 125, in _get_headers
_headers["Cookie"] += "; " + resp.headers.get("set-cookie")
TypeError: must be str, not NoneType

It seems that there is something wrong with the authentication urls and the script isn't finding certain attributes within those urls.

Add Command Line Tools

Currently this library does not provide any CLIs to interactive with RTC.

This new feature will greatly benefit the usage.

Please add support for attachments

First of all the library is excellent! Have been wanting something like this for a while.

I would like the ability to add, read and remove attachments. We add files to work items which I would like to add via a Python application I have been writing. The web interface I use is fine but I have an application that links to our ERP system for producing bespoke quotations. We will be using works items for tracking. I would like to be able to save emails and the like to work items.

Would this be possible?

Thanks for any response.

Workitem creation

I have tried many ways but have not found how to create a workitem.
I have used a template, copy from inside the createWorkitem and copyWorkitem.
All appear to generate an error.
I either get a 500 error or 404 (stating it cannot find the work item type I am trying to create)

Doe this work?
Could you please provide and example which I can work from?

Authentication requires no forwarding and different cookie handling (on my RTC installation)

When testing the rtcclient library against an RTC 5.0.2 installation I have access to I noticed that I needed to disable automatic forward handling and to keep track on more cookies in order to be able to authenticate correctly.

Following the previous private mails I disabled http requests in _get_headers (even though only the first two seem to be neccessary) and still get errors:

  File "/home/nsc/rtcclient/rtcclient/client.py", line 118, in getProjectAreas
    returned_properties=returned_properties)
  File "/home/nsc/rtcclient/rtcclient/client.py", line 172, in _getProjectAreas
    filter_rule=filter_rule)
  File "/home/nsc/rtcclient/rtcclient/client.py", line 1309, in _get_paged_resources
    raw_data = xmltodict.parse(resp.content)
  File "/usr/lib/python2.7/dist-packages/xmltodict.py", line 248, in parse
    parser.Parse(xml_input, True)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 21, column 77

The cookies I retrieve look like this:

line 68: set-cookie: WASReqURL=https:///ccm/authenticated/identity; Path=/; HttpOnly
line 77: set-cookie: LtpaToken2=G1oEy1FJVPYObrxLCOROVAVmY4OJPBUsUb0xY7rH8AS/omqr56uvsU1wz9A4Y6p22W9Hf+h9BV31SitGyzLS/S+cRiQ9IWcFMosUVuean/y5JRAQl2mIvJnL1Ygw/s3/ZEsmN1h+H78hjGJ4cJKhgqhggEwGuSm7idgX2NIo4r3wgxNKkRg/0cPCBk9hsA5vVsA96hQbe5td5R/ksVE4gDrGpfjmGNiRxnGrMSXzLvBP9J6cLZowLAkWBmlPrmo+/MYA0C6R9x7uGdh1GtKQCt14m14QRXwFs32HFqRlKejU6aZCJdz/ARWH+3P5TTy3Lnx+yNv7jNgLGg7tjkZn2jCzBcQtTdNjUaO8pSN/Nb8C7aH/XzVNheDezCTUKmQLADlpzoWkqS5QTViySGqXKZjDKEf9sbTVYoADS5Yp6j6idNg3hBAvB/ynk3Ov3ohdTPWICwn7Apo50dSKd6bbgyvvQtKDZqDuJZU+PzBbJ52g0KOApyJi0yhtlaQBecuz8CU0PQw4wzAplNDC487eTW1Jbcstcn+KokepFQEan/Rj7WzZajsGdPWmU46PkjdQEC7TLuSPBCv71dRBa44hhELKb4z3lUHarLKEYuxSRWuyfdHP1ojG4Dsu9ZQVB7HXJAX5AJqIML8IGQq/AFvdg9wXf1VxyoPQv8jeexncLE4rnMGKCJR1xvGlHW7G0gEz; Path=/; HttpOnly
line 88: set-cookie: JSESSIONID=0000WqEIzzeJ7aVlKGZUij_wBsn:-1; Path=/; HttpOnly, X-com-ibm-team-foundation-auth-loop-avoidance=false; Secure

To be able to authenticate successfully I need (only) the cookie received after the POST request (/authenticated/j_security_check, line 77); the other cookies do not disturb.

Thanks for your efforts and kind regards
Nicolas

Error on RTCClient access.

While testing the rtcclient python library,i am coming across below error whenever i try accessing
"RTCClient" call.Could you please let me know how can i resolve this issue.

ERROR client.RTCClient: Failed GET request at https://xxyy.com/ccm/authenticated/identity with response:
ERROR client.RTCClient: Failed POST request at https://xxyy.com/ccm/authenticated/j_security_check with response:

Environment details:
RTCClient python package version : 0.6.0
RTC Version : 6.0.3

Code Snippet:
url = "https://xxyy.com/ccm"
username = 'x'
password = 'y'
myclient = RTCClient(url, username, password, ends_with_jazz=False)

Log:
RTC_Clientaccessissue.txt

Please note i am able to access RTC Server's url "https://xxyy.com/ccm" in web browser.

myclient.getWorkitem( ) error

Hello Everyone,

I'm trying to use Python rtcclient 0.6.0 and following the example code to get work items from RTC 6.0.3. The url ends with ccm and the RTC server doesn't have proxies. The url is like
https://rtc-ccm-1.int.xxxx.com:9443/ccm/web/projects/xxxx (note: some characters are substituted with xxxx for confidential reason).
Here are part of sample code I use:

from rtcclient.utils import setup_basic_logging
from rtcclient import RTCClient

setup_basic_logging()
url = "https://rtc-ccm-1.int.xxxx.com:9443/ccm/web/projects/xxxx"
username = "myusername"
password = "mypassword"

myclient = RTCClient(url, username, password, ends_with_jazz=False)
print myclient
wk = myclient.getWorkitem("1631898")

Here are execution results (note: some characters are substituted with xxxx for confidential reason):
results.txt

The script seems to connect the server without issue (no error in debug log). The print command prints out "RTC Server at https://rtc-ccm-1.int.xxxx.com:9443/ccm/web/projects/xxxx" and the work item "1631898" does exist. Don't know why it still throws out "Not found <Workitem 1631898>" error.

If you have any idea, I would be grateful for your help!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.