Package yakumo :: Package neutron :: Package v2 :: Module security_group_rule :: Class Manager
[hide private]
[frames] | no frames]

Class Manager

source code

  object --+        
           |        
base.Manager --+    
               |    
 base.SubManager --+
                   |
                  Manager

Manager class for security group rules in Networking V2 API

Nested Classes [hide private]
  resource_class
Resource class for security group rules in Networking V2 API
Instance Methods [hide private]
yakumo.neutron.v2.security_group_rule.Resource
create(self, direction='__UNDEF__', ethertype='__UNDEF__', port_range_min='__UNDEF__', port_range_max='__UNDEF__', protocol='__UNDEF__', remote_group='__UNDEF__', remote_ip_prefix='__UNDEF__')
Register a rule of a security group
source code
 
_find_gen(self, **kwargs)
Find a security group rule
source code

Inherited from base.SubManager: __init__

Inherited from base.Manager: find, find_one, get, get_empty, list

Inherited from base.Manager (private): _attr2json, _json2attr, _no_such_api

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  service_type = 'network'
  _attr_mapping = [('id', 'id', <yakumo.mapper.NoopClass object ...
  _hidden_methods = ['update']
  _json_resource_key = 'security_group_rule'
  _json_resources_key = 'security_group_rules'
  _url_resource_path = '/v2.0/security-group-rules'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

create(self, direction='__UNDEF__', ethertype='__UNDEF__', port_range_min='__UNDEF__', port_range_max='__UNDEF__', protocol='__UNDEF__', remote_group='__UNDEF__', remote_ip_prefix='__UNDEF__')

source code 

Register a rule of a security group

Parameters:
  • direction (str) - Direction (ingress or egress)
  • ethertype - Ether type
  • port_range_min (int) - Minimum number of the port range
  • port_range_max (int) - Maximum number of the port range
  • protocol (str) - Protocol (tcp, udp or icmp)
  • remote_group () - Remote group
  • remote_ip_prefix (str) - Remote IP address prefix
Returns: yakumo.neutron.v2.security_group_rule.Resource
Created rule
Overrides: base.Manager.create

_find_gen(self, **kwargs)

source code 

Find a security group rule

:param key=value: search condition

Overrides: base.Manager._find_gen

Class Variable Details [hide private]

_attr_mapping

Value:
[('id', 'id', mapper.Noop), ('direction', 'direction', mapper.Noop), (\
'ethertype', 'ethertype', mapper.Noop), ('remote_ip_prefix', 'remote_i\
p_prefix', mapper.Noop), ('port_range_max', 'port_range_max', mapper.N\
oop), ('port_range_min', 'port_range_min', mapper.Noop), ('protocol', \
'protocol', mapper.Noop), ('security_group', 'security_group_id', mapp\
er.Resource('neutron.security_group')), ('remote_group', 'remote_group\
_id', mapper.Resource('neutron.security_group')), ('project', 'tenant_\
id', mapper.Resource('project')),]