/** * Returns management address (host) from the givem {@link org.jboss.as.arquillian.container.ManagementClient}. If the * returned value is IPv6 address then square brackets around are stripped. * * @param managementClient * @return */ public static final String getHost(final ManagementClient managementClient) { return CoreUtils.stripSquareBrackets(managementClient.getMgmtAddress()); }
/** * Returns canonical hostname retrieved from management address of the givem * {@link org.jboss.as.arquillian.container.ManagementClient}. * * @param managementClient * @return */ public static final String getCannonicalHost(final ManagementClient managementClient) { return getCannonicalHost(managementClient.getMgmtAddress()); }
/** * Returns "secondary.test.address" system property if such exists. If not found, then there is a fallback to * {@link ManagementClient#getMgmtAddress()} or {@link #getDefaultHost(boolean)} (when mgmtClient is <code>null</code>). * Returned value can be converted to canonical hostname if useCanonicalHost==true. Returned value is not formatted for URLs * (i.e. square brackets are not placed around IPv6 addr - for instance "::1") * * @param mgmtClient management client instance (may be <code>null</code>) * @param useCanonicalHost * @return */ public static String getSecondaryTestAddress(final ManagementClient mgmtClient, final boolean useCanonicalHost) { String address = System.getProperty("secondary.test.address"); if (StringUtils.isBlank(address)) { address = mgmtClient != null ? mgmtClient.getMgmtAddress() : getDefaultHost(false); } if (useCanonicalHost) { address = getCannonicalHost(address); } return stripSquareBrackets(address); }
public static void executeReloadAndWaitForCompletion(ManagementClient managementClient) { executeReloadAndWaitForCompletion(managementClient.getControllerClient(), TIMEOUT, false, managementClient.getMgmtAddress(), managementClient.getMgmtPort()); }