Merge lp://qastaging/~termie/nova/docstring_cleanup_7 into lp://qastaging/~hudson-openstack/nova/trunk

Proposed by termie
Status: Work in progress
Proposed branch: lp://qastaging/~termie/nova/docstring_cleanup_7
Merge into: lp://qastaging/~hudson-openstack/nova/trunk
Diff against target: 757 lines (+147/-143)
7 files modified
nova/objectstore/s3server.py (+21/-23)
nova/scheduler/api.py (+51/-27)
nova/scheduler/chance.py (+4/-6)
nova/scheduler/driver.py (+17/-25)
nova/scheduler/simple.py (+23/-24)
nova/scheduler/zone.py (+6/-13)
nova/scheduler/zone_manager.py (+25/-25)
To merge this branch: bzr merge lp://qastaging/~termie/nova/docstring_cleanup_7
Reviewer Review Type Date Requested Status
Matt Dietz (community) Needs Fixing
Brian Waldon (community) Needs Fixing
Review via email: mp+57243@code.qastaging.launchpad.net

Description of the change

Docstring cleanup and formatting (objectstore, scheduler). Minor style fixes as well.

To post a comment you must log in.
979. By John Tran

Add a unit test for terminate_instances.

980. By Soren Hansen

Replace instance ref from compute.api.get_all with one from instance_get. This should ensure it gets fully populated with all the relevant attributes.

981. By termie

Docstring cleanup and formatting. Minor style fixes as well.

Revision history for this message
Brian Waldon (bcwaldon) wrote :

18: i18n support?

95-96: The indentation looks a bit off here

205: i18n ordering

213-219, 227-233: It seems like you made these changes to conform to the arbitrary rules we have defined in HACKING, not to actually be helpful. It is really necessary? I'm fine with the approach you took at line 245.

405: add a trailing space

416: add a space before the parens in the log line

446: Capitalize "choose"

465, 505: Capitalize "host"

738: You missed an object import

review: Needs Fixing
982. By Vish Ishaya

Fixes s3.py to allow looking up images by name. Smoketests run unmodified again with this change!

983. By Vish Ishaya

Fixes VMware Connection to inherit from ComputeDriver

984. By Yoshiaki Tamura

Fix RBDDriver in volume manager. discover_volume was raising exception.
Modified local_path as well.

985. By Vish Ishaya

Updates the documentation on creating and using a cloudpipe image.

986. By Jesse Andrews

Zero out volumes during deletion to prevent data leaking between users

Revision history for this message
termie (termie) wrote :

re 213-219, More realistically it is just because I was getting pretty tired by this point in the day so figuring out how to make one-line summaries was getting pretty tiring. In general Sandy Walsh has a style of writing that I found very difficult to re-summarize (I think it is because he is rather concise but writes 200 character sentences so nothing can really be stripped off very easily) so I was getting pretty worn out :p I'll take another shot at it.

987. By Josh Kearney

Try to be nicer to the DB when destroying a libvirt instance.

988. By Jay Pipes

Rework GlanceImageService._translate_base() to not call BaseImageService._translate_base() otherwise the wrong class attributes are used in properties construction...

989. By Thierry Carrez

Final versioning for Cactus

990. By Thierry Carrez

Diablo versioning.

991. By Josh Kearney

Only poll for instance states that compute should care about.

992. By Josh Kearney

Removed the unused self.interfaces_xml variable.

993. By Brian Lamar

Add additional logging for WSGI and OpenStack API authentication.

994. By Yoshiaki Tamura

Fix parameter mismatch calling to_xml() from spawn() in libvirt_conn.py

995. By termie

The change to utils.execute's call style missed this call somehow, this should get libvirt snapshots working again.

996. By Vish Ishaya

Fixes nova-manage image convert when the source directory is the same one that local image service uses.

997. By Jason Kölker

Change '== None' to 'is None'

998. By Mark Washenberger

Support admin password when specified in server create requests.

999. By Eldar Nugaev

Fix loggin in creation server in OpenStack API 1.0

1000. By Jason Kölker

use 'is not None' instead of '!= None'

1001. By Jason Kölker

Remove zope.interface from the requires file since it is not used anywhere.

1002. By Jason Kölker

pep8 fixes

1003. By Anne Gentle

Adding projectname username to the nova-manage project commands to fix a doc bug, plus some edits and elimination of a few doc todos.

1004. By Dan Prince

Implement quotas for the new v1.1 server metadata controller.

Created a new _check_metadata_properties_quota method in the compute API that is used when creating instances and when updating server metadata. In doing so I modified the compute API so that metadata is a dict (not an array) to ensure we are using unique key values for metadata (which is implied by the API specs) and makes more sense with JSON request formats anyway.

Additionally this branch enables and fixes the integration test to create servers with metadata.

1005. By Josh Kearney

