-{% endblock %}
\ No newline at end of file
diff --git a/conductor/doc/source/_theme/theme.conf b/conductor/doc/source/_theme/theme.conf
deleted file mode 100644
index 1cc40044..00000000
--- a/conductor/doc/source/_theme/theme.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-[theme]
-inherit = basic
-stylesheet = nature.css
-pygments_style = tango
diff --git a/conductor/doc/source/conf.py b/conductor/doc/source/conf.py
deleted file mode 100644
index e9b38f91..00000000
--- a/conductor/doc/source/conf.py
+++ /dev/null
@@ -1,242 +0,0 @@
-
-# -*- coding: utf-8 -*-
-# Copyright (c) 2010 OpenStack Foundation.
-#
-# 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.
-
-#
-# Conductor documentation build configuration file, created by
-# sphinx-quickstart on Tue February 28 13:50:15 2013.
-#
-# This file is execfile()'d with the current directory set to its containing
-# dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import os
-import sys
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path = [os.path.abspath('../../conductor'),
- os.path.abspath('../..'),
- os.path.abspath('../../bin')
- ] + sys.path
-
-# -- General configuration ---------------------------------------------------
-
-# Add any Sphinx extension module names here, as strings. They can be
-# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.coverage',
- 'sphinx.ext.ifconfig',
- 'sphinx.ext.intersphinx',
- 'sphinx.ext.pngmath',
- 'sphinx.ext.graphviz']
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = []
-if os.getenv('HUDSON_PUBLISH_DOCS'):
- templates_path = ['_ga', '_templates']
-else:
- templates_path = ['_templates']
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The encoding of source files.
-#source_encoding = 'utf-8'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = u'Conductor'
-copyright = u'2013, Mirantis, Inc.'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-from conductor.version import version_info as conductor_version
-# The full version, including alpha/beta/rc tags.
-release = conductor_version.version_string_with_vcs()
-# The short X.Y version.
-version = conductor_version.canonical_version_string()
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of documents that shouldn't be included in the build.
-#unused_docs = []
-
-# List of directories, relative to source directory, that shouldn't be searched
-# for source files.
-exclude_trees = ['api']
-
-# The reST default role (for this markup: `text`) to use for all documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-show_authors = True
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# A list of ignored prefixes for module index sorting.
-modindex_common_prefix = ['portas.']
-
-# -- Options for man page output --------------------------------------------
-
-# Grouping the document tree for man pages.
-# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
-
-man_pages = [
- ('man/conductor', 'conductor', u'Conductor Orchestrator',
- [u'Mirantis, Inc.'], 1)
-]
-
-
-# -- Options for HTML output -------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. Major themes that come with
-# Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme_path = ["."]
-html_theme = '_theme'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further. For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = ['_theme']
-
-# The name for this set of Sphinx documents. If None, it defaults to
-# " v documentation".
-#html_title = None
-
-# A shorter title for the navigation bar. Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
-git_cmd = "git log --pretty=format:'%ad, commit %h' --date=local -n1"
-html_last_updated_fmt = os.popen(git_cmd).read()
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-html_use_modindex = False
-
-# If false, no index is generated.
-html_use_index = False
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a tag referring to it. The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = ''
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'conductordoc'
-
-
-# -- Options for LaTeX output ------------------------------------------------
-
-# The paper size ('letter' or 'a4').
-#latex_paper_size = 'letter'
-
-# The font size ('10pt', '11pt' or '12pt').
-#latex_font_size = '10pt'
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author,
-# documentclass [howto/manual]).
-latex_documents = [
- ('index', 'Conductor.tex', u'Conductor Documentation',
- u'Keero Team', 'manual'),
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# Additional stuff for the LaTeX preamble.
-#latex_preamble = ''
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-#latex_use_modindex = True
-
-# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'python': ('http://docs.python.org/', None)}
diff --git a/conductor/doc/source/index.rst b/conductor/doc/source/index.rst
deleted file mode 100644
index ea1b15b3..00000000
--- a/conductor/doc/source/index.rst
+++ /dev/null
@@ -1,72 +0,0 @@
-..
- Copyright 2010 OpenStack Foundation
- All Rights Reserved.
-
- 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.
-
-=======================================================
-Welcome to Conductor, the Glazier orchestration engine!
-=======================================================
-
-Conductor is an Glazier orchestration engine that transforms object model sent by
-REST API service into a series of Heat and Glazier-Agent commands
-
-This document describes Conductor for contributors of the project.
-
-This documentation is generated by the Sphinx toolkit and lives in the source
-tree.
-
-Installation Guide
-==================
-Install
--------
-
- Check out sources to some directory (/glazier):
-
- smelikyan@work:~/git clone ssh://@gerrit.mirantis.com:29418/keero/keero.git
-
- Install Conductor:
-
- smelikyan@work:~/cd glazier/conductor && sudo python setup.py install
-
-Configure
----------
-
- Open configuration file for editing:
-
- smelikyan@work:~/cd glazier/conductor/etc && nano conductor.conf
-
- Configure according to you environment:
- [DEFAULT]
- log_file = logs/conductor.log
- debug=True
- verbose=True
-
- [heat]
- auth_url = http://localhost:5000/v2.0
-
- [rabbitmq]
- # this must be IP or hostname accessible from instances (VMs)
- host = YOUR.REAL.IP.HERE
- port = 5672
- virtual_host = glazier
- login = glazier
- password = glazier
-
-Run
-----
-
-Run Conductor and supply valid configuration file:
-
-smelikyan@work:~/cd glazier/conductor && conductor --config-file=./glazier/conductor/etc/conductor.conf
-
diff --git a/conductor/etc/conductor-paste.ini b/conductor/etc/conductor-paste.ini
deleted file mode 100644
index e69de29b..00000000
diff --git a/conductor/etc/conductor.conf b/conductor/etc/conductor.conf
deleted file mode 100644
index 60f3202f..00000000
--- a/conductor/etc/conductor.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-[DEFAULT]
-log_file = logs/conductor.log
-debug=True
-verbose=True
-
-[heat]
-auth_url = http://172.18.124.101:5000/v2.0
-
-[rabbitmq]
-host = 172.18.124.101
-port = 5672
-virtual_host = keero
-login = keero
-password = keero
\ No newline at end of file
diff --git a/conductor/logs/.gitignore b/conductor/logs/.gitignore
deleted file mode 100644
index 44c5ea8f..00000000
--- a/conductor/logs/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-# Ignore everything in this directory
-*
-# Except this file
-!.gitignore
\ No newline at end of file
diff --git a/conductor/openstack-common.conf b/conductor/openstack-common.conf
deleted file mode 100644
index 04377376..00000000
--- a/conductor/openstack-common.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-[DEFAULT]
-
-# The list of modules to copy from openstack-common
-modules=setup,wsgi,config,exception,gettextutils,importutils,jsonutils,log,xmlutils,sslutils,service,notifier,local,install_venv_common,version,timeutils,eventlet_backdoor,threadgroup,loopingcall,uuidutils
-
-# The base module to hold the copy of openstack.common
-base=conductor
\ No newline at end of file
diff --git a/conductor/run_tests.sh b/conductor/run_tests.sh
deleted file mode 100755
index ba2c9e01..00000000
--- a/conductor/run_tests.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-
-function usage {
- echo "Usage: $0 [OPTION]..."
- echo "Run python-portasclient's test suite(s)"
- echo ""
- echo " -p, --pep8 Just run pep8"
- echo " -h, --help Print this usage message"
- echo ""
- echo "This script is deprecated and currently retained for compatibility."
- echo 'You can run the full test suite for multiple environments by running "tox".'
- echo 'You can run tests for only python 2.7 by running "tox -e py27", or run only'
- echo 'the pep8 tests with "tox -e pep8".'
- exit
-}
-
-command -v tox > /dev/null 2>&1
-if [ $? -ne 0 ]; then
- echo 'This script requires "tox" to run.'
- echo 'You can install it with "pip install tox".'
- exit 1;
-fi
-
-just_pep8=0
-
-function process_option {
- case "$1" in
- -h|--help) usage;;
- -p|--pep8) let just_pep8=1;;
- esac
-}
-
-for arg in "$@"; do
- process_option $arg
-done
-
-if [ $just_pep8 -eq 1 ]; then
- tox -e pep8
- exit
-fi
-
-tox -e py27 $toxargs 2>&1 | tee run_tests.err.log || exit
-if [ ${PIPESTATUS[0]} -ne 0 ]; then
- exit ${PIPESTATUS[0]}
-fi
-
-if [ -z "$toxargs" ]; then
- tox -e pep8
-fi
diff --git a/conductor/setup.cfg b/conductor/setup.cfg
deleted file mode 100644
index 6e6f6554..00000000
--- a/conductor/setup.cfg
+++ /dev/null
@@ -1,33 +0,0 @@
-[build_sphinx]
-all_files = 1
-build-dir = doc/build
-source-dir = doc/source
-
-[egg_info]
-tag_build =
-tag_date = 0
-tag_svn_revision = 0
-
-[compile_catalog]
-directory = conductor/locale
-domain = conductor
-
-[update_catalog]
-domain = conductor
-output_dir = conductor/locale
-input_file = conductor/locale/conductor.pot
-
-[extract_messages]
-keywords = _ gettext ngettext l_ lazy_gettext
-mapping_file = babel.cfg
-output_file = conductor/locale/conductor.pot
-
-[nosetests]
-# NOTE(jkoelker) To run the test suite under nose install the following
-# coverage http://pypi.python.org/pypi/coverage
-# tissue http://pypi.python.org/pypi/tissue (pep8 checker)
-# openstack-nose https://github.com/jkoelker/openstack-nose
-verbosity=2
-cover-package = conductor
-cover-html = true
-cover-erase = true
\ No newline at end of file
diff --git a/conductor/setup.py b/conductor/setup.py
deleted file mode 100644
index fb9da8cd..00000000
--- a/conductor/setup.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/python
-# Copyright (c) 2010 OpenStack, LLC.
-#
-# 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.
-
-import setuptools
-
-from conductor.openstack.common import setup
-
-requires = setup.parse_requirements()
-depend_links = setup.parse_dependency_links()
-project = 'conductor'
-
-setuptools.setup(
- name=project,
- version=setup.get_version(project, '2013.1'),
- description='The Conductor is orchestration engine server',
- license='Apache License (2.0)',
- author='Mirantis, Inc.',
- author_email='openstack@lists.launchpad.net',
- url='http://conductor.openstack.org/',
- packages=setuptools.find_packages(exclude=['bin']),
- test_suite='nose.collector',
- cmdclass=setup.get_cmdclass(),
- include_package_data=True,
- install_requires=requires,
- dependency_links=depend_links,
- classifiers=[
- 'Development Status :: 4 - Beta',
- 'License :: OSI Approved :: Apache Software License',
- 'Operating System :: POSIX :: Linux',
- 'Programming Language :: Python :: 2.7',
- 'Environment :: No Input/Output (Daemon)',
- 'Environment :: OpenStack',
- ],
- scripts=['bin/conductor'],
- py_modules=[]
-)
diff --git a/conductor/test.json b/conductor/test.json
deleted file mode 100644
index c2815d50..00000000
--- a/conductor/test.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "name": "MyDataCenterx",
- "id": "adc6d143f9584d10808c7ef4d07e4802",
- "token": "MIINIQYJKoZIhvcNAQcCoIINEjCCDQ4CAQExCTAHBgUrDgMCGjCCC-oGCSqGSIb3DQEHAaCCC+sEggvneyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0wMy0yNlQwNjo0NTozNy4zOTI0MDAiLCAiZXhwaXJlcyI6ICIyMDEzLTAzLTI3VDA2OjQ1OjM3WiIsICJpZCI6ICJwbGFjZWhvbGRlciIsICJ0ZW5hbnQiOiB7ImRlc2NyaXB0aW9uIjogbnVsbCwgImVuYWJsZWQiOiB0cnVlLCAiaWQiOiAiMTZlYjc4Y2JiNjg4NDU5YzgzMDhkODk2NzhiY2VmNTAiLCAibmFtZSI6ICJhZG1pbiJ9fSwgInNlcnZpY2VDYXRhbG9nIjogW3siZW5kcG9pbnRzIjogW3siYWRtaW5VUkwiOiAiaHR0cDovLzE3Mi4xOC4xMjQuMTAxOjg3NzQvdjIvMTZlYjc4Y2JiNjg4NDU5YzgzMDhkODk2NzhiY2VmNTAiLCAicmVnaW9uIjogIlJlZ2lvbk9uZSIsICJpbnRlcm5hbFVSTCI6ICJodHRwOi8vMTcyLjE4LjEyNC4xMDE6ODc3NC92Mi8xNmViNzhjYmI2ODg0NTljODMwOGQ4OTY3OGJjZWY1MCIsICJpZCI6ICIwNGFlNjM2ZTdhYzc0NmJjYjExM2EwYzI5NDYzMzgzMCIsICJwdWJsaWNVUkwiOiAiaHR0cDovLzE3Mi4xOC4xMjQuMTAxOjg3NzQvdjIvMTZlYjc4Y2JiNjg4NDU5YzgzMDhkODk2NzhiY2VmNTAifV0sICJlbmRwb2ludHNfbGlua3MiOiBbXSwgInR5cGUiOiAiY29tcHV0ZSIsICJuYW1lIjogIm5vdmEifSwgeyJlbmRwb2ludHMiOiBbeyJhZG1pblVSTCI6ICJodHRwOi8vMTcyLjE4LjEyNC4xMDE6MzMzMyIsICJyZWdpb24iOiAiUmVnaW9uT25lIiwgImludGVybmFsVVJMIjogImh0dHA6Ly8xNzIuMTguMTI0LjEwMTozMzMzIiwgImlkIjogIjA5MmJkMjMyMGU5ZDRlYWY4ZDBlZjEzNDhjOGU3NTJjIiwgInB1YmxpY1VSTCI6ICJodHRwOi8vMTcyLjE4LjEyNC4xMDE6MzMzMyJ9XSwgImVuZHBvaW50c19saW5rcyI6IFtdLCAidHlwZSI6ICJzMyIsICJuYW1lIjogInMzIn0sIHsiZW5kcG9pbnRzIjogW3siYWRtaW5VUkwiOiAiaHR0cDovLzE3Mi4xOC4xMjQuMTAxOjkyOTIiLCAicmVnaW9uIjogIlJlZ2lvbk9uZSIsICJpbnRlcm5hbFVSTCI6ICJodHRwOi8vMTcyLjE4LjEyNC4xMDE6OTI5MiIsICJpZCI6ICI1ZWUzNjdjYzRhNjY0YmQzYTYyNmI2MjBkMzFhYzcwYyIsICJwdWJsaWNVUkwiOiAiaHR0cDovLzE3Mi4xOC4xMjQuMTAxOjkyOTIifV0sICJlbmRwb2ludHNfbGlua3MiOiBbXSwgInR5cGUiOiAiaW1hZ2UiLCAibmFtZSI6ICJnbGFuY2UifSwgeyJlbmRwb2ludHMiOiBbeyJhZG1pblVSTCI6ICJodHRwOi8vMTcyLjE4LjEyNC4xMDE6ODAwMC92MSIsICJyZWdpb24iOiAiUmVnaW9uT25lIiwgImludGVybmFsVVJMIjogImh0dHA6Ly8xNzIuMTguMTI0LjEwMTo4MDAwL3YxIiwgImlkIjogIjM3MzMzYmQwNDkxOTQzY2FiNWEyZGM5N2I5YWQzYjE2IiwgInB1YmxpY1VSTCI6ICJodHRwOi8vMTcyLjE4LjEyNC4xMDE6ODAwMC92MSJ9XSwgImVuZHBvaW50c19saW5rcyI6IFtdLCAidHlwZSI6ICJjbG91ZGZvcm1hdGlvbiIsICJuYW1lIjogImhlYXQtY2ZuIn0sIHsiZW5kcG9pbnRzIjogW3siYWRtaW5VUkwiOiAiaHR0cDovLzE3Mi4xOC4xMjQuMTAxOjg3NzYvdjEvMTZlYjc4Y2JiNjg4NDU5YzgzMDhkODk2NzhiY2VmNTAiLCAicmVnaW9uIjogIlJlZ2lvbk9uZSIsICJpbnRlcm5hbFVSTCI6ICJodHRwOi8vMTcyLjE4LjEyNC4xMDE6ODc3Ni92MS8xNmViNzhjYmI2ODg0NTljODMwOGQ4OTY3OGJjZWY1MCIsICJpZCI6ICI4NTgwYjMzOTAxZWU0YTUyOWI0OGMyMzU0ZjFiMWNhZSIsICJwdWJsaWNVUkwiOiAiaHR0cDovLzE3Mi4xOC4xMjQuMTAxOjg3NzYvdjEvMTZlYjc4Y2JiNjg4NDU5YzgzMDhkODk2NzhiY2VmNTAifV0sICJlbmRwb2ludHNfbGlua3MiOiBbXSwgInR5cGUiOiAidm9sdW1lIiwgIm5hbWUiOiAiY2luZGVyIn0sIHsiZW5kcG9pbnRzIjogW3siYWRtaW5VUkwiOiAiaHR0cDovLzE3Mi4xOC4xMjQuMTAxOjg3NzMvc2VydmljZXMvQWRtaW4iLCAicmVnaW9uIjogIlJlZ2lvbk9uZSIsICJpbnRlcm5hbFVSTCI6ICJodHRwOi8vMTcyLjE4LjEyNC4xMDE6ODc3My9zZXJ2aWNlcy9DbG91ZCIsICJpZCI6ICIwYTViOTIyNTNiZjg0NTAwYTA4OWY1N2VkMmYzZDY3NSIsICJwdWJsaWNVUkwiOiAiaHR0cDovLzE3Mi4xOC4xMjQuMTAxOjg3NzMvc2VydmljZXMvQ2xvdWQifV0sICJlbmRwb2ludHNfbGlua3MiOiBbXSwgInR5cGUiOiAiZWMyIiwgIm5hbWUiOiAiZWMyIn0sIHsiZW5kcG9pbnRzIjogW3siYWRtaW5VUkwiOiAiaHR0cDovLzE3Mi4xOC4xMjQuMTAxOjgwMDQvdjEvMTZlYjc4Y2JiNjg4NDU5YzgzMDhkODk2NzhiY2VmNTAiLCAicmVnaW9uIjogIlJlZ2lvbk9uZSIsICJpbnRlcm5hbFVSTCI6ICJodHRwOi8vMTcyLjE4LjEyNC4xMDE6ODAwNC92MS8xNmViNzhjYmI2ODg0NTljODMwOGQ4OTY3OGJjZWY1MCIsICJpZCI6ICJhMjRjMGY1ZmUzMmQ0ZDU5YWEwMTk1Mzg3OGFlMDQwNyIsICJwdWJsaWNVUkwiOiAiaHR0cDovLzE3Mi4xOC4xMjQuMTAxOjgwMDQvdjEvMTZlYjc4Y2JiNjg4NDU5YzgzMDhkODk2NzhiY2VmNTAifV0sICJlbmRwb2ludHNfbGlua3MiOiBbXSwgInR5cGUiOiAib3JjaGVzdHJhdGlvbiIsICJuYW1lIjogImhlYXQifSwgeyJlbmRwb2ludHMiOiBbeyJhZG1pblVSTCI6ICJodHRwOi8vMTcyLjE4LjEyNC4xMDE6MzUzNTcvdjIuMCIsICJyZWdpb24iOiAiUmVnaW9uT25lIiwgImludGVybmFsVVJMIjogImh0dHA6Ly8xNzIuMTguMTI0LjEwMTo1MDAwL3YyLjAiLCAiaWQiOiAiNGM4M2VlYjk3MDA5NDg3M2FiNjg3NjUzNWJlZjgxZWEiLCAicHVibGljVVJMIjogImh0dHA6Ly8xNzIuMTguMTI0LjEwMTo1MDAwL3YyLjAifV0sICJlbmRwb2ludHNfbGlua3MiOiBbXSwgInR5cGUiOiAiaWRlbnRpdHkiLCAibmFtZSI6ICJrZXlzdG9uZSJ9XSwgInVzZXIiOiB7InVzZXJuYW1lIjogImFkbWluIiwgInJvbGVzX2xpbmtzIjogW10sICJpZCI6ICJmMmNkZWM4NTQ2MmQ0N2UzODQ5ZTZmMzE3NGRhMTk4NSIsICJyb2xlcyI6IFt7Im5hbWUiOiAiYWRtaW4ifV0sICJuYW1lIjogImFkbWluIn0sICJtZXRhZGF0YSI6IHsiaXNfYWRtaW4iOiAwLCAicm9sZXMiOiBbIjc4N2JlODdjMGFkMjQ3ODJiNTQ4NWU5NjNhZjllNzllIl19fX0xgf8wgfwCAQEwXDBXMQswCQYDVQQGEwJVUzEOMAwGA1UECBMFVW5zZXQxDjAMBgNVBAcTBVVuc2V0MQ4wDAYDVQQKEwVVbnNldDEYMBYGA1UEAxMPd3d3LmV4YW1wbGUuY29tAgEBMAcGBSsOAwIaMA0GCSqGSIb3DQEBAQUABIGAURfgqd8iZ-UWZTta2pyKzXBXm9nmdzlOY-TN8526LWH4jrU1uuimAZKSjZUCwmnaSvoXHLlP6CSGvNUJWDDu6YFNmDfmatVqFrTij4EFGruExmtUxmhbQOnAyhKqIxHFg2t3VKEB2tVhLGSzoSH1dM2+j0-I0JgOLWIStVFEF5A=",
- "services": {
- "activeDirectories": [
- {
- "id": "9571747991184642B95F430A014616F9",
- "domain": "acme.loc",
- "adminPassword": "SuperP@ssw0rd!",
- "units": [
- {
- "id": "273c9183b6e74c9c9db7fdd532c5eb25",
- "name": "dc01",
- "isMaster": true,
- "recoveryPassword": "2SuperP@ssw0rd2"
- },
- {
- "id": "377c6f16d17a416791f80724dab360c6",
- "name": "dc02",
- "isMaster": false,
- "adminPassword": "SuperP@ssw0rd",
- "recoveryPassword": "2SuperP@ssw0rd2"
- }
- ]
- }
- ],
- "webServers": [
- {
- "id": "e9657ceef84a4e669e31795040080262",
- "domain": "acme.loc",
- "units": [
- {
- "id": "e6f9cfd07ced48fba64e6bd9e65aba64",
- "name": "iis01",
- "adminPassword": "SuperP@ssw0rd"
- }
- ]
- }
- ]
- }
-}
diff --git a/conductor/tests/__init__.py b/conductor/tests/__init__.py
deleted file mode 100644
index e3f3e8d4..00000000
--- a/conductor/tests/__init__.py
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright (c) 2013 Mirantis Inc.
-#
-# 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.
diff --git a/conductor/tests/conductor/__init__.py b/conductor/tests/conductor/__init__.py
deleted file mode 100644
index e3f3e8d4..00000000
--- a/conductor/tests/conductor/__init__.py
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright (c) 2013 Mirantis Inc.
-#
-# 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.
diff --git a/conductor/tests/conductor/test_methods.py b/conductor/tests/conductor/test_methods.py
deleted file mode 100644
index 68c4edeb..00000000
--- a/conductor/tests/conductor/test_methods.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright (c) 2013 Mirantis Inc.
-#
-# 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.
-
-import unittest
-from conductor.app import ConductorWorkflowService
-import conductor.rabbitmq as rabbitmq
-from conductor.workflow import Workflow
-import conductor.xml_code_engine as engine
-
-class TestMethodsAndClasses(unittest.TestCase):
-
- def test_init_service_class(self):
- con = ConductorWorkflowService()
-
- con.start()
- con.stop()
diff --git a/conductor/tests/conductor/test_with_fake_service.py b/conductor/tests/conductor/test_with_fake_service.py
deleted file mode 100644
index ca380b1c..00000000
--- a/conductor/tests/conductor/test_with_fake_service.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (c) 2013 Mirantis Inc.
-#
-# 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.
-
-import unittest
-from conductor.app import ConductorWorkflowService
-from conductor.openstack.common import service
-
-class TestMethodsAndClasses(unittest.TestCase):
-
- def test_init_service_class(self):
- launcher = service.ServiceLauncher()
- con = ConductorWorkflowService()
- launcher.launch_service(con)
-
diff --git a/conductor/tests/soapui.log b/conductor/tests/soapui.log
deleted file mode 100644
index e69de29b..00000000
diff --git a/conductor/tools/install_venv.py b/conductor/tools/install_venv.py
deleted file mode 100644
index c3b81718..00000000
--- a/conductor/tools/install_venv.py
+++ /dev/null
@@ -1,154 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2010 United States Government as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-# All Rights Reserved.
-#
-# Copyright 2010 OpenStack LLC.
-#
-# 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.
-
-"""
-Installation script for Glance's development virtualenv
-"""
-
-import os
-import subprocess
-import sys
-
-
-ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
-VENV = os.path.join(ROOT, '.venv')
-PIP_REQUIRES = os.path.join(ROOT, 'tools', 'pip-requires')
-TEST_REQUIRES = os.path.join(ROOT, 'tools', 'test-requires')
-
-
-def die(message, *args):
- print >> sys.stderr, message % args
- sys.exit(1)
-
-
-def run_command(cmd, redirect_output=True, check_exit_code=True):
- """
- Runs a command in an out-of-process shell, returning the
- output of that command. Working directory is ROOT.
- """
- if redirect_output:
- stdout = subprocess.PIPE
- else:
- stdout = None
-
- proc = subprocess.Popen(cmd, cwd=ROOT, stdout=stdout)
- output = proc.communicate()[0]
- if check_exit_code and proc.returncode != 0:
- die('Command "%s" failed.\n%s', ' '.join(cmd), output)
- return output
-
-
-HAS_EASY_INSTALL = bool(run_command(['which', 'easy_install'],
- check_exit_code=False).strip())
-HAS_VIRTUALENV = bool(run_command(['which', 'virtualenv'],
- check_exit_code=False).strip())
-
-
-def check_dependencies():
- """Make sure virtualenv is in the path."""
-
- if not HAS_VIRTUALENV:
- print 'not found.'
- # Try installing it via easy_install...
- if HAS_EASY_INSTALL:
- print 'Installing virtualenv via easy_install...',
- if not run_command(['which', 'easy_install']):
- die('ERROR: virtualenv not found.\n\n'
- 'Balancer development requires virtualenv, please install'
- ' it using your favorite package management tool')
- print 'done.'
- print 'done.'
-
-
-def create_virtualenv(venv=VENV):
- """
- Creates the virtual environment and installs PIP only into the
- virtual environment
- """
- print 'Creating venv...',
- run_command(['virtualenv', '-q', '--no-site-packages', VENV])
- print 'done.'
- print 'Installing pip in virtualenv...',
- if not run_command(['tools/with_venv.sh', 'easy_install',
- 'pip>1.0']).strip():
- die("Failed to install pip.")
- print 'done.'
-
-
-def pip_install(*args):
- run_command(['tools/with_venv.sh',
- 'pip', 'install', '--upgrade'] + list(args),
- redirect_output=False)
-
-
-def install_dependencies(venv=VENV):
- print 'Installing dependencies with pip (this can take a while)...'
-
- pip_install('pip')
-
- pip_install('-r', PIP_REQUIRES)
- pip_install('-r', TEST_REQUIRES)
-
- # Tell the virtual env how to "import glance"
- py_ver = _detect_python_version(venv)
- pthfile = os.path.join(venv, "lib", py_ver,
- "site-packages", "balancer.pth")
- f = open(pthfile, 'w')
- f.write("%s\n" % ROOT)
-
-
-def _detect_python_version(venv):
- lib_dir = os.path.join(venv, "lib")
- for pathname in os.listdir(lib_dir):
- if pathname.startswith('python'):
- return pathname
- raise Exception('Unable to detect Python version')
-
-
-def print_help():
- help = """
- Glance development environment setup is complete.
-
- Glance development uses virtualenv to track and manage Python dependencies
- while in development and testing.
-
- To activate the Glance virtualenv for the extent of your current shell session
- you can run:
-
- $ source .venv/bin/activate
-
- Or, if you prefer, you can run commands in the virtualenv on a case by case
- basis by running:
-
- $ tools/with_venv.sh
-
- Also, make test will automatically use the virtualenv.
- """
- print help
-
-
-def main(argv):
- check_dependencies()
- create_virtualenv()
- install_dependencies()
- print_help()
-
-if __name__ == '__main__':
- main(sys.argv)
diff --git a/conductor/tools/install_venv_common.py b/conductor/tools/install_venv_common.py
deleted file mode 100644
index 41306564..00000000
--- a/conductor/tools/install_venv_common.py
+++ /dev/null
@@ -1,220 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2013 OpenStack Foundation
-# Copyright 2013 IBM Corp.
-#
-# 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.
-
-"""Provides methods needed by installation script for OpenStack development
-virtual environments.
-
-Synced in from openstack-common
-"""
-
-import argparse
-import os
-import subprocess
-import sys
-
-
-class InstallVenv(object):
-
- def __init__(self, root, venv, pip_requires, test_requires, py_version,
- project):
- self.root = root
- self.venv = venv
- self.pip_requires = pip_requires
- self.test_requires = test_requires
- self.py_version = py_version
- self.project = project
-
- def die(self, message, *args):
- print >> sys.stderr, message % args
- sys.exit(1)
-
- def check_python_version(self):
- if sys.version_info < (2, 6):
- self.die("Need Python Version >= 2.6")
-
- def run_command_with_code(self, cmd, redirect_output=True,
- check_exit_code=True):
- """Runs a command in an out-of-process shell.
-
- Returns the output of that command. Working directory is self.root.
- """
- if redirect_output:
- stdout = subprocess.PIPE
- else:
- stdout = None
-
- proc = subprocess.Popen(cmd, cwd=self.root, stdout=stdout)
- output = proc.communicate()[0]
- if check_exit_code and proc.returncode != 0:
- self.die('Command "%s" failed.\n%s', ' '.join(cmd), output)
- return (output, proc.returncode)
-
- def run_command(self, cmd, redirect_output=True, check_exit_code=True):
- return self.run_command_with_code(cmd, redirect_output,
- check_exit_code)[0]
-
- def get_distro(self):
- if (os.path.exists('/etc/fedora-release') or
- os.path.exists('/etc/redhat-release')):
- return Fedora(self.root, self.venv, self.pip_requires,
- self.test_requires, self.py_version, self.project)
- else:
- return Distro(self.root, self.venv, self.pip_requires,
- self.test_requires, self.py_version, self.project)
-
- def check_dependencies(self):
- self.get_distro().install_virtualenv()
-
- def create_virtualenv(self, no_site_packages=True):
- """Creates the virtual environment and installs PIP.
-
- Creates the virtual environment and installs PIP only into the
- virtual environment.
- """
- if not os.path.isdir(self.venv):
- print 'Creating venv...',
- if no_site_packages:
- self.run_command(['virtualenv', '-q', '--no-site-packages',
- self.venv])
- else:
- self.run_command(['virtualenv', '-q', self.venv])
- print 'done.'
- print 'Installing pip in venv...',
- if not self.run_command(['tools/with_venv.sh', 'easy_install',
- 'pip>1.0']).strip():
- self.die("Failed to install pip.")
- print 'done.'
- else:
- print "venv already exists..."
- pass
-
- def pip_install(self, *args):
- self.run_command(['tools/with_venv.sh',
- 'pip', 'install', '--upgrade'] + list(args),
- redirect_output=False)
-
- def install_dependencies(self):
- print 'Installing dependencies with pip (this can take a while)...'
-
- # First things first, make sure our venv has the latest pip and
- # distribute.
- # NOTE: we keep pip at version 1.1 since the most recent version causes
- # the .venv creation to fail. See:
- # https://bugs.launchpad.net/nova/+bug/1047120
- self.pip_install('pip==1.1')
- self.pip_install('distribute')
-
- # Install greenlet by hand - just listing it in the requires file does
- # not
- # get it installed in the right order
- self.pip_install('greenlet')
-
- self.pip_install('-r', self.pip_requires)
- self.pip_install('-r', self.test_requires)
-
- def post_process(self):
- self.get_distro().post_process()
-
- def parse_args(self, argv):
- """Parses command-line arguments."""
- parser = argparse.ArgumentParser()
- parser.add_argument('-n', '--no-site-packages',
- action='store_true',
- help="Do not inherit packages from global Python "
- "install")
- return parser.parse_args(argv[1:])
-
-
-class Distro(InstallVenv):
-
- def check_cmd(self, cmd):
- return bool(self.run_command(['which', cmd],
- check_exit_code=False).strip())
-
- def install_virtualenv(self):
- if self.check_cmd('virtualenv'):
- return
-
- if self.check_cmd('easy_install'):
- print 'Installing virtualenv via easy_install...',
- if self.run_command(['easy_install', 'virtualenv']):
- print 'Succeeded'
- return
- else:
- print 'Failed'
-
- self.die('ERROR: virtualenv not found.\n\n%s development'
- ' requires virtualenv, please install it using your'
- ' favorite package management tool' % self.project)
-
- def post_process(self):
- """Any distribution-specific post-processing gets done here.
-
- In particular, this is useful for applying patches to code inside
- the venv.
- """
- pass
-
-
-class Fedora(Distro):
- """This covers all Fedora-based distributions.
-
- Includes: Fedora, RHEL, CentOS, Scientific Linux
- """
-
- def check_pkg(self, pkg):
- return self.run_command_with_code(['rpm', '-q', pkg],
- check_exit_code=False)[1] == 0
-
- def yum_install(self, pkg, **kwargs):
- print "Attempting to install '%s' via yum" % pkg
- self.run_command(['sudo', 'yum', 'install', '-y', pkg], **kwargs)
-
- def apply_patch(self, originalfile, patchfile):
- self.run_command(['patch', '-N', originalfile, patchfile],
- check_exit_code=False)
-
- def install_virtualenv(self):
- if self.check_cmd('virtualenv'):
- return
-
- if not self.check_pkg('python-virtualenv'):
- self.yum_install('python-virtualenv', check_exit_code=False)
-
- super(Fedora, self).install_virtualenv()
-
- def post_process(self):
- """Workaround for a bug in eventlet.
-
- This currently affects RHEL6.1, but the fix can safely be
- applied to all RHEL and Fedora distributions.
-
- This can be removed when the fix is applied upstream.
-
- Nova: https://bugs.launchpad.net/nova/+bug/884915
- Upstream: https://bitbucket.org/which_linden/eventlet/issue/89
- """
-
- # Install "patch" program if it's not there
- if not self.check_pkg('patch'):
- self.yum_install('patch')
-
- # Apply the eventlet patch
- self.apply_patch(os.path.join(self.venv, 'lib', self.py_version,
- 'site-packages',
- 'eventlet/green/subprocess.py'),
- 'contrib/redhat-eventlet.patch')
diff --git a/conductor/tools/pip-requires b/conductor/tools/pip-requires
deleted file mode 100644
index ac910b04..00000000
--- a/conductor/tools/pip-requires
+++ /dev/null
@@ -1,10 +0,0 @@
-anyjson
-eventlet>=0.9.12
-jsonpath
-puka
-Paste
-PasteDeploy
-iso8601>=0.1.4
-python-heatclient
-
-http://tarballs.openstack.org/oslo-config/oslo-config-2013.1b4.tar.gz#egg=oslo-config
diff --git a/conductor/tools/test-requires b/conductor/tools/test-requires
deleted file mode 100644
index d69cfd4c..00000000
--- a/conductor/tools/test-requires
+++ /dev/null
@@ -1,8 +0,0 @@
-unittest2
-mock==0.8.0
-nose
-nose-exclude
-nosexcover
-#openstack.nose_plugin
-pep8==1.0.1
-sphinx>=1.1.2
diff --git a/conductor/tools/with_venv.sh b/conductor/tools/with_venv.sh
deleted file mode 100755
index ae91bbcb..00000000
--- a/conductor/tools/with_venv.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-TOOLS=`dirname $0`
-VENV=$TOOLS/../.venv
-source $VENV/bin/activate && $@
diff --git a/conductor/tox.ini b/conductor/tox.ini
deleted file mode 100644
index 9033100e..00000000
--- a/conductor/tox.ini
+++ /dev/null
@@ -1,46 +0,0 @@
-[tox]
-envlist = py27,pep8
-
-[testenv]
-setenv = VIRTUAL_ENV={envdir}
- NOSE_WITH_OPENSTACK=1
- NOSE_OPENSTACK_COLOR=1
- NOSE_OPENSTACK_RED=0.05
- NOSE_OPENSTACK_YELLOW=0.025
- NOSE_OPENSTACK_SHOW_ELAPSED=1
-deps = -r{toxinidir}/tools/pip-requires
- -r{toxinidir}/tools/test-requires
-commands = nosetests
-
-[testenv:pep8]
-deps = pep8==1.3.3
-commands = pep8 --repeat --show-source conductor setup.py
-
-[testenv:venv]
-commands = {posargs}
-
-[testenv:cover]
-commands = nosetests --cover-erase --cover-package=conductor --with-xcoverage
-
-[tox:jenkins]
-downloadcache = ~/cache/pip
-
-[testenv:jenkins26]
-basepython = python2.6
-setenv = NOSE_WITH_XUNIT=1
-deps = file://{toxinidir}/.cache.bundle
-
-[testenv:jenkins27]
-basepython = python2.7
-setenv = NOSE_WITH_XUNIT=1
-deps = file://{toxinidir}/.cache.bundle
-
-[testenv:jenkinscover]
-deps = file://{toxinidir}/.cache.bundle
-setenv = NOSE_WITH_XUNIT=1
-commands = nosetests --cover-erase --cover-package=conductor --with-xcoverage
-
-[testenv:jenkinsvenv]
-deps = file://{toxinidir}/.cache.bundle
-setenv = NOSE_WITH_XUNIT=1
-commands = {posargs}
diff --git a/dashboard/.gitignore b/dashboard/.gitignore
deleted file mode 100644
index 78cafe90..00000000
--- a/dashboard/.gitignore
+++ /dev/null
@@ -1,19 +0,0 @@
-*.pyc
-*.swp
-.environment_version
-.selenium_log
-.coverage*
-.noseids
-.venv
-coverage.xml
-pep8.txt
-pylint.txt
-reports
-tabula/local/local_settings.py
-/static/
-docs/build/
-docs/source/sourcecode
-build
-dist
-#Autogenerated Documentation
-doc/source/api
\ No newline at end of file
diff --git a/dashboard/README.rst b/dashboard/README.rst
deleted file mode 100644
index 150c1b4a..00000000
--- a/dashboard/README.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-Keero Tabula README
-=====================
-Tabula is a project that provides Web UI to Keero Project.
-
-SEE ALSO
---------
-* `Keero `__
diff --git a/dashboard/bin/less/lessc b/dashboard/bin/less/lessc
deleted file mode 100755
index 30ae3520..00000000
--- a/dashboard/bin/less/lessc
+++ /dev/null
@@ -1,139 +0,0 @@
-#!/usr/bin/env node
-
-var path = require('path'),
- fs = require('fs'),
- sys = require('util'),
- os = require('os');
-
-var less = require('../lib/less');
-var args = process.argv.slice(1);
-var options = {
- compress: false,
- yuicompress: false,
- optimization: 1,
- silent: false,
- paths: [],
- color: true,
- strictImports: false
-};
-
-args = args.filter(function (arg) {
- var match;
-
- if (match = arg.match(/^-I(.+)$/)) {
- options.paths.push(match[1]);
- return false;
- }
-
- if (match = arg.match(/^--?([a-z][0-9a-z-]*)(?:=([^\s]+))?$/i)) { arg = match[1] }
- else { return arg }
-
- switch (arg) {
- case 'v':
- case 'version':
- sys.puts("lessc " + less.version.join('.') + " (LESS Compiler) [JavaScript]");
- process.exit(0);
- case 'verbose':
- options.verbose = true;
- break;
- case 's':
- case 'silent':
- options.silent = true;
- break;
- case 'strict-imports':
- options.strictImports = true;
- break;
- case 'h':
- case 'help':
- sys.puts("usage: lessc source [destination]");
- process.exit(0);
- case 'x':
- case 'compress':
- options.compress = true;
- break;
- case 'yui-compress':
- options.yuicompress = true;
- break;
- case 'no-color':
- options.color = false;
- break;
- case 'include-path':
- options.paths = match[2].split(os.type().match(/Windows/) ? ';' : ':')
- .map(function(p) {
- if (p) {
- return path.resolve(process.cwd(), p);
- }
- });
- break;
- case 'O0': options.optimization = 0; break;
- case 'O1': options.optimization = 1; break;
- case 'O2': options.optimization = 2; break;
- }
-});
-
-var input = args[1];
-if (input && input != '-') {
- input = path.resolve(process.cwd(), input);
-}
-var output = args[2];
-if (output) {
- output = path.resolve(process.cwd(), output);
-}
-
-var css, fd, tree;
-
-if (! input) {
- sys.puts("lessc: no input files");
- process.exit(1);
-}
-
-var parseLessFile = function (e, data) {
- if (e) {
- sys.puts("lessc: " + e.message);
- process.exit(1);
- }
-
- new(less.Parser)({
- paths: [path.dirname(input)].concat(options.paths),
- optimization: options.optimization,
- filename: input,
- strictImports: options.strictImports
- }).parse(data, function (err, tree) {
- if (err) {
- less.writeError(err, options);
- process.exit(1);
- } else {
- try {
- css = tree.toCSS({
- compress: options.compress,
- yuicompress: options.yuicompress
- });
- if (output) {
- fd = fs.openSync(output, "w");
- fs.writeSync(fd, css, 0, "utf8");
- } else {
- sys.print(css);
- }
- } catch (e) {
- less.writeError(e, options);
- process.exit(2);
- }
- }
- });
-};
-
-if (input != '-') {
- fs.readFile(input, 'utf-8', parseLessFile);
-} else {
- process.stdin.resume();
- process.stdin.setEncoding('utf8');
-
- var buffer = '';
- process.stdin.on('data', function(data) {
- buffer += data;
- });
-
- process.stdin.on('end', function() {
- parseLessFile(false, buffer);
- });
-}
diff --git a/dashboard/bin/lib/less/browser.js b/dashboard/bin/lib/less/browser.js
deleted file mode 100644
index cab913be..00000000
--- a/dashboard/bin/lib/less/browser.js
+++ /dev/null
@@ -1,380 +0,0 @@
-//
-// browser.js - client-side engine
-//
-
-var isFileProtocol = (location.protocol === 'file:' ||
- location.protocol === 'chrome:' ||
- location.protocol === 'chrome-extension:' ||
- location.protocol === 'resource:');
-
-less.env = less.env || (location.hostname == '127.0.0.1' ||
- location.hostname == '0.0.0.0' ||
- location.hostname == 'localhost' ||
- location.port.length > 0 ||
- isFileProtocol ? 'development'
- : 'production');
-
-// Load styles asynchronously (default: false)
-//
-// This is set to `false` by default, so that the body
-// doesn't start loading before the stylesheets are parsed.
-// Setting this to `true` can result in flickering.
-//
-less.async = false;
-
-// Interval between watch polls
-less.poll = less.poll || (isFileProtocol ? 1000 : 1500);
-
-//
-// Watch mode
-//
-less.watch = function () { return this.watchMode = true };
-less.unwatch = function () { return this.watchMode = false };
-
-if (less.env === 'development') {
- less.optimization = 0;
-
- if (/!watch/.test(location.hash)) {
- less.watch();
- }
- less.watchTimer = setInterval(function () {
- if (less.watchMode) {
- loadStyleSheets(function (e, root, _, sheet, env) {
- if (root) {
- createCSS(root.toCSS(), sheet, env.lastModified);
- }
- });
- }
- }, less.poll);
-} else {
- less.optimization = 3;
-}
-
-var cache;
-
-try {
- cache = (typeof(window.localStorage) === 'undefined') ? null : window.localStorage;
-} catch (_) {
- cache = null;
-}
-
-//
-// Get all tags with the 'rel' attribute set to "stylesheet/less"
-//
-var links = document.getElementsByTagName('link');
-var typePattern = /^text\/(x-)?less$/;
-
-less.sheets = [];
-
-for (var i = 0; i < links.length; i++) {
- if (links[i].rel === 'stylesheet/less' || (links[i].rel.match(/stylesheet/) &&
- (links[i].type.match(typePattern)))) {
- less.sheets.push(links[i]);
- }
-}
-
-
-less.refresh = function (reload) {
- var startTime, endTime;
- startTime = endTime = new(Date);
-
- loadStyleSheets(function (e, root, _, sheet, env) {
- if (env.local) {
- log("loading " + sheet.href + " from cache.");
- } else {
- log("parsed " + sheet.href + " successfully.");
- createCSS(root.toCSS(), sheet, env.lastModified);
- }
- log("css for " + sheet.href + " generated in " + (new(Date) - endTime) + 'ms');
- (env.remaining === 0) && log("css generated in " + (new(Date) - startTime) + 'ms');
- endTime = new(Date);
- }, reload);
-
- loadStyles();
-};
-less.refreshStyles = loadStyles;
-
-less.refresh(less.env === 'development');
-
-function loadStyles() {
- var styles = document.getElementsByTagName('style');
- for (var i = 0; i < styles.length; i++) {
- if (styles[i].type.match(typePattern)) {
- new(less.Parser)().parse(styles[i].innerHTML || '', function (e, tree) {
- var css = tree.toCSS();
- var style = styles[i];
- style.type = 'text/css';
- if (style.styleSheet) {
- style.styleSheet.cssText = css;
- } else {
- style.innerHTML = css;
- }
- });
- }
- }
-}
-
-function loadStyleSheets(callback, reload) {
- for (var i = 0; i < less.sheets.length; i++) {
- loadStyleSheet(less.sheets[i], callback, reload, less.sheets.length - (i + 1));
- }
-}
-
-function loadStyleSheet(sheet, callback, reload, remaining) {
- var url = window.location.href.replace(/[#?].*$/, '');
- var href = sheet.href.replace(/\?.*$/, '');
- var css = cache && cache.getItem(href);
- var timestamp = cache && cache.getItem(href + ':timestamp');
- var styles = { css: css, timestamp: timestamp };
-
- // Stylesheets in IE don't always return the full path
- if (! /^(https?|file):/.test(href)) {
- if (href.charAt(0) == "/") {
- href = window.location.protocol + "//" + window.location.host + href;
- } else {
- href = url.slice(0, url.lastIndexOf('/') + 1) + href;
- }
- }
- var filename = href.match(/([^\/]+)$/)[1];
-
- xhr(sheet.href, sheet.type, function (data, lastModified) {
- if (!reload && styles && lastModified &&
- (new(Date)(lastModified).valueOf() ===
- new(Date)(styles.timestamp).valueOf())) {
- // Use local copy
- createCSS(styles.css, sheet);
- callback(null, null, data, sheet, { local: true, remaining: remaining });
- } else {
- // Use remote copy (re-parse)
- try {
- new(less.Parser)({
- optimization: less.optimization,
- paths: [href.replace(/[\w\.-]+$/, '')],
- mime: sheet.type,
- filename: filename
- }).parse(data, function (e, root) {
- if (e) { return error(e, href) }
- try {
- callback(e, root, data, sheet, { local: false, lastModified: lastModified, remaining: remaining });
- removeNode(document.getElementById('less-error-message:' + extractId(href)));
- } catch (e) {
- error(e, href);
- }
- });
- } catch (e) {
- error(e, href);
- }
- }
- }, function (status, url) {
- throw new(Error)("Couldn't load " + url + " (" + status + ")");
- });
-}
-
-function extractId(href) {
- return href.replace(/^[a-z]+:\/\/?[^\/]+/, '' ) // Remove protocol & domain
- .replace(/^\//, '' ) // Remove root /
- .replace(/\?.*$/, '' ) // Remove query
- .replace(/\.[^\.\/]+$/, '' ) // Remove file extension
- .replace(/[^\.\w-]+/g, '-') // Replace illegal characters
- .replace(/\./g, ':'); // Replace dots with colons(for valid id)
-}
-
-function createCSS(styles, sheet, lastModified) {
- var css;
-
- // Strip the query-string
- var href = sheet.href ? sheet.href.replace(/\?.*$/, '') : '';
-
- // If there is no title set, use the filename, minus the extension
- var id = 'less:' + (sheet.title || extractId(href));
-
- // If the stylesheet doesn't exist, create a new node
- if ((css = document.getElementById(id)) === null) {
- css = document.createElement('style');
- css.type = 'text/css';
- css.media = sheet.media || 'screen';
- css.id = id;
- document.getElementsByTagName('head')[0].appendChild(css);
- }
-
- if (css.styleSheet) { // IE
- try {
- css.styleSheet.cssText = styles;
- } catch (e) {
- throw new(Error)("Couldn't reassign styleSheet.cssText.");
- }
- } else {
- (function (node) {
- if (css.childNodes.length > 0) {
- if (css.firstChild.nodeValue !== node.nodeValue) {
- css.replaceChild(node, css.firstChild);
- }
- } else {
- css.appendChild(node);
- }
- })(document.createTextNode(styles));
- }
-
- // Don't update the local store if the file wasn't modified
- if (lastModified && cache) {
- log('saving ' + href + ' to cache.');
- cache.setItem(href, styles);
- cache.setItem(href + ':timestamp', lastModified);
- }
-}
-
-function xhr(url, type, callback, errback) {
- var xhr = getXMLHttpRequest();
- var async = isFileProtocol ? false : less.async;
-
- if (typeof(xhr.overrideMimeType) === 'function') {
- xhr.overrideMimeType('text/css');
- }
- xhr.open('GET', url, async);
- xhr.setRequestHeader('Accept', type || 'text/x-less, text/css; q=0.9, */*; q=0.5');
- xhr.send(null);
-
- if (isFileProtocol) {
- if (xhr.status === 0 || (xhr.status >= 200 && xhr.status < 300)) {
- callback(xhr.responseText);
- } else {
- errback(xhr.status, url);
- }
- } else if (async) {
- xhr.onreadystatechange = function () {
- if (xhr.readyState == 4) {
- handleResponse(xhr, callback, errback);
- }
- };
- } else {
- handleResponse(xhr, callback, errback);
- }
-
- function handleResponse(xhr, callback, errback) {
- if (xhr.status >= 200 && xhr.status < 300) {
- callback(xhr.responseText,
- xhr.getResponseHeader("Last-Modified"));
- } else if (typeof(errback) === 'function') {
- errback(xhr.status, url);
- }
- }
-}
-
-function getXMLHttpRequest() {
- if (window.XMLHttpRequest) {
- return new(XMLHttpRequest);
- } else {
- try {
- return new(ActiveXObject)("MSXML2.XMLHTTP.3.0");
- } catch (e) {
- log("browser doesn't support AJAX.");
- return null;
- }
- }
-}
-
-function removeNode(node) {
- return node && node.parentNode.removeChild(node);
-}
-
-function log(str) {
- if (less.env == 'development' && typeof(console) !== "undefined") { console.log('less: ' + str) }
-}
-
-function error(e, href) {
- var id = 'less-error-message:' + extractId(href);
- var template = '
-{{ wizard.management_form }}
-{% if wizard.form.forms %}
- {{ wizard.form.management_form }}
- {% for form in wizard.form.forms %}
- {{ form }}
- {% endfor %}
-{% else %}
- {{ wizard.form }}
-{% endif %}
-{{ wizard.form.forms }}
-
-
-
- {% if wizard.steps.prev %}
-
{{ service_type }} Service
- {% if service_type == 'Active Directory' %}
-
{% trans "Now you can set the parameters for Active Directory Service." %}
-
{% trans "You can create few Active Directory instances, in this case will be created one Main Active Directory server and few Secondary Active Directory servers." %}
-
{% trans "The DNS service will be automatically created on each Active Directory servers." %}
- {% else %}
-
{% trans "Now you can set parameters for IIS Service." %}
-
{% trans "The IIS Service - it is the server with complex Internet Information Services infrastructure, which included to the domain infrasructure." %}
-
{% trans "Please, set the complex password for local administrator account." %}
-
{% trans "Also, you can add this IIS server to the existing domain and configure credentials for domain user." %}
- {% endif %}
-
- {% else %}
-
{% trans "Description" %}:
-
{% trans "Now you can select the type of the service." %}
-
{% trans "The Active Directory Service allows to configure Domain Controllers with Active Directory and DNS infrastructure. You can create one Main Domain Controller and few Secondary Domain Controllers." %}
-
{% trans "The Internet Information Services allows to configure IIS servers, which can be included to the existing domain infrastructure." %}
- {% endif %}
-
-{% endblock %}
-
-{% block modal-footer %}
-{% if wizard.steps.prev %}
-
-{% else %}
-
-{% endif %}
-{% endblock %}
diff --git a/dashboard/glazierdashboard/templates/create.html b/dashboard/glazierdashboard/templates/create.html
deleted file mode 100644
index 2dddf278..00000000
--- a/dashboard/glazierdashboard/templates/create.html
+++ /dev/null
@@ -1,11 +0,0 @@
-{% extends 'base.html' %}
-{% load i18n %}
-{% block title %}{% trans "Create Service" %}{% endblock %}
-
-{% block page_header %}
- {% include "horizon/common/_page_header.html" with title=_("Create Service") %}
-{% endblock page_header %}
-
-{% block main %}
- {% include 'horizon/common/_workflow.html' %}
-{% endblock %}
diff --git a/dashboard/glazierdashboard/templates/create_dc.html b/dashboard/glazierdashboard/templates/create_dc.html
deleted file mode 100644
index 2fc5894e..00000000
--- a/dashboard/glazierdashboard/templates/create_dc.html
+++ /dev/null
@@ -1,11 +0,0 @@
-{% extends 'base.html' %}
-{% load i18n %}
-{% block title %}{% trans "Create Windows Data Center" %}{% endblock %}
-
-{% block page_header %}
- {% include "horizon/common/_page_header.html" with title=_("Create Windows Data Center") %}
-{% endblock page_header %}
-
-{% block main %}
- {% include 'horizon/common/_workflow.html' %}
-{% endblock %}
diff --git a/dashboard/glazierdashboard/templates/index.html b/dashboard/glazierdashboard/templates/index.html
deleted file mode 100644
index 7c7147e4..00000000
--- a/dashboard/glazierdashboard/templates/index.html
+++ /dev/null
@@ -1,11 +0,0 @@
-{% extends 'base.html' %}
-{% load i18n %}
-{% block title %}{% trans "Environments" %}{% endblock %}
-
-{% block page_header %}
- {% include "horizon/common/_page_header.html" with title=_("Environments") %}
-{% endblock page_header %}
-
-{% block main %}
- {{ table.render }}
-{% endblock %}
diff --git a/dashboard/glazierdashboard/templates/service_details.html b/dashboard/glazierdashboard/templates/service_details.html
deleted file mode 100644
index bde27525..00000000
--- a/dashboard/glazierdashboard/templates/service_details.html
+++ /dev/null
@@ -1,15 +0,0 @@
-{% extends 'base.html' %}
-{% load i18n sizeformat %}
-{% block title %}{% trans "Service Detail" %}{% endblock %}
-
-{% block page_header %}
- {% include "horizon/common/_page_header.html" with title="Service Detail: "|add:service.name %}
-{% endblock page_header %}
-
-{% block main %}
-
-
- {{ tab_group.render }}
-
-
-{% endblock %}
diff --git a/dashboard/glazierdashboard/templates/services.html b/dashboard/glazierdashboard/templates/services.html
deleted file mode 100644
index b009f6fa..00000000
--- a/dashboard/glazierdashboard/templates/services.html
+++ /dev/null
@@ -1,11 +0,0 @@
-{% extends 'base.html' %}
-{% load i18n %}
-{% block title %}{% trans "Environment Services" %}{% endblock %}
-
-{% block page_header %}
- {% include "horizon/common/_page_header.html" with title="Environment "|add:environment_name %}
-{% endblock page_header %}
-
-{% block main %}
- {{ table.render }}
-{% endblock %}
diff --git a/dashboard/glazierdashboard/templates/update.html b/dashboard/glazierdashboard/templates/update.html
deleted file mode 100644
index aba3dc9a..00000000
--- a/dashboard/glazierdashboard/templates/update.html
+++ /dev/null
@@ -1,11 +0,0 @@
-{% extends 'base.html' %}
-{% load i18n %}
-{% block title %}{% trans "Update Instance" %}{% endblock %}
-
-{% block page_header %}
- {% include "horizon/common/_page_header.html" with title=_("Update Instance") %}
-{% endblock page_header %}
-
-{% block main %}
- {% include 'project/instances/_update.html' %}
-{% endblock %}
diff --git a/dashboard/glazierdashboard/test/__init__.py b/dashboard/glazierdashboard/test/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/dashboard/glazierdashboard/test/settings.py b/dashboard/glazierdashboard/test/settings.py
deleted file mode 100644
index 501bc7f1..00000000
--- a/dashboard/glazierdashboard/test/settings.py
+++ /dev/null
@@ -1,70 +0,0 @@
-import socket
-
-from dashboard.settings import *
-
-socket.setdefaulttimeout(1)
-
-DEBUG = False
-TEMPLATE_DEBUG = DEBUG
-
-SECRET_KEY = 'HELLA_SECRET!'
-
-DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3'}}
-
-TESTSERVER = 'http://testserver'
-
-INSTALLED_APPS += ('django_nose',)
-
-MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage'
-
-TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
-NOSE_ARGS = ['--nocapture',
- '--nologcapture',
- '--cover-package=windc']
-
-EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'
-SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
-
-OPENSTACK_ADDRESS = "localhost"
-OPENSTACK_ADMIN_TOKEN = "openstack"
-OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_ADDRESS
-OPENSTACK_KEYSTONE_ADMIN_URL = "http://%s:35357/v2.0" % OPENSTACK_ADDRESS
-OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member"
-
-# Silence logging output during tests.
-LOGGING = {
- 'version': 1,
- 'disable_existing_loggers': False,
- 'handlers': {
- 'null': {
- 'level': 'DEBUG',
- 'class': 'django.utils.log.NullHandler',
- },
- },
- 'loggers': {
- 'django.db.backends': {
- 'handlers': ['null'],
- 'propagate': False,
- },
- 'horizon': {
- 'handlers': ['null'],
- 'propagate': False,
- },
- 'novaclient': {
- 'handlers': ['null'],
- 'propagate': False,
- },
- 'keystoneclient': {
- 'handlers': ['null'],
- 'propagate': False,
- },
- 'quantum': {
- 'handlers': ['null'],
- 'propagate': False,
- },
- 'nose.plugins.manager': {
- 'handlers': ['null'],
- 'propagate': False,
- }
- }
-}
diff --git a/dashboard/glazierdashboard/version.py b/dashboard/glazierdashboard/version.py
deleted file mode 100644
index ac241ae7..00000000
--- a/dashboard/glazierdashboard/version.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2012 OpenStack Foundation
-#
-# 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.
-
-
-from tabula.openstack.common import version as common_version
-
-version_info = common_version.VersionInfo('tabula')
diff --git a/dashboard/manage.py b/dashboard/manage.py
deleted file mode 100755
index 00c53032..00000000
--- a/dashboard/manage.py
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env python
-
-import sys
-import os
-
-
-if __name__ == "__main__":
- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "glazierdashboard.settings")
- from django.core.management import execute_from_command_line
- execute_from_command_line(sys.argv)
diff --git a/dashboard/openstack-common.conf b/dashboard/openstack-common.conf
deleted file mode 100644
index 507dc200..00000000
--- a/dashboard/openstack-common.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-[DEFAULT]
-
-# The list of modules to copy from openstack-common
-modules=setup,importutils,version
-
-# The base module to hold the copy of openstack.common
-base=tabula
diff --git a/dashboard/packages/python-portasclient-2013.1.a345.ga70b44e.tar.gz b/dashboard/packages/python-portasclient-2013.1.a345.ga70b44e.tar.gz
deleted file mode 100644
index 92ff304b..00000000
Binary files a/dashboard/packages/python-portasclient-2013.1.a345.ga70b44e.tar.gz and /dev/null differ
diff --git a/dashboard/run_tests.sh b/dashboard/run_tests.sh
deleted file mode 100755
index 6dac0d35..00000000
--- a/dashboard/run_tests.sh
+++ /dev/null
@@ -1,442 +0,0 @@
-#!/bin/bash
-
-set -o errexit
-
-# ---------------UPDATE ME-------------------------------#
-# Increment me any time the environment should be rebuilt.
-# This includes dependncy changes, directory renames, etc.
-# Simple integer secuence: 1, 2, 3...
-environment_version=31
-#--------------------------------------------------------#
-
-function usage {
- echo "Usage: $0 [OPTION]..."
- echo "Run Horizon's test suite(s)"
- echo ""
- echo " -V, --virtual-env Always use virtualenv. Install automatically"
- echo " if not present"
- echo " -N, --no-virtual-env Don't use virtualenv. Run tests in local"
- echo " environment"
- echo " -c, --coverage Generate reports using Coverage"
- echo " -f, --force Force a clean re-build of the virtual"
- echo " environment. Useful when dependencies have"
- echo " been added."
- echo " -m, --manage Run a Django management command."
- echo " --makemessages Update all translation files."
- echo " --compilemessages Compile all translation files."
- echo " -p, --pep8 Just run pep8"
- echo " -t, --tabs Check for tab characters in files."
- echo " -y, --pylint Just run pylint"
- echo " -q, --quiet Run non-interactively. (Relatively) quiet."
- echo " Implies -V if -N is not set."
- echo " --only-selenium Run only the Selenium unit tests"
- echo " --with-selenium Run unit tests including Selenium tests"
- echo " --runserver Run the Django development server for"
- echo " openstack_dashboard in the virtual"
- echo " environment."
- echo " --docs Just build the documentation"
- echo " --backup-environment Make a backup of the environment on exit"
- echo " --restore-environment Restore the environment before running"
- echo " --destroy-environment DEstroy the environment and exit"
- echo " -h, --help Print this usage message"
- echo ""
- echo "Note: with no options specified, the script will try to run the tests in"
- echo " a virtual environment, If no virtualenv is found, the script will ask"
- echo " if you would like to create one. If you prefer to run tests NOT in a"
- echo " virtual environment, simply pass the -N option."
- exit
-}
-
-# DEFAULTS FOR RUN_TESTS.SH
-#
-root=`pwd`
-venv=$root/.venv
-with_venv=tools/with_venv.sh
-included_dirs="openstack_dashboard horizon"
-
-always_venv=0
-backup_env=0
-command_wrapper=""
-destroy=0
-force=0
-just_pep8=0
-just_pylint=0
-just_docs=0
-just_tabs=0
-never_venv=0
-quiet=0
-restore_env=0
-runserver=0
-only_selenium=0
-with_selenium=0
-testopts=""
-testargs=""
-with_coverage=0
-makemessages=0
-compilemessages=0
-manage=0
-
-# Jenkins sets a "JOB_NAME" variable, if it's not set, we'll make it "default"
-[ "$JOB_NAME" ] || JOB_NAME="default"
-
-function process_option {
- case "$1" in
- -h|--help) usage;;
- -V|--virtual-env) always_venv=1; never_venv=0;;
- -N|--no-virtual-env) always_venv=0; never_venv=1;;
- -p|--pep8) just_pep8=1;;
- -y|--pylint) just_pylint=1;;
- -f|--force) force=1;;
- -t|--tabs) just_tabs=1;;
- -q|--quiet) quiet=1;;
- -c|--coverage) with_coverage=1;;
- -m|--manage) manage=1;;
- --makemessages) makemessages=1;;
- --compilemessages) compilemessages=1;;
- --only-selenium) only_selenium=1;;
- --with-selenium) with_selenium=1;;
- --docs) just_docs=1;;
- --runserver) runserver=1;;
- --backup-environment) backup_env=1;;
- --restore-environment) restore_env=1;;
- --destroy-environment) destroy=1;;
- -*) testopts="$testopts $1";;
- *) testargs="$testargs $1"
- esac
-}
-
-function run_management_command {
- ${command_wrapper} python $root/manage.py $testopts $testargs
-}
-
-function run_server {
- echo "Starting Django development server..."
- ${command_wrapper} python $root/manage.py runserver $testopts $testargs
- echo "Server stopped."
-}
-
-function run_pylint {
- echo "Running pylint ..."
- PYTHONPATH=$root ${command_wrapper} pylint --rcfile=.pylintrc -f parseable $included_dirs > pylint.txt || true
- CODE=$?
- grep Global -A2 pylint.txt
- if [ $CODE -lt 32 ]; then
- echo "Completed successfully."
- exit 0
- else
- echo "Completed with problems."
- exit $CODE
- fi
-}
-
-function run_pep8 {
- echo "Running pep8 ..."
- ${command_wrapper} pep8 $included_dirs
-}
-
-function run_sphinx {
- echo "Building sphinx..."
- export DJANGO_SETTINGS_MODULE=openstack_dashboard.settings
- ${command_wrapper} sphinx-build -b html doc/source doc/build/html
- echo "Build complete."
-}
-
-function tab_check {
- TAB_VIOLATIONS=`find $included_dirs -type f -regex ".*\.\(css\|js\|py\|html\)" -print0 | xargs -0 awk '/\t/' | wc -l`
- if [ $TAB_VIOLATIONS -gt 0 ]; then
- echo "TABS! $TAB_VIOLATIONS of them! Oh no!"
- HORIZON_FILES=`find $included_dirs -type f -regex ".*\.\(css\|js\|py|\html\)"`
- for TABBED_FILE in $HORIZON_FILES
- do
- TAB_COUNT=`awk '/\t/' $TABBED_FILE | wc -l`
- if [ $TAB_COUNT -gt 0 ]; then
- echo "$TABBED_FILE: $TAB_COUNT"
- fi
- done
- fi
- return $TAB_VIOLATIONS;
-}
-
-function destroy_venv {
- echo "Cleaning environment..."
- echo "Removing virtualenv..."
- rm -rf $venv
- echo "Virtualenv removed."
- rm -f .environment_version
- echo "Environment cleaned."
-}
-
-function environment_check {
- echo "Checking environment."
- if [ -f .environment_version ]; then
- ENV_VERS=`cat .environment_version`
- if [ $ENV_VERS -eq $environment_version ]; then
- if [ -e ${venv} ]; then
- # If the environment exists and is up-to-date then set our variables
- command_wrapper="${root}/${with_venv}"
- echo "Environment is up to date."
- return 0
- fi
- fi
- fi
-
- if [ $always_venv -eq 1 ]; then
- install_venv
- else
- if [ ! -e ${venv} ]; then
- echo -e "Environment not found. Install? (Y/n) \c"
- else
- echo -e "Your environment appears to be out of date. Update? (Y/n) \c"
- fi
- read update_env
- if [ "x$update_env" = "xY" -o "x$update_env" = "x" -o "x$update_env" = "xy" ]; then
- install_venv
- else
- # Set our command wrapper anyway.
- command_wrapper="${root}/${with_venv}"
- fi
- fi
-}
-
-function sanity_check {
- # Anything that should be determined prior to running the tests, server, etc.
- # Don't sanity-check anything environment-related in -N flag is set
- if [ $never_venv -eq 0 ]; then
- if [ ! -e ${venv} ]; then
- echo "Virtualenv not found at $venv. Did install_venv.py succeed?"
- exit 1
- fi
- fi
- # Remove .pyc files. This is sanity checking because they can linger
- # after old files are deleted.
- find . -name "*.pyc" -exec rm -rf {} \;
-}
-
-function backup_environment {
- if [ $backup_env -eq 1 ]; then
- echo "Backing up environment \"$JOB_NAME\"..."
- if [ ! -e ${venv} ]; then
- echo "Environment not installed. Cannot back up."
- return 0
- fi
- if [ -d /tmp/.horizon_environment/$JOB_NAME ]; then
- mv /tmp/.horizon_environment/$JOB_NAME /tmp/.horizon_environment/$JOB_NAME.old
- rm -rf /tmp/.horizon_environment/$JOB_NAME
- fi
- mkdir -p /tmp/.horizon_environment/$JOB_NAME
- cp -r $venv /tmp/.horizon_environment/$JOB_NAME/
- cp .environment_version /tmp/.horizon_environment/$JOB_NAME/
- # Remove the backup now that we've completed successfully
- rm -rf /tmp/.horizon_environment/$JOB_NAME.old
- echo "Backup completed"
- fi
-}
-
-function restore_environment {
- if [ $restore_env -eq 1 ]; then
- echo "Restoring environment from backup..."
- if [ ! -d /tmp/.horizon_environment/$JOB_NAME ]; then
- echo "No backup to restore from."
- return 0
- fi
-
- cp -r /tmp/.horizon_environment/$JOB_NAME/.venv ./ || true
- cp -r /tmp/.horizon_environment/$JOB_NAME/.environment_version ./ || true
-
- echo "Environment restored successfully."
- fi
-}
-
-function install_venv {
- # Install with install_venv.py
- export PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE-/tmp/.pip_download_cache}
- export PIP_USE_MIRRORS=true
- if [ $quiet -eq 1 ]; then
- export PIP_NO_INPUT=true
- fi
- echo "Fetching new src packages..."
- rm -rf $venv/src
- python tools/install_venv.py
- command_wrapper="$root/${with_venv}"
- # Make sure it worked and record the environment version
- sanity_check
- chmod -R 754 $venv
- echo $environment_version > .environment_version
-}
-
-function run_tests {
- sanity_check
-
- if [ $with_selenium -eq 1 ]; then
- export WITH_SELENIUM=1
- elif [ $only_selenium -eq 1 ]; then
- export WITH_SELENIUM=1
- export SKIP_UNITTESTS=1
- fi
-
- if [ -z "$testargs" ]; then
- run_tests_all
- else
- run_tests_subset
- fi
-}
-
-function run_tests_subset {
- project=`echo $testargs | awk -F. '{print $1}'`
- ${command_wrapper} python $root/manage.py test --settings=$project.test.settings $testopts $testargs
-}
-
-function run_tests_all {
- echo "Running Horizon application tests"
- export NOSE_XUNIT_FILE=horizon/nosetests.xml
- if [ "$NOSE_WITH_HTML_OUTPUT" = '1' ]; then
- export NOSE_HTML_OUT_FILE='horizon_nose_results.html'
- fi
- ${command_wrapper} coverage erase
- ${command_wrapper} coverage run -p $root/manage.py test horizon --settings=horizon.test.settings $testopts
- # get results of the Horizon tests
- HORIZON_RESULT=$?
-
- echo "Running openstack_dashboard tests"
- export NOSE_XUNIT_FILE=openstack_dashboard/nosetests.xml
- if [ "$NOSE_WITH_HTML_OUTPUT" = '1' ]; then
- export NOSE_HTML_OUT_FILE='dashboard_nose_results.html'
- fi
- ${command_wrapper} coverage run -p $root/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings $testopts
- # get results of the openstack_dashboard tests
- DASHBOARD_RESULT=$?
-
- if [ $with_coverage -eq 1 ]; then
- echo "Generating coverage reports"
- ${command_wrapper} coverage combine
- ${command_wrapper} coverage xml -i --omit='/usr*,setup.py,*egg*,.venv/*'
- ${command_wrapper} coverage html -i --omit='/usr*,setup.py,*egg*,.venv/*' -d reports
- fi
- # Remove the leftover coverage files from the -p flag earlier.
- rm -f .coverage.*
-
- if [ $(($HORIZON_RESULT || $DASHBOARD_RESULT)) -eq 0 ]; then
- echo "Tests completed successfully."
- else
- echo "Tests failed."
- fi
- exit $(($HORIZON_RESULT || $DASHBOARD_RESULT))
-}
-
-function run_makemessages {
- cd horizon
- ${command_wrapper} $root/manage.py makemessages --all --no-obsolete
- HORIZON_PY_RESULT=$?
- ${command_wrapper} $root/manage.py makemessages -d djangojs --all --no-obsolete
- HORIZON_JS_RESULT=$?
- cd ../openstack_dashboard
- ${command_wrapper} $root/manage.py makemessages --all --no-obsolete
- DASHBOARD_RESULT=$?
- cd ..
- exit $(($HORIZON_PY_RESULT || $HORIZON_JS_RESULT || $DASHBOARD_RESULT))
-}
-
-function run_compilemessages {
- cd horizon
- ${command_wrapper} $root/manage.py compilemessages
- HORIZON_PY_RESULT=$?
- cd ../openstack_dashboard
- ${command_wrapper} $root/manage.py compilemessages
- DASHBOARD_RESULT=$?
- cd ..
- exit $(($HORIZON_PY_RESULT || $DASHBOARD_RESULT))
-}
-
-
-# ---------PREPARE THE ENVIRONMENT------------ #
-
-# PROCESS ARGUMENTS, OVERRIDE DEFAULTS
-for arg in "$@"; do
- process_option $arg
-done
-
-if [ $quiet -eq 1 ] && [ $never_venv -eq 0 ] && [ $always_venv -eq 0 ]
-then
- always_venv=1
-fi
-
-# If destroy is set, just blow it away and exit.
-if [ $destroy -eq 1 ]; then
- destroy_venv
- exit 0
-fi
-
-# Ignore all of this if the -N flag was set
-if [ $never_venv -eq 0 ]; then
-
- # Restore previous environment if desired
- if [ $restore_env -eq 1 ]; then
- restore_environment
- fi
-
- # Remove the virtual environment if --force used
- if [ $force -eq 1 ]; then
- destroy_venv
- fi
-
- # Then check if it's up-to-date
- environment_check
-
- # Create a backup of the up-to-date environment if desired
- if [ $backup_env -eq 1 ]; then
- backup_environment
- fi
-fi
-
-# ---------EXERCISE THE CODE------------ #
-
-# Run management commands
-if [ $manage -eq 1 ]; then
- run_management_command
- exit $?
-fi
-
-# Build the docs
-if [ $just_docs -eq 1 ]; then
- run_sphinx
- exit $?
-fi
-
-# Update translation files
-if [ $makemessages -eq 1 ]; then
- run_makemessages
- exit $?
-fi
-
-# Compile translation files
-if [ $compilemessages -eq 1 ]; then
- run_compilemessages
- exit $?
-fi
-
-# PEP8
-if [ $just_pep8 -eq 1 ]; then
- run_pep8
- exit $?
-fi
-
-# Pylint
-if [ $just_pylint -eq 1 ]; then
- run_pylint
- exit $?
-fi
-
-# Tab checker
-if [ $just_tabs -eq 1 ]; then
- tab_check
- exit $?
-fi
-
-# Django development server
-if [ $runserver -eq 1 ]; then
- run_server
- exit $?
-fi
-
-# Full test suite
-run_tests || exit
diff --git a/dashboard/setup.cfg b/dashboard/setup.cfg
deleted file mode 100644
index 79034b3c..00000000
--- a/dashboard/setup.cfg
+++ /dev/null
@@ -1,9 +0,0 @@
-[build_sphinx]
-all_files = 1
-build-dir = doc/build
-source-dir = doc/source
-
-[nosetests]
-verbosity=2
-detailed-errors=1
-
diff --git a/dashboard/setup.py b/dashboard/setup.py
deleted file mode 100755
index 4f73e961..00000000
--- a/dashboard/setup.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env python
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2012 United States Government as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-# All Rights Reserved.
-#
-# Copyright 2012 Nebula, Inc.
-#
-# 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.
-
-import setuptools
-
-from glazierdashboard.openstack.common import setup
-
-requires = setup.parse_requirements()
-depend_links = setup.parse_dependency_links()
-project = 'tabula'
-
-setuptools.setup(
- name=project,
- version=setup.get_version(project, '2013.1'),
- description="The OpenStack Dashboard.",
- license='Apache 2.0',
- author='OpenStack',
- author_email='horizon@lists.launchpad.net',
- url='https://github.com/openstack/horizon/',
- packages=setuptools.find_packages(exclude=['bin']),
- cmdclass=setup.get_cmdclass(),
- include_package_data=True,
- install_requires=requires,
- dependency_links=depend_links,
- classifiers=['Development Status :: 5 - Production/Stable',
- 'Framework :: Django',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: Apache Software License',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python',
- 'Topic :: Internet :: WWW/HTTP',
- 'Environment :: OpenStack']
-)
diff --git a/dashboard/tools/install_venv.py b/dashboard/tools/install_venv.py
deleted file mode 100644
index 2aa61068..00000000
--- a/dashboard/tools/install_venv.py
+++ /dev/null
@@ -1,69 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2010 United States Government as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-# All Rights Reserved.
-#
-# Copyright 2010 OpenStack LLC.
-# Copyright 2013 IBM Corp.
-#
-# 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.
-
-import os
-import subprocess
-import sys
-
-import install_venv_common as install_venv
-
-
-def print_help():
- help = """
- Tabula development environment setup is complete.
-
- Tabula development uses virtualenv to track and manage Python dependencies
- while in development and testing.
-
- To activate the Tabula virtualenv for the extent of your current shell session
- you can run:
-
- $ source .venv/bin/activate
-
- Or, if you prefer, you can run commands in the virtualenv on a case by case
- basis by running:
-
- $ tools/with_venv.sh
-
- Also, make test will automatically use the virtualenv.
- """
- print help
-
-
-def main(argv):
- root = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
- venv = os.path.join(root, '.venv')
- pip_requires = os.path.join(root, 'tools', 'pip-requires')
- test_requires = os.path.join(root, 'tools', 'test-requires')
- py_version = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
- project = 'tabula'
- install = install_venv.InstallVenv(root, venv, pip_requires, test_requires,
- py_version, project)
- options = install.parse_args(argv)
- install.check_python_version()
- install.check_dependencies()
- install.create_virtualenv(no_site_packages=options.no_site_packages)
- install.install_dependencies()
- install.post_process()
- print_help()
-
-if __name__ == '__main__':
- main(sys.argv)
diff --git a/dashboard/tools/install_venv_common.py b/dashboard/tools/install_venv_common.py
deleted file mode 100644
index 1ea3b2df..00000000
--- a/dashboard/tools/install_venv_common.py
+++ /dev/null
@@ -1,219 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2013 OpenStack, LLC
-# Copyright 2013 IBM Corp.
-#
-# 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.
-
-"""Provides methods needed by installation script for OpenStack development
-virtual environments.
-
-Synced in from openstack-common
-"""
-
-import argparse
-import os
-import subprocess
-import sys
-
-
-class InstallVenv(object):
-
- def __init__(self, root, venv, pip_requires, test_requires, py_version,
- project):
- self.root = root
- self.venv = venv
- self.pip_requires = pip_requires
- self.test_requires = test_requires
- self.py_version = py_version
- self.project = project
-
- def die(self, message, *args):
- print >> sys.stderr, message % args
- sys.exit(1)
-
- def check_python_version(self):
- if sys.version_info < (2, 6):
- self.die("Need Python Version >= 2.6")
-
- def run_command_with_code(self, cmd, redirect_output=True,
- check_exit_code=True):
- """Runs a command in an out-of-process shell.
-
- Returns the output of that command. Working directory is self.root.
- """
- if redirect_output:
- stdout = subprocess.PIPE
- else:
- stdout = None
-
- proc = subprocess.Popen(cmd, cwd=self.root, stdout=stdout)
- output = proc.communicate()[0]
- if check_exit_code and proc.returncode != 0:
- self.die('Command "%s" failed.\n%s', ' '.join(cmd), output)
- return (output, proc.returncode)
-
- def run_command(self, cmd, redirect_output=True, check_exit_code=True):
- return self.run_command_with_code(cmd, redirect_output,
- check_exit_code)[0]
-
- def get_distro(self):
- if (os.path.exists('/etc/fedora-release') or
- os.path.exists('/etc/redhat-release')):
- return Fedora(self.root, self.venv, self.pip_requires,
- self.test_requires, self.py_version, self.project)
- else:
- return Distro(self.root, self.venv, self.pip_requires,
- self.test_requires, self.py_version, self.project)
-
- def check_dependencies(self):
- self.get_distro().install_virtualenv()
-
- def create_virtualenv(self, no_site_packages=True):
- """Creates the virtual environment and installs PIP.
-
- Creates the virtual environment and installs PIP only into the
- virtual environment.
- """
- if not os.path.isdir(self.venv):
- print 'Creating venv...',
- if no_site_packages:
- self.run_command(['virtualenv', '-q', '--no-site-packages',
- self.venv])
- else:
- self.run_command(['virtualenv', '-q', self.venv])
- print 'done.'
- print 'Installing pip in venv...',
- if not self.run_command(['tools/with_venv.sh', 'easy_install',
- 'pip>1.0']).strip():
- self.die("Failed to install pip.")
- print 'done.'
- else:
- print "venv already exists..."
- pass
-
- def pip_install(self, *args):
- self.run_command(['tools/with_venv.sh',
- 'pip', 'install', '--upgrade'] + list(args),
- redirect_output=False)
-
- def install_dependencies(self):
- print 'Installing dependencies with pip (this can take a while)...'
-
- # First things first, make sure our venv has the latest pip and
- # distribute.
- # NOTE: we keep pip at version 1.1 since the most recent version causes
- # the .venv creation to fail. See:
- # https://bugs.launchpad.net/nova/+bug/1047120
- self.pip_install('pip==1.1')
- self.pip_install('distribute')
-
- # Install greenlet by hand - just listing it in the requires file does
- # not
- # get it installed in the right order
- self.pip_install('greenlet')
-
- self.pip_install('-r', self.test_requires)
- self.pip_install('-r', self.pip_requires)
-
- def post_process(self):
- self.get_distro().post_process()
-
- def parse_args(self, argv):
- """Parses command-line arguments."""
- parser = argparse.ArgumentParser()
- parser.add_argument('-n', '--no-site-packages',
- action='store_true',
- help="Do not inherit packages from global Python "
- "install")
- return parser.parse_args(argv[1:])
-
-
-class Distro(InstallVenv):
-
- def check_cmd(self, cmd):
- return bool(self.run_command(['which', cmd],
- check_exit_code=False).strip())
-
- def install_virtualenv(self):
- if self.check_cmd('virtualenv'):
- return
-
- if self.check_cmd('easy_install'):
- print 'Installing virtualenv via easy_install...',
- if self.run_command(['easy_install', 'virtualenv']):
- print 'Succeeded'
- return
- else:
- print 'Failed'
-
- self.die('ERROR: virtualenv not found.\n\n%s development'
- ' requires virtualenv, please install it using your'
- ' favorite package management tool' % self.project)
-
- def post_process(self):
- """Any distribution-specific post-processing gets done here.
-
- In particular, this is useful for applying patches to code inside
- the venv.
- """
- pass
-
-
-class Fedora(Distro):
- """This covers all Fedora-based distributions.
-
- Includes: Fedora, RHEL, CentOS, Scientific Linux
- """
-
- def check_pkg(self, pkg):
- return self.run_command_with_code(['rpm', '-q', pkg],
- check_exit_code=False)[1] == 0
-
- def yum_install(self, pkg, **kwargs):
- print "Attempting to install '%s' via yum" % pkg
- self.run_command(['sudo', 'yum', 'install', '-y', pkg], **kwargs)
-
- def apply_patch(self, originalfile, patchfile):
- self.run_command(['patch', originalfile, patchfile])
-
- def install_virtualenv(self):
- if self.check_cmd('virtualenv'):
- return
-
- if not self.check_pkg('python-virtualenv'):
- self.yum_install('python-virtualenv', check_exit_code=False)
-
- super(Fedora, self).install_virtualenv()
-
- def post_process(self):
- """Workaround for a bug in eventlet.
-
- This currently affects RHEL6.1, but the fix can safely be
- applied to all RHEL and Fedora distributions.
-
- This can be removed when the fix is applied upstream.
-
- Nova: https://bugs.launchpad.net/nova/+bug/884915
- Upstream: https://bitbucket.org/which_linden/eventlet/issue/89
- """
-
- # Install "patch" program if it's not there
- if not self.check_pkg('patch'):
- self.yum_install('patch')
-
- # Apply the eventlet patch
- self.apply_patch(os.path.join(self.venv, 'lib', self.py_version,
- 'site-packages',
- 'eventlet/green/subprocess.py'),
- 'contrib/redhat-eventlet.patch')
diff --git a/dashboard/tools/pip-requires b/dashboard/tools/pip-requires
deleted file mode 100644
index bba8dd72..00000000
--- a/dashboard/tools/pip-requires
+++ /dev/null
@@ -1,6 +0,0 @@
-# Core Requirements
-Django>=1.4,<1.5
-anyjson
-#Fix for bug https://bugs.launchpad.net/python-keystoneclient/+bug/1116740
-backports.ssl_match_hostname
-requests==0.14.2
\ No newline at end of file
diff --git a/dashboard/tools/rfc.sh b/dashboard/tools/rfc.sh
deleted file mode 100755
index 15781e52..00000000
--- a/dashboard/tools/rfc.sh
+++ /dev/null
@@ -1,145 +0,0 @@
-#!/bin/sh -e
-# Copyright (c) 2010-2011 Gluster, Inc.
-# This initial version of this file was taken from the source tree
-# of GlusterFS. It was not directly attributed, but is assumed to be
-# Copyright (c) 2010-2011 Gluster, Inc and release GPLv3
-# Subsequent modifications are Copyright (c) 2012 OpenStack, LLC.
-#
-# GlusterFS is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published
-# by the Free Software Foundation; either version 3 of the License,
-# or (at your option) any later version.
-#
-# GlusterFS is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see
-# .
-
-
-branch="master";
-
-set_hooks_commit_msg()
-{
- top_dir=`git rev-parse --show-toplevel`
- f="${top_dir}/.git/hooks/commit-msg";
- u="https://review.openstack.org/tools/hooks/commit-msg";
-
- if [ -x "$f" ]; then
- return;
- fi
-
- curl -o $f $u || wget -O $f $u;
-
- chmod +x $f;
-
- GIT_EDITOR=true git commit --amend
-}
-
-add_remote()
-{
- username=$1
- project=$2
-
- echo "No remote set, testing ssh://$username@review.openstack.org:29418"
- if project_list=`ssh -p29418 -o StrictHostKeyChecking=no $username@review.openstack.org gerrit ls-projects 2>/dev/null`
- then
- echo "$username@review.openstack.org:29418 worked."
- if echo $project_list | grep $project >/dev/null
- then
- echo "Creating a git remote called gerrit that maps to:"
- echo " ssh://$username@review.openstack.org:29418/$project"
- git remote add gerrit ssh://$username@review.openstack.org:29418/$project
- else
- echo "The current project name, $project, is not a known project."
- echo "Please either reclone from github/gerrit or create a"
- echo "remote named gerrit that points to the intended project."
- return 1
- fi
-
- return 0
- fi
- return 1
-}
-
-check_remote()
-{
- if ! git remote | grep gerrit >/dev/null 2>&1
- then
- origin_project=`git remote show origin | grep 'Fetch URL' | perl -nle '@fields = split(m|[:/]|); $len = $#fields; print $fields[$len-1], "/", $fields[$len];'`
- if add_remote $USERNAME $origin_project
- then
- return 0
- else
- echo "Your local name doesn't work on Gerrit."
- echo -n "Enter Gerrit username (same as launchpad): "
- read gerrit_user
- if add_remote $gerrit_user $origin_project
- then
- return 0
- else
- echo "Can't infer where gerrit is - please set a remote named"
- echo "gerrit manually and then try again."
- echo
- echo "For more information, please see:"
- echo "\thttp://wiki.openstack.org/GerritWorkflow"
- exit 1
- fi
- fi
- fi
-}
-
-rebase_changes()
-{
- git fetch;
-
- GIT_EDITOR=true git rebase -i origin/$branch || exit $?;
-}
-
-
-assert_diverge()
-{
- if ! git diff origin/$branch..HEAD | grep -q .
- then
- echo "No changes between the current branch and origin/$branch."
- exit 1
- fi
-}
-
-
-main()
-{
- set_hooks_commit_msg;
-
- check_remote;
-
- rebase_changes;
-
- assert_diverge;
-
- bug=$(git show --format='%s %b' | perl -nle 'if (/\b([Bb]ug|[Ll][Pp])\s*[#:]?\s*(\d+)/) {print "$2"; exit}')
-
- bp=$(git show --format='%s %b' | perl -nle 'if (/\b([Bb]lue[Pp]rint|[Bb][Pp])\s*[#:]?\s*([0-9a-zA-Z-_]+)/) {print "$2"; exit}')
-
- if [ "$DRY_RUN" = 1 ]; then
- drier='echo -e Please use the following command to send your commits to review:\n\n'
- else
- drier=
- fi
-
- local_branch=`git branch | grep -Ei "\* (.*)" | cut -f2 -d' '`
- if [ -z "$bug" ]; then
- if [ -z "$bp" ]; then
- $drier git push gerrit HEAD:refs/for/$branch/$local_branch;
- else
- $drier git push gerrit HEAD:refs/for/$branch/bp/$bp;
- fi
- else
- $drier git push gerrit HEAD:refs/for/$branch/bug/$bug;
- fi
-}
-
-main "$@"
diff --git a/dashboard/tools/test-requires b/dashboard/tools/test-requires
deleted file mode 100644
index c1da7cae..00000000
--- a/dashboard/tools/test-requires
+++ /dev/null
@@ -1,18 +0,0 @@
-distribute>=0.6.24
-
-# Testing Requirements
-coverage
-django-nose
-mox
-nose
-nose-exclude
-nosexcover
-openstack.nose_plugin
-nosehtmloutput
-pep8>=1.3
-pylint
-selenium
-
-# Docs Requirements
-sphinx
-docutils==0.9.1 # for bug 1091333, remove after sphinx >1.1.3 is released.
diff --git a/dashboard/tools/with_venv.sh b/dashboard/tools/with_venv.sh
deleted file mode 100755
index c8d2940f..00000000
--- a/dashboard/tools/with_venv.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-TOOLS=`dirname $0`
-VENV=$TOOLS/../.venv
-source $VENV/bin/activate && $@
diff --git a/api/doc/source/_static/.placeholder b/doc/source/_static/.placeholder
similarity index 100%
rename from api/doc/source/_static/.placeholder
rename to doc/source/_static/.placeholder
diff --git a/api/doc/source/_templates/.placeholder b/doc/source/_templates/.placeholder
similarity index 100%
rename from api/doc/source/_templates/.placeholder
rename to doc/source/_templates/.placeholder
diff --git a/api/doc/source/_theme/theme.conf b/doc/source/_theme/theme.conf
similarity index 100%
rename from api/doc/source/_theme/theme.conf
rename to doc/source/_theme/theme.conf
diff --git a/api/doc/source/conf.py b/doc/source/conf.py
similarity index 100%
rename from api/doc/source/conf.py
rename to doc/source/conf.py
diff --git a/api/doc/source/index.rst b/doc/source/index.rst
similarity index 100%
rename from api/doc/source/index.rst
rename to doc/source/index.rst
diff --git a/api/doc/source/man/glazierapi.rst b/doc/source/man/glazierapi.rst
similarity index 100%
rename from api/doc/source/man/glazierapi.rst
rename to doc/source/man/glazierapi.rst
diff --git a/docs/.gitignore b/docs/.gitignore
deleted file mode 100644
index c4c2ae4b..00000000
--- a/docs/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-#IntelJ Idea
-.idea/
-
-#Build results
-target
-
-#Translation build
-*.mo
-*.pot
diff --git a/docs/LICENSE b/docs/LICENSE
deleted file mode 100644
index 68c771a0..00000000
--- a/docs/LICENSE
+++ /dev/null
@@ -1,176 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
diff --git a/docs/README.rst b/docs/README.rst
deleted file mode 100644
index 3725a9fd..00000000
--- a/docs/README.rst
+++ /dev/null
@@ -1,47 +0,0 @@
-Glazier Manuals
-+++++++++++++++++
-
-This repository contains documentation for the
-Glazier project. It includes:
-
- * API Specification
- * Architecture
-
-For more details, see the `Glazier `_.
-
-Prerequisites
-=============
-`Apache Maven `_ must be installed to build the
-documentation.
-
-To install Maven 3 for Ubuntu 12.04 and later,and Debian wheezy and later::
-
- apt-get install maven
-
-On Fedora 15 and later::
-
- yum install maven3
-
-Building
-========
-The different manuals are in subdirectories of the
-``docs/src/`` directory.
-
-To build a specific guide, look for a ``pom.xml`` file within a subdirectory,
-then run the ``mvn`` command in that directory. For example::
-
- cd docs/src/glazier-manual
- mvn clean generate-sources
-
-The generated PDF documentation file is::
-
- docs/src/glazier-manual/src/target/docbkx/pdf/glazier-manual.pdf
-
-The root of the generated HTML documentation is::
-
- docs/src/glazier-manual/src/target/docbkx/webhelp/glazier-manual/content/index.html
-
-Installing
-==========
-Refer to http://glazier.openstack.org to see where these documents are published
-and to learn more about the Glazier project.
diff --git a/docs/src/glazier-manual/pom.xml b/docs/src/glazier-manual/pom.xml
deleted file mode 100644
index 5bc6ada6..00000000
--- a/docs/src/glazier-manual/pom.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
- 4.0.0
- com.mirantis.glazier
- manuals
- 1.0.0-SNAPSHOT
- jar
- Glazier Project Documentation
-
-
-
- com.agilejava.docbkx
- docbkx-maven-plugin
-
-
-
- generate-pdf
- generate-webhelp
-
- generate-sources
-
-
-
- true
- 100
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/src/glazier-manual/src/docbkx/figures/api_workflow.png b/docs/src/glazier-manual/src/docbkx/figures/api_workflow.png
deleted file mode 100755
index e1e19f82..00000000
Binary files a/docs/src/glazier-manual/src/docbkx/figures/api_workflow.png and /dev/null differ
diff --git a/docs/src/glazier-manual/src/docbkx/figures/architecture_diagram.png b/docs/src/glazier-manual/src/docbkx/figures/architecture_diagram.png
deleted file mode 100755
index cf374dd0..00000000
Binary files a/docs/src/glazier-manual/src/docbkx/figures/architecture_diagram.png and /dev/null differ
diff --git a/docs/src/glazier-manual/src/docbkx/glazier-manual.xml b/docs/src/glazier-manual/src/docbkx/glazier-manual.xml
deleted file mode 100644
index 042a2572..00000000
--- a/docs/src/glazier-manual/src/docbkx/glazier-manual.xml
+++ /dev/null
@@ -1,1910 +0,0 @@
-
-
- Glazier Project Documentation
-
-
-
-
-
-
-
- Mirantis, Inc.
-
-
-
- 2013
- Mirantis, Inc.
-
- v0.1
- Glazier™
- 2013-04-04
-
-
- Copyright details are filled in by the template. Change
- the value of the role
- attribute on the legalnotice element to change the license.
-
-
-
-
- This document is intended for individuals who wish to
- configure
- and use our product or intend to contribute.
-
-
-
- this is a placeholder for the front cover
-
-
- this is a placeholder for the back cover
-
-
-
- Overview
- Welcome to Glazier Project.
-
-
- Intended Audience
- This guide is intended to individuals who want to contribute
- to our
- project.
-
-
-
- Document Change History
- This version of the Glazier Manual replaces and obsoletes all
- previous versions. The
- most recent changes are described in the table below:
-
-
-
-
-
Revision Date
-
Summary of Changes
-
-
-
-
-
April. 4, 2013
-
-
-
- Initial document creation.
-
-
-
-
-
-
-
-
- Additional Resources
-
-
-
-
- Mirantis - Cloud Software
-
-
-
-
-
-
-
- Architecture
-
-
- The Glazier architecture has the following components:
-
-
- Glazier Dashboard - UI for the Glazier, extends
- Horizon
-
-
-
- REST API - exposes Glazier API via REST. Maintains
- environment configurations in Database
-
-
-
- Glazier Python Client - Python client for Glazier
- REST API
-
-
-
- Orchestration Engine - builds the environment as
- configured by the user.
- Turns environment configurations into a Heat templates
- for VM provision and Glazier Agent commands for service
- deployment
-
-
-
- Glazier Agent - built into Windows Server VM images.
- Executes commands sent by Orchestration Engine
-
-
-
-
-
-
- API Specification
-
-
-
-
Revision Date
-
Summary of Changes
-
-
-
-
-
February 4, 2013
-
-
-
- Initial document creation
-
-
-
-
-
-
February 22, 2013
-
-
-
- Enhance API with latest architecture
- changes
-
-
-
-
-
-
-
March 06, 2013
-
-
-
- Fix specification according to remarks
- from Dmitry Teselkin
-
-
-
-
-
-
-
-
- Introduction
- Glazier Service API is a programmatic interface used for interaction
- with Glazier. Other interaction
- mechanisms like Glazier Dashboard or Glazier CLI should use API as underlying
- protocol for interaction.
-
-
-
- For detailed information about entities and terms used in this document, please refer first to
- .
-
-
- Environment
-
- Environment is a set of logically related Services managed by a single tenant. Environment
- defines Windows environment boundaries.
-
- Services within single Environment may comprise some complex configuration while Services
- in different Environments are always independent from one another. Each Environment is
- associated with single OpenStack project (tenant).
-
-
-
-
- Service
-
- Service is building block of Windows environment. Service is a set of one or more Virtual
- Machines sharing a common purpose and configured together. Each service belongs to a single
- Environment and single Service Type.
-
- Services are comprised from one or more Service Units.
-
-
-
- Service Type
-
- Service type is definition for describing set of features exposed by service.
-
-
-
- Service Unit
-
- Service Units are the actual Windows Server VMs instantiated by OpenStack and then
- configured according to its Service Type (this may also correspond to one of predefined
- Windows Server roles).
-
-
-
-
- Service Metadata
-
- Service Metadata is a JSON-encoded definition of Environment, its Services and their
- Service Units along with all their attributes. Service Metadata may describe both current
- and the intended state of the Environment.
-
-
-
-
- Session
-
- All changes to environment done in scope of Session. After all changes to Environment
- state are accumulated, changes actually are applied only after session is deployed.
-
-
-
-
-
-
- Return codes and errors
- All REST API calls return the natural HTTP response codes for the operations, e.g. a successful GET
- returns a HTTP 200, a successful PUT returns a HTTP 201, a GET for a non-existent entity returns HTTP
- 404, unauthorized operations return HTTP 401 or HTTP 403, internal errors return HTTP 500.
-
-
-
- Response of POSTs and PUTs
- All POST and PUT requests by convention should return the created object (in the case of POST, with a
- generated ID) as if it was requested by GET.
-
-
-
- Authentication
- All requests include a Keystone authentication token header (X-Auth-Token). Clients must authenticate
- with Keystone before interacting with the Glazier service.
-
-
-
- Workflow
-
- Let’s review a sample workflow (series of API calls) for creating new Environment with Active
- Directory Service deployment:
-
-
- POST /environments/ - Creating new Environment
-
-
- POST /environments/id/configure – Creating new configuration session for Environment
-
-
-
- POST /environments/id/activeDirectory – Creating new ActiveDirectory service
-
-
- POST /environments/id/sessions/session_id/deploy – Saving and deploying changes
-
-
-
-
-
- API
-
- Environment API
- This section describes API calls for Environment management.
-
- Environment Object
-
-
-
-
-
-
- Attribute
- Type
- Description
-
-
-
-
- id
- guid
- Unique ID
-
-
- name
- string
- User-friendly name
-
-
- created
- datetime
- Creation date and time in ISO format
-
-
- updated
- datetime
- Modification date and time in ISO format
-
-
- tenant_id
- guid
- Open Stack tenant id
-
-
- status
- string
- Deployment status: draft, pending, inprogress, finished
-
-
-
-
-
- Get a List of existing Environments
-
- Call
-
- GET /environments Call
-
-
-
-
-
-
- Method
- URI
- Description
-
-
-
-
- GET
- /environments
- Get a list of existing Environments
-
-
-
-
-
-
- Payload
- None
-
-
- Returns
- This call returns list of environments. Only the basic properties are returned. For details see "Get Environment Detailed Information":
-
-
-
-
-
-
-
- Create Environment instance
-
- Call
-
- POST /environments Call
-
-
-
-
-
-
- Method
- URI
- Description
-
-
-
-
- POST
- /environments
- Create new Environment
-
-
-
-
-
-
- Payload
- None
-
-
- Returns
- None
-
-
-
-
- Environment Configuration API
- Only one Environment can be configured at a time by only one user. This behavior archived by opening "configuration session" for some Environment by user, and locking this Environment for changes by other users. Only one open session per Environment is available.
-
- Configuration Session Object
-
-
-
-
-
-
- Attribute
- Type
- Description
-
-
-
-
- id
- guid
- Session unique ID
-
-
- environment_id
- guid
- Environment that going to be modified during this session
-
-
- created
- datetime
- Creation date and time in ISO format
-
-
- updated
- datetime
- Modification date and time in ISO format
-
-
- user_id
- guid
- Session owner guid
-
-
- state
- string
- Session state. Could be: open, deploying, deployed
-
-
-
-
-
- Get a List of Sessions
- Only one open session can be for one Environment.
-
- Call
-
- GET /environments/<id>/sessions Call
-
-
-
-
-
-
- Method
- URI
- Description
-
-
-
-
- GET
- /environments/<id>/sessions
- Get a list of open sessions
-
-
-
-
-
-
- Payload
- None
-
-
- Returns
- This call returns list of open sessions:
-
-
-
-
-
-
-
- Open session
- During this call new working session is created, and session ID should be sent in header (X-Configuration-Session) to all next API calls.
-
- Call
-
- POST /environments/<id>/configure Call
-
-
-
-
-
-
- Method
- URI
- Description
-
-
-
-
- POST
- /environments/<id>/configure
- Creating new configuration change session
-
-
-
-
-
-
- Payload
- None
-
-
- Returns
- None
-
-
-
-
- Active Directory API
- This section describes API calls for Active Directory service management.
-
- Get a List of existing Active Directory instances
-
- Active Directory Object
-
-
-
-
-
-
- Attribute
- Type
- Description
-
-
-
-
- id
- guid
- Unique ID
-
-
- name
- string
- Domain name
-
-
- created
- datetime
- Creation date and time in ISO format
-
-
- updated
- datetime
- Modification date and time in ISO format
-
-
- configuration
- string
- AD configuration: site, standalone, inTree
-
-
- domain
- string
- Domain name (same as name)
-
-
- units
- object
- Active Directory Unit object
-
-
-
-
-
- Active Directory Unit Object
-
-
-
-
-
-
- Attribute
- Type
- Description
-
-
-
-
- id
- guid
- Unique ID
-
-
- isMaster
- boolean
- Is unit is master domain?
-
-
- location
- string
- AvailabilityZone or specific physical datacenter.
-
-
-
-
-
- Call
-
- GET /environments/<id>/activeDirectories Call
-
-
-
-
-
-
- Method
- URI
- Description
-
-
-
-
- GET
- /environments/<id>/activeDirectories
- Get a list of Active Directory instances
-
-
-
-
-
-
- Payload
- None
-
-
- Returns
- This call returns list of Active Directory instances:
-
-
-
-
-
-
-
- Create Active Directory instance
-
- Active Directory Object
-
-
-
-
-
-
- Attribute
- Type
- Description
-
-
-
-
- name
- string
- Domain name
-
-
- configuration
- string
- AD configuration: site, standalone, inTree
-
-
- adminPassword
- string
- Password from domain administrator account
-
-
- domain
- string
- Domain name (same as name)
-
-
- units
- object
- Active Directory Unit object
-
-
-
-
-
- Active Directory Unit Object
-
-
-
-
-
-
- Attribute
- Type
- Description
-
-
-
-
- isMaster
- boolean
- Is unit is master domain?
-
-
- recoveryPassword
- string
- Recovery password
-
-
- location
- string
- AvailabilityZone or specific physical datacenter.
-
-
-
-
-
- Call
-
- POST /environments/<id>/activeDirectories Call
-
-
-
-
-
-
- Method
- URI
- Description
-
-
-
-
- POST
- /environments/<id>/activeDirectories
- Create new Active Directory
-
-
-
-
-
-
- Payload
-
-
-
-
-
- Returns
- This call returns created active directory domain:
-
-
-
-
-
-
-
- Update Active Directory instance
-
- Active Directory Object
-
-
-
-
-
-
- Attribute
- Type
- Description
-
-
-
-
- id
- guid
- Unique ID
-
-
- name
- string
- Domain name
-
-
- configuration
- string
- AD configuration: site, standalone, inTree
-
-
- adminPassword
- string
- Password from domain administrator account
-
-
- domain
- string
- Domain name (same as name)
-
-
- units
- object
- Active Directory Unit object
-
-
-
-
-
- Active Directory Unit Object
-
-
-
-
-
-
- Attribute
- Type
- Description
-
-
-
-
- id
- guid
- Unique ID
-
-
- isMaster
- boolean
- Is unit is master domain?
-
-
- recoveryPassword
- string
- Recovery password
-
-
- location
- string
- AvailabilityZone or specific physical datacenter.
-
-
-
-
-
- Call
-
- PUT /environments/<id>/activeDirectories/<serviceId> Call
-
-
-
-
-
-
- Method
- URI
- Description
-
-
-
-
- PUT
- /environments/<id>/activeDirectories/<serviceId>
- Update existing Active Directory
-
-
-
-
-
-
- Payload
-
-
-
-
-
- Returns
- This call returns updated active directory domain:
-
-
-
-
-
-
-
- Get Information about Active Directory instance
-
- Active Directory Object
-
-
-
-
-
-
- Attribute
- Type
- Description
-
-
-
-
- id
- guid
- Unique ID
-
-
- name
- string
- Domain name
-
-
- created
- datetime
- Creation date and time in ISO format
-
-
- updated
- datetime
- Modification date and time in ISO format
-
-
- configuration
- string
- AD configuration: site, standalone, inTree
-
-
- domain
- string
- Domain name (same as name)
-
-
- units
- object
- Active Directory Unit object
-
-
-
-
-
- Active Directory Unit Object
-
-
-
-
-
-
- Attribute
- Type
- Description
-
-
-
-
- id
- guid
- Unique ID
-
-
- isMaster
- boolean
- Is unit is master domain?
-
-
- location
- string
- AvailabilityZone or specific physical datacenter.
-
-
-
-
-
- Call
-
- GET /environments/<id>/activeDirectories/<serviceId> Call
-
-
-
-
-
-
- Method
- URI
- Description
-
-
-
-
- GET
- /environments/<id>/activeDirectories/<serviceId>
- Return specified Active Directory instance
-
-
-
-
-
-
- Payload
- None
-
-
- Returns
- This call returns modified environment object:
-
-
-
-
-
-
-
-
- Web Server API
- This section describes API calls for managing Windows web-server software – IIS.
-
- Web Server Object
-
-
-
-
-
-
- Attribute
- Type
- Description
-
-
-
-
- id
- guid
- Unique ID
-
-
- name
- string
- User-friendly name
-
-
- created
- datetime
- Creation date and time in ISO format
-
-
- updated
- datetime
- Modification date and time in ISO format
-
-
- domain
- string
- Domain name (same as name)
-
-
- units
- object
- Web Server Unit object
-
-
-
-
-
- Web Server Unit Object
-
-
-
-
-
-
- Attribute
- Type
- Description
-
-
-
-
- id
- guid
- Unique ID
-
-
- endpoint
- object
- Unit Endpoint
-
-
- location
- string
- AvailabilityZone or specific physical datacenter.
-
-
-
-
-
- Web Server Unit Endpoint Object
-
-
-
-
-
-
- Attribute
- Type
- Description
-
-
-
-
- host
- string
- Host address for IIS Management Console connection
-
-
-
-
-
- Get a List of existing Web Servers
-
- Call
-
- GET /environments/<id>/webServers Call
-
-
-
-
-
-
- Method
- URI
- Description
-
-
-
-
- GET
- /environments/<id>/webServers
- Get a list of existing Web Servers
-
-
-
-
-
-
- Payload
- None
-
-
- Returns
- This call returns list of web servers:
-
-
-
-
-
-
-
- Create Web Server instance
-
- Call
-
- POST /environments/<id>/webServers Call
-
-
-
-
-
-
- Method
- URI
- Description
-
-
-
-
- POST
- /environments/<id>/webServers
- Create new Web Server
-
-
-
-
-
-
- Payload
-
-
-
-
-
- Returns
- This call returns created web server:
-
-
-
-
-
-
-
- Update Web Server Instance
-
- Call
-
- PUT /environments/<id>/webServers/<serviceId> Call
-
-
-
-
-
-
- Method
- URI
- Description
-
-
-
-
- PUT
- /environments/<id>/webServers/<serviceId>
- Update properties of WebServer instance
-
-
-
-
-
-
- Payload
-
-
-
-
-
- Returns
- This call returns modified web server object:
-
-
-
-
-
-
-
- Get Web Server Instance Detailed Information
-
- Call
-
- GET /environments/<id>/webServers/<serviceId> Call
-
-
-
-
-
-
- Method
- URI
- Description
-
-
-
-
- GET
- /environments/<id>/webServers/<serviceId>
- Returns detailed information about Web Server
-
-
-
-
-
-
- Payload
- None
-
-
- Returns
- This call returns modified environment object:
-
-
-
-
-
-
-
-
-
-
diff --git a/api/etc/glazier-api-paste.ini b/etc/glazier-api-paste.ini
similarity index 100%
rename from api/etc/glazier-api-paste.ini
rename to etc/glazier-api-paste.ini
diff --git a/api/etc/glazier-api.conf b/etc/glazier-api.conf
similarity index 100%
rename from api/etc/glazier-api.conf
rename to etc/glazier-api.conf
diff --git a/api/glazierapi/__init__.py b/glazierapi/__init__.py
similarity index 100%
rename from api/glazierapi/__init__.py
rename to glazierapi/__init__.py
diff --git a/api/glazierapi/api/__init__.py b/glazierapi/api/__init__.py
similarity index 100%
rename from api/glazierapi/api/__init__.py
rename to glazierapi/api/__init__.py
diff --git a/api/glazierapi/api/middleware/__init__.py b/glazierapi/api/middleware/__init__.py
similarity index 100%
rename from api/glazierapi/api/middleware/__init__.py
rename to glazierapi/api/middleware/__init__.py
diff --git a/api/glazierapi/api/middleware/context.py b/glazierapi/api/middleware/context.py
similarity index 100%
rename from api/glazierapi/api/middleware/context.py
rename to glazierapi/api/middleware/context.py
diff --git a/api/glazierapi/api/v1/__init__.py b/glazierapi/api/v1/__init__.py
similarity index 100%
rename from api/glazierapi/api/v1/__init__.py
rename to glazierapi/api/v1/__init__.py
diff --git a/api/glazierapi/api/v1/active_directories.py b/glazierapi/api/v1/active_directories.py
similarity index 100%
rename from api/glazierapi/api/v1/active_directories.py
rename to glazierapi/api/v1/active_directories.py
diff --git a/api/glazierapi/api/v1/environments.py b/glazierapi/api/v1/environments.py
similarity index 100%
rename from api/glazierapi/api/v1/environments.py
rename to glazierapi/api/v1/environments.py
diff --git a/api/glazierapi/api/v1/router.py b/glazierapi/api/v1/router.py
similarity index 100%
rename from api/glazierapi/api/v1/router.py
rename to glazierapi/api/v1/router.py
diff --git a/api/glazierapi/api/v1/sessions.py b/glazierapi/api/v1/sessions.py
similarity index 100%
rename from api/glazierapi/api/v1/sessions.py
rename to glazierapi/api/v1/sessions.py
diff --git a/api/glazierapi/api/v1/webservers.py b/glazierapi/api/v1/webservers.py
similarity index 100%
rename from api/glazierapi/api/v1/webservers.py
rename to glazierapi/api/v1/webservers.py
diff --git a/api/glazierapi/common/__init__.py b/glazierapi/common/__init__.py
similarity index 100%
rename from api/glazierapi/common/__init__.py
rename to glazierapi/common/__init__.py
diff --git a/api/glazierapi/common/config.py b/glazierapi/common/config.py
similarity index 100%
rename from api/glazierapi/common/config.py
rename to glazierapi/common/config.py
diff --git a/api/glazierapi/common/service.py b/glazierapi/common/service.py
similarity index 100%
rename from api/glazierapi/common/service.py
rename to glazierapi/common/service.py
diff --git a/api/glazierapi/common/uuidutils.py b/glazierapi/common/uuidutils.py
similarity index 100%
rename from api/glazierapi/common/uuidutils.py
rename to glazierapi/common/uuidutils.py
diff --git a/api/glazierapi/context.py b/glazierapi/context.py
similarity index 100%
rename from api/glazierapi/context.py
rename to glazierapi/context.py
diff --git a/api/glazierapi/db/__init__.py b/glazierapi/db/__init__.py
similarity index 100%
rename from api/glazierapi/db/__init__.py
rename to glazierapi/db/__init__.py
diff --git a/api/glazierapi/db/migrate_repo/README b/glazierapi/db/migrate_repo/README
similarity index 100%
rename from api/glazierapi/db/migrate_repo/README
rename to glazierapi/db/migrate_repo/README
diff --git a/api/glazierapi/db/migrate_repo/__init__.py b/glazierapi/db/migrate_repo/__init__.py
similarity index 100%
rename from api/glazierapi/db/migrate_repo/__init__.py
rename to glazierapi/db/migrate_repo/__init__.py
diff --git a/api/glazierapi/db/migrate_repo/manage.py b/glazierapi/db/migrate_repo/manage.py
similarity index 100%
rename from api/glazierapi/db/migrate_repo/manage.py
rename to glazierapi/db/migrate_repo/manage.py
diff --git a/api/glazierapi/db/migrate_repo/migrate.cfg b/glazierapi/db/migrate_repo/migrate.cfg
similarity index 100%
rename from api/glazierapi/db/migrate_repo/migrate.cfg
rename to glazierapi/db/migrate_repo/migrate.cfg
diff --git a/api/glazierapi/db/migrate_repo/versions/001_add_initial_tables.py b/glazierapi/db/migrate_repo/versions/001_add_initial_tables.py
similarity index 100%
rename from api/glazierapi/db/migrate_repo/versions/001_add_initial_tables.py
rename to glazierapi/db/migrate_repo/versions/001_add_initial_tables.py
diff --git a/api/glazierapi/db/migrate_repo/versions/002_add_session_table.py b/glazierapi/db/migrate_repo/versions/002_add_session_table.py
similarity index 100%
rename from api/glazierapi/db/migrate_repo/versions/002_add_session_table.py
rename to glazierapi/db/migrate_repo/versions/002_add_session_table.py
diff --git a/api/glazierapi/db/migrate_repo/versions/003_add_status_table.py b/glazierapi/db/migrate_repo/versions/003_add_status_table.py
similarity index 100%
rename from api/glazierapi/db/migrate_repo/versions/003_add_status_table.py
rename to glazierapi/db/migrate_repo/versions/003_add_status_table.py
diff --git a/api/glazierapi/db/migrate_repo/versions/004_add_description_column_to_session.py b/glazierapi/db/migrate_repo/versions/004_add_description_column_to_session.py
similarity index 100%
rename from api/glazierapi/db/migrate_repo/versions/004_add_description_column_to_session.py
rename to glazierapi/db/migrate_repo/versions/004_add_description_column_to_session.py
diff --git a/api/glazierapi/db/migrate_repo/versions/005_remove_obsolete_service_table.py b/glazierapi/db/migrate_repo/versions/005_remove_obsolete_service_table.py
similarity index 100%
rename from api/glazierapi/db/migrate_repo/versions/005_remove_obsolete_service_table.py
rename to glazierapi/db/migrate_repo/versions/005_remove_obsolete_service_table.py
diff --git a/api/glazierapi/db/migrate_repo/versions/006_add_entity_id_column_to_status.py b/glazierapi/db/migrate_repo/versions/006_add_entity_id_column_to_status.py
similarity index 100%
rename from api/glazierapi/db/migrate_repo/versions/006_add_entity_id_column_to_status.py
rename to glazierapi/db/migrate_repo/versions/006_add_entity_id_column_to_status.py
diff --git a/api/glazierapi/db/migrate_repo/versions/__init__.py b/glazierapi/db/migrate_repo/versions/__init__.py
similarity index 100%
rename from api/glazierapi/db/migrate_repo/versions/__init__.py
rename to glazierapi/db/migrate_repo/versions/__init__.py
diff --git a/api/glazierapi/db/models.py b/glazierapi/db/models.py
similarity index 100%
rename from api/glazierapi/db/models.py
rename to glazierapi/db/models.py
diff --git a/api/glazierapi/db/session.py b/glazierapi/db/session.py
similarity index 100%
rename from api/glazierapi/db/session.py
rename to glazierapi/db/session.py
diff --git a/api/glazierapi/locale/ru/LC_MESSAGES/glazierapi.po b/glazierapi/locale/ru/LC_MESSAGES/glazierapi.po
similarity index 100%
rename from api/glazierapi/locale/ru/LC_MESSAGES/glazierapi.po
rename to glazierapi/locale/ru/LC_MESSAGES/glazierapi.po
diff --git a/api/glazierapi/openstack/__init__.py b/glazierapi/openstack/__init__.py
similarity index 100%
rename from api/glazierapi/openstack/__init__.py
rename to glazierapi/openstack/__init__.py
diff --git a/api/glazierapi/openstack/common/__init__.py b/glazierapi/openstack/common/__init__.py
similarity index 100%
rename from api/glazierapi/openstack/common/__init__.py
rename to glazierapi/openstack/common/__init__.py
diff --git a/api/glazierapi/openstack/common/eventlet_backdoor.py b/glazierapi/openstack/common/eventlet_backdoor.py
similarity index 100%
rename from api/glazierapi/openstack/common/eventlet_backdoor.py
rename to glazierapi/openstack/common/eventlet_backdoor.py
diff --git a/api/glazierapi/openstack/common/exception.py b/glazierapi/openstack/common/exception.py
similarity index 100%
rename from api/glazierapi/openstack/common/exception.py
rename to glazierapi/openstack/common/exception.py
diff --git a/api/glazierapi/openstack/common/gettextutils.py b/glazierapi/openstack/common/gettextutils.py
similarity index 100%
rename from api/glazierapi/openstack/common/gettextutils.py
rename to glazierapi/openstack/common/gettextutils.py
diff --git a/api/glazierapi/openstack/common/importutils.py b/glazierapi/openstack/common/importutils.py
similarity index 100%
rename from api/glazierapi/openstack/common/importutils.py
rename to glazierapi/openstack/common/importutils.py
diff --git a/api/glazierapi/openstack/common/jsonutils.py b/glazierapi/openstack/common/jsonutils.py
similarity index 100%
rename from api/glazierapi/openstack/common/jsonutils.py
rename to glazierapi/openstack/common/jsonutils.py
diff --git a/api/glazierapi/openstack/common/local.py b/glazierapi/openstack/common/local.py
similarity index 100%
rename from api/glazierapi/openstack/common/local.py
rename to glazierapi/openstack/common/local.py
diff --git a/api/glazierapi/openstack/common/log.py b/glazierapi/openstack/common/log.py
similarity index 100%
rename from api/glazierapi/openstack/common/log.py
rename to glazierapi/openstack/common/log.py
diff --git a/api/glazierapi/openstack/common/loopingcall.py b/glazierapi/openstack/common/loopingcall.py
similarity index 100%
rename from api/glazierapi/openstack/common/loopingcall.py
rename to glazierapi/openstack/common/loopingcall.py
diff --git a/api/glazierapi/openstack/common/notifier/__init__.py b/glazierapi/openstack/common/notifier/__init__.py
similarity index 100%
rename from api/glazierapi/openstack/common/notifier/__init__.py
rename to glazierapi/openstack/common/notifier/__init__.py
diff --git a/api/glazierapi/openstack/common/notifier/api.py b/glazierapi/openstack/common/notifier/api.py
similarity index 100%
rename from api/glazierapi/openstack/common/notifier/api.py
rename to glazierapi/openstack/common/notifier/api.py
diff --git a/api/glazierapi/openstack/common/notifier/log_notifier.py b/glazierapi/openstack/common/notifier/log_notifier.py
similarity index 100%
rename from api/glazierapi/openstack/common/notifier/log_notifier.py
rename to glazierapi/openstack/common/notifier/log_notifier.py
diff --git a/api/glazierapi/openstack/common/notifier/no_op_notifier.py b/glazierapi/openstack/common/notifier/no_op_notifier.py
similarity index 100%
rename from api/glazierapi/openstack/common/notifier/no_op_notifier.py
rename to glazierapi/openstack/common/notifier/no_op_notifier.py
diff --git a/api/glazierapi/openstack/common/notifier/rabbit_notifier.py b/glazierapi/openstack/common/notifier/rabbit_notifier.py
similarity index 100%
rename from api/glazierapi/openstack/common/notifier/rabbit_notifier.py
rename to glazierapi/openstack/common/notifier/rabbit_notifier.py
diff --git a/api/glazierapi/openstack/common/notifier/rpc_notifier.py b/glazierapi/openstack/common/notifier/rpc_notifier.py
similarity index 100%
rename from api/glazierapi/openstack/common/notifier/rpc_notifier.py
rename to glazierapi/openstack/common/notifier/rpc_notifier.py
diff --git a/api/glazierapi/openstack/common/notifier/rpc_notifier2.py b/glazierapi/openstack/common/notifier/rpc_notifier2.py
similarity index 100%
rename from api/glazierapi/openstack/common/notifier/rpc_notifier2.py
rename to glazierapi/openstack/common/notifier/rpc_notifier2.py
diff --git a/api/glazierapi/openstack/common/notifier/test_notifier.py b/glazierapi/openstack/common/notifier/test_notifier.py
similarity index 100%
rename from api/glazierapi/openstack/common/notifier/test_notifier.py
rename to glazierapi/openstack/common/notifier/test_notifier.py
diff --git a/api/glazierapi/openstack/common/service.py b/glazierapi/openstack/common/service.py
similarity index 100%
rename from api/glazierapi/openstack/common/service.py
rename to glazierapi/openstack/common/service.py
diff --git a/api/glazierapi/openstack/common/setup.py b/glazierapi/openstack/common/setup.py
similarity index 100%
rename from api/glazierapi/openstack/common/setup.py
rename to glazierapi/openstack/common/setup.py
diff --git a/api/glazierapi/openstack/common/sslutils.py b/glazierapi/openstack/common/sslutils.py
similarity index 100%
rename from api/glazierapi/openstack/common/sslutils.py
rename to glazierapi/openstack/common/sslutils.py
diff --git a/api/glazierapi/openstack/common/threadgroup.py b/glazierapi/openstack/common/threadgroup.py
similarity index 100%
rename from api/glazierapi/openstack/common/threadgroup.py
rename to glazierapi/openstack/common/threadgroup.py
diff --git a/api/glazierapi/openstack/common/timeutils.py b/glazierapi/openstack/common/timeutils.py
similarity index 100%
rename from api/glazierapi/openstack/common/timeutils.py
rename to glazierapi/openstack/common/timeutils.py
diff --git a/api/glazierapi/openstack/common/uuidutils.py b/glazierapi/openstack/common/uuidutils.py
similarity index 100%
rename from api/glazierapi/openstack/common/uuidutils.py
rename to glazierapi/openstack/common/uuidutils.py
diff --git a/api/glazierapi/openstack/common/version.py b/glazierapi/openstack/common/version.py
similarity index 100%
rename from api/glazierapi/openstack/common/version.py
rename to glazierapi/openstack/common/version.py
diff --git a/api/glazierapi/openstack/common/wsgi.py b/glazierapi/openstack/common/wsgi.py
similarity index 100%
rename from api/glazierapi/openstack/common/wsgi.py
rename to glazierapi/openstack/common/wsgi.py
diff --git a/api/glazierapi/openstack/common/xmlutils.py b/glazierapi/openstack/common/xmlutils.py
similarity index 100%
rename from api/glazierapi/openstack/common/xmlutils.py
rename to glazierapi/openstack/common/xmlutils.py
diff --git a/api/glazierapi/tests/__init__.py b/glazierapi/tests/__init__.py
similarity index 100%
rename from api/glazierapi/tests/__init__.py
rename to glazierapi/tests/__init__.py
diff --git a/api/glazierapi/tests/api/__init__.py b/glazierapi/tests/api/__init__.py
similarity index 100%
rename from api/glazierapi/tests/api/__init__.py
rename to glazierapi/tests/api/__init__.py
diff --git a/api/glazierapi/tests/api/simple_test.py b/glazierapi/tests/api/simple_test.py
similarity index 100%
rename from api/glazierapi/tests/api/simple_test.py
rename to glazierapi/tests/api/simple_test.py
diff --git a/api/glazierapi/tests/sanity_tests.py b/glazierapi/tests/sanity_tests.py
similarity index 100%
rename from api/glazierapi/tests/sanity_tests.py
rename to glazierapi/tests/sanity_tests.py
diff --git a/api/glazierapi/utils.py b/glazierapi/utils.py
similarity index 100%
rename from api/glazierapi/utils.py
rename to glazierapi/utils.py
diff --git a/api/glazierapi/version.py b/glazierapi/version.py
similarity index 100%
rename from api/glazierapi/version.py
rename to glazierapi/version.py
diff --git a/api/openstack-common.conf b/openstack-common.conf
similarity index 100%
rename from api/openstack-common.conf
rename to openstack-common.conf
diff --git a/python-glazierclient/.gitignore b/python-glazierclient/.gitignore
deleted file mode 100644
index f5f39680..00000000
--- a/python-glazierclient/.gitignore
+++ /dev/null
@@ -1,23 +0,0 @@
-#IntelJ Idea
-.idea/
-
-#virtualenv
-.venv/
-
-#Build results
-build/
-dist/
-*.egg-info/
-
-#Python
-*.pyc
-
-#Translation build
-*.mo
-*.pot
-
-#SQLite Database files
-*.sqlite
-
-#Autogenerated Documentation
-doc/source/api
\ No newline at end of file
diff --git a/python-glazierclient/README.rst b/python-glazierclient/README.rst
deleted file mode 100644
index b7a3f782..00000000
--- a/python-glazierclient/README.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-Python bindings to the Glazier API
-=====================
-This is a client library for Glazier built on the Glazier API. It
-provides a Python API (the ``glazierclient`` module) and a command-line tool
-(``glazier``).
-
-SEE ALSO
---------
-* `Glazier `__
diff --git a/python-glazierclient/doc/source/_static/.placeholder b/python-glazierclient/doc/source/_static/.placeholder
deleted file mode 100755
index e69de29b..00000000
diff --git a/python-glazierclient/doc/source/_templates/.placeholder b/python-glazierclient/doc/source/_templates/.placeholder
deleted file mode 100755
index e69de29b..00000000
diff --git a/python-glazierclient/doc/source/_theme/theme.conf b/python-glazierclient/doc/source/_theme/theme.conf
deleted file mode 100755
index 9a8facf4..00000000
--- a/python-glazierclient/doc/source/_theme/theme.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-[theme]
-inherit = default
\ No newline at end of file
diff --git a/python-glazierclient/doc/source/conf.py b/python-glazierclient/doc/source/conf.py
deleted file mode 100644
index 38d8e651..00000000
--- a/python-glazierclient/doc/source/conf.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-import os
-
-project = 'python-glazierclient'
-
-# -- General configuration ----------------------------------------------------
-
-# Add any Sphinx extension module names here, as strings. They can be
-# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc',
- 'sphinx.ext.intersphinx',
- 'sphinx.ext.coverage',
- 'sphinx.ext.pngmath',
- 'sphinx.ext.ifconfig',
- 'sphinx.ext.graphviz']
-
-# autodoc generation is a bit aggressive and a nuisance when doing heavy
-# text edit cycles.
-# execute "export SPHINX_DEBUG=1" in your terminal to disable
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = []
-if os.getenv('HUDSON_PUBLISH_DOCS'):
- templates_path = ['_ga', '_templates']
-else:
- templates_path = ['_templates']
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-copyright = u'Mirantis, Inc'
-exclude_trees = ['api']
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-add_module_names = True
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# -- Options for HTML output --------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. Major themes that come with
-# Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = 'default'
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = '%sdoc' % project
-
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, documentclass
-# [howto/manual]).
-latex_documents = [
- (
- 'index',
- '%s.tex' % project,
- u'%s Documentation' % project,
- u'Mirantis, Inc',
- 'manual'
- ),
-]
-
-# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'http://docs.python.org/': None}
diff --git a/python-glazierclient/doc/source/index.rst b/python-glazierclient/doc/source/index.rst
deleted file mode 100644
index 395524e6..00000000
--- a/python-glazierclient/doc/source/index.rst
+++ /dev/null
@@ -1,48 +0,0 @@
-..
- Copyright (c) 2013 Mirantis, Inc.
-
- 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.
-
-==================
-Glazier API Client
-==================
-In order to use the python api directly, you must first obtain an auth token and identify which endpoint you wish to speak to. Once you have done so, you can use the API like so::
-
- >>> from glazierclient import Client
- >>> glazier = Client('1', endpoint=GLAZIER_URL, token=OS_AUTH_TOKEN)
-...
-
-
-Command-line Tool
-=================
-In order to use the CLI, you must provide your OpenStack username, password, tenant, and auth endpoint. Use the corresponding configuration options (``--os-username``, ``--os-password``, ``--os-tenant-id``, and ``--os-auth-url``) or set them in environment variables::
-
- export OS_USERNAME=user
- export OS_PASSWORD=pass
- export OS_TENANT_ID=b363706f891f48019483f8bd6503c54b
- export OS_AUTH_URL=http://auth.example.com:5000/v2.0
-
-The command line tool will attempt to reauthenticate using your provided credentials for every request. You can override this behavior by manually supplying an auth token using ``--os-image-url`` and ``--os-auth-token``. You can alternatively set these environment variables::
-
- export GLAZIER_URL=http://glazier.example.org:8082/
- export OS_AUTH_TOKEN=3bcc3d3a03f44e3d8377f9247b0ad155
-
-Once you've configured your authentication parameters, you can run ``glazier help`` to see a complete listing of available commands.
-
-
-Release Notes
-=============
-
-0.1.0
------
-* Initial release
diff --git a/python-glazierclient/glazierclient/__init__.py b/python-glazierclient/glazierclient/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/python-glazierclient/glazierclient/client.py b/python-glazierclient/glazierclient/client.py
deleted file mode 100644
index 84779d10..00000000
--- a/python-glazierclient/glazierclient/client.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright (c) 2013 Mirantis, Inc.
-#
-# 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.
-from glazierclient.common import utils
-
-
-def Client(version, *args, **kwargs):
- module = utils.import_versioned_module(version, 'client')
- client_class = getattr(module, 'Client')
- return client_class(*args, **kwargs)
diff --git a/python-glazierclient/glazierclient/common/__init__.py b/python-glazierclient/glazierclient/common/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/python-glazierclient/glazierclient/common/base.py b/python-glazierclient/glazierclient/common/base.py
deleted file mode 100644
index e92def98..00000000
--- a/python-glazierclient/glazierclient/common/base.py
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright 2012 OpenStack LLC.
-# All Rights Reserved.
-#
-# 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.
-
-"""
-Base utilities to build API operation managers and objects on top of.
-"""
-
-import copy
-
-
-# Python 2.4 compat
-try:
- all
-except NameError:
- def all(iterable):
- return True not in (not x for x in iterable)
-
-
-def getid(obj):
- """
- Abstracts the common pattern of allowing both an object or an object's ID
- (UUID) as a parameter when dealing with relationships.
- """
- try:
- return obj.id
- except AttributeError:
- return obj
-
-
-class Manager(object):
- """
- Managers interact with a particular type of API (servers, flavors, images,
- etc.) and provide CRUD operations for them.
- """
- resource_class = None
-
- def __init__(self, api):
- self.api = api
-
- def _list(self, url, response_key=None, obj_class=None,
- body=None, headers={}):
-
- resp, body = self.api.json_request('GET', url, headers=headers)
-
- if obj_class is None:
- obj_class = self.resource_class
-
- if response_key:
- if not response_key in body:
- body[response_key] = []
- data = body[response_key]
- else:
- data = body
- return [obj_class(self, res, loaded=True) for res in data if res]
-
- def _delete(self, url, headers={}):
- self.api.raw_request('DELETE', url, headers=headers)
-
- def _update(self, url, body, response_key=None):
- resp, body = self.api.json_request('PUT', url, body=body)
- # PUT requests may not return a body
- if body:
- if response_key:
- return self.resource_class(self, body[response_key])
- return self.resource_class(self, body)
-
- def _create(self, url, body=None, response_key=None,
- return_raw=False, headers={}):
-
- if body:
- resp, body = self.api.json_request('POST', url,
- body=body, headers=headers)
- else:
- resp, body = self.api.json_request('POST', url, headers=headers)
- if return_raw:
- if response_key:
- return body[response_key]
- return body
- if response_key:
- return self.resource_class(self, body[response_key])
- return self.resource_class(self, body)
-
- def _get(self, url, response_key=None, return_raw=False):
- resp, body = self.api.json_request('GET', url)
- if return_raw:
- if response_key:
- return body[response_key]
- return body
- if response_key:
- return self.resource_class(self, body[response_key])
- return self.resource_class(self, body)
-
-
-class Resource(object):
- """
- A resource represents a particular instance of an object (tenant, user,
- etc). This is pretty much just a bag for attributes.
-
- :param manager: Manager object
- :param info: dictionary representing resource attributes
- :param loaded: prevent lazy-loading if set to True
- """
- def __init__(self, manager, info, loaded=False):
- self.manager = manager
- self._info = info
- self._add_details(info)
- self._loaded = loaded
-
- def _add_details(self, info):
- for (k, v) in info.iteritems():
- setattr(self, k, v)
-
- def __getattr__(self, k):
- if k not in self.__dict__:
- # NOTE(bcwaldon): disallow lazy-loading if already loaded once
- if not self.is_loaded():
- self.get()
- return self.__getattr__(k)
-
- raise AttributeError(k)
- else:
- return self.__dict__[k]
-
- def __repr__(self):
- reprkeys = sorted(k for k in self.__dict__.keys() if k[0] != '_' and
- k != 'manager')
- info = ", ".join("%s=%s" % (k, getattr(self, k)) for k in reprkeys)
- return "<%s %s>" % (self.__class__.__name__, info)
-
- def get(self):
- # set_loaded() first ... so if we have to bail, we know we tried.
- self.set_loaded(True)
- if not hasattr(self.manager, 'get'):
- return
-
- new = self.manager.get(self.id)
- if new:
- self._add_details(new._info)
-
- def __eq__(self, other):
- if not isinstance(other, self.__class__):
- return False
- if hasattr(self, 'id') and hasattr(other, 'id'):
- return self.id == other.id
- return self._info == other._info
-
- def is_loaded(self):
- return self._loaded
-
- def set_loaded(self, val):
- self._loaded = val
-
- def to_dict(self):
- return copy.deepcopy(self._info)
diff --git a/python-glazierclient/glazierclient/common/exceptions.py b/python-glazierclient/glazierclient/common/exceptions.py
deleted file mode 100644
index d3d3cab6..00000000
--- a/python-glazierclient/glazierclient/common/exceptions.py
+++ /dev/null
@@ -1,163 +0,0 @@
-# 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.
-
-import sys
-
-
-class BaseException(Exception):
- """An error occurred."""
- def __init__(self, message=None):
- self.message = message
-
- def __str__(self):
- return self.message or self.__class__.__doc__
-
-
-class CommandError(BaseException):
- """Invalid usage of CLI"""
-
-
-class InvalidEndpoint(BaseException):
- """The provided endpoint is invalid."""
-
-
-class CommunicationError(BaseException):
- """Unable to communicate with server."""
-
-
-class ClientException(Exception):
- """DEPRECATED"""
-
-
-class HTTPException(ClientException):
- """Base exception for all HTTP-derived exceptions"""
- code = 'N/A'
-
- def __init__(self, details=None):
- self.details = details
-
- def __str__(self):
- return "%s (HTTP %s)" % (self.__class__.__name__, self.code)
-
-
-class HTTPMultipleChoices(HTTPException):
- code = 300
-
- def __str__(self):
- self.details = ("Requested version of OpenStack Images API is not"
- "available.")
- return "%s (HTTP %s) %s" % (self.__class__.__name__, self.code,
- self.details)
-
-
-class BadRequest(HTTPException):
- """DEPRECATED"""
- code = 400
-
-
-class HTTPBadRequest(BadRequest):
- pass
-
-
-class Unauthorized(HTTPException):
- """DEPRECATED"""
- code = 401
-
-
-class HTTPUnauthorized(Unauthorized):
- pass
-
-
-class Forbidden(HTTPException):
- """DEPRECATED"""
- code = 403
-
-
-class HTTPForbidden(Forbidden):
- pass
-
-
-class NotFound(HTTPException):
- """DEPRECATED"""
- code = 404
-
-
-class HTTPNotFound(NotFound):
- pass
-
-
-class HTTPMethodNotAllowed(HTTPException):
- code = 405
-
-
-class Conflict(HTTPException):
- """DEPRECATED"""
- code = 409
-
-
-class HTTPConflict(Conflict):
- pass
-
-
-class OverLimit(HTTPException):
- """DEPRECATED"""
- code = 413
-
-
-class HTTPOverLimit(OverLimit):
- pass
-
-
-class HTTPInternalServerError(HTTPException):
- code = 500
-
-
-class HTTPNotImplemented(HTTPException):
- code = 501
-
-
-class HTTPBadGateway(HTTPException):
- code = 502
-
-
-class ServiceUnavailable(HTTPException):
- """DEPRECATED"""
- code = 503
-
-
-class HTTPServiceUnavailable(ServiceUnavailable):
- pass
-
-
-#NOTE(bcwaldon): Build a mapping of HTTP codes to corresponding exception
-# classes
-_code_map = {}
-for obj_name in dir(sys.modules[__name__]):
- if obj_name.startswith('HTTP'):
- obj = getattr(sys.modules[__name__], obj_name)
- _code_map[obj.code] = obj
-
-
-def from_response(response):
- """Return an instance of an HTTPException based on httplib response."""
- cls = _code_map.get(response.status, HTTPException)
- return cls()
-
-
-class NoTokenLookupException(Exception):
- """DEPRECATED"""
- pass
-
-
-class EndpointNotFound(Exception):
- """DEPRECATED"""
- pass
diff --git a/python-glazierclient/glazierclient/common/http.py b/python-glazierclient/glazierclient/common/http.py
deleted file mode 100644
index 3f1e26f6..00000000
--- a/python-glazierclient/glazierclient/common/http.py
+++ /dev/null
@@ -1,275 +0,0 @@
-# Copyright 2012 OpenStack LLC.
-# All Rights Reserved.
-#
-# 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.
-
-import copy
-import httplib
-import logging
-import socket
-import StringIO
-import urlparse
-
-import os
-from glazierclient.common import exceptions
-
-
-try:
- import ssl
-except ImportError:
- #TODO(bcwaldon): Handle this failure more gracefully
- pass
-
-try:
- import json
-except ImportError:
- import simplejson as json
-
-# Python 2.5 compat fix
-if not hasattr(urlparse, 'parse_qsl'):
- import cgi
- urlparse.parse_qsl = cgi.parse_qsl
-
-LOG = logging.getLogger(__name__)
-USER_AGENT = 'python-glazierclient'
-CHUNKSIZE = 1024 * 64 # 64kB
-
-
-class HTTPClient(object):
-
- def __init__(self, endpoint, **kwargs):
- self.endpoint = endpoint
- self.auth_token = kwargs.get('token')
- self.connection_params = self.get_connection_params(endpoint, **kwargs)
-
- @staticmethod
- def get_connection_params(endpoint, **kwargs):
- parts = urlparse.urlparse(endpoint)
-
- _args = (parts.hostname, parts.port, parts.path)
- _kwargs = {'timeout': float(kwargs.get('timeout', 600))}
-
- if parts.scheme == 'https':
- _class = VerifiedHTTPSConnection
- _kwargs['ca_file'] = kwargs.get('ca_file', None)
- _kwargs['cert_file'] = kwargs.get('cert_file', None)
- _kwargs['key_file'] = kwargs.get('key_file', None)
- _kwargs['insecure'] = kwargs.get('insecure', False)
- elif parts.scheme == 'http':
- _class = httplib.HTTPConnection
- else:
- msg = 'Unsupported scheme: %s' % parts.scheme
- raise exceptions.InvalidEndpoint(msg)
-
- return (_class, _args, _kwargs)
-
- def get_connection(self):
- _class = self.connection_params[0]
- try:
- return _class(*self.connection_params[1],
- **self.connection_params[2])
- except httplib.InvalidURL:
- raise exceptions.InvalidEndpoint()
-
- def log_curl_request(self, method, url, kwargs):
- curl = ['curl -i -X %s' % method]
-
- for (key, value) in kwargs['headers'].items():
- header = '-H \'%s: %s\'' % (key, value)
- curl.append(header)
-
- conn_params_fmt = [
- ('key_file', '--key %s'),
- ('cert_file', '--cert %s'),
- ('ca_file', '--cacert %s'),
- ]
- for (key, fmt) in conn_params_fmt:
- value = self.connection_params[2].get(key)
- if value:
- curl.append(fmt % value)
-
- if self.connection_params[2].get('insecure'):
- curl.append('-k')
-
- if 'body' in kwargs:
- curl.append('-d \'%s\'' % kwargs['body'])
-
- curl.append('%s%s' % (self.endpoint, url))
- LOG.debug(' '.join(curl))
-
- @staticmethod
- def log_http_response(resp, body=None):
- status = (resp.version / 10.0, resp.status, resp.reason)
- dump = ['\nHTTP/%.1f %s %s' % status]
- dump.extend(['%s: %s' % (k, v) for k, v in resp.getheaders()])
- dump.append('')
- if body:
- dump.extend([body, ''])
- LOG.debug('\n'.join(dump))
-
- def _http_request(self, url, method, **kwargs):
- """ Send an http request with the specified characteristics.
-
- Wrapper around httplib.HTTP(S)Connection.request to handle tasks such
- as setting headers and error handling.
- """
- # Copy the kwargs so we can reuse the original in case of redirects
- kwargs['headers'] = copy.deepcopy(kwargs.get('headers', {}))
- kwargs['headers'].setdefault('User-Agent', USER_AGENT)
- if self.auth_token:
- kwargs['headers'].setdefault('X-Auth-Token', self.auth_token)
-
- self.log_curl_request(method, url, kwargs)
- conn = self.get_connection()
-
- try:
- conn_params = self.connection_params[1][2]
- conn_url = os.path.normpath('%s/%s' % (conn_params, url))
- conn.request(method, conn_url, **kwargs)
- resp = conn.getresponse()
- except socket.gaierror as e:
- message = "Error finding address for %(url)s: %(e)s" % locals()
- raise exceptions.InvalidEndpoint(message=message)
- except (socket.error, socket.timeout) as e:
- endpoint = self.endpoint
- message = "Error communicating with %(endpoint)s %(e)s" % locals()
- raise exceptions.CommunicationError(message=message)
-
- body_iter = ResponseBodyIterator(resp)
-
- # Read body into string if it isn't obviously image data
- if resp.getheader('content-type', None) != 'application/octet-stream':
- body_str = ''.join([chunk for chunk in body_iter])
- self.log_http_response(resp, body_str)
- body_iter = StringIO.StringIO(body_str)
- else:
- self.log_http_response(resp)
-
- if 400 <= resp.status < 600:
- LOG.warn("Request returned failure status.")
- raise exceptions.from_response(resp)
- elif resp.status in (301, 302, 305):
- # Redirected. Reissue the request to the new location.
- return self._http_request(resp['location'], method, **kwargs)
- elif resp.status == 300:
- raise exceptions.from_response(resp)
-
- return resp, body_iter
-
- def json_request(self, method, url, **kwargs):
- kwargs.setdefault('headers', {})
- kwargs['headers'].setdefault('Content-Type', 'application/json')
- kwargs['headers'].setdefault('Accept', 'application/json')
-
- if 'body' in kwargs:
- kwargs['body'] = json.dumps(kwargs['body'])
-
- resp, body_iter = self._http_request(url, method, **kwargs)
-
- if 'application/json' in resp.getheader('content-type', None):
- body = ''.join([chunk for chunk in body_iter])
- try:
- body = json.loads(body)
- except ValueError:
- LOG.error('Could not decode response body as JSON')
- else:
- body = None
-
- return resp, body
-
- def raw_request(self, method, url, **kwargs):
- kwargs.setdefault('headers', {})
- kwargs['headers'].setdefault('Content-Type',
- 'application/octet-stream')
- return self._http_request(url, method, **kwargs)
-
-
-class VerifiedHTTPSConnection(httplib.HTTPSConnection):
- """httplib-compatibile connection using client-side SSL authentication
-
- :see http://code.activestate.com/recipes/
- 577548-https-httplib-client-connection-with-certificate-v/
- """
-
- def __init__(self, host, port, key_file=None, cert_file=None,
- ca_file=None, timeout=None, insecure=False):
- httplib.HTTPSConnection.__init__(self, host, port, key_file=key_file,
- cert_file=cert_file)
- self.key_file = key_file
- self.cert_file = cert_file
- if ca_file is not None:
- self.ca_file = ca_file
- else:
- self.ca_file = self.get_system_ca_file()
- self.timeout = timeout
- self.insecure = insecure
-
- def connect(self):
- """
- Connect to a host on a given (SSL) port.
- If ca_file is pointing somewhere, use it to check Server Certificate.
-
- Redefined/copied and extended from httplib.py:1105 (Python 2.6.x).
- This is needed to pass cert_reqs=ssl.CERT_REQUIRED as parameter to
- ssl.wrap_socket(), which forces SSL to check server certificate against
- our client certificate.
- """
- sock = socket.create_connection((self.host, self.port), self.timeout)
-
- if self._tunnel_host:
- self.sock = sock
- self._tunnel()
-
- if self.insecure is True:
- kwargs = {'cert_reqs': ssl.CERT_NONE}
- else:
- kwargs = {'cert_reqs': ssl.CERT_REQUIRED, 'ca_certs': self.ca_file}
-
- if self.cert_file:
- kwargs['certfile'] = self.cert_file
- if self.key_file:
- kwargs['keyfile'] = self.key_file
-
- self.sock = ssl.wrap_socket(sock, **kwargs)
-
- @staticmethod
- def get_system_ca_file():
- """"Return path to system default CA file"""
- # Standard CA file locations for Debian/Ubuntu, RedHat/Fedora,
- # Suse, FreeBSD/OpenBSD
- ca_path = ['/etc/ssl/certs/ca-certificates.crt',
- '/etc/pki/tls/certs/ca-bundle.crt',
- '/etc/ssl/ca-bundle.pem',
- '/etc/ssl/cert.pem']
- for ca in ca_path:
- if os.path.exists(ca):
- return ca
- return None
-
-
-class ResponseBodyIterator(object):
- """A class that acts as an iterator over an HTTP response."""
-
- def __init__(self, resp):
- self.resp = resp
-
- def __iter__(self):
- while True:
- yield self.next()
-
- def next(self):
- chunk = self.resp.read(CHUNKSIZE)
- if chunk:
- return chunk
- else:
- raise StopIteration()
diff --git a/python-glazierclient/glazierclient/common/utils.py b/python-glazierclient/glazierclient/common/utils.py
deleted file mode 100644
index 7063e65f..00000000
--- a/python-glazierclient/glazierclient/common/utils.py
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright 2012 OpenStack LLC.
-# All Rights Reserved.
-#
-# 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.
-
-import sys
-import uuid
-
-import os
-from glazierclient.common import exceptions
-import prettytable
-from glazierclient.openstack.common import importutils
-
-
-# Decorator for cli-args
-def arg(*args, **kwargs):
- def _decorator(func):
- # Because of the sematics of decorator composition if we just append
- # to the options list positional options will appear to be backwards.
- func.__dict__.setdefault('arguments', []).insert(0, (args, kwargs))
- return func
- return _decorator
-
-
-def pretty_choice_list(l):
- return ', '.join("'%s'" % i for i in l)
-
-
-def print_list(objs, fields, field_labels, formatters={}, sortby=0):
- pt = prettytable.PrettyTable([f for f in field_labels], caching=False)
- pt.align = 'l'
-
- for o in objs:
- row = []
- for field in fields:
- if field in formatters:
- row.append(formatters[field](o))
- else:
- data = getattr(o, field, None) or ''
- row.append(data)
- pt.add_row(row)
- print pt.get_string(sortby=field_labels[sortby])
-
-
-def print_dict(d, formatters={}):
- pt = prettytable.PrettyTable(['Property', 'Value'], caching=False)
- pt.align = 'l'
-
- for field in d.keys():
- if field in formatters:
- pt.add_row([field, formatters[field](d[field])])
- else:
- pt.add_row([field, d[field]])
- print pt.get_string(sortby='Property')
-
-
-def find_resource(manager, name_or_id):
- """Helper for the _find_* methods."""
- # first try to get entity as integer id
- try:
- if isinstance(name_or_id, int) or name_or_id.isdigit():
- return manager.get(int(name_or_id))
- except exceptions.NotFound:
- pass
-
- # now try to get entity as uuid
- try:
- uuid.UUID(str(name_or_id))
- return manager.get(name_or_id)
- except (ValueError, exceptions.NotFound):
- pass
-
- # finally try to find entity by name
- try:
- return manager.find(name=name_or_id)
- except exceptions.NotFound:
- msg = "No %s with a name or ID of '%s' exists." % \
- (manager.resource_class.__name__.lower(), name_or_id)
- raise exceptions.CommandError(msg)
-
-
-def string_to_bool(arg):
- return arg.strip().lower() in ('t', 'true', 'yes', '1')
-
-
-def env(*vars, **kwargs):
- """Search for the first defined of possibly many env vars
-
- Returns the first environment variable defined in vars, or
- returns the default defined in kwargs.
- """
- for v in vars:
- value = os.environ.get(v, None)
- if value:
- return value
- return kwargs.get('default', '')
-
-
-def import_versioned_module(version, submodule=None):
- module = 'glazierclient.v%s' % version
- if submodule:
- module = '.'.join((module, submodule))
- return importutils.import_module(module)
-
-
-def exit(msg=''):
- if msg:
- print >> sys.stderr, msg
- sys.exit(1)
diff --git a/python-glazierclient/glazierclient/openstack/__init__.py b/python-glazierclient/glazierclient/openstack/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/python-glazierclient/glazierclient/openstack/common/__init__.py b/python-glazierclient/glazierclient/openstack/common/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/python-glazierclient/glazierclient/openstack/common/importutils.py b/python-glazierclient/glazierclient/openstack/common/importutils.py
deleted file mode 100644
index 9dec764f..00000000
--- a/python-glazierclient/glazierclient/openstack/common/importutils.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2011 OpenStack LLC.
-# All Rights Reserved.
-#
-# 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.
-
-"""
-Import related utilities and helper functions.
-"""
-
-import sys
-import traceback
-
-
-def import_class(import_str):
- """Returns a class from a string including module and class"""
- mod_str, _sep, class_str = import_str.rpartition('.')
- try:
- __import__(mod_str)
- return getattr(sys.modules[mod_str], class_str)
- except (ValueError, AttributeError):
- raise ImportError('Class %s cannot be found (%s)' %
- (class_str,
- traceback.format_exception(*sys.exc_info())))
-
-
-def import_object(import_str, *args, **kwargs):
- """Import a class and return an instance of it."""
- return import_class(import_str)(*args, **kwargs)
-
-
-def import_object_ns(name_space, import_str, *args, **kwargs):
- """
- Import a class and return an instance of it, first by trying
- to find the class in a default namespace, then failing back to
- a full path if not found in the default namespace.
- """
- import_value = "%s.%s" % (name_space, import_str)
- try:
- return import_class(import_value)(*args, **kwargs)
- except ImportError:
- return import_class(import_str)(*args, **kwargs)
-
-
-def import_module(import_str):
- """Import a module."""
- __import__(import_str)
- return sys.modules[import_str]
-
-
-def try_import(import_str, default=None):
- """Try to import a module and if it fails return default."""
- try:
- return import_module(import_str)
- except ImportError:
- return default
diff --git a/python-glazierclient/glazierclient/openstack/common/setup.py b/python-glazierclient/glazierclient/openstack/common/setup.py
deleted file mode 100644
index 80a0ecee..00000000
--- a/python-glazierclient/glazierclient/openstack/common/setup.py
+++ /dev/null
@@ -1,359 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2011 OpenStack LLC.
-# Copyright 2012-2013 Hewlett-Packard Development Company, L.P.
-# All Rights Reserved.
-#
-# 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.
-
-"""
-Utilities with minimum-depends for use in setup.py
-"""
-
-import email
-import os
-import re
-import subprocess
-import sys
-
-from setuptools.command import sdist
-
-
-def parse_mailmap(mailmap='.mailmap'):
- mapping = {}
- if os.path.exists(mailmap):
- with open(mailmap, 'r') as fp:
- for l in fp:
- try:
- canonical_email, alias = re.match(
- r'[^#]*?(<.+>).*(<.+>).*', l).groups()
- except AttributeError:
- continue
- mapping[alias] = canonical_email
- return mapping
-
-
-def _parse_git_mailmap(git_dir, mailmap='.mailmap'):
- mailmap = os.path.join(os.path.dirname(git_dir), mailmap)
- return parse_mailmap(mailmap)
-
-
-def canonicalize_emails(changelog, mapping):
- """Takes in a string and an email alias mapping and replaces all
- instances of the aliases in the string with their real email.
- """
- for alias, email_address in mapping.iteritems():
- changelog = changelog.replace(alias, email_address)
- return changelog
-
-
-# Get requirements from the first file that exists
-def get_reqs_from_files(requirements_files):
- for requirements_file in requirements_files:
- if os.path.exists(requirements_file):
- with open(requirements_file, 'r') as fil:
- return fil.read().split('\n')
- return []
-
-
-def parse_requirements(requirements_files=['requirements.txt',
- 'tools/pip-requires']):
- requirements = []
- for line in get_reqs_from_files(requirements_files):
- # For the requirements list, we need to inject only the portion
- # after egg= so that distutils knows the package it's looking for
- # such as:
- # -e git://github.com/openstack/nova/master#egg=nova
- if re.match(r'\s*-e\s+', line):
- requirements.append(re.sub(r'\s*-e\s+.*#egg=(.*)$', r'\1',
- line))
- # such as:
- # http://github.com/openstack/nova/zipball/master#egg=nova
- elif re.match(r'\s*https?:', line):
- requirements.append(re.sub(r'\s*https?:.*#egg=(.*)$', r'\1',
- line))
- # -f lines are for index locations, and don't get used here
- elif re.match(r'\s*-f\s+', line):
- pass
- # argparse is part of the standard library starting with 2.7
- # adding it to the requirements list screws distro installs
- elif line == 'argparse' and sys.version_info >= (2, 7):
- pass
- else:
- requirements.append(line)
-
- return requirements
-
-
-def parse_dependency_links(requirements_files=['requirements.txt',
- 'tools/pip-requires']):
- dependency_links = []
- # dependency_links inject alternate locations to find packages listed
- # in requirements
- for line in get_reqs_from_files(requirements_files):
- # skip comments and blank lines
- if re.match(r'(\s*#)|(\s*$)', line):
- continue
- # lines with -e or -f need the whole line, minus the flag
- if re.match(r'\s*-[ef]\s+', line):
- dependency_links.append(re.sub(r'\s*-[ef]\s+', '', line))
- # lines that are only urls can go in unmolested
- elif re.match(r'\s*https?:', line):
- dependency_links.append(line)
- return dependency_links
-
-
-def _run_shell_command(cmd, throw_on_error=False):
- if os.name == 'nt':
- output = subprocess.Popen(["cmd.exe", "/C", cmd],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- else:
- output = subprocess.Popen(["/bin/sh", "-c", cmd],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- out = output.communicate()
- if output.returncode and throw_on_error:
- raise Exception("%s returned %d" % cmd, output.returncode)
- if len(out) == 0:
- return None
- if len(out[0].strip()) == 0:
- return None
- return out[0].strip()
-
-
-def _get_git_directory():
- parent_dir = os.path.dirname(__file__)
- while True:
- git_dir = os.path.join(parent_dir, '.git')
- if os.path.exists(git_dir):
- return git_dir
- parent_dir, child = os.path.split(parent_dir)
- if not child: # reached to root dir
- return None
-
-
-def write_git_changelog():
- """Write a changelog based on the git changelog."""
- new_changelog = 'ChangeLog'
- git_dir = _get_git_directory()
- if not os.getenv('SKIP_WRITE_GIT_CHANGELOG'):
- if git_dir:
- git_log_cmd = 'git --git-dir=%s log --stat' % git_dir
- changelog = _run_shell_command(git_log_cmd)
- mailmap = _parse_git_mailmap(git_dir)
- with open(new_changelog, "w") as changelog_file:
- changelog_file.write(canonicalize_emails(changelog, mailmap))
- else:
- open(new_changelog, 'w').close()
-
-
-def generate_authors():
- """Create AUTHORS file using git commits."""
- jenkins_email = 'jenkins@review.(openstack|stackforge).org'
- old_authors = 'AUTHORS.in'
- new_authors = 'AUTHORS'
- git_dir = _get_git_directory()
- if not os.getenv('SKIP_GENERATE_AUTHORS'):
- if git_dir:
- # don't include jenkins email address in AUTHORS file
- git_log_cmd = ("git --git-dir=" + git_dir +
- " log --format='%aN <%aE>' | sort -u | "
- "egrep -v '" + jenkins_email + "'")
- changelog = _run_shell_command(git_log_cmd)
- mailmap = _parse_git_mailmap(git_dir)
- with open(new_authors, 'w') as new_authors_fh:
- new_authors_fh.write(canonicalize_emails(changelog, mailmap))
- if os.path.exists(old_authors):
- with open(old_authors, "r") as old_authors_fh:
- new_authors_fh.write('\n' + old_authors_fh.read())
- else:
- open(new_authors, 'w').close()
-
-
-_rst_template = """%(heading)s
-%(underline)s
-
-.. automodule:: %(module)s
- :members:
- :undoc-members:
- :show-inheritance:
-"""
-
-
-def get_cmdclass():
- """Return dict of commands to run from setup.py."""
-
- cmdclass = dict()
-
- def _find_modules(arg, dirname, files):
- for filename in files:
- if filename.endswith('.py') and filename != '__init__.py':
- arg["%s.%s" % (dirname.replace('/', '.'),
- filename[:-3])] = True
-
- class LocalSDist(sdist.sdist):
- """Builds the ChangeLog and Authors files from VC first."""
-
- def run(self):
- write_git_changelog()
- generate_authors()
- # sdist.sdist is an old style class, can't use super()
- sdist.sdist.run(self)
-
- cmdclass['sdist'] = LocalSDist
-
- # If Sphinx is installed on the box running setup.py,
- # enable setup.py to build the documentation, otherwise,
- # just ignore it
- try:
- from sphinx.setup_command import BuildDoc
-
- class LocalBuildDoc(BuildDoc):
-
- builders = ['html', 'man']
-
- def generate_autoindex(self):
- print "**Autodocumenting from %s" % os.path.abspath(os.curdir)
- modules = {}
- option_dict = self.distribution.get_option_dict('build_sphinx')
- source_dir = os.path.join(option_dict['source_dir'][1], 'api')
- if not os.path.exists(source_dir):
- os.makedirs(source_dir)
- for pkg in self.distribution.packages:
- if '.' not in pkg:
- os.path.walk(pkg, _find_modules, modules)
- module_list = modules.keys()
- module_list.sort()
- autoindex_filename = os.path.join(source_dir, 'autoindex.rst')
- with open(autoindex_filename, 'w') as autoindex:
- autoindex.write(""".. toctree::
- :maxdepth: 1
-
-""")
- for module in module_list:
- output_filename = os.path.join(source_dir,
- "%s.rst" % module)
- heading = "The :mod:`%s` Module" % module
- underline = "=" * len(heading)
- values = dict(module=module, heading=heading,
- underline=underline)
-
- print "Generating %s" % output_filename
- with open(output_filename, 'w') as output_file:
- output_file.write(_rst_template % values)
- autoindex.write(" %s.rst\n" % module)
-
- def run(self):
- if not os.getenv('SPHINX_DEBUG'):
- self.generate_autoindex()
-
- for builder in self.builders:
- self.builder = builder
- self.finalize_options()
- self.project = self.distribution.get_name()
- self.version = self.distribution.get_version()
- self.release = self.distribution.get_version()
- BuildDoc.run(self)
-
- class LocalBuildLatex(LocalBuildDoc):
- builders = ['latex']
-
- cmdclass['build_sphinx'] = LocalBuildDoc
- cmdclass['build_sphinx_latex'] = LocalBuildLatex
- except ImportError:
- pass
-
- return cmdclass
-
-
-def _get_revno(git_dir):
- """Return the number of commits since the most recent tag.
-
- We use git-describe to find this out, but if there are no
- tags then we fall back to counting commits since the beginning
- of time.
- """
- describe = _run_shell_command(
- "git --git-dir=%s describe --always" % git_dir)
- if "-" in describe:
- return describe.rsplit("-", 2)[-2]
-
- # no tags found
- revlist = _run_shell_command(
- "git --git-dir=%s rev-list --abbrev-commit HEAD" % git_dir)
- return len(revlist.splitlines())
-
-
-def _get_version_from_git(pre_version):
- """Return a version which is equal to the tag that's on the current
- revision if there is one, or tag plus number of additional revisions
- if the current revision has no tag."""
-
- git_dir = _get_git_directory()
- if git_dir:
- if pre_version:
- try:
- return _run_shell_command(
- "git --git-dir=" + git_dir + " describe --exact-match",
- throw_on_error=True).replace('-', '.')
- except Exception:
- sha = _run_shell_command(
- "git --git-dir=" + git_dir + " log -n1 --pretty=format:%h")
- return "%s.a%s.g%s" % (pre_version, _get_revno(git_dir), sha)
- else:
- return _run_shell_command(
- "git --git-dir=" + git_dir + " describe --always").replace(
- '-', '.')
- return None
-
-
-def _get_version_from_pkg_info(package_name):
- """Get the version from PKG-INFO file if we can."""
- try:
- pkg_info_file = open('PKG-INFO', 'r')
- except (IOError, OSError):
- return None
- try:
- pkg_info = email.message_from_file(pkg_info_file)
- except email.MessageError:
- return None
- # Check to make sure we're in our own dir
- if pkg_info.get('Name', None) != package_name:
- return None
- return pkg_info.get('Version', None)
-
-
-def get_version(package_name, pre_version=None):
- """Get the version of the project. First, try getting it from PKG-INFO, if
- it exists. If it does, that means we're in a distribution tarball or that
- install has happened. Otherwise, if there is no PKG-INFO file, pull the
- version from git.
-
- We do not support setup.py version sanity in git archive tarballs, nor do
- we support packagers directly sucking our git repo into theirs. We expect
- that a source tarball be made from our git repo - or that if someone wants
- to make a source tarball from a fork of our repo with additional tags in it
- that they understand and desire the results of doing that.
- """
- version = os.environ.get("OSLO_PACKAGE_VERSION", None)
- if version:
- return version
- version = _get_version_from_pkg_info(package_name)
- if version:
- return version
- version = _get_version_from_git(pre_version)
- if version:
- return version
- raise Exception("Versioning for this project requires either an sdist"
- " tarball, or access to an upstream git repository.")
diff --git a/python-glazierclient/glazierclient/openstack/common/version.py b/python-glazierclient/glazierclient/openstack/common/version.py
deleted file mode 100644
index d0cad115..00000000
--- a/python-glazierclient/glazierclient/openstack/common/version.py
+++ /dev/null
@@ -1,94 +0,0 @@
-
-# Copyright 2012 OpenStack LLC
-# Copyright 2012-2013 Hewlett-Packard Development Company, L.P.
-#
-# 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.
-
-"""
-Utilities for consuming the version from pkg_resources.
-"""
-
-import pkg_resources
-
-
-class VersionInfo(object):
-
- def __init__(self, package):
- """Object that understands versioning for a package
- :param package: name of the python package, such as glance, or
- python-glanceclient
- """
- self.package = package
- self.release = None
- self.version = None
- self._cached_version = None
-
- def __str__(self):
- """Make the VersionInfo object behave like a string."""
- return self.version_string()
-
- def __repr__(self):
- """Include the name."""
- return "VersionInfo(%s:%s)" % (self.package, self.version_string())
-
- def _get_version_from_pkg_resources(self):
- """Get the version of the package from the pkg_resources record
- associated with the package."""
- try:
- requirement = pkg_resources.Requirement.parse(self.package)
- provider = pkg_resources.get_provider(requirement)
- return provider.version
- except pkg_resources.DistributionNotFound:
- # The most likely cause for this is running tests in a tree
- # produced from a tarball where the package itself has not been
- # installed into anything. Revert to setup-time logic.
- from glazierclient.openstack.common import setup
- return setup.get_version(self.package)
-
- def release_string(self):
- """Return the full version of the package including suffixes indicating
- VCS status.
- """
- if self.release is None:
- self.release = self._get_version_from_pkg_resources()
-
- return self.release
-
- def version_string(self):
- """Return the short version minus any alpha/beta tags."""
- if self.version is None:
- parts = []
- for part in self.release_string().split('.'):
- if part[0].isdigit():
- parts.append(part)
- else:
- break
- self.version = ".".join(parts)
-
- return self.version
-
- # Compatibility functions
- canonical_version_string = version_string
- version_string_with_vcs = release_string
-
- def cached_version_string(self, prefix=""):
- """Generate an object which will expand in a string context to
- the results of version_string(). We do this so that don't
- call into pkg_resources every time we start up a program when
- passing version information into the CONF constructor, but
- rather only do the calculation when and if a version is requested
- """
- if not self._cached_version:
- self._cached_version = "%s%s" % (prefix,
- self.version_string())
- return self._cached_version
diff --git a/python-glazierclient/glazierclient/shell.py b/python-glazierclient/glazierclient/shell.py
deleted file mode 100644
index bbadc89d..00000000
--- a/python-glazierclient/glazierclient/shell.py
+++ /dev/null
@@ -1,314 +0,0 @@
-# Copyright (c) 2013 Mirantis, Inc.
-#
-# 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.
-
-"""
-Command-line interface to the Glazier Project.
-"""
-
-import argparse
-import logging
-import sys
-
-import httplib2
-from keystoneclient.v2_0 import client as ksclient
-from glazierclient import client as glazierclient
-from glazierclient.common import utils, exceptions
-
-
-logger = logging.getLogger(__name__)
-
-
-class GlazierShell(object):
- def get_base_parser(self):
- parser = argparse.ArgumentParser(
- prog='glazier',
- description=__doc__.strip(),
- epilog='See glazier help COMMAND" '
- 'for help on a specific command.',
- add_help=False,
- formatter_class=HelpFormatter,
- )
-
- # Global arguments
- parser.add_argument('-h', '--help',
- action='store_true',
- help=argparse.SUPPRESS,)
-
- parser.add_argument('-d', '--debug',
- default=bool(utils.env('GLAZIERCLIENT_DEBUG')),
- action='store_true',
- help='Defaults to env[GLAZIERCLIENT_DEBUG]')
-
- parser.add_argument('-v', '--verbose',
- default=False, action="store_true",
- help="Print more verbose output")
-
- parser.add_argument('-k', '--insecure',
- default=False,
- action='store_true',
- help="Explicitly allow glazierclient to perform "
- "\"insecure\" SSL (https) requests. "
- "The server's certificate will "
- "not be verified against any certificate "
- "authorities. This option should be used "
- "with caution.")
-
- parser.add_argument('--cert-file',
- help='Path of certificate file to use in SSL '
- 'connection. This file can optionally be '
- 'prepended with the private key.')
-
- parser.add_argument('--key-file',
- help='Path of client key to use in SSL connection.'
- ' This option is not necessary if your '
- 'key is prepended to your cert file.')
-
- parser.add_argument('--ca-file',
- help='Path of CA SSL certificate(s) used to verify'
- ' the remote server certificate. Without '
- 'this option glance looks for the default '
- 'system CA certificates.')
-
- parser.add_argument('--timeout',
- default=600,
- help='Number of seconds to wait for a response')
-
- parser.add_argument('--os-username',
- default=utils.env('OS_USERNAME'),
- help='Defaults to env[OS_USERNAME]')
-
- parser.add_argument('--os-password',
- default=utils.env('OS_PASSWORD'),
- help='Defaults to env[OS_PASSWORD]')
-
- parser.add_argument('--os-tenant-id',
- default=utils.env('OS_TENANT_ID'),
- help='Defaults to env[OS_TENANT_ID]')
-
- parser.add_argument('--os-tenant-name',
- default=utils.env('OS_TENANT_NAME'),
- help='Defaults to env[OS_TENANT_NAME]')
-
- parser.add_argument('--os-auth-url',
- default=utils.env('OS_AUTH_URL'),
- help='Defaults to env[OS_AUTH_URL]')
-
- parser.add_argument('--os-region-name',
- default=utils.env('OS_REGION_NAME'),
- help='Defaults to env[OS_REGION_NAME]')
-
- parser.add_argument('--os-auth-token',
- default=utils.env('OS_AUTH_TOKEN'),
- help='Defaults to env[OS_AUTH_TOKEN]')
-
- parser.add_argument('--glazier-url',
- default=utils.env('GLAZIER_URL'),
- help='Defaults to env[GLAZIER_URL]')
-
- parser.add_argument('--glazier-api-version',
- default=utils.env(
- 'GLAZIER_API_VERSION', default='1'),
- help='Defaults to env[GLAZIER_API_VERSION] '
- 'or 1')
-
- parser.add_argument('--os-service-type',
- default=utils.env('OS_SERVICE_TYPE'),
- help='Defaults to env[OS_SERVICE_TYPE]')
-
- parser.add_argument('--os-endpoint-type',
- default=utils.env('OS_ENDPOINT_TYPE'),
- help='Defaults to env[OS_ENDPOINT_TYPE]')
-
- return parser
-
- def get_subcommand_parser(self, version):
- parser = self.get_base_parser()
-
- self.subcommands = {}
- subparsers = parser.add_subparsers(metavar='')
- submodule = utils.import_versioned_module(version, 'shell')
- self._find_actions(subparsers, submodule)
- self._find_actions(subparsers, self)
-
- return parser
-
- def _find_actions(self, subparsers, actions_module):
- for attr in (a for a in dir(actions_module) if a.startswith('do_')):
- # I prefer to be hypen-separated instead of underscores.
- command = attr[3:].replace('_', '-')
- callback = getattr(actions_module, attr)
- desc = callback.__doc__ or ''
- help = desc.strip().split('\n')[0]
- arguments = getattr(callback, 'arguments', [])
-
- subparser = subparsers.add_parser(command, help=help,
- description=desc,
- add_help=False,
- formatter_class=HelpFormatter)
- subparser.add_argument('-h', '--help', action='help',
- help=argparse.SUPPRESS)
- self.subcommands[command] = subparser
- for (args, kwargs) in arguments:
- subparser.add_argument(*args, **kwargs)
- subparser.set_defaults(func=callback)
-
- def _get_ksclient(self, **kwargs):
- """Get an endpoint and auth token from Keystone.
-
- :param username: name of user
- :param password: user's password
- :param tenant_id: unique identifier of tenant
- :param tenant_name: name of tenant
- :param auth_url: endpoint to authenticate against
- """
- return ksclient.Client(username=kwargs.get('username'),
- password=kwargs.get('password'),
- tenant_id=kwargs.get('tenant_id'),
- tenant_name=kwargs.get('tenant_name'),
- auth_url=kwargs.get('auth_url'),
- insecure=kwargs.get('insecure'))
-
- def _get_endpoint(self, client, **kwargs):
- """Get an endpoint using the provided keystone client."""
- return client.service_catalog.url_for(
- service_type=kwargs.get('service_type') or 'metering',
- endpoint_type=kwargs.get('endpoint_type') or 'publicURL')
-
- def _setup_debugging(self, debug):
- if debug:
- logging.basicConfig(
- format="%(levelname)s (%(module)s:%(lineno)d) %(message)s",
- level=logging.DEBUG)
-
- httplib2.debuglevel = 1
- else:
- logging.basicConfig(
- format="%(levelname)s %(message)s",
- level=logging.INFO)
-
- def main(self, argv):
- # Parse args once to find version
- parser = self.get_base_parser()
- (options, args) = parser.parse_known_args(argv)
- self._setup_debugging(options.debug)
-
- # build available subcommands based on version
- api_version = options.glazier_api_version
- subcommand_parser = self.get_subcommand_parser(api_version)
- self.parser = subcommand_parser
-
- # Handle top-level --help/-h before attempting to parse
- # a command off the command line
- if options.help or not argv:
- self.do_help(options)
- return 0
-
- # Parse args again and call whatever callback was selected
- args = subcommand_parser.parse_args(argv)
-
- # Short-circuit and deal with help command right away.
- if args.func == self.do_help:
- self.do_help(args)
- return 0
-
- if args.os_auth_token and args.glazier_url:
- token = args.os_auth_token
- endpoint = args.glazier_url
- else:
- if not args.os_username:
- raise exceptions.CommandError("You must provide a username "
- "via either --os-username "
- "or via env[OS_USERNAME]")
-
- if not args.os_password:
- raise exceptions.CommandError("You must provide a password "
- "via either --os-password "
- "or via env[OS_PASSWORD]")
-
- if not (args.os_tenant_id or args.os_tenant_name):
- raise exceptions.CommandError("You must provide a tenant_id "
- "via either --os-tenant-id "
- "or via env[OS_TENANT_ID]")
-
- if not args.os_auth_url:
- raise exceptions.CommandError("You must provide an auth url "
- "via either --os-auth-url or "
- "via env[OS_AUTH_URL]")
- kwargs = {
- 'username': args.os_username,
- 'password': args.os_password,
- 'tenant_id': args.os_tenant_id,
- 'tenant_name': args.os_tenant_name,
- 'auth_url': args.os_auth_url,
- 'service_type': args.os_service_type,
- 'endpoint_type': args.os_endpoint_type,
- 'insecure': args.insecure
- }
- _ksclient = self._get_ksclient(**kwargs)
- token = args.os_auth_token or _ksclient.auth_token
-
- url = args.glazier_url
- endpoint = url or self._get_endpoint(_ksclient, **kwargs)
-
- kwargs = {
- 'token': token,
- 'insecure': args.insecure,
- 'timeout': args.timeout,
- 'ca_file': args.ca_file,
- 'cert_file': args.cert_file,
- 'key_file': args.key_file,
- }
-
- client = glazierclient.Client(api_version, endpoint, **kwargs)
-
- try:
- args.func(client, args)
- except exceptions.Unauthorized:
- msg = "Invalid OpenStack Identity credentials."
- raise exceptions.CommandError(msg)
-
- @utils.arg('command', metavar='', nargs='?',
- help='Display help for ')
- def do_help(self, args):
- """
- Display help about this program or one of its subcommands.
- """
- if getattr(args, 'command', None):
- if args.command in self.subcommands:
- self.subcommands[args.command].print_help()
- else:
- msg = "'%s' is not a valid subcommand"
- raise exceptions.CommandError(msg % args.command)
- else:
- self.parser.print_help()
-
-
-class HelpFormatter(argparse.HelpFormatter):
- def start_section(self, heading):
- # Title-case the headings
- heading = '%s%s' % (heading[0].upper(), heading[1:])
- super(HelpFormatter, self).start_section(heading)
-
-
-def main():
- try:
- GlazierShell().main(sys.argv[1:])
-
- except Exception, e:
- print >> sys.stderr, e
- sys.exit(1)
-
-
-if __name__ == "__main__":
- main()
diff --git a/python-glazierclient/glazierclient/v1/__init__.py b/python-glazierclient/glazierclient/v1/__init__.py
deleted file mode 100644
index dbe3f042..00000000
--- a/python-glazierclient/glazierclient/v1/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright (c) 2013 Mirantis, Inc.
-#
-# 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.
-
-from glazierclient.v1.client import Client
diff --git a/python-glazierclient/glazierclient/v1/client.py b/python-glazierclient/glazierclient/v1/client.py
deleted file mode 100644
index 960691ce..00000000
--- a/python-glazierclient/glazierclient/v1/client.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright (c) 2013 Mirantis, Inc.
-#
-# 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.
-
-from glazierclient.common import http
-from glazierclient.v1 import environments, sessions, services
-
-
-class Client(http.HTTPClient):
- """Client for the Glazier v1 API.
-
- :param string endpoint: A user-supplied endpoint URL for the service.
- :param string token: Token for authentication.
- :param integer timeout: Allows customization of the timeout for client
- http requests. (optional)
- """
-
- def __init__(self, *args, **kwargs):
- """ Initialize a new client for the Glazier v1 API. """
- super(Client, self).__init__(*args, **kwargs)
- self.environments = environments.EnvironmentManager(self)
- self.sessions = sessions.SessionManager(self)
- self.activeDirectories = services.ActiveDirectoryManager(self)
- self.webServers = services.WebServerManager(self)
diff --git a/python-glazierclient/glazierclient/v1/environments.py b/python-glazierclient/glazierclient/v1/environments.py
deleted file mode 100644
index 43705c01..00000000
--- a/python-glazierclient/glazierclient/v1/environments.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright (c) 2013 Mirantis, Inc.
-#
-# 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.
-
-from glazierclient.common import base
-
-
-class Environment(base.Resource):
- def __repr__(self):
- return "" % self._info
-
- def data(self, **kwargs):
- return self.manager.data(self, **kwargs)
-
-
-class EnvironmentManager(base.Manager):
- resource_class = Environment
-
- def list(self):
- return self._list('environments', 'environments')
-
- def create(self, name):
- return self._create('environments', {'name': name})
-
- def update(self, environment_id, name):
- return self._update('environments/{id}'.format(id=environment_id),
- {'name': name})
-
- def delete(self, environment_id):
- return self._delete('environments/{id}'.format(id=environment_id))
-
- def get(self, environment_id):
- return self._get("environments/{id}".format(id=environment_id))
diff --git a/python-glazierclient/glazierclient/v1/services.py b/python-glazierclient/glazierclient/v1/services.py
deleted file mode 100644
index 39874a68..00000000
--- a/python-glazierclient/glazierclient/v1/services.py
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright (c) 2013 Mirantis, Inc.
-#
-# 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.
-
-from glazierclient.common import base
-
-
-class ActiveDirectory(base.Resource):
- def __repr__(self):
- return '' % self._info
-
- def data(self, **kwargs):
- return self.manager.data(self, **kwargs)
-
-
-class ActiveDirectoryManager(base.Manager):
- resource_class = ActiveDirectory
-
- def list(self, environment_id, session_id=None):
- if session_id:
- headers = {'X-Configuration-Session': session_id}
- else:
- headers = {}
-
- return self._list('environments/{id}/activeDirectories'.
- format(id=environment_id),
- 'activeDirectories',
- headers=headers)
-
- def create(self, environment_id, session_id, active_directory):
- headers = {'X-Configuration-Session': session_id}
-
- return self._create('environments/{id}/activeDirectories'.
- format(id=environment_id),
- active_directory,
- headers=headers)
-
- def delete(self, environment_id, session_id, service_id):
- headers = {'X-Configuration-Session': session_id}
- path = 'environments/{id}/activeDirectories/{active_directory_id}'
- path = path.format(id=environment_id, active_directory_id=service_id)
-
- return self._delete(path, headers=headers)
-
-
-class WebServer(base.Resource):
- def __repr__(self):
- return '' % self._info
-
- def data(self, **kwargs):
- return self.manager.data(self, **kwargs)
-
-
-class WebServerManager(base.Manager):
- resource_class = WebServer
-
- def list(self, environment_id, session_id=None):
- if session_id:
- headers = {'X-Configuration-Session': session_id}
- else:
- headers = {}
-
- return self._list('environments/{id}/webServers'.
- format(id=environment_id),
- 'webServers',
- headers=headers)
-
- def create(self, environment_id, session_id, web_server):
- headers = {'X-Configuration-Session': session_id}
-
- return self._create('environments/{id}/webServers'.
- format(id=environment_id),
- web_server,
- headers=headers)
-
- def delete(self, environment_id, session_id, service_id):
- headers = {'X-Configuration-Session': session_id}
-
- return self._delete('environments/{id}/webServers/{web_server_id}'
- .format(id=environment_id,
- web_server_id=service_id),
- headers=headers)
diff --git a/python-glazierclient/glazierclient/v1/sessions.py b/python-glazierclient/glazierclient/v1/sessions.py
deleted file mode 100644
index 2efcf7f3..00000000
--- a/python-glazierclient/glazierclient/v1/sessions.py
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright (c) 2013 Mirantis, Inc.
-#
-# 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.
-
-from glazierclient.common import base
-
-
-class Session(base.Resource):
- def __repr__(self):
- return '' % self._info
-
- def data(self, **kwargs):
- return self.manager.data(self, **kwargs)
-
-
-class Status(base.Resource):
- def __repr__(self):
- return '' % self._info
-
- def data(self, **kwargs):
- return self.manager.data(self, **kwargs)
-
-
-class SessionManager(base.Manager):
- resource_class = Session
-
- def list(self, environment_id):
- return self._list('environments/{id}/sessions'.
- format(id=environment_id), 'sessions')
-
- def get(self, environment_id, session_id):
- return self._get('environments/{id}/sessions/{session_id}'.
- format(id=environment_id, session_id=session_id))
-
- def configure(self, environment_id):
- return self._create('environments/{id}/configure'.
- format(id=environment_id), None)
-
- def deploy(self, environment_id, session_id):
- path = 'environments/{id}/sessions/{session_id}/deploy'
- self.api.json_request('POST',
- path.format(id=environment_id,
- session_id=session_id))
-
- def reports(self, environment_id, session_id, service_id=None):
- path = 'environments/{id}/sessions/{session_id}/reports'
- path = path.format(id=environment_id, session_id=session_id)
- if service_id:
- path += '?service_id={0}'.format(service_id)
-
- resp, body = self.api.json_request('GET', path)
-
- data = body.get('reports', [])
- return [Status(self, res, loaded=True) for res in data if res]
-
- def delete(self, environment_id, session_id):
- return self._delete("environments/{id}/sessions/{session_id}".
- format(id=environment_id, session_id=session_id))
diff --git a/python-glazierclient/glazierclient/v1/shell.py b/python-glazierclient/glazierclient/v1/shell.py
deleted file mode 100644
index 8f4a619c..00000000
--- a/python-glazierclient/glazierclient/v1/shell.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright (c) 2013 Mirantis, Inc.
-#
-# 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.
-
-from glazierclient.common import utils
-
-
-def do_environment_list(cc, args={}):
- """List the environments"""
- environments = cc.environments.list()
- field_labels = ['ID', 'Name', 'Created', 'Updated']
- fields = ['id', 'name', 'created', 'updated']
- utils.print_list(environments, fields, field_labels, sortby=0)
diff --git a/python-glazierclient/glazierclient/version.py b/python-glazierclient/glazierclient/version.py
deleted file mode 100644
index 8c38a387..00000000
--- a/python-glazierclient/glazierclient/version.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright (c) 2013 Mirantis, Inc.
-#
-# 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.
-
-
-from glazierclient.openstack.common import version as common_version
-
-version_info = common_version.VersionInfo('python-glazierclient')
diff --git a/python-glazierclient/openstack-common.conf b/python-glazierclient/openstack-common.conf
deleted file mode 100644
index eefdecce..00000000
--- a/python-glazierclient/openstack-common.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-[DEFAULT]
-
-# The list of modules to copy from openstack-common
-modules=setup,importutils,version
-
-# The base module to hold the copy of openstack.common
-base=glazierclient
diff --git a/python-glazierclient/run_tests.sh b/python-glazierclient/run_tests.sh
deleted file mode 100755
index 1e790721..00000000
--- a/python-glazierclient/run_tests.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-
-function usage {
- echo "Usage: $0 [OPTION]..."
- echo "Run python-glazierclient's test suite(s)"
- echo ""
- echo " -p, --pep8 Just run pep8"
- echo " -h, --help Print this usage message"
- echo ""
- echo "This script is deprecated and currently retained for compatibility."
- echo 'You can run the full test suite for multiple environments by running "tox".'
- echo 'You can run tests for only python 2.7 by running "tox -e py27", or run only'
- echo 'the pep8 tests with "tox -e pep8".'
- exit
-}
-
-command -v tox > /dev/null 2>&1
-if [ $? -ne 0 ]; then
- echo 'This script requires "tox" to run.'
- echo 'You can install it with "pip install tox".'
- exit 1;
-fi
-
-just_pep8=0
-
-function process_option {
- case "$1" in
- -h|--help) usage;;
- -p|--pep8) let just_pep8=1;;
- esac
-}
-
-for arg in "$@"; do
- process_option $arg
-done
-
-if [ $just_pep8 -eq 1 ]; then
- tox -e pep8
- exit
-fi
-
-tox -e py27 $toxargs 2>&1 | tee run_tests.err.log || exit
-if [ ${PIPESTATUS[0]} -ne 0 ]; then
- exit ${PIPESTATUS[0]}
-fi
-
-if [ -z "$toxargs" ]; then
- tox -e pep8
-fi
diff --git a/python-glazierclient/setup.cfg b/python-glazierclient/setup.cfg
deleted file mode 100644
index 78493eca..00000000
--- a/python-glazierclient/setup.cfg
+++ /dev/null
@@ -1,15 +0,0 @@
-[nosetests]
-cover-package = glazierclient
-cover-html = true
-cover-erase = true
-cover-inclusive = true
-verbosity=2
-detailed-errors=1
-
-[build_sphinx]
-source-dir = doc/source
-build-dir = doc/build
-all_files = 1
-
-[upload_sphinx]
-upload-dir = doc/build/html
diff --git a/python-glazierclient/setup.py b/python-glazierclient/setup.py
deleted file mode 100644
index 56cbead2..00000000
--- a/python-glazierclient/setup.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (c) 2013 Mirantis, Inc.
-#
-# 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.
-
-import setuptools
-
-from glazierclient.openstack.common import setup
-
-project = 'python-glazierclient'
-
-
-setuptools.setup(
- name=project,
- version=setup.get_version(project, '2013.1'),
- author='Mirantis, Inc.',
- author_email='smelikyan@mirantis.com',
- description="Client library for Glazier Project",
- license='Apache',
- url='http://glazier.mirantis.com/',
- packages=setuptools.find_packages(exclude=['tests', 'tests.*']),
- include_package_data=True,
- install_requires=setup.parse_requirements(),
- test_suite="nose.collector",
- cmdclass=setup.get_cmdclass(),
- classifiers=[
- 'Development Status :: 4 - Beta',
- 'Environment :: Console',
- 'Intended Audience :: Developers',
- 'Intended Audience :: Information Technology',
- 'License :: OSI Approved :: Apache Software License',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python',
- ],
- entry_points={
- 'console_scripts': ['glazier = glazierclient.shell:main']
- },
- dependency_links=setup.parse_dependency_links(),
- tests_require=setup.parse_requirements(['tools/test-requires']),
- setup_requires=['setuptools-git>=0.4'],
-)
diff --git a/python-glazierclient/tests/__init__.py b/python-glazierclient/tests/__init__.py
deleted file mode 100644
index 207fa154..00000000
--- a/python-glazierclient/tests/__init__.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright (c) 2013 Mirantis, Inc.
-#
-# 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.
\ No newline at end of file
diff --git a/python-glazierclient/tests/glazierclient/__init__.py b/python-glazierclient/tests/glazierclient/__init__.py
deleted file mode 100644
index 207fa154..00000000
--- a/python-glazierclient/tests/glazierclient/__init__.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright (c) 2013 Mirantis, Inc.
-#
-# 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.
\ No newline at end of file
diff --git a/python-glazierclient/tests/glazierclient/test_client_with_fake_http.py b/python-glazierclient/tests/glazierclient/test_client_with_fake_http.py
deleted file mode 100644
index 7c7eaad1..00000000
--- a/python-glazierclient/tests/glazierclient/test_client_with_fake_http.py
+++ /dev/null
@@ -1,208 +0,0 @@
-# Copyright (c) 2013 Mirantis, Inc.
-#
-# 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.
-
-import unittest
-import logging
-from httpretty import HTTPretty, httprettified
-from glazierclient.client import Client
-
-
-LOG = logging.getLogger('Unit tests')
-
-
-class UnitTestsForClassesAndFunctions(unittest.TestCase):
-
- @httprettified
- def test_client_env_list_with_empty_list(self):
- HTTPretty.register_uri(HTTPretty.GET,
- "http://no-resolved-host:8001/environments",
- body='{"environments": []}',
- adding_headers={
- 'Content-Type': 'application/json',})
- endpoint = 'http://no-resolved-host:8001'
- test_client = Client('1', endpoint=endpoint, token='1', timeout=10)
-
- result = test_client.environments.list()
- assert result == []
-
- @httprettified
- def test_client_env_list_with_elements(self):
- body = ('{"environments":['
- '{"id": "0ce373a477f211e187a55404a662f968",'
- '"name": "dc1",'
- '"created": "2010-11-30T03:23:42Z",'
- '"updated": "2010-11-30T03:23:44Z",'
- '"tenant-id": "0849006f7ce94961b3aab4e46d6f229a"},'
- '{"id": "0ce373a477f211e187a55404a662f961",'
- '"name": "dc2",'
- '"created": "2010-11-30T03:23:42Z",'
- '"updated": "2010-11-30T03:23:44Z",'
- '"tenant-id": "0849006f7ce94961b3aab4e4626f229a"}'
- ']}')
- HTTPretty.register_uri(HTTPretty.GET,
- "http://no-resolved-host:8001/environments",
- body=body,
- adding_headers={
- 'Content-Type': 'application/json',})
- endpoint = 'http://no-resolved-host:8001'
- test_client = Client('1', endpoint=endpoint, token='1', timeout=10)
-
- result = test_client.environments.list()
- assert result[0].name == 'dc1'
- assert result[-1].name == 'dc2'
-
- @httprettified
- def test_client_env_create(self):
- body = ('{"id": "0ce373a477f211e187a55404a662f968",'
- '"name": "test",'
- '"created": "2010-11-30T03:23:42Z",'
- '"updated": "2010-11-30T03:23:44Z",'
- '"tenant-id": "0849006f7ce94961b3aab4e46d6f229a"}'
- )
- HTTPretty.register_uri(HTTPretty.POST,
- "http://no-resolved-host:8001/environments",
- body=body,
- adding_headers={
- 'Content-Type': 'application/json',})
- endpoint = 'http://no-resolved-host:8001'
- test_client = Client('1', endpoint=endpoint, token='1', timeout=10)
-
- result = test_client.environments.create('test')
- assert result.name == 'test'
-
- @httprettified
- def test_client_ad_list(self):
- body = ('{"activeDirectories": [{'
- '"id": "1",'
- '"name": "dc1",'
- '"created": "2010-11-30T03:23:42Z",'
- '"updated": "2010-11-30T03:23:44Z",'
- '"configuration": "standalone",'
- '"units": [{'
- '"id": "0ce373a477f211e187a55404a662f961",'
- '"type": "master",'
- '"location": "test"}]}]}')
- url = ("http://no-resolved-host:8001/environments"
- "/1/activeDirectories")
- HTTPretty.register_uri(HTTPretty.GET, url,
- body=body,
- adding_headers={
- 'Content-Type': 'application/json',})
- endpoint = 'http://no-resolved-host:8001'
- test_client = Client('1', endpoint=endpoint, token='1', timeout=10)
-
- result = test_client.activeDirectories.list('1', 'test')
- assert result[0].name == 'dc1'
-
- @httprettified
- def test_client_ad_create(self):
- body = ('{'
- '"id": "1",'
- '"name": "ad1",'
- '"created": "2010-11-30T03:23:42Z",'
- '"updated": "2010-11-30T03:23:44Z",'
- '"configuration": "standalone",'
- '"units": [{'
- '"id": "0ce373a477f211e187a55404a662f961",'
- '"type": "master",'
- '"location": "test"}]}')
- url = ("http://no-resolved-host:8001/environments"
- "/1/activeDirectories")
- HTTPretty.register_uri(HTTPretty.POST, url,
- body=body,
- adding_headers={
- 'Content-Type': 'application/json',})
- endpoint = 'http://no-resolved-host:8001'
- test_client = Client('1', endpoint=endpoint, token='1', timeout=10)
-
- result = test_client.activeDirectories.create('1', 'test', 'ad1')
- assert result.name == 'ad1'
-
- @httprettified
- def test_client_ad_list_without_elements(self):
- body = ('{"activeDirectories": []}')
- url = ("http://no-resolved-host:8001/environments"
- "/1/activeDirectories")
- HTTPretty.register_uri(HTTPretty.GET, url,
- body=body,
- adding_headers={
- 'Content-Type': 'application/json',})
- endpoint = 'http://no-resolved-host:8001'
- test_client = Client('1', endpoint=endpoint, token='1', timeout=10)
-
- result = test_client.activeDirectories.list('1', 'test')
- assert result == []
-
- @httprettified
- def test_client_iis_list(self):
- body = ('{"webServers": [{'
- '"id": "1",'
- '"name": "iis11",'
- '"created": "2010-11-30T03:23:42Z",'
- '"updated": "2010-11-30T03:23:44Z",'
- '"domain": "acme",'
- '"units": [{'
- '"id": "0ce373a477f211e187a55404a662f961",'
- '"endpoint": {"host": "1.1.1.1"},'
- '"location": "test"}]}]}')
- url = ("http://no-resolved-host:8001/environments"
- "/1/webServers")
- HTTPretty.register_uri(HTTPretty.GET, url,
- body=body,
- adding_headers={
- 'Content-Type': 'application/json',})
- endpoint = 'http://no-resolved-host:8001'
- test_client = Client('1', endpoint=endpoint, token='1', timeout=10)
-
- result = test_client.webServers.list('1', 'test')
- assert result[0].name == 'iis11'
-
- @httprettified
- def test_client_iis_create(self):
- body = ('{'
- '"id": "1",'
- '"name": "iis12",'
- '"created": "2010-11-30T03:23:42Z",'
- '"updated": "2010-11-30T03:23:44Z",'
- '"domain": "acme",'
- '"units": [{'
- '"id": "0ce373a477f211e187a55404a662f961",'
- '"endpoint": {"host": "1.1.1.1"},'
- '"location": "test"}]}')
- url = ("http://no-resolved-host:8001/environments"
- "/1/webServers")
- HTTPretty.register_uri(HTTPretty.POST, url,
- body=body,
- adding_headers={
- 'Content-Type': 'application/json',})
- endpoint = 'http://no-resolved-host:8001'
- test_client = Client('1', endpoint=endpoint, token='1', timeout=10)
-
- result = test_client.webServers.create('1', 'test', 'iis12')
- assert result.name == 'iis12'
-
- @httprettified
- def test_client_iis_list_without_elements(self):
- body = ('{"webServers": []}')
- url = ("http://no-resolved-host:8001/environments"
- "/1/webServers")
- HTTPretty.register_uri(HTTPretty.GET, url,
- body=body,
- adding_headers={
- 'Content-Type': 'application/json',})
- endpoint = 'http://no-resolved-host:8001'
- test_client = Client('1', endpoint=endpoint, token='1', timeout=10)
-
- result = test_client.webServers.list('1', 'test')
- assert result == []
diff --git a/python-glazierclient/tests/glazierclient/test_methods.py b/python-glazierclient/tests/glazierclient/test_methods.py
deleted file mode 100644
index 31b9751b..00000000
--- a/python-glazierclient/tests/glazierclient/test_methods.py
+++ /dev/null
@@ -1,481 +0,0 @@
-# Copyright (c) 2013 Mirantis, Inc.
-#
-# 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.
-
-import unittest
-import logging
-from mock import MagicMock
-
-from glazierclient.client import Client
-import glazierclient.v1.environments as environments
-import glazierclient.v1.services as services
-import glazierclient.v1.sessions as sessions
-
-def my_mock(*a, **b):
- return [a, b]
-
-LOG = logging.getLogger('Unit tests')
-api = MagicMock(json_request=my_mock)
-
-
-class UnitTestsForClassesAndFunctions(unittest.TestCase):
-
- def test_create_client_instance(self):
-
- endpoint = 'http://no-resolved-host:8001'
- test_client = Client('1', endpoint=endpoint, token='1', timeout=10)
-
- assert test_client.environments is not None
- assert test_client.sessions is not None
- assert test_client.activeDirectories is not None
- assert test_client.webServers is not None
-
- def test_env_manager_list(self):
- manager = environments.EnvironmentManager(api)
- result = manager.list()
- assert result == []
-
- def test_env_manager_create(self):
- manager = environments.EnvironmentManager(api)
- result = manager.create('test')
- assert result.body == {'name': 'test'}
-
- def test_env_manager_create_with_named_parameters(self):
- manager = environments.EnvironmentManager(api)
- result = manager.create(name='test')
- assert result.body == {'name': 'test'}
-
- def test_env_manager_create_negative_without_parameters(self):
- result = 'Exception'
- manager = environments.EnvironmentManager(api)
- try:
- result = manager.create()
- except TypeError:
- pass
- assert result is 'Exception'
-
- def test_env_manager_delete(self):
- manager = environments.EnvironmentManager(api)
- result = manager.delete('test')
- assert result is None
-
- def test_env_manager_delete_with_named_parameters(self):
- manager = environments.EnvironmentManager(api)
- result = manager.delete(environment_id='1')
- assert result is None
-
- def test_env_manager_delete_negative_without_parameters(self):
- result = 'Exception'
- manager = environments.EnvironmentManager(api)
- try:
- result = manager.delete()
- except TypeError:
- pass
- assert result is 'Exception'
-
- def test_env_manager_update(self):
- manager = environments.EnvironmentManager(api)
- result = manager.update('1', 'test')
- assert result.body == {'name': 'test'}
-
- def test_env_manager_update_with_named_parameters(self):
- manager = environments.EnvironmentManager(api)
- result = manager.update(environment_id='1',
- name='test')
- assert result.body == {'name': 'test'}
-
- def test_env_manager_update_negative_with_one_parameter(self):
- result = 'Exception'
- manager = environments.EnvironmentManager(api)
- try:
- result = manager.update('test')
- except TypeError:
- pass
- assert result is 'Exception'
-
- def test_env_manager_update_negative_without_parameters(self):
- result = 'Exception'
- manager = environments.EnvironmentManager(api)
- try:
- result = manager.update()
- except TypeError:
- pass
- assert result is 'Exception'
-
- def test_env_manager_get(self):
- manager = environments.EnvironmentManager(api)
- result = manager.get('test')
- ## WTF?
- assert result.manager is not None
-
- def test_env(self):
- environment = environments.Environment(api, api)
- assert environment.data() is not None
-
- def test_ad_manager_list_with_one_parameter(self):
- manager = services.ActiveDirectoryManager(api)
- result = manager.list('datacenter1')
- assert result == []
-
- def test_ad_manager_list_with_all_parameters(self):
- manager = services.ActiveDirectoryManager(api)
- result = manager.list('test', '1')
- assert result == []
-
- def test_ad_manager_list_with_named_parameters(self):
- manager = services.ActiveDirectoryManager(api)
- result = manager.list(environment_id='test', session_id='1')
- assert result == []
-
- def test_ad_manager_list_with_named_parameter(self):
- manager = services.ActiveDirectoryManager(api)
- result = manager.list(environment_id='test')
- assert result == []
-
- def test_ad_manager_list_negative_without_parameters(self):
- result = 'Exception'
- manager = services.ActiveDirectoryManager(api)
- try:
- result = manager.list()
- except TypeError:
- pass
- assert result is 'Exception'
-
- def test_ad_manager_create(self):
- manager = services.ActiveDirectoryManager(api)
- result = manager.create('datacenter1', 'session1', 'test')
- assert result.headers == {'X-Configuration-Session': 'session1'}
- assert result.body == 'test'
-
- def test_ad_manager_create_with_named_parameters(self):
- manager = services.ActiveDirectoryManager(api)
- result = manager.create(environment_id='datacenter1',
- session_id='session2',
- active_directory='test2')
- assert result.headers == {'X-Configuration-Session': 'session2'}
- assert result.body == 'test2'
-
- def test_ad_manager_create_negative_with_two_parameters(self):
- result = 'Exception'
- manager = services.ActiveDirectoryManager(api)
- try:
- result = manager.create('datacenter1', 'session1')
- except TypeError:
- pass
- assert result is 'Exception'
-
- def test_ad_manager_create_negative_with_one_parameter(self):
- result = 'Exception'
- manager = services.ActiveDirectoryManager(api)
- try:
- result = manager.create('datacenter1')
- except TypeError:
- pass
- assert result is 'Exception'
-
- def test_ad_manager_create_negative_without_parameters(self):
- result = 'Exception'
- manager = services.ActiveDirectoryManager(api)
- try:
- result = manager.create()
- except TypeError:
- pass
- assert result is 'Exception'
-
- def test_ad_manager_delete(self):
- manager = services.ActiveDirectoryManager(api)
- result = manager.delete('datacenter1', 'session1', 'test')
- assert result is None
-
- def test_ad_manager_delete_with_named_parameters(self):
- manager = services.ActiveDirectoryManager(api)
- result = manager.delete(environment_id='datacenter1',
- session_id='session1',
- service_id='test')
- assert result is None
-
- def test_ad_manager_delete_negative_with_two_parameters(self):
- result = 'Exception'
- manager = services.ActiveDirectoryManager(api)
- try:
- result = manager.delete('datacenter1', 'session1')
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_ad_manager_delete_negative_with_one_parameter(self):
- result = 'Exception'
- manager = services.ActiveDirectoryManager(api)
- try:
- result = manager.delete('datacenter1')
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_ad_manager_delete_negative_without_parameters(self):
- result = 'Exception'
- manager = services.ActiveDirectoryManager(api)
- try:
- result = manager.delete()
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_iis_manager_list_with_one_parameter(self):
- manager = services.WebServerManager(api)
- result = manager.list('datacenter1')
- assert result == []
-
- def test_iis_manager_list_with_named_parameter(self):
- manager = services.WebServerManager(api)
- result = manager.list(environment_id='datacenter1')
- assert result == []
-
- def test_iis_manager_list_with_all_parameters(self):
- manager = services.WebServerManager(api)
- result = manager.list('test', '1')
- assert result == []
-
- def test_iis_manager_list_with_named_parameters(self):
- manager = services.WebServerManager(api)
- result = manager.list(environment_id='test',
- session_id='1')
- assert result == []
-
- def test_iis_manager_list_negative_without_parameters(self):
- result = 'Exception'
- manager = services.WebServerManager(api)
- try:
- result = manager.list()
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_iis_manager_create(self):
- manager = services.WebServerManager(api)
- result = manager.create('datacenter1', 'session1', 'test')
- assert result.headers == {'X-Configuration-Session': 'session1'}
- assert result.body == 'test'
-
- def test_iis_manager_create_with_named_parameters(self):
- manager = services.WebServerManager(api)
- result = manager.create(environment_id='datacenter',
- session_id='session',
- web_server='test2')
- assert result.headers == {'X-Configuration-Session': 'session'}
- assert result.body == 'test2'
-
- def test_iis_manager_create_negative_with_two_parameters(self):
- result = 'Exception'
- manager = services.WebServerManager(api)
- try:
- result = manager.create('datacenter1', 'session1')
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_iis_manager_create_negative_with_one_parameter(self):
- result = 'Exception'
- manager = services.WebServerManager(api)
- try:
- result = manager.create('datacenter1')
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_iis_manager_create_negative_without_parameters(self):
- result = 'Exception'
- manager = services.WebServerManager(api)
- try:
- result = manager.create()
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_iis_manager_delete(self):
- manager = services.WebServerManager(api)
- result = manager.delete('datacenter1', 'session1', 'test')
- assert result is None
-
- def test_iis_manager_delete_with_named_parameters(self):
- manager = services.WebServerManager(api)
- result = manager.delete(environment_id='datacenter',
- session_id='session',
- service_id='test')
- assert result is None
-
- def test_iis_manager_delete_negative_with_two_parameters(self):
- result = 'Exception'
- manager = services.WebServerManager(api)
- try:
- result = manager.delete('datacenter1', 'session1')
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_iis_manager_delete_negative_with_one_parameter(self):
- result = 'Exception'
- manager = services.WebServerManager(api)
- try:
- result = manager.delete('datacenter1')
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_iis_manager_delete_negative_without_parameters(self):
- result = 'Exception'
- manager = services.WebServerManager(api)
- try:
- result = manager.delete()
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_service_ad(self):
- service_ad = services.ActiveDirectory(api, api)
- assert service_ad.data() is not None
-
- def test_service_iis(self):
- service_iis = services.ActiveDirectory(api, api)
- assert service_iis.data() is not None
-
- def test_session_manager_list(self):
- manager = sessions.SessionManager(api)
- result = manager.list('datacenter1')
- assert result == []
-
- def test_session_manager_list_with_named_parameters(self):
- manager = sessions.SessionManager(api)
- result = manager.list(environment_id='datacenter1')
- assert result == []
-
- def test_session_manager_list_negative_without_parameters(self):
- result = 'Exception'
- manager = sessions.SessionManager(api)
- try:
- result = manager.list()
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_session_manager_delete(self):
- manager = sessions.SessionManager(api)
- result = manager.delete('datacenter1', 'session1')
- assert result is None
-
- def test_session_manager_delete_with_named_parameters(self):
- manager = sessions.SessionManager(api)
- result = manager.delete(environment_id='datacenter1',
- session_id='session1')
- assert result is None
-
- def test_session_manager_delete_negative_with_one_parameter(self):
- result = 'Exception'
- manager = sessions.SessionManager(api)
- try:
- result = manager.delete('datacenter1')
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_session_manager_delete_negative_without_parameters(self):
- result = 'Exception'
- manager = sessions.SessionManager(api)
- try:
- result = manager.delete()
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_session_manager_get(self):
- manager = sessions.SessionManager(api)
- result = manager.get('datacenter1', 'session1')
- # WTF?
- assert result.manager is not None
-
- def test_session_manager_configure(self):
- manager = sessions.SessionManager(api)
- result = manager.configure('datacenter1')
- assert result is not None
-
- def test_session_manager_configure_with_named_parameter(self):
- manager = sessions.SessionManager(api)
- result = manager.configure(environment_id='datacenter1')
- assert result is not None
-
- def test_session_manager_configure_negative_without_parameters(self):
- result = 'Exception'
- manager = sessions.SessionManager(api)
- try:
- result = manager.configure()
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_session_manager_deploy(self):
- manager = sessions.SessionManager(api)
- result = manager.deploy('datacenter1', '1')
- assert result is None
-
- def test_session_manager_deploy_with_named_parameters(self):
- manager = sessions.SessionManager(api)
- result = manager.deploy(environment_id='datacenter1',
- session_id='1')
- assert result is None
-
- def test_session_manager_deploy_negative_with_one_parameter(self):
- result = 'Exception'
- manager = sessions.SessionManager(api)
- try:
- result = manager.deploy('datacenter1')
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_session_manager_deploy_negative_without_parameters(self):
- result = 'Exception'
- manager = sessions.SessionManager(api)
- try:
- result = manager.deploy()
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_session_manager_reports(self):
- manager = sessions.SessionManager(api)
- result = manager.reports('datacenter1', '1')
- assert result == []
-
- def test_session_manager_reports_with_named_parameters(self):
- manager = sessions.SessionManager(api)
- result = manager.reports(environment_id='datacenter1',
- session_id='1')
- assert result == []
-
- def test_session_manager_reports_negative_with_one_parameter(self):
- result = 'Exception'
- manager = sessions.SessionManager(api)
- try:
- result = manager.reports('datacenter1')
- except TypeError:
- pass
- assert result == 'Exception'
-
- def test_session_manager_reports_negative_without_parameters(self):
- result = 'Exception'
- manager = sessions.SessionManager(api)
- try:
- result = manager.reports()
- except TypeError:
- pass
- assert result == 'Exception'
diff --git a/python-glazierclient/tools/install_venv.py b/python-glazierclient/tools/install_venv.py
deleted file mode 100644
index 91903d6c..00000000
--- a/python-glazierclient/tools/install_venv.py
+++ /dev/null
@@ -1,75 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2010 United States Government as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-# All Rights Reserved.
-#
-# Copyright 2010 OpenStack LLC.
-# Copyright 2013 IBM Corp.
-#
-# 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.
-
-"""
-Installation script for python-glazierclient's development virtualenv
-"""
-
-import os
-import subprocess
-import sys
-
-import install_venv_common as install_venv
-
-
-def print_help():
- help = """
- Glazier development environment setup is complete.
-
- Glazier development uses virtualenv to track and manage Python dependencies
- while in development and testing.
-
- To activate the Glazier virtualenv for the extent of your current shell session
- you can run:
-
- $ source .venv/bin/activate
-
- Or, if you prefer, you can run commands in the virtualenv on a case by case
- basis by running:
-
- $ tools/with_venv.sh
-
- Also, make test will automatically use the virtualenv.
- """
- print help
-
-
-def main(argv):
- root = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
- venv = os.path.join(root, '.venv')
- pip_requires = os.path.join(root, 'tools', 'pip-requires')
- test_requires = os.path.join(root, 'tools', 'test-requires')
- py_version = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
- project = 'python-glazierclient'
- install = install_venv.InstallVenv(root, venv, pip_requires, test_requires,
- py_version, project)
- options = install.parse_args(argv)
- install.check_python_version()
- install.check_dependencies()
- install.create_virtualenv(no_site_packages=options.no_site_packages)
- install.install_dependencies()
- install.run_command([os.path.join(venv, 'bin/python'),
- 'setup.py', 'develop'])
- install.post_process()
- print_help()
-
-if __name__ == '__main__':
- main(sys.argv)
diff --git a/python-glazierclient/tools/install_venv_common.py b/python-glazierclient/tools/install_venv_common.py
deleted file mode 100644
index fd9076f0..00000000
--- a/python-glazierclient/tools/install_venv_common.py
+++ /dev/null
@@ -1,219 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2013 OpenStack, LLC
-# Copyright 2013 IBM Corp.
-#
-# 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.
-
-"""Provides methods needed by installation script for OpenStack development
-virtual environments.
-
-Synced in from openstack-common
-"""
-
-import argparse
-import os
-import subprocess
-import sys
-
-
-class InstallVenv(object):
-
- def __init__(self, root, venv, pip_requires, test_requires, py_version,
- project):
- self.root = root
- self.venv = venv
- self.pip_requires = pip_requires
- self.test_requires = test_requires
- self.py_version = py_version
- self.project = project
-
- def die(self, message, *args):
- print >> sys.stderr, message % args
- sys.exit(1)
-
- def check_python_version(self):
- if sys.version_info < (2, 6):
- self.die("Need Python Version >= 2.6")
-
- def run_command_with_code(self, cmd, redirect_output=True,
- check_exit_code=True):
- """Runs a command in an out-of-process shell.
-
- Returns the output of that command. Working directory is self.root.
- """
- if redirect_output:
- stdout = subprocess.PIPE
- else:
- stdout = None
-
- proc = subprocess.Popen(cmd, cwd=self.root, stdout=stdout)
- output = proc.communicate()[0]
- if check_exit_code and proc.returncode != 0:
- self.die('Command "%s" failed.\n%s', ' '.join(cmd), output)
- return (output, proc.returncode)
-
- def run_command(self, cmd, redirect_output=True, check_exit_code=True):
- return self.run_command_with_code(cmd, redirect_output,
- check_exit_code)[0]
-
- def get_distro(self):
- if (os.path.exists('/etc/fedora-release') or
- os.path.exists('/etc/redhat-release')):
- return Fedora(self.root, self.venv, self.pip_requires,
- self.test_requires, self.py_version, self.project)
- else:
- return Distro(self.root, self.venv, self.pip_requires,
- self.test_requires, self.py_version, self.project)
-
- def check_dependencies(self):
- self.get_distro().install_virtualenv()
-
- def create_virtualenv(self, no_site_packages=True):
- """Creates the virtual environment and installs PIP.
-
- Creates the virtual environment and installs PIP only into the
- virtual environment.
- """
- if not os.path.isdir(self.venv):
- print 'Creating venv...',
- if no_site_packages:
- self.run_command(['virtualenv', '-q', '--no-site-packages',
- self.venv])
- else:
- self.run_command(['virtualenv', '-q', self.venv])
- print 'done.'
- print 'Installing pip in venv...',
- if not self.run_command(['tools/with_venv.sh', 'easy_install',
- 'pip>1.0']).strip():
- self.die("Failed to install pip.")
- print 'done.'
- else:
- print "venv already exists..."
- pass
-
- def pip_install(self, *args):
- self.run_command(['tools/with_venv.sh',
- 'pip', 'install', '--upgrade'] + list(args),
- redirect_output=False)
-
- def install_dependencies(self):
- print 'Installing dependencies with pip (this can take a while)...'
-
- # First things first, make sure our venv has the latest pip and
- # distribute.
- # NOTE: we keep pip at version 1.1 since the most recent version causes
- # the .venv creation to fail. See:
- # https://bugs.launchpad.net/nova/+bug/1047120
- self.pip_install('pip==1.1')
- self.pip_install('distribute')
-
- # Install greenlet by hand - just listing it in the requires file does
- # not
- # get it installed in the right order
- self.pip_install('greenlet')
-
- self.pip_install('-r', self.pip_requires)
- self.pip_install('-r', self.test_requires)
-
- def post_process(self):
- self.get_distro().post_process()
-
- def parse_args(self, argv):
- """Parses command-line arguments."""
- parser = argparse.ArgumentParser()
- parser.add_argument('-n', '--no-site-packages',
- action='store_true',
- help="Do not inherit packages from global Python "
- "install")
- return parser.parse_args(argv[1:])
-
-
-class Distro(InstallVenv):
-
- def check_cmd(self, cmd):
- return bool(self.run_command(['which', cmd],
- check_exit_code=False).strip())
-
- def install_virtualenv(self):
- if self.check_cmd('virtualenv'):
- return
-
- if self.check_cmd('easy_install'):
- print 'Installing virtualenv via easy_install...',
- if self.run_command(['easy_install', 'virtualenv']):
- print 'Succeeded'
- return
- else:
- print 'Failed'
-
- self.die('ERROR: virtualenv not found.\n\n%s development'
- ' requires virtualenv, please install it using your'
- ' favorite package management tool' % self.project)
-
- def post_process(self):
- """Any distribution-specific post-processing gets done here.
-
- In particular, this is useful for applying patches to code inside
- the venv.
- """
- pass
-
-
-class Fedora(Distro):
- """This covers all Fedora-based distributions.
-
- Includes: Fedora, RHEL, CentOS, Scientific Linux
- """
-
- def check_pkg(self, pkg):
- return self.run_command_with_code(['rpm', '-q', pkg],
- check_exit_code=False)[1] == 0
-
- def yum_install(self, pkg, **kwargs):
- print "Attempting to install '%s' via yum" % pkg
- self.run_command(['sudo', 'yum', 'install', '-y', pkg], **kwargs)
-
- def apply_patch(self, originalfile, patchfile):
- self.run_command(['patch', originalfile, patchfile])
-
- def install_virtualenv(self):
- if self.check_cmd('virtualenv'):
- return
-
- if not self.check_pkg('python-virtualenv'):
- self.yum_install('python-virtualenv', check_exit_code=False)
-
- super(Fedora, self).install_virtualenv()
-
- def post_process(self):
- """Workaround for a bug in eventlet.
-
- This currently affects RHEL6.1, but the fix can safely be
- applied to all RHEL and Fedora distributions.
-
- This can be removed when the fix is applied upstream.
-
- Nova: https://bugs.launchpad.net/nova/+bug/884915
- Upstream: https://bitbucket.org/which_linden/eventlet/issue/89
- """
-
- # Install "patch" program if it's not there
- if not self.check_pkg('patch'):
- self.yum_install('patch')
-
- # Apply the eventlet patch
- self.apply_patch(os.path.join(self.venv, 'lib', self.py_version,
- 'site-packages',
- 'eventlet/green/subprocess.py'),
- 'contrib/redhat-eventlet.patch')
diff --git a/python-glazierclient/tools/pip-requires b/python-glazierclient/tools/pip-requires
deleted file mode 100644
index 632d17be..00000000
--- a/python-glazierclient/tools/pip-requires
+++ /dev/null
@@ -1,5 +0,0 @@
-argparse
-prettytable>=0.6,<0.7
-python-keystoneclient>=0.1.2
-httplib2
-iso8601>=0.1.4
diff --git a/python-glazierclient/tools/test-requires b/python-glazierclient/tools/test-requires
deleted file mode 100644
index 98870ef5..00000000
--- a/python-glazierclient/tools/test-requires
+++ /dev/null
@@ -1,15 +0,0 @@
-distribute>=0.6.24
-
-mock
-anyjson
-mox
-nose
-nose-exclude
-nosexcover
-openstack.nose_plugin
-nosehtmloutput
-pep8==1.3.3
-setuptools-git>=0.4
-sphinx>=1.1.2
-unittest2
-httpretty
diff --git a/python-glazierclient/tools/with_venv.sh b/python-glazierclient/tools/with_venv.sh
deleted file mode 100755
index c8d2940f..00000000
--- a/python-glazierclient/tools/with_venv.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-TOOLS=`dirname $0`
-VENV=$TOOLS/../.venv
-source $VENV/bin/activate && $@
diff --git a/python-glazierclient/tox.ini b/python-glazierclient/tox.ini
deleted file mode 100644
index 244d2b6a..00000000
--- a/python-glazierclient/tox.ini
+++ /dev/null
@@ -1,46 +0,0 @@
-[tox]
-envlist = py27,pep8
-
-[testenv]
-setenv = VIRTUAL_ENV={envdir}
- NOSE_WITH_OPENSTACK=1
- NOSE_OPENSTACK_COLOR=1
- NOSE_OPENSTACK_RED=0.05
- NOSE_OPENSTACK_YELLOW=0.025
- NOSE_OPENSTACK_SHOW_ELAPSED=1
-deps = -r{toxinidir}/tools/pip-requires
- -r{toxinidir}/tools/test-requires
-commands = nosetests
-
-[testenv:pep8]
-deps = pep8==1.3.3
-commands = pep8 --repeat --show-source glazierclient setup.py
-
-[testenv:venv]
-commands = {posargs}
-
-[testenv:cover]
-commands = nosetests --cover-erase --cover-package=glazierclient --with-xcoverage
-
-[tox:jenkins]
-downloadcache = ~/cache/pip
-
-[testenv:jenkins26]
-basepython = python2.6
-setenv = NOSE_WITH_XUNIT=1
-deps = file://{toxinidir}/.cache.bundle
-
-[testenv:jenkins27]
-basepython = python2.7
-setenv = NOSE_WITH_XUNIT=1
-deps = file://{toxinidir}/.cache.bundle
-
-[testenv:jenkinscover]
-deps = file://{toxinidir}/.cache.bundle
-setenv = NOSE_WITH_XUNIT=1
-commands = nosetests --cover-erase --cover-package=glazierclient --with-xcoverage
-
-[testenv:jenkinsvenv]
-deps = file://{toxinidir}/.cache.bundle
-setenv = NOSE_WITH_XUNIT=1
-commands = {posargs}
diff --git a/api/run_tests.sh b/run_tests.sh
similarity index 100%
rename from api/run_tests.sh
rename to run_tests.sh
diff --git a/api/setup.cfg b/setup.cfg
similarity index 100%
rename from api/setup.cfg
rename to setup.cfg
diff --git a/api/setup.py b/setup.py
similarity index 100%
rename from api/setup.py
rename to setup.py
diff --git a/tests/REST_service/test.py b/tests/REST_service/test.py
deleted file mode 100644
index 0957378c..00000000
--- a/tests/REST_service/test.py
+++ /dev/null
@@ -1,172 +0,0 @@
-# -*- coding: utf-8 -*-
-
-
-import unittest2
-import requests
-import json
-import logging
-import thread
-import time
-
-logging.basicConfig()
-LOG = logging.getLogger(' REST service tests')
-
-class TestSuite(unittest2.TestCase):
-
- def setUp(self):
- self.max_count = 200
- self.url = 'http://localhost:8082/environments'
- self.headers = {'X-Auth-Token': '3685674500ff83eb62b5c5d453e0cacd'}
- self.lock_list = []
- self.responses = []
- self.state = 'stop'
-
- def tearDown(self):
- self.headers = {}
-
- def run_in_parrallel(self, func, parameter):
- lock = thread.allocate_lock()
- lock.acquire()
- self.lock_list.append(lock)
- thread.start_new_thread(func, (parameter, lock))
-
- def wait_threads(self):
- self.state = 'run'
- while(any([l.locked() for l in self.lock_list])):
- pass
-
- LOG.critical(self.lock_list)
-
- def create_environment(self, name, lock):
- while (self.state == 'stop'):
- pass
-
- body = '{"name": "%s"}' % name
- response = requests.request('POST',
- self.url,
- headers=self.headers,
- data=body)
-
- self.responses.append(response)
-
- return lock.release()
-
-
- def delete_environment(self, id, lock):
- while (self.state == 'stop'):
- pass
-
- id = '/' + id
-
- response = requests.request('DELETE', self.url+id, headers=self.headers)
-
- self.responses.append(response)
-
- return lock.release()
-
- def test_01_delete_environments(self):
-
- response = requests.request('GET', self.url, headers=self.headers)
-
- result = json.loads(response._content)
- environments = result['environments']
-
- for env in environments:
- self.run_in_parrallel(self.delete_environment, env['id'])
-
- self.wait_threads()
-
- for response in self.responses:
- assert response.status_code is 200
-
- def test_02_list_environments(self):
-
- response = requests.request('GET', self.url, headers=self.headers)
-
- result = json.loads(response._content)
- environments = result['environments']
-
- assert len(environments) is 0
-
- def test_03_create_environment(self):
-
- self.headers.update({'Content-Type': 'application/json'})
- body = '{"name": "test"}'
-
- response = requests.request('POST', self.url, headers=self.headers,
- data=body)
-
- environment = json.loads(response._content)
-
- assert environment['name'] == 'test'
-
- def test_04_delete_environment(self):
-
- id = None
-
- response = requests.request('GET', self.url, headers=self.headers)
-
- result = json.loads(response._content)
- environments = result['environments']
-
- for env in environments:
- if env['name'] == 'test':
- id = '/' + env['id']
-
- assert id is not None
-
- response = requests.request('DELETE', self.url+id, headers=self.headers)
-
- assert response.status_code is 200
-
- def test_05_create_environments(self):
-
- self.headers.update({'Content-Type': 'application/json'})
-
- for i in range(self.max_count):
- name = "environment%s" % i
- self.run_in_parrallel(self.create_environment, name)
-
- self.wait_threads()
-
- for response in self.responses:
- assert response.status_code is 200
-
- def test_06_list_environments(self):
-
- response = requests.request('GET', self.url, headers=self.headers)
-
- result = json.loads(response._content)
- environments = result['environments']
-
- assert len(environments) == self.max_count
-
-
- def test_07_list_environments(self):
-
- response = requests.request('GET', self.url, headers=self.headers)
-
- result = json.loads(response._content)
- environments = result['environments']
-
- assert len(environments) > 0
-
- def test_08_list_environments(self):
-
- response = requests.request('GET', self.url, headers=self.headers)
-
- result = json.loads(response._content)
- environments = result['environments']
-
- for env in environments:
- assert env.get('id', None) is not None
- assert env.get('name', None) is not None
- assert env.get('status', None) is not None
- assert env.get('updated', None) is not None
- assert env.get('created', None) is not None
- assert env.get('tenant_id', None) is not None
-
-
-
-if __name__ == '__main__':
- unittest2.main()
\ No newline at end of file
diff --git a/tests/deploy.sh b/tests/deploy.sh
deleted file mode 100755
index cad10a20..00000000
--- a/tests/deploy.sh
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/expect -d
-# The following directories should be created for this script:
-# /opt/stack/devstack
-# /opt/stack/keero
-# the ssh key should be in directory /opt/stack/.ssh/
-# the iso file with windows should be in directory /opt/stack/
-
-set timeout 1200
-
-send_user "\n\nStart to login to the test bed...\n\n"
-
-spawn /usr/bin/ssh [lindex $argv 0]@[lindex $argv 1]
-expect "password"
-send -- "EVYiMCVZX9\n"
-expect "*#*"
-
-send -- "su - stack\n"
-expect "*$*"
-
-send -- "sudo killall python\n"
-expect "*$*"
-send -- "cd ~/devstack\n"
-expect "*$*"
-send -- "./unstack.sh\n"
-expect "*$*"
-send -- "./stack.sh\n"
-expect "*/usr/bin/service: 123: exec: status: not found*"
-send -- "y\n"
-expect "*stack.sh completed*"
-
-send -- "sudo rabbitmq-plugins enable rabbitmq_management\n"
-expect "*$*"
-send -- "sudo service rabbitmq-server restart\n"
-expect "*$*"
-send -- "sudo rabbitmqctl add_user keero keero\n"
-expect "*$*"
-send -- "sudo rabbitmqctl set_user_tags keero administrator\n"
-expect "*$*"
-
-
-send -- "source openrc admin admin\n"
-expect "*$*"
-
-send -- "cd ~\n"
-expect "*$*"
-
-send -- "nova keypair-add keero-linux-keys > heat_key.priv\n"
-expect "*$*"
-
-send -- "glance image-create --name 'ws-2012-full' --is-public true --container-format ovf --disk-format qcow2 < ws-2012-full.qcow2\n"
-expect "*$*"
-
-send -- "cd ~/keero\n"
-expect "*$*"
-send -- "git pull\n"
-expect "/.ssh/id_rsa"
-send -- "swordfish\n"
-expect "*$*"
-send -- "cp -Rf ~/keero/dashboard/windc /opt/stack/horizon/openstack_dashboard/dashboards/project\n"
-expect "*$*"
-send -- "cp -f ~/keero/dashboard/api/windc.py /opt/stack/horizon/openstack_dashboard/api/\n"
-expect "*$*"
-send -- "cd ~/keero/python-portasclient\n"
-expect "*$*"
-send -- "sudo python setup.py install\n"
-expect "*$*"
-send -- "cd ~/keero/portas\n"
-expect "*$*"
-send -- "./tools/with_venv.sh ./bin/portas-api --config-file=./etc/portas-api.conf & > ~/APIservice.log\n"
-sleep 10
-send -- "\n"
-expect "*$*"
-send -- "cd ~/keero/conductor\n"
-expect "*$*"
-send -- "./tools/with_venv.sh ./bin/app.py & > ~/conductor.log\n"
-sleep 10
-send -- "\n"
-expect "*$*"
-send -- "logout\n"
-expect "*#*"
-
diff --git a/tests/selenium/conf.ini b/tests/selenium/conf.ini
deleted file mode 100644
index 12af6f58..00000000
--- a/tests/selenium/conf.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[server]
-address=http://172.18.124.101:8080
-user=admin
-password=swordfish
\ No newline at end of file
diff --git a/tests/selenium/environments_page.py b/tests/selenium/environments_page.py
deleted file mode 100644
index 0475463a..00000000
--- a/tests/selenium/environments_page.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright (c) 2013 Mirantis Inc.
-#
-# 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.
-
-import re
-from services_page import ServicesPage
-import page
-
-
-class EnvironmentsPage(page.Page):
- name = 'Environments'
-
- def create_environment(self, name):
- self.Refresh()
- self.Button('Create Environment').Click()
- self.EditBox('id_name').Set(name)
- self.Button('Create').Click()
-
- def delete_environment(self, name):
- self.Refresh()
-
- link = self.Link(name).Address()
- environment_id = re.search('tabula/(\S+)', link).group(0)[7:-1]
-
- self.Button('More', environment_id).Click()
- self.Button('Delete', environment_id).Click()
- # confirm:
- self.Button('Delete Environment').Click()
-
- def select_environment(self, name):
- self.Link(name).Click()
- page = ServicesPage(self.driver)
- return page
-
- def deploy_environment(self, name):
- self.Refresh()
-
- link = self.Link(name).Address()
- environment_id = re.search('tabula/(\S+)', link).group(0)[7:-1]
-
- self.Button('More', environment_id).Click()
- self.Button('Deploy', environment_id).Click()
-
- def get_environment_status(self, name):
- self.Refresh()
-
- link = self.Link(name).Address()
- environment_id = re.search('tabula/(\S+)', link).group(0)[7:-1]
-
- return self.TableCell('Status', environment_id).Text()
diff --git a/tests/selenium/login_page.py b/tests/selenium/login_page.py
deleted file mode 100644
index 9d5b2b17..00000000
--- a/tests/selenium/login_page.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (c) 2013 Mirantis Inc.
-#
-# 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.
-
-import ConfigParser
-import page
-
-
-class LoginPage(page.Page):
-
- def login(self):
- config = ConfigParser.RawConfigParser()
- config.read('conf.ini')
- url = config.get('server', 'address')
- user = config.get('server', 'user')
- password = config.get('server', 'password')
-
- self.Open(url)
-
- self.EditBox('username').Set(user)
- self.EditBox('password').Set(password)
- xpath = "//button[@type='submit']"
- self.Button(xpath).Click()
-
- return self
diff --git a/tests/selenium/objects.xml b/tests/selenium/objects.xml
deleted file mode 100644
index 8af03755..00000000
--- a/tests/selenium/objects.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/selenium/page.py b/tests/selenium/page.py
deleted file mode 100644
index f4050633..00000000
--- a/tests/selenium/page.py
+++ /dev/null
@@ -1,276 +0,0 @@
-# Copyright (c) 2013 Mirantis Inc.
-#
-# 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.
-
-import logging
-from selenium.webdriver.support.ui import Select
-import xml.etree.ElementTree as ET
-
-
-logging.basicConfig()
-LOG = logging.getLogger(' Page object: ')
-"""
- Disable selenium logging:
-"""
-logger = logging.getLogger('selenium.webdriver.remote.remote_connection')
-logger.setLevel('ERROR')
-
-
-class ObjectsLibrary:
- file = None
- objects = []
-
- def __init__(self, file_name='objects.xml'):
- """
- Initialization of the Objects Library.
- Read objects descriptions from XML file.
- """
- self.file = file_name
- tree = ET.parse(self.file)
- objects = tree.getroot()
- self.objects = []
- for element in objects:
- object = {}
- for parameter in element:
- object.update({parameter.tag: parameter.text})
- self.objects.append(object)
-
- def get_object(self, name, pagename):
- """
- Search objects in Objects Library.
- """
- for object in self.objects:
- obj_pagename = object.get('pagename', None)
- if object['name'] == name and (obj_pagename == pagename
- or obj_pagename is None):
- return object['parameter']
- return None
-
-
-class TableCellClass:
- table = None
-
- def __init__(self, obj):
- if not obj:
- LOG.error('TableCell does not found')
- self.table = obj
-
- def Text(self):
- if self.table:
- LOG.critical(self.table.text)
- return self.table.text
- else:
- return ''
-
-
-class ButtonClass:
- button = None
-
- def __init__(self, obj):
- if not obj:
- LOG.error('Button does not found')
- self.button = obj
-
- def Click(self):
- if self.button:
- self.button.click()
-
- def isPresented(self):
- if self.button:
- return True
- return False
-
-
-class LinkClass:
- link = None
-
- def __init__(self, obj):
- if not obj:
- LOG.error('Link does not found')
- self.link = obj
-
- def Click(self):
- if self.link:
- self.link.click()
-
- def isPresented(self):
- if self.link:
- return True
- return False
-
- def Address(self):
- if self.link:
- return self.link.get_attribute('href')
- else:
- return ''
-
-
-class EditBoxClass:
-
- def __init__(self, obj):
- if not obj:
- LOG.error('EditBox does not found')
- self.edit = obj
-
- def isPresented(self):
- if self.edit:
- return True
- return False
-
- def Set(self, value):
- if self.edit:
- try:
- self.edit.clear()
- self.edit.send_keys(value)
- except:
- LOG.error('Can not set value for text box.')
-
- def Text(self):
- if self.edit:
- return self.edit.get_text()
- else:
- return ''
-
-
-class DropDownListClass:
- select = None
-
- def __init__(self, obj):
- if not obj:
- LOG.error('DropDownList does not found')
- self.select = obj
-
- def isPresented(self):
- if self.select is not None:
- return True
- return False
-
- def Set(self, value):
- if self.select:
- try:
- Select(self.select).select_by_visible_text(value)
- except:
- LOG.error('Can not select element %s from drop down list.'
- .format(value))
-
- def Text(self):
- if self.select:
- return self.select.get_text()
- else:
- return ''
-
-
-error_msg = """
- Object with parameter: %s
- does not found on page.
- """
-
-
-class Page:
-
- driver = None
- timeout = 10
- lib = None
- name = None
-
- def __init__(self, driver):
- driver.set_page_load_timeout(self.timeout)
- driver.implicitly_wait(0.01)
- self.driver = driver
-
- def _find_element(self, name, parameter=None):
- """
- This method allows to find element,
- based on descriptions in Object Library,
- xpath, id, name or pertial link text.
- If parameter != None will be used name % parameter
- """
- lib = ObjectsLibrary()
- if lib.get_object(name, self.name):
- name = lib.get_object(name, self.name)
-
- if parameter:
- name = name % parameter
-
- obj = None
- k = 0
-
- while (obj is None and k < self.timeout):
- k += 1
-
- try:
- obj = self.driver.find_element_by_name(name)
- return obj
- except:
- pass
- try:
- obj = self.driver.find_element_by_id(name)
- return obj
- except:
- pass
- try:
- obj = self.driver.find_element_by_xpath(name)
- return obj
- except:
- pass
- try:
- obj = self.driver.find_element_by_partial_link_text(name)
- return obj
- except:
- pass
-
- LOG.error(error_msg % name)
- return None
-
- def Open(self, url):
- self.driver.get(url)
-
- def Refresh(self):
- self.driver.refresh()
-
- def TableCell(self, name, parameter=None):
- obj = self._find_element(name, parameter)
- table = TableCellClass(obj)
- return table
-
- def Button(self, name, parameter=None):
- obj = self._find_element(name, parameter)
- button = ButtonClass(obj)
- return button
-
- def Link(self, name, parameter=None):
- obj = self._find_element(name, parameter)
- link = LinkClass(obj)
- return link
-
- def EditBox(self, name, parameter=None):
- obj = self._find_element(name, parameter)
- edit = EditBoxClass(obj)
- return edit
-
- def DropDownList(self, name, parameter=None):
- obj = self._find_element(name, parameter)
- select = DropDownListClass(obj)
- return select
-
- def Navigate(self, path):
- """
- This method allows to navigate by
- webUI menu button and links to
- the specific page
- """
- steps = path.split(':')
-
- for step in steps:
- self.Button(step).Click()
diff --git a/tests/selenium/services_details_page.py b/tests/selenium/services_details_page.py
deleted file mode 100644
index eefafd4e..00000000
--- a/tests/selenium/services_details_page.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright (c) 2013 Mirantis Inc.
-#
-# 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.
-
-import page
-
-
-class ServicesDetailsPage(page.Page):
-
- name = 'ServicesDetails'
-
- def get_service_name(self):
- self.Refresh()
- self.Link('Service').Click()
- return self.TableCell('Name').Text()
-
- def get_service_domain(self):
- self.Refresh()
- self.Link('Service').Click()
- return self.TableCell('Domain').Text()
\ No newline at end of file
diff --git a/tests/selenium/services_page.py b/tests/selenium/services_page.py
deleted file mode 100644
index c511bfa0..00000000
--- a/tests/selenium/services_page.py
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright (c) 2013 Mirantis Inc.
-#
-# 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.
-
-import page
-import re
-from services_details_page import ServicesDetailsPage
-
-
-class ServicesPage(page.Page):
-
- name = 'Services'
-
- def create_service(self, parameters):
- service_type = parameters[0]
- parameters = parameters[1]
- self.Refresh()
-
- self.Button('CreateService').Click()
- self.DropDownList('0-service').Set(service_type)
- self.Button('wizard_goto_step').Click()
-
- for key in parameters:
- try:
- self.EditBox(key).Set(parameters[key])
- except:
- pass
- try:
- self.DropDownList(key).Set(parameters[key])
- except:
- pass
-
- self.Button('Create').Click()
-
- def delete_service(self, name):
- self.Refresh()
-
- link = self.Link(name).Address()
-
- service_id = re.search('tabula/(\S+)', link).group(0)[7:-1]
-
- self.Button('More', service_id).Click()
- self.Button('Delete', service_id).Click()
- # confirm:
- self.Button('Delete Service').Click()
-
- def select_service(self, name):
- self.Link(name).Click()
- page = ServicesDetailsPage(self.driver)
- return page
-
- def get_service_status(self, name):
- self.Refresh()
-
- link = self.Link(name).Address()
- service_id = re.search('tabula/(\S+)', link).group(0)[7:-8]
-
- return self.TableCell('Status', service_id).Text()
diff --git a/tests/selenium/test.py b/tests/selenium/test.py
deleted file mode 100644
index 87acf6bf..00000000
--- a/tests/selenium/test.py
+++ /dev/null
@@ -1,182 +0,0 @@
-# Copyright (c) 2013 Mirantis Inc.
-#
-# 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.
-
-import unittest2
-import logging
-from login_page import LoginPage
-from environments_page import EnvironmentsPage
-from selenium import webdriver
-
-
-logging.basicConfig()
-LOG = logging.getLogger(' Tests: ')
-
-
-def generate_ad(name="test", count=1):
- """
- This function generates parameters for
- Active Directory service
- """
- ad_parameters = {'1-dc_name': name,
- '1-dc_count': count,
- '1-adm_password': "P@ssw0rd",
- '1-recovery_password': "P@ssw0rd2"}
- return ['Active Directory', ad_parameters]
-
-def generate_iis(name="test", domain="test"):
- """
- This function generates parameters for
- Internet Information Services service
- """
- iis_parameters = {'1-iis_name': name,
- '1-adm_password': "P@ssw0rd",
- '1-iis_domain': domain}
- return ['Internet Information Services', iis_parameters]
-
-
-environment_for_deploy = 'environment_for_deploy'
-
-
-class SanityTests(unittest2.TestCase):
-
- screenshots = 0 # Make screenshots for the end of each test
-
- @classmethod
- def setUpClass(self):
- """
- Open browser, navigate to the login page,
- login and navigate to the Windows Data Centers page
- """
- driver = webdriver.Firefox()
- self.page = LoginPage(driver)
- self.page.login()
-
- @classmethod
- def tearDownClass(self):
- """
- Close browser
- """
- self.page.driver.close()
-
- def setUp(self):
- """
- Navigate to the start page
- """
- self.page.Navigate('Project:Environments')
- self.page = EnvironmentsPage(driver)
-
- def tearDown(self):
- """
- Make screenshot
- """
- self.screenshots += 1
- self.page.driver.save_screenshot("screen_%s.png" % self.screenshots)
-
- def test_001_create_environment(self):
- self.page.create_environment('dc1')
- assert self.page.Link('dc1').isPresented()
-
- def test_002_delete_environment(self):
- self.page.delete_environment('dc1')
- assert not self.page.Link('dc1').isPresented()
-
- def test_003_configure_environment_before_deploy(self):
- ad_name = "AD.net"
- iis_name = "iis_server"
- self.page.create_environment(environment_for_deploy)
- self.page = self.page.select_environment(environment_for_deploy)
-
- self.page.create_service(generate_ad(ad_name, 2))
- assert self.page.Link(ad_name).isPresented()
-
- self.page.create_service(generate_iis(iis_name, ad_name))
- assert self.page.Link(iis_name).isPresented()
-
- def test_004_deploy_environment(self):
- self.page.deploy_environment(environment_for_deploy)
- status = self.page.get_environment_status(environment_for_deploy)
- assert 'Deploy in progress' in status
-
- def test_005_create_environments(self):
- for i in range(1, 10):
- name = "environment" + str(i)
- self.page.create_environment(name)
- assert self.page.Link(name).isPresented()
-
- def test_006_delete_environments(self):
- self.page.delete_environment('environment1')
- self.page.delete_environment('environment9')
- assert not self.page.Link('environment1').isPresented()
- assert not self.page.Link('environment9').isPresented()
-
- for i in range(2, 9):
- name = 'environment' + str(i)
- assert self.page.Link(name).isPresented()
-
- def test_007_create_service_ad(self):
- name = "dc001.local"
- self.page.create_environment('test05')
- self.page = self.page.select_environment('test05')
- self.page.create_service(generate_ad(name, 1))
- assert self.page.Link(name).isPresented()
-
- def test_008_create_service_ad_two_instances(self):
- name = "dc002.local"
- self.page.create_environment('test06')
- self.page = self.page.select_environment('test06')
- self.page.create_service(generate_ad(name, 2))
- assert self.page.Link(name).isPresented()
-
- def test_009_create_service_ad_with_iis(self):
- ad_name = "dc003.local"
- self.page.create_environment('test07')
- self.page = self.page.select_environment('test07')
- self.page.create_service(generate_ad(ad_name, 3))
- assert self.page.Link(ad_name).isPresented()
-
- for i in range(5):
- iis_name = 'iis_server' + str(i)
- self.page.create_service(generate_iis(iis_name, ad_name))
- assert self.page.Link(iis_name).isPresented()
-
- def test_010_delete_environment_with_services(self):
- name = "test07"
- self.page.delete_environment(name)
- assert not self.page.Link(name).isPresented()
-
- def test_011_service_deploy_in_progress_status(self):
- ad_name = "AD.net"
- iis_name = "iis_server"
- self.page = self.page.select_environment(environment_for_deploy)
- ad_status = self.page.get_service_status(ad_name)
- iis_status = self.page.get_service_status(iis_name)
-
- assert 'Deploy in progress' in ad_status
- assert 'Deploy in progress' in iis_status
-
- def test_012_show_service_details_for_deploy(self):
- ad_name = "AD.net"
- iis_name = "iis_server"
- self.page = self.page.select_environment(environment_for_deploy)
- self.page = self.page.select_service(iis_name)
- name = self.page.get_service_name()
- domain = self.page.get_service_domain()
-
- assert name == iis_name
- assert name == ad_name
-
-
-if __name__ == '__main__':
- unittest2.main()
diff --git a/tests/selenium/tools/test_requires b/tests/selenium/tools/test_requires
deleted file mode 100644
index 3dc2329e..00000000
--- a/tests/selenium/tools/test_requires
+++ /dev/null
@@ -1,8 +0,0 @@
-xvfb
-x11-xkb-utils
-xfonts-100dpi
-xfonts-75dpi
-xfonts-scalable
-xfonts-cyrillic
-xserver-xorg-core
-selenium
\ No newline at end of file
diff --git a/tests/selenium/tox.ini b/tests/selenium/tox.ini
deleted file mode 100644
index 06904ba0..00000000
--- a/tests/selenium/tox.ini
+++ /dev/null
@@ -1,28 +0,0 @@
-[tox]
-envlist = py27,pep8
-
-[testenv]
-setenv = VIRTUAL_ENV={envdir}
- NOSE_WITH_OPENSTACK=1
- NOSE_OPENSTACK_COLOR=1
- NOSE_OPENSTACK_RED=0.05
- NOSE_OPENSTACK_YELLOW=0.025
- NOSE_OPENSTACK_SHOW_ELAPSED=1
-deps = -r{toxinidir}/tools/test-requires
-commands = Xvfb -fp /usr/share/fonts/X11/misc/ :22 -screen 0 1024x768x16 2>&1 & export DISPLAY=:22 & nosetests
-
-[testenv:venv]
-commands = {posargs}
-
-[tox:jenkins]
-downloadcache = ~/cache/pip
-
-[testenv:jenkins27]
-basepython = python2.7
-setenv = NOSE_WITH_XUNIT=1
-deps = file://{toxinidir}/.cache.bundle
-
-[testenv:jenkinsvenv]
-deps = file://{toxinidir}/.cache.bundle
-setenv = NOSE_WITH_XUNIT=1
-commands = {posargs}
diff --git a/api/tools/install_venv.py b/tools/install_venv.py
similarity index 100%
rename from api/tools/install_venv.py
rename to tools/install_venv.py
diff --git a/api/tools/install_venv_common.py b/tools/install_venv_common.py
similarity index 100%
rename from api/tools/install_venv_common.py
rename to tools/install_venv_common.py
diff --git a/api/tools/pip-requires b/tools/pip-requires
similarity index 100%
rename from api/tools/pip-requires
rename to tools/pip-requires
diff --git a/api/tools/test-requires b/tools/test-requires
similarity index 100%
rename from api/tools/test-requires
rename to tools/test-requires
diff --git a/api/tools/with_venv.sh b/tools/with_venv.sh
similarity index 100%
rename from api/tools/with_venv.sh
rename to tools/with_venv.sh
diff --git a/api/tox.ini b/tox.ini
similarity index 100%
rename from api/tox.ini
rename to tox.ini