Kwargs in Create_server method in servers_client

Bug #900910 reported by Nachi Ueno
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Medium
Rohit Karajgi

Bug Description

Create_server method in servers_client only get,
name, image_ref, flavor_ref, meta, personality, accessIPv4, accessIPv6, key_name, adminPass

So we can not test network parameter.

    def create_server(self, name, image_ref, flavor_ref, meta=None,
                      personality=None, accessIPv4=None, accessIPv6=None,
                      key_name=None, adminPass=None):

We wanna add new function which get any parameter using kwargs.

def create_server_kw(self, *args, **kwargs):

Tags: compute ntt
Nachi Ueno (nati-ueno)
Changed in tempest:
assignee: nobody → Rohit Karajgi (rohitkarajgi)
tags: added: ntt
Revision history for this message
Daryl Walleck (dwalleck) wrote :

We can make that change, but won't we still have to handle parsing the argument into JSON regardless? That was my reason for not using kwargs there.

Revision history for this message
Rohit Karajgi (rohitk) wrote :

This change makes sense as we can test extensions in 1.1 specification using the same rest client. In 1.1 extensions for create_server, we can specify additional parameters such as fixed_ip_address, security_group, user_data and availability_zone

The same client API can be used to test core create_server code as well as create server extensions.

Revision history for this message
Nachi Ueno (nati-ueno) wrote :

Hi Dary

Rationality is extensions as Rohit mentioned.

As you said, to specify parameters are important.
That is why I propose another helper method "create_server_kw".

Rohit Karajgi (rohitk)
Changed in tempest:
status: New → In Progress
importance: Undecided → Medium
Rohit Karajgi (rohitk)
Changed in tempest:
milestone: none → essex-2
tags: added: testcase
tags: added: compute
tags: removed: testcase
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/2261
Committed: http://github.com/openstack/tempest/commit/95446a2a806bdf9e270dd06e224e4d25937eb060
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit 95446a2a806bdf9e270dd06e224e4d25937eb060
Author: Rohit Karajgi <email address hidden>
Date: Mon Dec 12 06:21:43 2011 -0800

    Fixes Bug lp:900910

    - Modified create_server() client method to include optional kwargs.
    - This dict can be used to pass any number of optional args including
    those supported by create server extension and avoids the need of having a
    separate create_server() method

    Change-Id: I742ae411330b9e006130d3a4b59c7201f59243cd

Changed in tempest:
status: In Progress → Fix Committed
Jay Pipes (jaypipes)
Changed in tempest:
status: Fix Committed → Fix Released
Sean Dague (sdague)
Changed in tempest:
milestone: none → havana-3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.