Merge "Removing support for SMS on client"
This commit is contained in:
commit
d13c1f4415
@ -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()
|
||||
|
||||
|
@ -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 = {}
|
||||
|
Loading…
Reference in New Issue
Block a user