Change-Id: Ied9ce8cd0d3c3537c34713ea26cc596914caca85
Signed-off-by: kongwei <kong.wei2@zte.com.cn>
12 files changed:
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# 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 osprofiler.notifier
import osprofiler.web
import osprofiler.notifier
import osprofiler.web
-from escalator.common import utils
from escalator.common import config
from escalator.common import config
-from escalator.common import exception
from escalator.common import wsgi
from escalator import notifier
from escalator.common import wsgi
from escalator import notifier
from oslo_log import log as logging
from oslo_utils import encodeutils
from oslo_utils import excutils
from oslo_log import log as logging
from oslo_utils import encodeutils
from oslo_utils import excutils
-from oslo_utils import netutils
-from oslo_utils import strutils
import six
from webob import exc
import six
from webob import exc
from escalator.common import exception
from escalator import i18n
from escalator.common import exception
from escalator import i18n
-# from providerclient.v1 import client as provider_client
- inter_ip = lambda x: '.'.join(
- [str(x / (256 ** i) % 256) for i in range(3, -1, -1)])
- return inter_ip(num)
+ s = []
+ for i in range(4):
+ s.append(str(num % 256))
+ num /= 256
+ return '.'.join(s[::-1])
def is_ip_in_cidr(ip, cidr):
def is_ip_in_cidr(ip, cidr):
translated_str = translated_str.\
replace(translated_mark, translated_marks[translated_mark])
return translated_str
translated_str = translated_str.\
replace(translated_mark, translated_marks[translated_mark])
return translated_str
class Server(object):
"""Server class to manage multiple WSGI sockets and applications.
class Server(object):
"""Server class to manage multiple WSGI sockets and applications.
-
- This class requires initialize_escalator_store set to True if
- escalator store needs to be initialized.
- def __init__(self, threads=1000, initialize_escalator_store=False):
+ def __init__(self, threads=1000):
os.umask(0o27) # ensure files are created with the correct privileges
self._logger = logging.getLogger("eventlet.wsgi.server")
self._wsgi_logger = loggers.WritableLogger(self._logger)
os.umask(0o27) # ensure files are created with the correct privileges
self._logger = logging.getLogger("eventlet.wsgi.server")
self._wsgi_logger = loggers.WritableLogger(self._logger)
self.children = set()
self.stale_children = set()
self.running = True
self.children = set()
self.stale_children = set()
self.running = True
- # NOTE(abhishek): Allows us to only re-initialize escalator_store when
- # the API's configuration reloads.
- self.initialize_escalator_store = initialize_escalator_store
self.pgid = os.getpid()
try:
# NOTE(flaper87): Make sure this process
self.pgid = os.getpid()
try:
# NOTE(flaper87): Make sure this process
"""
eventlet.wsgi.MAX_HEADER_LINE = CONF.max_header_line
self.configure_socket(old_conf, has_changed)
"""
eventlet.wsgi.MAX_HEADER_LINE = CONF.max_header_line
self.configure_socket(old_conf, has_changed)
- if self.initialize_escalator_store:
- initialize_escalator_store()
# License for the specific language governing permissions and limitations
# under the License.
# License for the specific language governing permissions and limitations
# under the License.
-from oslo_i18n import * # noqa
+from oslo_i18n import TranslatorFactory # noqa
_translators = TranslatorFactory(domain='escalator')
_translators = TranslatorFactory(domain='escalator')
from escalatorclient.openstack.common.apiclient import base
from escalatorclient.openstack.common.apiclient import base
-warnings.warn("The 'escalatorclient.common.base' module is deprecated post "
- "v.0.12.0. Use 'escalatorclient.openstack.common.apiclient.base' "
- "instead of this one.", DeprecationWarning)
+warnings.warn("The 'escalatorclient.common.base' module is deprecated",
+ DeprecationWarning)
'escalator, it is specified in paste '
'configuration file at '
'/etc/escalator/api-paste.ini and '
'escalator, it is specified in paste '
'configuration file at '
'/etc/escalator/api-paste.ini and '
- '/etc/escalator/registry-paste.ini. Without key '
+ '/etc/escalator/registry-paste.ini. '
+ 'Without key '
'the profiling will not be triggered even '
'if osprofiler is enabled on server side.')
'the profiling will not be triggered even '
'if osprofiler is enabled on server side.')
import copy
import functools
import copy
import functools
-import pprint
-import os
-import json
-
from oslo_utils import encodeutils
from oslo_utils import strutils
import escalatorclient.v1.versions
from oslo_utils import encodeutils
from oslo_utils import strutils
import escalatorclient.v1.versions
# limitations under the License.
import datetime
# limitations under the License.
import datetime
try:
__import__('imp').find_module('sphinx.ext.numfig')
try:
__import__('imp').find_module('sphinx.ext.numfig')
pdf_documents = [('index', u'OPNFV', u'OPNFV Project', u'OPNFV')]
pdf_fit_mode = "shrink"
pdf_documents = [('index', u'OPNFV', u'OPNFV Project', u'OPNFV')]
pdf_fit_mode = "shrink"
-pdf_stylesheets = ['sphinx','kerning','a4']
-#latex_domain_indices = False
-#latex_use_modindex = False
+pdf_stylesheets = ['sphinx', 'kerning', 'a4']
latex_elements = {
'printindex': '',
latex_elements = {
'printindex': '',
try:
__import__('imp').find_module('sphinx.ext.numfig')
try:
__import__('imp').find_module('sphinx.ext.numfig')
pdf_documents = [('index', u'OPNFV', u'OPNFV Project', u'OPNFV')]
pdf_fit_mode = "shrink"
pdf_documents = [('index', u'OPNFV', u'OPNFV Project', u'OPNFV')]
pdf_fit_mode = "shrink"
-pdf_stylesheets = ['sphinx','kerning','a4']
-#latex_domain_indices = False
-#latex_use_modindex = False
+pdf_stylesheets = ['sphinx', 'kerning', 'a4']
latex_elements = {
'printindex': '',
latex_elements = {
'printindex': '',
# limitations under the License.
import datetime
# limitations under the License.
import datetime
try:
__import__('imp').find_module('sphinx.ext.numfig')
try:
__import__('imp').find_module('sphinx.ext.numfig')
pdf_documents = [('index', u'OPNFV', u'OPNFV Project', u'OPNFV')]
pdf_fit_mode = "shrink"
pdf_documents = [('index', u'OPNFV', u'OPNFV Project', u'OPNFV')]
pdf_fit_mode = "shrink"
-pdf_stylesheets = ['sphinx','kerning','a4']
-#latex_domain_indices = False
-#latex_use_modindex = False
+pdf_stylesheets = ['sphinx', 'kerning', 'a4']
latex_elements = {
'printindex': '',
latex_elements = {
'printindex': '',
# limitations under the License.
import datetime
# limitations under the License.
import datetime
try:
__import__('imp').find_module('sphinx.ext.numfig')
try:
__import__('imp').find_module('sphinx.ext.numfig')
pdf_documents = [('index', u'OPNFV', u'OPNFV Project', u'OPNFV')]
pdf_fit_mode = "shrink"
pdf_documents = [('index', u'OPNFV', u'OPNFV Project', u'OPNFV')]
pdf_fit_mode = "shrink"
-pdf_stylesheets = ['sphinx','kerning','a4']
-#latex_domain_indices = False
-#latex_use_modindex = False
+pdf_stylesheets = ['sphinx', 'kerning', 'a4']
latex_elements = {
'printindex': '',
latex_elements = {
'printindex': '',