[openstack-qa] Whitebox aggregation

Frittoli, Andrea (Cloud Services) frittoli at hp.com
Mon Feb 25 12:17:42 UTC 2013


Hi All,

 

The whitebox class provides some additional functions useful for whitebox
testing. 

But it does also provide a "create server" function, the corresponding
resource management, and it inherits from Fuzz client, which provides
additional resource mgmt. 

 

Whitebox functionality is used in different ways by:

-          class ServersWhiteboxTest(whitebox.ComputeWhiteboxTest)

-          class ImagesWhiteboxTest(whitebox.ComputeWhiteboxTest,
base.BaseComputeTest)

o   this class is using create_server which available in both ancestors 

 

I see two possible solutions to this:

 

1) Modify the whitebox base class to remove the fuzz client and server
resource management bit.  Let both whitebox test classes inherit from both
the BaseComputeTest as well as the ComputeWhiteboxTest

 

class ComputeWhiteboxTest(WhiteboxTest):

    @classmethod

    def get_db_handle_and_meta(cls, database='nova'):

   def nova_manage(self, category, action, params):

    def get_ssh_connection(self, host, username, password):

 

2) Keep the ComputeWhiteboxTest self-sufficient as test class. This will
maintain the existing code duplication. Change ImagesWhiteboxTest to inherit
from ComputeWhiteboxTest only.

 

I would go for option (1) as it reduces the code duplication. 

 

Thoughts, feedback?

 

Thanks,

 

andrea

 

-- 

Andrea Frittoli

IaaS Systems Engineering Team

HP Cloud Services

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-qa/attachments/20130225/88252933/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6202 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-qa/attachments/20130225/88252933/attachment.bin>


More information about the openstack-qa mailing list