~ubuntu-branches/ubuntu/vivid/ironic/vivid-updates

« back to all changes in this revision

Viewing changes to ironic/tests/api/utils.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2015-04-17 09:28:31 UTC
  • mfrom: (1.2.7)
  • Revision ID: package-import@ubuntu.com-20150417092831-wu2awfbqomnzpeim
Tags: 2015.1~rc1-0ubuntu1
* New upstream milestone release:
  - d/control: Align with upstream dependencies
  - d/p/fix-requirements.patch: Dropped no longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
    chassis = utils.get_test_chassis(**kw)
95
95
    internal = chassis_controller.ChassisPatchType.internal_attrs()
96
96
    return remove_internal(chassis, internal)
 
97
 
 
98
 
 
99
def post_get_test_node(**kw):
 
100
    # NOTE(lucasagomes): When creating a node via API (POST)
 
101
    #                    we have to use chassis_uuid
 
102
    node = node_post_data(**kw)
 
103
    chassis = utils.get_test_chassis()
 
104
    node['chassis_id'] = None
 
105
    node['chassis_uuid'] = kw.get('chassis_uuid', chassis['uuid'])
 
106
    return node