)]}'
{"doc/source/plugins.rst":[{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"8b2d3100cea236a1f403531279e8eda47c8bee68","unresolved":false,"context_lines":[{"line_number":21,"context_line":"An external git repository that includes a ``devstack/`` top level"},{"line_number":22,"context_line":"directory. Inside this directory there can be 3 files."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"- ``plugin-deps`` - a file containing plugin dependencies."},{"line_number":25,"context_line":"  This allows the plugin to enable other plugins in tree of the"},{"line_number":26,"context_line":"  plugin. This file will be sourced during fetching all plugins."},{"line_number":27,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"7a8ec9b2_78ab8575","line":24,"range":{"start_line":24,"start_character":20,"end_line":24,"end_character":57},"updated":"2016-09-19 12:36:21.000000000","message":"It\u0027s not just a list of dependencies but enable_plugin function calls.","commit_id":"4a572a48c2aa1c09bf41465774bcbe04972e5dd8"}],"functions-common":[{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"8b2d3100cea236a1f403531279e8eda47c8bee68","unresolved":false,"context_lines":[{"line_number":1781,"context_line":"    local url\u003d$2"},{"line_number":1782,"context_line":"    local branch\u003d${3:-master}"},{"line_number":1783,"context_line":"    local plugins\u003d\"${DEVSTACK_PLUGINS}\""},{"line_number":1784,"context_line":"    for plugin in ${plugins//,/ }; do"},{"line_number":1785,"context_line":"        if [ $plugin \u003d $name ] ; then"},{"line_number":1786,"context_line":"            # nothing to do, plugin already enabled"},{"line_number":1787,"context_line":"            return"},{"line_number":1788,"context_line":"        fi"},{"line_number":1789,"context_line":"    done"},{"line_number":1790,"context_line":"    DEVSTACK_PLUGINS+\u003d\",$name\""},{"line_number":1791,"context_line":"    GITREPO[$name]\u003d$url"},{"line_number":1792,"context_line":"    GITDIR[$name]\u003d$DEST/$name"},{"line_number":1793,"context_line":"    GITBRANCH[$name]\u003d$branch"}],"source_content_type":"application/x-shellscript","patch_set":8,"id":"7a8ec9b2_b506f6cb","line":1790,"range":{"start_line":1784,"start_character":0,"end_line":1790,"end_character":30},"updated":"2016-09-19 12:36:21.000000000","message":"I thin you can do simply like this:\n\nif [[ {${plugins//,/ } \u003d~ $name ]]; then\n  DEVSTACK_PLUGINS+\u003d\",$name\"\n  GITREPO[$name]\u003d$url\n  GITDIR[$name]\u003d$DEST/$name\n  GITBRANCH[$name]\u003d$branch\nfi","commit_id":"4a572a48c2aa1c09bf41465774bcbe04972e5dd8"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"801fc84a8a77082a8adb834478af1a775b7d24f7","unresolved":false,"context_lines":[{"line_number":1781,"context_line":"    local url\u003d$2"},{"line_number":1782,"context_line":"    local branch\u003d${3:-master}"},{"line_number":1783,"context_line":"    local plugins\u003d\"${DEVSTACK_PLUGINS}\""},{"line_number":1784,"context_line":"    for plugin in ${plugins//,/ }; do"},{"line_number":1785,"context_line":"        if [ $plugin \u003d $name ] ; then"},{"line_number":1786,"context_line":"            # nothing to do, plugin already enabled"},{"line_number":1787,"context_line":"            return"},{"line_number":1788,"context_line":"        fi"},{"line_number":1789,"context_line":"    done"},{"line_number":1790,"context_line":"    DEVSTACK_PLUGINS+\u003d\",$name\""},{"line_number":1791,"context_line":"    GITREPO[$name]\u003d$url"},{"line_number":1792,"context_line":"    GITDIR[$name]\u003d$DEST/$name"},{"line_number":1793,"context_line":"    GITBRANCH[$name]\u003d$branch"}],"source_content_type":"application/x-shellscript","patch_set":8,"id":"7a8ec9b2_30a0699f","line":1790,"range":{"start_line":1784,"start_character":0,"end_line":1790,"end_character":30},"in_reply_to":"7a8ec9b2_2495f687","updated":"2016-09-21 04:29:42.000000000","message":"you just have to put put a \u0027!\u0027 operator before the condition and it would work.","commit_id":"4a572a48c2aa1c09bf41465774bcbe04972e5dd8"},{"author":{"_account_id":12038,"name":"Vitaly Gridnev","email":"gridnevvvit@gmail.com","username":"vgridnev"},"change_message_id":"4827f7630210c645255d569a5efdfc40aa674db8","unresolved":false,"context_lines":[{"line_number":1781,"context_line":"    local url\u003d$2"},{"line_number":1782,"context_line":"    local branch\u003d${3:-master}"},{"line_number":1783,"context_line":"    local plugins\u003d\"${DEVSTACK_PLUGINS}\""},{"line_number":1784,"context_line":"    for plugin in ${plugins//,/ }; do"},{"line_number":1785,"context_line":"        if [ $plugin \u003d $name ] ; then"},{"line_number":1786,"context_line":"            # nothing to do, plugin already enabled"},{"line_number":1787,"context_line":"            return"},{"line_number":1788,"context_line":"        fi"},{"line_number":1789,"context_line":"    done"},{"line_number":1790,"context_line":"    DEVSTACK_PLUGINS+\u003d\",$name\""},{"line_number":1791,"context_line":"    GITREPO[$name]\u003d$url"},{"line_number":1792,"context_line":"    GITDIR[$name]\u003d$DEST/$name"},{"line_number":1793,"context_line":"    GITBRANCH[$name]\u003d$branch"}],"source_content_type":"application/x-shellscript","patch_set":8,"id":"7a8ec9b2_2495f687","line":1790,"range":{"start_line":1784,"start_character":0,"end_line":1790,"end_character":30},"in_reply_to":"7a8ec9b2_b506f6cb","updated":"2016-09-19 13:18:29.000000000","message":"This approach doesn\u0027t work, because it counts every substring.\nYou can spend more time for testing that.","commit_id":"4a572a48c2aa1c09bf41465774bcbe04972e5dd8"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"8b2d3100cea236a1f403531279e8eda47c8bee68","unresolved":false,"context_lines":[{"line_number":1800,"context_line":"function fetch_plugin {"},{"line_number":1801,"context_line":"    local plugin\u003d$1"},{"line_number":1802,"context_line":"    local plugins\u003d${FETCHED_PLUGINS}"},{"line_number":1803,"context_line":"    for pattern in ${plugins//,/ }; do"},{"line_number":1804,"context_line":"        if [ $pattern \u003d $plugin ]; then"},{"line_number":1805,"context_line":"            # nothing to do, plugin already fetched"},{"line_number":1806,"context_line":"            return"},{"line_number":1807,"context_line":"        fi"},{"line_number":1808,"context_line":"    done"},{"line_number":1809,"context_line":"    echo \"Fetching plugin $plugin\""},{"line_number":1810,"context_line":"    FETCHED_PLUGINS+\u003d\",$plugin\""},{"line_number":1811,"context_line":"    git_clone_by_name $plugin"},{"line_number":1812,"context_line":"    local dir\u003d${GITDIR[$plugin]}"}],"source_content_type":"application/x-shellscript","patch_set":8,"id":"7a8ec9b2_15016a6a","line":1809,"range":{"start_line":1803,"start_character":0,"end_line":1809,"end_character":34},"updated":"2016-09-19 12:36:21.000000000","message":"same here","commit_id":"4a572a48c2aa1c09bf41465774bcbe04972e5dd8"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"8b2d3100cea236a1f403531279e8eda47c8bee68","unresolved":false,"context_lines":[{"line_number":1812,"context_line":"    local dir\u003d${GITDIR[$plugin]}"},{"line_number":1813,"context_line":"    # source any known deps"},{"line_number":1814,"context_line":"    if [[ -f $dir/devstack/plugin-deps ]]; then"},{"line_number":1815,"context_line":"        source $dir/devstack/plugin-deps"},{"line_number":1816,"context_line":"    fi"},{"line_number":1817,"context_line":"}"},{"line_number":1818,"context_line":""}],"source_content_type":"application/x-shellscript","patch_set":8,"id":"7a8ec9b2_38049d48","line":1815,"range":{"start_line":1815,"start_character":8,"end_line":1815,"end_character":40},"updated":"2016-09-19 12:36:21.000000000","message":"Why not enable and fetch the deps here(by checking DEVSTACK_PLUGINS, FETCHED_PLUGINS that they are not done already?). This would help you avoid the while loop below.\n\nAlso  I think order of plugins are important in DEVSTACK_PLUGINS(by just appending to it would not give you that). So if it\u0027s a dependent plugin it should be configured/installed before the plugin that depends on it.","commit_id":"4a572a48c2aa1c09bf41465774bcbe04972e5dd8"},{"author":{"_account_id":12038,"name":"Vitaly Gridnev","email":"gridnevvvit@gmail.com","username":"vgridnev"},"change_message_id":"4827f7630210c645255d569a5efdfc40aa674db8","unresolved":false,"context_lines":[{"line_number":1812,"context_line":"    local dir\u003d${GITDIR[$plugin]}"},{"line_number":1813,"context_line":"    # source any known deps"},{"line_number":1814,"context_line":"    if [[ -f $dir/devstack/plugin-deps ]]; then"},{"line_number":1815,"context_line":"        source $dir/devstack/plugin-deps"},{"line_number":1816,"context_line":"    fi"},{"line_number":1817,"context_line":"}"},{"line_number":1818,"context_line":""}],"source_content_type":"application/x-shellscript","patch_set":8,"id":"7a8ec9b2_c7a454bb","line":1815,"range":{"start_line":1815,"start_character":8,"end_line":1815,"end_character":40},"in_reply_to":"7a8ec9b2_38049d48","updated":"2016-09-19 13:18:29.000000000","message":"Can you explain \"Why not enable and fetch the deps here\" ? Are you suggesting to include fetching plugin inside of plugin-deps? That probably makes sense.","commit_id":"4a572a48c2aa1c09bf41465774bcbe04972e5dd8"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"801fc84a8a77082a8adb834478af1a775b7d24f7","unresolved":false,"context_lines":[{"line_number":1812,"context_line":"    local dir\u003d${GITDIR[$plugin]}"},{"line_number":1813,"context_line":"    # source any known deps"},{"line_number":1814,"context_line":"    if [[ -f $dir/devstack/plugin-deps ]]; then"},{"line_number":1815,"context_line":"        source $dir/devstack/plugin-deps"},{"line_number":1816,"context_line":"    fi"},{"line_number":1817,"context_line":"}"},{"line_number":1818,"context_line":""}],"source_content_type":"application/x-shellscript","patch_set":8,"id":"7a8ec9b2_d0eae5ab","line":1815,"range":{"start_line":1815,"start_character":8,"end_line":1815,"end_character":40},"in_reply_to":"7a8ec9b2_c7a454bb","updated":"2016-09-21 04:29:42.000000000","message":"I\u0027m suggesting that you can have a separate function ex. add_dep_plugin that is specified in \u0027plugin-deps\u0027 that would in turn enable and fetch the dep plugins. Also, you have to make sure that ordering is adhered to while enabling the plugins.","commit_id":"4a572a48c2aa1c09bf41465774bcbe04972e5dd8"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"8bb19ebe61a9cefb761baf0a497e97864a16bd46","unresolved":false,"context_lines":[{"line_number":1777,"context_line":"# ``url`` is a git url"},{"line_number":1778,"context_line":"# ``branch`` is a gitref. If it\u0027s not set, defaults to master"},{"line_number":1779,"context_line":"# ``order`` (0 be default) is a flag that describes a strategy how plugin"},{"line_number":1780,"context_line":"# should be appended to DEVSTACK_PLUGINS variable."},{"line_number":1781,"context_line":"function enable_plugin {"},{"line_number":1782,"context_line":"    local name\u003d$1"},{"line_number":1783,"context_line":"    local url\u003d$2"}],"source_content_type":"application/x-shellscript","patch_set":14,"id":"1a95cdbc_4897eeeb","line":1780,"updated":"2016-10-06 22:49:31.000000000","message":"this isn\u0027t particularly helpful.  it should say something like \"0 appends at the end, !0 appends at the start\"","commit_id":"18f06d7456eca68c8e7f5e19b5a6518fe0eefd8b"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"8bb19ebe61a9cefb761baf0a497e97864a16bd46","unresolved":false,"context_lines":[{"line_number":1782,"context_line":"    local name\u003d$1"},{"line_number":1783,"context_line":"    local url\u003d$2"},{"line_number":1784,"context_line":"    local branch\u003d${3:-master}"},{"line_number":1785,"context_line":"    local order\u003d${4:-0}"},{"line_number":1786,"context_line":"    local plugins\u003d\"${DEVSTACK_PLUGINS}\""},{"line_number":1787,"context_line":"    if [[ $plugins \u003d~ ,$name ]]; then"},{"line_number":1788,"context_line":"        return"}],"source_content_type":"application/x-shellscript","patch_set":14,"id":"1a95cdbc_c88bfec1","line":1785,"updated":"2016-10-06 22:49:31.000000000","message":"So unfortunately I don\u0027t think you can actually do this because $3 is an optional argument, so you can\u0027t tell the difference between this being the branch/git ref or the \"order\".","commit_id":"18f06d7456eca68c8e7f5e19b5a6518fe0eefd8b"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"8bb19ebe61a9cefb761baf0a497e97864a16bd46","unresolved":false,"context_lines":[{"line_number":1805,"context_line":"function fetch_dependency_plugin {"},{"line_number":1806,"context_line":"    local plugin\u003d$1"},{"line_number":1807,"context_line":"    local url\u003d$2"},{"line_number":1808,"context_line":"    local branch\u003d${3:-master}"},{"line_number":1809,"context_line":"    enable_plugin $plugin $url $branch 1"},{"line_number":1810,"context_line":"    fetch_plugin $plugin"},{"line_number":1811,"context_line":"}"}],"source_content_type":"application/x-shellscript","patch_set":14,"id":"1a95cdbc_a8b9527b","line":1808,"updated":"2016-10-06 22:49:31.000000000","message":"how does one override the branch/git ref of the dependencies?","commit_id":"18f06d7456eca68c8e7f5e19b5a6518fe0eefd8b"}]}
