185 Commits

Author SHA1 Message Date
Alessandro Pilotti
e638a8f2ec Adds RDP console support
Implements: blueprint hyper-v-rdp-console

Nova currently supports VNC and SPICE remote console protocols. This
commit adds support for the RDP protocol in a similar way.

Change-Id: I2c219d4a200122c6d6cfcbd8e074dca0f6fea598
2014-02-07 21:20:08 +02:00
Roman Podoliaka
c557472496 Add preserve_ephemeral option to rebuild
The preserve_ephemeral option for rebuild will preserve the content of
the ephemeral partition, making stateful golden image based
deployments possible even when clouds haven't deployed Cinder, or the
hypervisor doesn't support Cinder (e.g. BareMetal / Ironic).

Partial-Bug: #1174154
blueprint: baremetal-preserve-ephemeral
Co-Authored-By: Robert Collins <rbtcollins@hp.com>

Change-Id: Id33d5d4107f89814842a3f0b7f33690dd7e3aadc
2014-01-16 16:24:05 +02:00
Chris Yeoh
0bfcfcdeec Remove V2 API version of coverage extensions
As discussed at the summit in the QA stream, this removes
the coverage extension from the V2 API.

According to the API Change Guidelines
https://wiki.openstack.org/wiki/APIChangeGuidelines
we should not be doing this. However the coverage
extension is a rather special case. It has security issues
such that it shouldn't be used in a production cloud
environment. It also doesn't work properly so its usefulness
to measure API coverage is limited. And in the past the presence of
this plugin has been used as a reason not to accept
an alternative technique to measure API coverage.

This is the proposed replacement

https://review.openstack.org/#/c/25882/

Change-Id: I07d798129ee277a6f7691c25f88c07a5204c0943
2013-11-18 22:35:39 +10:30
Melanie Witt
e5a5a0f310 Expose additional status in baremetal API extension
Add fields: uuid, task_state, updated_at, and pxe_config_path
to aid system admins in troubleshooting issues.

Fixes bug 1184449

Change-Id: Ia4c03cb228b3efe602455bf05883ddf03b7f18da
2013-10-22 03:58:43 +00:00
Sumanth Nagadavalli
6ba248635b Create flavor-access for the tenant when creating
a private flavor

In FlavorManage extension, a change has been made to
create flavor-access for a corresponding tenant on
creating a private flavor

This also requires the api-samples for flavor-access
to be changed, since there will be a flavor-access created
by default on creating a private flavor

This commit has a DocImpact

Change-Id: I7795fbd04ae9fc8b1ea6fb27203dfa5217d310ce
Fixes: bug 1209101
2013-10-08 12:23:24 +05:30
Jenkins
43278552e4 Merge "Add os-assisted-volume-snapshots extension" 2013-09-04 00:35:21 +00:00
Russell Bryant
fa13644b05 Add os-assisted-volume-snapshots extension
Add a new API extension that exposes assisted volume snapshot
capabilities.  This extension is admin only by default.  We expect it to
only be called by Cinder.  If you have your deployment set up in such a
way that your adminURL is different from the public, this extension can
only be loaded in the admin API instance.  Cinder will pull that URL out
of the service catalog to use.

Part of blueprint qemu-assisted-snapshots

Change-Id: I79e22ab6ef66fa16dc534a4336e766065702b2f5
2013-09-03 13:18:25 -04:00
Chris Yeoh
a1baa247a4 Adds API version discovery support for V3
Adds version information for the V3 API which is only displayed
when the V3 API is enabled. Even if the the V3 API is enabled the
V3 API status is "EXPERIMENTAL" and the V2 one "CURRENT". This was
done so autodiscovery tools would not yet use the V3 version by
default.

Ports the relevant parts of the version extension and associated
tests to the V3 API to display V3 version information for /v3 GET
requests.

DocImpact

Partially implements blueprint nova-v3-api

Change-Id: Idd335ce0df63d91e94a4a757f1fbae94b576c37e
2013-08-28 14:49:05 +09:30
Mark McLoughlin
d6cc2fa575 Fix spice/vnc console api samples tests
Start the consoleauth service, otherwise authorize_console() will fail
if we start timing out call()s in the fake RPC driver when there are no
consumers for a topic.

