zaqar/marconi/common/access.py
Alejandro Cabrera 53c386af68 feat: split proxy API into admin and public apps
Rationale: when deploying the proxy, operators should be the only ones
that have access to the administrative functionality - primarily, the
management of partitions. This split makes it possible to deploy the
forwarding portion of the proxy independently of the administrative
portion.

The appropriate changes in tests, setup.cfg, and configuration files
(see: I7cf25e47ecff47934b50c21000b31308e1a4c8a9) were made.

Certain helpers that are reused for wsgi transport implementations
were extracted to a common location to aid reuse.

Unit tests were also simplified for the proxy, with the intent to make
them more thorough in coming patches.

New test requirement: httpretty
- used to perform request mocking during proxy transport unit tests

Change-Id: Ia26981a78c477a896370c48768e71f45c364c769
Implements: blueprint placement-service
2013-10-01 17:31:40 -04:00

22 lines
763 B
Python

# Copyright (c) 2013 Rackspace, Inc.
#
# 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.
# TODO(cpp-cabrera): port to enum34 when that becomes available
class Access(object):
"""An enumeration to represent access levels for APIs."""
public = 1
admin = 2