Add way to return ShellCommand parameters as list
This is useful if command is going to be run in the POD as arguments for the POD's command should be passed to the OpenShift client as list of attributes rather then string. Related: #TOBIKO-131 Change-Id: I9da5bfb8b0f98ed86c4dff54039392537b8286bf
This commit is contained in:
parent
c815209866
commit
ab0640b3f0
@ -37,6 +37,9 @@ class ShellCommand(tuple):
|
||||
def __contains__(self, item) -> bool:
|
||||
return item in str(self)
|
||||
|
||||
def as_list(self):
|
||||
return str(self).split(" ")
|
||||
|
||||
|
||||
def shell_command(command: ShellCommandType,
|
||||
**shlex_params) -> ShellCommand:
|
||||
|
Loading…
x
Reference in New Issue
Block a user