private ManagementClient(String mgmtAddress, int mgmtPort) { OnlineManagementClient onlineClient = null; try { onlineClient = org.wildfly.extras.creaper.core.ManagementClient.online(OnlineOptions.domain() .forProfile("clustered") .build() .hostAndPort(mgmtAddress, mgmtPort) .auth(LOGIN, PASSWORD) .build() ); } catch (IOException ex) { throw new IllegalStateException("Error during connecting to server CLI.", ex); } ops = new Operations(onlineClient); }