Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
url = "{}/project/{}/resource/{}".format(
self.API_URL, project, resource
)
return self.__get(url)
if __name__ == "__main__":
from pprint import pprint
rundeck_url = os.environ.get("RUNDECK_URL")
username = os.environ.get("RUNDECK_USER")
password = os.environ.get("RUNDECK_PASS")
assert rundeck_url, "Rundeck URL is required"
assert username, "Username is required"
assert password, "Password is required"
rd = Rundeck(
rundeck_url, username=username, password=password, verify=False
)
pprint(rd.list_projects())
pprint(rd.list_all_jobs())