- Allow PATCH on resources (for example changing "host" or "flavor_id" after a resize)
- Allow to retrieve the list of resources for a user: /v1/resources/?user_id=<foo> -> return all instances too /v1/instances/?user_id=<foo>
- Allow to retrieve the list of resources for a user with details: /v1/resources/?user_id=<foo>&detail=true -> return all instances too with full details (more costs as we need to look in other tables)
- Allow to retrieve the list of resources with timestamp /v1/resources/?started_after=<timestamp>&ended_before=<timestamp>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/hy/compiler.py b/hy/compiler.py | |
index 24ba107..22687ca 100644 | |
--- a/hy/compiler.py | |
+++ b/hy/compiler.py | |
@@ -157,6 +157,19 @@ class HyASTCompiler(object): | |
return self._mangle_branch([branch]) | |
@builds("if") | |
+ def wraps_if_expression(self, expr): | |
+ return ast.Expr( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(if (if 1 2) 1) | |
Generates the tree | |
ast.stmt.If | |
`-> ast.stmt.If | |
`-> ast.expr.Num | |
`-> ast.expr.Num | |
`-> ast.expr.Num |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% git diff | |
diff --git a/ceilometer/storage/impl_mongodb.py b/ceilometer/storage/impl_mongodb.py | |
index 4580833..84bd8fc 100644 | |
--- a/ceilometer/storage/impl_mongodb.py | |
+++ b/ceilometer/storage/impl_mongodb.py | |
@@ -288,6 +288,8 @@ class Connection(base.Connection): | |
self.db.clear() | |
else: | |
self.conn.drop_database(self.db) | |
+ import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=> GET /v2/meter/instances/statistics?reset_on=metadata.vm_state | |
<= { | |
'off': [ { avg: ... max: ... start: '2013-07-01 00:00:00', end: '2013-07-01 00:59:59' }, | |
{ avg: ... max: ... start: '2013-07-01 03:00:00', end: '2013-07-01 03:59:59' }, | |
'on': [ { avg: ... max: ... start: '2013-07-01 01:00:00', end: '2013-07-01 01:59:59' } ], | |
'suspended': [ { avg: ... max: ... start: '2013-07-01 02:00:00', end: '2013-07-01 02:59:59' } ] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_engine(sql_connection, sqlite_fk=False, | |
mysql_traditional_mode=False): | |
return session.create_engine(sql_connection, | |
sqlite_fk, | |
mysql_traditional_mode, | |
idle_timeout=CONF.database.idle_timeout, | |
connection_debug=CONF.databse.connection_debug, | |
max_pool_size=CONF.database.max_pool_size, | |
max_overflow=CONF.database.max_overflow, | |
pool_timeout=CONF.database.pool_timeout, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python 2.7.6 (default, Dec 9 2013, 18:09:21) | |
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import base64 | |
>>> base64.b64decode('lol') | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/base64.py", line 76, in b64decode | |
raise TypeError(msg) | |
TypeError: Incorrect padding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Current | |
__TOOZ_GROUP_LIST = [ group list ] | |
_TOOZ_GROUP_<foo> = { "member": { "last_seen": <time>, "capabilities": "foobar" } } | |
create_group => WRITE,(READ,WRITE,RETRY) => O(1) | |
get_groups => READ => O(1) | |
join_group => (READ,WRITE,RETRY) => O(1) | |
leave_group => (READ,WRITE,RETRY) => O(1) | |
get_members => READ => O(1) |
I hereby claim:
- I am jd on github.
- I am jdanjou (https://keybase.io/jdanjou) on keybase.
- I have a public key whose fingerprint is 5361 BD40 015B 7438 2739 101A 611B A950 8B78 A5C2
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!/usr/bin/env python | |
from github import Github | |
USERNAME = "myusername" | |
PASSWORD = "mypassword" | |
USERS = ("openstack", "stackforge", "openstack-dev", "openstack-infra") | |
g = Github(USERNAME, PASSWORD) | |
me = g.get_user() |
OlderNewer