PyKMIP - Release v0.0.1
This changes adds the final modifications needed for release v0.0.1 of the PyKMIP library. Packaging and licensing files are updated with current information and some minor file restructuring is done to ensure test suite integrity.
This commit is contained in:
parent
1cb6deaf0b
commit
f0e3c26170
@ -1,2 +1,3 @@
|
||||
Nathan Reller <Nathan.Reller@jhuapl.edu>
|
||||
Peter Hamilton <peter.hamilton@jhuapl.edu>
|
||||
Kaitlin Farr <kaitlin.farr@jhuapl.edu>
|
1
CHANGES.txt
Normal file
1
CHANGES.txt
Normal file
@ -0,0 +1 @@
|
||||
v0.0.1, August 12 2014 -- Initial release.
|
4
MANIFEST.in
Normal file
4
MANIFEST.in
Normal file
@ -0,0 +1,4 @@
|
||||
include AUTHORS.txt CHANGES.txt LICENSE.txt README.txt
|
||||
global-include logconfig.ini
|
||||
recursive-include bin run_server.sh
|
||||
recursive-include kmip *.py
|
46
README.txt
Normal file
46
README.txt
Normal file
@ -0,0 +1,46 @@
|
||||
======
|
||||
PyKMIP
|
||||
======
|
||||
|
||||
PyKMIP is a Python implementation of the Key Management Interoperability
|
||||
Protocol (KMIP) specification, supporting version 1.1 of the KMIP standard.
|
||||
The library currently provides a KMIP client, which supports the following
|
||||
operations for KMIP SymmetricKey managed objects:
|
||||
|
||||
* create
|
||||
* register
|
||||
* get
|
||||
* destroy
|
||||
|
||||
PyKMIP also provides a software-based KMIP server, which is intended for use
|
||||
in testing and demonstration environments. The server is NOT intended to be
|
||||
a substitute for secured hardware-based KMIP appliances.
|
||||
|
||||
Version
|
||||
=======
|
||||
This distribution of PyKMIP is version 0.0.1. Future work includes adding
|
||||
support for basic KMIP profiles, including the basic supporting operations.
|
||||
|
||||
For more information on KMIP profiles, see the `OASIS documentation for
|
||||
KMIP profiles
|
||||
<http://docs.oasis-open.org/kmip/profiles/v1.1/os/kmip-profiles-v1.1-os.html>`_.
|
||||
|
||||
Platform
|
||||
========
|
||||
PyKMIP has been tested and runs on Ubuntu 12.04 LTS.
|
||||
|
||||
References
|
||||
==========
|
||||
|
||||
For more information on the KMIP specification, see the `OASIS documentation
|
||||
for KMIP
|
||||
<http://docs.oasis-open.org/kmip/spec/v1.1/os/kmip-spec-v1.1-os.html>`_.
|
||||
|
||||
Contributors
|
||||
============
|
||||
|
||||
Many thanks to the developers who created PyKMIP:
|
||||
|
||||
Nathan Reller <nathan.reller@jhuapl.edu>
|
||||
Peter Hamilton <peter.hamilton@jhuapl.edu>
|
||||
Kaitlin Farr <kaitlin.farr@jhuapl.edu>
|
@ -2,5 +2,5 @@
|
||||
|
||||
set -eu
|
||||
|
||||
python run_server.py
|
||||
python ../kmip/demos/server.py
|
||||
|
||||
|
@ -54,4 +54,4 @@ else:
|
||||
else:
|
||||
logging.basicConfig()
|
||||
|
||||
__all__ = ['test', 'transport']
|
||||
__all__ = ['core', 'demos', 'services']
|
||||
|
@ -13,5 +13,4 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
__all__ = ['attributes', 'enums', 'errors', 'messages', 'objects',
|
||||
'primitives', 'protocol', 'utils']
|
||||
__all__ = ['factories', 'messages', 'repo']
|
||||
|
@ -61,8 +61,7 @@ class TestKMIPClient(TestCase):
|
||||
|
||||
# Set up the KMIP server process
|
||||
path = os.path.join(os.path.dirname(__file__), os.path.pardir,
|
||||
os.path.pardir, os.path.pardir, 'bin',
|
||||
'run_server.py')
|
||||
'utils', 'server.py')
|
||||
self.server = Popen(['python', '{0}'.format(path), '-p',
|
||||
'{0}'.format(self.KMIP_PORT)], stderr=sys.stdout)
|
||||
|
||||
|
0
kmip/tests/utils/__init__.py
Normal file
0
kmip/tests/utils/__init__.py
Normal file
70
kmip/tests/utils/server.py
Normal file
70
kmip/tests/utils/server.py
Normal file
@ -0,0 +1,70 @@
|
||||
# Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory
|
||||
# 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
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import optparse
|
||||
import sys
|
||||
|
||||
from thrift.server import TServer
|
||||
from thrift.transport import TSocket
|
||||
from thrift.transport import TTransport
|
||||
|
||||
from kmip.core.server import KMIPImpl
|
||||
|
||||
from kmip.services.kmip_protocol import KMIPProtocolFactory
|
||||
from kmip.services.kmip_server import Processor
|
||||
|
||||
|
||||
def run_server(host='127.0.0.1', port=5696):
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
handler = KMIPImpl()
|
||||
processor = Processor(handler)
|
||||
transport = TSocket.TServerSocket(host, port)
|
||||
tfactory = TTransport.TBufferedTransportFactory()
|
||||
pfactory = KMIPProtocolFactory()
|
||||
server = TServer.TSimpleServer(processor, transport, tfactory, pfactory)
|
||||
|
||||
logger.info('Starting the KMIP server')
|
||||
|
||||
try:
|
||||
server.serve()
|
||||
except KeyboardInterrupt:
|
||||
logger.info('KeyboardInterrupt received while serving')
|
||||
except Exception, e:
|
||||
logger.info('Exception received while serving: {0}'.format(e))
|
||||
finally:
|
||||
transport.close()
|
||||
|
||||
logger.info('Shutting down KMIP server')
|
||||
|
||||
|
||||
def build_cli_parser():
|
||||
parser = optparse.OptionParser(usage="%prog [options]",
|
||||
description="Run KMIP Server")
|
||||
parser.add_option("-n", "--hostname", action="store", default='127.0.0.1',
|
||||
dest="hostname",
|
||||
help="Hostname/IP address of platform running the KMIP "
|
||||
"server (e.g., localhost, 127.0.0.1)")
|
||||
parser.add_option("-p", "--port", action="store", default=5696,
|
||||
dest="port", help="Port number for KMIP services")
|
||||
return parser
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = build_cli_parser()
|
||||
|
||||
opts, args = parser.parse_args(sys.argv[1:])
|
||||
|
||||
run_server(opts.hostname, opts.port)
|
3
setup.py
3
setup.py
@ -22,9 +22,10 @@ setuptools.setup(
|
||||
keywords='KMIP',
|
||||
author='Peter Hamilton',
|
||||
author_email='peter.hamilton@jhuapl.edu',
|
||||
url='http://www.jhuapl.edu',
|
||||
url='https://github.com/OpenKMIP/PyKMIP',
|
||||
license='Apache License, Version 2.0',
|
||||
packages=setuptools.find_packages(exclude=["kmip.tests", "kmip.tests.*"]),
|
||||
package_data={'kmip': ['logconfig.ini']},
|
||||
classifiers=[
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
|
Loading…
Reference in New Issue
Block a user