Skip to content

Commit ef284ae

Browse files
skeleton for autoscale
1 parent cb51390 commit ef284ae

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

SoftLayer/CLI/autoscale/__init__.py

Whitespace-only changes.

SoftLayer/CLI/autoscale/list.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
"""List virtual servers."""
2+
# :license: MIT, see LICENSE for more details.
3+
4+
import click
5+
6+
import SoftLayer
7+
from SoftLayer.CLI import columns as column_helper
8+
from SoftLayer.CLI import environment
9+
from SoftLayer.CLI import formatting
10+
from SoftLayer.CLI import helpers
11+
from SoftLayer.managers.autoscale import AutoScaleManager
12+
13+
14+
@click.command()
15+
@environment.pass_env
16+
def cli(env):
17+
"""List AutoScale Groups."""
18+
19+
autoscale = AutoScaleManager(env.client)
20+
groups = autoscale.list()
21+
print(groups)
22+
# table = formatting.Table()
23+
24+
25+
# env.fout(table)

SoftLayer/CLI/routes.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,9 @@
302302

303303
('report', 'SoftLayer.CLI.report'),
304304
('report:bandwidth', 'SoftLayer.CLI.report.bandwidth:cli'),
305+
306+
('autoscale', 'SoftLayer.CLI.autoscale'),
307+
('autoscale:list', 'SoftLayer.CLI.autoscale.list:cli'),
305308
]
306309

307310
ALL_ALIASES = {

SoftLayer/managers/autoscale.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""
2+
SoftLayer.autoscale
3+
~~~~~~~~~~~~
4+
Autoscale manager
5+
6+
:license: MIT, see LICENSE for more details.
7+
"""
8+
9+
10+
11+
class AutoScaleManager(object):
12+
13+
def __init__(self, client):
14+
self.client = client
15+
16+
17+
def list(self):
18+
print("LISTING....")
19+
return True

0 commit comments

Comments
 (0)