64 Commits

Author SHA1 Message Date
Tim Simpson
0fc4600e01 Tests the API in XML mode.
This form of testing has been nearly available for awhile but was not
turned on because it will increase the time of a full tox test run by
eight seconds. However there has recently been new features which do
not work at all with XML, so the time loss seems like a silly reason
to not gate on this.

implements blueprint test-with-xml

Change-Id: I98d892bb5c1a0c16425f80a28a296c70120318c8
2013-03-06 18:24:17 -06:00
daniel-a-nguyen
0a71ef9e88 Rate limits implementation
added unittest for limits
    reverted changes to openstack/common
    removed commented code
    cleaned up unittest
    added int-tests
    updated reference to XMLNS
    removed 1.1 XMLMS in wsgi

Implements: blueprint rate-limits
Change-Id: I842de3a6cae1859cc246264a5836abfd97fb8074
2013-03-05 14:17:36 -08:00
Steve Leon
c4848cd472 Quota feature
Quota check for create/delete/resize volume
Quota is implemented as a decorator, which can be easy enabled and disabled if wanted.
The quota feature uses a reservation system that reserves resources prior to usage.

BP https://blueprints.launchpad.net/reddwarf/+spec/quotas

Change-Id: I5df82c8f1d7b40311b5d5d7301992607f98e9b2a
2013-03-05 09:44:47 -08:00
daniel-a-nguyen
460aa6abde Implement alternate root privileges
Addresses comments from a previous review
Leave configs in configs!
Cleaned up unit test, removed mock too

Implements: blueprint create-restricted-root-account

Change-Id: I43327c97c7b80dc99a2cfe071562d01f2d0f54a4
2013-02-22 15:24:23 -08:00
Ed Cranford
90f8ca81d9 Modify-user features.
Grant, revoke, list user access.
Change user password and get single user.

Partially implements blueprint modify-users

Change-Id: I0001a7a9d1c527b88a1ed965f0f077c864e602cf
2013-02-19 20:40:26 -06:00
Joe Cruz
d9c9a91642 Negative Taskmanager Resize/Migration fixes.
* Revert barrier should be right after Verify_RESIZE is confirmed, but
  before confirming flavor for a resize action.
* Verify nova server status before restarting mysql.
  If anything goes wrong during resize/migrate actions, taskmanager
  first checks that the Nova server status is ACTIVE and only then make
  the call to restart MySQL.

Fixes: bug #1102523

Change-Id: Ibca436d7fdcdef9f1afcec111da84891cd15353c
2013-01-23 15:03:15 -06:00
Ed Cranford
ce6b98e2d1 Checks guest status during migration.
During a migration, waits for the guest and service to start up
following the status change to VERIFY_RESIZE. Confirms if everything
is all right, or reverts if not.

Implements blueprint migration-check-guest-status

Change-Id: Ia7c7ed1fd0070429fed93323ca559d1c0742bd8f
2013-01-17 16:59:16 -06:00
Michael Basnight
c8a5bc39dc Update oslo codebase within reddwarf.
* Updated logging,cfg,setup to new oslo
* Split out the paste ini from the conf files
* Modified reddwarf-api/server to use new modules
* Modified reddwarf-manage to use new cfg
* Added rpc helper for rpc services
* Modified reddwarf-taskmanager to use rpc helper
* Modified reddwarf-guestagent to use new rpc helper
* Fixed guestagent api to use rpc proxy
* Fixed taskmanager module to conform to new rpc
* Updated guestagent manager/pkg to use new rpc
* Updated api paste to use keystoneclient auth_token
* Updated managers to use periodic tasks

Implements: blueprint reddwarf/upgrade-oslo

Change-Id: I9ad1b441eca855a4304454014ae746ec51bef8f3
2012-12-18 21:18:28 -06:00
Vipul Sabhaya
fb1197bc8f Better defaults that fix volume support
The default value for block_device_mapping should not be a path, rather should be the name of the actual device in /dev.  The device_path should also be defaulted to the fully qualified path to that device.  This patch fixes volume support and does not require you to set reddwarf_volume_support=False to get a guest to boot sucessfully.

fixes bug: 1084802

Change-Id: I8aa8582da7b400c91f761a2974f859df8cd45003
2012-12-05 17:03:35 -08:00
Tim Simpson
bec9bc586a Updates tests to run in other configurations.
* Changes the reddwarf.conf.test flag so "use_nova_server_volume"
  is turned off, as it should be, and fixes a resulting fake mode bug.
* Fixes tests to not check for volume when
  "reddwarf_main_instance_has_volume" is specified in the test config.
* Changes poll_until to reuse Reddwarf implementation instead of
  rewriting it just for the tests.
* Adds tests to confirm its possible to log into a real MySQL instance.
  These are only run for "real mode" in a VM or other environment, but
  it's necessary that they live here.
* Changes the "get_address" method of the InstanceTestInfo object to
  get pulled from the test config (necessary when hitting other
  environments).