blueprint: oslo-messaging
Change-Id: Ieee37a0370c0b548c589a0573e6e8a68e10a6fdc
2013-08-23 14:42:38 +01:00
Joe Gordon
f364e8ebe3 libvirt: sync get_available_resources and get_host_stats
get_available_resources is actually used by the scheduler while
get_host_stats was previously used, and is still used for host
capabilities.  This patch makes get_available_resources and
get_host_stats use the same logic to clean up the code. As part of
making them use the same logic, some of the unused data returned from
get_host_stats is changed to be what get_available_resources expects.
This is also in preparation for removing the periodic RPC fanout from
compute nodes to the scheduler.

This patch cleans up libvirt and fake drivers only.  This is not needed
for other virt backends as this is a cleanup only.  Further cleanup of
libvirt and other drivers will happen after get_host_stats isn't used
for the compute fanout to schedulers.

Because this makes a change to the fake driver, several api samples
needed to be changed as well. The fake driver is changed so the
test_virt_driver tests can continue to be used

Part of bp no-compute-fanout-to-scheduler

Change-Id: I1eec5c117a1cb0490e9f9c09e731909bc31698a9
2013-08-13 14:24:23 -07:00
Dan Smith
68288b9cd2 Fix instance actions testing
Somehow, the instance actions API was different in three places:

1. The actual API from a running system
2. The regular unit tests
3. The api_samples tests

This fixes the fake_instance_actions module to look like the database
model (which was the root of the problem) as well as the api_samples
and regular unit tests to properly confirm the actual behavior I
validated manually against a running system. This looks like it
changes the external API, but in fact, it makes things match what
the external API actually is.

Change-Id: I0c8ddff3e0819a65667617083dfaa74f7317cc05
2013-08-07 08:11:08 -07:00
Nikola Dipanov
8c3475706d Servers API for the new BDM format
This patch makes the nova API aware and able to accept the new block
device mapping format introduced in
If30afdb59d4c4268b97d3d10270df2cc729a0c4c when booting an instance.

It does so by introducing a new extension into the v2 API. There is no
v3 extension as part of this patch because volume extension is going
away in v3 and thus this functionality can be part of the core servers
extension. This will be done in a subsequent patch.

The compute API create method will still convert these back to the
legacy format for the time being until the compute API will know how to
take advantage of the new format.

As this change adds the new API extension, marking it as DocImpact so
that the changes and the API data format can be documented.

blueprint: improve-block-device-handling
Change-Id: I2c1b63e41deca26f727fb9ed912a55494db9c76c
2013-07-26 12:33:01 +02:00
Jenkins
f9b154fc97 Merge "Per-project-user-quotas for more granularity" 2013-07-26 03:54:52 +00:00
Vishvananda Ishaya
8f51b120b4 Add support for volume swap
Adds support for transparently swapping an attached volume with
another volume. Note that this overwrites all data on the new
volume with data from the old volume.

Implements blueprint volume-swap

Change-Id: Iaace71f46acd33cf1531d953d569c0b6d0bbe680
2013-07-24 15:09:39 -07:00
liyingjun
77b4012a02 Per-project-user-quotas for more granularity
Implements blueprint per-user-quotas.

Fixes bug 968175

Based on the original quotas structure.

NOTE:
quota_instances, quota_cores, quota_ram, quota_key_pairs and
quota_security_groups are supported per user.

Add CRUD methods for project user quotas API. DocImpact
 - Shows quotas for a user.
   GET v2/{tenant_id}/os-quota-sets/{tenant_id}?user_id={user_id}
 - Updates quotas for a user.
   POST v2/{tenant_id}/os-quota-sets/{tenant_id}?user_id={user_id}

Add commands for project user quotas management.
 - Show user quotas:
   nova-manage project quota --project <Project name> --user <User name>
 - Update/Create user quotas:
   nova-manage project quota --project <Project name> --user <User name>
   --key <key> --value <value>

Change-Id: I24af1f6bc439d5d740303c6fe176a9bffe754579
2013-07-24 12:23:32 +08:00
Andrew Laski
e53fb7dcdd API for shelving
Adds new 'shelve', 'shelveOffload'/'shelve_offload'(V3), and 'unshelve'
actions to the API.  Exposes the functionality already provided in the
compute api.

Part of bp shelve-instance

