summaryrefslogtreecommitdiffstats
path: root/nova/cloudpipe
Commit message (Collapse)AuthorAgeFilesLines
* Rename functions in nova.compute.flavors from instance_typeJoe Gordon2013-06-111-4/+6
| | | | | | | | | | | Second step in removing references to instance_types. Remove all references to instance_type in nova.compute.flavors. Also update compute devref to reflect changed name. Partially implements bp flavor-instance-type-dedup renamed: nova/tests/test_instance_types.py -> test_flavors.py Change-Id: I7413bf832c61d04ab90ec8b1370d3f01372c4172
* Rename nova.compute.instance_types to flavorsJoe Gordon2013-05-071-2/+2
| | | | | | | | | | | | | First step in removing references to instance_types. Rename instnace_types.py and update references to it. We currently use instance_type and flavor as synonyms, to reduce confusion we are picking one. We are going with our own terminology, flavors. renamed: nova/compute/instance_types.py -> nova/compute/flavors.py Partially implements bp flavor-instance-type-dedup Change-Id: I9dc04cf311aa8813be4f5329f23729d2c43cae6d
* Use oslo-config-2013.1b4Mark McLoughlin2013-02-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The cfg API is now available via the oslo-config library, so switch to it and remove the copied-and-pasted version. Add the 2013.1b4 tarball to tools/pip-requires - this will be changed to 'oslo-config>=2013.1' when oslo-config is published to pypi. This will happen in time for grizzly final. Add dependency_links to setup.py so that oslo-config can be installed from the tarball URL specified in pip-requires. Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other deps get installed with easy_install which can't install oslo-config from the URL. Make tools/hacking.py include oslo in IMPORT_EXCEPTIONS like it already does for paste. It turns out imp.find_module() doesn't correct handle namespace packages. Retain dummy cfg.py file until keystoneclient middleware has been updated (I18c450174277c8e2d15ed93879da6cd92074c27a). Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
* Move vpn_key_suffix into pipelibMark McLoughlin2013-01-091-1/+3
| | | | | | | | Apart from one use in the EC2 API, vpn_key_suffix is only used in pipelib. blueprint: scope-config-opts Change-Id: If90b9e77905161ea8d9263e8bae2c47ac5f79e91
* Move vpn_image_id to pipelibMark McLoughlin2013-01-091-12/+26
| | | | | | | | | | | | Apart from checking whether a given image is the cloudpipe image, the vpn_image_id option is only used within pipelib itself. Add a is_vpn_image() helper method and move the option into pipelib. Some rejiggering of how pipelib imports ec2 opts is required to avoid circular imports. blueprint: scope-config-opts Change-Id: Ie984b2bb81681c24d3cee803082960083992a535
* Add helper methods to nova.pathsMark McLoughlin2013-01-041-2/+2
| | | | | | | | | | | | | | | We only ever do one of two things with the global path options: 1) Reference the option in the default of another option so that the value can be interpolated it 2) Use the value of the option to build a path Add helper methods for both these cases - e.g. basedir_def() for the former case and basedir_rel() for the latter case. This makes it much more obvious how and where these options are used. Change-Id: I7fd94a329fe911761d02d94e5381e950c6668d56
* Move global path opts in nova.pathsMark McLoughlin2013-01-041-1/+1
| | | | | | | | | | | | Move the global path config options (i.e. state_path, pybasedir and bindir) into a new nova.paths module. A new module may seem like overkill but some utility methods associated with these options follow in a later commit. Moving them to nova.paths means they are no longer globally defined and it's more obvious which modules require these options. Change-Id: I381d23f1bbe36dc6967a38a65062b0983e1661aa
* Move ec2 config opts to nova.api.ec2.cloudMark McLoughlin2012-11-281-2/+2
| | | | | | | | | | | Only ec2_dmz_host and ec2_port are used outside of ec2.cloud and in both cases pipelib is the other module that uses them. Move all the ec2 options to ec2.cloud and make pipelib explicitly depend on the ones it needs. blueprint: scope-config-opts Change-Id: Ib187ec3421a25bdd86b13dfeae1dc9a07873eb43
* Use CONF.import_opt() for nova.config optsMark McLoughlin2012-11-201-1/+5
| | | | | | | | | | | | | The only reason for importing nova.config now is where one of the options defined in that file is needed. Rather than importing nova.config using an import statement, use CONF.import_opt() so that it is clear which option we actually require. In future, we will move many options out of nova.config so many of these import_opt() calls will either go away or cause a module other than nova.config to be imported. Change-Id: I0646efddecdf2530903afd50c1f4364cb1d5dce1
* Remove nova.config.CONFMark McLoughlin2012-11-201-1/+1
| | | | | | | | | | | | | | | Modules import nova.config for two reasons right now - firstly, to reference nova.config.CONF and, secondly, if they use one of the options defined in nova.config. Often modules import nova.openstack.common.cfg and nova.config which is a bit pointless since they could just use cfg.CONF if they just want to nova.config in order to reference CONF. Let's just use cfg.CONF everywhere and we can explicitly state where we actually require options defined in nova.config. Change-Id: Ie4184a74e3e78c99658becb18dce1c2087e450bb
* Remove nova.flagsMark McLoughlin2012-11-171-1/+0
| | | | | | | | Now that options have all moved from nova.flags to nova.config, we can safely remove the nova.flags imports and replace them with nova.config imports. Change-Id: Ic077a72dd6419bbf1e1babe71acfa43c4e8b55c8
* Switch from FLAGS to CONF in misc modulesMark McLoughlin2012-11-041-16/+13
| | | | | | | | | | | Use the global CONF variable instead of FLAGS. This is purely a cleanup since FLAGS is already just another reference to CONF. We leave the nova.flags imports until a later cleanup commit since removing them may cause unpredictable problems due to config options not being registered. Change-Id: Ib110ba8d1837780e90b0d3fe13f8e6b68ed15f65
* Remove flags.DECLAREMark McLoughlin2012-11-041-1/+4
| | | | | | The cfg.ConfigOpts class has an equivalent method, so lets use that. Change-Id: I5860230336d00d7531a0ffd255c766ff77661625
* Merge "Migrate to fileutils and lockutils."Jenkins2012-10-261-1/+2
|\
| * Migrate to fileutils and lockutils.Michael Still2012-10-251-1/+2
| | | | | | | | | | | | | | Migrate nova to using openstack-common's file and lock utilities. Resolves bug 1063230. Change-Id: I1a4c87856bc08cd33b61d7098ed856baa4583654
* | Declare vpn client option in pipelibVishvananda Ishaya2012-10-221-0/+1
|/ | | | | | | | | | | | Due to some import refactoring, nova.network.manager isn't always imported when running pipelib commands, so using the cnt_vpn_clients option fails. A failing test could not be added because our testing code imports nova.network.manager so the code config option always exists in testing. Fixes bug 1069573 Change-Id: I92b702556bfef2610b86a952dd6f9207fbab102a
* Remove outdated moduleauthor tagsJoe Gordon2012-10-011-3/+0
| | | | | | | | | The moduelauthor tags are used by the docs to see who wrote what. But many of them are outdated and wrong. fixes bug 1044578 Change-Id: I9cc27430c906d1418faf28e1b53f6306c62e8f98
* Port existing code to utils.ensure_treeMichael Still2012-08-281-2/+1
| | | | | | | Now that we have ensure_tree in utils, port most users of os.makedirs() to use it. Change-Id: I3256cbb76bd889f99f1e6f3367bd620645f828a1
* Fix cloudpipe keypair creation. Add pipelib testsAlvaro Lopez Garcia2012-07-191-3/+4
| | | | | | | | | | | Commit ec0a65d81fd11d26be77b45827a4dd7c77711675 introduced a new internal key pair API, removing the _gen_key() method from the EC2 API. pipelib.py used this method so as to generate the keypair of the cloudpipe instance. This commit also adds unittests for pipelib.py, thus fixes bug 828588 Change-Id: I0884289bac01ac5109dde4bdee5af55e7bfd5aa2
* Switch to common logging.Andrew Bogott2012-07-021-1/+1
| | | | | | I only just moved logging from nova to common, so behavior should remain the same. Change-Id: I1d7304ca200f9d024bb7244d25be2f9a670318fb
* pylint cleanupJoe Gordon2012-05-071-1/+0
| | | | | | Mostly remove unused imports Change-Id: Icdb3ec77537b2568f4e85843bab89eb63cd17d8e
* Cloudpipe tap vpn not always workingCor Cornelisse2012-04-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | Fixes bug 975043 Since Essex, all instances will have an eth0 MAC address in the range of FA:16:3E, which is near the end of the MAC address space. When openvpn is started, a TAP interface is created with a random generated MAC address. Chances are high the generated MAC address is lower in value than the eth0 MAC address. Once the tap interface is added to the bridge interface, the bridge interface will no longer have the eth0 MAC address, but take over the TAP MAC address. This is a feature of the linux kernel, whereby a bridge interface will take the MAC address with the lowest value amongst its interfaces. After the ARP entries expire, this will result in the cloudpipe instance being no longer reachable. This fix, randomly generates a MAC address starting with FA:17:3E, which is greater than FA, and will thus ensure the brige will keep the eth0 MAC address. Change-Id: I0bd994b6dc7a92738ed23cd62ee42a021fd394e2
* Add pybasedir and bindir optionsMark McLoughlin2012-03-091-1/+1
| | | | | | | | | | | Add a pybasedir option so that it can be used for interpolation in the default values of other options. This helps eliminate hard-coded paths from the sample config file. Also add a bindir option for similar reasons, but it also helps with packaging. Change-Id: Iadc746dcf2a24adbdf9bac945b5b330f01faeeb5
* Merge "Fixes cloudpipe extension to work with keystone"Jenkins2012-02-281-21/+23
|\
| * Fixes cloudpipe extension to work with keystoneVishvananda Ishaya2012-02-261-21/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | * Removes deprecated auth from cloudpipe extension * Fixes pipelib to not use ec2_api * Changes vpn_image_id to be a uuid * Uses network api to retrieve information * Simplifies cloudpipe tests * Removes nova-manage cloudpipe launching * Removes related unused db methods * Fixes bug 940744 Change-Id: I5fd1fb49a9e11b89062aa754501fed29874cb6ee
* | Add utils.tempdir() context manager for easy temp dirsJohannes Erdfelt2012-02-281-30/+33
|/ | | | | | | | | | Fixes bug 883323 (and others) Users of tempfile.mkdtemp() need to make sure the directory is cleaned up when it's done being used. Unfortunately, not all of the code does so at all, or safely (by using a try/finally block). Change-Id: I270109d83efec4f8b3dd954021493f4d96c6ab79
* Standardize logging delaration and useJason Kölker2012-02-141-1/+1
| | | | | | * Make modules use getLogger(__name__) and log to the result Change-Id: Ib6d69b4be140ec89affc86ed11e65e422d551df1
* Remove the last of the gflags shim layerMark McLoughlin2012-02-101-1/+1
| | | | | | | Make FLAGS a ConfigOpts instance and fix up all the places where we expected FlagValues behaviour. Change-Id: I8f96f42e0d8d30ba6b362d29861e717cf0fa9e89
* Move cfg to nova.openstack.commonMark McLoughlin2012-02-031-1/+1
| | | | | | | | | | | | | | | Move it here so that it can be kept in sync with openstack-common using the new update.py script for code in openstack-common's incubation area. See here for more details: http://wiki.openstack.org/CommonLibrary#Incubation Note: this commit just moves the existing code in Nova with no other changes. A subsequent commit will sync it with latest openstack-common so that it is easier see the new changes. Change-Id: If88d678b1b9bad3d37117de7f7159d7fea8ab4c8
* Refactor away the flags.DEFINE_* helpersMark McLoughlin2012-01-281-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | The next obvious step in porting to cfg is to define all options using cfg schemas directly rather than using the flags.DEFINE_* helpers. This is a large change, but it is almost entirely pure refactoring and does not result in any functional changes. The only change to note is that the default values for glance_host, glance_api_servers and default_publisher_id options are now using opt value interpolation i.e. -glance_host=_get_my_ip() +glance_host='$my_ip' -glance_api_servers=['%s:%d' % (FLAGS.glance_host, FLAGS.glance_port)] +glance_api_servers=['$glance_host:$glance_port'] -default_publisher_id=FLAGS.host +default_publisher_id='$host' Also note that the lower_bound check on the {report,periodic}_interval options are no more, but this has been true since cfg was first added. Change-Id: Ia58c8f0aaf61628bb55b1b8485118a2a9852ed17
* Refactor metadata code out of ec2/cloud.pyVishvananda Ishaya2011-11-171-1/+2
| | | | | | part 2 of blueprint separate-nova-metadata Change-Id: Id41e48434ff3a38e524a1c64757a21bd461c06b8
* Separate metadata api into its own serviceVishvananda Ishaya2011-11-151-1/+1
| | | | | | | | | | | | part 1 of blueprint separate-nova-metadata * adds api/metadata/ and moves code from ec2 * moves metadata into separate binary * changes metadata forward to use metadata host and port * moves the metadata accept rule to the metadata api * adds nova-api-* to setup.py Change-Id: I7f5d8e6cafc55b5c383cd88991f29c6059fb8d82
* remove extra reference in pipelibVishvananda Ishaya2011-08-171-2/+0
|
* make admin context the default, clean up pipelibVishvananda Ishaya2011-08-171-4/+3
|
* fix syntax errorMatthew Hooker2011-08-041-1/+1
|
* Remove instances of the "diaper pattern"Matthew Hooker2011-08-031-10/+7
| | | | | | | | Anywhere "except:" occurs, I tried to replace it with an explicit except on known error types. If none were known, Except was used. In the process I've been able to unearth a few evasive bugs and clean up some adjacent code.
* start removing references to AuthManagerVishvananda Ishaya2011-07-211-9/+9
|
* actually use the ec2_idVishvananda Ishaya2011-04-191-1/+1
|
* remove typoVishvananda Ishaya2011-04-191-1/+0
|
* Fixes cloudpipe to get the proper ip address.Vishvananda Ishaya2011-04-191-0/+2
| | | | | | | | * 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
* Merge trunk and handle flagfiles with kid-gloves in nova-api. Rename some ↵Todd Willey2011-01-121-2/+2
| | | | flags for clarity.
* Merge trunk.Todd Willey2011-01-071-2/+2
|
* merged trunk, resolved trivial conflictDavid Pravec2010-12-243-105/+135
|\
| * merged i8n and fixed conflictsVishvananda Ishaya2010-12-221-4/+4
| |\
| | * First round of i18n-ifying strings in Novajaypipes@gmail.com2010-12-111-1/+1
| | |
| * | Per-project vpns, certificates, and revocationVishvananda Ishaya2010-11-063-103/+133
| |/
* / Make nova work even when user has LANG or LC_ALL configuredDavid Pravec2010-12-161-0/+1
|/ | | | | | | | | Some commands are having different results when used in another language environment. For example ifconfig output parsing fails in my language. Also unittest using cat failed, as it didnt expect czech language in the error message. This small patch makes it work. Also adding myself to 'Authors' file.
* PEP8 cleanup in nova/*, except for tests. There should be no functional ↵Eric Day2010-10-211-11/+19
| | | | changes here, just style changes to get violations down.
* Fix the deprecation warnings for passing no context.Vishvananda Ishaya2010-10-011-2/+2
| | | | | | | | | | Moved RequestContext out of nova.api, because it is used by everything Context is passed through the queue. Added some helper methods for converting to admin context. Added a few more fields to request context.
* Fixed cloudpipe lib init.Eric Day2010-09-231-1/+2
|