Replace 'a alarm' by 'an alarm'
This is the right article to use. It also matters because the generated documentation in api-site currently has to be manually fixed. Change-Id: I4a31e268b5fef47e4a6530ca5e1e4159d10c8c48
This commit is contained in:
parent
693204a37e
commit
e0eac03460
@ -1434,7 +1434,7 @@ class AlarmController(rest.RestController):
|
|||||||
def put(self, data):
|
def put(self, data):
|
||||||
"""Modify this alarm.
|
"""Modify this alarm.
|
||||||
|
|
||||||
:param data: a alarm within the request body.
|
:param data: an alarm within the request body.
|
||||||
"""
|
"""
|
||||||
# Ensure alarm exists
|
# Ensure alarm exists
|
||||||
alarm_in = self._alarm()
|
alarm_in = self._alarm()
|
||||||
@ -1508,7 +1508,7 @@ class AlarmController(rest.RestController):
|
|||||||
def put_state(self, state):
|
def put_state(self, state):
|
||||||
"""Set the state of this alarm.
|
"""Set the state of this alarm.
|
||||||
|
|
||||||
:param state: a alarm state within the request body.
|
:param state: an alarm state within the request body.
|
||||||
"""
|
"""
|
||||||
# note(sileht): body are not validated by wsme
|
# note(sileht): body are not validated by wsme
|
||||||
# Workaround for https://bugs.launchpad.net/wsme/+bug/1227229
|
# Workaround for https://bugs.launchpad.net/wsme/+bug/1227229
|
||||||
@ -1572,7 +1572,7 @@ class AlarmsController(rest.RestController):
|
|||||||
def post(self, data):
|
def post(self, data):
|
||||||
"""Create a new alarm.
|
"""Create a new alarm.
|
||||||
|
|
||||||
:param data: a alarm within the request body.
|
:param data: an alarm within the request body.
|
||||||
"""
|
"""
|
||||||
conn = pecan.request.storage_conn
|
conn = pecan.request.storage_conn
|
||||||
now = timeutils.utcnow()
|
now = timeutils.utcnow()
|
||||||
|
@ -176,4 +176,4 @@ class Connection(base.Connection):
|
|||||||
return alarm
|
return alarm
|
||||||
|
|
||||||
def delete_alarm(self, alarm_id):
|
def delete_alarm(self, alarm_id):
|
||||||
"""Delete a alarm."""
|
"""Delete an alarm."""
|
||||||
|
@ -922,7 +922,7 @@ class Connection(base.Connection):
|
|||||||
create_alarm = update_alarm
|
create_alarm = update_alarm
|
||||||
|
|
||||||
def delete_alarm(self, alarm_id):
|
def delete_alarm(self, alarm_id):
|
||||||
"""Delete a alarm
|
"""Delete an alarm
|
||||||
"""
|
"""
|
||||||
self.db.alarm.remove({'alarm_id': alarm_id})
|
self.db.alarm.remove({'alarm_id': alarm_id})
|
||||||
|
|
||||||
|
@ -720,7 +720,7 @@ class Connection(base.Connection):
|
|||||||
return self._row_to_alarm_model(alarm_row)
|
return self._row_to_alarm_model(alarm_row)
|
||||||
|
|
||||||
def delete_alarm(self, alarm_id):
|
def delete_alarm(self, alarm_id):
|
||||||
"""Delete a alarm
|
"""Delete an alarm
|
||||||
|
|
||||||
:param alarm_id: ID of the alarm to delete
|
:param alarm_id: ID of the alarm to delete
|
||||||
"""
|
"""
|
||||||
|
@ -689,7 +689,7 @@ class TestAlarms(FunctionalTest,
|
|||||||
|
|
||||||
def test_post_combination_alarm_as_user_with_unauthorized_alarm(self):
|
def test_post_combination_alarm_as_user_with_unauthorized_alarm(self):
|
||||||
"""Test that post a combination alarm as normal user/project
|
"""Test that post a combination alarm as normal user/project
|
||||||
with a alarm_id unauthorized for this project/user
|
with an alarm_id unauthorized for this project/user
|
||||||
"""
|
"""
|
||||||
json = {
|
json = {
|
||||||
'enabled': False,
|
'enabled': False,
|
||||||
@ -716,7 +716,7 @@ class TestAlarms(FunctionalTest,
|
|||||||
|
|
||||||
def test_post_combination_alarm_as_admin_on_behalf_of_an_other_user(self):
|
def test_post_combination_alarm_as_admin_on_behalf_of_an_other_user(self):
|
||||||
"""Test that post a combination alarm as admin on behalf of an other
|
"""Test that post a combination alarm as admin on behalf of an other
|
||||||
user/project with a alarm_id unauthorized for this project/user
|
user/project with an alarm_id unauthorized for this project/user
|
||||||
"""
|
"""
|
||||||
json = {
|
json = {
|
||||||
'enabled': False,
|
'enabled': False,
|
||||||
@ -753,7 +753,7 @@ class TestAlarms(FunctionalTest,
|
|||||||
|
|
||||||
def _do_post_combination_alarm_as_admin_success(self, owner_is_set):
|
def _do_post_combination_alarm_as_admin_success(self, owner_is_set):
|
||||||
"""Test that post a combination alarm as admin on behalf of nobody
|
"""Test that post a combination alarm as admin on behalf of nobody
|
||||||
with a alarm_id of someone else, with owner set or not
|
with an alarm_id of someone else, with owner set or not
|
||||||
"""
|
"""
|
||||||
json = {
|
json = {
|
||||||
'enabled': False,
|
'enabled': False,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user