yakumo.base.Resource

Package yakumo :: Module base :: Class Resource |
[hide private]
[frames] | no frames]

# Class Resource

source code

    object --+
             |
            Resource

Known Subclasses:
  - GlanceV2Resource
  - , neutron.v2.port.Resource
  - , neutron.v2.router.Resource
  - , neutron.v2.floating_ip.Resource
  - , neutron.v2.security_group_rule.Resource
  - , neutron.v2.subnet_pool.Resource
  - , neutron.v2.quota.Resource
  - , neutron.v2.security_group.Resource
  - , neutron.v2.network.Resource
  - , neutron.v2.subnet.Resource
  - , neutron.v2.lb.pool.Resource
  - , neutron.v2.lb.vip.Resource
  - , neutron.v2.lb.health_monitor.Resource
  - , neutron.v2.lb.member.Resource
  - , neutron.v2.metering.label.Resource
  - , neutron.v2.metering.rule.Resource
  - , neutron.v2.vpn.service.Resource
  - , neutron.v2.vpn.ipsec_policy.Resource
  - , neutron.v2.vpn.ike_policy.Resource
  - , neutron.v2.vpn.ipsec_site_connection.Resource
  - , neutron.v2.lbaas.listener.Resource
  - , neutron.v2.lbaas.pool.Resource
  - , neutron.v2.lbaas.health_monitor.Resource
  - , neutron.v2.lbaas.member.Resource
  - , neutron.v2.lbaas.load_balancer.Resource
  - , cinder.v1.volume_type.Resource
  - , cinder.v1.snapshot.Resource
  - , cinder.v1.volume.Resource
  - , cinder.v2.consistency_group_snapshot.Resource
  - , cinder.v2.volume.Resource
  - , cinder.v2.volume_transfer.Resource
  - , cinder.v2.volume_type.Resource
  - , cinder.v2.service.Resource
  - , cinder.v2.consistency_group.Resource
  - , cinder.v2.qos.Resource
  - , cinder.v2.volume_backup.Resource
  - , cinder.v2.quota_set.Resource
  - , cinder.v2.snapshot.Resource
  - , nova.v2.quota_set.Resource
  - , nova.v2.security_group_default_rule.Resource
  - , nova.v2.interface_attachment.Resource
  - , nova.v2.aggregate.Resource
  - , nova.v2.key_pair.Resource
  - , nova.v2.hypervisor.Resource
  - , nova.v2.agent.Resource
  - , nova.v2.floating_ip_dns.Resource
  - , nova.v2.fixed_ip.Resource
  - , nova.v2.certificate.Resource
  - , nova.v2.flavor.Resource
  - , nova.v2.floating_ip.Resource
  - , nova.v2.cloudpipe.Resource
  - , nova.v2.image.Resource
  - , nova.v2.security_group_rule.Resource
  - , nova.v2.network.Resource
  - , nova.v2.server_group.Resource
  - , nova.v2.service.Resource
  - , nova.v2.server.Resource
  - , nova.v2.availability_zone.Resource
  - , nova.v2.security_group.Resource
  - , nova.v2.volume_attachment.Resource
  - , nova.v2.floating_ip_bulk.Resource
  - , keystone.v2.service.Resource
  - , keystone.v2.endpoint.Resource
  - , keystone.v2.project.Resource
  - , keystone.v2.role.Resource
  - , keystone.v2.user.Resource
  - , keystone.v3.service.Resource
  - , keystone.v3.user.Resource
  - , keystone.v3.domain.Resource
  - , keystone.v3.endpoint.Resource
  - , keystone.v3.credential.Resource
  - , keystone.v3.project.Resource
  - , keystone.v3.group.Resource
  - , keystone.v3.role.Resource
  - , keystone.v3.region.Resource
  - , glance.v1.image.Resource

Base class for resources.

Instance Methods | [hide private]
yakumo.base.Resource |
__init__(self, manager, *args, **kwargs) Create a resource object | source code
__eq__(self, other) | source code
__ne__(self, other) | source code
__repr__(self) repr(x) | source code
__str__(self) str(x) | source code
__getattr__(self, name) | source code
_set_attrs(self, kwargs) | source code
None |
_clear_attrs(self) Clear attributes | source code
str |
get_id(self) Query ID of a resource | source code
dict |
get_attrs(self) Aquire attributes as a dictionary | source code
bool |
reload(self) (Re)load attributes of a resource | source code
None |
update(self, **kwargs) Update a resource and reload it. | source code
None |
delete(self) Delete a resource | source code
None |
wait_for_finished(self, count=10, interval=10) Wait for task finished | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Class Variables | [hide private]
| _id = `None`
| _attrs = ``[``]``
| _loaded = `True`
| _sub_manager_list = ``{``}``
| _state_attr = ``'``status``'``
| _stable_state = ``[``]``

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, manager, *args, **kwargs) (Constructor) | source code
Create a resource object Don't call this method directly; use Manager methods instead. Parameters: `manager` (yakumo.base.Manager) - Manager object Returns: yakumo.base.Resource Resource object Overrides: object.__init__

### __repr__(self) (Representation operator) | source code
repr(x) Overrides: object.__repr__ (inherited documentation)

### __str__(self) (Informal representation operator) | source code
str(x) Overrides: object.__str__ (inherited documentation)

### get_id(self) | source code
Query ID of a resource Returns: str ID

### get_attrs(self) | source code
Aquire attributes as a dictionary Returns: dict attributes

### reload(self) | source code
(Re)load attributes of a resource Returns: bool Whether attributes are updated

### update(self, **kwargs) | source code
Update a resource and reload it. kwargs: attributes and their values to update Returns: None

### wait_for_finished(self, count=10, interval=10) | source code
Wait for task finished Parameters: `count` (int) - Maximum polling time `interval` (int) - Polling interval in seconds Returns: None