Package yakumo :: Package swift :: Package v1 :: Module container :: Class Resource
[hide private]
[frames] | no frames]

Class Resource

source code

      object --+        
               |        
   base.Resource --+    
                   |    
base.SwiftV1Resource --+
                       |
                      Resource

resource class for containers on Object Storage V1 API

Instance Methods [hide private]
yakumo.swift.v1.container.Resource
update(self, read_acl='__UNDEF__', write_acl='__UNDEF__', sync_to='__UNDEF__', sync_key='__UNDEF__', versions_location='__UNDEF__', history_location='__UNDEF__', ac_allow_origin='__UNDEF__', ac_max_age='__UNDEF__', quota_bytes='__UNDEF__', quota_count='__UNDEF__', temp_url_key='__UNDEF__', temp_url_key2='__UNDEF__', trans_id_extra='__UNDEF__', storage_policy='__UNDEF__')
Update a container
source code
None
set_metadata(self, **metadata)
Update metadata of a volume
source code
None
unset_metadata(self, *keys)
Delete metadata of a volume
source code

Inherited from base.SwiftV1Resource: get_metadata

Inherited from base.Resource: __enter__, __eq__, __exit__, __getattr__, __init__, __ne__, __repr__, __str__, delete, get_attrs, get_id, reload, wait_for_finished

Inherited from base.Resource (private): _clear_attrs, _set_attrs

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

Class Variables [hide private]
  _sub_manager_list = {'object': <class 'yakumo.swift.v1.file_ob...

Inherited from base.Resource (private): _attrs, _id, _loaded, _stable_state, _state_attr

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

update(self, read_acl='__UNDEF__', write_acl='__UNDEF__', sync_to='__UNDEF__', sync_key='__UNDEF__', versions_location='__UNDEF__', history_location='__UNDEF__', ac_allow_origin='__UNDEF__', ac_max_age='__UNDEF__', quota_bytes='__UNDEF__', quota_count='__UNDEF__', temp_url_key='__UNDEF__', temp_url_key2='__UNDEF__', trans_id_extra='__UNDEF__', storage_policy='__UNDEF__')

source code 

Update a container

Parameters:
  • read_acl (str) - The ACL that grants read access
  • write_acl (str) - The ACL that grants write access
  • sync_to (str) - The destination for container synchronization
  • sync_key (str) - The secret key for container synchronization
  • versions_location (str) - The URL-encoded UTF-8 representation of the container that stores previous versions of objects
  • history_location (str) - The URL-encoded UTF-8 representation of the container that stores previous versions of objects
  • ac_allow_origin (str) - Originating URLs allowed to make cross-origin requests (CORS), separated by spaces.
  • ac_max_age () - Maximum time for the origin to hold the preflight results
  • quota_bytes (int) - The maximum size of the container, in bytes
  • quota_count - The maximum object count of the container
  • temp_url_key (str) - The secret key value for temporary URLs
  • temp_url_key2 (str) - The 2nd secret key value for temporary URLs
  • trans_id_extra (str) - Extra transaction information
  • storage_policy (str) - Name of the storage policy
  • qouta_count (int)
Returns: yakumo.swift.v1.container.Resource
Created container
Overrides: base.Resource.update

set_metadata(self, **metadata)

source code 

Update metadata of a volume

Parameters:
  • metadata (dict) - Key=value style metadata
Returns: None
Overrides: base.SwiftV1Resource.set_metadata

unset_metadata(self, *keys)

source code 

Delete metadata of a volume

Parameters:
  • key - Key of the metadata
  • keys ([str])
Returns: None
Overrides: base.SwiftV1Resource.unset_metadata

Class Variable Details [hide private]

_sub_manager_list

Value:
{'object': <class 'yakumo.swift.v1.file_object.Manager'>}