Removing support for SMS on client

This patch removes the option of passing 'SMS' as notification type.

Change-Id: Iee0f9d21e593b2525e03b1224262e3f64bb1c187
This commit is contained in:
henriquetruta 2014-11-10 16:10:04 -03:00
parent 6a83c8d8a2
commit 2db5c4ee72
2 changed files with 15 additions and 5 deletions

View File

@ -216,6 +216,16 @@ class ShellTestMonascaCommands(ShellBase):
retvalue = self.shell(argstr)
self.assertRegexpMatches(retvalue, "^Invalid type")
def test_notifications_create_type_sms(self):
self._script_keystone_client()
argstrings = [
'notification-create sms1 SMS myphonenumber',
]
self.m.ReplayAll()
for argstr in argstrings:
retvalue = self.shell(argstr)
self.assertRegexpMatches(retvalue, "^Invalid type")
def test_good_notifications_create_subcommand(self):
self._script_keystone_client()

View File

@ -28,7 +28,7 @@ state_types = ['UNDETERMINED', 'ALARM', 'OK']
enabled_types = ['True', 'true', 'False', 'false']
# Notification valid types
notification_types = ['EMAIL', 'SMS']
notification_types = ['EMAIL']
@utils.arg('name', metavar='<METRIC_NAME>',
@ -357,9 +357,9 @@ def do_metric_statistics(mc, args):
@utils.arg('name', metavar='<NOTIFICATION_NAME>',
help='Name of the notification to create.')
@utils.arg('type', metavar='<TYPE>',
help='The notification type. Type is one of [EMAIL, SMS].')
help='The notification type. Type must be EMAIL.')
@utils.arg('address', metavar='<ADDRESS>',
help='Depending on the type, a valid EMAIL or SMS Address')
help='A valid EMAIL Address')
def do_notification_create(mc, args):
'''Create notification.'''
if args.type.upper() not in notification_types:
@ -460,9 +460,9 @@ def do_notification_delete(mc, args):
@utils.arg('name', metavar='<NOTIFICATION_NAME>',
help='Name of the notification.')
@utils.arg('type', metavar='<TYPE>',
help='The notification type. Type is one of [EMAIL, SMS].')
help='The notification type. Type must be EMAIL.')
@utils.arg('address', metavar='<ADDRESS>',
help='Depending on the type, a valid EMAIL or SMS Address')
help='A valid EMAIL Address')
def do_notification_update(mc, args):
'''Update notification.'''
fields = {}