)]}'
{"id":"openstack%2Fcinderlib~648212","triplet_id":"openstack%2Fcinderlib~master~I94b4864c5823976f4a9cac2e40943b74aca4066e","project":"openstack/cinderlib","branch":"master","topic":"bug/1821898","hashtags":[],"change_id":"I94b4864c5823976f4a9cac2e40943b74aca4066e","subject":"Add support for IBM SVC","status":"MERGED","created":"2019-03-27 18:52:45.000000000","updated":"2019-08-28 16:15:25.000000000","submitted":"2019-08-28 16:12:34.000000000","submitter":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"648212-1567008755132-1d8aaa17","meta_rev_id":"7d80d4449fd1b9cd133ccd1ecea633628ef20104","_number":648212,"virtual_id_number":648212,"owner":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},{"value":2,"date":"2019-08-28 16:12:34.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":0,"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},{"value":0,"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","default_value":0,"optional":true},"Code-Review":{"approved":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"all":[{"value":2,"date":"2019-08-28 13:50:38.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":2,"date":"2019-08-22 22:47:59.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},{"value":0,"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","default_value":0,"optional":true},"Workflow":{"approved":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"all":[{"value":1,"date":"2019-08-28 13:50:38.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":0,"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},{"value":0,"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Review-Priority":{"all":[{"value":0,"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":0,"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},{"value":0,"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"}],"values":{"-1":"Branch Freeze"," 0":"No Priority","+1":"Important Change","+2":"Gate Blocker Fix / Urgent Change"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2019-08-22 22:47:59.000000000","updated_by":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"reviewer":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"state":"REVIEWER"},{"updated":"2019-08-28 13:50:38.000000000","updated_by":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"reviewer":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"state":"REVIEWER"},{"updated":"2019-08-28 16:12:34.000000000","updated_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"reviewer":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"state":"REVIEWER"}],"messages":[{"id":"de742358b4d4915b95fff8b5600b6b53ab394cdb","author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"date":"2019-03-27 18:52:45.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"d4ead0e72222f0235a0eb286bbfd475fd6b62a90","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-03-27 19:43:25.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\n\n- openstack-tox-docs http://logs.openstack.org/12/648212/1/check/openstack-tox-docs/48ce9f2/html/ : SUCCESS in 5m 35s\n- openstack-tox-pep8 http://logs.openstack.org/12/648212/1/check/openstack-tox-pep8/cc5c354/ : SUCCESS in 4m 50s\n- cinderlib-tox-py27 http://logs.openstack.org/12/648212/1/check/cinderlib-tox-py27/9a4118c/ : SUCCESS in 7m 12s\n- cinderlib-tox-py36 http://logs.openstack.org/12/648212/1/check/cinderlib-tox-py36/584252d/ : SUCCESS in 7m 09s\n- cinderlib-lvm-functional http://logs.openstack.org/12/648212/1/check/cinderlib-lvm-functional/559f350/ : SUCCESS in 9m 56s\n- cinderlib-ceph-functional http://logs.openstack.org/12/648212/1/check/cinderlib-ceph-functional/14bab04/ : SUCCESS in 10m 26s","accounts_in_message":[],"_revision_number":1},{"id":"8124b24234a900a9ee377dcd1e92e2020a9bda91","author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"date":"2019-03-28 10:58:03.000000000","message":"Patch Set 1:\n\nAs we can see in the github thread [1], this seems to resolve the issue for IBM SVC.\n\n\n[1]: https://github.com/Akrog/cinderlib/issues/15","accounts_in_message":[],"_revision_number":1},{"id":"a80e23a049ca09bebcbbab8bb98cbd7993a76842","author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"date":"2019-03-28 12:05:26.000000000","message":"Patch Set 1:\n\nLooks like I was mistaken, there is still some issues, even with this fix: https://github.com/Akrog/cinderlib/issues/16\nI\u0027ll investigate","accounts_in_message":[],"_revision_number":1},{"id":"e7cf14348200c97d794d03002e3ed941314be1b8","author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"date":"2019-03-28 14:25:29.000000000","message":"Uploaded patch set 2.","accounts_in_message":[],"_revision_number":2},{"id":"bb26c8c04335744bfcf917c55c4667a08d27ad12","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-03-28 15:27:44.000000000","message":"Patch Set 2: Verified+1\n\nBuild succeeded (check pipeline).\n\n- openstack-tox-docs http://logs.openstack.org/12/648212/2/check/openstack-tox-docs/25d33eb/html/ : SUCCESS in 5m 03s\n- openstack-tox-pep8 http://logs.openstack.org/12/648212/2/check/openstack-tox-pep8/de17071/ : SUCCESS in 5m 15s\n- cinderlib-tox-py27 http://logs.openstack.org/12/648212/2/check/cinderlib-tox-py27/b24a0d5/ : SUCCESS in 6m 39s\n- cinderlib-tox-py36 http://logs.openstack.org/12/648212/2/check/cinderlib-tox-py36/553d1d1/ : SUCCESS in 7m 40s\n- cinderlib-lvm-functional http://logs.openstack.org/12/648212/2/check/cinderlib-lvm-functional/662c3cb/ : SUCCESS in 10m 44s\n- cinderlib-ceph-functional http://logs.openstack.org/12/648212/2/check/cinderlib-ceph-functional/15336c4/ : SUCCESS in 9m 08s","accounts_in_message":[],"_revision_number":2},{"id":"cc4c9d826e7b6057f74a21b783a7f0548003c440","author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"date":"2019-03-28 16:23:11.000000000","message":"Patch Set 2: Workflow-1\n\nWaiting for confirmation it actually works.","accounts_in_message":[],"_revision_number":2},{"id":"08c97e4f2c9d5e308bb1a9dbf0da59253a246a0b","author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"date":"2019-04-01 11:06:14.000000000","message":"Patch Set 2: -Workflow\n\nLooks like it has been confirmed patchset #2 make IBM SVC work with non DB persistence plugins, as per https://github.com/Akrog/cinderlib/issues/16#issuecomment-478416267","accounts_in_message":[],"_revision_number":2},{"id":"b6b29e797f538ccf16c82e1eef3161f56752190b","author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"date":"2019-07-31 19:13:31.000000000","message":"Uploaded patch set 3.","accounts_in_message":[],"_revision_number":3},{"id":"67d7bda9204e0dedb4ba888d1e6de9d3aa130d36","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-07-31 21:18:06.000000000","message":"Patch Set 3: Verified+1\n\nBuild succeeded (check pipeline).\n\n- openstack-tox-docs http://logs.openstack.org/12/648212/3/check/openstack-tox-docs/ccbcaec/html/ : SUCCESS in 3m 26s\n- openstack-tox-pep8 http://logs.openstack.org/12/648212/3/check/openstack-tox-pep8/426f661/ : SUCCESS in 3m 59s\n- cinderlib-tox-py27 http://logs.openstack.org/12/648212/3/check/cinderlib-tox-py27/90d3769/ : SUCCESS in 5m 30s\n- cinderlib-tox-py36 http://logs.openstack.org/12/648212/3/check/cinderlib-tox-py36/df3ea00/ : SUCCESS in 6m 38s\n- cinderlib-tox-py37 http://logs.openstack.org/12/648212/3/check/cinderlib-tox-py37/00afafb/ : SUCCESS in 8m 40s\n- cinderlib-lvm-functional http://logs.openstack.org/12/648212/3/check/cinderlib-lvm-functional/5ee6777/ : SUCCESS in 9m 50s\n- cinderlib-ceph-functional http://logs.openstack.org/12/648212/3/check/cinderlib-ceph-functional/60df033/ : SUCCESS in 8m 39s","accounts_in_message":[],"_revision_number":3},{"id":"e59afb147c96099e7ad2cd439694a63648315f29","author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"date":"2019-08-22 22:47:59.000000000","message":"Patch Set 3: Code-Review+2\n\nLooks reasonable to me.","accounts_in_message":[],"_revision_number":3},{"id":"df59330c554f80f486a8d91623e4835040a8c2f1","author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"date":"2019-08-28 13:50:38.000000000","message":"Patch Set 3: Code-Review+2 Workflow+1\n\nLGTM.  Thanks for the detailed commit message explaining what\u0027s going on in the patch and what the limitations are (no group support).","accounts_in_message":[],"_revision_number":3},{"id":"c227a0390db7e113301f9aefa9f35bf4fc2cf783","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-08-28 13:51:12.000000000","message":"Patch Set 3: -Verified\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":3},{"id":"57fe14238df0000da5f4a7aecda779ea62107025","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-08-28 16:12:34.000000000","message":"Patch Set 3: Verified+2\n\nBuild succeeded (gate pipeline).\n\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/99645ee768284269ba3b89fa00e695b2 : SUCCESS in 8m 54s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/5aba7638534f45e793a67e815fa88c5b : SUCCESS in 5m 02s\n- cinderlib-tox-py27 https://zuul.opendev.org/t/openstack/build/c14c652ab2584e85b5643eaf28c6b3b4 : SUCCESS in 7m 01s\n- cinderlib-tox-py36 https://zuul.opendev.org/t/openstack/build/af8efa70d7d64cc991387da9f7ce3330 : SUCCESS in 7m 08s\n- cinderlib-tox-py37 https://zuul.opendev.org/t/openstack/build/54aa592f1a2248ac85cd0083e4c634f2 : SUCCESS in 6m 20s\n- cinderlib-lvm-functional https://zuul.opendev.org/t/openstack/build/fbb323d0de7549cc929eaec7fb5b2c97 : SUCCESS in 8m 41s\n- cinderlib-ceph-functional https://zuul.opendev.org/t/openstack/build/49d4805c3d4e4e10bd97e5ba2a0b7652 : SUCCESS in 9m 02s","accounts_in_message":[],"_revision_number":3},{"id":"9b746858aff12e0db7caab505ede12c6f00b60e0","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-08-28 16:12:35.000000000","message":"Change has been successfully merged by Zuul","accounts_in_message":[],"_revision_number":3},{"id":"4ac2b347993d81da0bf47fb52234677daa800416","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-08-28 16:15:25.000000000","message":"Patch Set 3:\n\nBuild succeeded (promote pipeline).\n\n- promote-openstack-tox-docs https://zuul.opendev.org/t/openstack/build/ef96a5ef8ae842e7bf844419f3f20958 : SUCCESS in 2m 08s","accounts_in_message":[],"_revision_number":3}],"current_revision_number":3,"current_revision":"385e6f4a1ec5c382885321b3db9d80f26f66c117","revisions":{"13f98cb4921db2c0174515397b1ca711c005ff7d":{"kind":"REWORK","_number":1,"created":"2019-03-27 18:52:45.000000000","uploader":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"ref":"refs/changes/12/648212/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/cinderlib","ref":"refs/changes/12/648212/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/cinderlib refs/changes/12/648212/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/cinderlib refs/changes/12/648212/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/cinderlib refs/changes/12/648212/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/cinderlib refs/changes/12/648212/1"}}},"commit":{"parents":[{"commit":"bcf071097e4c901b902465a1b64fd4a0264570b7","subject":"Replace openstack.org git:// URLs with https://","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/cinderlib/commit/bcf071097e4c901b902465a1b64fd4a0264570b7"}]}],"author":{"name":"Gorka Eguileor","email":"geguileo@redhat.com","date":"2019-03-27 18:46:05.000000000","tz":60},"committer":{"name":"Gorka Eguileor","email":"geguileo@redhat.com","date":"2019-03-27 18:47:10.000000000","tz":60},"subject":"Add support for IBM SVC","message":"Add support for IBM SVC\n\nWhen initializing IBM SVC with the memory persistence we get an exception:\n\n  return IMPL.volume_get_all_by_host(context, host, filters\u003dfilters)\n  AttributeError: \u0027DB\u0027 object has no attribute \u0027volume_get_all_by_host\u0027\n\nThe issue is caused by the SVC driver accessing the database directly,\nwhich is not considered good practice in Cinder nowadays.\n\nThe problem with drivers using the DB directly is that cinderlib doesn\u0027t\nrequire a DB, it can work storing everything in memory. To facilitate\nstorage of the resources\u0027 metadata cinderlib has its own persistence\nplugin mechanism, and has some ad-hoc \"workarounds\" in the DB class for\ndrivers that access the DB directly.\n\nThe IBM driver has the following DB dependencies:\n\n- volume_get_all_by_host when using objects.VolumeList.get_all_by_host\n\n- volume_type_get when using objects.VolumeType.get_by_name_or_id\n\n- volume_type_get_by_name when using\n  objects.VolumeType.get_by_name_or_id\n\n- volume_get directly called by get_by_id when using\n  objects.Volume.get_by_id\n\n- _group_type_get_full directly called by get_by_id when using\n  objects.GroupType.get_by_id\n\nIn cinderlib we don\u0027t currently support groups or consistency groups, so\nwe don\u0027t need to implement `_group_type_get_full` and we have already\nimplemented workaround for methods `volume_get` and `volume_type_get`,\nso this patch implements the remaining 2 methods volume_get_all_by_host\nand volume_type_get_by_name in the DB class.\n\nCloses-Bug: #1821898\nChange-Id: I94b4864c5823976f4a9cac2e40943b74aca4066e\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/cinderlib/commit/13f98cb4921db2c0174515397b1ca711c005ff7d"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/cinderlib/commit/13f98cb4921db2c0174515397b1ca711c005ff7d"}]},"branch":"refs/heads/master"},"163af427417eead7e64619d682dcc1669d6c12da":{"kind":"REWORK","_number":2,"created":"2019-03-28 14:25:29.000000000","uploader":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"ref":"refs/changes/12/648212/2","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/cinderlib","ref":"refs/changes/12/648212/2","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/cinderlib refs/changes/12/648212/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/cinderlib refs/changes/12/648212/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/cinderlib refs/changes/12/648212/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/cinderlib refs/changes/12/648212/2"}}},"commit":{"parents":[{"commit":"bcf071097e4c901b902465a1b64fd4a0264570b7","subject":"Replace openstack.org git:// URLs with https://","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/cinderlib/commit/bcf071097e4c901b902465a1b64fd4a0264570b7"}]}],"author":{"name":"Gorka Eguileor","email":"geguileo@redhat.com","date":"2019-03-27 18:46:05.000000000","tz":60},"committer":{"name":"Gorka Eguileor","email":"geguileo@redhat.com","date":"2019-03-28 14:15:26.000000000","tz":60},"subject":"Add support for IBM SVC","message":"Add support for IBM SVC\n\nWhen initializing IBM SVC with the memory persistence we get an exception:\n\n  return IMPL.volume_get_all_by_host(context, host, filters\u003dfilters)\n  AttributeError: \u0027DB\u0027 object has no attribute \u0027volume_get_all_by_host\u0027\n\nThe issue is caused by the SVC driver accessing the database directly,\nwhich is not considered good practice in Cinder nowadays.\n\nThe problem with drivers using the DB directly is that cinderlib doesn\u0027t\nrequire a DB, it can work storing everything in memory. To facilitate\nstorage of the resources\u0027 metadata cinderlib has its own persistence\nplugin mechanism, and has some ad-hoc \"workarounds\" in the DB class for\ndrivers that access the DB directly.\n\nThe IBM driver has the following DB dependencies:\n\n- volume_get_all_by_host when using objects.VolumeList.get_all_by_host\n\n- volume_type_get when using objects.VolumeType.get_by_name_or_id\n\n- volume_type_get_by_name when using\n  objects.VolumeType.get_by_name_or_id\n\n- volume_get directly called by get_by_id when using\n  objects.Volume.get_by_id\n\n- _group_type_get_full directly called by get_by_id when using\n  objects.GroupType.get_by_id\n\n- volume_admin_metadata_get direct call\n\n- volume_admin_metadata_update direct call\n\n- volume_admin_metadata_delete direct call\n\nIn cinderlib we don\u0027t currently support groups or consistency groups, so\nwe don\u0027t need to implement `_group_type_get_full` and we have already\nimplemented workaround for methods `volume_get` and `volume_type_get`,\nso this patch implements the remaining 5 methods volume_get_all_by_host,\nvolume_type_get_by_name, volume_admin_metadata_get,\nvolume_admin_metadata_update, and volume_admin_metadata_delete in the DB\nclass.\n\nCloses-Bug: #1821898\nChange-Id: I94b4864c5823976f4a9cac2e40943b74aca4066e\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/cinderlib/commit/163af427417eead7e64619d682dcc1669d6c12da"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/cinderlib/commit/163af427417eead7e64619d682dcc1669d6c12da"}]},"branch":"refs/heads/master"},"385e6f4a1ec5c382885321b3db9d80f26f66c117":{"kind":"REWORK","_number":3,"created":"2019-07-31 19:13:31.000000000","uploader":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"ref":"refs/changes/12/648212/3","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/cinderlib","ref":"refs/changes/12/648212/3","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/cinderlib refs/changes/12/648212/3 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/cinderlib refs/changes/12/648212/3 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/cinderlib refs/changes/12/648212/3 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/cinderlib refs/changes/12/648212/3"}}},"commit":{"parents":[{"commit":"d6bec909e0a4ab20ec8448f9521485f796d08370","subject":"Fix: Snapshot creation with volume types","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/cinderlib/commit/d6bec909e0a4ab20ec8448f9521485f796d08370"}]}],"author":{"name":"Gorka Eguileor","email":"geguileo@redhat.com","date":"2019-03-27 18:46:05.000000000","tz":60},"committer":{"name":"Gorka Eguileor","email":"geguileo@redhat.com","date":"2019-07-31 19:13:19.000000000","tz":120},"subject":"Add support for IBM SVC","message":"Add support for IBM SVC\n\nWhen initializing IBM SVC with the memory persistence we get an exception:\n\n  return IMPL.volume_get_all_by_host(context, host, filters\u003dfilters)\n  AttributeError: \u0027DB\u0027 object has no attribute \u0027volume_get_all_by_host\u0027\n\nThe issue is caused by the SVC driver accessing the database directly,\nwhich is not considered good practice in Cinder nowadays.\n\nThe problem with drivers using the DB directly is that cinderlib doesn\u0027t\nrequire a DB, it can work storing everything in memory. To facilitate\nstorage of the resources\u0027 metadata cinderlib has its own persistence\nplugin mechanism, and has some ad-hoc \"workarounds\" in the DB class for\ndrivers that access the DB directly.\n\nThe IBM driver has the following DB dependencies:\n\n- volume_get_all_by_host when using objects.VolumeList.get_all_by_host\n\n- volume_type_get when using objects.VolumeType.get_by_name_or_id\n\n- volume_type_get_by_name when using\n  objects.VolumeType.get_by_name_or_id\n\n- volume_get directly called by get_by_id when using\n  objects.Volume.get_by_id\n\n- _group_type_get_full directly called by get_by_id when using\n  objects.GroupType.get_by_id\n\n- volume_admin_metadata_get direct call\n\n- volume_admin_metadata_update direct call\n\n- volume_admin_metadata_delete direct call\n\nIn cinderlib we don\u0027t currently support groups or consistency groups, so\nwe don\u0027t need to implement `_group_type_get_full` and we have already\nimplemented workaround for methods `volume_get` and `volume_type_get`,\nso this patch implements the remaining 5 methods volume_get_all_by_host,\nvolume_type_get_by_name, volume_admin_metadata_get,\nvolume_admin_metadata_update, and volume_admin_metadata_delete in the DB\nclass.\n\nCloses-Bug: #1821898\nChange-Id: I94b4864c5823976f4a9cac2e40943b74aca4066e\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/cinderlib/commit/385e6f4a1ec5c382885321b3db9d80f26f66c117"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/cinderlib/commit/385e6f4a1ec5c382885321b3db9d80f26f66c117"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[],"submit_requirements":[]}
