org.dasein.cloud.cloudstack.network
Class SecurityGroup
java.lang.Object
org.dasein.cloud.network.AbstractFirewallSupport
org.dasein.cloud.cloudstack.network.SecurityGroup
- All Implemented Interfaces:
- AccessControlledService, FirewallSupport
public class SecurityGroup
- extends AbstractFirewallSupport
|
Method Summary |
String |
authorize(String firewallId,
Direction direction,
Permission permission,
RuleTarget sourceEndpoint,
Protocol protocol,
RuleTarget destinationEndpoint,
int beginPort,
int endPort,
int precedence)
|
String |
create(FirewallCreateOptions options)
|
void |
delete(String firewallId)
|
Firewall |
getFirewall(String firewallId)
|
String |
getProviderTermForFirewall(Locale locale)
|
Collection<FirewallRule> |
getRules(String firewallId)
|
Requirement |
identifyPrecedenceRequirement(boolean inVlan)
|
boolean |
isSubscribed()
|
Collection<Firewall> |
list()
|
Iterable<String> |
listFirewallsForVM(String vmId)
|
Iterable<ResourceStatus> |
listFirewallStatus()
|
Iterable<RuleTargetType> |
listSupportedDestinationTypes(boolean inVlan)
|
Iterable<Direction> |
listSupportedDirections(boolean inVlan)
|
Iterable<Permission> |
listSupportedPermissions(boolean inVlan)
|
Iterable<RuleTargetType> |
listSupportedSourceTypes(boolean inVlan)
|
void |
revoke(String providerFirewallRuleId)
|
void |
revoke(String firewallId,
Direction direction,
Permission permission,
String source,
Protocol protocol,
int beginPort,
int endPort)
|
void |
revoke(String firewallId,
Direction direction,
Permission permission,
String source,
Protocol protocol,
RuleTarget target,
int beginPort,
int endPort)
|
void |
revoke(String firewallId,
Direction direction,
String cidr,
Protocol protocol,
int beginPort,
int endPort)
|
void |
revoke(String firewallId,
String cidr,
Protocol protocol,
int beginPort,
int endPort)
|
boolean |
supportsFirewallSources()
|
boolean |
supportsRules(Direction direction,
Permission permission,
boolean inVlan)
|
| Methods inherited from class org.dasein.cloud.network.AbstractFirewallSupport |
authorize, authorize, authorize, authorize, create, createInVLAN, getContext, getProvider, isZeroPrecedenceHighest, mapServiceAction, removeTags, removeTags, supportsFirewallCreation, updateTags, updateTags |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AUTHORIZE_SECURITY_GROUP_EGRESS
public static final String AUTHORIZE_SECURITY_GROUP_EGRESS
- See Also:
- Constant Field Values
AUTHORIZE_SECURITY_GROUP_INGRESS
public static final String AUTHORIZE_SECURITY_GROUP_INGRESS
- See Also:
- Constant Field Values
CREATE_SECURITY_GROUP
public static final String CREATE_SECURITY_GROUP
- See Also:
- Constant Field Values
DELETE_SECURITY_GROUP
public static final String DELETE_SECURITY_GROUP
- See Also:
- Constant Field Values
LIST_SECURITY_GROUPS
public static final String LIST_SECURITY_GROUPS
- See Also:
- Constant Field Values
REVOKE_SECURITY_GROUP_EGRESS
public static final String REVOKE_SECURITY_GROUP_EGRESS
- See Also:
- Constant Field Values
REVOKE_SECURITY_GROUP_INGRESS
public static final String REVOKE_SECURITY_GROUP_INGRESS
- See Also:
- Constant Field Values
authorize
@Nonnull
public String authorize(@Nonnull
String firewallId,
@Nonnull
Direction direction,
@Nonnull
Permission permission,
@Nonnull
RuleTarget sourceEndpoint,
@Nonnull
Protocol protocol,
@Nonnull
RuleTarget destinationEndpoint,
int beginPort,
int endPort,
@Nonnegative
int precedence)
throws CloudException,
InternalException
- Specified by:
authorize in interface FirewallSupport- Overrides:
authorize in class AbstractFirewallSupport
- Throws:
CloudException
InternalException
create
@Nonnull
public String create(@Nonnull
FirewallCreateOptions options)
throws InternalException,
CloudException
- Specified by:
create in interface FirewallSupport- Overrides:
create in class AbstractFirewallSupport
- Throws:
InternalException
CloudException
delete
public void delete(@Nonnull
String firewallId)
throws InternalException,
CloudException
- Throws:
InternalException
CloudException
getFirewall
@Nullable
public Firewall getFirewall(@Nonnull
String firewallId)
throws InternalException,
CloudException
- Specified by:
getFirewall in interface FirewallSupport- Overrides:
getFirewall in class AbstractFirewallSupport
- Throws:
InternalException
CloudException
getProviderTermForFirewall
@Nonnull
public String getProviderTermForFirewall(@Nonnull
Locale locale)
getRules
@Nonnull
public Collection<FirewallRule> getRules(@Nonnull
String firewallId)
throws InternalException,
CloudException
- Specified by:
getRules in interface FirewallSupport- Overrides:
getRules in class AbstractFirewallSupport
- Throws:
InternalException
CloudException
identifyPrecedenceRequirement
@Nonnull
public Requirement identifyPrecedenceRequirement(boolean inVlan)
throws InternalException,
CloudException
- Specified by:
identifyPrecedenceRequirement in interface FirewallSupport- Overrides:
identifyPrecedenceRequirement in class AbstractFirewallSupport
- Throws:
InternalException
CloudException
isSubscribed
public boolean isSubscribed()
throws CloudException,
InternalException
- Throws:
CloudException
InternalException
list
@Nonnull
public Collection<Firewall> list()
throws InternalException,
CloudException
- Throws:
InternalException
CloudException
listFirewallStatus
@Nonnull
public Iterable<ResourceStatus> listFirewallStatus()
throws InternalException,
CloudException
- Specified by:
listFirewallStatus in interface FirewallSupport- Overrides:
listFirewallStatus in class AbstractFirewallSupport
- Throws:
InternalException
CloudException
listSupportedDestinationTypes
@Nonnull
public Iterable<RuleTargetType> listSupportedDestinationTypes(boolean inVlan)
throws InternalException,
CloudException
- Throws:
InternalException
CloudException
listSupportedDirections
@Nonnull
public Iterable<Direction> listSupportedDirections(boolean inVlan)
throws InternalException,
CloudException
- Throws:
InternalException
CloudException
listSupportedPermissions
@Nonnull
public Iterable<Permission> listSupportedPermissions(boolean inVlan)
throws InternalException,
CloudException
- Throws:
InternalException
CloudException
listSupportedSourceTypes
@Nonnull
public Iterable<RuleTargetType> listSupportedSourceTypes(boolean inVlan)
throws InternalException,
CloudException
- Throws:
InternalException
CloudException
revoke
public void revoke(@Nonnull
String providerFirewallRuleId)
throws InternalException,
CloudException
- Specified by:
revoke in interface FirewallSupport- Overrides:
revoke in class AbstractFirewallSupport
- Throws:
InternalException
CloudException
listFirewallsForVM
@Nonnull
public Iterable<String> listFirewallsForVM(@Nonnull
String vmId)
throws CloudException,
InternalException
- Throws:
CloudException
InternalException
revoke
public void revoke(@Nonnull
String firewallId,
@Nonnull
String cidr,
@Nonnull
Protocol protocol,
int beginPort,
int endPort)
throws CloudException,
InternalException
- Specified by:
revoke in interface FirewallSupport- Overrides:
revoke in class AbstractFirewallSupport
- Throws:
CloudException
InternalException
revoke
public void revoke(@Nonnull
String firewallId,
@Nonnull
Direction direction,
@Nonnull
String cidr,
@Nonnull
Protocol protocol,
int beginPort,
int endPort)
throws CloudException,
InternalException
- Specified by:
revoke in interface FirewallSupport- Overrides:
revoke in class AbstractFirewallSupport
- Throws:
CloudException
InternalException
revoke
public void revoke(@Nonnull
String firewallId,
@Nonnull
Direction direction,
@Nonnull
Permission permission,
@Nonnull
String source,
@Nonnull
Protocol protocol,
int beginPort,
int endPort)
throws CloudException,
InternalException
- Specified by:
revoke in interface FirewallSupport- Overrides:
revoke in class AbstractFirewallSupport
- Throws:
CloudException
InternalException
revoke
public void revoke(@Nonnull
String firewallId,
@Nonnull
Direction direction,
@Nonnull
Permission permission,
@Nonnull
String source,
@Nonnull
Protocol protocol,
@Nonnull
RuleTarget target,
int beginPort,
int endPort)
throws CloudException,
InternalException
- Specified by:
revoke in interface FirewallSupport- Overrides:
revoke in class AbstractFirewallSupport
- Throws:
CloudException
InternalException
supportsRules
public boolean supportsRules(@Nonnull
Direction direction,
@Nonnull
Permission permission,
boolean inVlan)
throws CloudException,
InternalException
- Specified by:
supportsRules in interface FirewallSupport- Overrides:
supportsRules in class AbstractFirewallSupport
- Throws:
CloudException
InternalException
supportsFirewallSources
public boolean supportsFirewallSources()
throws CloudException,
InternalException
- Specified by:
supportsFirewallSources in interface FirewallSupport- Overrides:
supportsFirewallSources in class AbstractFirewallSupport
- Throws:
CloudException
InternalException
Copyright © 2013 enstratius, Inc.. All Rights Reserved.