68 Commits

Author SHA1 Message Date
Monty Taylor
e8b3360038 Sync install_venv_common from oslo
Change-Id: Iadcfa6d00b963a19ce15300b2293036cf0e8204b
2013-08-08 12:42:29 -03:00
Jiri Tomasek
5b24518b10 Renames tools/pip-requires to requirements.txt
and tools/test-requires to test-requirements.txt

These are standard files and tools in the
general world are growing intelligence about them.

Change-Id: Iac3c680dd19cabd8ea38598a6e2bb27238030a2d
Fixes: bug #1179008
2013-05-29 12:07:35 +02:00
Steve Baker
c949b6fbd5 Access to heat API via python-heatclient
This adds python-heatclient as a dependency and a simple function
to get a client reference.

Required for blueprint: heat-ui

Change-Id: I5f7d8c7c17f6e78d3f88cc39d50826416b48ad2c
2013-05-22 16:11:22 +12:00
Steve Baker
6b6f97f7a8 parse_isotime filter to parse a date string.
This then allows the resulting date value to be piped
to one of the standard django date/time format filters

This is identical to oslo timeutils parse_isotime, but annotated with
@register.filter

Required for blueprint: heat-ui

Change-Id: Ibecca77d50bb5c0df59e07e9572069215229f60a
2013-05-22 16:03:43 +12:00
Jenkins
f8483fada7 Merge "Move to flake8." 2013-05-06 08:59:26 +00:00
Monty Taylor
7643f52fb2 Move to flake8.
The project is standardizing on flake8 for static code analysis.

Change-Id: I4fd97b56b6c6cb57e8d245281e0da15f838ec840
2013-05-01 10:32:14 -04:00
Lin Hua Cheng
5d32caf3af Update Horizon for Django 1.5 compatibility
Changes made:
- Changed template url tags: {% url myview %} to {% url myview %}
- Import json instead of django.utils.simplejson
- Import django.utils.encoding.force_unicode instead of
  django.utils.translation.force_unicode
- Fixed error in tables/base.py for CheckboxInput, pass a callable
  check_test. Django 1.5 does not silently fail on this now.
- Set SECRET_KEY in test/settingspy, Django 1.5 refuse to start if it
  is not set.
- Added notes about ALLOWED_HOSTS when running Horizon in Production

Fixes bug 1147329

Change-Id: I6ac1e81498f41141dea99760922991feb310a326
2013-04-30 20:54:39 -07:00
Jenkins
9cdee05678 Merge "Migrate to PBR for build tooling." 2013-05-01 02:01:59 +00:00
Matthias Runge
1650c33b73 Remove workaround for keystone
This was required for an ancient keystone version, we can consider
this as solved in H release.

Fixes bug 1174194

Change-Id: Iecee7f3af01cc18ce44d3cf1ecc1b72be8fa765b
2013-04-29 09:27:00 +02:00
Monty Taylor
91e4715c14 Migrate to PBR for build tooling.
pbr is the library-ified version of the code that was in
openstack.common.setup and version. It builds on top of d2to1 to
provide declarative build configuration.

Change-Id: Ic264fa33e17fe5fdc71d8c53412495b069ab74a4
2013-04-27 11:56:07 -04:00
Jenkins
acb5eeb113 Merge "Allow admin to edit project quotas for fixed IPs" 2013-03-28 11:34:51 +00:00
Julie Pichon
d5f2dc38e6 Allow admin to edit project quotas for fixed IPs
Fixes bug #1157950

Change-Id: If8bf548f66ff13b2b5218ca6c1e8c69c054e0a59
2013-03-26 17:58:01 +00:00
Mark McLoughlin
a6d8e14332 Remove unused tools/rfc.sh
This has been deprecated in favour of git-review for quite a while now
and was removed from Nova 10 months ago.

Change-Id: Ic4bfa1aee3a4b6a7588be3678ac033a1b13e2b18
2013-03-25 22:00:22 +00:00
Gabriel Hurley
2c892002e5 Pin the cinderclient version.
Fixes bug 1156817.

