projects
/
osm
/
N2VC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix self.loop reference in BundleHandler
[osm/N2VC.git]
/
juju
/
constraints.py
diff --git
a/juju/constraints.py
b/juju/constraints.py
index
97529e4
..
c551883
100644
(file)
--- a/
juju/constraints.py
+++ b/
juju/constraints.py
@@
-21,6
+21,7
@@
import re
MEM = re.compile('^[1-9][0-9]*[MGTP]$')
# Multiplication factors to get Megabytes
MEM = re.compile('^[1-9][0-9]*[MGTP]$')
# Multiplication factors to get Megabytes
+# https://github.com/juju/juju/blob/master/constraints/constraints.go#L666
FACTORS = {
"M": 1,
"G": 1024,
FACTORS = {
"M": 1,
"G": 1024,
@@
-31,6
+32,7
@@
FACTORS = {
SNAKE1 = re.compile(r'(.)([A-Z][a-z]+)')
SNAKE2 = re.compile('([a-z0-9])([A-Z])')
SNAKE1 = re.compile(r'(.)([A-Z][a-z]+)')
SNAKE2 = re.compile('([a-z0-9])([A-Z])')
+
def parse(constraints):
"""
Constraints must be expressed as a string containing only spaces
def parse(constraints):
"""
Constraints must be expressed as a string containing only spaces