This file is indexed.

/usr/bin/python2-doc-tools-update-cli-reference is in python-openstack-doc-tools 1.6.0-2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

if [[ $# -ne 1 ]]; then
    echo "usage: $0 PROJECT"
    echo
    echo "PROJECT = something like nova, neutron or glance"
    exit 1
fi

project=$1

# checks command exist or not
function does_exist {
    which $@ > /dev/null 2>&1
    local status=$?
    if [[ $status -ne 0 ]]; then
        echo "error: $1 not installed"
        exit 1
    fi
}

does_exist virtualenv
does_exist pip
does_exist git

if [[ ! -e $HOME/.gitconfig ]]; then
    echo "note: ~/.gitconfig does not exist"
fi

if [[ ! -e .venv ]]; then
    virtualenv -p python2.7 .venv
fi

source .venv/bin/activate

pip install --upgrade openstack-doc-tools
pip install --upgrade pbr

# Cliff can optionally output HTML - if cliff-tablib is installed.
pip install --upgrade cliff-tablib

# OSProfiler is an OpenStack cross-project profiling library.
pip install --upgrade osprofiler

if [[ $project == 'aodh' ]]; then
    pip install --upgrade ${project}client
elif [[ $project == 'gnocchi' ]]; then
    pip install --upgrade ${project}client
else
    pip install --upgrade python-${project}client
fi

rm -rf output
mkdir output

# Work around until python-cinderclient use 3.latest as a default
OS_VOLUME_API_VERSION=3.latest \
openstack-auto-commands --output-dir output $project

if [[ ! -e "python-${project}client" ]]; then
    git clone git://git.openstack.org/openstack/python-${project}client
fi

cd python-${project}client

( git remote -v  | grep -q gerrit ) || git review -s

git checkout master
git pull
branch=cli-reference
git branch --list $branch && git branch -D $branch
git checkout -b $branch
mv ../output/${project}.rst "doc/source/cli/details.rst"
rm -rf ../output
version=$($project --version 2>&1)
version=${version##*\)}
git commit -a -m "[cli-ref] Update python-${project}client to ${version##* }"