Polarion client¶
The polarion connects to the WSDL services of the Polarion service. These are listed at <polarion_url>/ws/services. It is important that the url it the url where you normally login. So it should include /polarion in most cases.
Initialization¶
The class can be instantiated like this:
pol = polarion.Polarion('http://example.com/polarion', 'user', 'password')
print(pol) # Polarion client for http://example.com/polarion/ws/services with user <user>
Services¶
Typically you would not use any service directly, but it is an option. Using it this way would ensure the session is still valid.
Warning
The refreshing of the session is still an open issue and not yet implemented. Using this module for prolonged time will likely lead to an ended session.
pol = polarion.Polarion('http://example.com/polarion', 'user', 'password')
s = pol.getService('Tracker')
print(s) # <zeep.proxy.ServiceProxy object at 0x0000025C01BF3A48>
Polarion class¶
-
class
polarion.polarion.Polarion(polarion_url, user, password, static_service_list=False)¶ Create a Polarion client which communicates to the Polarion server.
- Parameters
polarion_url – The base URL for the polarion instance. For example http://example/com/polarion
user – The user name to login
password – The password for that user
static_service_list – Set to True when this class may not use a request to get the services list
-
getProject(project_id)¶ Get a Polarion project
- Parameters
project_id – The ID of the project.
- Returns
The request project
- Return type
-
getService(name: str)¶ Get a WSDL service client. The name can be ‘Trakcer’ or ‘Session’ TODO: When a service is requested, check if the user’s sessions is still valid.
-
getTypeFromService(name: str, type_name)¶
-
hasService(name: str)¶ Checks if a WSDL service is available