
org.xlcloud.openstack.api.NeutronClient Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2012 AMG.lab, a Bull Group Company
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.xlcloud.openstack.api;
import java.util.List;
import org.xlcloud.openstack.model.neutron.Network;
import org.xlcloud.openstack.model.neutron.Port;
import org.xlcloud.openstack.model.neutron.Router;
import org.xlcloud.openstack.model.neutron.RouterInterface;
import org.xlcloud.openstack.model.neutron.Subnet;
/**
* This interface provides a way to display networks, subnetworks and their
* properties.
*
* @author Krzysztof Szafrański, AMG.net
*/
public interface NeutronClient {
/*
* NETWORKS
*/
/**
* List available {@link Network}s.
*
* @return
*/
List listNetworks();
/**
* List {@link Network}s owned by the specified tenant.
*
* @param tenantId
* tenantId identifying the tenant.
* @return
*/
List listNetworksByTenantId(String tenantId);
/**
* Returns the {@link Network} with the specified id.
*
* @param networkId
* @return
*/
Network showNetwork(String networkId);
/**
* Creates a new network. No {@link Network} fields are mandatory. Fields
* that will be used are: name, adminStateUp, shared and tenantId. To set
* tenantId you need to be an administrative user.
*
* @param network
* @return
*/
Network createNetwork(Network network);
/**
* Removes the {@link Network} with the specified id.
*
* @param networkId
*/
void removeNetwork(String networkId);
/*
* SUBNETS
*/
/**
* List available {@link Subnet}s.
*
* @return
*/
List listSubnets();
/**
* List {@link Subnet}s owned by the specified tenant.
*
* @param tenantId
* tenantId identifying the tenant.
* @return
*/
List listSubnetsByTenantId(String tenantId);
/**
* Returns the {@link Subnet} with the specified id.
*
* @param subnetId
* @return
*/
Subnet showSubnet(String subnetId);
/**
* Creates a new {@link Subnet}. Fields networkId and cidr are mandatory.
*
* @param subnet
* @return
*/
Subnet createSubnet(Subnet subnet);
/**
* Removes the {@link Subnet} with the specified id.
*
* @param subnetId
*/
void removeSubnet(String subnetId);
/*
* PORTS
*/
/**
* List {@link Port}s associated with the specified network.
*
* @param networkId
* networkId identifying the network.
* @return
*/
List listPortsByNetworkId(String networkId);
/*
* ROUTERS
*/
/**
* Returns the {@link Router} with the specified id.
*
* @param routerId
* @return
*/
Router showRouter(String routerId);
/**
* List available {@link Router}s.
*
* @param tenantId
* tenantId identifying the tenant.
* @return
*/
List listRouters();
/**
* List {@link Router}s owned by the specified tenant.
*
* @param tenantId
* tenantId identifying the tenant.
* @return
*/
List listRoutersByTenantId(String tenantId);
/**
* Creates a new {@link Router}.
*
* @param router
* @return
*/
Router createRouter(Router router);
/**
* Removes the {@link Router} with the specified id.
*
* @param routerId
*/
void removeRouter(String routerId);
/**
* Adds a {@link RouterInterface}. Either subnetId or portId can be specified, but
* not both. When the subnetId is specified, the subnet's gatewayIp address
* is used to create the router interface. Otherwise, if portId is
* specified, the IP address associated with the port is used for creating
* the router interface.
*
* @param routerId
* @param routerInterface
* @return
*/
RouterInterface addRouterInterface(String routerId, RouterInterface routerInterface);
/**
* Adds a {@link RouterInterface}. Either subnetId or portId can be
* specified. If both are specified, the subnetId must correspond to the one
* of the first ip address on the port specified by the portId.
*
* @param routerId
* @param routerInterface
* @return
*/
RouterInterface removeRouterInterface(String routerId, RouterInterface routerInterface);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy