package com.bocloud.cmp.provider.network;

import com.bocloud.cmp.model.FloatingIpModel;
import com.bocloud.cmp.provider.SuperProvider;
import com.bocloud.common.model.BocloudResult;

/**
 * OpenStack浮动IP
 *
 * @author wangyu
 * @version 1.0
 * @since 2017年8月28日
 */
public interface FloatingIPProvider extends SuperProvider {
    public BocloudResult list();

    public BocloudResult create(FloatingIpModel model);

    public BocloudResult remove(String fipId);

    public BocloudResult detail(String fipId);

    public BocloudResult associate(String fipId, String portId);

    public BocloudResult disassociate(String fipId);

    default BocloudResult associate(FloatingIpModel modeld) {
        return new BocloudResult(false, "need implement");
    }

    default BocloudResult disassociate(FloatingIpModel modeld) {
        return new BocloudResult(false, "need implement");
    }

    default BocloudResult modify(FloatingIpModel modeld) {
        return new BocloudResult(false, "need implement");
    }

    default BocloudResult list(String zone) {
        return null;
    }
}
