PyScripts Module REST API

PyScripts Module REST API

GET /v1/rating/module_config/pyscripts/scripts

Get the script list

Parameters:
  • no_data (bool) – Set to True to remove script data from output.
Return:

List of every scripts.

Return type:

ScriptCollection

GET /v1/rating/module_config/pyscripts/scripts/(script_id)

Return a script.

Parameters:
  • script_id (uuid) – UUID of the script to filter on.
Return type:

Script

POST /v1/rating/module_config/pyscripts/scripts

Create pyscripts script.

Parameters:
  • script_data (Script) – Informations about the script to create.
Return type:

Script

PUT /v1/rating/module_config/pyscripts/scripts

Update pyscripts script.

Parameters:
  • script_id (uuid) – UUID of the script to update.
  • script_data (Script) – Script data to update.
Return type:

Script

DELETE /v1/rating/module_config/pyscripts/scripts

Delete the script.

Parameters:
  • script_id (uuid) – UUID of the script to delete.
type Script

Type describing a script.

Data samples:

Json
{
    "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "data": "return 0",
    "name": "policy1",
    "script_id": "bc05108d-f515-4984-8077-de319cbf35aa"
}
XML
<value>
  <script_id>bc05108d-f515-4984-8077-de319cbf35aa</script_id>
  <name>policy1</name>
  <data>return 0</data>
  <checksum>da39a3ee5e6b4b0d3255bfef95601890afd80709</checksum>
</value>
checksum
Type:unicode

Checksum of the script data.

data
Type:unicode

Data of the script.

name
Type:unicode

Name of the script.

script_id
Type:uuid

UUID of the script.

type ScriptCollection

Type describing a list of scripts.

Data samples:

Json
{
    "scripts": [
        {
            "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
            "data": "return 0",
            "name": "policy1",
            "script_id": "bc05108d-f515-4984-8077-de319cbf35aa"
        }
    ]
}
XML
<value>
  <scripts>
    <item>
      <script_id>bc05108d-f515-4984-8077-de319cbf35aa</script_id>
      <name>policy1</name>
      <data>return 0</data>
      <checksum>da39a3ee5e6b4b0d3255bfef95601890afd80709</checksum>
    </item>
  </scripts>
</value>
scripts
Type:list(Script)

List of scripts.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.