1 | <?php |
||
7 | class Chef |
||
8 | { |
||
9 | /** |
||
10 | * @var \Jenssegers\Chef\Chef The chef API |
||
11 | */ |
||
12 | private $chef; |
||
13 | |||
14 | /** |
||
15 | * Construct the Chef Wrapper |
||
16 | * |
||
17 | * @param \Jenssegers\Chef\Chef $chef The chef API |
||
18 | */ |
||
19 | public function __construct(ChefApi $chef) |
||
23 | |||
24 | /** |
||
25 | * Updates the data bag item overwriting existing fields with the data provided. |
||
26 | * |
||
27 | * @param string $name The name of the data bag. |
||
28 | * @param string $item The name of the item in the data bag. |
||
29 | * @param array $data Fields to update in the data bag with their data. |
||
30 | * |
||
31 | * @return void |
||
32 | */ |
||
33 | public function patchDatabag($name, $item, array $data) |
||
40 | |||
41 | /** |
||
42 | * Gets the list of nodes. |
||
43 | * |
||
44 | * @param string $role The role to query. If unset, returns all nodes. |
||
45 | * |
||
46 | * @return array The names of the nodes registered in chef. |
||
47 | */ |
||
48 | public function getNodes($role = null) |
||
65 | |||
66 | /** |
||
67 | * Delete the given node. |
||
68 | * |
||
69 | * @param string $node The name of the node to delete. |
||
70 | * |
||
71 | * @return void |
||
72 | */ |
||
73 | public function deleteNode($node) |
||
77 | } |
||
78 |