Skip to content

Commit 1a0d5cc

Browse files
author
Steve Martinelli
committed
Remove api = apiName calls from each method
As discussed in https://review.openstack.org/#/c/36352/ for each command, we were setting api = identity or volume... etc, this was for an old way of calling commands that are is no longer used. Also removed openstackclient/common/command.py Change-Id: I2705f35d343f2ae729dc22d6aed0b852b2f8ca19
1 parent f0d3bf8 commit 1a0d5cc

34 files changed

Lines changed: 0 additions & 179 deletions

‎openstackclient/common/command.py‎

Lines changed: 0 additions & 29 deletions
This file was deleted.

‎openstackclient/compute/v2/agent.py‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
class CreateAgent(show.ShowOne):
2828
"""Create agent command"""
2929

30-
api = "compute"
3130
log = logging.getLogger(__name__ + ".CreateAgent")
3231

3332
def get_parser(self, prog_name):
@@ -77,7 +76,6 @@ def take_action(self, parsed_args):
7776
class DeleteAgent(command.Command):
7877
"""Delete agent command"""
7978

80-
api = "compute"
8179
log = logging.getLogger(__name__ + ".DeleteAgent")
8280

8381
def get_parser(self, prog_name):
@@ -98,7 +96,6 @@ def take_action(self, parsed_args):
9896
class ListAgent(lister.Lister):
9997
"""List agent command"""
10098

101-
api = "compute"
10299
log = logging.getLogger(__name__ + ".ListAgent")
103100

104101
def get_parser(self, prog_name):
@@ -131,7 +128,6 @@ def take_action(self, parsed_args):
131128
class SetAgent(show.ShowOne):
132129
"""Set agent command"""
133130

134-
api = "compute"
135131
log = logging.getLogger(__name__ + ".SetAgent")
136132

137133
def get_parser(self, prog_name):

‎openstackclient/compute/v2/console.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
class ShowConsoleLog(command.Command):
2828
"""Show console-log command"""
2929

30-
api = 'compute'
3130
log = logging.getLogger(__name__ + '.ShowConsoleLog')
3231

3332
def get_parser(self, prog_name):
@@ -65,7 +64,6 @@ def take_action(self, parsed_args):
6564
class ShowConsoleURL(show.ShowOne):
6665
"""Show console-url command"""
6766

68-
api = 'compute'
6967
log = logging.getLogger(__name__ + '.ShowConsoleURL')
7068

7169
def get_parser(self, prog_name):

‎openstackclient/compute/v2/fixedip.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
class AddFixedIP(command.Command):
2626
"""Add fixed-ip command"""
2727

28-
api = "compute"
2928
log = logging.getLogger(__name__ + ".AddFixedIP")
3029

3130
def get_parser(self, prog_name):
@@ -59,7 +58,6 @@ def take_action(self, parsed_args):
5958
class RemoveFixedIP(command.Command):
6059
"""Remove fixed-ip command"""
6160

62-
api = "compute"
6361
log = logging.getLogger(__name__ + ".RemoveFixedIP")
6462

6563
def get_parser(self, prog_name):

‎openstackclient/compute/v2/flavor.py‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
class CreateFlavor(show.ShowOne):
2828
"""Create flavor command"""
2929

30-
api = "compute"
3130
log = logging.getLogger(__name__ + ".CreateFlavor")
3231

3332
def get_parser(self, prog_name):
@@ -117,7 +116,6 @@ def take_action(self, parsed_args):
117116
class DeleteFlavor(command.Command):
118117
"""Delete flavor command"""
119118

120-
api = "compute"
121119
log = logging.getLogger(__name__ + ".DeleteFlavor")
122120

123121
def get_parser(self, prog_name):
@@ -140,7 +138,6 @@ def take_action(self, parsed_args):
140138
class ListFlavor(lister.Lister):
141139
"""List flavor command"""
142140

143-
api = "compute"
144141
log = logging.getLogger(__name__ + ".ListFlavor")
145142

146143
def take_action(self, parsed_args):
@@ -168,7 +165,6 @@ def take_action(self, parsed_args):
168165
class ShowFlavor(show.ShowOne):
169166
"""Show flavor command"""
170167

171-
api = "compute"
172168
log = logging.getLogger(__name__ + ".ShowFlavor")
173169

174170
def get_parser(self, prog_name):

