Merge "Removing support for SMS on client"

This commit is contained in:
Jenkins 2014-11-12 02:36:31 +00:00 committed by Gerrit Code Review
commit d13c1f4415
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 = {}