Package net.juniper.contrail.api.types

Examples of net.juniper.contrail.api.types.FloatingIpPool


    @SuppressWarnings("unchecked")
    @Override
    public List<FloatingIp> getFloatingIps() {
        String fipPoolName = getDefaultPublicNetworkFQN() + ":PublicIpPool";
        FloatingIpPool fipPool = null;
        try {
            fipPool = (FloatingIpPool)_api.findByFQN(FloatingIpPool.class, fipPoolName);
        } catch (Exception ex) {
            s_logger.debug(ex);
        }
        if (fipPool == null) {
            return null;
        }
        List<ObjectReference<ApiPropertyBase>> ips = fipPool.getFloatingIps();
        if (ips != null) {
            try {
                return (List<FloatingIp>)_api.getObjects(FloatingIp.class, ips);
            } catch (IOException ex) {
                s_logger.debug(ex);
View Full Code Here


        deleteInstanceIps(vnet.getInstanceIpBackRefs(), syncLogMesg);

        List<ObjectReference<ApiPropertyBase>> fipPools = vnet.getFloatingIpPools();
        if (fipPools != null && !fipPools.isEmpty()) {
            FloatingIpPool floatingIpPool = (FloatingIpPool)api.findById(FloatingIpPool.class, fipPools.get(0).getUuid());
            if (floatingIpPool != null) {
                deleteFloatingIps(floatingIpPool.getFloatingIps(), syncLogMesg);
            }
        }

        deleteVirtualMachineInterfaces(vnet.getVirtualMachineInterfaceBackRefs(), syncLogMesg);
View Full Code Here

        assert _vnModel != null : "vn model is not set";

        ApiConnector api = controller.getApiAccessor();
        ContrailManager manager = controller.getManager();
        FloatingIpPool fipPool = _fipPool;

        if (fipPool == null) {
            String fipPoolName = manager.getDefaultPublicNetworkFQN() + ":PublicIpPool";
            _fipPool = fipPool = (FloatingIpPool)controller.getApiAccessor().findByFQN(FloatingIpPool.class, fipPoolName);
            if (fipPool == null) {
                fipPool = new FloatingIpPool();
                fipPool.setName(_name);
                fipPool.setParent(_vnModel.getVirtualNetwork());
            }
        }

        if (_fipPool == null) {
            try {
View Full Code Here

        deleteInstanceIps(vnet.getInstanceIpBackRefs(), syncLogMesg);
       
        List<ObjectReference<ApiPropertyBase>> fipPools = vnet.getFloatingIpPools();
        if (fipPools != null && !fipPools.isEmpty()) {
            FloatingIpPool floatingIpPool = (FloatingIpPool) api.findById(FloatingIpPool.class, fipPools.get(0).getUuid());
            if (floatingIpPool != null ) {
                deleteFloatingIps(floatingIpPool.getFloatingIps(), syncLogMesg);
            }
        }
       
        deleteVirtualMachineInterfaces(vnet.getVirtualMachineInterfaceBackRefs(), syncLogMesg);
View Full Code Here

    @SuppressWarnings("unchecked")
    @Override
    public List<FloatingIp> getFloatingIps() {
        String fipPoolName = getDefaultPublicNetworkFQN() + ":PublicIpPool";
        FloatingIpPool fipPool = null;
        try {
            fipPool = (FloatingIpPool)_api.findByFQN(FloatingIpPool.class, fipPoolName);
        } catch (Exception ex) {
            s_logger.debug(ex);
        }
        if (fipPool == null) {
            return null;
        }
        List<ObjectReference<ApiPropertyBase>> ips = fipPool.getFloatingIps();
        if (ips != null) {
            try {
                return (List<FloatingIp>) _api.getObjects(FloatingIp.class, ips);
            } catch(IOException ex) {
                s_logger.debug(ex);
View Full Code Here

        assert _vnModel != null : "vn model is not set";

        ApiConnector api = controller.getApiAccessor();
        ContrailManager manager = controller.getManager();
        FloatingIpPool fipPool = _fipPool;

        if (fipPool == null) {
            String fipPoolName = manager.getDefaultPublicNetworkFQN() + ":PublicIpPool";
            _fipPool = fipPool = (FloatingIpPool) controller.getApiAccessor().findByFQN(FloatingIpPool.class, fipPoolName);
            if (fipPool == null) {
                fipPool = new FloatingIpPool();
                fipPool.setName(_name);
                fipPool.setParent(_vnModel.getVirtualNetwork());
            }
        }

        if (_fipPool == null) {
            try {
View Full Code Here

TOP

Related Classes of net.juniper.contrail.api.types.FloatingIpPool

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.