* Fixes some bugs in guest agent models.
* Deleted the pagination test. It can't run very quickly in the tox
  fake mode, so there's no point in keeping it here (it still exists
  in Reddwarf-Integration).

Change-Id: I2835762c4180e1ca594b27194564b8f993aa4066
Fixes: bug #1085188
2012-11-30 18:07:41 -06:00
Aaron Crickenberger
186cf0647f Use reddwarf instead of reddwarf_lite
This codebase used to be reddwarf_lite, it is now stackforge/reddwarf,
let's make sure naming conventions follow suit

Fixes bug 1081321

Change-Id: I9d56a1ec5274f49285992a2264b0e6d7a2a6c27f
2012-11-20 16:48:06 -05:00
Tim Simpson
c007356a78 Adding tests to Reddwarf.
The tests come from the Reddwarf Integration repository. wsgi_intercept
is used to allow the test code to hit the server code directly. It also
properly sets up the SqlLite database before each run.

* Adds an "event simulator" which queues up functions that would
  normally be spawned with eventlet. The various sleep functions are
  then swapped with a method that runs these faux-events.

* Adds many of the Reddwarf Integration tests. The idea is these
  could still run in a richer, real environment, but are running here
  enables us to quickly check feature breaks for each commit and
  lowers the learning curve necessary to test the API. The downside
  is some of these tests still have artifacts of their origins, such
  as (unused) classes to connect to MySQL databases. Some more work
  will be necessary to separate the "real mode" functionality of these
  tests further.

Implements: blueprint tox-tests
Change-Id: I9857f265c1cb46832906ef5e6a0c7bb4a092e637
2012-11-19 12:33:40 -06:00
Craig
3c268f707c fake mode working with new novaclient create_server_volume method 2012-08-21 17:28:03 -05:00
Tim Simpson
be8c1d15b4 Updated metadata to support XML in the mgmt api.
* Moved mgmt/account get logic into the model class.
* Fixed a fake mode bug.
2012-08-21 17:05:43 -05:00
Paul Marshall
bb000df3bf adding mgmt action to reboot an instance 2012-08-21 16:48:05 -05:00
Michael Basnight
7118fcd9b7 Merge pull request #174 from ed-/occlude-dbs
Adds ignore_dbs to configs, and makes the models respect it.
2012-08-03 08:25:28 -07:00
Nirmal Ranganathan
ccdcd3e61d Adding support to use the nova create server with volume. 2012-07-31 20:16:33 -05:00
Ed Cranford
b9038e6fd5 Adds ignore_dbs to configs, and makes the models respect it. 2012-07-30 11:57:34 -05:00
Ed Cranford
16c84902c9 Adds root to the ignore_users list and forces user list to obey it. 2012-07-26 13:10:40 -05:00
Nirmal Ranganathan
21b1cd5208 Merge pull request #166 from TimSimpsonR/config_fix
Adding the ability to get types other than strings to the Config class.
2012-07-17 13:25:33 -07:00
Tim Simpson
0cfdbea821 Adding the ability to get types other than strings to the Config class.
* Changed the "ignore_users" config value to a list.
2012-07-17 15:00:42 -05:00
Craig Vyvial
5a07adfe3e adding logging to the service conf files 2012-07-17 11:27:37 -05:00
Tim Simpson
bc507d773c Adding tox support to Reddwarf.
* Changed reddwarf.conf.test to reflect local mode.
* Updated fake keystone. Any token is treated as the tenant ID, and any tenant id starting with "admin" is treated as an admin.
2012-07-16 11:22:02 -05:00
Paul Marshall
6333c7e9b7 added an ignore users option, e.g. prevents such users from being deleted, also only get is root enabled info by checking the db 2012-07-10 10:39:20 -05:00
Tim Simpson
e795878ca1 Changing the max_instances_per_user to 55 in the test config file. 2012-07-09 14:48:16 -05:00
Nirmal Ranganathan
5cb018d288 Adding a fault wrapper to catch and wrap exceptions that are thrown as plain text. 2012-06-24 22:01:30 -05:00
Nirmal Ranganathan
81afbc91e4 Merge pull request #144 from ed-/simple-quota
Simple per-user instance quota checking in the create call. PEP8 fixes.
2012-06-21 15:39:57 -07:00
Ed Cranford
25c97fa6c5 Simple per-user instance quota checking in the create call. PEP8 fixes. 2012-06-21 17:00:25 -05:00
Tim Simpson
9e7ec7043d Getting rid of our hack to simulate 404's for instance GETs.
* Fixed a problem with the fake mode config which prevented instances from being deleted.
2012-06-21 11:49:30 -05:00
Tim Simpson
cf36880b4b Polling until the server is deleted. 2012-06-20 13:53:59 -05:00
Nirmal Ranganathan
eb68cd53ad Merge pull request #132 from rnirmal/used_volume
Used volume
2012-06-18 13:11:22 -07:00
Nirmal Ranganathan
c7d93e7ce7 Refactoring the instance load method Adding back the volume used parameter. Added timeouts for all guest sync calls. Refactored the instance models. 2012-06-18 15:10:01 -05:00
Michael Basnight
e992f2c796 Adding custom taskmanager q 2012-06-18 13:37:18 -05:00
Nirmal Ranganathan
6a765bd91a Farvel /flavors/detail. Also consolidating the API() into a common class 2012-06-14 10:47:25 -05:00
Nirmal Ranganathan
93c3bd650e Adding a admin context check used for the management calls 2012-06-11 22:54:34 -05:00
Sudarshan Acharya
6df15cebe1 Async operation for instance resize/delete. 2012-06-07 16:50:32 -05:00
Nirmal Ranganathan
ebd2d227d6 Resize live volumes attached to an instance 2012-06-05 18:05:50 -05:00
Tim Simpson
844ff7bdf5 Serialize XML correctly if instance isn't found.
* Added some comments for the wsgi stuff.
* Changed WSGI code to log in the event results can not be serialized, since the base class swallows the exceptions and hides nasty bugs.
* No longer return wsgi.Resulti for instance get and delete, since it doesn't work with XML serialization.
* Also fixed fake mode test conf.
* Added ComputeInstanceNotFound to HTTPNotFound in exception map.
* Fixed Fake Mode by adding another flavor type (this should probably be data driven...).
2012-06-05 08:20:07 -05:00
Tim Simpson
5189546e5e Changing version in reddwarf.conf.sample. 2012-06-01 16:08:25 -05:00
Nirmal Ranganathan
85b5b6da1d Reinstantiating the Task Manager aka Reddwarf Manager 2012-05-31 09:47:20 -05:00
Nirmal Ranganathan
a23f7036bb Adding config for device mapping 2012-05-30 17:17:47 -05:00
Sudarshan Acharya
ad6b8c3c5e Changing rsdns_records table name to be rax independent. 2012-05-25 15:32:39 -05:00
Sudarshan Acharya
0c34c75dc4 DNS Support for Instance IP.
Can be turned off using a flag.
Provides a Rackspace DNS driver.
Provides an interface to write drivers for other DNS engines.
2012-05-25 09:13:57 -05:00
Craig Vyvial
f401ea45c5 updating the volume service endpoint to version 1 instead of v2 2012-05-23 11:07:22 -05:00
Michael Basnight
dac9b21262 Bypassing auth/svccatalog in novaclient 2012-05-17 14:51:01 -05:00
Craig Vyvial
2ab45887ea clean up and change the volume desription to have the instance id
fake mode works with all the tests

