Skip to content

Commit f384130

Browse files
merging in updates from slcli
2 parents 7997ae1 + e63d10a commit f384130

File tree

202 files changed

+8088
-1520
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+8088
-1520
lines changed

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Use `allow` to specify which dependencies to maintain
2+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-update
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: "pip"
7+
directory: "/"
8+
schedule:
9+
interval: "weekly"
10+
commit-message:
11+
prefix: "pip prod"
12+
prefix-development: "pip dev"
13+
include: "scope"

.github/workflows/release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release Snapcraft and PyPi (Testing)
1+
name: Release Snapcraft and PyPi
22

33
on:
44
release:
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-18.04
1010
strategy:
1111
matrix:
12-
arch: ['armhf','amd64','arm64','ppc64el','s390x','i386']
12+
arch: ['armhf','amd64','arm64','ppc64el','s390x']
1313
steps:
1414
- name: Install Snapcraft
1515
uses: samuelmeuli/action-snapcraft@v1.2.0
@@ -44,8 +44,9 @@ jobs:
4444
--outdir dist/
4545
.
4646
- name: Publish 📦 to Test PyPI
47-
uses: pypa/gh-action-pypi-publish@master
47+
uses: pypa/gh-action-pypi-publish@release/v1
4848
with:
49-
password: ${{ secrets.CGALLO_TEST_PYPI }}
50-
repository_url: https://test.pypi.org/legacy/
49+
user: __token__
50+
password: ${{ secrets.CGALLO_PYPI }}
51+
repository_url: https://upload.pypi.org/legacy/
5152

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python-version: [3.7,3.8,3.9,'3.10']
13+
python-version: [3.7,3.8,3.9,'3.10',3.11]
1414

1515
steps:
1616
- uses: actions/checkout@v2

CHANGELOG.md

Lines changed: 145 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,149 @@
11
# Change Log
22

