Skip to content

Instantly share code, notes, and snippets.

View mgagne's full-sized avatar

Mathieu Gagné mgagne

View GitHub Profile
#SingleInstance force
#NoEnv
#Warn
SendMode Input
SetWorkingDir %A_ScriptDir%
; ! = ALT
; ^ = CTRL
; + = SHIFT
commit 4c668c47185f2ca2118c91cd016aa3723e679347
Author: Mathieu Gagné <[email protected]>
Date: Wed Jun 17 14:30:29 2015 -0400
Add support for scheduler_default_weights
Change-Id: I308bb2b9f9a171d6f72e875d29bc247058c99772
diff --git a/nova/conf/scheduler.py b/nova/conf/scheduler.py
index 6d6dcd0918..e4d46c2176 100644
@mgagne
mgagne / README.md
Last active June 28, 2018 17:19
Updating your main email in Gerrit

You need to add your new email to sites using the Ubuntu One OpenID provider first.

This could greatly simplify the transition as those sites might be able to associate your new email (OpenID Identity) to your existing account, avoiding duplicates.

1. Add your new email to Gerrit

@mgagne
mgagne / reserved_host_for_tenant_weigher.py
Last active May 1, 2018 14:27
Favor reserved host - Nova scheduler - Mitaka
from oslo_config import cfg
from nova.scheduler import weights
CONF = cfg.CONF
opts = [
cfg.FloatOpt('reserved_host_for_tenant_weight_multiplier',
default=1.0,
help='Multiplier used for reserved host. Negative '
@mgagne
mgagne / user_id.patch
Created April 30, 2018 17:49
Add user_id to RequestSpec
From 825af3f12d9e1e1dbefd4c09e2ad2022f7ca90a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mathieu=20Gagne=CC=81?= <[email protected]>
Date: Tue, 15 Aug 2017 16:52:25 -0400
Subject: [PATCH] Add user_id to RequestSpec
Change-Id: I3e174ae76931f8279540e92328c7c36a7bcaabc0
---
nova/objects/request_spec.py | 16 +++++++++++++---
nova/tests/unit/fake_request_spec.py | 1 +
nova/tests/unit/objects/test_objects.py | 2 +-
@mgagne
mgagne / aggregate_ram.py
Created April 30, 2018 16:29
RAM weigher for Nova - Mitaka
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
@mgagne
mgagne / aggregate_projects_isolation.py
Created April 30, 2018 16:26
Strict project isolation for Nova - Mitaka
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
@mgagne
mgagne / aggregate_image_os_type_isolation.py
Created April 30, 2018 16:25
Strict image isolation for Nova - Mitaka
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
{
"compute:attach_volume": "rule:os_compute_api:os-volumes-attachments:create",
"compute:confirm_resize": "rule:os_compute_api:servers:confirm_resize",
"compute:create": "rule:os_compute_api:servers:create",
"compute:delete": "rule:os_compute_api:servers:delete",
"compute:detach_volume": "rule:os_compute_api:os-volumes-attachments:delete",
"compute:reboot": "rule:os_compute_api:servers:reboot",
"compute:rebuild": "rule:os_compute_api:servers:rebuild",
"compute:resize": "rule:os_compute_api:servers:resize",
"compute:revert_resize": "rule:os_compute_api:servers:revert_resize",
commit 91bc0ed7d25dd6efeeb820ca7cbb1f2af3bd53ab (HEAD -> newton/placement-roles)
Author: Mathieu Gagné <[email protected]>
Date: Thu Nov 30 18:03:22 2017 -0500
Add ability to override roles allowed to query placement API
Change-Id: I37ac6964a5852aac129107e9be476785ea713fae
diff --git a/nova/api/openstack/placement/handler.py b/nova/api/openstack/placement/handler.py
index 7d41031e37..f1bf225540 100644