Description:
There is a need to have a decorator through which user can specify cluster information like number of servers, moms, comms and clients etc. required for a particular test to run.


Forum: http://community.pbspro.org/t/pp-1281-new-decorator-in-ptl-using-which-user-can-provide-cluster-information-required-for-a-test/1050

Ticket: 


Interface: @requirements(num_servers=<number_of_servers>,num_moms=<number_of_moms>,num_comms=<number_of_comms>,num_clients=<number_of_clients>,no_mom_on_server=<Boolean>,no_comm_on_server=<Boolean>, no_comm_on_mom=<Boolean>)
Visibility: Public
Change Control: Stable
Synopsis: New interface to provide the cluster information required for particular testcase/testsuite.
Details:

This means with default configuration, test will intend to run on a single node.

Examples: 


Note: Currently PTL supports specification of a single host for "client" parameter in pbs_benchpress command, i.e. name of the host on which the PBS client commands are to be run from. Hence, the specification of requirement of multiple clients for a given test case can be completely functional only after implementation of ticket PP-1327. As of now test execution of any test case that specifies num_clients as greater than one will be skipped.


Interface: PTLTestInfo._gen_ts_tree()
Visibility: Public
Change Control: Stable
Synopsis: Updating existing interface to add requirements information to testsuite's json tree, provided by @requirements decorator. Tools which run PTL, can make use of this information to form a multinode cluster.
Details:


Example: json tree of a test case with @requirements(num_moms=4) inside a test suite with @requirements(num_comms=2) at test suite level will look as below:

"test_submit_job": {
    "doc": "\n Test to submit a job\n ",
    "tags": [
        "smoke"
    ],
    "requirements": {
        "num_moms": 4,
        "no_comm_on_mom": true,
        "no_comm_on_server": false,
        "num_servers": 1,
        "no_mom_on_server": false,
        "num_comms": 2,
        "num_clients": 1
        },
    "numnodes": "5"
},