mounting a volume is causing a database name of #mysql50#lost+found to be created

pep8 fixes
2012-05-03 14:27:57 -05:00
Craig Vyvial
777f492d1b Allowing a user to add a volume to the instance on create api call
added some helper code to make sure the mysql service is up

add a config value to turn on volume support

moving around the lines to be dependent on volume support

trying to stop volume support

fixes with the merge

imported and raised exceptions in guest correctly

fixed the config get values as boolean and not just the string

deleting the serivce status entry on delete of the instance so that the

guest can not update the instance to active again.

made the create and update times saved correctly for an instance

check if mysql is already installed in the guest

clean up instance model

using _(i8n)

adding the populate databases back in

pep8 compliance

updated apt get version method

moved the volumeHelper class to a new module

made the start/stop mysql methods public

created a method to create volume for instances and readability

created a new client for volume calls

added the volume and size to the create/list/show instance api calls

removing the mount_point and device_path from the MysqlApp class

removing code that deleted the instance status entry

adding volume service to the reddwarf.conf.test file

set volumes to not be disabled by default
2012-05-03 14:27:57 -05:00
Michael Basnight
0f9cfeac07 Show ips based on a flag value
* Added a flag value to determine whether to show the ip
* Added the logic to pass to the views to show the ip or not
2012-04-03 20:54:06 -05:00
Tim Simpson
cf3e0b5042 Created test fakes for Nova and the Guest. With these you can run the server with no external dependencies!
* Changed reddwarf-server to load the paste config first so the config file valeus would be read during start up.
* Made the Config class update the dictionary values instead of replace them all.
* Added a test conf file for running the server locally.
* Added a fake version of Nova and the Guest API.
* Changed Guest API to not require every single method to pass context and ID. This also makes it easier to fake.
* Changed some instances of uuid to id.
* Added "BUILD" server status to list of statuses which should be returned instantly in Instance status code.
2012-04-02 14:33:26 -05:00
Michael Basnight
348b5e5b4d Updated the context object in all services.
* Fixes Github issues #46 and #45
* Created a middleware for context
* Commented out a bug that was introduced
* Updated context in all services
* Turned a few straggling 201s into 200s
2012-03-28 19:06:13 -05:00