Merge pull request #2282 from coreos-inc/motd-updates

Severity and Markdown support in MOTD
This commit is contained in:
josephschorr 2017-01-18 17:41:27 -05:00 committed by GitHub
commit e2748fccd9
13 changed files with 234 additions and 36 deletions

View file

@ -35,6 +35,16 @@ class GlobalUserMessages(ApiResource):
'type': 'string',
'description': 'The actual message',
},
'media_type': {
'type': 'string',
'description': 'The media type of the message',
'enum': ['text/plain', 'text/markdown'],
},
'severity': {
'type': 'string',
'description': 'The severity of the message',
'enum': ['info', 'warning', 'error'],
},
},
},
},
@ -53,6 +63,16 @@ class GlobalUserMessages(ApiResource):
'type': 'string',
'description': 'The actual message',
},
'media_type': {
'type': 'string',
'description': 'The media type of the message',
'enum': ['text/plain', 'text/markdown'],
},
'severity': {
'type': 'string',
'description': 'The severity of the message',
'enum': ['info', 'warning', 'error'],
},
},
},
},
@ -104,4 +124,6 @@ def message_view(message):
return {
'uuid': message.uuid,
'content': message.content,
'severity': message.severity,
'media_type': message.media_type.name,
}