Skip to content

Commit

Permalink
Merge pull request aws#3889 from stealthycoin/hide-sms-voice
Browse files Browse the repository at this point in the history
Hide sms-voice from documentation
  • Loading branch information
stealthycoin authored Jan 25, 2019
2 parents d7b8ca9 + 8dc54c1 commit bae9a90
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
21 changes: 21 additions & 0 deletions awscli/customizations/sms_voice.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.


def register_sms_voice_hide(event_emitter):
event_emitter.register('building-command-table.main',
hide_sms_voice)


def hide_sms_voice(command_table, session, **kwargs):
command_table['sms-voice']._UNDOCUMENTED = True
2 changes: 2 additions & 0 deletions awscli/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
from awscli.customizations.servicecatalog import register_servicecatalog_commands
from awscli.customizations.s3events import register_event_stream_arg
from awscli.customizations.sessionmanager import register_ssm_session
from awscli.customizations.sms_voice import register_sms_voice_hide


def awscli_initialize(event_handlers):
Expand Down Expand Up @@ -174,3 +175,4 @@ def awscli_initialize(event_handlers):
register_event_stream_arg(event_handlers)
dlm_initialize(event_handlers)
register_ssm_session(event_handlers)
register_sms_voice_hide(event_handlers)
7 changes: 7 additions & 0 deletions tests/functional/docs/test_help_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,13 @@ def test_operation_help_command_has_note(self):
'intended for testing purposes only.')


class TestSMSVoice(BaseAWSHelpOutputTest):
def test_service_help_not_listed(self):
self.driver.main(['help'])
# Ensure the hidden service is not in the help listing.
self.assert_not_contains('* sms-voice')


class TestAliases(BaseAWSHelpOutputTest):
def setUp(self):
super(TestAliases, self).setUp()
Expand Down

0 comments on commit bae9a90

Please sign in to comment.