org.dasein.cloud.cloudstack.network
Class SecurityGroup

java.lang.Object
  extended by org.dasein.cloud.cloudstack.network.SecurityGroup
All Implemented Interfaces:
AccessControlledService, FirewallSupport

public class SecurityGroup
extends Object
implements FirewallSupport


Field Summary
static String AUTHORIZE_SECURITY_GROUP_EGRESS
           
static String AUTHORIZE_SECURITY_GROUP_INGRESS
           
static String CREATE_SECURITY_GROUP
           
static String DELETE_SECURITY_GROUP
           
static String LIST_SECURITY_GROUPS
           
static String REVOKE_SECURITY_GROUP_INGRESS
           
 
Fields inherited from interface org.dasein.cloud.network.FirewallSupport
ANY, AUTHORIZE, CREATE_FIREWALL, GET_FIREWALL, LIST_FIREWALL, REMOVE_FIREWALL, REVOKE
 
Method Summary
 String authorize(String firewallId, Direction direction, Permission permission, String cidr, Protocol protocol, int beginPort, int endPort)
           
 String authorize(String firewallId, Direction direction, Permission permission, String source, Protocol protocol, RuleTarget target, int beginPort, int endPort)
           
 String authorize(String firewallId, Direction direction, String cidr, Protocol protocol, int beginPort, int endPort)
           
 String authorize(String firewallId, String cidr, Protocol protocol, int beginPort, int endPort)
          Deprecated. 
 String create(String name, String description)
           
 String createInVLAN(String name, String description, String providerVlanId)
           
 void delete(String firewallId)
           
 Firewall getFirewall(String firewallId)
           
 String getProviderTermForFirewall(Locale locale)
           
 Collection<FirewallRule> getRules(String firewallId)
           
 boolean isSubscribed()
           
 Collection<Firewall> list()
           
 Iterable<String> listFirewallsForVM(String vmId)
           
 Iterable<ResourceStatus> listFirewallStatus()
           
 Iterable<RuleTargetType> listSupportedDestinationTypes(boolean inVlan)
           
 String[] mapServiceAction(ServiceAction action)
           
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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_INGRESS

public static final String REVOKE_SECURITY_GROUP_INGRESS
See Also:
Constant Field Values
Method Detail

authorize

@Deprecated
@Nonnull
public String authorize(@Nonnull
                                           String firewallId,
                                           @Nonnull
                                           String cidr,
                                           @Nonnull
                                           Protocol protocol,
                                           int beginPort,
                                           int endPort)
                 throws CloudException,
                        InternalException
Deprecated. 

Specified by:
authorize in interface FirewallSupport
Throws:
CloudException
InternalException

authorize

@Nonnull
public String authorize(@Nonnull
                                String firewallId,
                                @Nonnull
                                Direction direction,
                                @Nonnull
                                String cidr,
                                @Nonnull
                                Protocol protocol,
                                int beginPort,
                                int endPort)
                 throws CloudException,
                        InternalException
Specified by:
authorize in interface FirewallSupport
Throws:
CloudException
InternalException

authorize

@Nonnull
public String authorize(@Nonnull
                                String firewallId,
                                @Nonnull
                                Direction direction,
                                @Nonnull
                                Permission permission,
                                @Nonnull
                                String cidr,
                                @Nonnull
                                Protocol protocol,
                                int beginPort,
                                int endPort)
                 throws CloudException,
                        InternalException
Specified by:
authorize in interface FirewallSupport
Throws:
CloudException
InternalException

authorize

@Nonnull
public String authorize(@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:
authorize in interface FirewallSupport
Throws:
CloudException
InternalException

create

@Nonnull
public String create(@Nonnull
                             String name,
                             @Nonnull
                             String description)
              throws InternalException,
                     CloudException
Specified by:
create in interface FirewallSupport
Throws:
InternalException
CloudException

createInVLAN

@Nonnull
public String createInVLAN(@Nonnull
                                   String name,
                                   @Nonnull
                                   String description,
                                   @Nonnull
                                   String providerVlanId)
                    throws InternalException,
                           CloudException
Specified by:
createInVLAN in interface FirewallSupport
Throws:
InternalException
CloudException

delete

public void delete(@Nonnull
                   String firewallId)
            throws InternalException,
                   CloudException
Specified by:
delete in interface FirewallSupport
Throws:
InternalException
CloudException

getFirewall

@Nullable
public Firewall getFirewall(@Nonnull
                                     String firewallId)
                     throws InternalException,
                            CloudException
Specified by:
getFirewall in interface FirewallSupport
Throws:
InternalException
CloudException

getProviderTermForFirewall

@Nonnull
public String getProviderTermForFirewall(@Nonnull
                                                 Locale locale)
Specified by:
getProviderTermForFirewall in interface FirewallSupport

getRules

@Nonnull
public Collection<FirewallRule> getRules(@Nonnull
                                                 String firewallId)
                                  throws InternalException,
                                         CloudException
Specified by:
getRules in interface FirewallSupport
Throws:
InternalException
CloudException

isSubscribed

public boolean isSubscribed()
                     throws CloudException,
                            InternalException
Specified by:
isSubscribed in interface FirewallSupport
Throws:
CloudException
InternalException

list

@Nonnull
public Collection<Firewall> list()
                          throws InternalException,
                                 CloudException
Specified by:
list in interface FirewallSupport
Throws:
InternalException
CloudException

listFirewallStatus

@Nonnull
public Iterable<ResourceStatus> listFirewallStatus()
                                            throws InternalException,
                                                   CloudException
Specified by:
listFirewallStatus in interface FirewallSupport
Throws:
InternalException
CloudException

listSupportedDestinationTypes

@Nonnull
public Iterable<RuleTargetType> listSupportedDestinationTypes(boolean inVlan)
                                                       throws InternalException,
                                                              CloudException
Specified by:
listSupportedDestinationTypes in interface FirewallSupport
Throws:
InternalException
CloudException

revoke

public void revoke(@Nonnull
                   String providerFirewallRuleId)
            throws InternalException,
                   CloudException
Specified by:
revoke in interface FirewallSupport
Throws:
InternalException
CloudException

listFirewallsForVM

@Nonnull
public Iterable<String> listFirewallsForVM(@Nonnull
                                                   String vmId)
                                    throws CloudException,
                                           InternalException
Throws:
CloudException
InternalException

mapServiceAction

@Nonnull
public String[] mapServiceAction(@Nonnull
                                         ServiceAction action)
Specified by:
mapServiceAction in interface AccessControlledService

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
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
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
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
Throws:
CloudException
InternalException

supportsRules

public boolean supportsRules(@Nonnull
                             Direction direction,
                             @Nonnull
                             Permission permission,
                             boolean inVlan)
                      throws CloudException,
                             InternalException
Specified by:
supportsRules in interface FirewallSupport
Throws:
CloudException
InternalException

supportsFirewallSources

public boolean supportsFirewallSources()
                                throws CloudException,
                                       InternalException
Specified by:
supportsFirewallSources in interface FirewallSupport
Throws:
CloudException
InternalException


Copyright © 2012 enStratus Networks Inc. All Rights Reserved.