Co-author: Dan Smith <danms@us.ibm.com> (Instance objects)
Change-Id: Idd485b591730c6ac025ee57a1242afdd02191b2f
2013-07-16 20:17:49 -04:00
Oleg Bondarev
e354a56933 Add "ExtendedVolumes" API extension
- adds an API extension to include list of attached volumes with instance info
- adds v3 api porting as well

DocImpact

Implements blueprint servers-add-volume-list
Change-Id: If58dc40b093c2f61c6ae6b82fcd8f0bf53be464a
2013-07-10 11:09:21 +04:00
Mahesh Panchaksharaiah
405ebb9028 List migrations through Admin API
The os-migrations extension exposes endpoint to fetch all migrations.
The migrations can filtered by host and status. If cells are
enabled migrations can be listed for all cells or can be filtered for a
particular cell.

The route for fetching migrations for
a region is - v2/{tenant_id}/os-migrations. Filters can be passed as
query parameters -
v2/{tenant_id}/os-migrations?host=host1&status=finished&cell_name=Child

DocImpact

Change-Id: Id70dbece344a722b2dc8c593dd340ef747eb43d3
Implements: blueprint list-resizes-through-admin-api
2013-07-09 11:25:35 +05:30
Joe Gordon
827c2d30b8 Sane rest API rate limit defaults
The previous rate limit defaults were unusable in any deployment.
Rate limiting to 10 POSTS per minute and 50 servers per day seems
to low, especially when we can use quotas to actually limit the amount
of resources a user can consume.

Update docstring to explain what the rate limiting is used for.

Fixes bug 1178529

DocImpact changed default values

Change-Id: I8cc93423f76d9b0a5135adf69babc4ff355a0951
2013-06-27 16:00:58 -07:00
Jenkins
7b18e1433f Merge "Enhance the validation of the quotas update" 2013-06-14 17:25:41 +00:00
gengjh
d5bbfad3d0 Enhance the validation of the quotas update
Need check whether the already used and reserved exceeds the new quota
before update it.

DocImpact
Implements a validation to validate whether already used and reserved
quota exceeds the new quota when run 'nova quota-update', it will throw
error if the quota exceeds. This check will be ignored if admin want to
force update when run 'nova quota-update' with additional option
'--force'.
This validation help admin to be aware of whether the quotas are
oversold when they try to update quota and also provide an option
'--force' to allow admin force update the quotas.

Fix bug 1160749

Change-Id: Iba3cee0f0d92cf2e6d64bc83830b0091992d1ee9
2013-06-13 15:36:08 +08:00
Jenkins
99f00ff09b Merge "add xml api sample tests to os-tenant-network" 2013-06-12 19:19:05 +00:00
Andrea Rosa
c741e862fd Give a way to save why a service has been disabled.
Implements blueprint record-reason-for-disabling-service

We added a field to the service table to log a reason when a service has
been disabled.
We added a new API extension called os-extended-services. The new extension
will extend the os-services extension adding:
- A method for disabling a service and specify a reason for that.

PUT /v2/{tenant_id}/os-services/disable-log-reason

When the os-extended-extension is loaded the call:

GET /V2/{tenant_id}/os-services
will return the list of services with reason information it that exists.

DocImpact
Change-Id: I87a4affc45160796ff11c7b03e591e6aba73d62a
2013-06-12 11:27:25 +10:00
Jenkins
00d0e2c187 Merge "Return Customer's Quota Usage through Admin API" 2013-06-11 20:39:00 +00:00
Kaushik Chandrashekar
b27a6cb399 API to get the Cell Capacity
The total RAM and the available RAM are stored in memory of CellStateManager.
This API gets the available slots per flavor for a given cell.

Implements: blueprint get-cell-free-ram
Change-Id: I2a6dbb8835cad04f3ee058c3012490782d7c8e67
2013-06-05 12:52:55 -05:00
Andrew Melton
f5d790df0a Launch_at and terminated_at on server(s) response
Implements bp usage-details-on-instance

Change-Id: I0a9101c43a51d597a1eaff9d5a5d08d602024e72
2013-05-31 15:50:40 -04:00
ivan-zhu
8534a03570 add xml api sample tests to os-tenant-network
Change-Id: Ib79defe49c82a175cb8605aa3a65ccd2c48d68f7
2013-05-24 13:40:41 +08:00
Aarti Kriplani
cdd998c418 Delete a quota through admin api.
Added 'extended-quotas' extension that has provides ability for admins
to be able to delete a non-default quota (absolute limit) for a tenant,
so that tenant's quota will revert back to the configured default.

