diff --git a/src/main/java/com/suse/salt/netapi/datatypes/target/AbstractTarget.java b/src/main/java/com/suse/salt/netapi/datatypes/target/AbstractTarget.java index fe7a157e4..7c10de40f 100644 --- a/src/main/java/com/suse/salt/netapi/datatypes/target/AbstractTarget.java +++ b/src/main/java/com/suse/salt/netapi/datatypes/target/AbstractTarget.java @@ -31,7 +31,7 @@ public T getTarget() { public Map getProps() { Map props = new HashMap<>(); props.put("tgt", getTarget()); - props.put("expr_form", getType().getValue()); + props.put("tgt_type", getType().getValue()); return props; } } diff --git a/src/main/java/com/suse/salt/netapi/datatypes/target/Target.java b/src/main/java/com/suse/salt/netapi/datatypes/target/Target.java index 71f85817f..c24a06bbb 100644 --- a/src/main/java/com/suse/salt/netapi/datatypes/target/Target.java +++ b/src/main/java/com/suse/salt/netapi/datatypes/target/Target.java @@ -25,7 +25,7 @@ public interface Target { /** * Return the properties that belong in a request body. - * This will include the `tgt` and `expr_form` properties. + * This will include the `tgt` and `tgt_type` properties. * and optionally the `delimiter` property. * * @return a map of property keys and values diff --git a/src/main/java/com/suse/salt/netapi/datatypes/target/TargetType.java b/src/main/java/com/suse/salt/netapi/datatypes/target/TargetType.java index 6e0ff6442..88f1b2f60 100644 --- a/src/main/java/com/suse/salt/netapi/datatypes/target/TargetType.java +++ b/src/main/java/com/suse/salt/netapi/datatypes/target/TargetType.java @@ -1,7 +1,7 @@ package com.suse.salt.netapi.datatypes.target; /** - * Possible values for the tgt_type or expr_form parameter in salt netapi calls. + * Possible values for the tgt_type parameter in salt netapi calls. */ public enum TargetType { diff --git a/src/test/java/com/suse/salt/netapi/datatypes/target/TargetTypesTest.java b/src/test/java/com/suse/salt/netapi/datatypes/target/TargetTypesTest.java index e2e0a6cc6..08f626794 100644 --- a/src/test/java/com/suse/salt/netapi/datatypes/target/TargetTypesTest.java +++ b/src/test/java/com/suse/salt/netapi/datatypes/target/TargetTypesTest.java @@ -243,7 +243,7 @@ private void defaultDelimiterTestHelper(DictionaryTarget target) { assertEquals(key, target.getKey()); assertEquals(value, target.getValue()); assertTrue(target.getProps().containsKey("tgt")); - assertTrue(target.getProps().containsKey("expr_form")); + assertTrue(target.getProps().containsKey("tgt_type")); assertFalse(target.getProps().containsKey("delimiter")); assertEquals(DictionaryTarget.DEFAULT_DELIMITER, target.getDelimiter()); } @@ -253,7 +253,7 @@ private void alternateDelimiterTestHelper(DictionaryTarget target) { assertEquals(key, target.getKey()); assertEquals(value, target.getValue()); assertTrue(target.getProps().containsKey("tgt")); - assertTrue(target.getProps().containsKey("expr_form")); + assertTrue(target.getProps().containsKey("tgt_type")); assertTrue(target.getProps().containsKey("delimiter")); assertEquals(alt_delim, target.getDelimiter()); } diff --git a/src/test/resources/async_via_event_test_ping_request.json b/src/test/resources/async_via_event_test_ping_request.json index 289c91114..ae8c276b6 100644 --- a/src/test/resources/async_via_event_test_ping_request.json +++ b/src/test/resources/async_via_event_test_ping_request.json @@ -3,6 +3,6 @@ "tgt": "*", "client": "local_async", "fun": "test.ping", - "expr_form": "glob" + "tgt_type": "glob" } ] diff --git a/src/test/resources/call_sync_batch_ping_request.json b/src/test/resources/call_sync_batch_ping_request.json index bba52dfda..d7925e270 100644 --- a/src/test/resources/call_sync_batch_ping_request.json +++ b/src/test/resources/call_sync_batch_ping_request.json @@ -3,7 +3,7 @@ "tgt": "*", "eauth": "auto", "password": "pa55wd", - "expr_form": "glob", + "tgt_type": "glob", "batch": "1", "client": "local_batch", "fun": "test.ping", diff --git a/src/test/resources/call_sync_ping_request.json b/src/test/resources/call_sync_ping_request.json index 67fa97233..7dea1c040 100644 --- a/src/test/resources/call_sync_ping_request.json +++ b/src/test/resources/call_sync_ping_request.json @@ -3,9 +3,9 @@ "tgt": "*", "eauth": "auto", "password": "pa55wd", - "expr_form": "glob", + "tgt_type": "glob", "client": "local", "fun": "test.ping", "username": "user" } -] \ No newline at end of file +] diff --git a/src/test/resources/minions_request.json b/src/test/resources/minions_request.json index 6e10b8ec0..6c8a9890d 100644 --- a/src/test/resources/minions_request.json +++ b/src/test/resources/minions_request.json @@ -1,6 +1,6 @@ [ { - "expr_form": "glob", + "tgt_type": "glob", "tgt": "*", "fun": "pkg.install", "arg": ["i3"], @@ -10,4 +10,3 @@ } } ] - diff --git a/src/test/resources/run_request.json b/src/test/resources/run_request.json index d251f1923..6362d5abd 100644 --- a/src/test/resources/run_request.json +++ b/src/test/resources/run_request.json @@ -4,7 +4,7 @@ "password": "pass", "eauth": "pam", "client": "local", - "expr_form": "glob", + "tgt_type": "glob", "tgt": "*", "fun": "pkg.install", "arg": ["i3"], diff --git a/src/test/resources/ssh_ping_request.json b/src/test/resources/ssh_ping_request.json index ae8464ee4..b6a0b80d2 100644 --- a/src/test/resources/ssh_ping_request.json +++ b/src/test/resources/ssh_ping_request.json @@ -1,6 +1,6 @@ [ { - "expr_form": "glob", + "tgt_type": "glob", "tgt": "*", "client": "ssh", "fun": "test.ping", diff --git a/src/test/resources/ssh_raw_run_request.json b/src/test/resources/ssh_raw_run_request.json index 09a4045e1..231df34f6 100644 --- a/src/test/resources/ssh_raw_run_request.json +++ b/src/test/resources/ssh_raw_run_request.json @@ -2,7 +2,7 @@ { "client": "ssh", "tgt": "*", - "expr_form": "glob", + "tgt_type": "glob", "raw_shell": true, "fun": "uptime" }