This repository was archived by the owner on Mar 4, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
44The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ ) .
55This project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
66
7+ ## Unreleased
8+ ### Added
9+ - ` legacy ` param to ` get_capacity ` function
710
811## [ 1.37.1] - 2018-01-08
912### Fixed
Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ A Python client for the Packet API.
77
88Installation
99------------
10- The packet python api library can be installed using pip: ` pip install packet-python `
10+ The packet python api library can be installed using pip:
11+
12+ pip install packet-python
1113
1214Package information available here:
1315
Original file line number Diff line number Diff line change @@ -167,8 +167,12 @@ def get_volume(self, volume_id):
167167 data = self .call_api ('storage/%s' % volume_id , params = params )
168168 return Volume (data , self )
169169
170- def get_capacity (self ):
171- return self .call_api ('/capacity' )['capacity' ]
170+ def get_capacity (self , legacy = None ):
171+ params = None
172+ if legacy :
173+ params = {'legacy' : legacy }
174+
175+ return self .call_api ('/capacity' , params = params )['capacity' ]
172176
173177 # servers is a list of tuples of facility, plan, and quantity.
174178 def validate_capacity (self , servers ):
You can’t perform that action at this time.
0 commit comments