Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Commit d494a2b

Browse files
committed
Merge pull request #36 from idvoretskyi/patch-1
Small indent fix
2 parents 419e997 + e8d89df commit d494a2b

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
55
This 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

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ A Python client for the Packet API.
77

88
Installation
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

1214
Package information available here:
1315

packet/Manager.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff 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):

0 commit comments

Comments
 (0)