)]}'
{"rally/plugins/openstack/cleanup/resources.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"af6a5c332693c6a4fcb121b8da177875aa1eccc2","unresolved":false,"context_lines":[{"line_number":135,"context_line":"               admin_required\u003dTrue, perform_for_admin_only\u003dTrue)"},{"line_number":136,"context_line":"class NovaFlavors(base.ResourceManager):"},{"line_number":137,"context_line":"    def list(self):"},{"line_number":138,"context_line":"        return list(filter(nova_utils.is_temporary,"},{"line_number":139,"context_line":"                           self._manager().list()))"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"dab17558_8a63e4db","line":138,"updated":"2016-05-09 12:58:55.000000000","message":"Instead of creating is_temporary(), just directly call cutils.name_matches_object(resource.name, NovaScenario) here. See, e.g., NovaFloatingIpsBulk, for an example.","commit_id":"1e0da7f0f75b3bc85e32186fa7dd36b9cc588eff"},{"author":{"_account_id":20299,"name":"Piyush","inactive":true},"change_message_id":"a2e150cbd1f00e35b9d504083040730443e82435","unresolved":false,"context_lines":[{"line_number":135,"context_line":"               admin_required\u003dTrue, perform_for_admin_only\u003dTrue)"},{"line_number":136,"context_line":"class NovaFlavors(base.ResourceManager):"},{"line_number":137,"context_line":"    def list(self):"},{"line_number":138,"context_line":"        return list(filter(nova_utils.is_temporary,"},{"line_number":139,"context_line":"                           self._manager().list()))"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"dab17558_f93b6b36","line":138,"in_reply_to":"dab17558_8a63e4db","updated":"2016-05-09 15:05:57.000000000","message":"Yeah..I took the idea from https://github.com/openstack/rally/blob/master/rally/plugins/openstack/scenarios/keystone/utils.py#L23-L24. I\u0027ll rectify there as well.","commit_id":"1e0da7f0f75b3bc85e32186fa7dd36b9cc588eff"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"0199409558fe1ec13312a0dbc4d4725e119f795d","unresolved":false,"context_lines":[{"line_number":136,"context_line":"class NovaFlavors(base.ResourceManager):"},{"line_number":137,"context_line":"    def list(self):"},{"line_number":138,"context_line":"        flavors_list \u003d []"},{"line_number":139,"context_line":"        for resource in self._manager().list():"},{"line_number":140,"context_line":"            if utils.name_matches_object(resource.name,"},{"line_number":141,"context_line":"                                         nova_utils.NovaScenario):"},{"line_number":142,"context_line":"                flavors_list.append(resource)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_9942110f","line":139,"updated":"2016-05-09 20:40:15.000000000","message":"it will work faster if we just do\n\n\n   return [r for r in self._manager().list()\n               if utils.name_matches_object(r.name, nova_utils.NovaSceanrio)]","commit_id":"6e1180116a723505ddc70c76277717030dbef482"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"d3779e6f38d321d942249b1ec40845651dfb5365","unresolved":false,"context_lines":[{"line_number":136,"context_line":"class NovaFlavors(base.ResourceManager):"},{"line_number":137,"context_line":"    def list(self):"},{"line_number":138,"context_line":"        flavors_list \u003d []"},{"line_number":139,"context_line":"        for resource in self._manager().list():"},{"line_number":140,"context_line":"            if utils.name_matches_object(resource.name,"},{"line_number":141,"context_line":"                                         nova_utils.NovaScenario):"},{"line_number":142,"context_line":"                flavors_list.append(resource)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_bb288487","line":139,"in_reply_to":"dab17558_9942110f","updated":"2016-05-10 13:01:44.000000000","message":"Done","commit_id":"6e1180116a723505ddc70c76277717030dbef482"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"6b519a98300a98edd47fb21ae9524cfc52547515","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            if utils.name_matches_object(resource.name,"},{"line_number":141,"context_line":"                                         nova_utils.NovaScenario):"},{"line_number":142,"context_line":"                flavors_list.append(resource)"},{"line_number":143,"context_line":"        return flavors_list"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"@base.resource(\"nova\", \"floating_ips_bulk\", order\u003dnext(_nova_order),"}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_16dd500e","line":143,"updated":"2016-05-09 20:19:32.000000000","message":"You can do this more succinctly with a list comprehension:\n\n    def list(self):\n        return [r for r in self._manager().list()\n                if utils.name_matches_object(r.name, nova_utils.NovaScenario)]","commit_id":"6e1180116a723505ddc70c76277717030dbef482"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"d3779e6f38d321d942249b1ec40845651dfb5365","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            if utils.name_matches_object(resource.name,"},{"line_number":141,"context_line":"                                         nova_utils.NovaScenario):"},{"line_number":142,"context_line":"                flavors_list.append(resource)"},{"line_number":143,"context_line":"        return flavors_list"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"@base.resource(\"nova\", \"floating_ips_bulk\", order\u003dnext(_nova_order),"}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_db23c8a5","line":143,"in_reply_to":"dab17558_16dd500e","updated":"2016-05-10 13:01:44.000000000","message":"Done","commit_id":"6e1180116a723505ddc70c76277717030dbef482"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"0199409558fe1ec13312a0dbc4d4725e119f795d","unresolved":false,"context_lines":[{"line_number":726,"context_line":"        resources \u003d self._resource + \"s\""},{"line_number":727,"context_line":"        list_method \u003d getattr(self._manager(), \"list_%s\" % resources)"},{"line_number":728,"context_line":""},{"line_number":729,"context_line":"        resource_list \u003d []"},{"line_number":730,"context_line":"        for resource in list_method():"},{"line_number":731,"context_line":"            if utils.name_matches_object(resource.name,"},{"line_number":732,"context_line":"                                         kutils.KeystoneScenario):"}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_7945ad15","line":729,"updated":"2016-05-09 20:40:15.000000000","message":"same here","commit_id":"6e1180116a723505ddc70c76277717030dbef482"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"d3779e6f38d321d942249b1ec40845651dfb5365","unresolved":false,"context_lines":[{"line_number":726,"context_line":"        resources \u003d self._resource + \"s\""},{"line_number":727,"context_line":"        list_method \u003d getattr(self._manager(), \"list_%s\" % resources)"},{"line_number":728,"context_line":""},{"line_number":729,"context_line":"        resource_list \u003d []"},{"line_number":730,"context_line":"        for resource in list_method():"},{"line_number":731,"context_line":"            if utils.name_matches_object(resource.name,"},{"line_number":732,"context_line":"                                         kutils.KeystoneScenario):"}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_7b33bcf6","line":729,"in_reply_to":"dab17558_7945ad15","updated":"2016-05-10 13:01:44.000000000","message":"Done","commit_id":"6e1180116a723505ddc70c76277717030dbef482"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"6b519a98300a98edd47fb21ae9524cfc52547515","unresolved":false,"context_lines":[{"line_number":731,"context_line":"            if utils.name_matches_object(resource.name,"},{"line_number":732,"context_line":"                                         kutils.KeystoneScenario):"},{"line_number":733,"context_line":"                resource_list.append(resource)"},{"line_number":734,"context_line":"        return resource_list"},{"line_number":735,"context_line":""},{"line_number":736,"context_line":""},{"line_number":737,"context_line":"@base.resource(\"keystone\", \"user\", order\u003dnext(_keystone_order),"}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_96b140e4","line":734,"updated":"2016-05-09 20:19:32.000000000","message":"This doesn\u0027t belong in this commit -- please move it to its own commit. (Or just let it be, since it will get fixed whenever I have time to circle back to https://review.openstack.org/#/c/275340/)","commit_id":"6e1180116a723505ddc70c76277717030dbef482"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"d3779e6f38d321d942249b1ec40845651dfb5365","unresolved":false,"context_lines":[{"line_number":731,"context_line":"            if utils.name_matches_object(resource.name,"},{"line_number":732,"context_line":"                                         kutils.KeystoneScenario):"},{"line_number":733,"context_line":"                resource_list.append(resource)"},{"line_number":734,"context_line":"        return resource_list"},{"line_number":735,"context_line":""},{"line_number":736,"context_line":""},{"line_number":737,"context_line":"@base.resource(\"keystone\", \"user\", order\u003dnext(_keystone_order),"}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_38eadadb","line":734,"in_reply_to":"dab17558_96b140e4","updated":"2016-05-10 13:01:44.000000000","message":"Lets keep it in the patch. I\u0027ll update commit message to include rmeoval of is_temporary() in nova / keystone utils as suggested by Boris","commit_id":"6e1180116a723505ddc70c76277717030dbef482"}],"rally/plugins/openstack/scenarios/keystone/utils.py":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"0199409558fe1ec13312a0dbc4d4725e119f795d","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"def is_temporary(resource):"},{"line_number":24,"context_line":"    return utils.name_matches_object(resource.name, KeystoneScenario)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class KeystoneScenario(scenario.OpenStackScenario):"}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_396205ae","side":"PARENT","line":24,"updated":"2016-05-09 20:40:15.000000000","message":"add to commit message that you are removing this method because it becomes useless.","commit_id":"8e15ff87cec6abbe05be86fd565e79328b26e2f2"}],"rally/plugins/openstack/scenarios/nova/aggregates.py":[{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"ef29a01faebfe2d8036fcd71fdc3a403f6deec59","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    def get_aggregate(self, aggregate):"},{"line_number":43,"context_line":"        \"\"\"List all nova aggregates."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        Measure the \"nova aggregate-list\" command performance."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        :param aggregate: List details of aggregate"},{"line_number":48,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_ce451eb4","line":45,"range":{"start_line":45,"start_character":0,"end_line":45,"end_character":62},"updated":"2016-04-18 12:54:39.000000000","message":"This will be nova aggregate-show NOT aggregate-list. Will fix in 2nd patch.","commit_id":"a1078c42566147d31f7f3dbf6680deda462a1932"}],"rally/plugins/openstack/scenarios/nova/flavors.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"525527322075c17bf4efed8ec9488d6e2ef9071d","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    @validation.required_services(consts.Service.NOVA)"},{"line_number":41,"context_line":"    @validation.required_openstack(users\u003dTrue)"},{"line_number":42,"context_line":"    @scenario.configure(context\u003d{\"cleanup\": [\"nova\"]})"},{"line_number":43,"context_line":"    def create_and_list_flavor_access(self, name, ram, vcpus, disk, **kwargs):"},{"line_number":44,"context_line":"        \"\"\"Create a non-public flavor and list its access rules"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        :param name: Name of the flavor"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_934fcabc","line":43,"updated":"2016-04-18 14:03:09.000000000","message":"It\u0027s also add just create_flavor(), so we can benchmark public flavor creation as well.","commit_id":"894550a2f94236e7f875afbc81aa2d1a019426eb"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"e74a5f6afc2a380c3173cf04dff4b1b380e9ff2c","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    @validation.required_services(consts.Service.NOVA)"},{"line_number":41,"context_line":"    @validation.required_openstack(users\u003dTrue)"},{"line_number":42,"context_line":"    @scenario.configure(context\u003d{\"cleanup\": [\"nova\"]})"},{"line_number":43,"context_line":"    def create_and_list_flavor_access(self, name, ram, vcpus, disk, **kwargs):"},{"line_number":44,"context_line":"        \"\"\"Create a non-public flavor and list its access rules"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        :param name: Name of the flavor"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_b64f4fbc","line":43,"in_reply_to":"1a122d0e_934fcabc","updated":"2016-04-18 15:47:01.000000000","message":"Done","commit_id":"894550a2f94236e7f875afbc81aa2d1a019426eb"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"525527322075c17bf4efed8ec9488d6e2ef9071d","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        :param ram: Memory in MB for the flavor"},{"line_number":48,"context_line":"        :param vcpus: Number of VCPUs for the flavor"},{"line_number":49,"context_line":"        :param disk: Size of local disk in GB"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        :param kwargs: Optional additional arguments for flavor creation"},{"line_number":52,"context_line":"        \"\"\""},{"line_number":53,"context_line":"        kwargs[\"is_public\"] \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_53dc12e4","line":50,"updated":"2016-04-18 14:03:09.000000000","message":"Extra newline","commit_id":"894550a2f94236e7f875afbc81aa2d1a019426eb"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"e74a5f6afc2a380c3173cf04dff4b1b380e9ff2c","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        :param ram: Memory in MB for the flavor"},{"line_number":48,"context_line":"        :param vcpus: Number of VCPUs for the flavor"},{"line_number":49,"context_line":"        :param disk: Size of local disk in GB"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        :param kwargs: Optional additional arguments for flavor creation"},{"line_number":52,"context_line":"        \"\"\""},{"line_number":53,"context_line":"        kwargs[\"is_public\"] \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_964a13ab","line":50,"in_reply_to":"1a122d0e_53dc12e4","updated":"2016-04-18 15:47:01.000000000","message":"Done","commit_id":"894550a2f94236e7f875afbc81aa2d1a019426eb"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"475dd3c5013f077dddcec1d6dab05f15749a62ea","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    @validation.required_services(consts.Service.NOVA)"},{"line_number":44,"context_line":"    @validation.required_openstack(admin\u003dTrue)"},{"line_number":45,"context_line":"    @scenario.configure(context\u003d{\"cleanup\": [\"nova\"]})"},{"line_number":46,"context_line":"    def create_and_list_flavor_access(self, name, ram, vcpus, disk, **kwargs):"},{"line_number":47,"context_line":"        \"\"\"Create a non-public flavor and list its access rules"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        :param name: Name of the flavor"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a122d0e_9ba5b848","line":46,"updated":"2016-04-20 10:30:29.000000000","message":"We should not allow use to specify custom name. This will be critical for our cleanup. Please use:\nname\u003dself._generate_random_name()","commit_id":"26baa5d28aabc3d75eada8b002fecdaa87a02179"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"a7d13c86aff33ffd75979b1a8ae5f333569684a4","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        # only for non-public flavors"},{"line_number":57,"context_line":"        if kwargs.get(\"is_public\", False):"},{"line_number":58,"context_line":"            LOG.warn(\"is_public cannot be set to True for listing flavor \""},{"line_number":59,"context_line":"                     \"access rules. Setting is_public to False\")"},{"line_number":60,"context_line":"        kwargs[\"is_public\"] \u003d False"},{"line_number":61,"context_line":"        flavor \u003d self._create_flavor(name, ram, vcpus, disk, **kwargs)"},{"line_number":62,"context_line":"        self._list_flavor_access(flavor.id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a122d0e_3658fb89","line":59,"updated":"2016-04-20 10:40:58.000000000","message":"As for me better to raise an explicit exception to user that he doing something wrong","commit_id":"26baa5d28aabc3d75eada8b002fecdaa87a02179"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"475dd3c5013f077dddcec1d6dab05f15749a62ea","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        :param disk: Size of local disk in GB"},{"line_number":74,"context_line":"        :param kwargs: Optional additional arguments for flavor creation"},{"line_number":75,"context_line":"        \"\"\""},{"line_number":76,"context_line":"        self._create_flavor(name, ram, vcpus, disk, **kwargs)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a122d0e_bb7fd4a9","line":76,"updated":"2016-04-20 10:30:29.000000000","message":"The same as in 46","commit_id":"26baa5d28aabc3d75eada8b002fecdaa87a02179"}],"rally/plugins/openstack/scenarios/nova/utils.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"525527322075c17bf4efed8ec9488d6e2ef9071d","unresolved":false,"context_lines":[{"line_number":949,"context_line":""},{"line_number":950,"context_line":"    @atomic.action_timer(\"nova.create_flavor\")"},{"line_number":951,"context_line":"    def _create_flavor(self, name, ram, vcpus, disk, **kwargs):"},{"line_number":952,"context_line":"        \"\"\"Create a flavor and list its access rules"},{"line_number":953,"context_line":""},{"line_number":954,"context_line":"        :param name: Name of the flavor"},{"line_number":955,"context_line":"        :param ram: Memory in MB for the flavor"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_b377669e","line":952,"updated":"2016-04-18 14:03:09.000000000","message":"s/ and .*/./","commit_id":"894550a2f94236e7f875afbc81aa2d1a019426eb"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"e74a5f6afc2a380c3173cf04dff4b1b380e9ff2c","unresolved":false,"context_lines":[{"line_number":949,"context_line":""},{"line_number":950,"context_line":"    @atomic.action_timer(\"nova.create_flavor\")"},{"line_number":951,"context_line":"    def _create_flavor(self, name, ram, vcpus, disk, **kwargs):"},{"line_number":952,"context_line":"        \"\"\"Create a flavor and list its access rules"},{"line_number":953,"context_line":""},{"line_number":954,"context_line":"        :param name: Name of the flavor"},{"line_number":955,"context_line":"        :param ram: Memory in MB for the flavor"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_f6c70710","line":952,"in_reply_to":"1a122d0e_b377669e","updated":"2016-04-18 15:47:01.000000000","message":"Done","commit_id":"894550a2f94236e7f875afbc81aa2d1a019426eb"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"525527322075c17bf4efed8ec9488d6e2ef9071d","unresolved":false,"context_lines":[{"line_number":955,"context_line":"        :param ram: Memory in MB for the flavor"},{"line_number":956,"context_line":"        :param vcpus: Number of VCPUs for the flavor"},{"line_number":957,"context_line":"        :param disk: Size of local disk in GB"},{"line_number":958,"context_line":""},{"line_number":959,"context_line":"        :param kwargs: Optional additional arguments for flavor creation"},{"line_number":960,"context_line":"        \"\"\""},{"line_number":961,"context_line":"        return self.admin_clients(\"nova\").flavors.create(name, ram, vcpus,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_f3eb9e76","line":958,"updated":"2016-04-18 14:03:09.000000000","message":"Extra newline.","commit_id":"894550a2f94236e7f875afbc81aa2d1a019426eb"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"e74a5f6afc2a380c3173cf04dff4b1b380e9ff2c","unresolved":false,"context_lines":[{"line_number":955,"context_line":"        :param ram: Memory in MB for the flavor"},{"line_number":956,"context_line":"        :param vcpus: Number of VCPUs for the flavor"},{"line_number":957,"context_line":"        :param disk: Size of local disk in GB"},{"line_number":958,"context_line":""},{"line_number":959,"context_line":"        :param kwargs: Optional additional arguments for flavor creation"},{"line_number":960,"context_line":"        \"\"\""},{"line_number":961,"context_line":"        return self.admin_clients(\"nova\").flavors.create(name, ram, vcpus,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_d6cacb19","line":958,"in_reply_to":"1a122d0e_f3eb9e76","updated":"2016-04-18 15:47:01.000000000","message":"Done","commit_id":"894550a2f94236e7f875afbc81aa2d1a019426eb"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"e18e4a47495a18bbc19efe334cb0187b52ea3950","unresolved":false,"context_lines":[{"line_number":957,"context_line":"        :param disk: Size of local disk in GB"},{"line_number":958,"context_line":"        :param kwargs: Optional additional arguments for flavor creation"},{"line_number":959,"context_line":"        \"\"\""},{"line_number":960,"context_line":"        return self.admin_clients(\"nova\").flavors.create(name, ram, vcpus,"},{"line_number":961,"context_line":"                                                         disk, **kwargs)"},{"line_number":962,"context_line":""},{"line_number":963,"context_line":"    @atomic.action_timer(\"nova.list_flavor_access\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a122d0e_56dc9772","line":960,"updated":"2016-04-20 10:33:30.000000000","message":"If you add new resource to Rally like flavor you should add it to https://github.com/openstack/rally/blob/master/rally/plugins/openstack/cleanup/resources.py to help Rally to understand how to cleanup it. Now there is a leak of flavors","commit_id":"26baa5d28aabc3d75eada8b002fecdaa87a02179"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"0199409558fe1ec13312a0dbc4d4725e119f795d","unresolved":false,"context_lines":[{"line_number":950,"context_line":"        return self.admin_clients(\"nova\").services.list(host, binary)"},{"line_number":951,"context_line":""},{"line_number":952,"context_line":"    @atomic.action_timer(\"nova.create_flavor\")"},{"line_number":953,"context_line":"    def _create_flavor(self, ram, vcpus, disk, **kwargs):"},{"line_number":954,"context_line":"        \"\"\"Create a flavor"},{"line_number":955,"context_line":""},{"line_number":956,"context_line":"        :param ram: Memory in MB for the flavor"}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_39be85d4","line":953,"updated":"2016-05-09 20:40:15.000000000","message":"can you specify in docstrings what actually **kwargs accept flavor creation?","commit_id":"6e1180116a723505ddc70c76277717030dbef482"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"d3779e6f38d321d942249b1ec40845651dfb5365","unresolved":false,"context_lines":[{"line_number":950,"context_line":"        return self.admin_clients(\"nova\").services.list(host, binary)"},{"line_number":951,"context_line":""},{"line_number":952,"context_line":"    @atomic.action_timer(\"nova.create_flavor\")"},{"line_number":953,"context_line":"    def _create_flavor(self, ram, vcpus, disk, **kwargs):"},{"line_number":954,"context_line":"        \"\"\"Create a flavor"},{"line_number":955,"context_line":""},{"line_number":956,"context_line":"        :param ram: Memory in MB for the flavor"}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_ee07e815","line":953,"in_reply_to":"dab17558_39be85d4","updated":"2016-05-10 13:01:44.000000000","message":"I intentionally did not do it since nowhere else in the docstrings we specify optional parameters- https://github.com/openstack/rally/blob/master/rally/plugins/openstack/scenarios/nova/utils.py#L123, https://github.com/openstack/rally/blob/master/rally/plugins/openstack/scenarios/nova/utils.py#L213, https://github.com/openstack/rally/blob/master/rally/plugins/openstack/scenarios/nova/utils.py#L510, https://github.com/openstack/rally/blob/master/rally/plugins/openstack/scenarios/nova/utils.py#L552.\n\nIt includes all keyword arguments at https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/flavors.py#L166-L167.\n\nShall i still include it?","commit_id":"6e1180116a723505ddc70c76277717030dbef482"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"0199409558fe1ec13312a0dbc4d4725e119f795d","unresolved":false,"context_lines":[{"line_number":966,"context_line":"    def _list_flavor_access(self, flavor):"},{"line_number":967,"context_line":"        \"\"\"List access-rules for non-public flavor."},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        :param flavor: List access rules for flavor"},{"line_number":970,"context_line":"        \"\"\""},{"line_number":971,"context_line":"        return self.admin_clients(\"nova\").flavor_access.list(flavor\u003dflavor)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_99acd1a1","line":969,"updated":"2016-05-09 20:40:15.000000000","message":"this is wrong description of flavor argument (I believe this is flavor instance or flavor id)","commit_id":"6e1180116a723505ddc70c76277717030dbef482"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"d3779e6f38d321d942249b1ec40845651dfb5365","unresolved":false,"context_lines":[{"line_number":966,"context_line":"    def _list_flavor_access(self, flavor):"},{"line_number":967,"context_line":"        \"\"\"List access-rules for non-public flavor."},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        :param flavor: List access rules for flavor"},{"line_number":970,"context_line":"        \"\"\""},{"line_number":971,"context_line":"        return self.admin_clients(\"nova\").flavor_access.list(flavor\u003dflavor)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_0e686cb8","line":969,"in_reply_to":"dab17558_99acd1a1","updated":"2016-05-10 13:01:44.000000000","message":"Done","commit_id":"6e1180116a723505ddc70c76277717030dbef482"}],"samples/tasks/scenarios/nova/create-and-list-flavor-access.json":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"af6a5c332693c6a4fcb121b8da177875aa1eccc2","unresolved":false,"context_lines":[{"line_number":12,"context_line":"        \"disk\": 1"},{"line_number":13,"context_line":"      },"},{"line_number":14,"context_line":"      \"context\": {"},{"line_number":15,"context_line":"        \"users\": {"},{"line_number":16,"context_line":"          \"tenants\": 3,"},{"line_number":17,"context_line":"          \"users_per_tenant\": 2"},{"line_number":18,"context_line":"        }"}],"source_content_type":"application/json","patch_set":15,"id":"dab17558_2a3638e7","line":15,"updated":"2016-05-09 12:58:55.000000000","message":"Users aren\u0027t required for this scenario, so why include them in the sample?","commit_id":"1e0da7f0f75b3bc85e32186fa7dd36b9cc588eff"},{"author":{"_account_id":20299,"name":"Piyush","inactive":true},"change_message_id":"a2e150cbd1f00e35b9d504083040730443e82435","unresolved":false,"context_lines":[{"line_number":12,"context_line":"        \"disk\": 1"},{"line_number":13,"context_line":"      },"},{"line_number":14,"context_line":"      \"context\": {"},{"line_number":15,"context_line":"        \"users\": {"},{"line_number":16,"context_line":"          \"tenants\": 3,"},{"line_number":17,"context_line":"          \"users_per_tenant\": 2"},{"line_number":18,"context_line":"        }"}],"source_content_type":"application/json","patch_set":15,"id":"dab17558_79f2db70","line":15,"in_reply_to":"dab17558_2a3638e7","updated":"2016-05-09 15:05:57.000000000","message":"Will do that. I see same issue with some other josn/yamls as well. Will include them in next patch.","commit_id":"1e0da7f0f75b3bc85e32186fa7dd36b9cc588eff"}],"samples/tasks/scenarios/nova/create-flavor.json":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"af6a5c332693c6a4fcb121b8da177875aa1eccc2","unresolved":false,"context_lines":[{"line_number":12,"context_line":"        \"disk\": 1"},{"line_number":13,"context_line":"      },"},{"line_number":14,"context_line":"      \"context\": {"},{"line_number":15,"context_line":"        \"users\": {"},{"line_number":16,"context_line":"          \"tenants\": 3,"},{"line_number":17,"context_line":"          \"users_per_tenant\": 2"},{"line_number":18,"context_line":"        }"}],"source_content_type":"application/json","patch_set":15,"id":"dab17558_8a35a4db","line":15,"updated":"2016-05-09 12:58:55.000000000","message":"Same here.","commit_id":"1e0da7f0f75b3bc85e32186fa7dd36b9cc588eff"}],"samples/tasks/scenarios/nova/list-agents.yaml":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"6b519a98300a98edd47fb21ae9524cfc52547515","unresolved":false,"context_lines":[{"line_number":4,"context_line":"      runner:"},{"line_number":5,"context_line":"        type: \"constant\""},{"line_number":6,"context_line":"        concurrency: 2"},{"line_number":7,"context_line":"        times: 10"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"dab17558_16f43084","line":7,"updated":"2016-05-09 20:19:32.000000000","message":"Why are we changing whitespace in this file?","commit_id":"6e1180116a723505ddc70c76277717030dbef482"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"d3779e6f38d321d942249b1ec40845651dfb5365","unresolved":false,"context_lines":[{"line_number":4,"context_line":"      runner:"},{"line_number":5,"context_line":"        type: \"constant\""},{"line_number":6,"context_line":"        concurrency: 2"},{"line_number":7,"context_line":"        times: 10"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"dab17558_384e5a3b","line":7,"in_reply_to":"dab17558_16f43084","updated":"2016-05-10 13:01:44.000000000","message":"To keep indentation / spacing consistent across all YAML\u0027s e.g. https://github.com/openstack/rally/blob/master/samples/tasks/scenarios/nova/list-flavors.yaml","commit_id":"6e1180116a723505ddc70c76277717030dbef482"}],"samples/tasks/scenarios/nova/list-aggregates.yaml":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"6b519a98300a98edd47fb21ae9524cfc52547515","unresolved":false,"context_lines":[{"line_number":4,"context_line":"      runner:"},{"line_number":5,"context_line":"        type: \"constant\""},{"line_number":6,"context_line":"        concurrency: 2"},{"line_number":7,"context_line":"        times : 10"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"dab17558_d640e8a7","line":7,"updated":"2016-05-09 20:19:32.000000000","message":"Same here?","commit_id":"6e1180116a723505ddc70c76277717030dbef482"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"d3779e6f38d321d942249b1ec40845651dfb5365","unresolved":false,"context_lines":[{"line_number":4,"context_line":"      runner:"},{"line_number":5,"context_line":"        type: \"constant\""},{"line_number":6,"context_line":"        concurrency: 2"},{"line_number":7,"context_line":"        times : 10"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"dab17558_9bce602c","line":7,"in_reply_to":"dab17558_d640e8a7","updated":"2016-05-10 13:01:44.000000000","message":"Same as list-agents","commit_id":"6e1180116a723505ddc70c76277717030dbef482"}],"samples/tasks/scenarios/nova/list-hosts.yaml":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"6b519a98300a98edd47fb21ae9524cfc52547515","unresolved":false,"context_lines":[{"line_number":4,"context_line":"      runner:"},{"line_number":5,"context_line":"        type: \"constant\""},{"line_number":6,"context_line":"        concurrency: 2"},{"line_number":7,"context_line":"        times: 10"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"dab17558_164b90ca","line":7,"updated":"2016-05-09 20:19:32.000000000","message":"...and here.","commit_id":"6e1180116a723505ddc70c76277717030dbef482"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"d3779e6f38d321d942249b1ec40845651dfb5365","unresolved":false,"context_lines":[{"line_number":4,"context_line":"      runner:"},{"line_number":5,"context_line":"        type: \"constant\""},{"line_number":6,"context_line":"        concurrency: 2"},{"line_number":7,"context_line":"        times: 10"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"dab17558_7bac5c8c","line":7,"in_reply_to":"dab17558_164b90ca","updated":"2016-05-10 13:01:44.000000000","message":"Same as list-agents","commit_id":"6e1180116a723505ddc70c76277717030dbef482"}],"tests/unit/plugins/openstack/cleanup/test_resources.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"6b519a98300a98edd47fb21ae9524cfc52547515","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        mock_resource_manager__manager().list.return_value \u003d flavors"},{"line_number":132,"context_line":"        self.assertEqual(flavors[1:], resources.NovaFlavors().list())"},{"line_number":133,"context_line":"        mock_name_matches_object.assert_has_calls([mock.call(r.name,"},{"line_number":134,"context_line":"                                                  nutils.NovaScenario)"},{"line_number":135,"context_line":"                                                  for r in flavors])"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_f6736c13","line":134,"updated":"2016-05-09 20:19:32.000000000","message":"I\u0027m surprised PEP8 is happy with this indentation. Instead please do:\n\n    mock_name_matches_object.assert_has_calls(\n        [mock.call(r.name, nutils.NovaScenario) for r in flavors])","commit_id":"6e1180116a723505ddc70c76277717030dbef482"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"d3779e6f38d321d942249b1ec40845651dfb5365","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        mock_resource_manager__manager().list.return_value \u003d flavors"},{"line_number":132,"context_line":"        self.assertEqual(flavors[1:], resources.NovaFlavors().list())"},{"line_number":133,"context_line":"        mock_name_matches_object.assert_has_calls([mock.call(r.name,"},{"line_number":134,"context_line":"                                                  nutils.NovaScenario)"},{"line_number":135,"context_line":"                                                  for r in flavors])"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_9bc14057","line":134,"in_reply_to":"dab17558_b9c6f546","updated":"2016-05-10 13:01:44.000000000","message":"Done","commit_id":"6e1180116a723505ddc70c76277717030dbef482"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"d3779e6f38d321d942249b1ec40845651dfb5365","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        mock_resource_manager__manager().list.return_value \u003d flavors"},{"line_number":132,"context_line":"        self.assertEqual(flavors[1:], resources.NovaFlavors().list())"},{"line_number":133,"context_line":"        mock_name_matches_object.assert_has_calls([mock.call(r.name,"},{"line_number":134,"context_line":"                                                  nutils.NovaScenario)"},{"line_number":135,"context_line":"                                                  for r in flavors])"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_5bed18ee","line":134,"in_reply_to":"dab17558_f6736c13","updated":"2016-05-10 13:01:44.000000000","message":"Done","commit_id":"6e1180116a723505ddc70c76277717030dbef482"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"0199409558fe1ec13312a0dbc4d4725e119f795d","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        mock_resource_manager__manager().list.return_value \u003d flavors"},{"line_number":132,"context_line":"        self.assertEqual(flavors[1:], resources.NovaFlavors().list())"},{"line_number":133,"context_line":"        mock_name_matches_object.assert_has_calls([mock.call(r.name,"},{"line_number":134,"context_line":"                                                  nutils.NovaScenario)"},{"line_number":135,"context_line":"                                                  for r in flavors])"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"dab17558_b9c6f546","line":134,"in_reply_to":"dab17558_f6736c13","updated":"2016-05-09 20:40:15.000000000","message":"yep pep8 allow such consturctions however they are really hard to read.","commit_id":"6e1180116a723505ddc70c76277717030dbef482"}],"tests/unit/plugins/openstack/scenarios/nova/test_flavors.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"525527322075c17bf4efed8ec9488d6e2ef9071d","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        scenario._list_flavors.assert_called_once_with(True, fakearg\u003d\"fakearg\")"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def test_create_and_list_flavor_access(self):"},{"line_number":32,"context_line":"        fake_flavor \u003d fakes.FakeFlavor(id\u003d\"foo_uuid\", name\u003d\"foo_name\","},{"line_number":33,"context_line":"                                       is_public\u003dFalse)"},{"line_number":34,"context_line":"        scenario \u003d flavors.NovaFlavors()"},{"line_number":35,"context_line":"        scenario._create_flavor \u003d mock.MagicMock(return_value\u003dfake_flavor)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_738f8ecc","line":32,"updated":"2016-04-18 14:03:09.000000000","message":"Instead of using (and thus having to modify) our pretty terrible fakes, just use a Mock object for this.","commit_id":"894550a2f94236e7f875afbc81aa2d1a019426eb"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"e74a5f6afc2a380c3173cf04dff4b1b380e9ff2c","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        scenario._list_flavors.assert_called_once_with(True, fakearg\u003d\"fakearg\")"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def test_create_and_list_flavor_access(self):"},{"line_number":32,"context_line":"        fake_flavor \u003d fakes.FakeFlavor(id\u003d\"foo_uuid\", name\u003d\"foo_name\","},{"line_number":33,"context_line":"                                       is_public\u003dFalse)"},{"line_number":34,"context_line":"        scenario \u003d flavors.NovaFlavors()"},{"line_number":35,"context_line":"        scenario._create_flavor \u003d mock.MagicMock(return_value\u003dfake_flavor)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_392170a0","line":32,"in_reply_to":"1a122d0e_738f8ecc","updated":"2016-04-18 15:47:01.000000000","message":"If i do mock.MagicMock() then how do i write assertion for scenario._list_flavor_access ( Line 42 below ) ?","commit_id":"894550a2f94236e7f875afbc81aa2d1a019426eb"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"525527322075c17bf4efed8ec9488d6e2ef9071d","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        scenario._list_flavor_access \u003d mock.Mock()"},{"line_number":37,"context_line":"        scenario.create_and_list_flavor_access(name\u003d\"foo_name\", ram\u003d100,"},{"line_number":38,"context_line":"                                               vcpus\u003d1, disk\u003d1,"},{"line_number":39,"context_line":"                                               is_public\u003dFalse)"},{"line_number":40,"context_line":"        scenario._create_flavor.assert_called_once_with(\"foo_name\", 100, 1, 1,"},{"line_number":41,"context_line":"                                                        is_public\u003dFalse)"},{"line_number":42,"context_line":"        scenario._list_flavor_access.assert_called_once_with(fake_flavor.id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_13457a6f","line":39,"updated":"2016-04-18 14:03:09.000000000","message":"I\u0027d suggest using DDT here to test a few different cases:\n\n* Ensure that a default is set when no is_public is provided\n* Ensure that is_public\u003dTrue is overridden\n* Ensure that is_public\u003dFalse works\n* Ensure that arbitrary keyword args are accepted","commit_id":"894550a2f94236e7f875afbc81aa2d1a019426eb"},{"author":{"_account_id":20196,"name":"Piyush","email":"piyush2011257@gmail.com","username":"pirsriva"},"change_message_id":"e74a5f6afc2a380c3173cf04dff4b1b380e9ff2c","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        scenario._list_flavor_access \u003d mock.Mock()"},{"line_number":37,"context_line":"        scenario.create_and_list_flavor_access(name\u003d\"foo_name\", ram\u003d100,"},{"line_number":38,"context_line":"                                               vcpus\u003d1, disk\u003d1,"},{"line_number":39,"context_line":"                                               is_public\u003dFalse)"},{"line_number":40,"context_line":"        scenario._create_flavor.assert_called_once_with(\"foo_name\", 100, 1, 1,"},{"line_number":41,"context_line":"                                                        is_public\u003dFalse)"},{"line_number":42,"context_line":"        scenario._list_flavor_access.assert_called_once_with(fake_flavor.id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_796928be","line":39,"in_reply_to":"1a122d0e_13457a6f","updated":"2016-04-18 15:47:01.000000000","message":"I dont understand the point. Handling the value of is_public would be at the nova client\u0027s end, not here. Here it is just a valid keyword argument being passed.","commit_id":"894550a2f94236e7f875afbc81aa2d1a019426eb"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"a33b54da0281780800893595e13fa7d898b60256","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def test_create_and_list_flavor_access(self):"},{"line_number":32,"context_line":"        fake_flavor \u003d fakes.FakeFlavor(id\u003d\"foo_uuid\", name\u003d\"foo_name\","},{"line_number":33,"context_line":"                                       is_public\u003dFalse)"},{"line_number":34,"context_line":"        scenario \u003d flavors.NovaFlavors()"},{"line_number":35,"context_line":"        scenario._create_flavor \u003d mock.MagicMock(return_value\u003dfake_flavor)"},{"line_number":36,"context_line":"        scenario._list_flavor_access \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_cc3a3c98","line":33,"updated":"2016-04-18 16:07:26.000000000","message":"You don\u0027t have to change the assertion at all. You can just do:\n\n    scenario \u003d flavors.NovaFlavors()\n    scenario._create_flavor \u003d mock.Mock()\n    scenario._list_flavor_access \u003d mock.Mock()\n    scenario.create_and_list_flavor_access(...)\n    scenario._create_flavor.assert_called_once_with(...)\n    scenario._list_flavor_access.assert_called_once_with(scenario._create_flavor.return_value.id)","commit_id":"7950caba2b610fec49c3d20ff48dc1223b656587"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"a33b54da0281780800893595e13fa7d898b60256","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        scenario._list_flavor_access \u003d mock.Mock()"},{"line_number":37,"context_line":"        scenario.create_and_list_flavor_access(name\u003d\"foo_name\", ram\u003d100,"},{"line_number":38,"context_line":"                                               vcpus\u003d1, disk\u003d1,"},{"line_number":39,"context_line":"                                               is_public\u003dFalse)"},{"line_number":40,"context_line":"        scenario._create_flavor.assert_called_once_with(\"foo_name\", 100, 1, 1,"},{"line_number":41,"context_line":"                                                        is_public\u003dFalse)"},{"line_number":42,"context_line":"        scenario._list_flavor_access.assert_called_once_with(fake_flavor.id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_ac1b801a","line":39,"updated":"2016-04-18 16:07:26.000000000","message":"There\u0027s special magic around is_public in create_and_list_flavor_access() -- it\u0027s not just an arbitrary keyword argument. Please add other test cases with DDT to ensure that both is_public and arbitrary keyword args are both handled correctly.","commit_id":"7950caba2b610fec49c3d20ff48dc1223b656587"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"076927e7e4a77b577e56711cb88ad22ea484db58","unresolved":false,"context_lines":[{"line_number":36,"context_line":"              {\"is_public\": False, \"fakeargs\": \"fakeargs\"})"},{"line_number":37,"context_line":"    @ddt.unpack"},{"line_number":38,"context_line":"    def test_create_and_list_flavor_access(self, is_public\u003dNone,"},{"line_number":39,"context_line":"                                           fakeargs\u003dNone):"},{"line_number":40,"context_line":"        scenario \u003d flavors.NovaFlavors()"},{"line_number":41,"context_line":"        scenario._create_flavor \u003d mock.Mock()"},{"line_number":42,"context_line":"        scenario._list_flavor_access \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_93c058e2","line":39,"updated":"2016-04-18 20:21:49.000000000","message":"I think this would be better written as:\n\n    def test_create_and_list_flavor_access(self, **kwargs):\n        ...\n\n\nThen to check that it was called correctly you can just do:\n\n    kwargs.pop(\"is_public\", None)\n    scenario._create_flavor.assert_called_once_with(\"foo_name\", 100, 1, 1, **kwargs)\n\nOtherwise you *always* call it with both is_public and fakeargs so your test scope is reduced. Using **-magic ensures that you only pass the kwargs that are actually specified in the DDT data.","commit_id":"e8aca202e244e834a98da7c4daff92937512df79"}],"tests/unit/plugins/openstack/scenarios/nova/test_utils.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"525527322075c17bf4efed8ec9488d6e2ef9071d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"1a122d0e_d674909d","updated":"2016-04-18 14:03:09.000000000","message":"Need a test for _create_flavor()","commit_id":"894550a2f94236e7f875afbc81aa2d1a019426eb"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"525527322075c17bf4efed8ec9488d6e2ef9071d","unresolved":false,"context_lines":[{"line_number":944,"context_line":"        self.admin_clients(\"nova\").flavor_access.list.return_value \u003d ("},{"line_number":945,"context_line":"            \"foo_id flavor access list\")"},{"line_number":946,"context_line":"        result \u003d nova_scenario._list_flavor_access(\"foo_id\")"},{"line_number":947,"context_line":"        self.assertEqual(\"foo_id flavor access list\", result)"},{"line_number":948,"context_line":"        self.admin_clients(\"nova\").flavor_access.list.assert_called_once_with("},{"line_number":949,"context_line":"            flavor\u003d\"foo_id\")"},{"line_number":950,"context_line":"        self._test_atomic_action_timer(nova_scenario.atomic_actions(),"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_d62650b9","line":947,"updated":"2016-04-18 14:03:09.000000000","message":"Instead of setting a kind of bizarre return value, just check:\n\n    self.assertEqual(self.admin_clients(\"nova\").flavor_access.list.return_value, result)","commit_id":"894550a2f94236e7f875afbc81aa2d1a019426eb"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"a33b54da0281780800893595e13fa7d898b60256","unresolved":false,"context_lines":[{"line_number":944,"context_line":"    def test__list_flavor_access(self):"},{"line_number":945,"context_line":"        nova_scenario \u003d utils.NovaScenario()"},{"line_number":946,"context_line":"        self.admin_clients(\"nova\").flavor_access.list.return_value \u003d ("},{"line_number":947,"context_line":"            self.flavor_access_rules)"},{"line_number":948,"context_line":"        result \u003d nova_scenario._list_flavor_access(\"foo_id\")"},{"line_number":949,"context_line":"        self.assertEqual(self.flavor_access_rules, result)"},{"line_number":950,"context_line":"        self.admin_clients(\"nova\").flavor_access.list.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_6c97a890","line":947,"updated":"2016-04-18 16:07:26.000000000","message":"self.flavor_access_rules is unnecessary. Unless you\u0027re setting the return value to some interesting value you don\u0027t need to set the return value at all, just check it.","commit_id":"7950caba2b610fec49c3d20ff48dc1223b656587"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"a33b54da0281780800893595e13fa7d898b60256","unresolved":false,"context_lines":[{"line_number":954,"context_line":""},{"line_number":955,"context_line":"    def test__create_flavor(self):"},{"line_number":956,"context_line":"        nova_scenario \u003d utils.NovaScenario()"},{"line_number":957,"context_line":"        self.admin_clients(\"nova\").flavors.create.return_value \u003d self.flavor"},{"line_number":958,"context_line":"        result \u003d nova_scenario._create_flavor(\"foo_name\", 500, 1, 1,"},{"line_number":959,"context_line":"                                              fakearg\u003d\"fakearg\")"},{"line_number":960,"context_line":"        self.assertEqual(self.flavor, result)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_4c92aca0","line":957,"updated":"2016-04-18 16:07:26.000000000","message":"Same here.","commit_id":"7950caba2b610fec49c3d20ff48dc1223b656587"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"076927e7e4a77b577e56711cb88ad22ea484db58","unresolved":false,"context_lines":[{"line_number":943,"context_line":""},{"line_number":944,"context_line":"    def test__list_flavor_access(self):"},{"line_number":945,"context_line":"        nova_scenario \u003d utils.NovaScenario()"},{"line_number":946,"context_line":"        nova_scenario._list_flavor_access(\"foo_id\")"},{"line_number":947,"context_line":"        self.admin_clients(\"nova\").flavor_access.list.assert_called_once_with("},{"line_number":948,"context_line":"            flavor\u003d\"foo_id\")"},{"line_number":949,"context_line":"        self._test_atomic_action_timer(nova_scenario.atomic_actions(),"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_73793cf6","line":946,"updated":"2016-04-18 20:21:49.000000000","message":"Please check the return value of this call.","commit_id":"e8aca202e244e834a98da7c4daff92937512df79"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"076927e7e4a77b577e56711cb88ad22ea484db58","unresolved":false,"context_lines":[{"line_number":951,"context_line":""},{"line_number":952,"context_line":"    def test__create_flavor(self):"},{"line_number":953,"context_line":"        nova_scenario \u003d utils.NovaScenario()"},{"line_number":954,"context_line":"        nova_scenario._create_flavor(\"foo_name\", 500, 1, 1,"},{"line_number":955,"context_line":"                                     fakearg\u003d\"fakearg\")"},{"line_number":956,"context_line":"        self.admin_clients(\"nova\").flavors.create.assert_called_once_with("},{"line_number":957,"context_line":"            \"foo_name\", 500, 1, 1, fakearg\u003d\"fakearg\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_b361143c","line":954,"updated":"2016-04-18 20:21:49.000000000","message":"Check the return value of this call.","commit_id":"e8aca202e244e834a98da7c4daff92937512df79"}]}
