ChangeSet#
The ChangeSet is the output of
calculate_change_set()
and uses the
declarative modelling syntax of capellambse. An
example for the initial migration of the snapshot example:
- parent: !uuid 3be8d0fc-c693-4b9b-8fa1-d59a9eec6ea4
modify:
identifier: project/space/example title
long_name: example title
extend:
requirement_types_folders:
- long_name: Types
identifier: "-2"
data_type_definitions:
- identifier: type
long_name: Type
values:
- identifier: unset
long_name: Unset
promise_id: EnumValue type unset
- identifier: functional
long_name: Functional
promise_id: EnumValue type functional
promise_id: EnumerationDataTypeDefinition type
_type: EnumerationDataTypeDefinition
- identifier: release
long_name: Release
values:
- identifier: featureRel.1
long_name: Feature Rel. 1
promise_id: EnumValue release featureRel.1
- identifier: featureRel.2
long_name: Feature Rel. 2
promise_id: EnumValue release featureRel.2
promise_id: EnumerationDataTypeDefinition release
_type: EnumerationDataTypeDefinition
requirement_types:
- identifier: system_requirement
long_name: System Requirement
promise_id: RequirementType system_requirement
attribute_definitions:
- identifier: capellaID system_requirement
long_name: Capella ID
promise_id: AttributeDefinition capellaID system_requirement
_type: AttributeDefinition
- identifier: type system_requirement
long_name: Type
data_type: !promise EnumerationDataTypeDefinition type
multi_valued: false
promise_id: AttributeDefinitionEnumeration type system_requirement
_type: AttributeDefinitionEnumeration
- identifier: submittedAt system_requirement
long_name: Submitted at
promise_id: AttributeDefinition submittedAt system_requirement
_type: AttributeDefinition
- identifier: release system_requirement
long_name: Release
data_type: !promise EnumerationDataTypeDefinition release
multi_valued: true
promise_id: AttributeDefinitionEnumeration release system_requirement
_type: AttributeDefinitionEnumeration
- identifier: software_requirement
long_name: Software Requirement
promise_id: RequirementType software_requirement
attribute_definitions:
- identifier: capellaID software_requirement
long_name: Capella ID
promise_id: AttributeDefinition capellaID software_requirement
_type: AttributeDefinition
- identifier: type software_requirement
long_name: Type
data_type: !promise EnumerationDataTypeDefinition type
multi_valued: false
promise_id: AttributeDefinitionEnumeration type software_requirement
_type: AttributeDefinitionEnumeration
- identifier: submittedAt software_requirement
long_name: Submitted at
promise_id: AttributeDefinition submittedAt software_requirement
_type: AttributeDefinition
- identifier: stakeholder_requirement
long_name: Stakeholder Requirement
promise_id: RequirementType stakeholder_requirement
attribute_definitions:
- identifier: capellaID stakeholder_requirement
long_name: Capella ID
promise_id: AttributeDefinition capellaID stakeholder_requirement
_type: AttributeDefinition
folders:
- long_name: Functional Requirements
identifier: REQ-001
text: <p>Test Description</p>
type: !promise RequirementType system_requirement
folders:
- long_name: Kinds
identifier: REQ-003
type: !promise RequirementType software_requirement
requirements:
- long_name: Kind Requirement
identifier: REQ-004
type: !promise RequirementType stakeholder_requirement
attributes:
- definition: !promise AttributeDefinition capellaID stakeholder_requirement
value: R-FNC-00002
_type: string
requirements:
- long_name: Function Requirement
identifier: REQ-002
text: "..."
type: !promise RequirementType system_requirement
attributes:
- definition: !promise AttributeDefinition capellaID system_requirement
value: R-FNC-00001
_type: string
- definition: !promise AttributeDefinitionEnumeration type system_requirement
values:
- !promise EnumValue type functional
_type: enum
- definition: !promise AttributeDefinitionEnumeration release system_requirement
values:
- !promise EnumValue release featureRel.1
- !promise EnumValue release featureRel.2
_type: enum
- definition: !promise AttributeDefinition submittedAt system_requirement
value: 2022-06-30 17:07:18.664000+02:00
_type: date
The following ChangeSet shows modifications (i.e. synchronizations) after the initial migration:
- parent: !uuid 686e198b-8baf-49f9-9d85-24571bd05d93
extend:
values:
- identifier: nonFunctional
long_name: Non-Functional
promise_id: EnumValue type nonFunctional
- parent: !uuid 98aaca05-d47f-4916-a9f9-770dc60aa04f
extend:
values:
- identifier: rel.1
long_name: Rel. 1
promise_id: EnumValue release rel.1
delete:
values:
- !uuid e91aa844-584d-451d-a201-2bb7bf13dcb0
- !uuid 3a39327a-a40d-47a6-a054-d29b1851e478
- parent: !uuid 02bb4cdd-52cc-4fc3-af1c-e57dad8c51de
extend:
attribute_definitions:
- identifier: testAfterMigration system_requirement
long_name: Test after migration
promise_id: AttributeDefinition testAfterMigration system_requirement
_type: AttributeDefinition
- parent: !uuid cbc96c24-58c9-4292-9dfa-1ecb5ee16a82
modify:
long_name: Stakeholders Requirement
- parent: !uuid b2c39449-ebbe-43cb-a712-22c740707a8b
modify:
long_name: Non-Functional Requirements
text: <p>Changed Test Description</p>
extend:
attributes:
- definition: !uuid 87af9e2a-41b6-4962-a57e-eb695e0a03ad
value: RF-NFNC-00001
_type: string
- definition: !uuid 12d97ef4-8b6e-4d45-8b3d-a1b6fe5b8aed
values:
- !promise EnumValue type nonFunctional
_type: enum
- definition: !uuid e46d4629-da10-4f7f-954e-146bd2697638
values:
- !promise EnumValue release rel.1
_type: enum
- parent: !uuid 25ccf941-17ed-4226-847b-040575922283
modify:
long_name: Non-Function Requirement
extend:
attributes:
- definition: !promise AttributeDefinition testAfterMigration system_requirement
value: New
_type: string
delete:
attributes:
- !uuid 0386897b-1e6c-41d0-bb9f-0127c6afe2f1
- parent: !uuid dda9887a-a0a2-4d58-9040-9b023544b5b4
modify:
value: R-NFNC-00002
- parent: !uuid 6708cf60-2f06-4ccf-9973-21a035415ccb
modify:
values:
- !promise EnumValue type nonFunctional
- parent: !uuid 9a9b5a8f-a6ad-4610-9e88-3b5e9c943c19
modify:
long_name: Functional Requirements
text: <p>Brand new</p>
- parent: !uuid 163394f5-c1ba-4712-a238-b0b143c66aed
modify:
long_name: Function Requirement
type: !uuid bde333d5-141d-4ced-acf8-6f8507337c90
delete:
attributes:
- !uuid 1fca2a91-c678-448c-ad44-c80b0e174e55
extend:
attributes:
- definition: !uuid 7c3a47a0-efff-4cda-baae-0ef3bfb2cbed
value: R-FNC-00001
_type: string
- definition: !uuid 79ffc1c8-38d3-4c65-a45f-c9f52de30834
values:
- !uuid 61d37f6e-b821-49fa-b68d-c4ff48b8cbbf
_type: enum
- parent: !uuid 3be8d0fc-c693-4b9b-8fa1-d59a9eec6ea4
extend:
folders:
- !uuid 9a9b5a8f-a6ad-4610-9e88-3b5e9c943c19
Then an example for deletions is given by:
- parent: !uuid 686e198b-8baf-49f9-9d85-24571bd05d93
delete:
values:
- !uuid 5a03662a-d602-4524-8706-5bf83275ee2a
- parent: !uuid 02bb4cdd-52cc-4fc3-af1c-e57dad8c51de
delete:
attribute_definitions:
- !uuid e46d4629-da10-4f7f-954e-146bd2697638
- long_name Test after migration # dynamically generated object
- parent: !uuid a15e8b60-bf39-47ba-b7c7-74ceecb25c9c
delete:
data_type_definitions:
- !uuid 98aaca05-d47f-4916-a9f9-770dc60aa04f
requirement_types:
- !uuid cbc96c24-58c9-4292-9dfa-1ecb5ee16a82
- parent: !uuid b2c39449-ebbe-43cb-a712-22c740707a8b
delete:
attributes:
- definition.long_name Release # dynamically generated object
requirements:
- !uuid 25ccf941-17ed-4226-847b-040575922283
- parent: !uuid 3be8d0fc-c693-4b9b-8fa1-d59a9eec6ea4
delete:
folders:
- !uuid 9a9b5a8f-a6ad-4610-9e88-3b5e9c943c19
A module in the snapshot is resolved in the
TrackerChange
and its method
calculate_change()
:
- class capella_rm_bridge.changeset.change.TrackerChange
- TrackerChange.__init__(tracker, model, config, gather_logs=True)
Construct a
TrackerChange
.- Parameters:
tracker – Is a mapping that has
id
,data_types
,requirement_types
anditems
defined. Maybe called module in different RM tools.model – An instance of
MelodyModel
for comparison with the snapshot.config – A configuration for the module (tracker).
- Raises:
InvalidTrackerConfig – If the given
config
is missing any of the mandatory keys (uuid, project and/or title).MissingCapellaModule – If the model is missing a
CapellaModule
from the UUID declared in theconfig
.InvalidWorkItemType – May be raised during
TrackerChange.calculate_change()
if an unknown ID of a RequirementType is used (i.e. the integrity of therequirement_types
section in the snapshot is broken).InvalidFieldValue – May be raised during
TrackerChange.calculate_change()
if it is tried to set an unavailable field value (i.e. the integrity of theattributes
of a work item is broken).
- TrackerChange.calculate_change()
Render actions for CapellaModule synchronization.
Handles synchronization of RequirementTypesFolder first and Requirements and Folders afterwards. If no RequirementTypesFolder was found an action for creation will be added to the actions. Work items are searched by the
identifier
. Location changes of work items will invalidate deletions.