Change-Id: I56f41b5499ac55dbdb7bf68e4692f0ba04751455
2013-03-18 16:07:49 -07:00
Jenkins
58b4188f56 Merge "Update to Quantum Client 2.2.0" 2013-03-12 21:49:55 +00:00
Jenkins
083fec563a Merge "Don't change dashboard on admin tenant switch" 2013-03-11 23:08:05 +00:00
Aaron Rosen
96c8b9f5cd Update to Quantum Client 2.2.0
This patch updates tools/pip-requires to use the python-quantumclient 2.2
It also limits the version to <3.0.0 to prevent breaking something accidently
when 3.0.0 is released.

Fixes bug 1152695

Change-Id: I98ea99bbc0dc5d5d4c67e5f8ae6b6c9f81fe2c4c
2013-03-08 10:11:32 -08:00
Kieran Spear
6db859c849 Don't change dashboard on admin tenant switch
Switching projects as an admin user currently dumps you back to
the Admin dashboard tab. This change fixes that by adding a 'next'
parameter to the switching URL that points to the default panel
of the current dashboard.

The redirect is to the default panel rather than the current one,
since the next tenant may not have access to the current panel
and we want to avoid kicking a user back to the login screen.

Fixes bug #1072848.

Change-Id: I25b8c0e38945d5db57f5bfe7bb174cdbd66156d5
2013-03-06 14:44:44 +11:00
Aaron Rosen
fe660f9e40 Bump python-quantumclient version to 2.1.2
Fixes bug 1133381

Change-Id: Id0e4476287ffba9f3bb8a708a5b6d4567629e4b9
2013-03-04 14:10:24 -08:00
Jenkins
986182b327 Merge "Allow admin to edit project quotas for security groups and rules" 2013-02-27 19:00:45 +00:00
Sean Dague
0d53dc7063 pin django to 1.4.x stream
django 1.5 just released in the last hour, and there is a
compatibility issue with it and horizon causing gate failures.

Pin this so that we can get back to business and let the horizon
team address django 1.5 when it makes sense to them.

Change-Id: I6ddf9623f8a4719b1cb82b118c1876373051fd28
2013-02-26 15:32:09 -05:00
Julie Pichon
7584fe39b4 Allow admin to edit project quotas for security groups and rules
Fixes bug 1078092

Change-Id: I1018f07f740b7e27e14fb00bac4c3cce177469e2
2013-02-19 15:57:24 +00:00
James E. Blair
37731b95b6 Pin docutils to 0.9.1.
Docutils 0.10 breaks manpage generation in sphinx 1.1.3. A fix to
sphinx has been merged, but not yet released (scheduled for dec
24-31). In the mean time, we should pin docutils to 0.9.1.

Fixes bug 1091333.

Change-Id: I157f3c191bfc09d2191a3508d81bcbaea56205a6
2012-12-17 08:49:53 -08:00
Alexey Izbyshev
155e3ae7c3 Fix handling of UUID-typed flavor ids
Change the type of flavor_id hidden field in EditFlavor form
from IntegerField to CharField since flavor id is a string
representation of UUID now. Additionally change the type of
similar hidden fields in CreateExtraSpec and EditExtraSpec forms.

Remove flavor id generation from form handling code. Id generation
should be done only in corresponding OpenStack components (nova, etc.).
Since nova supports flavor id autogeneration and 'flavorid' parameter
of FlavorManager.create() in novaclient is optional, remove 'flavorid'
parameter from api.nova.flavor_create().

Change flavor ids in test data from strings containing integers
to UUID-like strings to make them correspond to real data.

Update flavor tests to make them compatible with new
api.nova.flavor_create() signature.

Remove conversions of flavor id to int from all tests. In particular,
update test_index_flavor_get_exception() to make it generate unique
UUID flavor ids instead of integers.

Fixes bug #1076761

Change-Id: Iaa308578981f0379ff61a9dd42620eaf0ab1d605
2012-11-30 01:28:57 +04:00
Kieran Spear
9c12d23868 Move netaddr to pip-requires
Change-Id: I3620689e8407055234e9a2bcbab896f2394c4fc4
2012-11-13 19:26:41 +11:00
Gabriel Hurley
c61c5e28cc Enforce use of latest django_openstack_auth for PKI compat.
The latest django_openstack_auth supports PKI-signed tokens by
using Keystone's "is_ans1_token" function to determine if PKI
tokens are in use and react approriately if so.

