diff options
| author | Endi Sukma Dewata <edewata@redhat.com> | 2013-02-21 19:47:35 -0500 |
|---|---|---|
| committer | Endi Sukma Dewata <edewata@redhat.com> | 2013-03-07 17:51:32 -0500 |
| commit | c87a65024177ed67cd4ec0f7d533d973f8e1f971 (patch) | |
| tree | dcceb0a14d514c62773ee07a1fcb09e787dae6e4 /base/common/python/pki/system.py | |
| parent | b18a44db98f19c4d9b9d8d586d2bd1772a5d9f41 (diff) | |
| download | pki-c87a65024177ed67cd4ec0f7d533d973f8e1f971.tar.gz pki-c87a65024177ed67cd4ec0f7d533d973f8e1f971.tar.xz pki-c87a65024177ed67cd4ec0f7d533d973f8e1f971.zip | |
Added security domain info validation.
The installer script has been modified to validate security domain
info in both interactive and silent installation.
A basic Python API has been added to access the REST interface.
Ticket #473
Diffstat (limited to 'base/common/python/pki/system.py')
| -rw-r--r-- | base/common/python/pki/system.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/base/common/python/pki/system.py b/base/common/python/pki/system.py new file mode 100644 index 000000000..61ffbb9ff --- /dev/null +++ b/base/common/python/pki/system.py @@ -0,0 +1,38 @@ +#!/usr/bin/python +# Authors: +# Endi S. Dewata <edewata@redhat.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Copyright (C) 2013 Red Hat, Inc. +# All rights reserved. +# + +class SecurityDomainInfo: + + def __init__(self): + pass + +class SecurityDomainClient: + + def __init__(self, connection): + self.connection = connection + + def getSecurityDomainInfo(self): + r = self.connection.get('securityDomain/domainInfo') + + info = SecurityDomainInfo() + info.name = r.json['DomainInfo']['@id'] + + return info |
