org.dasein.cloud.cloudstack.network
Class Network
java.lang.Object
org.dasein.cloud.cloudstack.network.Network
- All Implemented Interfaces:
- AccessControlledService, VLANSupport
public class Network
- extends Object
- implements VLANSupport
| Fields inherited from interface org.dasein.cloud.network.VLANSupport |
ADD_ROUTE, ANY, ASSIGN_ROUTE_TO_SUBNET, ASSIGN_ROUTE_TO_VLAN, ATTACH_INTERNET_GATEWAY, ATTACH_NIC, CREATE_INTERNET_GATEWAY, CREATE_NIC, CREATE_ROUTING_TABLE, CREATE_SUBNET, CREATE_VLAN, DETACH_NIC, GET_NIC, GET_ROUTING_TABLE, GET_SUBNET, GET_VLAN, LIST_NIC, LIST_ROUTING_TABLE, LIST_SUBNET, LIST_VLAN, REMOVE_INTERNET_GATEWAY, REMOVE_NIC, REMOVE_ROUTE, REMOVE_ROUTING_TABLE, REMOVE_SUBNET, REMOVE_VLAN |
|
Method Summary |
void |
addRouteToAddress(String toRoutingTableId,
IPVersion version,
String destinationCidr,
String address)
|
void |
addRouteToGateway(String toRoutingTableId,
IPVersion version,
String destinationCidr,
String gatewayId)
|
void |
addRouteToNetworkInterface(String toRoutingTableId,
IPVersion version,
String destinationCidr,
String nicId)
|
void |
addRouteToVirtualMachine(String toRoutingTableId,
IPVersion version,
String destinationCidr,
String vmId)
|
boolean |
allowsNewNetworkInterfaceCreation()
|
boolean |
allowsNewSubnetCreation()
|
boolean |
allowsNewVlanCreation()
|
void |
assignRoutingTableToSubnet(String subnetId,
String routingTableId)
|
void |
assignRoutingTableToVlan(String vlanId,
String routingTableId)
|
void |
attachNetworkInterface(String nicId,
String vmId,
int index)
|
String |
createInternetGateway(String forVlanId)
|
NetworkInterface |
createNetworkInterface(NICCreateOptions options)
|
String |
createRoutingTable(String forVlanId,
String name,
String description)
|
Subnet |
createSubnet(String cidr,
String inProviderVlanId,
String name,
String description)
|
VLAN |
createVlan(String cidr,
String name,
String description,
String domainName,
String[] dnsServers,
String[] ntpServers)
|
void |
detachNetworkInterface(String nicId)
|
List<String> |
findFreeNetworks()
|
int |
getMaxNetworkInterfaceCount()
|
int |
getMaxVlanCount()
|
NetworkInterface |
getNetworkInterface(String nicId)
|
Collection<Network.NetworkOffering> |
getNetworkOfferings(String regionId)
|
String |
getProviderTermForNetworkInterface(Locale locale)
|
String |
getProviderTermForSubnet(Locale locale)
|
String |
getProviderTermForVlan(Locale locale)
|
RoutingTable |
getRoutingTableForSubnet(String subnetId)
|
RoutingTable |
getRoutingTableForVlan(String vlanId)
|
Requirement |
getRoutingTableSupport()
|
Subnet |
getSubnet(String subnetId)
|
Requirement |
getSubnetSupport()
|
VLAN |
getVlan(String vlanId)
|
boolean |
isNetworkInterfaceSupportEnabled()
|
boolean |
isSubnetDataCenterConstrained()
|
boolean |
isSubscribed()
|
boolean |
isVlanDataCenterConstrained()
|
Iterable<VLAN> |
listDefaultNetworks(boolean shared,
boolean forDeploy)
|
Collection<String> |
listFirewallIdsForNIC(String nicId)
|
Iterable<NetworkInterface> |
listNetworkInterfaces()
|
Iterable<NetworkInterface> |
listNetworkInterfacesForVM(String forVmId)
|
Iterable<NetworkInterface> |
listNetworkInterfacesInSubnet(String subnetId)
|
Iterable<NetworkInterface> |
listNetworkInterfacesInVLAN(String vlanId)
|
Iterable<ResourceStatus> |
listNetworkInterfaceStatus()
|
Iterable<RoutingTable> |
listRoutingTables(String inVlanId)
|
Iterable<Subnet> |
listSubnets(String inVlanId)
|
Iterable<IPVersion> |
listSupportedIPVersions()
|
Iterable<VLAN> |
listVlans()
|
Iterable<ResourceStatus> |
listVlanStatus()
|
String[] |
mapServiceAction(ServiceAction action)
|
void |
removeInternetGateway(String forVlanId)
|
void |
removeNetworkInterface(String nicId)
|
void |
removeRoute(String inRoutingTableId,
String destinationCidr)
|
void |
removeRoutingTable(String routingTableId)
|
void |
removeSubnet(String providerSubnetId)
|
void |
removeVlan(String vlanId)
|
boolean |
supportsInternetGatewayCreation()
|
boolean |
supportsRawAddressRouting()
|
VLAN |
toNetwork(Node node,
ProviderContext ctx)
|
ResourceStatus |
toVLANStatus(Node node)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CREATE_NETWORK
public static final String CREATE_NETWORK
- See Also:
- Constant Field Values
LIST_NETWORK_OFFERINGS
public static final String LIST_NETWORK_OFFERINGS
- See Also:
- Constant Field Values
LIST_NETWORKS
public static final String LIST_NETWORKS
- See Also:
- Constant Field Values
allowsNewSubnetCreation
public boolean allowsNewSubnetCreation()
throws CloudException,
InternalException
- Specified by:
allowsNewSubnetCreation in interface VLANSupport
- Throws:
CloudException
InternalException
assignRoutingTableToSubnet
public void assignRoutingTableToSubnet(@Nonnull
String subnetId,
@Nonnull
String routingTableId)
throws CloudException,
InternalException
- Specified by:
assignRoutingTableToSubnet in interface VLANSupport
- Throws:
CloudException
InternalException
assignRoutingTableToVlan
public void assignRoutingTableToVlan(@Nonnull
String vlanId,
@Nonnull
String routingTableId)
throws CloudException,
InternalException
- Specified by:
assignRoutingTableToVlan in interface VLANSupport
- Throws:
CloudException
InternalException
attachNetworkInterface
public void attachNetworkInterface(@Nonnull
String nicId,
@Nonnull
String vmId,
int index)
throws CloudException,
InternalException
- Specified by:
attachNetworkInterface in interface VLANSupport
- Throws:
CloudException
InternalException
createInternetGateway
public String createInternetGateway(@Nonnull
String forVlanId)
throws CloudException,
InternalException
- Specified by:
createInternetGateway in interface VLANSupport
- Throws:
CloudException
InternalException
createRoutingTable
@Nonnull
public String createRoutingTable(@Nonnull
String forVlanId,
@Nonnull
String name,
@Nonnull
String description)
throws CloudException,
InternalException
- Specified by:
createRoutingTable in interface VLANSupport
- Throws:
CloudException
InternalException
createNetworkInterface
@Nonnull
public NetworkInterface createNetworkInterface(@Nonnull
NICCreateOptions options)
throws CloudException,
InternalException
- Specified by:
createNetworkInterface in interface VLANSupport
- Throws:
CloudException
InternalException
addRouteToAddress
public void addRouteToAddress(@Nonnull
String toRoutingTableId,
@Nonnull
IPVersion version,
@Nullable
String destinationCidr,
@Nonnull
String address)
throws CloudException,
InternalException
- Specified by:
addRouteToAddress in interface VLANSupport
- Throws:
CloudException
InternalException
addRouteToGateway
public void addRouteToGateway(@Nonnull
String toRoutingTableId,
@Nonnull
IPVersion version,
@Nullable
String destinationCidr,
@Nonnull
String gatewayId)
throws CloudException,
InternalException
- Specified by:
addRouteToGateway in interface VLANSupport
- Throws:
CloudException
InternalException
addRouteToNetworkInterface
public void addRouteToNetworkInterface(@Nonnull
String toRoutingTableId,
@Nonnull
IPVersion version,
@Nullable
String destinationCidr,
@Nonnull
String nicId)
throws CloudException,
InternalException
- Specified by:
addRouteToNetworkInterface in interface VLANSupport
- Throws:
CloudException
InternalException
addRouteToVirtualMachine
public void addRouteToVirtualMachine(@Nonnull
String toRoutingTableId,
@Nonnull
IPVersion version,
@Nullable
String destinationCidr,
@Nonnull
String vmId)
throws CloudException,
InternalException
- Specified by:
addRouteToVirtualMachine in interface VLANSupport
- Throws:
CloudException
InternalException
allowsNewNetworkInterfaceCreation
public boolean allowsNewNetworkInterfaceCreation()
throws CloudException,
InternalException
- Specified by:
allowsNewNetworkInterfaceCreation in interface VLANSupport
- Throws:
CloudException
InternalException
allowsNewVlanCreation
public boolean allowsNewVlanCreation()
throws CloudException,
InternalException
- Specified by:
allowsNewVlanCreation in interface VLANSupport
- Throws:
CloudException
InternalException
findFreeNetworks
public List<String> findFreeNetworks()
throws CloudException,
InternalException
- Throws:
CloudException
InternalException
getMaxVlanCount
public int getMaxVlanCount()
throws CloudException,
InternalException
- Specified by:
getMaxVlanCount in interface VLANSupport
- Throws:
CloudException
InternalException
getNetworkOfferings
@Nonnull
public Collection<Network.NetworkOffering> getNetworkOfferings(@Nonnull
String regionId)
throws InternalException,
CloudException
- Throws:
InternalException
CloudException
getVlan
@Nullable
public VLAN getVlan(@Nonnull
String vlanId)
throws CloudException,
InternalException
- Specified by:
getVlan in interface VLANSupport
- Throws:
CloudException
InternalException
isNetworkInterfaceSupportEnabled
public boolean isNetworkInterfaceSupportEnabled()
throws CloudException,
InternalException
- Specified by:
isNetworkInterfaceSupportEnabled in interface VLANSupport
- Throws:
CloudException
InternalException
isSubscribed
public boolean isSubscribed()
throws CloudException,
InternalException
- Specified by:
isSubscribed in interface VLANSupport
- Throws:
CloudException
InternalException
listVlans
@Nonnull
public Iterable<VLAN> listVlans()
throws CloudException,
InternalException
- Specified by:
listVlans in interface VLANSupport
- Throws:
CloudException
InternalException
removeInternetGateway
public void removeInternetGateway(@Nonnull
String forVlanId)
throws CloudException,
InternalException
- Specified by:
removeInternetGateway in interface VLANSupport
- Throws:
CloudException
InternalException
removeNetworkInterface
public void removeNetworkInterface(@Nonnull
String nicId)
throws CloudException,
InternalException
- Specified by:
removeNetworkInterface in interface VLANSupport
- Throws:
CloudException
InternalException
removeRoute
public void removeRoute(@Nonnull
String inRoutingTableId,
@Nonnull
String destinationCidr)
throws CloudException,
InternalException
- Specified by:
removeRoute in interface VLANSupport
- Throws:
CloudException
InternalException
removeRoutingTable
public void removeRoutingTable(@Nonnull
String routingTableId)
throws CloudException,
InternalException
- Specified by:
removeRoutingTable in interface VLANSupport
- Throws:
CloudException
InternalException
listDefaultNetworks
@Nonnull
public Iterable<VLAN> listDefaultNetworks(boolean shared,
boolean forDeploy)
throws CloudException,
InternalException
- Throws:
CloudException
InternalException
createVlan
@Nonnull
public VLAN createVlan(@Nonnull
String cidr,
@Nonnull
String name,
@Nonnull
String description,
@Nullable
String domainName,
@Nullable
String[] dnsServers,
@Nullable
String[] ntpServers)
throws CloudException,
InternalException
- Specified by:
createVlan in interface VLANSupport
- Throws:
CloudException
InternalException
detachNetworkInterface
public void detachNetworkInterface(@Nonnull
String nicId)
throws CloudException,
InternalException
- Specified by:
detachNetworkInterface in interface VLANSupport
- Throws:
CloudException
InternalException
getMaxNetworkInterfaceCount
public int getMaxNetworkInterfaceCount()
throws CloudException,
InternalException
- Specified by:
getMaxNetworkInterfaceCount in interface VLANSupport
- Throws:
CloudException
InternalException
removeVlan
public void removeVlan(String vlanId)
throws CloudException,
InternalException
- Specified by:
removeVlan in interface VLANSupport
- Throws:
CloudException
InternalException
supportsInternetGatewayCreation
public boolean supportsInternetGatewayCreation()
throws CloudException,
InternalException
- Specified by:
supportsInternetGatewayCreation in interface VLANSupport
- Throws:
CloudException
InternalException
supportsRawAddressRouting
public boolean supportsRawAddressRouting()
throws CloudException,
InternalException
- Specified by:
supportsRawAddressRouting in interface VLANSupport
- Throws:
CloudException
InternalException
toNetwork
@Nullable
public VLAN toNetwork(@Nullable
Node node,
@Nonnull
ProviderContext ctx)
createSubnet
@Nonnull
public Subnet createSubnet(@Nonnull
String cidr,
@Nonnull
String inProviderVlanId,
@Nonnull
String name,
@Nonnull
String description)
throws CloudException,
InternalException
- Specified by:
createSubnet in interface VLANSupport
- Throws:
CloudException
InternalException
getProviderTermForNetworkInterface
@Nonnull
public String getProviderTermForNetworkInterface(@Nonnull
Locale locale)
- Specified by:
getProviderTermForNetworkInterface in interface VLANSupport
getProviderTermForSubnet
@Nonnull
public String getProviderTermForSubnet(@Nonnull
Locale locale)
- Specified by:
getProviderTermForSubnet in interface VLANSupport
getProviderTermForVlan
@Nonnull
public String getProviderTermForVlan(@Nonnull
Locale locale)
- Specified by:
getProviderTermForVlan in interface VLANSupport
getNetworkInterface
@Nullable
public NetworkInterface getNetworkInterface(@Nonnull
String nicId)
throws CloudException,
InternalException
- Specified by:
getNetworkInterface in interface VLANSupport
- Throws:
CloudException
InternalException
getRoutingTableForSubnet
@Nullable
public RoutingTable getRoutingTableForSubnet(@Nonnull
String subnetId)
throws CloudException,
InternalException
- Specified by:
getRoutingTableForSubnet in interface VLANSupport
- Throws:
CloudException
InternalException
getRoutingTableSupport
@Nonnull
public Requirement getRoutingTableSupport()
throws CloudException,
InternalException
- Specified by:
getRoutingTableSupport in interface VLANSupport
- Throws:
CloudException
InternalException
getRoutingTableForVlan
@Nullable
public RoutingTable getRoutingTableForVlan(@Nonnull
String vlanId)
throws CloudException,
InternalException
- Specified by:
getRoutingTableForVlan in interface VLANSupport
- Throws:
CloudException
InternalException
getSubnet
@Nullable
public Subnet getSubnet(@Nonnull
String subnetId)
throws CloudException,
InternalException
- Specified by:
getSubnet in interface VLANSupport
- Throws:
CloudException
InternalException
getSubnetSupport
@Nonnull
public Requirement getSubnetSupport()
throws CloudException,
InternalException
- Specified by:
getSubnetSupport in interface VLANSupport
- Throws:
CloudException
InternalException
isVlanDataCenterConstrained
public boolean isVlanDataCenterConstrained()
throws CloudException,
InternalException
- Specified by:
isVlanDataCenterConstrained in interface VLANSupport
- Throws:
CloudException
InternalException
listFirewallIdsForNIC
@Nonnull
public Collection<String> listFirewallIdsForNIC(@Nonnull
String nicId)
throws CloudException,
InternalException
- Specified by:
listFirewallIdsForNIC in interface VLANSupport
- Throws:
CloudException
InternalException
listNetworkInterfaceStatus
@Nonnull
public Iterable<ResourceStatus> listNetworkInterfaceStatus()
throws CloudException,
InternalException
- Specified by:
listNetworkInterfaceStatus in interface VLANSupport
- Throws:
CloudException
InternalException
listNetworkInterfaces
@Nonnull
public Iterable<NetworkInterface> listNetworkInterfaces()
throws CloudException,
InternalException
- Specified by:
listNetworkInterfaces in interface VLANSupport
- Throws:
CloudException
InternalException
listNetworkInterfacesForVM
@Nonnull
public Iterable<NetworkInterface> listNetworkInterfacesForVM(@Nonnull
String forVmId)
throws CloudException,
InternalException
- Specified by:
listNetworkInterfacesForVM in interface VLANSupport
- Throws:
CloudException
InternalException
listNetworkInterfacesInSubnet
@Nonnull
public Iterable<NetworkInterface> listNetworkInterfacesInSubnet(@Nonnull
String subnetId)
throws CloudException,
InternalException
- Specified by:
listNetworkInterfacesInSubnet in interface VLANSupport
- Throws:
CloudException
InternalException
listNetworkInterfacesInVLAN
@Nonnull
public Iterable<NetworkInterface> listNetworkInterfacesInVLAN(@Nonnull
String vlanId)
throws CloudException,
InternalException
- Specified by:
listNetworkInterfacesInVLAN in interface VLANSupport
- Throws:
CloudException
InternalException
listRoutingTables
@Nonnull
public Iterable<RoutingTable> listRoutingTables(@Nonnull
String inVlanId)
throws CloudException,
InternalException
- Specified by:
listRoutingTables in interface VLANSupport
- Throws:
CloudException
InternalException
isSubnetDataCenterConstrained
public boolean isSubnetDataCenterConstrained()
throws CloudException,
InternalException
- Specified by:
isSubnetDataCenterConstrained in interface VLANSupport
- Throws:
CloudException
InternalException
listSubnets
@Nonnull
public Iterable<Subnet> listSubnets(@Nonnull
String inVlanId)
throws CloudException,
InternalException
- Specified by:
listSubnets in interface VLANSupport
- Throws:
CloudException
InternalException
listSupportedIPVersions
@Nonnull
public Iterable<IPVersion> listSupportedIPVersions()
throws CloudException,
InternalException
- Specified by:
listSupportedIPVersions in interface VLANSupport
- Throws:
CloudException
InternalException
listVlanStatus
@Nonnull
public Iterable<ResourceStatus> listVlanStatus()
throws CloudException,
InternalException
- Specified by:
listVlanStatus in interface VLANSupport
- Throws:
CloudException
InternalException
mapServiceAction
@Nonnull
public String[] mapServiceAction(@Nonnull
ServiceAction action)
- Specified by:
mapServiceAction in interface AccessControlledService
removeSubnet
public void removeSubnet(String providerSubnetId)
throws CloudException,
InternalException
- Specified by:
removeSubnet in interface VLANSupport
- Throws:
CloudException
InternalException
toVLANStatus
@Nullable
public ResourceStatus toVLANStatus(@Nullable
Node node)
Copyright © 2012 enStratus Networks Inc. All Rights Reserved.