def _deploy_undeploy(self, opts, deploy):
    if (not opts.name):
        _exit_if_errors([f"--name is needed to {('deploy' if deploy else 'undeploy')} a function"])
    if (deploy and (not opts.boundary)):
        _exit_if_errors(['--boundary is needed to deploy a function'])
    (_, errors) = self.rest.deploy_undeploy_function(opts.name, deploy, opts.boundary)
    _exit_if_errors(errors)
    _success(f"Request to {('deploy' if deploy else 'undeploy')} the function was accepted")
def _deploy_undeploy(self, opts, deploy):
    if (not opts.name):
        _exit_if_errors([f"--name is needed to {('deploy' if deploy else 'undeploy')} a function"])
    if (deploy and (not opts.boundary)):
        _exit_if_errors(['--boundary is needed to deploy a function'])
    (_, errors) = self.rest.deploy_undeploy_function(opts.name, deploy, opts.boundary)
    _exit_if_errors(errors)
    _success(f"Request to {('deploy' if deploy else 'undeploy')} the function was accepted")