Round 1 of pylint cleanup.

Revision history for this message
Matt Dietz (cerberus) wrote :

There a reason for all of the conversations to single quotes? Not an issue, exactly, but it feels like a Ruby-ish thing to do :-) Are you saying that single-quotes represent atom-like strings, where double-quotes are allowed to have inferred entities?

285 + Returns a tuple of (novaclient collection name, security
286 + context and resource id.

Missing trailing paren.

383 + :return: The host where instance is running currently.
384 + Then scheduler send request that host.

Missing article or pluralization?

416 + raise exception.Invalid(_('%s is not alive(time '
417 + 'synchronize problem?)') % src)

434 + raise exception.Invalid(_('%s is not alive(time '
435 + 'synchronize problem?)') % dest)

445 + raise exception.Invalid(_('%(dest)s is where %(ec2_id)s is '
446 + 'running now. choose other host.')
447 + % locals())

Given my original assumption, shouldn't these be double-quoted? There's more after this, as well. I don't think I should paste them all.

711 + """Picks a host that is up at random in zone."""

I think I prefer the original comment here. Perhaps at least some commas, if nothing else?

review: Needs Fixing
1006. By termie

attempts to make the docstring rules clearer

1007. By termie

Docstring cleanup and formatting. Minor style fixes as well.

1008. By Naveed Massjouni

Added an option to run_tests.sh so you can run just pep8. So now you can:
    ./run_tests.sh --just-pep8
or
    ./run_tests.sh -p

1009. By Josh Kearney

Another small round of pylint clean-up.

1010. By Vish Ishaya

Makes metadata correctly display kernel-id and ramdisk-id.

References from the Database don't support "in".

1011. By termie

Docstring cleanup and formatting (compute). Minor style fixes as well.

1012. By termie

Docstring cleanup and formatting (console). Minor style fixes as well.

1013. By termie

Docstring cleanup and formatting (nova dir). Minor style fixes as well.

1014. By termie

Docstring cleanup and formatting (nova/db dir). Minor style fixes as well.

1015. By termie

Docstring cleanup and formatting (nova/image dir). Minor style fixes as well.

1016. By Eldar Nugaev

Fixed network_info creation in libvirt driver. Now creating same dict as in xenapi driver.

1017. By Eldar Nugaev

fix logging in reboot OpenStack API

1018. By Jimmy Bergman

Change response of the EC2 API CreateVolume method to match the API docs for EC2.

1019. By Jimmy Bergman

Adapt DescribeInstances to EC2 API spec.

1020. By Dan Prince

Create a dictionary of instance_types before executing SQL updates in the instance_type_id migration (014). This should resolve a "cannot commit transaction - SQL statements in progress" error with some versions of sqlite.

1021. By Brian Lamar

-Fixed indent for _get_ip_version
-Added LoopingCall to destroy as suggested by earlier bug report
-Standardized all LoopingCall uses to include useful logging and better error handling

1022. By Eldar Nugaev

Fix bug with content-type and small OpenStack API actions refactor

1023. By Vish Ishaya

Fixes cloudpipe to get the proper ip address.

* Changes FLAGS.vpn_image_id to integer
* Converts to str when comparing because instance['image_id'] is a str
* Removes unused method from db
* Converts integer_id to ami when launching
* Adds docs for setting up interface in cloudpipe image

1024. By Muneyuki Noguchi

Restore volume state on migration failure to fix lp742256.

1025. By Eldar Nugaev

Provide option of auto assigning floating ip to each instance. Depend on auto_assign_floating_ip boolean flag value. False by default.

1026. By Brian Lamar

Abstracted libvirt's lookupByName method into _lookup_by_name.

1027. By Ken Pepple

clarifies error when trying to add duplicate instance_type names or flavorids via nova-manage instance_type

1028. By Masanori Itoh

Use runtime XML instead of VM creation time XML for createXML() call in order to ensure volumes are attached after RebootInstances as a workaround, and fix bug #747922.

1029. By Brian Waldon

Refactoring nova.exception.Invalid usage

1030. By Yoshiaki Tamura

Add a test checking spawn() works when network_info is set, which
currently doesn't.
The following patch would fix parameter mismatch calling _create_image() from spawn() in
libvirt_conn.py

1031. By Brian Waldon

Refactoring the usage of nova.exception.Duplicate

1032. By Brian Waldon

Refactoring usage of nova.exception.NotFound

1033. By Jay Pipes

Make the import of distutils.extra non-mandatory in setup.py. Just print a warning that i18n commands are not available...

1034. By Eldar Nugaev

Added more unit-test for multi-nic-nova libvirt

1035. By Ken Pepple

converted 1/0 comparison in db to True/False for Postgres cast compatibility

1036. By Ken Pepple

added nova version to usage output of bin/nova-manage for easy identification of installed codebase

1037. By Anthony Young

Uses memcached to cache roles so that ldap is actually usable.

1038. By Brian Waldon

Final cleanup of nova/exceptions.py in my series of refactoring branches

1039. By Todd Willey

Expose AuthManager.list_projects user filter to nova-manage.

    ./bin/nova-manage project list admin

will now only show projects which the user 'admin' is associated with.

1040. By Anne Gentle

Change the links in the sidebar on the docs pages.

1041. By Eldar Nugaev

removed unused method and fixed imports

1042. By Eldar Nugaev

Fixed: Check for use of IPv6 missing

1043. By John Tran

ApiError 'code' arg set to None, and will only display a 'code' as part of the str if specified.

1044. By Jason Kölker

add support for git checking and a default of failing if the history can't be read

1045. By Alex Meade

Since run_tests.sh utilizes nose to run its tests, the -x, --stop flag works correctly for halting tests on the first failed test. The usage information for run_tests.sh now includes the --stop flag.

1046. By Alex Meade

Modified the instance status returned by the OS api to more accurately represent its power state

1047. By Dan Prince

Implement get_host_ip_addr in the libvirt compute driver.

1048. By Kevin Bringard

Add a flag to allow the user to specify a dnsmasq configuration file for nova-network to use when starting dnsmasq. Currently the command line option is set to "--config-fil=" with nothing specified. This branch will leave it as it is if the user does not specify a config file, but will utilize the specific file if they do.

If there is a conflict with the options specified on the command line and those in the configuration file, dnsmasq will use the config file (overriding the command line options) if the option is only allowed to be specified once, or it will use both if the option is allowed to be specified multiple times.

I have found this personally useful for adding things such as "domain=" to set the domain hostname on VMs as well as to more finely tune DNS delegation and upstream resolution.

1049. By Naveed Massjouni

Added support in the nova openstack api for requests with local hrefs, e.g., "imageRef":"2"
Previously, it only supported "imageRef":"http://foo.com/images/2".
The 1.1 api spec defines both approaches.

1050. By Ken Pepple

ensure create image conforms to OS API 1.1 spec

1051. By Brian Lamar

Adding support for server rebuild to v1.0 and v1.1 of the Openstack API

1052. By Brian Waldon

Adding OSAPI v1.1 limits resource

1053. By Soren Hansen

Don't fail the test suite in the absence of VCS history.

1054. By Vish Ishaya

Fixes for nova-manage vpn list

1055. By Yuriy Taraday

Sanitize get_console_output results. See bug #758054

1056. By William Wolf

Simple fix for this issue. Tries to raise an exception passing in a variable that doesn't exist, which causes an error.

1057. By Lorin Hochstein

Adds coverage-related packages to the tools/pip-requires to allows users to generate coverage reporting when running unit tests with virtulenv.

For example, this will now work:

./run_tests.sh -V --with-coverage --cover-package=nova

1058. By Sandy Walsh

Host Filtering for Distributed Scheduler (done before weighing)

1059. By Brian Waldon

Removing a rogue try/catch expecting a non-existant exception.TimeoutException that is never raised.

1060. By Josh Kearney

Set root password upon XenServer instance creation.

* Note: Will need to redeploy XenServer plugins.

Revision history for this message
Jay Pipes (jaypipes) wrote :

Hey Andy, looks like Ed and Brian had a few comments on this patch. Please do set the merge proposal to Work in Progress while you address those, or let us know if you won't be addressing them. Thanks!

1061. By Masanori Itoh

Enable RightAWS style signature checking using server_string without port number, add test cases for authenticate() and a new helper routine, and fix lp753660.

1062. By Sandy Walsh

extracted xenserver capability reporting from dabo's dist-scheduler branch and added tests.

1063. By Justin Shepherd

Fix for #780276 (run_tests.sh fails test_authors_up_to_date when using git repo)

1064. By Justin Shepherd

Bluprint URL: https://blueprints.launchpad.net/nova/+spec/improve-pylint-scores/

These changes quiet down 15 of the top 20 pylint offenders when sorted by number (as of Build #882).

Updated all of the sqlalchemy/migrate_repo/versions files, and removed all unused imports as well as replaced the sqlalchemy wildcard import with explicit imports.

1065. By Vish Ishaya

Fixes an issue with conversion of images that was introduced by exception refactoring. This makes the exceptions when trying to locate an ec2 id clearer and also adds some tests for the conversion methods.

1066. By termie

docstring cleanup, objectstore and scheduler

Revision history for this message
Mark Washenberger (markwash) wrote :

Termie,

If you've addressed the concerns above, feel free to comment and put this back to "Needs Review". Until then I'm going to clear it from the list of active reviews.

Cheers.

Unmerged revisions

1066. By termie

docstring cleanup, objectstore and scheduler

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.