Skip to content
This repository was archived by the owner on May 9, 2020. It is now read-only.

Commit 7b266cb

Browse files
fpedrinikamilbednarz
authored andcommitted
Add docs for encrypted_databag
1 parent b8cc53c commit 7b266cb

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

chef/api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ class ChefAPI(object):
5050
5151
with ChefAPI('http://localhost:4000', 'client.pem', 'admin'):
5252
n = Node('web1')
53+
54+
In order to use :class:`EncryptedDataBagItem` object it is necessary
55+
to specify either a path to a file containing the Chef secret key and
56+
the Encrypted Databag version to be used (v1 by default)
5357
"""
5458

5559
ruby_value_re = re.compile(r'#\{([^}]+)\}')

chef/encrypted_data_bag_item.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616

1717

1818
class EncryptedDataBagItem(DataBagItem):
19+
"""An Encrypted Chef data bag item object.
20+
21+
Encrypted Databag Items behave in the same way as :class:`DatabagItem`
22+
except the keys and values are encrypted as detailed in the Chef docs:
23+
https://docs.chef.io/data_bags.html#encrypt-a-data-bag-item
24+
25+
Refer to the :class:`DatabagItem` documentation for usage.
26+
"""
1927
SUPPORTED_ENCRYPTION_VERSIONS = (1,2)
2028
AES_MODE = 'aes_256_cbc'
2129

0 commit comments

Comments
 (0)