Package com.sequenceiq.cloudbreak.controller.json

Examples of com.sequenceiq.cloudbreak.controller.json.InstanceMetaDataJson


@Component
public class MetaDataConverter extends AbstractConverter<InstanceMetaDataJson, InstanceMetaData> {

    @Override
    public InstanceMetaDataJson convert(InstanceMetaData entity) {
        InstanceMetaDataJson metaDataJson = new InstanceMetaDataJson();
        metaDataJson.setPrivateIp(entity.getPrivateIp());
        metaDataJson.setPublicIp(entity.getPublicIp());
        metaDataJson.setVolumeCount(entity.getVolumeCount());
        metaDataJson.setAmbariServer(entity.getAmbariServer());
        metaDataJson.setInstanceId(entity.getInstanceId());
        metaDataJson.setInstanceIndex(entity.getInstanceIndex());
        metaDataJson.setDockerSubnet(entity.getDockerSubnet());
        metaDataJson.setLongName(entity.getLongName());
        metaDataJson.setContainerCount(entity.getContainerCount());
        return metaDataJson;
    }
View Full Code Here


    @Test(expected = UnsupportedOperationException.class)
    public void testConvertMetaDataJsonToEntity() {
        // GIVEN
        // WHEN
        underTest.convert(new InstanceMetaDataJson());

    }
View Full Code Here

    @Test
    public void testConvertMetaDataEntityToJson() {
        // GIVEN
        // WHEN
        InstanceMetaDataJson result = underTest.convert(metaData);
        // THEN
        assertEquals(result.getAmbariServer(), metaData.getAmbariServer());
        assertEquals(result.getDockerSubnet(), metaData.getDockerSubnet());
        assertEquals(result.getInstanceId(), metaData.getInstanceId());
        assertEquals(result.getInstanceIndex(), metaData.getInstanceIndex());
        assertEquals(result.getPrivateIp(), metaData.getPrivateIp());
        assertEquals(result.getPublicIp(), metaData.getPublicIp());

    }
View Full Code Here

TOP

Related Classes of com.sequenceiq.cloudbreak.controller.json.InstanceMetaDataJson

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.