)]}'
{"tempest/openstack.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"32844d5cf2568c49e28d627bfb61ab685e89eec2","unresolved":false,"context_lines":[{"line_number":7,"context_line":"from tempest.services.nova.json.extensions_client import ExtensionsClient"},{"line_number":8,"context_line":"from tempest.services.nova.json.security_groups_client \\"},{"line_number":9,"context_line":"import SecurityGroupsClient"},{"line_number":10,"context_line":"from tempest.services.nova.json.floatingIPs_client import FloatingIPsClient"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"import tempest.config"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2Fxo%3D","line":10,"updated":"2012-01-23 17:59:47.000000000","message":"Sapan, please make sure you run Tempest before you push new changes. This is an ImportError, since you changed the filename to floating_ips_client but did not change the above to:\n\n from tempest.services.nova.json.floating_ips_client import FloatingIPsClient","commit_id":"ee06572dde150592decbf8acfd7594671a28bc17"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"32844d5cf2568c49e28d627bfb61ab685e89eec2","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                                              self.config.nova.api_key,"},{"line_number":52,"context_line":"                                              self.config.nova.auth_url,"},{"line_number":53,"context_line":"                                              self.config.nova.tenant_name)"},{"line_number":54,"context_line":"            self.floatingIPs_client \u003d FloatingIPsClient(self.config,"},{"line_number":55,"context_line":"                                              self.config.nova.username,"},{"line_number":56,"context_line":"                                              self.config.nova.api_key,"},{"line_number":57,"context_line":"                                              self.config.nova.auth_url,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2Fxk%3D","line":54,"updated":"2012-01-23 17:59:47.000000000","message":"This needs to be self.floating_ips_client","commit_id":"ee06572dde150592decbf8acfd7594671a28bc17"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"32844d5cf2568c49e28d627bfb61ab685e89eec2","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                                              self.config.nova.username,"},{"line_number":84,"context_line":"                                              self.config.nova.api_key,"},{"line_number":85,"context_line":"                                              self.config.nova.auth_url)"},{"line_number":86,"context_line":"            self.floatingIPs_client \u003d FloatingIPsClient(self.config,"},{"line_number":87,"context_line":"                                              self.config.nova.username,"},{"line_number":88,"context_line":"                                              self.config.nova.api_key,"},{"line_number":89,"context_line":"                                              self.config.nova.auth_url)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2Fxg%3D","line":86,"updated":"2012-01-23 17:59:47.000000000","message":"This needs to be self.floating_ips_client","commit_id":"ee06572dde150592decbf8acfd7594671a28bc17"}],"tempest/services/nova/json/floatingIPs_client.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e14b43301741d8f49e727a29b61bb6dcd4cfde9e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"from tempest.common import rest_client"},{"line_number":2,"context_line":"import json"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"class FloatingIPsClient(object):"},{"line_number":6,"context_line":"    def __init__(self, config, username, key, auth_url, tenant_name\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F850%3D","line":3,"updated":"2012-01-18 20:40:15.000000000","message":"Please rename this file to floating_ips_client.py","commit_id":"3345d8246fe75550e388637231268246925ab552"},{"author":{"_account_id":1836,"name":"kavan-patil","username":"kavan-patil"},"change_message_id":"ba0125642aa71d3052f6d16800c1fd0b10efdfc6","unresolved":false,"context_lines":[{"line_number":8,"context_line":"        self.client \u003d rest_client.RestClient(config, username, key,"},{"line_number":9,"context_line":"                                             auth_url, tenant_name)"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    def list_floatingIPs(self, params\u003dNone):"},{"line_number":12,"context_line":"        \"\"\"Returns a list of all floating IPs filtered by any parameters\"\"\""},{"line_number":13,"context_line":"        url \u003d \u0027os-floating-ips\u0027"},{"line_number":14,"context_line":"        if params !\u003d None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F8s8%3D","line":11,"updated":"2012-01-19 07:46:18.000000000","message":"I would recommend renaming methods for a resource client like:\n\ncreate\ndelete\nlist\nget\n\nAny other custom VERBS on a resource could be represented by a simple, yet meaningful method names. \nFor e.g. the method \nassociate_floatingIP_to_server\ncould be renamed to :\nassociate(self, floating_ip_id, fixed_ip)","commit_id":"3345d8246fe75550e388637231268246925ab552"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e14b43301741d8f49e727a29b61bb6dcd4cfde9e","unresolved":false,"context_lines":[{"line_number":8,"context_line":"        self.client \u003d rest_client.RestClient(config, username, key,"},{"line_number":9,"context_line":"                                             auth_url, tenant_name)"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    def list_floatingIPs(self, params\u003dNone):"},{"line_number":12,"context_line":"        \"\"\"Returns a list of all floating IPs filtered by any parameters\"\"\""},{"line_number":13,"context_line":"        url \u003d \u0027os-floating-ips\u0027"},{"line_number":14,"context_line":"        if params !\u003d None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F85w%3D","line":11,"updated":"2012-01-18 20:40:15.000000000","message":"Please rename this (and the other methods in this class) to the following convention:\n\n list_floating_ips\n\nYou should just be able to do a global replace on floatingIP to floating_ip","commit_id":"3345d8246fe75550e388637231268246925ab552"},{"author":{"_account_id":97,"name":"Daryl Walleck","email":"daryl.walleck@rackspace.com","username":"dwalleck"},"change_message_id":"f17c6a2c83859784d1a52461e06bae32008fb9b1","unresolved":false,"context_lines":[{"line_number":8,"context_line":"        self.client \u003d rest_client.RestClient(config, username, key,"},{"line_number":9,"context_line":"                                             auth_url, tenant_name)"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    def list_floatingIPs(self, params\u003dNone):"},{"line_number":12,"context_line":"        \"\"\"Returns a list of all floating IPs filtered by any parameters\"\"\""},{"line_number":13,"context_line":"        url \u003d \u0027os-floating-ips\u0027"},{"line_number":14,"context_line":"        if params !\u003d None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F%2B8%3D","line":11,"in_reply_to":"AAAAD3%2F%2F8s8%3D","updated":"2012-01-22 21:28:26.000000000","message":"I\u0027m not sure I agree with this convention. clients can be named anything in a test, so seeing \"create_server\" instead of just \"create\" gives the test more context.","commit_id":"3345d8246fe75550e388637231268246925ab552"},{"author":{"_account_id":1836,"name":"kavan-patil","username":"kavan-patil"},"change_message_id":"ba0125642aa71d3052f6d16800c1fd0b10efdfc6","unresolved":false,"context_lines":[{"line_number":17,"context_line":"                param_list.append(\"%s\u003d%s\u0026\" % (param, value))"},{"line_number":18,"context_line":"            url +\u003d \u0027?\u0027 + \u0027 \u0027.join(param_list)"},{"line_number":19,"context_line":"        resp, body \u003d self.client.get(url)"},{"line_number":20,"context_line":"        body \u003d json.loads(body)"},{"line_number":21,"context_line":"        return resp, body"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    def get_floatingIP_details(self, floatingIP_id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F8sw%3D","line":20,"updated":"2012-01-19 07:46:18.000000000","message":"Please return only the dict containing the list of floating ips:\n\nreturn resp, body[\u0027flaoting_ips\u0027]\n\nOtherwise there is no use of implementing a abstraction over rest_client() for such operations.\nSee clients written for other resource like server_client, images_client.","commit_id":"3345d8246fe75550e388637231268246925ab552"},{"author":{"_account_id":1836,"name":"kavan-patil","username":"kavan-patil"},"change_message_id":"ba0125642aa71d3052f6d16800c1fd0b10efdfc6","unresolved":false,"context_lines":[{"line_number":24,"context_line":"        \"\"\"Get the details of a floating IP\"\"\""},{"line_number":25,"context_line":"        url \u003d \"os-floating-ips/%s\" % str(floatingIP_id)"},{"line_number":26,"context_line":"        resp, body \u003d self.client.get(url)"},{"line_number":27,"context_line":"        body \u003d json.loads(body)"},{"line_number":28,"context_line":"        return resp, body"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def post_floatingIP(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F8so%3D","line":27,"updated":"2012-01-19 07:46:18.000000000","message":"Return :\n\nreturn resp, body[\u0027floating_ip\u0027]","commit_id":"3345d8246fe75550e388637231268246925ab552"},{"author":{"_account_id":1836,"name":"kavan-patil","username":"kavan-patil"},"change_message_id":"ba0125642aa71d3052f6d16800c1fd0b10efdfc6","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def post_floatingIP(self):"},{"line_number":31,"context_line":"        \"\"\"Allocate a floating IP to the project\"\"\""},{"line_number":32,"context_line":"        url \u003d \u0027os-floating-ips\u0027"},{"line_number":33,"context_line":"        resp, body \u003d self.client.post(url, None, None)"},{"line_number":34,"context_line":"        return resp, body"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F8ss%3D","line":32,"updated":"2012-01-19 07:46:18.000000000","message":"If we have to follow a convention then we need to pass on headers into a post like we do in other clients (servers_client, images_client)\n\nDefine a self.headers variable with appropriate accept headers and pass it in post methods.","commit_id":"3345d8246fe75550e388637231268246925ab552"},{"author":{"_account_id":1836,"name":"kavan-patil","username":"kavan-patil"},"change_message_id":"ba0125642aa71d3052f6d16800c1fd0b10efdfc6","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    def post_floatingIP(self):"},{"line_number":31,"context_line":"        \"\"\"Allocate a floating IP to the project\"\"\""},{"line_number":32,"context_line":"        url \u003d \u0027os-floating-ips\u0027"},{"line_number":33,"context_line":"        resp, body \u003d self.client.post(url, None, None)"},{"line_number":34,"context_line":"        return resp, body"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def delete_floatingIP(self, floatingIP_id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F8sk%3D","line":33,"updated":"2012-01-19 07:46:18.000000000","message":"Have you tested this code? I am not sure if an None value for the body param works. At least I encountered malformed request error.\n\nBetter send {} (an empty JSON as body)","commit_id":"3345d8246fe75550e388637231268246925ab552"},{"author":{"_account_id":1836,"name":"kavan-patil","username":"kavan-patil"},"change_message_id":"ba0125642aa71d3052f6d16800c1fd0b10efdfc6","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        return resp, body"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def associate_floatingIP_to_server(self, floatingIP_id, fixed_IPaddr):"},{"line_number":43,"context_line":"        \"\"\"Associate the provided floating IP to specific\"\"\""},{"line_number":44,"context_line":"        url \u003d \"os-floating-ips/%s/associate\" % str(floatingIP_id)"},{"line_number":45,"context_line":"        post_body \u003d {"},{"line_number":46,"context_line":"            \u0027associate_address\u0027: {"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F8sg%3D","line":43,"updated":"2012-01-19 07:46:18.000000000","message":"Comment could be reworded, it seems to end abruptly .","commit_id":"3345d8246fe75550e388637231268246925ab552"}],"tempest/services/nova/json/floating_ips_client.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"32844d5cf2568c49e28d627bfb61ab685e89eec2","unresolved":false,"context_lines":[{"line_number":3,"context_line":"import json"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"class FloatingipsClient(object):"},{"line_number":7,"context_line":"    def __init__(self, config, username, key, auth_url, tenant_name\u003dNone):"},{"line_number":8,"context_line":"        self.config \u003d config"},{"line_number":9,"context_line":"        self.client \u003d rest_client.RestClient(config, username, key,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2Fxc%3D","line":6,"updated":"2012-01-23 17:59:47.000000000","message":"Should be FloatingIPsClient","commit_id":"ee06572dde150592decbf8acfd7594671a28bc17"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"32844d5cf2568c49e28d627bfb61ab685e89eec2","unresolved":false,"context_lines":[{"line_number":30,"context_line":"            raise exceptions.NotFound(body)"},{"line_number":31,"context_line":"        return resp, body[\u0027floating_ip\u0027]"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def post_floating_ip(self):"},{"line_number":34,"context_line":"        \"\"\"Allocate a floating IP to the project\"\"\""},{"line_number":35,"context_line":"        url \u003d \u0027os-floating-ips\u0027"},{"line_number":36,"context_line":"        resp, body \u003d self.client.post(url, None, None)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2FxU%3D","line":33,"updated":"2012-01-23 17:59:47.000000000","message":"Please change this to create_floating_ip() to be consistent with the other client class methods that create things.","commit_id":"ee06572dde150592decbf8acfd7594671a28bc17"}],"tempest/tests/test_floating_ips_actions.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"875deff0bd4466071dd2a66b49c6174e1fc81af2","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        cls.floating_ip_ids \u003d []"},{"line_number":33,"context_line":"        resp, body \u003d cls.client.list_floating_ips()"},{"line_number":34,"context_line":"        for i in range(len(body)):"},{"line_number":35,"context_line":"            cls.floating_ip_ids.append(body[i][\u0027id\u0027])"},{"line_number":36,"context_line":"        while True:"},{"line_number":37,"context_line":"            cls.non_exist_id \u003d rand_name(\u0027999\u0027)"},{"line_number":38,"context_line":"            if cls.non_exist_id not in cls.floating_ip_ids:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAEn%2F%2F%2FFI%3D","line":35,"updated":"2012-02-03 18:34:55.000000000","message":"You need to record the existing list of floating IP addresses *before* you create a new floating IP address for use in this test.\n\nThis setUpClass method should look like this:\n\n cls.os \u003d openstack.Manager()\n cls.client \u003d cls.os.floating_ips_client\n cls.servers_client \u003d cls.os.servers_client\n cls.config \u003d cls.os.config\n cls.image_ref \u003d cls.config.env.image_ref\n cls.flavor_ref \u003d cls.config.env.flavor_ref\n # Server creation\n resp, server \u003d cls.servers_client.create_server(\u0027floating-server\u0027,\n      cls.image_ref,\n      cls.flavor_ref)\n \n cls.servers_client.wait_for_server_status(server[\u0027id\u0027], \u0027ACTIVE\u0027)\n cls.server_id \u003d server[\u0027id\u0027]\n resp, body \u003d cls.servers_client.get_server(server[\u0027id\u0027])\n cls.fixed_ip_addr \u003d body[\u0027addresses\u0027][\u0027private\u0027][0][\u0027addr\u0027]\n\n # Store already-existing floating IPs\n cls.orig_floating_ip_ids \u003d []\n resp, body \u003d cls.client.list_floating_ips()\n for row in body:\n     cls.orig_floating_ip_ids.append(row[\u0027id\u0027])\n\n # Create  a new Floating IP for this test case\n resp, body \u003d cls.client.create_floating_ip()\n cls.floating_ip_id \u003d body[\u0027id\u0027]","commit_id":"ed37d73aa164c3c1d9ea413d95619766f305cfa0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"875deff0bd4466071dd2a66b49c6174e1fc81af2","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    @attr(type\u003d\u0027positive\u0027)"},{"line_number":49,"context_line":"    def test_allocate_floating_ip(self):"},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        Positive test:Allocation of a new floating IP to a project"},{"line_number":52,"context_line":"        should be succesfull"},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        resp, body \u003d self.client.create_floating_ip()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAEn%2F%2F%2FFA%3D","line":51,"updated":"2012-02-03 18:34:55.000000000","message":"You don\u0027t allocate a floating IP to a project... you associate it (in the test below)\n\nPlease rename this test method to test_get_floating_ip_details() and remove the create_floating_ip() and delete_floating_ip() calls in it and use the floating IP you create in the cls.setUpClass() method...","commit_id":"ed37d73aa164c3c1d9ea413d95619766f305cfa0"}],"tempest/tests/test_list_floatingIPs.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e14b43301741d8f49e727a29b61bb6dcd4cfde9e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"from nose.plugins.attrib import attr"},{"line_number":2,"context_line":"from tempest import openstack"},{"line_number":3,"context_line":"import unittest2 as unittest"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"class FloatingIPDetailsTest(unittest.TestCase):"},{"line_number":7,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F85o%3D","line":4,"updated":"2012-01-18 20:40:15.000000000","message":"Please rename this file to test_floating_ips.py","commit_id":"3345d8246fe75550e388637231268246925ab552"},{"author":{"_account_id":1836,"name":"kavan-patil","username":"kavan-patil"},"change_message_id":"ba0125642aa71d3052f6d16800c1fd0b10efdfc6","unresolved":false,"context_lines":[{"line_number":2,"context_line":"from tempest import openstack"},{"line_number":3,"context_line":"import unittest2 as unittest"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"class FloatingIPDetailsTest(unittest.TestCase):"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F8sU%3D","line":5,"updated":"2012-01-19 07:46:18.000000000","message":"Tests need to be self contained. They can not assume that required resources will be available like existence of a few floating IPs here.\n\nAny test should create resources it needs, test functionality using those resource details and teardown the resources when done.","commit_id":"3345d8246fe75550e388637231268246925ab552"},{"author":{"_account_id":1836,"name":"kavan-patil","username":"kavan-patil"},"change_message_id":"ba0125642aa71d3052f6d16800c1fd0b10efdfc6","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    @attr(type\u003d\u0027positive\u0027)"},{"line_number":18,"context_line":"    def test_list_floatingIPs(self):"},{"line_number":19,"context_line":"        \"\"\"Positive test:Should return the list of floating IPs\"\"\""},{"line_number":20,"context_line":"        resp, body \u003d self.client.list_floatingIPs()"},{"line_number":21,"context_line":"        self.assertEqual(200, resp.status)"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F8sc%3D","line":19,"updated":"2012-01-19 07:46:18.000000000","message":"What is the goal of the test? If it is to test if the list API returns the list of all floating IPs then this test needs to \n1. create IPs, \n2. keep a local list of those created IPs, \n3. then fetch the ip addresses from the list API\n4. Then verify that the expceted list of IPs that we created are in the fetched list.","commit_id":"3345d8246fe75550e388637231268246925ab552"},{"author":{"_account_id":1836,"name":"kavan-patil","username":"kavan-patil"},"change_message_id":"ba0125642aa71d3052f6d16800c1fd0b10efdfc6","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    @attr(type\u003d\u0027positive\u0027)"},{"line_number":24,"context_line":"    def test_get_floatingIP_details(self):"},{"line_number":25,"context_line":"        \"\"\"Positive test:Should be able to GET the details of floatingIP\"\"\""},{"line_number":26,"context_line":"        resp, body \u003d self.client.list_floatingIPs()"},{"line_number":27,"context_line":"        floatingIP_id \u003d 0"},{"line_number":28,"context_line":"        floating_IP_length \u003d len(body[\u0027floating_ips\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F8sY%3D","line":25,"updated":"2012-01-19 07:46:18.000000000","message":"I am not sure I understand the goal of the test.","commit_id":"3345d8246fe75550e388637231268246925ab552"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e14b43301741d8f49e727a29b61bb6dcd4cfde9e","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        floatingIP_id \u003d 0"},{"line_number":28,"context_line":"        floating_IP_length \u003d len(body[\u0027floating_ips\u0027])"},{"line_number":29,"context_line":"        for i in range(floating_IP_length):"},{"line_number":30,"context_line":"            floatingIP_id \u003d body[\u0027floating_ips\u0027][i][\u0027id\u0027]"},{"line_number":31,"context_line":"        if(floatingIP_id \u003d\u003d 0):"},{"line_number":32,"context_line":"            self.fail(\u0027There are no available floating IPs\u0027)"},{"line_number":33,"context_line":"        resp, body \u003d self.client.get_floatingIP_details(floatingIP_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F85U%3D","line":30,"updated":"2012-01-18 20:40:15.000000000","message":"This does not make sense to me. You are looping through the floating IP addresses and re-assigning the local floatingIP_id variable to the value in the body dictionary. But this just leaves the local floatingIP_id set to the last value in the dictionary.\n\nI think what you are trying to do is this?\n\n for i in range(floating_IP_length):\n     floatingIP_id \u003d body[\u0027floating_ips\u0027][i][\u0027id]\n     resp, body \u003d self.client.get_floatingIP_details(floatingIP_id)\n     self.assertEqual(200, resp.status)\n     self.assertEqual(floatingIP_id, body[\u0027floating_ips\u0027][\u0027id\u0027])","commit_id":"3345d8246fe75550e388637231268246925ab552"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e14b43301741d8f49e727a29b61bb6dcd4cfde9e","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        for i in range(floating_IP_length):"},{"line_number":30,"context_line":"            floatingIP_id \u003d body[\u0027floating_ips\u0027][i][\u0027id\u0027]"},{"line_number":31,"context_line":"        if(floatingIP_id \u003d\u003d 0):"},{"line_number":32,"context_line":"            self.fail(\u0027There are no available floating IPs\u0027)"},{"line_number":33,"context_line":"        resp, body \u003d self.client.get_floatingIP_details(floatingIP_id)"},{"line_number":34,"context_line":"        self.assertEqual(200, resp.status)"},{"line_number":35,"context_line":"        self.assertEqual(floatingIP_id, body[\u0027floating_ip\u0027][\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F85g%3D","line":32,"updated":"2012-01-18 20:40:15.000000000","message":"You should be able to remove the above and put this above the range() check:\n\n  self.assertNotEqual(0, len(body[\u0027floating_ips\u0027]),\n                      \"Expected floating IPs. Got zero.\")","commit_id":"3345d8246fe75550e388637231268246925ab552"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e14b43301741d8f49e727a29b61bb6dcd4cfde9e","unresolved":false,"context_lines":[{"line_number":32,"context_line":"            self.fail(\u0027There are no available floating IPs\u0027)"},{"line_number":33,"context_line":"        resp, body \u003d self.client.get_floatingIP_details(floatingIP_id)"},{"line_number":34,"context_line":"        self.assertEqual(200, resp.status)"},{"line_number":35,"context_line":"        self.assertEqual(floatingIP_id, body[\u0027floating_ip\u0027][\u0027id\u0027])"},{"line_number":36,"context_line":"        self.assertTrue(floatingIP_id not in body)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    @attr(type\u003d\u0027negative\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F85c%3D","line":35,"updated":"2012-01-18 20:40:15.000000000","message":"That should be body[\u0027floating_ips\u0027], not body[\u0027floating_ip\u0027]. This indicates that you have not run Tempest against an environment (otherwise this would have failed with a KeyError. Please do make sure to run Tempest against an environment before you push code.","commit_id":"3345d8246fe75550e388637231268246925ab552"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e14b43301741d8f49e727a29b61bb6dcd4cfde9e","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        resp, body \u003d self.client.get_floatingIP_details(floatingIP_id)"},{"line_number":34,"context_line":"        self.assertEqual(200, resp.status)"},{"line_number":35,"context_line":"        self.assertEqual(floatingIP_id, body[\u0027floating_ip\u0027][\u0027id\u0027])"},{"line_number":36,"context_line":"        self.assertTrue(floatingIP_id not in body)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    @attr(type\u003d\u0027negative\u0027)"},{"line_number":39,"context_line":"    def test_get_nonexistant_floatingIP_details(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F85Y%3D","line":36,"updated":"2012-01-18 20:40:15.000000000","message":"This assertion does not make sense to me... you are asserting that the floating IP identifier that you just added is not a key in the body dictionary. I think you can safely remove this line.","commit_id":"3345d8246fe75550e388637231268246925ab552"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e14b43301741d8f49e727a29b61bb6dcd4cfde9e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        floatingIP_id \u003d 0"},{"line_number":46,"context_line":"        floating_IP_length \u003d len(body[\u0027floating_ips\u0027])"},{"line_number":47,"context_line":"        for i in range(floating_IP_length):"},{"line_number":48,"context_line":"            floatingIP_id \u003d body[\u0027floating_ips\u0027][i][\u0027id\u0027]"},{"line_number":49,"context_line":"        if(floatingIP_id \u003d\u003d 0):"},{"line_number":50,"context_line":"            self.fail(\u0027There are no available floating IPs\u0027)"},{"line_number":51,"context_line":"        nonexistant_floatingIP_id \u003d floatingIP_id + 5"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAD3%2F%2F85Q%3D","line":48,"updated":"2012-01-18 20:40:15.000000000","message":"See same comment above about the use of the loop here... doesn\u0027t make much sense.","commit_id":"3345d8246fe75550e388637231268246925ab552"}],"tempest/tests/test_list_floating_ips.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"32844d5cf2568c49e28d627bfb61ab685e89eec2","unresolved":false,"context_lines":[{"line_number":14,"context_line":"        cls.floating_ip_id \u003d []"},{"line_number":15,"context_line":"        resp, body \u003d cls.client.post_floating_ip()"},{"line_number":16,"context_line":"        for i in range(3):"},{"line_number":17,"context_line":"            resp, body \u003d cls.client.post_floating_ip()"},{"line_number":18,"context_line":"            cls.floating_ip.append(body)"},{"line_number":19,"context_line":"            cls.floating_ip_id.append(body[\u0027id\u0027])"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2FxQ%3D","line":17,"updated":"2012-01-23 17:59:47.000000000","message":"Remember to change this to create_floating_ip() when you change the client class method name.","commit_id":"ee06572dde150592decbf8acfd7594671a28bc17"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"32844d5cf2568c49e28d627bfb61ab685e89eec2","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    def tearDownClass(cls):"},{"line_number":23,"context_line":"        for i in range(3):"},{"line_number":24,"context_line":"            cls.client.delete_floating_ip(cls.floating_ip_id[i])"},{"line_number":25,"context_line":"        pass"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    @attr(type\u003d\u0027positive\u0027)"},{"line_number":28,"context_line":"    def test_list_floating_ips(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2FxY%3D","line":25,"updated":"2012-01-23 17:59:47.000000000","message":"This pass should be removed.","commit_id":"ee06572dde150592decbf8acfd7594671a28bc17"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"32844d5cf2568c49e28d627bfb61ab685e89eec2","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        self.assertEqual(200, resp.status)"},{"line_number":32,"context_line":"        floating_ips \u003d body"},{"line_number":33,"context_line":"        self.assertNotEqual(0, len(floating_ips),"},{"line_number":34,"context_line":"                            \"Expected floating IPs. Got zero.\")"},{"line_number":35,"context_line":"        for i in range(3):"},{"line_number":36,"context_line":"            self.assertTrue(self.floating_ip[i] in floating_ips)"},{"line_number":37,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2FxI%3D","line":34,"updated":"2012-01-23 17:59:47.000000000","message":"This is not good enough. If the list length was 1, it would be a false positive test.\n\nThis needs to be exact. You need to do a call to list_floating_ips() in the setUpClass method **before** you create any new ones and store the number of existing floating IPs before the test was run, and then verify in this test method that the number of floating IPs returned by list_floating_ips() has increased by 3.","commit_id":"ee06572dde150592decbf8acfd7594671a28bc17"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"32844d5cf2568c49e28d627bfb61ab685e89eec2","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                            \"Expected floating IPs. Got zero.\")"},{"line_number":35,"context_line":"        for i in range(3):"},{"line_number":36,"context_line":"            self.assertTrue(self.floating_ip[i] in floating_ips)"},{"line_number":37,"context_line":"        pass"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @attr(type\u003d\u0027positive\u0027)"},{"line_number":40,"context_line":"    def test_get_floating_ip_details(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2FxE%3D","line":37,"updated":"2012-01-23 17:59:47.000000000","message":"Remove this pass","commit_id":"ee06572dde150592decbf8acfd7594671a28bc17"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"32844d5cf2568c49e28d627bfb61ab685e89eec2","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def test_get_floating_ip_details(self):"},{"line_number":41,"context_line":"        \"\"\"Positive test:Should be able to GET the details of floatingIP\"\"\""},{"line_number":42,"context_line":"       # Creating a floating IP for which details are to be checked"},{"line_number":43,"context_line":"        resp, body \u003d self.client.post_floating_ip()"},{"line_number":44,"context_line":"        floating_ip_instance_id \u003d body[\u0027instance_id\u0027]"},{"line_number":45,"context_line":"        floating_ip_ip \u003d body[\u0027ip\u0027]"},{"line_number":46,"context_line":"        floating_ip_fixed_ip \u003d body[\u0027fixed_ip\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2FxA%3D","line":43,"updated":"2012-01-23 17:59:47.000000000","message":"Remember to change this to create_floating_ip()","commit_id":"ee06572dde150592decbf8acfd7594671a28bc17"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"32844d5cf2568c49e28d627bfb61ab685e89eec2","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        resp, body_detail \u003d \\"},{"line_number":49,"context_line":"                self.client.get_floating_ip_details(floating_ip_id)"},{"line_number":50,"context_line":"        self.assertEqual(200, resp.status)"},{"line_number":51,"context_line":"       # Comapring the details of floating IP"},{"line_number":52,"context_line":"        self.assertEqual(floating_ip_instance_id,"},{"line_number":53,"context_line":"                            body_detail[\u0027instance_id\u0027])"},{"line_number":54,"context_line":"        self.assertEqual(floating_ip_ip, body_detail[\u0027ip\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2Fw4%3D","line":51,"updated":"2012-01-23 17:59:47.000000000","message":"typo. Comapring should be Comparing","commit_id":"ee06572dde150592decbf8acfd7594671a28bc17"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"32844d5cf2568c49e28d627bfb61ab685e89eec2","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        self.assertEqual(floating_ip_fixed_ip,"},{"line_number":56,"context_line":"                            body_detail[\u0027fixed_ip\u0027])"},{"line_number":57,"context_line":"        self.assertEqual(floating_ip_id, body_detail[\u0027id\u0027])"},{"line_number":58,"context_line":"       # Deleting the floating IP created in this method"},{"line_number":59,"context_line":"        self.client.delete_floating_ip(body[\u0027id\u0027])"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    @attr(type\u003d\u0027negative\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2Fw8%3D","line":58,"updated":"2012-01-23 17:59:47.000000000","message":"Please align the # comments in this method to the correct indentation.","commit_id":"ee06572dde150592decbf8acfd7594671a28bc17"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"32844d5cf2568c49e28d627bfb61ab685e89eec2","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        Negative test:Should not be able to GET the details"},{"line_number":65,"context_line":"        of nonexistant floating IP"},{"line_number":66,"context_line":"        \"\"\""},{"line_number":67,"context_line":"        resp, body \u003d self.client.post_floating_ip()"},{"line_number":68,"context_line":"        nonexistant_floating_ip_id \u003d body[\u0027id\u0027]"},{"line_number":69,"context_line":"        self.client.delete_floating_ip(nonexistant_floating_ip_id)"},{"line_number":70,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2Fww%3D","line":67,"updated":"2012-01-23 17:59:47.000000000","message":"Why are you creating a new floating IP here? Wouldn\u0027t it be easier to just create a random string, double check the string is not in the cls.floating_ip_ids list, and call get_floating_ip_details() with that random string?","commit_id":"ee06572dde150592decbf8acfd7594671a28bc17"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e487819038165181941c9ea4c7ace0e5b70a618c","unresolved":false,"context_lines":[{"line_number":13,"context_line":"        cls.client \u003d cls.os.floating_ips_client"},{"line_number":14,"context_line":"        cls.floating_ip \u003d []"},{"line_number":15,"context_line":"        cls.floating_ip_id \u003d []"},{"line_number":16,"context_line":"        resp, body \u003d cls.client.create_floating_ip()"},{"line_number":17,"context_line":"        cls.random_number \u003d 0"},{"line_number":18,"context_line":"        for i in range(3):"},{"line_number":19,"context_line":"            resp, body \u003d cls.client.create_floating_ip()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEH%2F%2F%2B%2Bo%3D","line":16,"updated":"2012-01-24 16:52:14.000000000","message":"This call to create_floating_ip() has no corresponding delete call in the tearDownClass() method...","commit_id":"851320e3d5caf2021b9b0f579d804c1cfc5a7cc5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e487819038165181941c9ea4c7ace0e5b70a618c","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        floating_ips \u003d body"},{"line_number":34,"context_line":"        self.assertNotEqual(0, len(floating_ips),"},{"line_number":35,"context_line":"                            \"Expected floating IPs. Got zero.\")"},{"line_number":36,"context_line":"        for i in range(3):"},{"line_number":37,"context_line":"            self.assertTrue(self.floating_ip[i] in floating_ips)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @attr(type\u003d\u0027positive\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEH%2F%2F%2B%2BU%3D","line":36,"updated":"2012-01-24 16:52:14.000000000","message":"You did not address my concerns on this particular method. You need to do more than just assert that the length is not 0. You need to assert that the list of floating IPs is *exactly* what you expect it to be: the amount of existing IPs before the test PLUS 3...","commit_id":"851320e3d5caf2021b9b0f579d804c1cfc5a7cc5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e487819038165181941c9ea4c7ace0e5b70a618c","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                if self.random_number \u003d\u003d body[i][\u0027id\u0027]:"},{"line_number":73,"context_line":"                    generate_nonexistant_id()"},{"line_number":74,"context_line":"        #Function call to get nonexistant floatingIP id"},{"line_number":75,"context_line":"        generate_nonexistant_id(self)"},{"line_number":76,"context_line":"        #Start of testcase with nonexistant id ready in random_number variable"},{"line_number":77,"context_line":"        try:"},{"line_number":78,"context_line":"            resp, body \u003d \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEH%2F%2F%2B%2BY%3D","line":75,"updated":"2012-01-24 16:52:14.000000000","message":"You can replace the above code with this:\n\n while True:\n     non_exist_id \u003d rand_name(\u0027ip\u0027)\n     if non_exist_id not in cls.floating_ip_id:\n          break\n\nThat way, you can remove the cls.random_number variable and use the non_exist_id variable in the line below.","commit_id":"851320e3d5caf2021b9b0f579d804c1cfc5a7cc5"}]}
