public interface ChefService
Modifier and Type | Method and Description |
---|---|
void |
cleanupStaleNodesAndClients(String prefix,
int secondsStale)
Removes the nodes and clients that have been inactive for a given amount of
time.
|
Statement |
createBootstrapScriptForGroup(String group)
Creates all steps necessary to bootstrap the node.
|
Statement |
createBootstrapScriptForGroup(String group,
String nodeName)
Creates all steps necessary to bootstrap the node.
|
Node |
createNodeAndPopulateAutomaticAttributes(String nodeName,
Iterable<String> runList)
Creates a new node and populates the automatic attributes.
|
byte[] |
decrypt(InputStream input)
Decrypts the given input stream.
|
void |
deleteAllClientsInList(Iterable<String> names)
Deletes the given clients.
|
void |
deleteAllNodesInList(Iterable<String> names)
Deletes the given nodes.
|
byte[] |
encrypt(InputStream input)
Encrypts the given input stream.
|
BootstrapConfig |
getBootstrapConfigForGroup(String group)
Gets the bootstrap configuration for a given group.
|
Iterable<? extends Client> |
listClients()
Lists the details of all existing clients.
|
Iterable<? extends Client> |
listClients(ExecutorService executorService)
Lists the details of all existing clients, but executing concurrently using the threads available in the ExecutorService.
|
Iterable<? extends CookbookVersion> |
listCookbookVersions()
Lists the details of all existing cookbooks.
|
Iterable<? extends CookbookVersion> |
listCookbookVersions(ExecutorService executorService)
Lists the details of all existing cookbooks.
|
Iterable<? extends CookbookVersion> |
listCookbookVersionsInEnvironment(String environmentName)
Lists the details of all existing cookbooks in an environment.
|
Iterable<? extends CookbookVersion> |
listCookbookVersionsInEnvironment(String environmentName,
ExecutorService executorService)
Lists the details of all existing cookbooks in an environment.
|
Iterable<? extends CookbookVersion> |
listCookbookVersionsInEnvironment(String environmentName,
String numVersions)
Lists the details of all existing cookbooks in an environment
limiting number of versions.
|
Iterable<? extends CookbookVersion> |
listCookbookVersionsInEnvironment(String environmentName,
String numVersions,
ExecutorService executorService)
Lists the details of all existing cookbooks in an environment
limiting number of versions.
|
Iterable<? extends Environment> |
listEnvironments()
Lists the details of all existing environments.
|
Iterable<? extends Node> |
listNodes()
Lists the details of all existing nodes.
|
Iterable<? extends Node> |
listNodes(ExecutorService executorService)
Lists the details of all existing nodes, executing concurrently using the executorService.
|
Iterable<? extends Node> |
listNodesInEnvironment(String environmentName)
Lists the details of all existing nodes in the given environment.
|
Iterable<? extends Node> |
listNodesInEnvironment(String environmentName,
ExecutorService executorService)
Lists the details of all existing nodes in the given environment, using the ExecutorService to paralleling the execution.
|
void |
updateAutomaticAttributesOnNode(String nodeName)
Updates and populate the automatic attributes of the given node.
|
void |
updateBootstrapConfigForGroup(String group,
BootstrapConfig bootstrapConfig)
Configures how the nodes of a certain group will be bootstrapped
|
byte[] encrypt(InputStream input) throws IOException
input
- The input stream to encrypt.IOException
- If there is an error reading from the input stream.byte[] decrypt(InputStream input) throws IOException
input
- The input stream to decrypt.IOException
- If there is an error reading from the input stream.Statement createBootstrapScriptForGroup(String group)
group
- corresponds to a configured
ChefProperties.CHEF_BOOTSTRAP_DATABAG
data bag where
run_list and other information are stored.Statement createBootstrapScriptForGroup(String group, @Nullable String nodeName)
group
- corresponds to a configured
ChefProperties.CHEF_BOOTSTRAP_DATABAG
data bag where
run_list and other information are stored.nodeName
- The name of the node to create.void updateBootstrapConfigForGroup(String group, BootstrapConfig bootstrapConfig)
group
- The group where the given bootstrap configuration will be
applied.bootstrapConfig
- The configuration to be applied to the nodes in the
group.BootstrapConfig getBootstrapConfigForGroup(String group)
group
- The name of the group.Node createNodeAndPopulateAutomaticAttributes(String nodeName, Iterable<String> runList)
nodeName
- The name of the node to create.runList
- The run list for the created node.OhaiModule
,
ChefUtils.ohaiAutomaticAttributeBinder(com.google.inject.Binder)
void updateAutomaticAttributesOnNode(String nodeName)
nodeName
- The node to update.void cleanupStaleNodesAndClients(String prefix, int secondsStale)
prefix
- The prefix for the nodes and clients to delete.secondsStale
- The seconds of inactivity to consider a node and
client obsolete.void deleteAllNodesInList(Iterable<String> names)
names
- The names of the nodes to delete.void deleteAllClientsInList(Iterable<String> names)
names
- The names of the client to delete.Iterable<? extends Node> listNodes()
Iterable<? extends Node> listNodes(ExecutorService executorService)
Iterable<? extends Node> listNodesInEnvironment(String environmentName)
environmentName
- The name fo the environment.Iterable<? extends Node> listNodesInEnvironment(String environmentName, ExecutorService executorService)
executorService
- The thread pool used in this operationenvironmentName
- The name fo the environment.Iterable<? extends Client> listClients()
Iterable<? extends Client> listClients(ExecutorService executorService)
Iterable<? extends CookbookVersion> listCookbookVersions()
Iterable<? extends CookbookVersion> listCookbookVersions(ExecutorService executorService)
Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName)
environmentName
- The environment name.Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName, ExecutorService executorService)
executorService
- The thread pool to do the concurrent execution.environmentName
- The environment name.Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName, String numVersions)
environmentName
- The environment name.numVersions
- The number of cookbook versions to include.
Use 'all' to return all cookbook versions.Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName, String numVersions, ExecutorService executorService)
executorService
- The executorService used to do this operation concurrently.environmentName
- The environment name.numVersions
- The number of cookbook versions to include.
Use 'all' to return all cookbook versions.Iterable<? extends Environment> listEnvironments()
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.