Commit Graph

40651 Commits

Author SHA1 Message Date
Jenkins f07306ee3d Merge "Remove legacy v2 API tests which use wsgi_app()" 2016-05-25 10:27:02 +00:00
Ken'ichi Ohmichi b4c1c9f482 Remove legacy v2 API tests which use wsgi_app()
There is fakes.wsgi_app() for testing legacy v2 API code, but the
method becomes unnecessary. So this patch removes the method and
unit tests which used the method for legacy v2 API.

NOTE: This patch just removes the test of createserverext extension
      which is not documented and not tested with Tempest.
      The extension is not implemented and seems unnecessary legacy.
      Let's remove the test.

Partially implements blueprint remove-legacy-v2-api-code

Change-Id: I0eaa0a9860af7d574a689722785d5d3d614eb0c1
2016-05-25 12:47:09 +09:00
Jay Pipes 9d99081da2 Remove duplicate unit test in test_tracker
The test_copy_resources_adds_allocation_ratios() unit test in
test_tracker.py was duplicating assertions of the test directly above it
called test_compute_node_created_on_empty(). So, we delete the duplicate
unit test and in the process clean up the
test_compute_node_created_on_empty() test case to remove some lines that
were improperly overriding the RT's allocation ratio attributes instead
of relying on the CONF values to set them.

Change-Id: Ie7012e222d05a1872246961bea94df4640ffa368
2016-05-24 17:04:27 -04:00
Jay Pipes 0de190bed2 Remove delete stubs in test_resource_tracker
The resource tracker never calls ComputeNode.destroy() and therefore
never calls nova.db.compute_node_delete(). However, the base test case
class in test_resource_tracker.py was stubbing this out for some reason.

Change-Id: I14083850974202ead38dea996c42456155814219
2016-05-24 17:04:27 -04:00
Jay Pipes 3e7e8cc770 Remove service crud from test_resource_tracker
The Service object is no longer coupled with the ComputeNode object and
is not used in the resource tracker at all. test_resource_tracker.py was
still creating a service entry in its setUp() and mocking out
service-related stuff, so we remove that.

Change-Id: I83bf0253c92f318cbc782aee4e6f411925b6a7af
2016-05-24 17:04:27 -04:00
Jay Pipes 0510f1dbb5 Remove conductor from test_resource_tracker
The base test case class in test_resource_tracker.py was starting a
conductor service... for no reason at all. The resource tracker no
longer directly calls any conductor calls at all. Everything is done via
the objects interfaces now or via the scheduler client. So, we remove
the call to start a conductor service and the stubout of a flavor_get
call that was not in use any more.

Change-Id: I356604a9240ed53a6f0463fc1d99989ed263b826
2016-05-24 17:04:27 -04:00
Jay Pipes 96e7773d1a Remove StatsDicTestCase from test_resource_tracker
The StatsDictTestCase in test_resource_tracker.py was supposed to be
verifying that the "stats" dict field on the ComputeNode object was
being populated with some keys like num_instances,
num_proj_{project_uuid), etc. Unfortunately, all this test was really
asserting was that the behaviour of the ComputeNode object when
saving/setting the stats dict converted the values from integers to
strings.

The *actual* setting of real values of stats information is already
being fully tested with unit tests that are readable and cover all
variations of the stats keys in test_tracker.TestInstanceClaim's
methods, so we remove the StatsDictTestCase from
test_resource_tracker.py.

Change-Id: Ief658c0da2503b8e9905f5da2dd4c667a3fce550
2016-05-24 17:04:27 -04:00
Jay Pipes 9aef61ce16 rt-unit: Replace hard-coded strings with constants
The test_tracker.py file over time had had the host and
hypervisor_hostname (nodename) values hard-coded as strings throughout
the file. This commit simply replaces those strings with references to
module-level constants in order to simplify and make the test cases more
consistent. Some of the test cases were using the string 'fake-host' to
refer to the host and 'fakehost' to refer to the nodename. Other tests
were using the string 'fake-node' to refer to the nodename. This fixes
those all up to be consistent and refer to two constants.

Change-Id: I4158f5661cf083e224171ff47103f77a79a94125
2016-05-24 17:04:27 -04:00
Jay Pipes e05944d783 Remove useless test of incorrect stats value
There was a test class in test_resource_tracker.py that was testing
whether if a virt driver returned a non-dict value of the 'stats' key of
the returned dict from the virt driver get_available_resource() call
that calling update_available_resource() would raise a ValueError. Well,
duh, of course it would. But why do we need to *assert* that this
behaviour occurs? It's just bloated unit tests for no reason.

