Stash Software API
2.0.0
|
[ CLASS ] - Class to operate on environments. More...
Public Member Functions | |
def | __init__ (self, request=None) |
Constructor. More... | |
def | getCommandWithFlags (self) |
Get executable along with the flags and values which can be executed. More... | |
def | execute (self, commands=None) |
Initialize Stash environment and run provided commands if any. More... | |
def | outAppExec (self) |
Get application executable for the current platform. More... | |
Properties | |
def | request (self) |
Request instance used by the class. More... | |
def | powerShellExecutablePath (self) |
PowerShell executable path. More... | |
def | setPowerShellExecutablePath (self, path) |
Set PowerShell executable path. More... | |
def | hasError (self) |
Whether errors occurred in execution. More... | |
def | error (self) |
Error. More... | |
def | stdOut (self) |
STD out. More... | |
def | stdErr (self) |
STD error. More... | |
Packages Related Methods | |
def | outPackages (self) |
Get all packages. More... | |
def | outDevelopmentPackages (self) |
Get development packages. More... | |
def | outStagePackages (self) |
Get stage packages. More... | |
def | outProjectPackages (self) |
Get project packages. More... | |
def | outMasterPackages (self) |
Get master project packages. More... | |
Environment Related Methods | |
def | outEnv (self, value) |
Get environment. More... | |
Debug Related Methods | |
def | outData (self, value) |
Get data. More... | |
Static Public Member Functions | |
Licensing Related Methods | |
def | outMAC () |
Get MAC address for licensing. More... | |
def | outVersion () |
Get version. More... | |
[ CLASS ] - Class to operate on environments.
def sStash.stashLib.Stash.__init__ | ( | self, | |
request = None |
|||
) |
Constructor.
request | [ sStash.stashLib.Request | None | in ] - Request instance. |
N/A |
def sStash.stashLib.Stash.request | ( | self | ) |
Request instance used by the class.
N/A |
def sStash.stashLib.Stash.powerShellExecutablePath | ( | self | ) |
PowerShell executable path.
N/A |
def sStash.stashLib.Stash.setPowerShellExecutablePath | ( | self, | |
path | |||
) |
Set PowerShell executable path.
path | [ str | None | in ] - PowerShell executable path. |
IOError | - If provided PowerShell executable path doesn't exist. |
def sStash.stashLib.Stash.hasError | ( | self | ) |
Whether errors occurred in execution.
N/A |
def sStash.stashLib.Stash.error | ( | self | ) |
N/A |
def sStash.stashLib.Stash.stdOut | ( | self | ) |
STD out.
N/A |
def sStash.stashLib.Stash.stdErr | ( | self | ) |
STD error.
N/A |
def sStash.stashLib.Stash.getCommandWithFlags | ( | self | ) |
Get executable along with the flags and values which can be executed.
N/A |
def sStash.stashLib.Stash.execute | ( | self, | |
commands = None |
|||
) |
Initialize Stash environment and run provided commands if any.
You can use return values namely stdout and stderr to see the result.
You can invoke sStash.stashLib.Stash.hasError method to check whether errors occurred during execution. You can also invoke sStash.stashLib.Stash.error method to get sStash.stashLib.Error class instance, which represents the error. Please note, sStash.stashLib.Error class designed to provide information on errors only generated by Stash. If an error occurred outside of Stash, information about it can be directly obtained from stderr, which is the second return value of this method since sStash.stashLib.Stash.error method will return None in such case.
commands | [ str, unicode, list, tuple | None | in ] - Commands to be executed. |
IOError | - On Windows OS if PowerShell executable path doesn't exist. |
def sStash.stashLib.Stash.outAppExec | ( | self | ) |
Get application executable for the current platform.
app
argument must be provided in Request.set method. Alternatively you can use Request.setByStr method and provide app
argument to set the development environment name.
You can use Stash.hasError method to check whether an error occurred during execution of this method. Use Stash.error method to get the error information.
N/A |
def sStash.stashLib.Stash.outPackages | ( | self | ) |
Get all packages.
Method lists all packages of all environments, namely development (if set), stage (if set), project and master project environments.
You can use Stash.hasError method to check whether an error occurred during execution of this method. Use Stash.error method to get the error information.
N/A |
def sStash.stashLib.Stash.outDevelopmentPackages | ( | self | ) |
Get development packages.
development
argument must be provided in Request.set method. Alternatively you can use Request.setByStr method and provide development
argument to set the development environment name.
You can use Stash.hasError method to check whether an error occurred during execution of this method. Use Stash.error method to get the error information.
N/A |
def sStash.stashLib.Stash.outStagePackages | ( | self | ) |
Get stage packages.
stage
argument must be provided in Request.set method. Alternatively you can use Request.setByStr method and provide stage
argument to set the stage environment name.
You can use Stash.hasError method to check whether an error occurred during execution of this method. Use Stash.error method to get the error information.
N/A |
def sStash.stashLib.Stash.outProjectPackages | ( | self | ) |
Get project packages.
project
argument must be provided in Request.set method. Alternatively you can use Request.setByStr method and provide project
argument to set the stage environment name.
You can use Stash.hasError method to check whether an error occurred during execution of this method. Use Stash.error method to get the error information.
N/A |
def sStash.stashLib.Stash.outMasterPackages | ( | self | ) |
Get master project packages.
You can use Stash.hasError method to check whether an error occurred during execution of this method. Use Stash.error method to get the error information.
N/A |
def sStash.stashLib.Stash.outEnv | ( | self, | |
value | |||
) |
Get environment.
You can use Stash.hasError method to check whether an error occurred during execution of this method. Use Stash.error method to get the error information.
Accepted values are:
Value | Result | Return Data Types |
---|---|---|
1 | Entries | dict |
2 | Entries as they would be in env script | str |
value | [ int | None | in ] - Any value from the table above. |
N/A |
def sStash.stashLib.Stash.outData | ( | self, | |
value | |||
) |
Get data.
You can use Stash.hasError method to check whether an error occurred during execution of this method. Use Stash.error method to get the error information.
Accepted values are:
Value | Result | Return Data Types |
---|---|---|
1 | All below | str |
2 | Request | str |
3 | Settings | str |
4 | App | dict |
5 | Solver | str |
6 | Builder | str |
value | [ int | None | in ] - Any value from the table above. |
N/A |
|
static |
Get MAC address for licensing.
N/A |
|
static |
Get version.
N/A |