Fixes bug 1071865

Change-Id: I62ba6370de829345d3214d80011a58e4ac6cd218
2012-11-02 15:10:43 -07:00
Brian Waldon
6a57296d65 Allow any python-swiftclient v1.1 through v1.X
Change-Id: I86c29764e43b204b4eea361c9b3b6519a2ab1d24
2012-09-13 13:48:18 -07:00
Clark Boylan
38ecad3fda Add nosehtmloutput as a test dependency.
Adding nosehtmloutput as a test dependency allows nose to output its
results to an html file. This will be used by Jenkins to save logs on
a different server.

Make slight modification to run_tests.sh in order to output the nose
test results to two different html files. One for Horizon and one for
the dashboard.

Change-Id: Ic1ed086b24705d0f2bca07f8e921646532e46c3b
2012-08-22 11:00:30 -07:00
Dan Wendlandt
2c1edf9a04 Update python-quantumclient dep to require >=2.0
Horizon integration with Quantum requires Quantum API v2.0

The first python-quantumclient release with support for the v2.0 API is
version 2.0, so we should require at least that version.  This version
was pushed to PyPi today:

http://pypi.python.org/pypi/python-quantumclient/2.0

Change-Id: Id1656241e05f62bc22c874e3c05ba711f150e784
2012-08-14 15:24:16 -07:00
Gabriel Hurley
0cd51d5c28 Switch to using cinderclient.
This is practically a transparent switch since it was
copied out of novaclient and maintains API compatibility.

NOTE: this will fail until python-cinderclient is published
to PyPI properly.

Implements blueprint switch-to-cinder-client

Change-Id: Ic8cd6660735e172ff5d3402952265a15dc15f9e5
2012-08-14 14:50:15 -07:00
Gabriel Hurley
801c2321bf Switch to use python-swiftclient instead of cloudfiles.
This patch also resolves some thread-safety problems
with when the browser and associated tables are constructed
and where the request and data caches are stored on the table.

Also includes stylistic and UX enhancments to the swift
ResourceBrowser subclass.

Implements blueprint swiftclient.

Change-Id: I578277ff158b293ee50860528b069dc20e2136a9
2012-08-13 16:48:06 -07:00
Akihiro MOTOKI
05cf900492 Initial support of Quantum V2.
Implementes blueprint quantum-horizon and blueprint readd-quantum-support.
This commit also covers blueprint quantum-workflow-integration.

- Added quantum API layer,
- Added network/subnet/port CRUD operations,
- Added 'Network' user panel,
- Added 'Network' system panel,
- Added 'Networking' tab in instance creation workflow.
- Supported launching an instance with specified network(s)

Change-Id: I7ad608e17cb6fb4f0de02721888e96a68cf926e8
2012-08-13 02:54:42 +09:00
Gabriel Hurley
caf166eacb Update python-glanceclient to allow anything < v2
The python-glanceclient pythonic API shouldn't break until v2 is
released, so let's allow anything up to that known point.

Alters the way test exceptions are constructed so that we're
not dependent on the internals of how 3rd party libraries
handle their exceptions while still being able to use them
for real testing in Horizon.

Fixes bug 1035511

Change-Id: I9a4379a19d5d6dee9d2349a73d9321def45ad78d
2012-08-11 16:33:56 -07:00
Brian Waldon
c3c6e5866b Update python-glanceclient dep to 0.3.X
Nova needs 0.3.0 and the dep in Horizon's pip-requires is preventing
that from happening.

Change-Id: I86aff6110e1c2edc513859ded08bf4d691c80204
2012-08-10 09:40:00 -07:00
Brian Waldon
c28ce3b798 Update glanceclient imports and version req
* Update references to glanceclient.v1.client.Client to glanceclient.Client
* Update references to glanceclient.common.exceptions to glanceclient.exc
* Update version requirement of python-glanceclient to v0.2.X

