Skip to content

Commit

Permalink
Ai job type documentation (#63)
Browse files Browse the repository at this point in the history
* update AutomationAPI Documentation links

* fixing issue #40: define an optional field

---------

Co-authored-by: rbeker-BMC <rbeker@bmc.com>
  • Loading branch information
rbeker-BMC and rbeker-BMC authored Feb 14, 2024
1 parent abdce61 commit 973542f
Show file tree
Hide file tree
Showing 21 changed files with 4,131 additions and 537 deletions.
38 changes: 37 additions & 1 deletion docs/_sources/notebooks/ai.ipynb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
" command = AIJob.field('Command') # the field name argument needs to match the one in the Web interface\n",
" # the name of the field (lower case command) can be any valid python variable name\n",
"\n",
" flags = AIJob.field('Flags')\n",
" flags = AIJob.field_optional('Flags') # this is an optional field, similar to AIJob.field() but not mandatory to use\n",
"\n",
"\n"
]
Expand Down Expand Up @@ -104,6 +104,42 @@
"\n",
"print(workflow.dumps_json(indent=2))\n"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{\n",
" \"AIfolder\": {\n",
" \"Type\": \"Folder\",\n",
" \"MySSHCommand\": {\n",
" \"Type\": \"Job:ApplicationIntegrator:AI AI SSHCommand\",\n",
" \"ConnectionProfile\": \"HOSTCP\",\n",
" \"AI-Command\": \"ls\"\n",
" }\n",
" }\n",
"}\n"
]
}
],
"source": [
"# Let's check that the Automation API Json is ok\n",
"\n",
"workflow = BaseWorkflow() # BaseWorkflow is a workflow which is not connected to any environment\n",
"\n",
"# the flags variable is a optional field, we can create job without an optional field\n",
"aijob = AIJobSSHCommand('MySSHCommand',\n",
" connection_profile='HOSTCP',\n",
" command='ls')\n",
"workflow.add(aijob, inpath='AIfolder')\n",
"\n",
"print(workflow.dumps_json(indent=2))"
]
}
],
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/notebooks/connectionprofiles.ipynb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"# Connection Profiles\n",
"\n",
"[AutomationAPI Documentation](https://docs.bmc.com/docs/automation-api/monthly/connection-profiles-993192283.html)\n",
"[AutomationAPI Documentation](https://documents.bmc.com/supportu/API/Monthly/en-US/Documentation/API_CodeRef_ConnectionProfiles.htm)\n",
"\n",
"Connection profiles are used to define access methods and security credentials for a specific application. They can be referenced by multiple jobs. To do this, you must deploy the connection profile definition before running the relevant jobs. \n",
"\n",
Expand Down
8 changes: 4 additions & 4 deletions docs/_sources/notebooks/jobproperties.ipynb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"source": [
"## When\n",
"\n",
"[AutomationAPI Documentation](https://docs.bmc.com/docs/automation-api/monthly/job-properties-993192276.html#JobProperties-WhenWhen)\n",
"[AutomationAPI Documentation](https://documents.bmc.com/supportu/API/Monthly/en-US/Documentation/API_CodeRef_JobProperties.htm?days#When)\n",
"\n",
"Enables you to define scheduling parameters for Jobs, Folders and SubFolders, including the option of using calendars. If When is used in a Folder or SubFolder, those parameters apply to all Jobs in the Folder or Subfolder.\n",
"\n",
Expand Down Expand Up @@ -212,7 +212,7 @@
"source": [
"## If\n",
"\n",
"[AutomationAPI Documentation](https://docs.bmc.com/docs/automation-api/monthly/job-properties-993192276.html#JobProperties-IfIf)\n",
"[AutomationAPI Documentation](https://documents.bmc.com/supportu/API/Monthly/en-US/Documentation/API_CodeRef_JobProperties.htm?properties#If)\n",
"\n",
"If statements trigger one or more actions when job-related criteria are fulfilled (for example, the job ended with a specific status or the job failed several times)."
]
Expand Down Expand Up @@ -454,7 +454,7 @@
"source": [
"## If Actions\n",
"\n",
"[AutomationAPI Documentation](https://docs.bmc.com/docs/automation-api/monthly/job-properties-993192276.html#JobProperties-IfActionsIfActions)\n",
"[AutomationAPI Documentation](https://documents.bmc.com/supportu/API/Monthly/en-US/Documentation/API_CodeRef_JobProperties.htm?days#IfActions)\n",
"\n",
"Actions that can be triggered in response to an *If* statement that is fulfilled"
]
Expand Down Expand Up @@ -880,7 +880,7 @@
"source": [
"## Resources\n",
"\n",
"[AutomationAPI Documentation](https://docs.bmc.com/docs/automation-api/monthly/job-properties-993192276.html#JobProperties-ResourcesResources)"
"[AutomationAPI Documentation](https://documents.bmc.com/supportu/API/Monthly/en-US/Documentation/API_CodeRef_JobProperties.htm?days#Resources)"
]
},
{
Expand Down
Loading

0 comments on commit 973542f

Please sign in to comment.