"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "barbican/plugin/crypto/base.py" between
barbican-11.0.0.tar.gz and barbican-12.0.0.tar.gz

About: OpenStack Barbican is the OpenStack Key Manager service. It provides secure storage, provisioning and management of secret data.
The "Wallaby" series (latest release).

base.py  (barbican-11.0.0):base.py  (barbican-12.0.0)
skipping to change at line 16 skipping to change at line 16
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. # implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import abc import abc
import six
from barbican.common import exception from barbican.common import exception
from barbican import i18n as u from barbican import i18n as u
class CryptoPluginNotFound(exception.BarbicanException): class CryptoPluginNotFound(exception.BarbicanException):
"""Raised when no plugins are installed.""" """Raised when no plugins are installed."""
message = u._("Crypto plugin not found.") message = u._("Crypto plugin not found.")
class CryptoKEKBindingException(exception.BarbicanException): class CryptoKEKBindingException(exception.BarbicanException):
"""Raised when the bind_kek_metadata method from a plugin returns None.""" """Raised when the bind_kek_metadata method from a plugin returns None."""
def __init__(self, plugin_name=u._('Unknown')): def __init__(self, plugin_name=u._('Unknown')):
skipping to change at line 232 skipping to change at line 230
plugin, but in the future this may contain more information. plugin, but in the future this may contain more information.
.. attribute:: unencrypted .. attribute:: unencrypted
The secret data in Bytes to be encrypted by the plugin. The secret data in Bytes to be encrypted by the plugin.
""" """
def __init__(self, unencrypted): def __init__(self, unencrypted):
self.unencrypted = unencrypted self.unencrypted = unencrypted
@six.add_metaclass(abc.ABCMeta) class CryptoPluginBase(object, metaclass=abc.ABCMeta):
class CryptoPluginBase(object):
"""Base class for all Crypto plugins. """Base class for all Crypto plugins.
Barbican requests operations by invoking the methods on an instance of the Barbican requests operations by invoking the methods on an instance of the
implementing class. Barbican's plugin manager handles the life-cycle of implementing class. Barbican's plugin manager handles the life-cycle of
the Data Transfer Objects (DTOs) that are passed into these methods, and the Data Transfer Objects (DTOs) that are passed into these methods, and
persist the data that is assigned to these DTOs by the plugin. persist the data that is assigned to these DTOs by the plugin.
""" """
@abc.abstractmethod @abc.abstractmethod
def get_plugin_name(self): def get_plugin_name(self):
 End of changes. 2 change blocks. 
4 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)