Rename capabilities to traits

This commit is contained in:
Jay Pipes
2016-09-19 11:00:02 -04:00
parent 7d2a583f32
commit d5ab376e0a
7 changed files with 29 additions and 29 deletions

View File

@@ -1,39 +1,39 @@
=============== ===============
os-capabilities os-traits
=============== ===============
A library containing standardized capability strings. A library containing standardized trait strings.
Capabilities are strings that represent a feature of some resource provider. Traits are strings that represent a feature of some resource provider. This
This library contains the catalog of constants that have been standardized in library contains the catalog of constants that have been standardized in the
the OpenStack community to refer to a particular hardware, virtualization, OpenStack community to refer to a particular hardware, virtualization, storage,
storage, network, or device capability. network, or device trait.
* Free software: Apache license * Free software: Apache license
* Documentation: http://docs.openstack.org/developer/os-capabilities * Documentation: http://docs.openstack.org/developer/os-traits
* Source: http://git.openstack.org/cgit/openstack/os-capabilities * Source: http://git.openstack.org/cgit/openstack/os-traits
* Bugs: http://bugs.launchpad.net/os-capabilities * Bugs: http://bugs.launchpad.net/os-traits
Usage Usage
------ ------
`os-capabilities` is primarily composed of a set of constants that may be `os-traits` is primarily composed of a set of constants that may be referenced
referenced by simply importing the os_capabilities module and referencing one by simply importing the os_traits module and referencing one of the module's
of the module's capabilities constants:: traits constants::
$ python $ python
Python 2.7.11+ (default, Apr 17 2016, 14:00:29) Python 2.7.11+ (default, Apr 17 2016, 14:00:29)
[GCC 5.3.1 20160413] on linux2 [GCC 5.3.1 20160413] on linux2
Type "help", "copyright", "credits" or "license" for more information. Type "help", "copyright", "credits" or "license" for more information.
>>> import os_capabilities as os_caps >>> import os_traits as ot
>>> print os_caps.HW_CPU_X86_SSE42 >>> print ot.HW_CPU_X86_SSE42
hw:cpu:x86:sse42 hw:cpu:x86:sse42
Don't know what the symbol names are for the `os_capabilities` module? There's Don't know what the symbol names are for the `os_traits` module? There's a
a helper method for that:: helper method for that::
>>> import pprint >>> import pprint
>>> pprint.pprint(os_caps.get_symbol_names()) >>> pprint.pprint(ot.get_symbol_names())
[... [...
<snip> <snip>
'HW_CPU_X86_AVX2', 'HW_CPU_X86_AVX2',
@@ -58,9 +58,9 @@ a helper method for that::
'HW_CPU_X86_ABM', 'HW_CPU_X86_ABM',
'HW_CPU_X86_3DNOW'] 'HW_CPU_X86_3DNOW']
Want to see the capability strings for a subset of capabilities? There's a method for that too:: Want to see the trait strings for a subset of traits? There's a method for that too::
>>> pprint.pprint(os_caps.get_capabilities(os_caps.NAMESPACES['x86'])) >>> pprint.pprint(ot.get_traits(ot.NAMESPACES['x86']))
['hw:cpu:x86:aes-ni', ['hw:cpu:x86:aes-ni',
'hw:cpu:x86:avx512er', 'hw:cpu:x86:avx512er',
'hw:cpu:x86:avx512cd', 'hw:cpu:x86:avx512cd',

View File

@@ -1,6 +1,6 @@
[metadata] [metadata]
name = os-capabilities name = os-traits
summary = A library containing standardized capability strings summary = A library containing standardized trait strings
description-file = description-file =
README.rst README.rst
author = OpenStack author = OpenStack
@@ -21,7 +21,7 @@ classifier =
[files] [files]
packages = packages =
os_capabilities os_traits
[build_sphinx] [build_sphinx]
source-dir = doc/source source-dir = doc/source
@@ -32,18 +32,18 @@ all_files = 1
upload-dir = doc/build/html upload-dir = doc/build/html
[compile_catalog] [compile_catalog]
directory = os_capabilities/locale directory = os_traits/locale
domain = os_capabilities domain = os_traits
[update_catalog] [update_catalog]
domain = os_capabilities domain = os_traits
output_dir = os_capabilities/locale output_dir = os_traits/locale
input_file = os_capabilities/locale/os_capabilities.pot input_file = os_traits/locale/os_traits.pot
[extract_messages] [extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg mapping_file = babel.cfg
output_file = os_capabilities/locale/os_capabilities.pot output_file = os_traits/locale/os_traits.pot
[build_releasenotes] [build_releasenotes]
all_files = 1 all_files = 1