528 Commits

Author SHA1 Message Date
jaypipes@gmail.com
c9a22eeb6c Documentation updates to make glance add command clearer, hopefully :) 2011-04-22 14:54:24 -04:00
Joseph Suh
32e9b882e1 I modified documentation to show more first-time user friendly examples on using glance. With the previous examples, I followed it as a first-time user and had to spend more than necessary time to figure out how to use it. With this modification, other first-time users would make it work on their systems more quickly. 2011-04-21 15:07:43 +00:00
Brian Waldon
50a9f90b7d - Require user confirmation for "bin/glance clear" and "bin/glance delete <id>"
- Allow for override with -f/--force command-line option
2011-04-21 02:17:43 +00:00
Brian Waldon
4ba7a1c80a adding --force option to test_add_clear 2011-04-20 19:58:10 -04:00
jaypipes@gmail.com
25077d4442 Adds a test case for updating an image's Name attribute. glance update was not regarding 'name' as a top-level modifiable attribute... 2011-04-20 20:47:40 +00:00
jaypipes@gmail.com
32d04b3bba Name is an attribute that is modifiable in glance update, too.. 2011-04-20 15:12:18 -04:00
Dan Prince
7d0f1d2fef Mark image properties as deleted when deleting images.
Added a unit test to verify public images and their properties get deleted when running a 'glance clear' command.
2011-04-20 18:37:42 +00:00
Dan Prince
5e35359d45 Update tests and .bzrignore to use tests.sqlite instead of glance.sqlite. 2011-04-20 14:08:04 -04:00
Dan Prince
47af47787b Only modify the connection URL in runs_sql if the original connection
string starts with 'sqlite'.
2011-04-20 14:01:19 -04:00
Dan Prince
896c81209d Merge in code from lp:~jaypipes/glance/clear_image_props to make a nice
decorator function we can use for tests that need to run backend SQL
commands. This should keep our tests zippy but provide us the access we
need for disk based DB access.
2011-04-20 13:40:39 -04:00
jaypipes@gmail.com
d071d6548f Create a decorator that handles setting the SQL store to a disk-based SQLite database when arbitrary SQL statements need to be run against the registry database during a test case 2011-04-20 13:27:02 -04:00
Dan Prince
fe7a8e9ec1 Docstring update on the run_sql_command function. 2011-04-20 12:06:20 -04:00
Dan Prince
a13fa8a6bd Mark image properties as deleted when deleting images.
Added a unit test to verify public images and their properties get deleted
when running a 'glance clear' command.
2011-04-20 11:07:44 -04:00
jaypipes@gmail.com
5f3f566ea7 Add log_file to example glance.conf 2011-04-19 22:32:40 +00:00
Brian Waldon
ebd81ca0f3 fixing spacing in help text 2011-04-19 15:15:40 -04:00
Brian Waldon
860e8c57a2 adding confirmation on image delete/clear; adding user_confirm functionality 2011-04-19 15:12:52 -04:00
jaypipes@gmail.com
5ae168752c Add log_file to example glance.conf 2011-04-19 15:07:07 -04:00
jaypipes@gmail.com
a4a4226401 Make sure we use get_option() when dealing with boolean values
read from configuration files...otherwise "False" is True :(
2011-04-19 17:54:32 +00:00
Eldar Nugaev
38d6e62e67 Fixing tests.
Sorry for late response. 

Rick Harris wrote on 2011-04-12
Really nice job, Eldar.

> 46	+        image_swift = StringIO.StringIO("nevergonnamakeit")
> 47	+        options = SWIFT_OPTIONS.copy()
> 48	+        del options['swift_store_user']
> 49	+        self.assertRaises(BackendException,
> 50	+                          SwiftBackend.add,
> 51	+                          2, image_swift, options)

Might be better to DRY up the code some by adding a helper-method, like:

def assertOptionRequiredForSwift(self, key):
  image_swift = StringIO.StringIO("nevergonnamakeit")
  options = SWIFT_OPTIONS.copy()
  del options[key]
  self.assertRaises(BackendException,
    SwiftBackend.add,
    2, image_swift, options)

Marking as Needs Fixing, but if you don't like the idea, I'd be willing to set this as Approved (since the suggestion is so minor :-)
2011-04-19 16:32:41 +00:00
jaypipes@gmail.com
cd4a41b44f Make sure we use get_option() when dealing with boolean values
read from configuration files...otherwise "False" is True :(
2011-04-19 11:43:36 -04:00
Joseph Suh
0c6403f454 resolve merge conflicts 2011-04-18 16:37:48 -04:00
Joseph Suh
8b7927c287 chnaged output 2011-04-18 16:30:44 -04:00
Thierry Carrez
0dba121f03 Open Diablo release. 2011-04-15 12:32:43 +00:00
Thierry Carrez
772658fa4a Diablo versioning 2011-04-15 11:47:55 +02:00
Soren Hansen
e4ae52d0b4 Fake merge with ancient trunk. This is only so that people who "accidentally" have been following lp:~hudson-openstack/glance/trunk will not have problems updating to this. 2011-04-15 09:34:17 +00:00
Thierry Carrez
1975f16933 Final versioning for Cactus 2011-04-14 22:03:01 +00:00
Eldar Nugaev
2ff7a179c3 fixing after review 2011-04-14 03:18:26 +04:00
jaypipes@gmail.com
3dcfd4a3b4 Removes capture of exception from eventlet in _upload_and_activate(), which catches the exceptions that come from the _safe_kill() method properly.
Also fixes an incorrect call to _safe_kill() with mapping instead of image ID in the block of code that kills an image if a bad checksum is given.

Fixes bug #759018.
2011-04-13 22:07:59 +00:00
jaypipes@gmail.com
046a4e6287 RickH fixups from review 2011-04-13 17:00:08 -04:00
jaypipes@gmail.com
3a3dee990a Add catch-all except: block in _upload() 2011-04-13 15:14:36 -04:00
Joseph Suh
d7ce2b96d3 change output from glance-registry 2011-04-13 15:12:46 -04:00
Joseph Suh
388f66eed3 get latest from lp:glance 2011-04-13 15:10:06 -04:00
jaypipes@gmail.com
5a42a92e77 Ensures that configuration values for debug and verbose are used if command-line options are not set. 2011-04-13 17:03:04 +00:00
jaypipes@gmail.com
ad4c92bada Removes capture of exception from eventlet in _upload_and_activate(), which
catches the exceptions that come from the _safe_kill() method properly.

Also fixes an incorrect call to _safe_kill() with mapping instead of image
ID in the block of code that kills an image if a bad checksum is given.

Fixes bug #759018.
2011-04-13 12:44:47 -04:00
Eldar Nugaev
9ad6223fd1 Fix logging in swift 2011-04-13 12:57:52 +00:00
jaypipes@gmail.com
1b84b48a24 Fix Thierry's notice about switched debug and verbose 2011-04-13 08:56:45 -04:00
jaypipes@gmail.com
9ed5eefd94 Change parsing of headers to accept 'True', 'on', 1 for boolean truth values. 2011-04-13 12:53:02 +00:00
Thierry Carrez
aa716596fd Final cactus versioning 2011-04-13 10:36:44 +02:00
jaypipes@gmail.com
6703ba193e OK, fix docs to make it clear that only the string 'true' is allowed for boolean headers. Add False-hood unit tests as well. 2011-04-12 17:45:16 -04:00
jaypipes@gmail.com
e6f8c72fed Logging was not being setup with configuration file values for debug/verbose 2011-04-12 14:01:27 -04:00
jaypipes@gmail.com
12fead04ef Merge trunk 2011-04-12 13:27:51 -04:00
jaypipes@gmail.com
cb8b3580f7 Fix up the way the exception is raised from _safe_kill()... When I "fixed" bug 729726, I mistakenly used the traceback as the message. doh. 2011-04-12 17:12:56 +00:00
jaypipes@gmail.com
788296100d Change parsing of headers to accept 'True', 'on', 1 for boolean truth values. 2011-04-11 20:44:06 -04:00
Soren Hansen
65386df0b7 Add the migration sql scripts to MANIFEST.in. The gets them included in not only the tarball, but also by setup.py install. 2011-04-11 22:22:54 +00:00
Soren Hansen
7582a33c79 Add the migration sql scripts to MANIFEST.in. The gets them included in not only the tarball, but also by setup.py install. 2011-04-11 22:21:06 +02:00
jaypipes@gmail.com
cc8d96d550 Changed raise of exception to avoid displaying incorrect error message in _safe_kill() 2011-04-11 14:57:52 -04:00
Eldar Nugaev
f46c961ffb fix logging in swift 2011-04-11 20:53:43 +04:00
jaypipes@gmail.com
74e8627738 Changes "key" column in image_properties to "name". 2011-04-11 14:59:31 +00:00
Dan Prince
cc43244ec3 Updated properties should be marked as deleted=0. This allows previously deleted properties to be reactivated on an update.
Add unit tests to check the above condition.

Also updated the help for bin/glance's 'update' command so that it explicitly states:

 Metadata fields that are not specified in the update command will be deleted.
2011-04-11 14:43:00 +00:00
jaypipes@gmail.com
b786ade24f Adds --config-file option to common options processing.
Updates glance-manage to use configuration files as well
as command line options.

Completes documentation on configuring Glance's servers
and CLI tools.
2011-04-11 14:37:54 +00:00