‎openstackclient/compute/v2/floatingip.py‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
class AddFloatingIP(command.Command):
2828
"""Add floating-ip command"""
2929

30-
api = "compute"
3130
log = logging.getLogger(__name__ + ".AddFloatingIP")
3231

3332
def get_parser(self, prog_name):
@@ -58,7 +57,6 @@ def take_action(self, parsed_args):
5857
class CreateFloatingIP(show.ShowOne):
5958
"""Create floating-ip command"""
6059

61-
api = 'compute'
6260
log = logging.getLogger(__name__ + '.CreateFloatingIP')
6361

6462
def get_parser(self, prog_name):
@@ -83,7 +81,6 @@ def take_action(self, parsed_args):
8381
class DeleteFloatingIP(command.Command):
8482
"""Delete floating-ip command"""
8583

86-
api = 'compute'
8784
log = logging.getLogger(__name__ + '.DeleteFloatingIP')
8885

8986
def get_parser(self, prog_name):
@@ -111,7 +108,6 @@ def take_action(self, parsed_args):
111108
class ListFloatingIP(lister.Lister):
112109
"""List floating-ip command"""
113110

114-
api = 'compute'
115111
log = logging.getLogger(__name__ + '.ListFloatingIP')
116112

117113
def take_action(self, parsed_args):
@@ -132,7 +128,6 @@ def take_action(self, parsed_args):
132128
class RemoveFloatingIP(command.Command):
133129
"""Remove floating-ip command"""
134130

135-
api = "compute"
136131
log = logging.getLogger(__name__ + ".RemoveFloatingIP")
137132

138133
def get_parser(self, prog_name):

‎openstackclient/compute/v2/floatingippool.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
class ListFloatingIPPool(lister.Lister):
2626
"""List floating-ip-pool command"""
2727

28-
api = 'compute'
2928
log = logging.getLogger(__name__ + '.ListFloatingIPPool')
3029

3130
def take_action(self, parsed_args):

‎openstackclient/compute/v2/host.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
class ListHost(lister.Lister):
2626
"""List host command"""
2727

28-
api = "compute"
2928
log = logging.getLogger(__name__ + ".ListHost")
3029

3130
def get_parser(self, prog_name):
@@ -54,7 +53,6 @@ def take_action(self, parsed_args):
5453
class ShowHost(lister.Lister):
5554
"""Show host command"""
5655

57-
api = "compute"
5856
log = logging.getLogger(__name__ + ".ShowHost")
5957

6058
def get_parser(self, prog_name):

‎openstackclient/compute/v2/hypervisor.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
class ListHypervisor(lister.Lister):
2727
"""List hypervisor command"""
2828

29-
api = "compute"
3029
log = logging.getLogger(__name__ + ".ListHypervisor")
3130

3231
def get_parser(self, prog_name):
@@ -60,7 +59,6 @@ def take_action(self, parsed_args):
6059
class ShowHypervisor(show.ShowOne):
6160
"""Show hypervisor command"""
6261

63-
api = "compute"
6462
log = logging.getLogger(__name__ + ".ShowHypervisor")
6563

6664
def get_parser(self, prog_name):

‎openstackclient/compute/v2/keypair.py‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
class CreateKeypair(show.ShowOne):
3131
"""Create keypair command"""
3232

33-
api = "compute"
3433
log = logging.getLogger(__name__ + '.CreateKeypair')
3534

3635
def get_parser(self, prog_name):
@@ -81,7 +80,6 @@ def take_action(self, parsed_args):
8180
class DeleteKeypair(command.Command):
8281
"""Delete keypair command"""
8382

84-
api = "compute"
8583
log = logging.getLogger(__name__ + '.DeleteKeypair')
8684

8785
def get_parser(self, prog_name):
@@ -103,7 +101,6 @@ def take_action(self, parsed_args):
103101
class ListKeypair(lister.Lister):
104102
"""List keypair command"""
105103

106-
api = "compute"
107104
log = logging.getLogger(__name__ + ".ListKeypair")
108105

109106
def take_action(self, parsed_args):
@@ -124,7 +121,6 @@ def take_action(self, parsed_args):
124121
class ShowKeypair(show.ShowOne):
125122
"""Show keypair command"""
126123

127-
api = 'compute'
128124
log = logging.getLogger(__name__ + '.ShowKeypair')
129125

130126
def get_parser(self, prog_name):

0 commit comments

Comments
 (0)