Change-Id: I9478f16dd7d31edebaa88de244b542eb05cb24fa
2012-07-31 13:32:24 -07:00
Gabriel Hurley
c339189b44 Auth refactor.
Switch to using the self-contained django_openstack_auth
package which is a proper django.contrib.auth pluggable
backend.

Notable functional improvements include:

  * Better overall security via use of standard Django
    auth code (well-vetted by security experts).
  * Token expiration checking.
  * User "enabled" attribute checking.
  * Support for full range of Django auth attributes
    such as is_anonymous, is_active, is_superuser, etc.
  * Improved hooks for RBAC/permission-based acess control.

Regarding the RBAC/permission-based access control, this
patch moves all "role" and "service"-oriented checks to
permission checks. This will make transitioning to
policy-driven checking much easier once that fully lands
in OpenStack.

Implements blueprint move-keystone-support-to-django-auth-backend

Change-Id: I4f3112af797aff8c4c5e9930c6ca33a70e45589d
2012-07-09 16:57:52 -07:00
Sascha Peilicke
9aa2dda073 Provide utilities to automate secure secret key generation
Implements blueprint automatic-secure-key-generation

Reduce the likeliness that the (commented-out) default key is abused
and document possible options instead.

Also use a non-empty SECRET_KEY for development / testing environments.