Implements blueprint admin-api-for-delete-quota
Change-Id: I7375420a466823b3e099aebff71a8f7d7f922afb
2013-05-23 16:25:29 +05:30
Mahesh K P
9f9c40d569 Return Customer's Quota Usage through Admin API
DocImpact: This patch adds an extension 'UsedLimitsForAdmin'. If this
extention is enabled then it extends the used limits API behavior, such
that admin can fetch the details of any customer's quota usage by passing
the customer's tenant id in query parameters.The API signature for the
same is 'v2/{tenant_id}/limits?tenant_id={customer_tenant_id}'

Change-Id: I89b8b5083e46b899458407426c89a3865e960faa
Implements: blueprint customer-quota-through-admin-api
2013-05-17 10:42:07 +05:30
Rick Harris
5613818b1d 'm1.tiny' now has root_gb=1
`root_gb=0` indicates that a disk-resize shouldn't occur which is not
something that a default flavor should have enabled. This is
especially true of one named 'tiny' since the unresized image could
potentially be very large, leading to the unexpected result of a
'tiny' instance consuming a massive amount of disk.

The no-resize behavior is still supported, so if it's being relied on
for testing, additional, non-default flavors can still be created that
enable it.

DocImpact
Fixes bug 1175383

Change-Id: Ifa5827c7f87dae95214bc4a585adce5735a05d83
2013-05-16 23:18:22 +00:00
Russell Bryant
56f5172f33 Revert "Include list of attached volumes with instance info"
This reverts commit dd66f235ecf2ff67819917ee07bcb0ea13a1b17b.

This changed the core servers API without doing it as an API extension,
so it's not an acceptable change as written.

Change-Id: I3787060583de1371e366647d38d69f37746317d5
2013-05-15 20:10:00 -04:00
Jenkins
3492d83140 Merge "Include list of attached volumes with instance info" 2013-05-15 18:41:27 +00:00
Jenkins
e8567aa98a Merge "Fix response from snapshot create stub" 2013-05-14 22:49:11 +00:00
Mark McLoughlin
28f0b01717 Fix response from snapshot create stub
A change from Oleg highlighted that the current snapshot create
stub is broken because it passes a full volume for the volume_id
paramter.

Fix the stub and the api_samples output, but also add unit test
checks which would have caught this.

Change-Id: Id006e3995c7696aa8f061a2b96123ea27e4b6d3f
Co-authored-by: Oleg Bondarev <obondarev@mirantis.com>
2013-05-14 09:09:36 +01:00
Jenkins
9629c8eb14 Merge "Allow a floating IP to be associated to a specific fixed IP" 2013-05-10 21:45:48 +00:00
Phil Day
1b2c121f13 Allow a floating IP to be associated to a specific fixed IP
The current floating IP API extension only accepts the instance ID
and the floating address to be assigned. Where the instance is
connected to more than one network the behaviour is to associated
the floating IP with the first fixed IP of the instances
(and to log a warning)

This change introduces a new extension which wehn loaded adds a
fixed IP address as an optional parameter, allowing the floating
IP to be associated with a specific fixed IP.

Without this extension, or without the optional parameters,
the API behaviour is unchanged.

If specified the fixed IP must be associated with the instance.

DocImpact

Implements blueprint multi-nic-floating-ip-assignment

Change-Id: I9241137ad794cdf7f452ed84e9445f0e11fdd44e
2013-05-10 01:29:27 +01:00
Kravchenko Pavel
6a98b56a18 Fixes typo in server-evacuate-req.xml
The element name should be evacuate instead of rescue
Fixes bug 1178280

Change-Id: I3eed81c01cb9948c978f405bb3b2748e1094d488
2013-05-09 17:21:00 +03:00
Oleg Bondarev
dd66f235ec Include list of attached volumes with instance info
Fixes bug 1112998

Change-Id: I1c3eb578339aabbcfed107043f39e30daf633c4a
2013-05-08 10:18:10 +04:00
Émilien Macchi
0db9ba5ce3 Wrong proxy port in nova.conf for Spice proxy
If we look at nova/cmd/spicehtml5proxy.py, we use 6082 port for Spice proxy.

