)]}'
{"tempest/common/isolated_creds.py":[{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"58363f2c5f513039af80eb143cd2061b64526350","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    def get_alt_router(self):"},{"line_number":321,"context_line":"        return self.isolated_net_resources.get(\u0027alt\u0027)[2]"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def gen_new_credentials(self, credential_type, suffix\u003d\u0027\u0027):"},{"line_number":324,"context_line":"        is_admin \u003d (credential_type \u003d\u003d \u0027admin\u0027)"},{"line_number":325,"context_line":"        credentials \u003d self._create_creds(admin\u003dis_admin, suffix\u003dsuffix)"},{"line_number":326,"context_line":"        self.isolated_creds[credential_type] \u003d credentials"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac7a964_f534c4df","line":323,"updated":"2014-08-15 15:18:02.000000000","message":"nit: perhaps the name could be called simply create_creds?","commit_id":"17c9849540536e4ac88ef996811fe84fc4aacd6e"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"c10601288fcbb99c8db2f4b195828e1f396ec990","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    def get_alt_router(self):"},{"line_number":321,"context_line":"        return self.isolated_net_resources.get(\u0027alt\u0027)[2]"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def gen_new_credentials(self, credential_type, suffix\u003d\u0027\u0027):"},{"line_number":324,"context_line":"        is_admin \u003d (credential_type \u003d\u003d \u0027admin\u0027)"},{"line_number":325,"context_line":"        credentials \u003d self._create_creds(admin\u003dis_admin, suffix\u003dsuffix)"},{"line_number":326,"context_line":"        self.isolated_creds[credential_type] \u003d credentials"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac7a964_75135466","line":323,"in_reply_to":"7ac7a964_f534c4df","updated":"2014-08-15 15:20:13.000000000","message":"Looking at this again, in fact if you just used a different credential type you would need to split this function at all.\nAnd as far as I can see credential_type is only used for the admin case.","commit_id":"17c9849540536e4ac88ef996811fe84fc4aacd6e"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"58363f2c5f513039af80eb143cd2061b64526350","unresolved":false,"context_lines":[{"line_number":323,"context_line":"    def gen_new_credentials(self, credential_type, suffix\u003d\u0027\u0027):"},{"line_number":324,"context_line":"        is_admin \u003d (credential_type \u003d\u003d \u0027admin\u0027)"},{"line_number":325,"context_line":"        credentials \u003d self._create_creds(admin\u003dis_admin, suffix\u003dsuffix)"},{"line_number":326,"context_line":"        self.isolated_creds[credential_type] \u003d credentials"},{"line_number":327,"context_line":"        # Maintained until tests are ported"},{"line_number":328,"context_line":"        LOG.info(\"Acquired isolated creds:\\n credentials: %s\""},{"line_number":329,"context_line":"                 % credentials)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac7a964_f5904497","line":326,"updated":"2014-08-15 15:18:02.000000000","message":"I\u0027m not sure this makes sense here. If this method is to be used externally, the dict would be overwritten for every new credential (the type stays the same). So I would do this as part of get_credentials().\n\nIf you think it make sense to keep the dict of generated resources even when this is used by the script, a trick could be to drop the additional suffix parameter in L323, and instead pass something like \"user1\", \"user2\" etc as credential_type from the script.","commit_id":"17c9849540536e4ac88ef996811fe84fc4aacd6e"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"58363f2c5f513039af80eb143cd2061b64526350","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        if CONF.service_available.neutron:"},{"line_number":331,"context_line":"            network, subnet, router \u003d self._create_network_resources("},{"line_number":332,"context_line":"                credentials.tenant_id)"},{"line_number":333,"context_line":"            self.isolated_net_resources[credential_type] \u003d ("},{"line_number":334,"context_line":"                network, subnet, router,)"},{"line_number":335,"context_line":"            LOG.info(\"Created isolated network resources for : \\n\""},{"line_number":336,"context_line":"                     + \" credentials: %s\" % credentials)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac7a964_35bb9ce6","line":333,"updated":"2014-08-15 15:18:02.000000000","message":"Same as L326. In the script you\u0027re always passing \"user\" as credentials_type. \nIf you want to keep a dict of net_resources when running from the script you could return here a tuple credentials, network, subnet, router","commit_id":"17c9849540536e4ac88ef996811fe84fc4aacd6e"}],"tools/create-test-accounts.py":[{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"58363f2c5f513039af80eb143cd2061b64526350","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class AccountProvider(isolated_creds.IsolatedCreds):"},{"line_number":33,"context_line":"    def gen_new_credentials(self, acc_num):"},{"line_number":34,"context_line":"        suffix \u003d \u0027_%s\u0027 % acc_num"},{"line_number":35,"context_line":"        creds \u003d super(AccountProvider, self).gen_new_credentials("},{"line_number":36,"context_line":"            \u0027user\u0027, suffix\u003dsuffix)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac7a964_b2db42ec","line":33,"updated":"2014-08-15 15:18:02.000000000","message":"nit: it could be interesting to have an incremental ID in the name, but it\u0027s not necessarily required, or?","commit_id":"17c9849540536e4ac88ef996811fe84fc4aacd6e"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"58363f2c5f513039af80eb143cd2061b64526350","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        suffix \u003d \u0027_%s\u0027 % acc_num"},{"line_number":35,"context_line":"        creds \u003d super(AccountProvider, self).gen_new_credentials("},{"line_number":36,"context_line":"            \u0027user\u0027, suffix\u003dsuffix)"},{"line_number":37,"context_line":"        return {\u0027username\u0027: creds.username.encode(\u0027utf-8\u0027),"},{"line_number":38,"context_line":"                \u0027password\u0027: creds.password.encode(\u0027utf-8\u0027),"},{"line_number":39,"context_line":"                \u0027tenant_name\u0027: creds.tenant_name.encode(\u0027utf-8\u0027)}"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac7a964_f5fcc440","line":37,"updated":"2014-08-15 15:18:02.000000000","message":"This way if generated credentials include a domain you it\u0027s lost. I would add a to_dict() method to auth.Credentials and use it here. Even if ids get included it would still be fine, the YAML reader can handle any field in here which is recognized by the credential class.","commit_id":"17c9849540536e4ac88ef996811fe84fc4aacd6e"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"58363f2c5f513039af80eb143cd2061b64526350","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                \u0027tenant_name\u0027: creds.tenant_name.encode(\u0027utf-8\u0027)}"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class AccountProviderRaw(object):"},{"line_number":43,"context_line":"    # FIXME(psedlak): Drop this, unless we decide to go for python-Xclients"},{"line_number":44,"context_line":"    # In which case this could serve as draft."},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac7a964_35de3c12","line":42,"updated":"2014-08-15 15:18:02.000000000","message":"I like the AccountProvider option better","commit_id":"17c9849540536e4ac88ef996811fe84fc4aacd6e"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"58363f2c5f513039af80eb143cd2061b64526350","unresolved":false,"context_lines":[{"line_number":92,"context_line":"def main():"},{"line_number":93,"context_line":"    acc_pass \u003d \u0027tempestSecret\u0027"},{"line_number":94,"context_line":"    # provider \u003d AccountProviderRaw(\u0027tempest\u0027, password\u003dacc_pass)"},{"line_number":95,"context_line":"    provider \u003d AccountProvider(\u0027tempest\u0027, password\u003dacc_pass)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    accounts \u003d []"},{"line_number":98,"context_line":"    for acc_num in range(int(sys.argv[1])):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac7a964_b5ca4c4d","line":95,"updated":"2014-08-15 15:18:02.000000000","message":"This way no network resources are generated. I think for pre-created accounts we need to always requests all network resources - they\u0027ll only be created if neutron is enabled anyways.","commit_id":"17c9849540536e4ac88ef996811fe84fc4aacd6e"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"e3be9736547e11a0774c5eeedf4287e81bce871d","unresolved":false,"context_lines":[{"line_number":98,"context_line":"    for acc_num in range(int(sys.argv[1])):"},{"line_number":99,"context_line":"        accounts.append("},{"line_number":100,"context_line":"            provider.gen_new_credentials(acc_num))"},{"line_number":101,"context_line":"    print(yaml.dump(accounts))"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_a1f53658","line":101,"updated":"2014-09-04 07:20:09.000000000","message":"how about writing accounts into yaml ( may be ./etc/accounts_generated.yaml) instead of print? \nAnd print the path for generated file so that user can just rename that.","commit_id":"17c9849540536e4ac88ef996811fe84fc4aacd6e"}]}