A later patch would make it a hard error if no SECRET_KEY is defined
(i.e. Django defaults to an empty string which is anything but secure).
Unfortunately, I can't do it now as the devstack integration test would
fail (they don't set a SECRET_KEY either) currently. So, when this
blueprint is accepted, I would submit a fix to devstack and afterwards
add the error message to warn the user about insecure defaults.

Addressed PEP-8 issues

Change-Id: Ifdab8e6b6fb3025fde7a2b92beb046ec9c5cba7f
2012-07-03 10:18:56 +02:00
Monty Taylor
8e8d5a75d5 Use client libs from PyPI (what?)
Change-Id: I201efd1675797afd8012786e73cd7d4ff5a3a684
2012-07-02 17:32:26 -04:00
Gabriel Hurley
bbf9555b59 Pin client versions until verioinfo bug is fixed.
Bumping environment version for client changes.

Change-Id: I599b83b1a4cd98da9d8363ed39f737efbd632e9c
2012-06-27 12:25:31 -07:00
Gabriel Hurley
820fdfe868 Corrections for stricter pep8 checking.
Updates the code to reflect stricter pep8 checking standards
for pep8 1.3+. Also adds a pep8 config file to silence
unnecessary indentation errors.

Removes the "reverse bugfix" monkeypatch since Django 1.4 is
now required.

Implements blueprint upgrade-pep8.

Change-Id: I7343321627d8ccd1598f39323821133168a645cc
2012-06-23 13:16:37 -07:00
John Postlethwait
7ce7905518 Forcing Horizon to use PEP8 1.1
Until we have time to upgrade to 1.3 and
deal with all of the new whitespace
requirements that comes with it.

Change-Id: I3b1b28c6e96e50bae45db4e4999d6144774d93ed
2012-06-23 07:54:10 +00:00
Gabriel Hurley
6174eae5ae Make Horizon timezone-aware.
This systematically replaces anyplace that deals with dates or
times in Horizon with Django's timezone-aware machinery, and
enables timezone support in settings.

The assumption is that the server time should *always* be UTC.

TO DO: Add a setting for allowing the user to change their preferred
timezone display and add timezone indicators anywhere times are
displayed to the user.

Implements blueprint timezones. Also fixes bug 927974.

Change-Id: I5e462ba86e64b97b46873a017f87f328acee1b1d
2012-06-21 19:38:41 -07:00
John Postlethwait
0074328fbb Updating Horizon to use LESS.
This changes all of the Bootstrap CSS and Horizon
CSS to use LESS. Horizon's specific CSS will be
organized into separate files in another commit,
as it is outside the scope of this BP.

We are also now packing LESS 1.3.0 directly within
Horizon.

Implementation of Blueprint transition-to-lesscss

Change-Id: Ie4be8b28ab3ce04ea21d7d5cd49c2ccb66bd8ade
2012-06-07 14:32:43 -07:00
Monty Taylor
c93e7c06fd Add ProjectTestingInterface to horizon.
Horizon is the last project that doesn't have support for the common
Project Testing Interface. This gets horizon up to speed with the
other bits, but shouldn't break any of the existing interfaces.

Change-Id: I464c3b10d9708a0b7b5ffd42c88cd3cf515ef6a7
2012-05-26 14:36:19 -07:00
Tihomir Trifonov
cb48cebefc Implementation of blueprint ip-validation
First draft. Added a forms.Field wrapper for IPAddress.
Implemented IPv4 and IPv6 checks, subnet mask range,
optional mask range limitation.

As far as I see now, there is only 1 place in Dashboard
to accept IP fields as input - the Security rules.
I've tried to input IPv6 rule and it was accepted.
The previous version of the code doesn't accept
IPv6, only IPv4. I am not sure if IPv6 should be
accepted here. It however works.

Patch set 3: Now using netaddr library(used also by nova),
which provides support for validation of IP addresses.
Using this library, now the IPField can support more
ways to enter an IP - like short versions:
10/8 - for all 10.xxx.xxx.xxx
192.168/16 - for all 192.168.xxx.xxx

Regarding IPy library - it performs some strict
subnet validation, which will not accept cidr like this:
192.168.1.1/20
because the only mask that matches this IP is 32.
IPy doesn't allow broader masks. But my assumption is
that the operators should take the responsibility for
the data they enter. At least this CIDR is valid after all.

Change-Id: Ie497fe65fde3af25a18109a182ab78255ad7ec60
2012-05-11 00:23:44 +03:00
Gabriel Hurley
1721ba9c4a Adds dash/panel app templates, mgmt commands, template loader.
Implements blueprint scaffolding.

Using custom management commands you can now create the majority
of the boilerplate code for a new dashboard or panel from a
set of basic templates with a single command. See the docs
for more info.

Additionally, in support of the new commands (and inherent
codified directory structure) there's a new template loader
included which can load templates from "templates" directories
in any registered panel.

Change-Id: I1df5eb152cb18694dc89d562799c8d3e8950ca6f
2012-05-01 14:41:20 -07:00
Gabriel Hurley
0b94c431ab Move to python-glanceclient.
This depends on https://review.openstack.org/#/c/6506/ for image
filtering support. Do not merge this until that has been merged.

Change-Id: I12e420f153b7b8323956e741bf9a202e31daa3b5
2012-04-29 13:01:26 -07:00
Gabriel Hurley
a2e7b10918 Revamp of testing machinery.
* Uses Django 1.4 as minimum version for Folsom.
  * Switches to using Django 1.4's LiveServerTestCase instead of
    django-nose-selenium and cherrypy.
  * Moves django-nose to be a test dependency only. Fixes bug 801362.

Change-Id: I5c8a145aba868acf355fe215307d7ce8835913f6
2012-04-23 22:24:21 -07:00
James E. Blair
0c18385fd1 Add distribute to test-requires.
Currently glance (which is required for testing by keystone because
there is no python-glanceclient yet) requires distribute>=0.6.24,
but it can't be installed as a dependency of a dependency.  Requiring
it explicitly here should help.

Install test-requires first, otherwise distribute doesn't get properly set.

Install distribute manually until we can re-address venv creation.

Align webob version to the other projects due to version conflicts.

Change-Id: Iac0b6860c600fbf230cf4f602ce1b76c68fcb7cd
2012-04-18 07:39:27 -07:00
Gabriel Hurley
009a5de287 Removed "networks" panel from Horizon.
While this functionality will eventually be restored to Horizon,
when it does it will be in a significantly revamped and improved
form. For the Essex release, the amount of work required to get it
where it needs to be is too great and so it has regrettably been
cut from the current lineup of panels. :-(

Change-Id: I9c8b6e31303461a35270bea8d1ed30ad0ae6ed93
2012-03-06 12:23:25 -08:00