In nova.conf, the default port for html5proxy_base_url is 6080 which fails console
service.

Fix bug #1172957

Change-Id: I52ca37f76e7a6abd085b079ae42e7914cb619ad5
2013-04-26 01:20:05 +02:00
Zhi Yan Liu
262b285a04 Add an extension to show the mac address of a ip in server(s)
This extension adds the OS-EXT-IPS-MAC:mac_addr param
so that users can associate the mac address to the ip of the server in
one API call.

Implement bp: os-ext-ips-mac-api-extension
DocImpact

Change-Id: I01d0b3aa804b5218853a4bb568c85e31b87d04e4
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2013-04-12 13:37:03 +08:00
Arata Notsu
64a0bcae5a baremetal: Change node api related to prov_mac_address
Now prov_mac_address is going to be dropped from bm_nodes table. This patch
adjust api to the change.

A user is expected to create a node without specifying prov_mac_address, then add
an interface having the address to the node. However, for compatibility, a user
still can specify prov_mac_address when create a node. In this case, an interface
having prov_mac_address is automatically added to the node.

In response body of create, index and show, "prov_mac_address" field no longer
exists since they are showed as a member of "interfaces" fileld.

DocImpact

Change-Id: I6653829364b0a641442d45e766493180d6f2a880
2013-04-11 16:31:11 +09:00
Jenkins
05f5106c19 Merge "Add reset function to nova coverage." 2013-04-09 05:39:46 +00:00
Zhi Yan Liu
50e30a6b13 Add an extension to show the network id of a virtual interface
This extension adds the OS-EXT-VIF-NET:net_id param
so that users can determine vif plunged into which network now.

DocImpact

Change-Id: I56bef5c45f7f545aa5e9b13760dff1c802da0f8f
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2013-04-08 16:35:26 +08:00
Mitsuhiko Yamazaki
0611f19406 Add reset function to nova coverage.
Now nova coverage is standardized to accumulate coverage data.
It enables user to get combined coverage data of several tests.
In addition to it, we need to restart nova services when measuring
coverage of each test because there is no function to reset data.
This adds reset coverage data API.

Fixes bug: 1164331

Change-Id: Idd16cf3849b6510e7c620ed3bf16d507ed44c328
2013-04-08 11:41:01 +09:00
Giampaolo Lauria
42749024b6 Add SecurityGroups API sample tests
Add sample tests for adding and removing security groups
Fixes bug 1157222

Change-Id: Ib8450fcd6334b720a2199d52e07ae00f78aa6df0
2013-04-04 23:05:12 -04:00
Arata Notsu
415b51bf71 baremetal: Drop unused columns in bm_nodes
Drop these two columns:
* bm_nodes.prov_vlan_id
* bm_nodes.registration_status

And update related code, tests and api_samples.

Change-Id: Iadefc83a00ad9ae5a3bb39f357080299875bdf09
2013-04-02 11:08:41 +09:00
Michael Still
78c7edc52e Set default fixed_ip quota to unlimited.
DocImpact: our previous default quota of ten was poorly thought through
and resulted in upgrade problems. Instead, let's have operators opt into
fixed IP quotas. This change should be mentioned in release notes please.

Resolves bug 1161190.

Change-Id: I2f066a0129461899fe330a628cf49ee5273eaba4
2013-03-29 14:23:13 +11:00
Andrea Rosa
48b41e0b88 Fix typo in the XML serialization os-services API.
Partially implements blueprint nova-api-samples
fixes bug 1130609

The XML serializer for the update method in the os-services API extensions was
not serializing the "updated_at" field because of a typo in the code.
In this change we added api_samples for the XML output.

Change-Id: I9fff0677e9bad650b19e559b3ed6e9bc0ffe8c3c
2013-03-28 10:38:36 +00:00
Fei Long Wang
c5097ab668 Fixes Nova API /os-hosts missing element "zone"
Now the HostIndexTemplate of Nova /os-hosts API is missing element "zone",
which will cause the XML output of list hosts missing the zone attribute.

Fixes bug: 1159055

Change-Id: I9940efcfd364c35b00cde4398d531d7ff56dc2b9
2013-03-24 18:15:05 +08:00
Jenkins
11f6587250 Merge "Make os-services API extensions consistent." 2013-03-15 20:14:14 +00:00