use of com.emc.cloud.platform.ucs.in.model.ConfigResolveDns in project coprhd-controller by CoprHD.
the class UcsLoginLogoutTest method getBlades.
@Test(groups = "runByDefault", dependsOnMethods = "testGetBladeDNs")
public void getBlades() throws ClientGeneralException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
ConfigResolveDns configResolveDns = new ConfigResolveDns();
configResolveDns.setInHierarchical("false");
com.emc.cloud.platform.ucs.in.model.DnSet inDnSet = new com.emc.cloud.platform.ucs.in.model.DnSet();
for (Dn dn : this.dnSet.getDn()) {
com.emc.cloud.platform.ucs.in.model.DnSet.Dn inDn = new com.emc.cloud.platform.ucs.in.model.DnSet.Dn();
inDn.setValue(dn.getValue());
inDnSet.getDn().add(inDn);
}
configResolveDns.getContent().add(new JAXBElement<com.emc.cloud.platform.ucs.in.model.DnSet>(new QName("inDns"), com.emc.cloud.platform.ucs.in.model.DnSet.class, inDnSet));
com.emc.cloud.platform.ucs.out.model.ConfigResolveDns configResolveDnsOut = clientHttpMethods.postEntity(factory.createConfigResolveDns(configResolveDns), com.emc.cloud.platform.ucs.out.model.ConfigResolveDns.class);
System.out.println(BeanUtils.describe(configResolveDnsOut));
if (configResolveDnsOut.getContent() != null && !configResolveDnsOut.getContent().isEmpty()) {
for (Object object : configResolveDnsOut.getContent()) {
if (object instanceof JAXBElement<?>) {
if (!(((JAXBElement) object).getValue() instanceof ConfigSet)) {
continue;
}
configSet = ((JAXBElement<ConfigSet>) object).getValue();
if (configSet != null && configSet.getManagedObject() != null && !configSet.getManagedObject().isEmpty()) {
for (JAXBElement<?> managedObject : configSet.getManagedObject()) {
System.out.println("\t\t" + BeanUtils.describe(managedObject.getValue()));
}
}
}
}
}
}
Aggregations