3-
4-
## [6.0.2] - 2022-03-30
5-
6-
## What's Changed
3+
## [6.1.3] - 2022-11-30
4+
5+
#### What's Changed
6+
* New Command: Hardware notifications by @caberos in https://github.com/softlayer/softlayer-python/pull/1756
7+
* New Command: virtual notifications by @caberos in https://github.com/softlayer/softlayer-python/pull/1758
8+
* Change regex in rich text in simple option in help text by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1759
9+
* pip prod(deps): bump rich from 12.5.1 to 12.6.0 by @dependabot in https://github.com/softlayer/softlayer-python/pull/1760
10+
* add more information to vs credentials by @caberos in https://github.com/softlayer/softlayer-python/pull/1762
11+
* Fixed maxint issue by @allmightyspiff in https://github.com/softlayer/softlayer-python/pull/1765
12+
* Added csv output format by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1766
13+
* add more information on hw credentials by @caberos in https://github.com/softlayer/softlayer-python/pull/1767
14+
* Delete twitter link in documentation by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1769
15+
* new command hw create-credential by @caberos in https://github.com/softlayer/softlayer-python/pull/1774
16+
* fix the hw credential error by @caberos in https://github.com/softlayer/softlayer-python/pull/1781
17+
* Added test suite for py311 by @allmightyspiff in https://github.com/softlayer/softlayer-python/pull/1784
18+
* New feature to change theme in slcli like dark, light o maintain in default by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1775
19+
* Match `virtual detail --prices` option with `hardware detail --prices` option by @BrianSantivanez in https://github.com/softlayer/softlayer-python/pull/1780
20+
* Fixing preset-list pricing table by @allmightyspiff in https://github.com/softlayer/softlayer-python/pull/1782
21+
* fix the call api cannot handle empty results by @caberos in https://github.com/softlayer/softlayer-python/pull/1789
22+
* Debug output changed to a valid JSON by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1791
23+
* slcli hw add-notifications crashes with a bad user by @caberos in https://github.com/softlayer/softlayer-python/pull/1786
24+
* del-notification commands, rename the commands to notifications-add by @caberos in https://github.com/softlayer/softlayer-python/pull/1785
25+
* Add --extras to slcli order quote by @caberos in https://github.com/softlayer/softlayer-python/pull/1792
26+
* An error is displaying for volume with replica in slcli for Active pr… by @caberos in https://github.com/softlayer/softlayer-python/pull/1794
27+
28+
29+
**Full Changelog**: https://github.com/softlayer/softlayer-python/compare/v6.1.2...v6.1.3
30+
31+
32+
## [6.1.2] - 2022-09-23
33+
34+
#### What's Changed
35+
* Snapcraft: Updated to Core22 and add homeishome-launch by @kz6fittycent in https://github.com/softlayer/softlayer-python/pull/1740
36+
* Add status, create date and domain columns in `slcli vs list command` by @BrianSantivanez in https://github.com/softlayer/softlayer-python/pull/1728
37+
* New command: ipsec cancel by @caberos in https://github.com/softlayer/softlayer-python/pull/1729
38+
* New command: subnet clear-route by @caberos in https://github.com/softlayer/softlayer-python/pull/1738
39+
* Deprecate slcli hw guests by @caberos in https://github.com/softlayer/softlayer-python/pull/1736
40+
* Remove real usersnames from test fixtrues by @caberos in https://github.com/softlayer/softlayer-python/pull/1743
41+
* Fix tox request.get hangout issue by @caberos in https://github.com/softlayer/softlayer-python/pull/1746
42+
* add vs user-access command by @caberos in https://github.com/softlayer/softlayer-python/pull/1741
43+
* Update Help message for commands that take in multiple arguments by @caberos in https://github.com/softlayer/softlayer-python/pull/1748
44+
* Error with slcli order item-list by @caberos in https://github.com/softlayer/softlayer-python/pull/1751
45+
* deprecate sl `autoscale` by @BrianSantivanez in https://github.com/softlayer/softlayer-python/pull/1753
46+
* Unhandled error running a subcommand in slcli by @caberos in https://github.com/softlayer/softlayer-python/pull/1754
47+
48+
49+
**Full Changelog**: https://github.com/softlayer/softlayer-python/compare/v6.1.1...v6.1.2
50+
51+
52+
## [6.1.1] - 2022-08-18
53+
54+
#### What's Changed
55+
* v6.1.0 Changelog and version bump by @allmightyspiff in https://github.com/softlayer/softlayer-python/pull/1674
56+
* item-list fix by @allmightyspiff in https://github.com/softlayer/softlayer-python/pull/1679
57+
* updating release job to actually publish to pypi by @allmightyspiff in https://github.com/softlayer/softlayer-python/pull/1680
58+
* Update command - slcli object-storage endpoints by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1685
59+
* add the block volume-options command by @caberos in https://github.com/softlayer/softlayer-python/pull/1681
60+
* add the file volume-options command by @caberos in https://github.com/softlayer/softlayer-python/pull/1684
61+
* fixed issues where a message warned users about closing datacenter by @allmightyspiff in https://github.com/softlayer/softlayer-python/pull/1688
62+
* Enable --format=raw and fixes table width by @allmightyspiff in https://github.com/softlayer/softlayer-python/pull/1689
63+
* Update `slcli hardware sensor` by @BrianSantivanez in https://github.com/softlayer/softlayer-python/pull/1691
64+
* Improved successful response to command - slcli vs cancel by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1695
65+
* Fixed an issue with printing tables that contained empty items by @allmightyspiff in https://github.com/softlayer/softlayer-python/pull/1697
66+
* Added a dependabot scanner by @allmightyspiff in https://github.com/softlayer/softlayer-python/pull/1699
67+
* block|file volume-options improvements by @caberos in https://github.com/softlayer/softlayer-python/pull/1700
68+
* Option create-options in commands hardware and dedicatedhost fixed by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1703
69+
* pip prod(deps): bump rich from 12.3.0 to 12.5.1 by @dependabot in https://github.com/softlayer/softlayer-python/pull/1704
70+
* block/file volume-options improvements 2 by @caberos in https://github.com/softlayer/softlayer-python/pull/1702
71+
* New command ipsec order by @caberos in https://github.com/softlayer/softlayer-python/pull/1698
72+
* block/file volume-options improvement 3 by @caberos in https://github.com/softlayer/softlayer-python/pull/1705
73+
* Command slcli vlan create - displaying an error message by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1707
74+
* New Command: user device-access by @caberos in https://github.com/softlayer/softlayer-python/pull/1712
75+
* Command slcli vlan edit accept that we do not send any parameters by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1709
76+
* Updated command - slcli vlan list by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1713
77+
* `slcli block subnets-list` command display an error message by @BrianSantivanez in https://github.com/softlayer/softlayer-python/pull/1716
78+
* add user remove-access command by @caberos in https://github.com/softlayer/softlayer-python/pull/1717
79+
* Add Devices with Trunks to vlan detail by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1721
80+
* slcli hardware reflash-firmware command does not display success message by @BrianSantivanez in https://github.com/softlayer/softlayer-python/pull/1724
81+
* Fix bug with command - slcli cdn edit by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1726
82+
83+
#### New Contributors
84+
* @dependabot made their first contribution in https://github.com/softlayer/softlayer-python/pull/1704
85+
86+
**Full Changelog**: https://github.com/softlayer/softlayer-python/compare/v6.1.0...v6.1.1
87+
88+
89+
90+
## [6.1.0] - 2022-06-30
91+
92+
#### Major Updates
93+
* [Rich](https://github.com/Textualize/rich) tables by @allmightyspiff in https://github.com/softlayer/softlayer-python/pull/1646
94+
* [Rich](https://github.com/Textualize/rich) Text support by @allmightyspiff in https://github.com/softlayer/softlayer-python/pull/1635
95+
96+
Rich Text and Rich Tables will modernize the output of the SLCLI to be a little nicer to look at, with colors and other highlighting.
97+
98+
![image](https://user-images.githubusercontent.com/7408017/176753783-f6a4a43a-53ac-4600-a24f-21362f152747.png)
99+
![image](https://user-images.githubusercontent.com/7408017/176753845-32af33f0-454f-4bab-ac63-1ae3db788ede.png)
100+
101+
102+
#### What's Changed
103+
* slcli licenses is missing the help text by @caberos in https://github.com/softlayer/softlayer-python/pull/1605
104+
* Add a warning if user orders in a POD that is being closed by @caberos in https://github.com/softlayer/softlayer-python/pull/1600
105+
* updated number of updates in the command account event-detail by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1609
106+
* Add an orderBy filter to slcli vlan list by @caberos in https://github.com/softlayer/softlayer-python/pull/1599
107+
* Add options to print a specific table in command slcli account events by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1611
108+
* Update global ip assign/unassign to use new API by @caberos in https://github.com/softlayer/softlayer-python/pull/1614
109+
* Ability to route/unroute subnets by @caberos in https://github.com/softlayer/softlayer-python/pull/1615
110+
* Improved successful response to command - slcli account cancel-item by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1617
111+
* Improved successful response to command - slcli virtual edit by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1618
112+
* Improved successful response to command - slcli vlan cancel by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1619
113+
* Mishandling of domain and hostname data in `slcli account item-detail` by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1621
114+
* Unable to get VSI details when last TXN is "Software install is finis… by @caberos in https://github.com/softlayer/softlayer-python/pull/1625
115+
* new command on autoscale delete by @caberos in https://github.com/softlayer/softlayer-python/pull/1628
116+
* Incorrect table title is displayed when an Auto Scale Group is scaled to reduce members by @BrianSantivanez in https://github.com/softlayer/softlayer-python/pull/1629
117+
* slcli autoscale create by @caberos in https://github.com/softlayer/softlayer-python/pull/1623
118+
* Soap transport by @allmightyspiff in https://github.com/softlayer/softlayer-python/pull/1626
119+
* fix issue on loadbal order command by @caberos in https://github.com/softlayer/softlayer-python/pull/1633
120+
* Policy is not added when an AutoScale Group is created by @caberos in https://github.com/softlayer/softlayer-python/pull/1637
121+
* When `slcli event-log` not return any event log the command display an error by @BrianSantivanez in https://github.com/softlayer/softlayer-python/pull/1641
122+
* add new columns on vlan list(premium, tags) by @caberos in https://github.com/softlayer/softlayer-python/pull/1645
123+
* fixed documentation build issues by @allmightyspiff in https://github.com/softlayer/softlayer-python/pull/1648
124+
* Improved successful response to command - slcli licenses cancel by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1653
125+
* update the firewall list by @caberos in https://github.com/softlayer/softlayer-python/pull/1649
126+
* Updated readme by @allmightyspiff in https://github.com/softlayer/softlayer-python/pull/1656
127+
* Update `slcli firewall detail` to handle multi vlan firewalls by @BrianSantivanez in https://github.com/softlayer/softlayer-python/pull/1651
128+
* New command for getting duplicate convert status by @ko101 in https://github.com/softlayer/softlayer-python/pull/1655
129+
* Fixed TOX errors by @allmightyspiff in https://github.com/softlayer/softlayer-python/pull/1661
130+
* add a new feature to get all cloud object storage by @caberos in https://github.com/softlayer/softlayer-python/pull/1662
131+
* Update `slcli report bandwidth` command by @BrianSantivanez in https://github.com/softlayer/softlayer-python/pull/1664
132+
* add firewall monitoring command by @caberos in https://github.com/softlayer/softlayer-python/pull/1657
133+
* add a new command on block object-storage details by @caberos in https://github.com/softlayer/softlayer-python/pull/1666
134+
* slcli account bandwidth-pools-detail command displays an error with b… by @caberos in https://github.com/softlayer/softlayer-python/pull/1670
135+
* new feature block object-storage permissions command by @caberos in https://github.com/softlayer/softlayer-python/pull/1668
136+
* fix the vlan table by @caberos in https://github.com/softlayer/softlayer-python/pull/1672
137+
138+
#### New Contributors
139+
* @BrianSantivanez made their first contribution in https://github.com/softlayer/softlayer-python/pull/1629
140+
141+
**Full Changelog**: https://github.com/softlayer/softlayer-python/compare/v6.0.2...v6.1.0
142+
143+
144+
### [6.0.2] - 2022-03-30
145+
146+
#### What's Changed
7147
* New Command slcli hardware|virtual monitoring by @caberos in https://github.com/softlayer/softlayer-python/pull/1593
8148
* When listing datacenters/pods, mark those that are closing soon. by @caberos in https://github.com/softlayer/softlayer-python/pull/1597
9149

@@ -13,7 +153,7 @@
13153
## [6.0.1] - 2022-03-11
14154

15155

16-
## What's Changed
156+
#### What's Changed
17157
* Replace the use of ptable with prettytable by @dvzrv in https://github.com/softlayer/softlayer-python/pull/1584
18158
* Bandwidth pool management by @caberos in https://github.com/softlayer/softlayer-python/pull/1582
19159
* Add id in the result in the command bandwidth-pools by @edsonarios in https://github.com/softlayer/softlayer-python/pull/1586

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Manager methods should have a decent docblock describing any parameters and what
4040

4141
Docs are generated with [Sphinx](https://docs.readthedocs.io/en/latest/intro/getting-started-with-sphinx.html) and once Sphinx is setup, you can simply do
4242

43-
`make html` in the softlayer-python/docs directory, which should generate the HTML in softlayer-python/docs/_build/html for testing.
43+
`make html` in the softlayer-python/docs directory, which should generate the HTML in `softlayer-python/docs/_build/html` for testing.
4444

4545

4646
## Unit Tests

README.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,20 +139,29 @@ System Requirements
139139
* A valid SoftLayer Employee API username, password, Yubi Key
140140
* A connection to SoftLayer's Employee VPN
141141

142+
143+
Python 3.6 Support
144+
------------------
145+
As of version 6.0.0 SoftLayer-Python will no longer support python3.6, which is `End of Life as of 2022 <https://endoflife.date/python>`_.
146+
If you cannot install python 3.8+ for some reason, you will need to use a version of softlayer-python <= 6.0.0
147+
142148
Python 2.7 Support
143149
------------------
144150
Python 2.7 is `End Of Life as of 2020 <https://www.python.org/dev/peps/pep-0373/>`_ . Its not supported, you will need to upgrade to python 3.7 at least.
145151

146152

147153
Python Packages
148154
---------------
149-
* prettytable >= 2.0.0
150-
* click >= 7
155+
* prettytable >= 2.5.0
156+
* click >= 8.0.4
151157
* requests >= 2.20.0
152158
* prompt_toolkit >= 2
153159
* pygments >= 2.0.0
154160
* urllib3 >= 1.24
155-
* Rich
161+
* rich == 12.3.0
162+
163+
*NOTE* If `ptable` (not prettytable) is installed, this will cause issues rendering tables.
164+
156165

157166
Copyright
158167
---------

SoftLayer/CLI/account/bandwidth_pools_detail.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@ def cli(env, identifier):
3737
inbound = '-'
3838
table.add_row(['Inbound Usage', inbound])
3939
if bandwidths['hardware'] != []:
40-
table.add_row(['hardware', _bw_table(bandwidths['hardware'])])
40+
table.add_row(['hardware', *(_bw_table(bandwidths['hardware']))])
4141
else:
4242
table.add_row(['hardware', 'Not Found'])
4343

4444
if bandwidths['virtualGuests'] != []:
45-
table.add_row(['virtualGuests', _virtual_table(bandwidths['virtualGuests'])])
45+
table.add_row(['virtualGuests', *(_virtual_table(bandwidths['virtualGuests']))])
4646
else:
4747
table.add_row(['virtualGuests', 'Not Found'])
4848

4949
if bandwidths['bareMetalInstances'] != []:
50-
table.add_row(['Netscaler', _bw_table(bandwidths['bareMetalInstances'])])
50+
table.add_row(['Netscaler', *(_bw_table(bandwidths['bareMetalInstances']))])
5151
else:
5252
table.add_row(['Netscaler', 'Not Found'])
5353

SoftLayer/CLI/account/events.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,26 @@
1010

1111

1212
@click.command(cls=SLCommand)
13+
@click.option('--announcement', is_flag=True, default=False,
14+
help="Show only announcement events.")
1315
@click.option('--ack-all', is_flag=True, default=False,
14-
help="Acknowledge every upcoming event. Doing so will turn off the popup in the control portal")
16+
help="Acknowledge every upcoming event. Doing so will turn off the popup in the control portal.")
17+
@click.option('--date-min', help="Earliest date to retrieve events for [MM/DD/YYYY]. Default: 2 days ago.")
1518
@click.option('--planned', is_flag=True, default=False,
16-
help="Show only planned events")
19+
help="Show only planned events.")
1720
@click.option('--unplanned', is_flag=True, default=False,
18-
help="Show only unplanned events")
19-
@click.option('--announcement', is_flag=True, default=False,
20-
help="Show only announcement events")
21+
help="Show only unplanned events.")
2122
@environment.pass_env
22-
def cli(env, ack_all, planned, unplanned, announcement):
23+
def cli(env, ack_all, planned, unplanned, announcement, date_min):
2324
"""Summary and acknowledgement of upcoming and ongoing maintenance events"""
2425

26+
if date_min:
27+
utils.verify_date(date_min)
28+
2529
manager = AccountManager(env.client)
26-
planned_events = manager.get_upcoming_events("PLANNED")
27-
unplanned_events = manager.get_upcoming_events("UNPLANNED_INCIDENT")
28-
announcement_events = manager.get_upcoming_events("ANNOUNCEMENT")
30+
planned_events = manager.get_upcoming_events("PLANNED", date_min)
31+
unplanned_events = manager.get_upcoming_events("UNPLANNED_INCIDENT", date_min)
32+
announcement_events = manager.get_upcoming_events("ANNOUNCEMENT", date_min)
2933

3034
add_ack_flag(planned_events, manager, ack_all)
3135
add_ack_flag(unplanned_events, manager, ack_all)

SoftLayer/CLI/account/invoices.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212

1313
@click.command(cls=SLCommand)
14-
@click.option('--limit', default=50, show_default=True,
15-
help="How many invoices to get back.")
16-
@click.option('--closed', is_flag=True, default=False, show_default=True,
17-
help="Include invoices with a CLOSED status.")
1814
@click.option('--all', 'get_all', is_flag=True, default=False, show_default=True,
1915
help="Return ALL invoices. There may be a lot of these.")
16+
@click.option('--closed', is_flag=True, default=False, show_default=True,
17+
help="Include invoices with a CLOSED status.")
18+
@click.option('--limit', default=50, show_default=True,
19+
help="How many invoices to get back.")
2020
@environment.pass_env
2121
def cli(env, limit, closed=False, get_all=False):
2222
"""List invoices"""

0 commit comments

Comments
 (0)