This check indicates on comments in which multi line docstring should
start without a leading new line. This change fixed all violators of
said check.
Change-Id: Ic7357b8c7420767dba611f6fcee07b7700f3aea8
Current master does not respect ratelimiting, since parsing of the
api-paste.ini is faulty. api-paste.ini limited user limiting by
setting a line as follows:
user:<user-id>:(GET, *, ".*", 4, minute)
This was passed to the Limiter as kwargs with "user" as a key.
Thus multiple user limiting is not possible as well as extracting
the id of the user was bound to fail, since we checked on the key
with startswith("user:")
An example config in the api-paste.ini has to look as follows:
limits = (POST, "*", .*, 10, MINUTE)
limits.<user-id1>:(GET, "*", .*, 4, minute)
limits.<user-id2>:(GET, "*", .*, 2, minute)
The code has been modified to be able to handle such configs
Fixes bug: 1210869
Change-Id: Iaec669b282a567d42fbe21a6f64e7bc99161053b
Currently nova will return 413 instead of 429 on API rate limiting.
Fix it so that the V3 API will not be influenced.
fixes bug 1187676
Change-Id: I25e3f6766597c2475b4fc3203a43b159f0e99739
Previous _ was monkey patched into builtins whenever
certain modules were imported. This removes that and
simply imports it when it is needed.
Change-Id: I0af2c6d8a230e94440d655d13cab9107ac20d13c
Since rate limiting is is done in memory, it is per process. Document
this to warn users.
DocImpact
Change-Id: I580a4081550019914f074c8b1abdf435f3f24ca1
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
During v3 api review there was an agreement that would be nice to move limits
constants to utils file and refactor its usage inside limits api to avoid
unnecessary code duplication.
Also changed TestLimiter class to MockLimiter since that name can be confuse to
some unit test frameworks.
Change-Id: I1b8626e8d1e3257333d4dfee61591fd4cde82bd1
- Added create, delete, detail, show, and update
stubs to the Limits API
- Added unit test cases
Fixes bug 869877
Change-Id: I112a8016ff2cf83009b3bcfe2fe6307568ce7334
It may be interesting for a cloud user or administrator to perform a
simple instance monitoring. A ping could be an acceptable solution: it
is fast and quite reliable. A limit for ping is 1 time a minute by
default.
API calls.
GET /os-fping?[all_tenants=1]&[include=uuid[,uuid...][&exclude=...]
Performs fping for all VM in the current project and returns results. If
`all_tenants` is requested, data for all projects is returned.
By default, `all_tenants` is allowed only for admins.
`include` and `exclude` are parameters specifying VM masks. Consider
that VM list is `VM_all`, then if `include` is set, the result will be
`VM_all * VM_include`. if `include` is set, the result will be `VM_all -
VM_exclude`. `exclude` is ignored if `include` is specified.
GET /os-fping/<vm-uuid>
Performs a check for single instance.
Configuration flags.
fping_path - full path to fping
Implement blueprint fping-instances-ext
Change-Id: I7d942270aa52bd6216eda0d7ae366ef0195d52a8
See bug 1034384, bug 1037590.
This reverts commit https://github.com/openstack/nova/commit/391f345d,
but leaves the DB migration in place while adding a further
migration to reverse it.
The motivation for reversion is that the per-user quota logic would
totally undermine the per-project quotas set for a pre-existing
openstack install.
The per-user quota logic could be re-introduced in a fixed state
after Folsom-3.
Change-Id: Idd4b55a2404a25f43f6737b661f828c28501066f
Implements blueprint per-user-quotas.
Based on the original quotas structure.
NOTE:
quota_instances, quota_cores, quota_ram, quota_volumes,
quota_gigabytes, quota_key_pairs and quota_security_groups
are supported per user.
Allow 'projectadmin' role to access the user quota setting
methods.
Add commands 'nova-manage quota project/user' for quotas
management.
Change-Id: I07a39499432571fedd819c53ae414240cefc3354
Finishes quota refactoring by making use of the new quota infrastructure.
Partially implements blueprint quota-refactor (the final piece is to
remove the old quota architecture).
This change is fairly substantial. To make it easier to review, it has been
broken up into 3 parts. This is the second part.
Change-Id: I1c8b43198f0d44e9e13a45575361aa043fd0639e
Use import_class(), import_object(), and import_module() from
openstack-common's importutils module. The equivalent functions have
been removed from nova.utils. A few modules had import order cleaned up
in passing, as well.
My initial motivation for this was to remove some more usage of nova
bits from nova.rpc as another step towards being able to move nova.rpc
import openstack-common. Since I was pulling importutils into nova, I
went ahead and converted the whole thing.
Change-Id: I7c7786cf0001bcd06db52b9a99ff4284a3f6c6fa
blueprint sphinx-doc-cleanup
bug 945160
- Correct parameter declarations, list formatting, cross-references, etc.
- We don't need "let" in generate_autodoc_index.sh since we aren't doing math.
- Change conf.py to not prefix class and function names with full namespace
in generated output to save width on the screen.
Change-Id: I9adc8681951913fd291d03e7142146e9d46841df
Fix a number of places where formatted strings were used with _() (causing
gettext to not match the string) or variables with _() (causing xgettext
to not extract a string)
Also, there's no value in internationalizing an empty string
Change-Id: Iac7dbe46eeaa8ddf03c2a357ecd52f69aa8678aa
* Moves openstack/v2 directory to compute and fixes tests accordingly
* Moves some code from api/openstack/compute to shared location, for use by volume api
* Implements basic volume functionality for types, volumes, and snapshots
* Changes service name from osapi to osapi_compute (and adds osapi_volume)
* Renames nova-api-os to nova-api-os-compute, adds nove-api-os-volume
* Separate extension mechanism for compute and volume
** Removes flag osapi_extension and replaces with osapi_compute_extension and osapi_volume_extension
* Updates the paste config
* Fixes setup.py to include nova-os-api-compute and nova-os-api-volume
* Fix bug in volume version code that occurred as result of trunk merge
* Update integrated/test_volumes.py to use new endpoint
Change-Id: I4c2e57c3cafd4e1a9e2ff3ce201c8cf28326afcd