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:
parent
6a83c8d8a2
commit
2db5c4ee72
|
@ -216,6 +216,16 @@ class ShellTestMonascaCommands(ShellBase):
|
||||||
retvalue = self.shell(argstr)
|
retvalue = self.shell(argstr)
|
||||||
self.assertRegexpMatches(retvalue, "^Invalid type")
|
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):
|
def test_good_notifications_create_subcommand(self):
|
||||||
self._script_keystone_client()
|
self._script_keystone_client()
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ state_types = ['UNDETERMINED', 'ALARM', 'OK']
|
||||||
enabled_types = ['True', 'true', 'False', 'false']
|
enabled_types = ['True', 'true', 'False', 'false']
|
||||||
|
|
||||||
# Notification valid types
|
# Notification valid types
|
||||||
notification_types = ['EMAIL', 'SMS']
|
notification_types = ['EMAIL']
|
||||||
|
|
||||||
|
|
||||||
@utils.arg('name', metavar='<METRIC_NAME>',
|
@utils.arg('name', metavar='<METRIC_NAME>',
|
||||||
|
@ -357,9 +357,9 @@ def do_metric_statistics(mc, args):
|
||||||
@utils.arg('name', metavar='<NOTIFICATION_NAME>',
|
@utils.arg('name', metavar='<NOTIFICATION_NAME>',
|
||||||
help='Name of the notification to create.')
|
help='Name of the notification to create.')
|
||||||
@utils.arg('type', metavar='<TYPE>',
|
@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>',
|
@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):
|
def do_notification_create(mc, args):
|
||||||
'''Create notification.'''
|
'''Create notification.'''
|
||||||
if args.type.upper() not in notification_types:
|
if args.type.upper() not in notification_types:
|
||||||
|
@ -460,9 +460,9 @@ def do_notification_delete(mc, args):
|
||||||
@utils.arg('name', metavar='<NOTIFICATION_NAME>',
|
@utils.arg('name', metavar='<NOTIFICATION_NAME>',
|
||||||
help='Name of the notification.')
|
help='Name of the notification.')
|
||||||
@utils.arg('type', metavar='<TYPE>',
|
@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>',
|
@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):
|
def do_notification_update(mc, args):
|
||||||
'''Update notification.'''
|
'''Update notification.'''
|
||||||
fields = {}
|
fields = {}
|
||||||
|
|
Loading…
Reference in New Issue