Change-Id: Ie18dd38d0398af96ff805dcd3fcd18f8bc3c65f8
2016-05-24 17:04:27 -04:00
Jay Pipes cad010b956 Remove RT duplicate unit test for PCI stats
The PciStatsTestCase in test_resource_tracker.py was not testing
anything that test_tracker.InstanceClaimTestCase.test_claim_with_pci()
was not already testing, so we remove it.

Change-Id: I627090ecb349e8b09a47782e8f6f74c85d461214
2016-05-24 17:04:27 -04:00
Jay Pipes 5d9ced6b13 Remove more duplicate RT unit tests
TrackerTestCase in test_resource_tracker.py had three unit tests that
stressed code paths and had assertions that were identical to the code
paths and assertions in test_tracker.TestInitComputeNode. So, we get rid
of the heavyweight TrackerTestCase from test_resource_tracker.

Change-Id: Ib7d6d5901dbfdf32377ec4ed14b88a4905b619a7
2016-05-24 17:04:27 -04:00
Jay Pipes 1f84ab0ea9 Removes test_claim_saves_numa_topology()
Removes a duplicate test from test_resource_tracker.py that was entirely
covered by test_tracker.TestInstanceClaim.test_claim_numa() but using
the lightweight NoDBTestCase base test class.

Change-Id: I76cff9e498f9f9b863bc9256cf73a1d8453f62b5
2016-05-24 17:04:27 -04:00
Jenkins 5f485eb81d Merge "Remove duplicate test of set inst host/node" 2016-05-24 21:01:17 +00:00
Jenkins 410f8af2a1 Merge "Remove SchedulerClientTrackerTestCase" 2016-05-24 21:00:27 +00:00
Jenkins 91cd15e643 Merge "Move unit tests of set_instance_host_and_name()" 2016-05-24 20:59:25 +00:00
Jenkins d3f138d10e Merge "Remove MissingComputeNodeTestCase for res tracker" 2016-05-24 20:58:27 +00:00
Jenkins 0a5d155f70 Merge "Remove tests for missing get_available_resource()" 2016-05-24 20:57:26 +00:00
Jenkins f48c58915d Merge "Let setup.py compile_catalog process all language files" 2016-05-24 20:56:24 +00:00
Jenkins 49e22daa47 Merge "Hyper-V: Fixes disk overhead claim issue" 2016-05-24 20:55:22 +00:00
Jenkins 6c4d09eb84 Merge "Compute: Adds driver disk_gb instance overhead estimation" 2016-05-24 20:40:31 +00:00
Jenkins 24da08d4d7 Merge "Add http_proxy_to_wsgi to api-paste" 2016-05-24 20:04:31 +00:00
Jenkins 14d6a424ff Merge "remove db2 support from tree" 2016-05-23 21:43:47 +00:00
Jenkins 33652a1724 Merge "verify api-ref os-server-password.inc" 2016-05-23 21:14:09 +00:00
Jenkins 9ba80cc5d2 Merge "Updated from global requirements" 2016-05-23 17:37:25 +00:00
Jenkins ea692a5656 Merge "xenapi: Image cache cannot be disabled" 2016-05-23 16:52:29 +00:00
Jenkins 87dc738763 Merge "Make flavor-manage api call destroy with Flavor object" 2016-05-23 16:50:31 +00:00
Jenkins b1a172ee46 Merge "api-ref: limits.inc validate parameters" 2016-05-23 15:52:07 +00:00
Jenkins 8bd3d5c16a Merge "Keep BuildRequest db entry around longer" 2016-05-23 15:46:00 +00:00
Jenkins 5b01be8fc2 Merge "Drop fields from BuildRequest object and model" 2016-05-23 15:45:13 +00:00
Jenkins 23c3d18a41 Merge "Pass OS_DEBUG to the tox test environment" 2016-05-23 15:44:29 +00:00
Jenkins 9af91deea7 Merge "Update link for hypervisor support matrix message" 2016-05-23 15:43:50 +00:00
Jenkins 07779e52b7 Merge "Fix resize to same host failed using anti-affinity group" 2016-05-23 15:38:51 +00:00
Jenkins 50d1e3ae25 Merge "Remove mox used in tests/unit/api/openstack/compute/test_server_start_stop" 2016-05-23 15:38:04 +00:00
Jenkins e44afa527a Merge "libvirt: add method to configure max downtime when migrating" 2016-05-23 15:36:58 +00:00
Jenkins d45b2e5cbc Merge "libvirt: add "abort_job" to Guest's object" 2016-05-23 15:26:45 +00:00
Jenkins 3a3747292d Merge "libvirt: add method "migrate" to Guest's object" 2016-05-23 15:26:00 +00:00
Jenkins 8fac8cf5c7 Merge "api-ref: Parameter verification for os-interface.inc" 2016-05-23 13:27:12 +00:00
Jenkins 7c3d810977 Merge "api-ref: parameter verification for os-server-groups" 2016-05-23 13:26:22 +00:00
Augustina Ragwitz 8e0d8b7f9f api-ref: limits.inc validate parameters
Part of blueprint api-ref-in-rst

