Skip to content

Commit

Permalink
openstack add new samples
Browse files Browse the repository at this point in the history
  • Loading branch information
kris96 committed Mar 13, 2019
1 parent 4c36d23 commit cfe3439
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 16 deletions.
12 changes: 12 additions & 0 deletions samples/resources/openstack/mandatory-description.xml
@@ -0,0 +1,12 @@
<objectTemplate xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3" xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3" xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3" xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3" xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3" oid="b2b8fde7-6371-42ae-a234-16475a8c5462" version="6">
<name>
Mandatory description
</name>
<item id="1">
<c:ref>c:description</c:ref>
<limitations>
<layer>presentation</layer>
<minOccurs>1</minOccurs>
</limitations>
</item>
</objectTemplate>
34 changes: 34 additions & 0 deletions samples/resources/openstack/object-template-for-project.xml
@@ -0,0 +1,34 @@
<objectTemplate xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
oid="99cc8d77-dedc-4444-a081-b006821a9c79" version="58">
<name>Project Template</name>
<mapping>
<name>Adding project to top level OrgStructure</name>
<strength>strong</strength>
<expression>
<assignmentTargetSearch xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="c:AssignmentTargetSearchExpressionEvaluatorType">
<targetType>c:OrgType</targetType>
<filter>
<q:equal>
<q:path>c:name</q:path>
<expression>
<script>
<code>
return 'Projects'
</code>
</script>
</expression>
</q:equal>
</filter>
</assignmentTargetSearch>
</expression>
<target>
<c:path>assignment</c:path>
</target>
</mapping>
</objectTemplate>
107 changes: 91 additions & 16 deletions samples/resources/openstack/resource-openstack-connector.xml
@@ -1,7 +1,6 @@
<resource xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3" xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3" xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3" xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3" xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3" oid="137edf3a-104e-49b4-9dcb-14db1062c8f3">
<name>Openstack Keystone </name>


<connectorRef type="ConnectorType">
<filter>
<q:and>
Expand All @@ -23,9 +22,7 @@
<gen233:domainName>domainName</gen233:domainName>
</icfc:configurationProperties>
</connectorConfiguration>




<schemaHandling>
<objectType>
<kind>entitlement</kind>
Expand Down Expand Up @@ -68,6 +65,23 @@
<c:path>$focus/identifier</c:path>
</target>
</inbound>
</attribute>
<attribute>
<c:ref>ri:description</c:ref>
<tolerant>true</tolerant>
<exclusiveStrong>false</exclusiveStrong>
<outbound>
<strength>strong</strength>
<source>
<c:path>$focus/description</c:path>
</source>
</outbound>
<inbound>
<strength>weak</strength>
<target>
<c:path>$focus/description</c:path>
</target>
</inbound>
</attribute>
<association>
<c:ref>ri:group_in_roles</c:ref>
Expand Down Expand Up @@ -136,12 +150,21 @@
</inbound>
</attribute>
<attribute>
<c:ref>ri:description</c:ref>
<c:ref>ri:description</c:ref>
<tolerant>true</tolerant>
<exclusiveStrong>false</exclusiveStrong>
<outbound>
<expression>
<value>Created by IDM</value>
</expression>
<strength>strong</strength>
<source>
<c:path>$user/description</c:path>
</source>
</outbound>
<inbound id="65">
<strength>weak</strength>
<target>
<c:path>$user/description</c:path>
</target>
</inbound>
</attribute>
<association>
<c:ref>ri:user_in_groups</c:ref>
Expand Down Expand Up @@ -173,7 +196,6 @@
<valueAttribute>icfs:uid</valueAttribute>
<explicitReferentialIntegrity>false</explicitReferentialIntegrity>
</association>

<protected>
<filter>
<q:equal>
Expand All @@ -183,6 +205,25 @@
</q:equal>
</filter>
</protected>
<activation>
<administrativeStatus>
<outbound id="57">
<strength>strong</strength>
<expression>
<script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="c:ScriptExpressionEvaluatorType">
<code>
import com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType;
if (legal) {
input;
} else {
ActivationStatusType.DISABLED;
}
</code>
</script>
</expression>
</outbound>
</administrativeStatus>
</activation>
<credentials>
<password xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="c:ResourcePasswordDefinitionType">
<outbound>
Expand All @@ -193,7 +234,7 @@
</password>
</credentials>
</objectType>
<objectType>
<objectType>
<kind>entitlement</kind>
<intent>Project</intent>
<default>false</default>
Expand All @@ -219,15 +260,32 @@
</script>
</expression>
<target>
<c:path>$focus/orgType</c:path>
<c:path>$focus/subtype</c:path>
</target>
</inbound>
</attribute>
<attribute>
<c:ref>icfs:uid</c:ref>
<inbound>
<target>
<c:path>identifier</c:path>
<c:path>$focus/identifier</c:path>
</target>
</inbound>
</attribute>
<attribute>
<c:ref>ri:description</c:ref>
<tolerant>true</tolerant>
<exclusiveStrong>false</exclusiveStrong>
<outbound>
<strength>strong</strength>
<source>
<c:path>$focus/description</c:path>
</source>
</outbound>
<inbound>
<strength>weak</strength>
<target>
<c:path>$focus/description</c:path>
</target>
</inbound>
</attribute>
Expand Down Expand Up @@ -297,7 +355,7 @@
</script>
</expression>
<target>
<c:path>$focus/orgType</c:path>
<c:path>$focus/subtype</c:path>
</target>
</inbound>
<inbound>
Expand All @@ -312,11 +370,27 @@
<c:path>$focus/identifier</c:path>
</target>
</inbound>
</attribute>
<attribute>
<c:ref>ri:description</c:ref>
<tolerant>true</tolerant>
<exclusiveStrong>false</exclusiveStrong>
<outbound>
<strength>strong</strength>
<source>
<c:path>$focus/description</c:path>
</source>
</outbound>
<inbound>
<strength>weak</strength>
<target>
<c:path>$focus/description</c:path>
</target>
</inbound>
</attribute>
</objectType>
</schemaHandling>


</schemaHandling>

<synchronization>
<objectSynchronization>
<name>Users sync</name>
Expand Down Expand Up @@ -420,6 +494,7 @@
</expression>
</q:equal>
</correlation>
<objectTemplateRef oid="99cc8d77-dedc-4444-a081-b006821a9c79"/>
<reconcile>false</reconcile>
<reaction>
<situation>linked</situation>
Expand Down

0 comments on commit cfe3439

Please sign in to comment.