Skip to content

Commit

Permalink
Deprecate CLI utility methods in RabbitMQ module (#7588)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddumelendez authored Sep 28, 2023
1 parent 4296b5b commit 4c83a54
Showing 1 changed file with 100 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,20 +216,32 @@ public RabbitMQContainer withSSL(
.withCopyFileToContainer(keyFile, "/etc/rabbitmq/rabbitmq_key.pem");
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withPluginsEnabled(String... pluginNames) {
List<String> command = new ArrayList<>(Arrays.asList("rabbitmq-plugins", "enable"));
command.addAll(Arrays.asList(pluginNames));
values.add(command);
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withBinding(String source, String destination) {
values.add(
Arrays.asList("rabbitmqadmin", "declare", "binding", "source=" + source, "destination=" + destination)
);
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withBinding(String vhost, String source, String destination) {
values.add(
Arrays.asList(
Expand All @@ -244,6 +256,10 @@ public RabbitMQContainer withBinding(String vhost, String source, String destina
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withBinding(
String source,
String destination,
Expand All @@ -266,6 +282,10 @@ public RabbitMQContainer withBinding(
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withBinding(
String vhost,
String source,
Expand All @@ -290,6 +310,10 @@ public RabbitMQContainer withBinding(
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withParameter(String component, String name, String value) {
values.add(
Arrays.asList(
Expand All @@ -304,6 +328,10 @@ public RabbitMQContainer withParameter(String component, String name, String val
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withPermission(String vhost, String user, String configure, String write, String read) {
values.add(
Arrays.asList(
Expand All @@ -320,11 +348,19 @@ public RabbitMQContainer withPermission(String vhost, String user, String config
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withUser(String name, String password) {
values.add(Arrays.asList("rabbitmqadmin", "declare", "user", "name=" + name, "password=" + password, "tags="));
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withUser(String name, String password, Set<String> tags) {
values.add(
Arrays.asList(
Expand All @@ -339,6 +375,10 @@ public RabbitMQContainer withUser(String name, String password, Set<String> tags
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withPolicy(String name, String pattern, Map<String, Object> definition) {
values.add(
Arrays.asList(
Expand All @@ -353,6 +393,10 @@ public RabbitMQContainer withPolicy(String name, String pattern, Map<String, Obj
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withPolicy(String vhost, String name, String pattern, Map<String, Object> definition) {
values.add(
Arrays.asList(
Expand All @@ -368,6 +412,10 @@ public RabbitMQContainer withPolicy(String vhost, String name, String pattern, M
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withPolicy(
String name,
String pattern,
Expand All @@ -390,6 +438,10 @@ public RabbitMQContainer withPolicy(
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withOperatorPolicy(String name, String pattern, Map<String, Object> definition) {
values.add(
new ArrayList<>(
Expand All @@ -406,6 +458,10 @@ public RabbitMQContainer withOperatorPolicy(String name, String pattern, Map<Str
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withOperatorPolicy(
String name,
String pattern,
Expand All @@ -428,33 +484,57 @@ public RabbitMQContainer withOperatorPolicy(
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withVhost(String name) {
values.add(Arrays.asList("rabbitmqadmin", "declare", "vhost", "name=" + name));
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withVhost(String name, boolean tracing) {
values.add(Arrays.asList("rabbitmqadmin", "declare", "vhost", "name=" + name, "tracing=" + tracing));
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withVhostLimit(String vhost, String name, int value) {
values.add(
Arrays.asList("rabbitmqadmin", "declare", "vhost_limit", "vhost=" + vhost, "name=" + name, "value=" + value)
);
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withQueue(String name) {
values.add(Arrays.asList("rabbitmqadmin", "declare", "queue", "name=" + name));
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withQueue(String vhost, String name) {
values.add(Arrays.asList("rabbitmqadmin", "--vhost=" + vhost, "declare", "queue", "name=" + name));
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withQueue(
String name,
boolean autoDelete,
Expand All @@ -475,6 +555,10 @@ public RabbitMQContainer withQueue(
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withQueue(
String vhost,
String name,
Expand All @@ -497,18 +581,30 @@ public RabbitMQContainer withQueue(
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withExchange(String name, String type) {
values.add(Arrays.asList("rabbitmqadmin", "declare", "exchange", "name=" + name, "type=" + type));
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withExchange(String vhost, String name, String type) {
values.add(
Arrays.asList("rabbitmqadmin", "--vhost=" + vhost, "declare", "exchange", "name=" + name, "type=" + type)
);
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withExchange(
String name,
String type,
Expand All @@ -533,6 +629,10 @@ public RabbitMQContainer withExchange(
return self();
}

/**
* @deprecated use {@link #execInContainer(String...)} instead
*/
@Deprecated
public RabbitMQContainer withExchange(
String vhost,
String name,
Expand Down

0 comments on commit 4c83a54

Please sign in to comment.