Change-Id: I1b39ef719aa9dfcaec83b0d444baf41bb27ee813
2016-05-23 13:05:11 +00:00
OpenStack Proposal Bot da61fecb0a Updated from global requirements
Change-Id: I9528100fe099193edcd87bcbc7e91e1b630d0499
2016-05-23 12:02:46 +00:00
Sean Dague cdf74c57a6 remove db2 support from tree
This removes db2 support from tree completely. This is an oddball non
open database that made doing live data migrations difficult. It is
used by 0% of users in the OpenStack User Survey.

Supporting commercial software that doesn't have users at the cost of
delivering features and fixes to our community is the wrong
tradeoff. This corrects that.

It rewrites migrations, which we typically don't ever do, but it is
better if newton fresh environments fail early in db creation instead
of very deep in the data migration process.

Change-Id: Ifeb9929e4515e3483eb65d371126afd7672b92a4
2016-05-23 07:33:20 -04:00
Jenkins bb50389bb6 Merge "api-ref, os-fping.inc" 2016-05-23 08:20:10 +00:00
Jenkins 7c8fab0ecb Merge "libvirt: Add serial ports to the migration data object" 2016-05-23 07:07:25 +00:00
Juan Antonio Osorio Robles b609a3b32e Add http_proxy_to_wsgi to api-paste
This sets up the HTTPProxyToWSGI middleware in front of Nova-API. The
purpose of thise middleware is to set up the request URL correctly in
case there is a proxy (For instance, a loadbalancer such as HAProxy)
in front of Nova.

So, for instance, when TLS connections are being terminated in the
proxy, and one tries to get the versions from the / resource of
Nova, one will notice that the protocol is incorrect; It will show
'http' instead of 'https'. So this middleware handles such cases.
Thus helping Keystone discovery work correctly.

The HTTPProxyToWSGI is off by default and needs to be enabled via a
configuration value.

Change-Id: Ia78f73e96585ab33a379a0b0be6d9682f7fbd810
Closes-Bug: #1573766
2016-05-23 08:08:14 +03:00
Takashi NATSUME 0c183948f4 api-ref: Parameter verification for os-interface.inc
Change-Id: I5c72c685b6cb39151e9d0c6c563ef6919a79e249
Implements: blueprint api-ref-in-rst
2016-05-23 12:34:49 +09:00
Jenkins 2505c5d8b1 Merge "Hyper-V: Implement nova rescue" 2016-05-23 01:38:19 +00:00
Jenkins 2691afccd8 Merge "Resize API operation passing down original RequestSpec" 2016-05-22 20:13:19 +00:00
Jay Pipes dc5ed965d8 Remove duplicate test of set inst host/node
Removes test_claim_sets_instance_host_and_node() from
test_resource_tracker.py after adding a few assertions to an existing
unit test in test_tracker.py that validate the exact same code path
without a heavyweight TestCase-derived test class.

Change-Id: I25cbc33d1216d0b6a909ce184f486a75d8f25bd8
2016-05-22 15:36:27 -04:00
Jay Pipes 68b171b896 Remove SchedulerClientTrackerTestCase
This unit test in test_resource_tracker.py was ostensibly testing to
ensure that if resources didn't change on the compute node, that the
scheduler client's update_resource_stats() method was not called (and
conversely, if the resources *did* change, that the
update_resource_stats() scheduler client call *was* called.

This was a good unit test. The problem was that this unit test already
existed entirely in the test_tracker.py test file in the
TestUpdateComputeNode test class. The test_tracker.py test classes don't
suffer from deriving from a test class base that spawns a conductor
process and init's a database (in other words, isn't a unit test). And
so goodbye duplicate SchedulerClientTrackerTestCase.

Change-Id: I4905883dc4372fff413f009ec9110985998542bd
2016-05-22 15:36:21 -04:00
Jay Pipes e9e5597168 Move unit tests of set_instance_host_and_name()
The unit tests that tested the (very simple)
_set_instance_host_and_node() and _unset_instance_host_and_node() were
not unit tests -- they were subclassing from TestCase, not NoDBTestCase
and the setUp() of that class was doing all sorts of "real" stuff,
including starting a conductor process, init'ing a database, etc. This
patch moves those unit tests into test_tracker.py and has them
inheriting from NoDBTestCase.

Change-Id: I1f4f60bd2b3b607b1c9ac92360f38c7b5ce48df1
2016-05-22 15:36:13 -04:00