MCPcopy Index your code
hub / github.com/aws/aws-cli / inject_aliases

Method inject_aliases

awscli/alias.py:127–148  ·  view source on GitHub ↗
(self, command_table, parser)

Source from the content-addressed store, hash-verified

125 self._session = session
126
127 def inject_aliases(self, command_table, parser):
128 for alias_name, alias_value in self._get_alias_items():
129 if self._is_external_alias(alias_value):
130 self._inject_external_alias(
131 alias_name, alias_value, command_table
132 )
133 else:
134 service_alias_cmd_args = [
135 alias_name,
136 alias_value,
137 self._session,
138 command_table,
139 parser,
140 ]
141 # If the alias name matches something already in the
142 # command table provide the command it is about
143 # to clobber as a possible reference that it will
144 # need to proxy to.
145 if alias_name in command_table:
146 service_alias_cmd_args.append(command_table[alias_name])
147 alias_cmd = ServiceAliasCommand(*service_alias_cmd_args)
148 command_table[alias_name] = alias_cmd
149
150
151class AliasSubCommandInjector(BaseAliasCommandInjector):

Callers 5

_add_aliasesMethod · 0.95

Calls 4

ServiceAliasCommandClass · 0.85
_get_alias_itemsMethod · 0.80
_is_external_aliasMethod · 0.80

Tested by 4