pylero package¶
Subpackages¶
Submodules¶
pylero.activity module¶
- class pylero.activity.Activity(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.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
- 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¶
pylero.activity_custom_value module¶
- class pylero.activity_custom_value.ActivityCustomValue(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.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:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns3:ActivityCustomValueEntry class
- custom_values¶
- Type
- key¶
- Type
string
pylero.activity_source module¶
pylero.approval module¶
- class pylero.approval.Approval(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns5:Approval class
- status¶
- Type
pylero.attachment module¶
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
- 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'¶
- 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
- default_project = 'Polarion'¶
- 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_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
- logged_in_user_id = 'stester1'¶
- 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
- repo = 'https://polarion.stage.engineering.redhat.com/repo'¶
- session = <pylero.session.Session object>¶
- class pylero.base_polarion.ClassProperty[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 = '/home/waynesun/.local/share/virtualenvs/pylero-xZ4TB2uX/lib/python3.6/site-packages/pylero/etc/pylero.cfg'¶
- LOCAL_CONFIG = '/home/waynesun/.pylero'¶
- pkgdir = '/home/waynesun/.local/share/virtualenvs/pylero-xZ4TB2uX/lib/python3.6/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/etc/pylero.cfg These can also be overridden with the following environment variables: POLARION_URL POLARION_REPO POLARION_USERNAME POLARION_PASSWORD POLARION_TIMEOUT POLARION_PROJECT
- connected = True¶
- password_retries = 3¶
- session = <pylero.session.Session object>¶
pylero.baseline module¶
- class pylero.baseline.Baseline(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns3:Baseline class
- base_revision¶
- Type
string
- description¶
- Type
string
- baseline_id¶
- Type
string
- name¶
- Type
string
- 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
pylero.build module¶
- class pylero.build.Build(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns2:Build class
- bir_location¶
- Type
Location
- build_descriptor_name¶
- Type
string
- build_stamp¶
- Type
string
- build_status¶
- Type
string
- build_tag¶
- Type
string
- build_test_results¶
- Type
- calculation_descriptor_name¶
- Type
string
- creation_time¶
- Type
dateTime
- finish_time¶
- Type
dateTime
- build_id¶
- Type
string
- job_id¶
- Type
string
- linked_work_items¶
- local_deployment_space_name¶
- Type
string
- log_files¶
- Type
ArrayOfLocation
- start_time¶
- Type
dateTime
pylero.build_linked_work_item module¶
- class pylero.build_linked_work_item.ArrayOfBuildLinkedWorkItem(obj_id=None, suds_object=None)[source]¶
pylero.build_test_results module¶
pylero.category module¶
pylero.change module¶
- class pylero.change.Change(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.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.Comment(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns5:Comment class
- child_comment_uris¶
- Type
- created¶
- Type
dateTime
- comment_id¶
- Type
string
- parent_comment_uri¶
- Type
- resolved¶
- Type
boolean
- signature_data¶
- Type
- tags¶
- Type
- title¶
- Type
string
- visible_to¶
- Type
ArrayOfstring
pylero.custom module¶
- class pylero.custom.Custom(key=None, value=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to manage Polarion TestManagement WS tns4:Custom
- key¶
- Type
string
- value¶
- Type
pylero.custom_field module¶
pylero.custom_field_type module¶
- class pylero.custom_field_type.CustomFieldType(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.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¶
- class pylero.document.Document(project_id=None, doc_with_space=None, fields=None, uri=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
An object to manage the TestManagement WS tns4:Module
- allowed_wi_types¶
- Type
- are_links_from_parent_to_child¶
- Type
boolean
- auto_suspect¶
- Type
boolean
- branched_from¶
- Type
Module
- branched_with_query¶
- Type
string
- comments¶
- Type
- created¶
- Type
dateTime
- custom_fields¶
- Type
- derived_fields¶
- Type
ArrayOfstring
- derived_from_link_role¶
- Type
- derived_from_uri¶
- Type
- id¶
- Type
string
- location¶
- Type
Location
- module_absolute_location¶
- Type
Location
- module_folder¶
- Type
string
- module_location¶
- Type
Location
- module_name¶
- Type
string
- signature_contexts¶
- status¶
- Type
- structure_link_role¶
- Type
- title¶
- Type
string
- type¶
- Type
- updated¶
- Type
dateTime
- uses_outline_numbering¶
- Type
boolean
- classmethod URI_ID_GET_REPLACE(x)¶
- classmethod URI_ID_SET_REPLACE(x)¶
- URI_STRUCT = 'subterra:data-service:objects:/default/%(project)s${%(obj)s}{moduleFolder}%(id)s'¶
- __init__(project_id=None, doc_with_space=None, fields=None, uri=None, suds_object=None)[source]¶
constructor for the Module object. Gets the module object from the Polarion server based on parameters passed in.
- Parameters
project_id – the project where the module is located
doc_with_space – specific space/doc_name of the repository, required if project_id is given (Testing, Development, …)
fields – optional list of fields that should be contained in the returned object.
uri – The Polarion specific uri of the module object
suds_object – the WSDL Module object
- Returns
None
References
Tracker.getModuleByLocation Tracker.getModuleByLocationWithFields Tracker.getModuleByUri Tracker.getModuleByUriWithFields
- add_referenced_work_item(work_item_id)[source]¶
Adds a work item to the document as a referenced work_item to the end of the current document.
- Parameters
work_item_id (str) – the id of a work item in the same project as
document (the current) –
- Returns
None
- classmethod create(project_id, space, document_name, document_title, allowed_wi_types, document_type, structure_link_role='parent', home_page_content='')[source]¶
class method create Creates a document or an old-style Module/Document in given location with given parameters.
- Parameters
project_id – project to create module in
space – document space location with one component or None for default space
document_name – Document name (required)
document_title – Document title (required)
allowed_wi_types – list of types, only one should be specified
document_type – Type of document (required i.e testspecification).
structure_link_role – required, role which defines the hierarchy of work items inside the Module, default: parent
home_page_content – HTML markup for document home page, default “”
- Returns
None
References
Tracker.createDocument
- create_work_item(parent_id, w_item)[source]¶
create a work item in the current document
- Parameters
parent_id – The work_item_id of the parent _WorkItem
wi – The Work Item object to create.
- Returns
The created _WorkItem
References
Tracker.createWorkItemInModule
- classmethod get_documents(project_id, space, fields=[])[source]¶
returns a list of Document objects
- Parameters
project_id – the project where the modules are located
space – specific location of the repository
fields – optional list of fields that should be contained in the returned objects.
- Returns
list of Document Objects
References
Tracker.getModules Tracker.getModulesWithFields
- get_work_items(parent_work_item_id, deep, fields=['work_item_id', 'type'])[source]¶
Returns work items (with given fields set) contained in given Module/Document under given parent (if specified).
- Parameters
parent_work_item_id (str) – Id of parent work item or None
deep – true to return work items from the whole subtree
fields – fields to fill. 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).
- Returns
list of _WorkItem objects
References
Tracker.getModuleWorkItems
- move_work_item_here(work_item_id, parent_id, position=- 1, retain_flow=True)[source]¶
Moves a work item to a specific position in a Document. If the work item is not yet inside the Document it will be moved into the Document.
- Parameters
work_item_id – WorkItem id to move
parent_id – The parent WorkItem id, can be None
position (int) – desired position in the list of children or a value < 0 to insert at the end (if the old and new parent is the same then moved work item is not counted)
retain_flow (bool) – true to retain the position of moved work item in the document flow (even if it means to change the parent). false to keep desired parent (even if it means to move work item to different position)
- Returns
None
References
Tracker.moveWorkItemToDocument
- classmethod query(query, is_sql=False, fields=['document_id'], sort='document_id', limit=- 1, baseline_revision=None, query_uris=False)[source]¶
Searches for Modules/Documents.
- 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 “document_id”
sort – Lucene sort string, default: document_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 Documents. default - False.
- Returns
list of modules
References
queryModuleUris queryModuleUrisBySQL queryModuleUrisInBaseline queryModuleUrisInBaselineBySQL queryModules queryModulesBySQL queryModulesInBaseline queryModulesInBaselineBySQL
pylero.enum_custom_field_type module¶
- class pylero.enum_custom_field_type.EnumCustomFieldType(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.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:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns5:EnumOption class
- default¶
- Type
boolean
- enum_id¶
- Type
string
- Type
boolean
- enum_option_id¶
- Type
string
- name¶
- Type
string
- phantom¶
- Type
boolean
- properties¶
- Type
- sequence_number¶
- Type
int
pylero.enum_option_id module¶
- class pylero.enum_option_id.ArrayOfEnumOptionId(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
An object to manage Polarion TestManagement tns4:ArrayOfEnumOptionId
- class pylero.enum_option_id.EnumOptionId(enum_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
An object to manage Polarion TestManagement tns4:EnumOptionId
pylero.exceptions module¶
pylero.externally_linked_work_item module¶
- class pylero.externally_linked_work_item.ArrayOfExternallyLinkedWorkItem(obj_id=None, suds_object=None)[source]¶
- class pylero.externally_linked_work_item.ExternallyLinkedWorkItem(project_id=None, work_item_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns5:ExternallyLinkedWorkItem class
- role¶
- Type
- work_item_uri¶
- Type
string
pylero.field_diff module¶
- class pylero.field_diff.FieldDiff(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.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.hyperlink module¶
- class pylero.hyperlink.Hyperlink(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns5:Hyperlink class
- role¶
- Type
- uri¶
- Type
string
pylero.imported_comment module¶
pylero.language_definition module¶
- class pylero.language_definition.LanguageDefinition(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.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:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns3:LicenseInfo class
- license¶
- Type
string
- slots¶
- Type
int
pylero.linked_work_item module¶
pylero.module_comment module¶
- class pylero.module_comment.ModuleComment(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns4:ModuleComment class
- child_comment_uris¶
- Type
- created¶
- Type
dateTime
- module_comment_id¶
- Type
string
- imported_comment¶
- Type
- parent_comment_uri¶
- Type
- referred_work_item_uri¶
- Type
- resolved¶
- Type
boolean
- signature_data¶
- Type
- tags¶
- Type
pylero.plan module¶
- class pylero.plan.Plan(plan_id=None, project_id=None, uri=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns6:Plan class
- allowed_types¶
- Type
- author_uri¶
- Type
- calculation_type¶
- Type
- capacity¶
- Type
float
- color¶
- Type
string
- created¶
- Type
dateTime
- custom_fields¶
- Type
- default_estimate¶
- Type
float
- due_date¶
- Type
date
- estimation_field¶
- Type
string
- finished_on¶
- Type
dateTime
- is_template¶
- Type
boolean
- location¶
- Type
Location
- name¶
- Type
string
- plan_id¶
- Type
string
- previous_time_spent¶
- Type
duration
- prioritization_field¶
- Type
string
- project_uri¶
- Type
- records¶
- Type
- sort_order¶
- Type
int
- start_date¶
- Type
date
- started_on¶
- Type
dateTime
- status¶
- Type
- template_uri¶
- Type
- updated¶
- Type
dateTime
- __init__(plan_id=None, project_id=None, uri=None, suds_object=None)[source]¶
Plan Constructor
- Parameters
plan_id – ID of the plan
project_id – ID of the project that contains the specific plan required when plan_id is given
uri – the SubterraURI of the plan to load
suds_object – the Polarion Plan object
- Returns
None
References
Planning.getPlanById Planning.getPlanByUri
- add_plan_items(work_items)[source]¶
Add plan records to the plan.
- Parameters
items – list of work_item_ids
- Returns
None
References
Planning.addPlanItems
- classmethod create(plan_id, plan_name, project_id, parent_id, template_id)[source]¶
Creates a new plan
- Parameters
plan_id (str) – The id of the new plan
plan_name – The name of the new plan
project_id (str) – The project the plan will be created in
parent_id – The id of the parent plan (can be null)
template_id – The id of the template used for this plan
- Returns
Plan Object
References
Planning.createPlan
- classmethod create_plan_template(template_id, template_name, project_id, parent_id)[source]¶
Creates a new plan template
- Parameters
template_id (str) – The id of the new template
template_name – The name of the new template
project_id (str) – The project the plan will be created in
parent_id – The id of the template the new template is based on (can be null)
- Returns
Plan Object
References
Planning.createPlanTemplate
- classmethod delete_plans(project_id, plan_ids)[source]¶
Delete specified plans
- Parameters
project_id – the project the plans will be deleted in
plan_ids – list of plan ids to delete.
- Returns
None
References
Planning.deletePlans
- get_statistics()[source]¶
get statistics of the plan
- Parameters
None –
- Returns
PlanStatistics object
References
Planning.getPlanStatistics
- get_wiki_content()[source]¶
Returns the wiki content of the plan
- Parameters
None –
- Returns
Text object
References
Planning.getPlanWikiContent
- remove_plan_items(work_items)[source]¶
Remove plan records to the plan.
- Parameters
items – list of work_item_ids
- Returns
None
References
Planning.removePlanItems
- classmethod search(query, sort='plan_id', limit=- 1, fields=[], search_templates=False)[source]¶
search plans or plan templates
- Args
query sort limit: the maximum number of records to be returned,
-1 for no limit.
fields: list of the fields requested.
- Returns
list of Plan objects
References
Planning.searchPlanTemplates Planning.searchPlanTemplatesWithFields Planning.searchPlans Planning.searchPlansWithFields
- set_wiki_content(content)[source]¶
method set_wiki_content updates the wiki for the current Plan
- Parameters
Content (str or Text object) –
- Returns
None
References
Planning.setPlanWikiContent
pylero.plan_record module¶
- class pylero.plan_record.PlanRecord(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns6:PlanRecord class
- item¶
- Type
_WorkItem
pylero.plan_statistics module¶
- class pylero.plan_statistics.PlanStatistics(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.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.PlanningConstraint(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns5:PlanningConstraint class
- constraint¶
- Type
- date¶
- Type
dateTime
pylero.priority_opt module¶
- class pylero.priority_opt.PriorityOpt(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns5:PriorityOpt class
- default¶
- Type
boolean
- enum_id¶
- Type
string
- float¶
- Type
float
- Type
boolean
- priority_opt_id¶
- Type
string
- name¶
- Type
string
- phantom¶
- Type
boolean
- properties¶
- Type
- sequence_number¶
- Type
int
pylero.priority_option_id module¶
- class pylero.priority_option_id.PriorityOptionId(id=None, uri=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns5:PriorityOptionId class
- id¶
- Type
string
pylero.product_license module¶
- class pylero.product_license.ProductLicense(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.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:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns4:Project class
- active¶
- Type
boolean
- finish¶
- Type
date
- location¶
- Type
str
- lock_work_records_date¶
- Type
date
- name¶
- Type
string
- project_group¶
- Type
- 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_locations()[source]¶
Gets the document locations (e.g. LiveDocuments) for a project.
- Parameters
None –
- Returns
list of (string) document locations
References
Tracker.getDocumentLocations
- 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
pylero.project_group module¶
- class pylero.project_group.ProjectGroup(uri=None, location=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns2:ProjectGroup class
- group_uris¶
- Type
- location¶
- Type
Location
- name¶
- Type
string
- parent_uri¶
- Type
- 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
pylero.properties module¶
- class pylero.properties.Properties(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.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:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns4:property class
- key¶
- Type
string
- value¶
- Type
string
pylero.revision module¶
- class pylero.revision.Revision(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.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
- 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, login, password, 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, login, password, 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
login – 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
pylero.session module¶
- 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
- class pylero.session.SoapNull[source]¶
Bases:
suds.plugin.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.
pylero.signature module¶
pylero.signature_context module¶
pylero.signature_data module¶
- class pylero.signature_data.SignatureData(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns5:SignatureData class
- target_status_id¶
- Type
string
- verdict¶
- Type
pylero.subterra_uri module¶
pylero.test_record module¶
- class pylero.test_record.TestRecord(project_id=None, test_case_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns3:TestRecord class
- Attributes (for specific details, see Polarion):
attachments (ArrayOfTestRunAttachment) comment (Text) defect_case_id (string) duration (float) executed (dateTime) executed_by (string) result (EnumOptionId) test_case_revision (string) test_case_id (string) test_step_results (ArrayOfTestStepResult)
pylero.test_run module¶
- class pylero.test_run.TestRun(test_run_id=None, suds_object=None, project_id=None, uri=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to manage the Polarion Test Management WS tns3:TestRun
- attachments¶
- Type
list of TestRunAttachments
- created¶
- Type
datetime
- document¶
- Type
Module
- finished_on¶
- Type
datetime
- group_id¶
- is_template¶
indicates if the TestRun object is a Template
- Type
bool
- keep_in_history¶
- Type
bool
- location¶
- query¶
The Polarion query that the TestRun objects are based on.
- Type
str
- records¶
- Type
list of TestRecord objects
- select_test_cases_by¶
- The test cases can be:
AUTOMATED_PROCESS DYNAMIC_QUERY DYNAMIC_LIVEDOC MANUAL_SELECTION STATIC_QUERY STATIC_LIVEDOC
- Type
- status¶
- summary_defect¶
- Type
_WorkItem
- test_run_id¶
Unique identifier of the test run within the project
- Type
str
- type¶
- updated¶
- custom_fields¶
- CUSTOM_FIELDS_FILE = '.polarion/testing/configuration/testrun-custom-fields.xml'¶
- __init__(test_run_id=None, suds_object=None, project_id=None, uri=None)[source]¶
TestRun constructor.
- Parameters
test_run_id – when given, the object is populated with the TestRuns. Requires project_id parameter
suds_object – Polarion TestRun object. When given, the object is populated by object data.
project_id – the Polarion project that the Test Run is located in. Required if test_run_id is passed in
uri – the uri that references the Polarion TestRun
Notes
Either test_run_id and project or suds_object 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
test_management.getTestRunById test_management.getTestRunByUri
- add_attachment(path, title)[source]¶
method add_attachment adds the given attachment to the current test run
- Parameters
path – file path to upload
title – u.User friendly name of the file
- Returns
None
Notes
Raises an error if the test run object is not populated
References
test_management.addAttachmentToTestRun
- add_attachment_to_test_record(test_case_id, path, title)[source]¶
method add_attachment_to_test_record, adds the given attachment to the specified test record
- Parameters
test_case_id (str) – The id of the test case
path – file path to upload
title – u.User friendly name of the file
- Returns
None
Notes
Raises an error if the test case given is not in the TestRun or has not been executed yet.
References
test_management.addAttachmentToTestRecord
- add_attachment_to_test_step(test_case_id, test_step_index, path, title)[source]¶
method add_attachment_to_test_step, adds the given attachment to the specified test step of the specified test record
- Parameters
test_case_id (str) – The id of the test case to the step is in
test_step_index (int) – The 0 based index of the test step
path – file path to upload
title – u.User friendly name of the file
- Returns
none
Notes
Raises an error if the record_index given is higher then the number of test records. or if the test_step_index is higher then the number of steps.
References
test_management.addAttachmentToTestStep
- add_test_record_by_fields(test_case_id, test_result, test_comment, executed_by, executed, duration, defect_work_item_id=None)[source]¶
method add_test_record_by_fields, adds a test record for the given test case based on the result fields passed in. When a test record is added, it changes the test run status to “inprogress” and when the last test record is run, it changes the status to done.
- Parameters
test_case_id (str) – The id of the test case that was executed
test_result (str) – Must be one of the following values: passed failed blocked
test_comment (str or Text object) – may be None
executed_by (str) – user id
executed (datetime) –
duration (float) –
defect_work_item_id (str) – _WorkItem id of defect, default: None
- Returns
None
References
test_management.addTestRecordToTestRun
- add_test_record_by_object(test_record)[source]¶
method add_test_record_by_object, adds a test record for the given test case based on the TestRecord object passed in
- Parameters
test_record (TestRecord or Polarion TestRecord) –
- Returns
None
References
test_management.addTestRecordToTestRun
- classmethod create(project_id, test_run_id=None, template=None, title=None, **kwargs)[source]¶
class method create for creating a new test run in Polarion
- Parameters
project_id (string) – the Polarion project to create the test run in
test_run_id (string) – the unique identifier for the test run, If the Enable Generated Test Run IDs option is marked in the configuration, it will ignore this field. If it is None, the title will be used.
template (string) – the id of the template to base the test run on. cannot be None. Because of the existing order of params before adding title, it is given a default value of None, which will cause an error if it is not populated
title (string) – To create a test run with a title. In this case, if the id is not populated it will be autogen. If it is populated, it will use that.
**kwargs – keyword arguments. Test run attributes can be passed in to be set upon creation. Required fields must be passed in
- Returns
The created TestRun object
References
test_management.createTestRun
- create_summary_defect(defect_template_id=None)[source]¶
method create_summary_defect, adds a new summary _WorkItem for the test case based on the _WorkItem template id passed in. If not template is passed in, it creates it based on the default template.
- Parameters
defect_template_id (str) – the _WorkItem template id to base the
default (new summary defect. can be null.) – None
- Returns
the created _WorkItem
References
test_management.createSummaryDefect
- classmethod create_template(project_id, template_id, parent_template_id='Empty', select_test_cases_by=None, query=None, doc_with_space=None, **kwargs)[source]¶
class method create_template for creating a new template in Polarion
- Parameters
project_id (string) – the Polarion project to create the test run in
template_id (string) – the unique identifier for the template
parent_template_id – the template that this is based on Default: “Empty”
select_test_cases_by – the method used to choose test cases NOTE: It is currently not possible to select test cases manually via the API. Default: None
query – the Lucene query, for query methods, default None
doc_with_space – the space/doc_name, for document methods default: None
**kwargs – keyword arguments. Test run attributes can be passed in to be set upon creation. Required fields must be passed in
- Returns
The created TestRun Template object
References
test_management.createTestRun
- delete_attachment(filename)[source]¶
Deletes Test Run Attachment specified by attachment’s file name. Method is applicable also on Test Run Template.
- Parameters
filename – filename to delete
- Returns
None
References
test_management.deleteTestRunAttachment
- delete_attachment_from_test_record(test_case_id, filename)[source]¶
Deletes Test Record Attachment of specified record and attachment’s file name.
- Parameters
test_case_id – The test case to delete the attachment from
filename – name of the file to delete
- Returns
None
References
test_management.deleteAttachmentFromTestRecord
- delete_attachment_from_test_step(test_case_id, test_step_index, filename)[source]¶
Deletes Test Step Attachment of the specified step in the specified test record.
- Parameters
test_case_id – The test case to delete the attachment from
filename – name of the file to delete
- Returns
None
References
test_management.deleteAttachmentFromTestRecord
- get_attachment(filename)[source]¶
Gets Test Run Attachment specified by attachment’s file name. Method is applicable also on Test Run Template.
- Parameters
filename – filename to delete
- Returns
TestRunAttachment object
References
test_management.getTestRunAttachment
- get_attachments()[source]¶
method get_attachments returns all the attachments for the TestRun
- Parameters
None –
- Returns
ArrayOfTestRunAttachments object
References
test_management.getTestRunAttachments
- get_custom_field(field_name)[source]¶
gets custom field values.
- Parameters
field_name – name of the custom field
- Returns
value of the custom field.
- Note: Polarion WSDL currently does not publish the list of custom
fields, so this function cannot do any verification if the field is valid.
- classmethod get_defined_custom_field_types(project_id)[source]¶
Gets all the custom fields defined for the specified project. the custom fields are all either of type CustomFieldType or EnumCustomFieldType in the case where the field is an enumeration. These 2 classes are mostly interchangeable.
- Parameters
project_id – the project to get the custom fields from
- Returns
list of all the custom fields
References
testmanagement.getDefinedTestRunCustomFieldTypes
- get_wiki_content()[source]¶
method get_wiki_content returns the wiki content for the Test Run
- Parameters
None –
- Returns
Text object containing the wiki content
References
test_management.getWikiContentForTestRun
- property records¶
function to return all the test records of a TestRun. The records array for dynamic queries/documents only includes executed records. This returns the unexecuted ones as well.
- Parameters
None –
- Returns
list of TestRecords
- classmethod search(query, fields=['test_run_id'], sort='test_run_id', limit=- 1, search_templates=False, project_id=None)[source]¶
class method search executes the given query and returns the results
- Parameters
query – the Polarion query used to find test runs
fields – test run fields that should be initialized, all other fields will be null. Field names are from the object’s attributes and not the Polarion field names, default [“test_run_id”]. If you want all of the fields to be returned, pass [] for this parameter.
sort – the field used to sort results, default is test_run_id
limit (int) – the maximum number of records to be returned, -1 for no limit, default -1.
search_templates (bool) – if set, searches the templates instead of the test runs, default False
project_id – if set, searches the project id, else default project
- Returns
list of TestRun objects
References
test_management.searchTestRunTemplates test_management.searchTestRunTemplatesLimited test_management.searchTestRunTemplatesWithFields test_management.searchTestRunTemplatesWithFieldsLimited test_management.searchTestRuns test_management.searchTestRunLimited test_management.searchTestRunsWithFields test_management.searchTestRunsWithFieldsLimited
- update()[source]¶
method update updates the testRun object with the attribute values currently in the object.
- Parameters
None –
- Returns
None
References
test_management.updateTestRun
- update_attachment(path, original_filename, title)[source]¶
method update_attachment updates the specified attachment to the current test run
- Parameters
path – file path to upload
original_filename – The file that we want to overwrite with the new file
title – u.User friendly name of the file
- Returns
None
Notes
Raises an error if the test run object is not populated.
References
test_management.updateTestRunAttachment
- update_summary_defect(source, total_failures, total_errors, total_tests, defect_template_id)[source]¶
method update-summary_defect creates or updates the summary defect Work Item of a test run.
- Parameters
source (string) – source of the summary defect, used to generate the description content.
total_failures (int) – amount of total failures in the test run, used to generate the description content.
total_errors (int) – amount of total errors in the test run, used to generate the description content.
total_tests (int) – amount of total tests in the test run, used to generate the description content.
defect_template_id – ID of the defect template Work Item to be used, the configured template will be used if None.
- Returns
the created or updated _WorkItem
References
test_management.updateSummaryDefect
- update_test_record_by_fields(test_case_id, test_result, test_comment, executed_by, executed, duration, defect_work_item_id=None)[source]¶
method update_test_record_by_fields updates a test record.
- Parameters
test_case_id – id of the test case to update.
test_result – Must be one of the following values: passed failed blocked
test_comment – (str or Text object) - may be None
executed_by (str) – user id
executed – date when the test case has been executed
duration – duration of the test case execution, any negative value is treated as None.
defect_work_item_id – _WorkItem id of defect, can be None Default: None
- Returns
None
Notes
Only a test case that has already been executed may be updated using this function. To execute a test record use the add_test_record_by_fields function
References
test_management.updateTestRecord
- update_test_record_by_object(test_case_id, test_record)[source]¶
method update_test_record_by_object, adds a test record for the given test case based on the TestRecord object passed in
- Parameters
test_case_id (str) – the test case id that the record is related to.
test_record (TestRecord or Polarion TestRecord) –
- Returns
None
References
test_management.updateTestRecordAtIndex
- update_wiki_content(content)[source]¶
method update_wiki_content updates the wiki for the current TestRun
- Parameters
Content (str or Text object) –
- Returns
None
References
test_management.updateWikiContentForTestRun
pylero.test_run_attachment module¶
- class pylero.test_run_attachment.TestRunAttachment(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns4:TestRunAttachment class
- file_name¶
- Type
string
- id¶
- Type
string
- length¶
- Type
long
- test_run_uri¶
- Type
- title¶
- Type
string
- updated¶
- Type
dateTime
- url¶
- Type
string
pylero.test_step module¶
- class pylero.test_step.TestStep(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns3:TestStep class
- values¶
- Type
pylero.test_step_result module¶
- class pylero.test_step_result.TestStepResult(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns3:TestStepResult class
- attachments¶
- result¶
- Type
pylero.test_steps module¶
- class pylero.test_steps.TestSteps(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns3:TestSteps class
- keys¶
- Type
- steps¶
- Type
pylero.tests_configuration module¶
- class pylero.tests_configuration.TestsConfiguration(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.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
- defect_to_test_case_link_role_id¶
- Type
string
- defect_work_item_type¶
- Type
string
- defects_project¶
- Type
string
- fields_to_copy_from_test_case_to_defect¶
- Type
- fields_to_copy_from_test_run_to_linked_defect¶
- Type
- fields_to_copy_from_test_run_to_new_defect¶
- Type
- 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:
pylero.base_polarion.BasePolarion
Object containing list of Text objects
- class pylero.text.Text(content=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.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
pylero.time_point module¶
pylero.user module¶
- class pylero.user.User(user_id=None, suds_object=None, uri=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns3:User class
- disabled_notifications¶
- Type
boolean
- email¶
- Type
string
- user_id¶
- Type
string
- name¶
- Type
string
- vote_uris¶
- Type
- watche_uris¶
- Type
- __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
pylero.wiki_page module¶
- class pylero.wiki_page.WikiPage(fields=None, uri=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns3:WikiPage class
- attachments¶
- created¶
- Type
dateTime
- wiki_page_id¶
- Type
string
- linked_page_uris¶
- Type
- location¶
- Type
Location
- page_location¶
- Type
Location
- page_name¶
- Type
string
- space_id¶
- Type
string
- title¶
- Type
string
- type¶
- Type
string
- updated¶
- Type
dateTime
- __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.WikiPageAttachment(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.BasePolarion
Object to handle the Polarion WSDL tns3:WikiPageAttachment class
- 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¶
- class pylero.work_item.BusinessCase(project_id=None, work_item_id=None, suds_object=None, uri=None, fields=None, revision=None)¶
Bases:
pylero.work_item._SpecificWorkItem
- class pylero.work_item.ChangeRequest(project_id=None, work_item_id=None, suds_object=None, uri=None, fields=None, revision=None)¶
Bases:
pylero.work_item._SpecificWorkItem
- class pylero.work_item.Defect(project_id=None, work_item_id=None, suds_object=None, uri=None, fields=None, revision=None)¶
Bases:
pylero.work_item._SpecificWorkItem
- class pylero.work_item.IncidentReport(project_id=None, work_item_id=None, suds_object=None, uri=None, fields=None, revision=None)¶
Bases:
pylero.work_item._SpecificWorkItem
- class pylero.work_item.JenkinsJobs(project_id=None, work_item_id=None, suds_object=None, uri=None, fields=None, revision=None)¶
Bases:
pylero.work_item._SpecificWorkItem
- class pylero.work_item.Requirement(project_id=None, work_item_id=None, suds_object=None, uri=None, fields=None, revision=None)¶
Bases:
pylero.work_item._SpecificWorkItem
- class pylero.work_item.Risk(project_id=None, work_item_id=None, suds_object=None, uri=None, fields=None, revision=None)¶
Bases:
pylero.work_item._SpecificWorkItem
- class pylero.work_item.Task(project_id=None, work_item_id=None, suds_object=None, uri=None, fields=None, revision=None)¶
Bases:
pylero.work_item._SpecificWorkItem
- class pylero.work_item.TestCase(project_id=None, work_item_id=None, suds_object=None, uri=None, fields=None, revision=None)¶
Bases:
pylero.work_item._SpecificWorkItem
- class pylero.work_item.TestSuite(project_id=None, work_item_id=None, suds_object=None, uri=None, fields=None, revision=None)¶
Bases:
pylero.work_item._SpecificWorkItem
- pylero.work_item.newclass¶
alias of
pylero.work_item.JenkinsJobs
pylero.work_record module¶
pylero.workflow_action module¶
- class pylero.workflow_action.WorkflowAction(obj_id=None, suds_object=None)[source]¶
Bases:
pylero.base_polarion.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
- Type
string