blob: c3ff3ac38ef00aa557c68577cc3eb6f5a08353a9 [file] [log] [blame]
Madan Jampani9e1a8c12016-06-27 11:19:10 -07001<!--
2 ~ Copyright 2016-present Open Networking Laboratory
3 ~
4 ~ Licensed under the Apache License, Version 2.0 (the "License");
5 ~ you may not use this file except in compliance with the License.
6 ~ You may obtain a copy of the License at
7 ~
8 ~ http://www.apache.org/licenses/LICENSE-2.0
9 ~
10 ~ Unless required by applicable law or agreed to in writing, software
11 ~ distributed under the License is distributed on an "AS IS" BASIS,
12 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ~ See the License for the specific language governing permissions and
14 ~ limitations under the License.
15-->
16
Ray Milkey685e34d2016-09-01 12:01:09 -070017<scenario name="distributed-value-test"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070018 description="ONOS AtomicValue distributed primitive Test">
19 <group name="Distributed-Primitive-Value">
20
21 <!--<import file="${ONOS_SCENARIOS}/setup.xml"/>
22 <dependency name="Setup" requires="Prerequisites"/>-->
23
Ray Milkey685e34d2016-09-01 12:01:09 -070024 <step name="Distributed-Primitive-Value.Activate-Distributed-Primitives-App"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070025 exec="onos ${OCI} app activate org.onosproject.distributedprimitives"/>
26
Ray Milkey685e34d2016-09-01 12:01:09 -070027 <step name="Distributed-Primitive-Value.Test-Value-Initial-Value" requires="Distributed-Primitive-Value.Activate-Distributed-Primitives-App"
Madan Jampani145623d2016-07-22 14:55:57 -070028 exec="onos-cluster-execute-expect value-test test-value get --expect null"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070029
Ray Milkey685e34d2016-09-01 12:01:09 -070030 <step name="Distributed-Primitive-Value.Test-Value-Set" requires="Distributed-Primitive-Value.Test-Value-Initial-Value"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070031 exec="onos ${OCI} value-test test-value set v0"/>
32
Ray Milkey685e34d2016-09-01 12:01:09 -070033 <step name="Distributed-Primitive-Value.Test-Value-Get" requires="Distributed-Primitive-Value.Test-Value-Set"
Madan Jampani145623d2016-07-22 14:55:57 -070034 exec="onos-cluster-execute-expect value-test test-value get --expect v0"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070035
Ray Milkey685e34d2016-09-01 12:01:09 -070036 <step name="Distributed-Primitive-Value.Test-Value-CompareAndSet-False" requires="Distributed-Primitive-Value.Test-Value-Get"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070037 exec="onos-execute-expect ${OCI} value-test test-value compareAndSet v1 v2 --expect false"/>
38
Ray Milkey685e34d2016-09-01 12:01:09 -070039 <step name="Distributed-Primitive-Value.Test-Value-Not-Updated-After-CAS" requires="Distributed-Primitive-Value.Test-Value-CompareAndSet-False"
Madan Jampani145623d2016-07-22 14:55:57 -070040 exec="onos-cluster-execute-expect value-test test-value get --expect v0"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070041
Ray Milkey685e34d2016-09-01 12:01:09 -070042 <step name="Distributed-Primitive-Value.Test-Value-CompareAndSet-True" requires="Distributed-Primitive-Value.Test-Value-Not-Updated-After-CAS"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070043 exec="onos-execute-expect ${OCI} value-test test-value compareAndSet v0 v1 --expect true"/>
44
Ray Milkey685e34d2016-09-01 12:01:09 -070045 <step name="Distributed-Primitive-Value.Test-Value-Updated-After-CAS" requires="Distributed-Primitive-Value.Test-Value-CompareAndSet-True"
Madan Jampani145623d2016-07-22 14:55:57 -070046 exec="onos-cluster-execute-expect value-test test-value get --expect v1"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070047
Ray Milkey685e34d2016-09-01 12:01:09 -070048 <step name="Distributed-Primitive-Value.Destroy-Value" requires="Distributed-Primitive-Value.Test-Value-Updated-After-CAS"
49 exec="onos ${OCI} value-test test-value set null"/>
50
Madan Jampani9e1a8c12016-06-27 11:19:10 -070051 <!--Check with check logs-->
Ray Milkey685e34d2016-09-01 12:01:09 -070052 <step name="Distributed-Primitive-Value.Check-Log-Exceptions" requires="Distributed-Primitive-Value.Destroy-Value"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070053 exec="onos-check-logs ${OCI}"/>
54
Ray Milkey685e34d2016-09-01 12:01:09 -070055 <step name="Distributed-Primitive-Value.Teardown-Distributed-Primitives-Test-App" requires="Distributed-Primitive-Value.Check-Log-Exceptions"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070056 exec="onos ${OCI} app deactivate org.onosproject.distributedprimitives"/>
57 </group>
58</scenario>
59