summaryrefslogtreecommitdiffstats
path: root/ipa_server
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2008-10-22 17:54:04 -0400
committerRob Crittenden <rcritten@redhat.com>2008-10-22 17:54:04 -0400
commit1daf319a19f902d7c7bef37af065cac81be9189e (patch)
tree5d840adb9273b7fa0569477fdf2be68d351d0d69 /ipa_server
parentf189b02996668e5d600f1abed675cb20cd72290f (diff)
downloadfreeipa-1daf319a19f902d7c7bef37af065cac81be9189e.tar.gz
freeipa-1daf319a19f902d7c7bef37af065cac81be9189e.tar.xz
freeipa-1daf319a19f902d7c7bef37af065cac81be9189e.zip
Implement the host commands
In order for this to work against a v1 database the update host.update needs to be applied
Diffstat (limited to 'ipa_server')
-rw-r--r--ipa_server/plugins/b_ldap.py10
-rw-r--r--ipa_server/updates/host.update22
2 files changed, 32 insertions, 0 deletions
diff --git a/ipa_server/plugins/b_ldap.py b/ipa_server/plugins/b_ldap.py
index a07e8e710..2e9c9e9fd 100644
--- a/ipa_server/plugins/b_ldap.py
+++ b/ipa_server/plugins/b_ldap.py
@@ -70,6 +70,16 @@ class ldap(CrudBackend):
self.api.env.basedn,
)
+ def make_host_dn(self, hostname):
+ """
+ Construct host dn from hostname
+ """
+ return 'cn=%s,%s,%s' % (
+ self.dn.escape_dn_chars(hostname),
+ self.api.env.container_host,
+ self.api.env.basedn,
+ )
+
def get_object_type(self, attribute):
"""
Based on attribute, make an educated guess as to the type of
diff --git a/ipa_server/updates/host.update b/ipa_server/updates/host.update
new file mode 100644
index 000000000..dfc9723cf
--- /dev/null
+++ b/ipa_server/updates/host.update
@@ -0,0 +1,22 @@
+#
+# Schema for IPA Hosts
+#
+dn: cn=schema
+add: attributeTypes:
+ ( 2.16.840.1.113730.3.8.3.10 NAME 'ipaClientVersion'
+ DESC 'Text string describing client version of the IPA software installed'
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
+ X-ORIGIN 'IPA v2' )
+
+add: attributeTypes:
+ ( 2.16.840.1.113730.3.8.3.11 NAME 'enrolledBy'
+ DESC 'DN of administrator who performed manual enrollment of the host'
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.12
+ X-ORIGIN 'IPA v2' )
+add: objectClasses:
+ ( 2.16.840.1.113730.3.8.4.2 NAME 'ipaHost'
+ AUXILIARY
+ MAY ( userPassword $ ipaClientVersion $ enrolledBy)
+ X-ORIGIN 'IPA v2' )
+
+