diff --git a/oncall/bin/oncall.py b/oncall/bin/oncall.py index 8d4ce6d7..4041f6a0 100755 --- a/oncall/bin/oncall.py +++ b/oncall/bin/oncall.py @@ -105,7 +105,7 @@ def get_csv_from_server(): parser.add_argument('-d', '--debug', action='store_true', default=False, required=False) args = parser.parse_args() -api_url = _check_mk_url(_site_url()) + 'api/v0' +api_url = _check_mk_url(_site_url()) + 'api/1.0' if not args.secret: args.username, args.secret = _site_creds(args.username) @@ -263,7 +263,7 @@ def gen_id(): site = changes_file.split('/')[-1][20:-3] if site != os.environ.get('OMD_SITE'): try: - cmk.utils.store.aquire_lock(changes_file) + cmk.utils.store.acquire_lock(changes_file) with open(changes_file, 'a+') as f: f.write(repr(change_spec)+'\0') f.flush() @@ -290,6 +290,7 @@ def gen_id(): json=postdata, headers={ "Content-Type": 'application/json', + "If-Match": '*', }, allow_redirects=False, ) diff --git a/oncall/oncall-3.0.3.mkp b/oncall/oncall-3.0.3.mkp deleted file mode 100644 index 5c6ade3f..00000000 Binary files a/oncall/oncall-3.0.3.mkp and /dev/null differ diff --git a/oncall/oncall-4.0.1.mkp b/oncall/oncall-4.0.1.mkp new file mode 100644 index 00000000..3be5c3a5 Binary files /dev/null and b/oncall/oncall-4.0.1.mkp differ