Skip to content

Instantly share code, notes, and snippets.

@misterdorm
misterdorm / nova name uniqueness (juno).patch
Last active August 29, 2015 14:26
Patch against Juno to implement regex instance name checks and name-uniqueness checks against an LDAP directory. Referenced in this Atlanta summit talk: https://www.openstack.org/summit/openstack-summit-atlanta-2014/session-videos/presentation/integrating-openstack-with-active-directory-because-ad-ldap / https://docs.google.com/presentation/d/19…
diff -r -u -x .git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
--- a/nova/api/openstack/compute/servers.py 2015-08-06 21:13:56.000000000 -0600
+++ b/nova/api/openstack/compute/servers.py 2015-08-06 21:09:55.000000000 -0600
@@ -17,6 +17,7 @@
import base64
import os
import re
+import ldap
from oslo.config import cfg
users:
- name: mdorman
lock_passwd: false
- default
disable_root: 1
ssh_pwauth: 1
locale_configfile: /etc/sysconfig/i18n
mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2']