Merge "Add dots at first line in docstring"
This commit is contained in:
commit
e623d95f2d
@ -10,7 +10,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""Kolla exception subclasses"""
|
"""Kolla exception subclasses."""
|
||||||
|
|
||||||
|
|
||||||
class KollaDirNotFoundException(Exception):
|
class KollaDirNotFoundException(Exception):
|
||||||
|
@ -648,7 +648,7 @@ class KollaWorker(object):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def setup_working_dir(self):
|
def setup_working_dir(self):
|
||||||
"""Creates a working directory for use while building"""
|
"""Creates a working directory for use while building."""
|
||||||
if self.conf.work_dir:
|
if self.conf.work_dir:
|
||||||
self.working_dir = os.path.join(self.conf.work_dir, 'docker')
|
self.working_dir = os.path.join(self.conf.work_dir, 'docker')
|
||||||
else:
|
else:
|
||||||
@ -676,7 +676,7 @@ class KollaWorker(object):
|
|||||||
return filters
|
return filters
|
||||||
|
|
||||||
def _get_methods(self):
|
def _get_methods(self):
|
||||||
"""Mapping of available Jinja methods
|
"""Mapping of available Jinja methods.
|
||||||
|
|
||||||
return a dictionary that maps available function names and their
|
return a dictionary that maps available function names and their
|
||||||
corresponding python methods to make them available in jinja templates
|
corresponding python methods to make them available in jinja templates
|
||||||
@ -765,7 +765,7 @@ class KollaWorker(object):
|
|||||||
return {tpl_name: tpl_content}
|
return {tpl_name: tpl_content}
|
||||||
|
|
||||||
def find_dockerfiles(self):
|
def find_dockerfiles(self):
|
||||||
"""Recursive search for Dockerfiles in the working directory"""
|
"""Recursive search for Dockerfiles in the working directory."""
|
||||||
self.docker_build_paths = list()
|
self.docker_build_paths = list()
|
||||||
path = self.working_dir
|
path = self.working_dir
|
||||||
filename = 'Dockerfile.j2'
|
filename = 'Dockerfile.j2'
|
||||||
@ -778,12 +778,12 @@ class KollaWorker(object):
|
|||||||
LOG.debug('Found %d Dockerfiles', len(self.docker_build_paths))
|
LOG.debug('Found %d Dockerfiles', len(self.docker_build_paths))
|
||||||
|
|
||||||
def cleanup(self):
|
def cleanup(self):
|
||||||
"""Remove temp files"""
|
"""Remove temp files."""
|
||||||
if not self.conf.work_dir:
|
if not self.conf.work_dir:
|
||||||
shutil.rmtree(self.temp_dir)
|
shutil.rmtree(self.temp_dir)
|
||||||
|
|
||||||
def filter_images(self):
|
def filter_images(self):
|
||||||
"""Filter which images to build"""
|
"""Filter which images to build."""
|
||||||
filter_ = list()
|
filter_ = list()
|
||||||
|
|
||||||
if self.regex:
|
if self.regex:
|
||||||
@ -823,7 +823,7 @@ class KollaWorker(object):
|
|||||||
image.status = STATUS_MATCHED
|
image.status = STATUS_MATCHED
|
||||||
|
|
||||||
def summary(self):
|
def summary(self):
|
||||||
"""Walk the dictionary of images statuses and print results"""
|
"""Walk the dictionary of images statuses and print results."""
|
||||||
# For debug we print the logs again if the image error'd. This is to
|
# For debug we print the logs again if the image error'd. This is to
|
||||||
# help us debug and it will be extra helpful in the gate.
|
# help us debug and it will be extra helpful in the gate.
|
||||||
for image in self.images:
|
for image in self.images:
|
||||||
@ -1032,7 +1032,7 @@ class KollaWorker(object):
|
|||||||
pprint.pprint(ancestry)
|
pprint.pprint(ancestry)
|
||||||
|
|
||||||
def find_parents(self):
|
def find_parents(self):
|
||||||
"""Associate all images with parents and children"""
|
"""Associate all images with parents and children."""
|
||||||
sort_images = dict()
|
sort_images = dict()
|
||||||
|
|
||||||
for image in self.images:
|
for image in self.images:
|
||||||
@ -1045,7 +1045,7 @@ class KollaWorker(object):
|
|||||||
image.parent = parent
|
image.parent = parent
|
||||||
|
|
||||||
def build_queue(self, push_queue):
|
def build_queue(self, push_queue):
|
||||||
"""Organizes Queue list
|
"""Organizes Queue list.
|
||||||
|
|
||||||
Return a list of Queues that have been organized into a hierarchy
|
Return a list of Queues that have been organized into a hierarchy
|
||||||
based on dependencies
|
based on dependencies
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
|
|
||||||
def debian_package_install(packages):
|
def debian_package_install(packages):
|
||||||
"""Jinja utility method for building debian-based package install command
|
"""Jinja utility method for building debian-based package install command.
|
||||||
|
|
||||||
apt-get is not capable of installing .deb files from a URL and the
|
apt-get is not capable of installing .deb files from a URL and the
|
||||||
template logic to construct a series of steps to install regular packages
|
template logic to construct a series of steps to install regular packages
|
||||||
|
Loading…
x
Reference in New Issue
Block a user