pylero package

Subpackages

Submodules

pylero.activity module

class pylero.activity.Activity(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:Activity class

activity_custom_values
Type:

list of ActivityCustomValueEntry

comments
Type:

list of ActivityComment

context_id
Type:

ContextId

global_id
Type:

string

activity_id
Type:

string

info
Type:

Text

prefix
Type:

string

resource_locations
Type:

list

source_id
Type:

string

timestamp
Type:

dateTime

type
Type:

string

user_id
Type:

string

pylero.activity_comment module

class pylero.activity_comment.ActivityComment(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:ActivityComment class

text
Type:

Text

time_stamp
Type:

dateאime

user_id
Type:

string

pylero.activity_custom_value module

class pylero.activity_custom_value.ActivityCustomValue(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:ActivityCustomValue class

values
Type:

ArrayOf_xsd_string

pylero.activity_custom_value_entry module

class pylero.activity_custom_value_entry.ActivityCustomValueEntry(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:ActivityCustomValueEntry class

custom_values
Type:

ActivityCustomValue

key
Type:

string

pylero.activity_source module

class pylero.activity_source.ActivitySource(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:ActivitySource class

activity_source_id
Type:

string

prefix
Type:

string

types
Type:

ArrayOf_xsd_string

pylero.approval module

class pylero.approval.Approval(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns5:Approval class

status
Type:

EnumOptionId

user
Type:

User

class pylero.approval.ArrayOfApproval(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

pylero.attachment module

class pylero.attachment.ArrayOfAttachment(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.attachment.Attachment(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns5:Attachment class

author
Type:

User

file_name
Type:

string

attachment_id
Type:

string

length
Type:

long

title
Type:

string

updated
Type:

dateTime

url
Type:

string

pylero.base_polarion module

class pylero.base_polarion.BasePolarion(obj_id=None, suds_object=None)[source]

Bases: object

BasePolarion is the parent class for all the WSDL Polarion objects that are published. Using the _cls_suds_map, the class creates a property for each attribute so that any access of the object attribute, will access the WSDL object that is contained by it.

_cls_suds_map

maps the Polarion attribute names to the Pylero attribute names. Attributes that reference either objects or an array of objects have the properties relate to the relationship meaning that accessing the property will give access to the object or list of objects.

Type:

dict

_id_field

the field that represents an id field, used in the child class’s constructor. when a child’s class defines the field it allows this constructor to accept an obj_id as a parameter

Type:

str

_obj_client

The Polarion client child’s WSDL object is defined by

Type:

str

_obj_struct

The data type defined by the WSDL library. The structure of the datatype is tnsX:ObjectName, the X is per datatype and has no default.

Type:

str

session

The Polarion Session object, initialized by the Connection class. This attribute connects to the server one time per session, no matter how many objects are instantiated.

Type:

Session

default_project

The user’s default project, to be used when project_id is needed and there is none given

Type:

str

REGEX_ID = '.+}(.*)$'
REGEX_PROJ = '/default/(.*)\\$'
classmethod URI_ID_GET_REPLACE(x)
classmethod URI_ID_SET_REPLACE(x)
URI_STRUCT = 'subterra:data-service:objects:/default/%(project)s${%(obj)s}%(id)s'
__init__(obj_id=None, suds_object=None)[source]
can_add_element_to_key(key)[source]

Checks if the current user can add elements to the collection at given key of the current object.

Parameters:

key – the key of the field that contains the collection.

Returns:

bool

References

Security.canAddElementToKey

can_delete_instance()[source]

Checks if the current user can delete the current object

Parameters:

None

Returns:

bool

References

Security.canDeleteInstance

can_modify_instance()[source]

Checks if the current user can modify the current object

Parameters:

None

Returns:

bool

References

Security.canModifyInstance

can_modify_key(key)[source]

Checks if the current user can modify the field with given key of the current object.

Parameters:

key – the key of the field that contains the collection.

Returns:

bool

References

Security.canModifyKey

can_read_instance()[source]

Checks if the current user can read the current object

Parameters:

None

Returns:

bool

References

Security.canReadInstance

can_read_key(key)[source]

Checks if the current user can read the field with given key of the current object.

Parameters:

key – the key of the field that contains the collection.

Returns:

bool

References

Security.canReadKey

can_remove_element_from_key(key)[source]

Checks if the current user can remove elements from the collection at given key of the current object.

Parameters:

key – the key of the field that contains the collection.

Returns:

bool

References

Security.canRemoveElementFromKey

check_valid_field_values(val, enum_id, additional_parms, control=None)[source]

verifies id the value passed in is valid for the enum or object passed in. for example, if we want to see if a valid user is given, this will try to instantiate the User class with the given parameter and additional parms. If it fails, it is not a valid value.

Parameters:
  • val – the value you want to set it to.

  • enum_id – the enumeration or object to validate against

  • additional_parms (dict) – parms needed to instantiate class passed in as enum_id

  • control – the control key for the enumeration. default:None

custom_array_obj()[source]
custom_obj()[source]
property default_project
classmethod get_global_roles()[source]

Returns all global roles.

Parameters:

None

Returns:

list of global roles

References

Security.getGlobalRoles()

get_location()[source]

Returns the location of the current object. In the context of this service the method should be used to get the location of a project(-group).

Parameters:

None

Returns:

location (string)

References

Security.getLocationForURI

get_revision(repository_name, revision_id)[source]

Gets a revision :param repository_name - The repository name.: :type repository_name - The repository name.: Put “default” for the default repository. :param revision_id - The revision name.:

Returns:

a Revision object

get_revision_by_uri(revision_uri)[source]

Gets a revision by its URI :param revision_uri - The URI of the revision.:

Returns:

a Revision object

get_revisions(uri)[source]

Returns all revisions for a specific URI. :param uri - URI of the persistence object: :type uri - URI of the persistence object: Work Item, Module/Document, User, etc

Returns:

All revisions for a specific URI.

get_valid_field_values(enum_id, control=None)[source]

Gets the available enumeration options. Uses a cache dict because the time to get valid fields from server is time prohibitive.

Parameters:
  • enum_id – The enum code to get values for

  • control – the control key for the enumeration. default:None

Returns:

Array of EnumOptions

References

Tracker.getEnumOptionsForId

classmethod has_current_user_permission(permission, project_id)[source]

Checks if given permission is granted to the current user.

Parameters:
  • permission – the permission to check.

  • project_id – the id of the project to check the permission in, None to check global permissions.

Returns:

bool

References

Security.hasCurrentUserPermission

reload()[source]

Reloads the object with data from the server. This function is useful if the data on the server changed or if a data changing function was called (such as TestRun.add_attachment)

Notes

This will overwrite any unsaved data in the object.

Parameters:

None

Returns:

None

property session
class pylero.base_polarion.ClassProperty(fget=None, fset=None, fdel=None, doc=None)[source]

Bases: property

Returns a classmethod as the getter so that the property can be used as a class property. This is needed so that the property can be set for all child objects. This project currently has no need of a setter or deleter.

class pylero.base_polarion.Configuration[source]

Bases: object

CONFIG_SECTION = 'webservice'
CURDIR_CONFIG = '.pylero'
GLOBAL_CONFIG = '/Users/waynesun/.cache/uv/archive-v0/jA2gmaYJawzOv_lzBaR3u/lib/python3.11/site-packages/pylero/pylero.cfg'
LOCAL_CONFIG = '/Users/waynesun/.pylero'
__init__()[source]
pkgdir = '/Users/waynesun/.cache/uv/archive-v0/jA2gmaYJawzOv_lzBaR3u/lib/python3.11/site-packages/pylero'
class pylero.base_polarion.Connection[source]

Bases: object

Creates a Polarion session as a class method, so that it is used for all objects inherited by BasePolarion. The url, repo, user and password are read from config files, which are located either the current directory ./pylero, the user’s dir ~/.pylero or the Library config dir LIBDIR/pylero.cfg These can also be overridden with the following environment variables: POLARION_URL POLARION_REPO POLARION_USERNAME POLARION_PASSWORD POLARION_TOKEN POLARION_TIMEOUT POLARION_PROJECT

connected = False
retries = 3
session = <pylero.session.Session object>
token_enabled = True
pylero.base_polarion.tx_wrapper(func)[source]

pylero.baseline module

class pylero.baseline.Baseline(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:Baseline class

author
Type:

User

base_revision
Type:

string

description
Type:

string

baseline_id
Type:

string

name
Type:

string

project
Type:

Project

classmethod create(project_id, name, description, revision)[source]

class method create Creates a Baseline from head or particular revision.

Parameters:
  • project_id

  • name – baseline name (not None)

  • description – baseline description (can be None)

  • revision – revision or null value for head revision

Returns:

Baseline object

References

Tracker.createBaseline

classmethod query(query, sort='baseline_id')[source]

Queries for baselines.

Parameters:
  • query – the lucene query to be used.

  • sort – the field to be used for sorting.

Returns:

list of Baselines

References

Tracker.queryBaselines

pylero.build module

pylero.build_linked_work_item module

pylero.build_test_results module

class pylero.build_test_results.BuildTestResults(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns2:BuildTestResults class

error_count
Type:

int

failure_count
Type:

int

skipped_count
Type:

int

test_count
Type:

int

pylero.category module

class pylero.category.ArrayOfCategory(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.category.Category(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns5:Category class

description
Type:

Text

category_id
Type:

string

name
Type:

string

pylero.change module

class pylero.change.Change(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:Change class

creation
Type:

boolean

date
Type:

dateTime

diffs
Type:

ArrayOf_tns3_FieldDiff

empty
Type:

boolean

invalid
Type:

boolean

revision
Type:

string

user
Type:

string

pylero.comment module

class pylero.comment.ArrayOfComment(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.comment.Comment(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns5:Comment class

author
Type:

User

child_comment_uris
Type:

ArrayOfSubterraURI

created
Type:

dateTime

comment_id
Type:

string

parent_comment_uri
Type:

SubterraURI

resolved
Type:

boolean

signature_data
Type:

SignatureData

tags
Type:

ArrayOfEnumOptionId

text
Type:

Text

title
Type:

string

visible_to
Type:

ArrayOfstring

pylero.custom module

class pylero.custom.ArrayOfCustom(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.custom.Custom(key=None, value=None, suds_object=None)[source]

Bases: BasePolarion

Object to manage Polarion TestManagement WS tns4:Custom

key
Type:

string

value
Type:

EnumOptionId

__init__(key=None, value=None, suds_object=None)[source]

pylero.custom_field module

class pylero.custom_field.CustomField(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:CustomField class

key
Type:

string

parent_item_uri
Type:

string

value
Type:

anyType

pylero.custom_field_type module

class pylero.custom_field_type.CustomFieldType(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns5:CustomFieldType class

default_value
Type:

anyType

depends_on
Type:

string

description
Type:

string

cft_id
Type:

string

name
Type:

string

required
Type:

boolean

type
Type:

string

pylero.document module

pylero.enum_custom_field_type module

class pylero.enum_custom_field_type.EnumCustomFieldType(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns5:EnumCustomFieldType class

default_value
Type:

anyType

depends_on
Type:

string

description
Type:

string

enum_id
Type:

string

id
Type:

string

name
Type:

string

required
Type:

boolean

type
Type:

string

pylero.enum_option module

class pylero.enum_option.EnumOption(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns5:EnumOption class

default
Type:

boolean

enum_id
Type:

string

hidden
Type:

boolean

enum_option_id
Type:

string

name
Type:

string

phantom
Type:

boolean

properties
Type:

Properties

sequence_number
Type:

int

pylero.enum_option_id module

class pylero.enum_option_id.ArrayOfEnumOptionId(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

An object to manage Polarion TestManagement tns4:ArrayOfEnumOptionId

class pylero.enum_option_id.EnumOptionId(enum_id=None, suds_object=None)[source]

Bases: BasePolarion

An object to manage Polarion TestManagement tns4:EnumOptionId

__init__(enum_id=None, suds_object=None)[source]

pylero.exceptions module

exception pylero.exceptions.PyleroLibException[source]

Bases: Exception

pylero.externally_linked_work_item module

class pylero.externally_linked_work_item.ArrayOfExternallyLinkedWorkItem(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.externally_linked_work_item.ExternallyLinkedWorkItem(project_id=None, work_item_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns5:ExternallyLinkedWorkItem class

role
Type:

EnumOptionId

work_item_uri
Type:

string

__init__(project_id=None, work_item_id=None, suds_object=None)[source]

pylero.field_diff module

class pylero.field_diff.FieldDiff(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:FieldDiff class

added
Type:

ArrayOf_xsd_anyType

after
Type:

anyType

before
Type:

anyType

collection
Type:

boolean

field_name
Type:

string

removed
Type:

ArrayOf_xsd_anyType

pylero.imported_comment module

class pylero.imported_comment.ImportedComment(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns4:ImportedComment class

author
Type:

string

created
Type:

dateTime

initials
Type:

string

pylero.language_definition module

class pylero.language_definition.LanguageDefinition(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:LanguageDefinition class

language_definition_id
Type:

string

label
Type:

string

pylero.license_info module

class pylero.license_info.LicenseInfo(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:LicenseInfo class

license
Type:

string

slots
Type:

int

pylero.linked_work_item module

class pylero.linked_work_item.ArrayOfLinkedWorkItem(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.linked_work_item.LinkedWorkItem(project_id=None, work_item_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns5:LinkedWorkItem class

revision
Type:

string

role
Type:

EnumOptionId

suspect
Type:

boolean

work_item_id
Type:

string

__init__(project_id=None, work_item_id=None, suds_object=None)[source]

pylero.module_comment module

class pylero.module_comment.ArrayOfModuleComment(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.module_comment.ModuleComment(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns4:ModuleComment class

author
Type:

User

child_comment_uris
Type:

ArrayOfSubterraURI

created
Type:

dateTime

module_comment_id
Type:

string

imported_comment
Type:

ImportedComment

parent_comment_uri
Type:

SubterraURI

referred_work_item_uri
Type:

SubterraURI

resolved
Type:

boolean

signature_data
Type:

SignatureData

tags
Type:

ArrayOfEnumOptionId

text
Type:

Text

pylero.plan module

pylero.plan_record module

pylero.plan_statistics module

class pylero.plan_statistics.PlanStatistics(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:PlanStatistics class

done
Type:

float

done_as_string
Type:

string

ideal_progress
Type:

float

ideal_progress_as_string
Type:

string

number_of_planned
Type:

int

number_of_resolved
Type:

int

number_of_unresolved
Type:

int

planned
Type:

float

planned_as_string
Type:

string

progress
Type:

float

progress_as_string
Type:

string

todo
Type:

float

todo_as_string
Type:

string

pylero.planning_constraint module

class pylero.planning_constraint.ArrayOfPlanningConstraint(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.planning_constraint.PlanningConstraint(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns5:PlanningConstraint class

constraint
Type:

EnumOptionId

date
Type:

dateTime

pylero.priority_opt module

class pylero.priority_opt.PriorityOpt(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns5:PriorityOpt class

default
Type:

boolean

enum_id
Type:

string

float
Type:

float

hidden
Type:

boolean

priority_opt_id
Type:

string

name
Type:

string

phantom
Type:

boolean

properties
Type:

Properties

sequence_number
Type:

int

pylero.priority_option_id module

class pylero.priority_option_id.ArrayOfPriorityOptionId(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.priority_option_id.PriorityOptionId(id=None, uri=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns5:PriorityOptionId class

id
Type:

string

__init__(id=None, uri=None, suds_object=None)[source]

PriorityOptionID Constructor

Parameters:
  • id – value of the priority

  • uri – the SubterraURI of the priority

  • suds_object – the Polarion Plan object

Returns:

None

References

_WorkItem.priority

pylero.product_license module

class pylero.product_license.ProductLicense(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:ProductLicense class

concurrent_license_data
Type:

ArrayOf_tns3_LicenseInfo

customer_company
Type:

string

customer_email
Type:

string

customer_name
Type:

string

date_created
Type:

dateTime

expiration_date
Type:

dateTime

generated_by
Type:

string

ip_address
Type:

string

license_format
Type:

string

license_profile
Type:

string

mac_address
Type:

string

named_license_data
Type:

ArrayOf_tns3_LicenseInfo

pylero.project module

class pylero.project.Project(project_id=None, suds_object=None, location=None, uri=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns4:Project class

active
Type:

boolean

description
Type:

Text

finish
Type:

date

lead
Type:

User

location
Type:

str

lock_work_records_date
Type:

date

name
Type:

string

project_group
Type:

ProjectGroup

project_id
Type:

string

start
Type:

date

tracker_prefix
Type:

string

URI_STRUCT = 'subterra:data-service:objects:/default/%(id)s${%(obj)s}%(id)s'
__init__(project_id=None, suds_object=None, location=None, uri=None)[source]

Project constructor.

Parameters:
  • project_id – when given, the object is populated with the Project data.

  • suds_object – PolarionProject object. When given, the object is populated by object data.

  • location – the location of the Polarion project

  • uri – the uri that references the PolarionProject

Notes

Either project_id or suds_object or location or uri can be passed in or none of them. If none of the identifying parameters are passed in an empty object is created

References

Project.getProject Project.getProjectAtLocation Project.getProjectByURI

get_categories()[source]

method get_categories retrieves a list of Category objects

Parameters:

None

Returns:

list of Category objects

References

Tracker.getCategories

classmethod get_context_roles(location)[source]

Returns the context (project) roles for the given location.

Parameters:

location – the location of the context (project/project group)

Returns:

list of roles

References

Security.getContextRoles

get_defined_custom_field_keys(work_item_type_id)[source]

Gets all custom field keys defined for a workitem type in a project.

Parameters:

work_item_type_id – the workitem type ID.

Returns:

list of key for the project for the given workitem type

References

Tracker.getDefinedCustomFieldkeys

get_defined_custom_field_type(work_item_type_id, key)[source]

method get_defined_custom_field_type gets custom field definition of a work item type for the given key.

Parameters:
  • work_item_type_id – the workitem type ID.

  • key – The key of the custom field

Returns:

CustomFieldType object

References

Tracker.getDefinedCustomFieldType

get_defined_custom_field_types(work_item_type_id)[source]

method get_defined_custom_field_type gets custom field definition of a work item type all keys.

Parameters:

work_item_type_id – the workitem type ID.

Returns:

list of CustomFieldType object

References

Tracker.getDefinedCustomFieldType

get_document_spaces()[source]

Gets the Module/Document spaces for the project.

Parameters:

None

Returns:

list of (string) document spaces

References

Tracker.getDocumentSpaces

get_project_users()[source]

Gets users of the project

Parameters:

None

Returns:

list of u.User objects

References

Project.getProjectUsers

get_test_steps_configuration()[source]

method get_test_steps_configuration retrieves a list of the Test Steps configuration for the project

Parameters:

None

Returns:

list of configuration of the Test Steps custom field.

References

TestManagement.getTestStepsConfiguration

get_tests_configuration()[source]

method get_tests_configuration retrieves the test management configuration for the project

Parameters:

None

Returns:

TestsConfiguration object

References

TestManagement.getTestsConfiguration

get_wiki_spaces()[source]

Returns Wiki spaces from current project

Parameters:

None

Returns:

Array of string

References

Tracker.getWikiSpaces

pylero.project_group module

class pylero.project_group.ProjectGroup(uri=None, location=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns2:ProjectGroup class

group_uris
Type:

ArrayOfSubterraURI

location
Type:

Location

name
Type:

string

parent_uri
Type:

SubterraURI

project_ids
Type:

ArrayOfstring

__init__(uri=None, location=None, suds_object=None)[source]

ProjectGroup constructor.

Parameters:
  • uri – the uri that references the Polarion ProjectGroup

  • location – the location of the Polarion ProjectGroup

  • suds_object – Polarion ProjectGroup object. When given, the object is populated by object data.

Notes

Either uri or suds_object or location in or none of them. If none of the identifying parameters are passed in an empty object is created

References

p.Project.getProjectGroup p.Project.getProjectGroupAtLocation

get_contained_groups()[source]

Gets all project groups located directly below the project group.

Parameters:

None

Returns:

list of p.ProjectGroup objects

References

p.Project.getContainedGroups

get_contained_projects()[source]

Gets all projects located directly below the project group.

Parameters:

None

Returns:

list of p.Project objects

References

p.Project.getContainedProjects

get_deep_contained_projects()[source]

Gets all projects located below the project group.

Parameters:

None

Returns:

list of p.Project objects

References

p.Project.getDeepContainedProjects

classmethod get_root_project_group()[source]

Gets the root project group.

Parameters:

None

Returns:

ProjectGroup object

References

Project.getRootProjectGroup

pylero.properties module

class pylero.properties.Properties(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns4:Properties class

property
Type:

property

pylero.property module

class pylero.property.Property(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns4:property class

key
Type:

string

value
Type:

string

pylero.revision module

class pylero.revision.ArrayOfRevision(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.revision.Revision(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns4:Revision class

author
Type:

string

created
Type:

dateTime

internal_commit
Type:

boolean

linked_work_item_uris
Type:

ArrayOfSubterraURI

message
Type:

string

name
Type:

string

repository_name
Type:

string

classmethod query(query, sort='name', fields=['name'], query_uris=False)[source]

Searches revisions

Parameters:
  • query – query, Lucene

  • sort – Lucene sort string, default - name

  • fields – list of field names to fill in the returned Revision (can be null). For nested structures in the lists you can use following syntax to include only subset of fields: myList.LIST.key (e.g. linkedWorkItems.LIST.role). For custom fields you can specify which fields you want to be filled using following syntax: customFields.CUSTOM_FIELD_ID (e.g. customFields.risk). Default - list containing “name”

  • query_uris – if True, returns a list of URIs instead of Revision objects. default - False

Returns:

list of Revisions

References

Tracker.queryRevisions

pylero.server module

class pylero.server.Server(url, user, password, token, default_project=None, relogin_timeout=60, timeout=120, cert_path=None)[source]

Bases: object

Server object is instantiated once per Polarion session and creates the session that is used to connect to the server.

__init__(url, user, password, token, default_project=None, relogin_timeout=60, timeout=120, cert_path=None)[source]

An object that defines the properties of the Polarion server to connect to.

Parameters:
  • url – url of the Polarion server

  • user – username

  • password – password

  • default_project – default project to use to for configuarations

  • relogin_timeout – timeout after which the session will try to login again

  • timeout – http tiemout

  • cert_path – path to customize CA bundle

session()[source]

pylero.session module

class pylero.session.ListenFilter(name='')[source]

Bases: Filter

filter(record)[source]

Determine which log records to output. Returns 0 for no, nonzero for yes.

class pylero.session.Session(server, timeout)[source]

Bases: object

__init__(server, timeout)[source]

Session constructor, initialize the WSDL clients

Parameters:
  • server – server object that the session connects to

  • caching_policy – determines the caching policy of the SUDS conn

  • timeout – HTTP timeout for the connection

tx_begin()[source]
tx_commit()[source]
tx_in()[source]

Function checks if a transaction is in progress. You can not have a transaction within another transaction. This function helps the system determine if it should start a new transaction or if it is already in the middle of one.

Returns:

bool

tx_release()[source]
tx_rollback()[source]
class pylero.session.SoapNull[source]

Bases: MessagePlugin

suds plugin that is called before any suds message is sent to the remote server. It adds the xsi:nil=true attribute to any element that is blank. Without this plugin, a number of functions that were supposed to accept null parameters did not work.

add_nil(element)[source]

Used as a filter function with walk to add xsi:nil to blank attrs.

marshalled(context)[source]

Suds is about to send the specified SOAP envelope.

Provides the plugin with the opportunity to inspect/modify the envelope Document before it is sent.

@param context: The send context.

The I{envelope} is the envelope document.

@type context: L{MessageContext}

pylero.session.create_ssl_context()[source]

this function creates a custom ssl context which is required for ssl connection in python-version >=2.7.10. this ssl context is customize to use certificate which is located in ‘CERT_PATH’.

pylero.signature module

class pylero.signature.ArrayOfSignature(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.signature.Signature(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns4:Signature class

signed_by
Type:

User

signed_revision
Type:

string

signer_role
Type:

string

verdict
Type:

EnumOptionId

verdict_time
Type:

dateTime

pylero.signature_context module

class pylero.signature_context.ArrayOfSignatureContext(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.signature_context.SignatureContext(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns4:SignatureContext class

signatures
Type:

ArrayOfSignature

target_status_id
Type:

string

transition_data_revision
Type:

string

user
Type:

User

pylero.signature_data module

class pylero.signature_data.SignatureData(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns5:SignatureData class

target_status_id
Type:

string

verdict
Type:

EnumOptionId

pylero.subterra_uri module

class pylero.subterra_uri.ArrayOfSubterraURI[source]

Bases: BasePolarion

__init__()[source]
class pylero.subterra_uri.SubterraURI[source]

Bases: BasePolarion

__init__()[source]

pylero.test_record module

pylero.test_run module

pylero.test_run_attachment module

class pylero.test_run_attachment.ArrayOfTestRunAttachment(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.test_run_attachment.TestRunAttachment(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns4:TestRunAttachment class

author
Type:

User

file_name
Type:

string

id
Type:

string

length
Type:

long

test_run_uri
Type:

SubterraURI

title
Type:

string

updated
Type:

dateTime

url
Type:

string

pylero.test_step module

class pylero.test_step.ArrayOfTestStep(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.test_step.TestStep(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:TestStep class

values
Type:

ArrayOfText

pylero.test_step_result module

class pylero.test_step_result.ArrayOfTestStepResult(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.test_step_result.TestStepResult(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:TestStepResult class

attachments
Type:

ArrayOfTestRunAttachment

comment
Type:

Text

result
Type:

EnumOptionId

pylero.test_steps module

class pylero.test_steps.TestSteps(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:TestSteps class

keys
Type:

ArrayOfEnumOptionId

steps
Type:

ArrayOfTestStep

pylero.tests_configuration module

class pylero.tests_configuration.TestsConfiguration(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:TestsConfiguration class

defect_auto_assignement_enabled
Type:

boolean

defect_reuse_type
Type:

string

defect_template
Type:

string

Type:

string

defect_work_item_type
Type:

string

defects_project
Type:

string

fields_to_copy_from_test_case_to_defect
Type:

Properties

fields_to_copy_from_test_run_to_linked_defect
Type:

Properties

fields_to_copy_from_test_run_to_new_defect
Type:

Properties

max_created_defects
Type:

int

max_created_defects_percent
Type:

int

result_error_enum_id
Type:

string

result_failed_enum_id
Type:

string

result_passed_enum_id
Type:

string

retest_allowed
Type:

boolean

status_error_enum_id
Type:

string

status_failed_enum_id
Type:

string

status_ok_enum_id
Type:

string

summary_defect_severity
Type:

string

test_case_id_custom_field
Type:

string

test_case_template
Type:

string

test_case_test_comment_field_id
Type:

string

test_case_test_result_field_id
Type:

string

test_case_work_item_type
Type:

string

test_run_template
Type:

string

pylero.text module

class pylero.text.ArrayOfText(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object containing list of Text objects

class pylero.text.Text(content=None, suds_object=None)[source]

Bases: BasePolarion

Object to manage Polarion TestManagement WS tns2:Text

Rich text object

content

the formatted text

Type:

str

content_type

indication of how content is formatted (eg. text/html)

Type:

str

content_lossy
Type:

bool

__init__(content=None, suds_object=None)[source]

pylero.time_point module

class pylero.time_point.TimePoint(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns5:TimePoint class

closed
Type:

boolean

description
Type:

Text

earliest_planned_start
Type:

date

time_point_id
Type:

string

name
Type:

string

time
Type:

date

pylero.user module

class pylero.user.ArrayOfUser(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.user.User(user_id=None, suds_object=None, uri=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:User class

description
Type:

Text

disabled_notifications
Type:

boolean

email
Type:

string

user_id
Type:

string

name
Type:

string

vote_uris
Type:

ArrayOfSubterraURI

watche_uris
Type:

ArrayOfSubterraURI

__init__(user_id=None, suds_object=None, uri=None)[source]

User constructor.

Parameters:
  • user_id – when given, the object is populated with user’s data

  • suds_object – Polarion User object. When given, the object is populated by object data.

  • uri – when given, the object is populated with user’s data

Notes

Either user_id, suds_object or uri can be passed in, not multiple

References

Project.getUser Project.getUserByUri

classmethod create_user(user_id)[source]

class method create_user that creates a Polarion user.

Parameters:

user_id – the id of the user to create (login name)

Returns

new User object

References

Project.createUser(java.lang.String)

get_context_roles(location)[source]

Returns the context (project) roles for the user at given location.

Parameters:

location – the location of the context (project/project group)

Returns:

list of roles

References

Security.getContextRolesForUser

get_roles(location)[source]

Returns all global and context roles for the context at given location assigned to the user.

Parameters:

location

Returns:

list of roles

References

Security.getRolesForUser

get_user_avatar_url()[source]

method get_user_avatar_url, returns a string with the relative URL of the user’s avatar.

Parameters:

None

Notes

Raises an error if the User is not populated.

References

Project.getUserAvatarURL

classmethod get_user_from_token(token)[source]

Returns the username of the user that has the assigned token.

Parameters:

token

Returns:

user_id

References

Security.getUserFromToken

classmethod get_users()[source]

class method that returns all the system users

Parameters:

None

Returns:

list containing User objects for all users.

References

Project.getUsers

has_permission(permission, project_id)[source]

Checks if given permission is granted to the user.

Parameters:
  • permission – the permission to check.

  • project_id – the id of the project to check the permission in, None to check global permissions.

Returns:

bool

References

Security.hasPermission

update()[source]

method update, updates Polarion with the User attributes

Parameters:

None

Notes

Raises an error if the User is not populated.

References

p.Project.updateUser

pylero.wiki_page module

class pylero.wiki_page.WikiPage(fields=None, uri=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:WikiPage class

attachments
Type:

ArrayOfWikiPageAttachment

author
Type:

User

created
Type:

dateTime

home_page_content
Type:

Text

wiki_page_id
Type:

string

linked_page_uris
Type:

ArrayOfSubterraURI

location
Type:

Location

page_location
Type:

Location

page_name
Type:

string

project
Type:

Project

space_id
Type:

string

title
Type:

string

type
Type:

string

updated
Type:

dateTime

updated_by
Type:

User

__init__(fields=None, uri=None, suds_object=None)[source]
Parameters:

fields – list of object fields to be returned in the object

Returns:

None

References

Tracker.getWikiPageByUri tracker.getWikiPageByUriWithFields

classmethod get_wiki_pages(project_id, space_id, fields)[source]

Returns Wiki Pages from given project and space.

Parameters:
  • project_id – project id (not null)

  • space_id – space id (not null)

Returns:

list of WikiPage objects

classmethod query(query, is_sql=False, fields=['wiki_page_id'], sort='wiki_page_id', limit=-1, baseline_revision=None, query_uris=False)[source]

Searches for Wiki Pages .

Parameters:
  • query – query, either Lucene or SQL

  • is_sql (bool) – determines if the query is SQL or Lucene

  • fields – list of field names to fill in the returned Modules/Documents (can be null). For nested structures in the lists you can use following syntax to include only subset of fields: myList.LIST.key (e.g. linkedWorkItems.LIST.role). For custom fields you can specify which fields you want to be filled using following syntax: customFields.CUSTOM_FIELD_ID (e.g. customFields.risk). default - list containing “wiki_page_id”

  • sort – Lucene sort string, default wiki_page_id

  • limit – how many results to return (-1 means everything (default))

  • baseline_revision (str) – if populated, query done in specified rev default - None

  • query_uris – returns a list of URI of the Modules found, instead of a list of WikiPage objects. default - False

Returns:

list of modules

References

queryWikiPageUris queryWikiPageUrisBySQL queryWikiPageUrisInBaseline queryWikiPageUrisInBaselineBySQL queryWikiPages queryWikiPagesBySQL queryWikiPagesInBaseline queryWikiPagesInBaselineBySQL

pylero.wiki_page_attachment module

class pylero.wiki_page_attachment.ArrayOfWikiPageAttachment(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.wiki_page_attachment.WikiPageAttachment(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:WikiPageAttachment class

author
Type:

User

file_name
Type:

string

wiki_page_attachment_id
Type:

string

length
Type:

long

title
Type:

string

updated
Type:

dateTime

url
Type:

string

pylero.work_item module

pylero.work_record module

class pylero.work_record.ArrayOfWorkRecord(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

class pylero.work_record.WorkRecord(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns5:WorkRecord class

comment
Type:

string

date
Type:

date

work_record_id
Type:

string

time_spent
Type:

duration

type
Type:

EnumOptionId

user
Type:

User

pylero.workflow_action module

class pylero.workflow_action.WorkflowAction(obj_id=None, suds_object=None)[source]

Bases: BasePolarion

Object to handle the Polarion WSDL tns3:WorkflowAction class

action_id
Type:

int

action_name
Type:

string

cleaned_features
Type:

ArrayOf_xsd_string

native_action_id
Type:

string

required_features
Type:

ArrayOf_xsd_string

suggested_features
Type:

ArrayOf_xsd_string

target_status
Type:

EnumOptionId

unavailability_message
Type:

string

Module contents