~lutostag/ubuntu/trusty/maas/1.5.4+keystone

« back to all changes in this revision

Viewing changes to src/provisioningserver/tags.py

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2013-03-04 11:49:44 UTC
  • mto: This revision was merged to the branch mainline in revision 25.
  • Revision ID: package-import@ubuntu.com-20130304114944-azcvu9anlf8mizpa
Tags: upstream-1.3+bzr1452+dfsg
ImportĀ upstreamĀ versionĀ 1.3+bzr1452+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
    return matched_nodes, unmatched_nodes
158
158
 
159
159
 
160
 
def process_all(client, tag_name, tag_definition, nodegroup_uuid, system_ids, xpath,
161
 
                batch_size=None):
 
160
def process_all(client, tag_name, tag_definition, nodegroup_uuid, system_ids,
 
161
                xpath, batch_size=None):
162
162
    if batch_size is None:
163
163
        batch_size = DEFAULT_BATCH_SIZE
164
164
    all_matched = []
182
182
    # This also allows us to track if a nodegroup has been processed in the DB,
183
183
    # without having to add another API call.
184
184
    post_updated_nodes(
185
 
        client, tag_name, tag_definition, nodegroup_uuid, all_matched, all_unmatched)
 
185
        client, tag_name, tag_definition, nodegroup_uuid, all_matched,
 
186
        all_unmatched)
186
187
 
187
188
 
188
189
def process_node_tags(tag_name, tag_definition, batch_size=None):
204
205
    xpath = etree.XPath(tag_definition)
205
206
    # Get nodes to process
206
207
    system_ids = get_nodes_for_node_group(client, nodegroup_uuid)
207
 
    process_all(client, tag_name, tag_definition, nodegroup_uuid, system_ids, xpath,
208
 
                batch_size=batch_size)
 
208
    process_all(
 
209
        client, tag_name, tag_definition, nodegroup_uuid, system_ids, xpath,
 
210
        batch_size=batch_size)