blob: 60866537b019369ab2713c0a9f17317fd13b253b [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<flatnetwork>
<command>
<name>createUser</name>
<testcase>Creating user</testcase>
<parameters>
<item random="true">
<name>username</name>
</item>
<item>
<name>password</name>
<value>apiuser</value>
</item>
<item>
<name>firstname</name>
<value>apiuser</value>
</item>
<item>
<name>lastname</name>
<value>apiuser</value>
</item>
<item>
<name>email</name>
<value>apiuser@gmail.com</value>
</item>
<item>
<name>accounttype</name>
<value>0</value>
</item>
</parameters>
<returnvalue>
<item setparam="true">
<name>id</name>
<param>userid</param>
</item>
<item setparam="true">
<name>account</name>
<param>accountname</param>
</item>
</returnvalue>
</command>
<command>
<name>registerUserKeys</name>
<testcase>Registering the user</testcase>
<parameters>
<item getparam="true">
<name>id</name>
<param>userid</param>
</item>
</parameters>
<returnvalue>
<item setparam="true">
<name>apikey</name>
<param>apikey</param>
</item>
<item setparam="true">
<name>secretkey</name>
<param>secretkey</param>
</item>
</returnvalue>
</command>
<command>
<name>createNetworkGroup</name>
<usercommand>true</usercommand>
<testcase>Creating a network group</testcase>
<parameters>
<item getparam="true">
<name>name</name>
<param>accountname</param>
</item>
</parameters>
</command>
<command>
<name>authorizeNetworkGroupIngress</name>
<testcase>Authorizing network group ingress</testcase>
<parameters>
<item getparam="true">
<name>networkgroupname</name>
<param>accountname</param>
</item>
<item>
<name>cidrlist</name>
<value>192.168.1.143/32</value>
</item>
<item>
<name>endport</name>
<value>22</value>
</item>
<item>
<name>startport</name>
<value>22</value>
</item>
<item>
<name>protocol</name>
<value>tcp</value>
</item>
<item getparam="true">
<name>account</name>
<param>accountname</param>
</item>
<item>
<name>domainid</name>
<value>1</value>
</item>
</parameters>
</command>
<command>
<name>deployVirtualMachine</name>
<usercommand>true</usercommand>
<testcase>Deploying vm</testcase>
<parameters>
<item getparam="true">
<name>zoneid</name>
<param>globalzoneid</param>
</item>
<item getparam="true">
<name>serviceofferingid</name>
<param>flatnetworkserviceofferingid</param>
</item>
<item getparam="true">
<name>networkgrouplist</name>
<param>accountname</param>
</item>
<item getparam="true">
<name>templateid</name>
<param>globaltemplateid</param>
</item>
</parameters>
<returnvalue>
<item setparam="true">
<name>id</name>
<param>vmid</param>
</item>
<item setparam="true">
<name>ipaddress</name>
<param>vmip</param>
</item>
</returnvalue>
</command>
<command>
<name>deployVirtualMachine</name>
<usercommand>true</usercommand>
<testcase>Deploying vm</testcase>
<parameters>
<item getparam="true">
<name>zoneid</name>
<param>globalzoneid</param>
</item>
<item getparam="true">
<name>serviceofferingid</name>
<param>flatnetworkserviceofferingid</param>
</item>
<item getparam="true">
<name>networkgrouplist</name>
<param>accountname</param>
</item>
<item getparam="true">
<name>templateid</name>
<param>globaltemplateid</param>
</item>
</parameters>
<returnvalue>
<item setparam="true">
<name>id</name>
<param>vmid1</param>
</item>
</returnvalue>
</command>
<command>
<name>createVolume</name>
<usercommand>true</usercommand>
<testcase>Creating a volume</testcase>
<parameters>
<item random="true">
<name>name</name>
</item>
<item getparam="true">
<name>zoneid</name>
<param>globalzoneid</param>
</item>
<item getparam="true">
<name>diskofferingid</name>
<param>flatnetworkdiskofferingid</param>
</item>
</parameters>
<returnvalue>
<item setparam="true">
<name>id</name>
<param>volumeid</param>
</item>
</returnvalue>
</command>
<command>
<name>attachVolume</name>
<usercommand>true</usercommand>
<testcase>Attaching the volume</testcase>
<parameters>
<item getparam="true">
<name>id</name>
<param>volumeid</param>
</item>
<item getparam="true">
<name>virtualmachineid</name>
<param>vmid</param>
</item>
</parameters>
</command>
<command>
<name>sleep.sh</name>
<script>true</script>
<testcase>Sleep for 2 min</testcase>
<parameters>
<item>
<name>s</name>
<value>120</value>
</item>
</parameters>
</command>
<command>
<name>ssh.sh</name>
<script>true</script>
<testcase>Ssh test for the vm</testcase>
<parameters>
<item getparam="true">
<name>h</name>
<param>vmip</param>
</item>
<item>
<name>p</name>
<value>rs-ccb35ea5</value>
</item>
</parameters>
</command>
<command>
<name>sleep.sh</name>
<script>true</script>
<testcase>Sleep for 1 min</testcase>
<parameters>
<item>
<name>s</name>
<value>60</value>
</item>
</parameters>
</command>
<command>
<name>stopVirtualMachine</name>
<usercommand>true</usercommand>
<testcase>Stopping vm</testcase>
<parameters>
<item getparam="true">
<name>id</name>
<param>vmid</param>
</item>
</parameters>
</command>
<command>
<name>startVirtualMachine</name>
<usercommand>true</usercommand>
<testcase>Starting vm</testcase>
<parameters>
<item getparam="true">
<name>id</name>
<param>vmid</param>
</item>
</parameters>
</command>
<command>
<name>rebootVirtualMachine</name>
<usercommand>true</usercommand>
<testcase>Rebooting vm</testcase>
<parameters>
<item getparam="true">
<name>id</name>
<param>vmid</param>
</item>
</parameters>
</command>
<command>
<name>detachVolume</name>
<usercommand>true</usercommand>
<testcase>Detaching volume</testcase>
<parameters>
<item getparam="true">
<name>id</name>
<param>volumeid</param>
</item>
</parameters>
</command>
<command>
<name>attachVolume</name>
<usercommand>true</usercommand>
<testcase>Attaching the volume</testcase>
<parameters>
<item getparam="true">
<name>id</name>
<param>volumeid</param>
</item>
<item getparam="true">
<name>virtualmachineid</name>
<param>vmid1</param>
</item>
</parameters>
</command>
<command>
<name>stopVirtualMachine</name>
<usercommand>true</usercommand>
<testcase>Stopping vm</testcase>
<parameters>
<item getparam="true">
<name>id</name>
<param>vmid</param>
</item>
</parameters>
</command>
<command>
<name>startVirtualMachine</name>
<usercommand>true</usercommand>
<testcase>Starting vm</testcase>
<parameters>
<item getparam="true">
<name>id</name>
<param>vmid1</param>
</item>
</parameters>
</command>
<command>
<name>rebootVirtualMachine</name>
<usercommand>true</usercommand>
<testcase>Rebooting vm</testcase>
<parameters>
<item getparam="true">
<name>id</name>
<param>vmid1</param>
</item>
</parameters>
</command>
<command>
<name>detachVolume</name>
<usercommand>true</usercommand>
<testcase>Detaching volume</testcase>
<parameters>
<item getparam="true">
<name>id</name>
<param>volumeid</param>
</item>
</parameters>
</command>
<command>
<name>deleteVolume</name>
<usercommand>true</usercommand>
<testcase>Deleting volume</testcase>
<parameters>
<item getparam="true">
<name>id</name>
<param>volumeid</param>
</item>
</parameters>
</command>
<command>
<name>createVolume</name>
<usercommand>true</usercommand>
<testcase>Creating a new volume</testcase>
<parameters>
<item random="true">
<name>name</name>
</item>
<item getparam="true">
<name>zoneid</name>
<param>globalzoneid</param>
</item>
<item getparam="true">
<name>diskofferingid</name>
<param>flatnetworkdiskofferingid</param>
</item>
</parameters>
<returnvalue>
<item setparam="true">
<name>id</name>
<param>volumeid</param>
</item>
</returnvalue>
</command>
<command>
<name>attachVolume</name>
<usercommand>true</usercommand>
<testcase>Attaching the volume to the vm</testcase>
<parameters>
<item getparam="true">
<name>id</name>
<param>volumeid</param>
</item>
<item getparam="true">
<name>virtualmachineid</name>
<param>vmid</param>
</item>
</parameters>
</command>
<command>
<name>revokeNetworkGroupIngress</name>
<testcase>Revoking network group igress</testcase>
<parameters>
<item getparam="true">
<name>networkgroupname</name>
<param>accountname</param>
</item>
<item>
<name>cidrlist</name>
<value>192.168.1.143/32</value>
</item>
<item>
<name>endport</name>
<value>22</value>
</item>
<item>
<name>startport</name>
<value>22</value>
</item>
<item>
<name>protocol</name>
<value>tcp</value>
</item>
<item getparam="true">
<name>account</name>
<param>accountname</param>
</item>
<item>
<name>domainid</name>
<value>1</value>
</item>
</parameters>
</command>
<command>
<name>ssh.sh</name>
<script>true</script>
<error>true</error>
<testcase>Ssh test for the vm - should fail as network group is revoked</testcase>
<parameters>
<item getparam="true">
<name>h</name>
<param>vmip</param>
</item>
<item>
<name>p</name>
<value>password</value>
</item>
</parameters>
</command>
<command>
<name>destroyVirtualMachine</name>
<usercommand>true</usercommand>
<testcase>Destroying virtual machine</testcase>
<parameters>
<item getparam="true">
<name>id</name>
<param>vmid</param>
</item>
</parameters>
</command>
<command>
<name>sleep.sh</name>
<script>true</script>
<testcase>Sleep for 2 min</testcase>
<parameters>
<item>
<name>s</name>
<value>120</value>
</item>
</parameters>
</command>
<!-- Delete user as a part of cleanup -->
<command>
<name>deleteUser</name>
<testcase>Deleting the user</testcase>
<parameters>
<item getparam="true">
<name>id</name>
<param>userid</param>
</item>
</parameters>
</command>
</flatnetwork>