Fixed existing schemas

This commit is contained in:
Maxim Kulkin 2013-09-25 17:45:10 +04:00
parent 2dcae07cf1
commit ff2e9b4d98
8 changed files with 438 additions and 419 deletions

View File

@ -1,6 +1,6 @@
import sys
from ostack_validator.common import Inspection, Issue, MarkedIssue, Mark, Version, find, index
from ostack_validator.common import Issue, MarkedIssue, Mark, Version, find, index
class SchemaUpdateRecord(object):
# checkpoint's data is version number
@ -320,6 +320,8 @@ def validate_host_and_port(s, default_port=None):
return (host_address, port)
@type_validator('string')
@type_validator('list')
@type_validator('multi')
def validate_string(s):
return s
@ -344,6 +346,11 @@ def validate_integer(s, min=None, max=None):
return v
@type_validator('float')
def validate_integer(s):
# TODO: Implement proper validation
return float(s)
@type_validator('port')
def validate_port(s, min=1, max=65535):
return validate_integer(s, min=min, max=max)

View File

@ -1,2 +1,4 @@
import ostack_validator.schemas.keystone
import ostack_validator.schemas.nova
import ostack_validator.schemas.cinder

View File

@ -0,0 +1,2 @@
import ostack_validator.schemas.cinder.v2013_1_3

View File

@ -766,3 +766,5 @@ cinder.param('migration_create_volume_timeout_secs', type='integer', default='30
cinder.param('volume_dd_blocksize', type='string', default='1M', description="The default block size used when copying/clearing volumes")
cinder.commit()

View File

@ -0,0 +1,2 @@
import ostack_validator.schemas.keystone.v2013_1_3

View File

@ -8,17 +8,17 @@ keystone.section('DEFAULT')
keystone.param('admin_token', type='string', default='ADMIN', description="A 'shared secret' between keystone and other openstack services")
keystone.param('bind_host', type='string', default='0.0.0.0', description="The IP address of the network interface to listen on")
keystone.param('bind_host', type='host', default='0.0.0.0', description="The IP address of the network interface to listen on")
keystone.param('public_port', type='string', default='5000', description="The port number which the public service listens on")
keystone.param('public_port', type='port', default='5000', description="The port number which the public service listens on")
keystone.param('admin_port', type='string', default='35357', description="The port number which the public admin listens on")
keystone.param('admin_port', type='port', default='35357', description="The port number which the public admin listens on")
keystone.param('public_endpoint', type='string', default='http://localhost:%(public_port)s/', description="The base endpoint URLs for keystone that are advertised to clients (NOTE: this does NOT affect how keystone listens for connections)")
keystone.param('admin_endpoint', type='string', default='http://localhost:%(admin_port)s/', description="")
keystone.param('compute_port', type='string', default='8774', description="The port number which the OpenStack Compute service listens on")
keystone.param('compute_port', type='port', default='8774', description="The port number which the OpenStack Compute service listens on")
keystone.param('policy_file', type='string', default='policy.json', description="Path to your policy definition containing identity actions")
@ -30,19 +30,19 @@ keystone.param('member_role_name', type='string', default='_member_', descriptio
keystone.param('max_request_body_size', type='string', default='114688', description="enforced by optional sizelimit middleware (keystone.middleware:RequestBodySizeLimiter)")
keystone.param('max_param_size', type='string', default='64', description="limit the sizes of user & tenant ID/names")
keystone.param('max_param_size', type='integer', default=64, description="limit the sizes of user & tenant ID/names")
keystone.param('max_token_size', type='string', default='8192', description="similar to max_param_size, but provides an exception for token values")
keystone.param('max_token_size', type='integer', default=8192, description="similar to max_param_size, but provides an exception for token values")
keystone.param('debug', type='string', default='False', description="=== Logging Options === Print debugging output (includes plaintext request logging, potentially including passwords)")
keystone.param('debug', type='boolean', default=False, description="=== Logging Options === Print debugging output (includes plaintext request logging, potentially including passwords)")
keystone.param('verbose', type='string', default='False', description="Print more verbose output")
keystone.param('verbose', type='boolean', default=False, description="Print more verbose output")
keystone.param('log_file', type='string', default='keystone.log', description="Name of log file to output to. If not set, logging will go to stdout.")
keystone.param('log_dir', type='string', default='/var/log/keystone', description="The directory to keep log files in (will be prepended to --logfile)")
keystone.param('use_syslog', type='string', default='False', description="Use syslog for logging.")
keystone.param('use_syslog', type='boolean', default=False, description="Use syslog for logging.")
keystone.param('syslog_log_facility', type='string', default='LOG_USER', description="syslog facility to receive log lines")
@ -60,15 +60,15 @@ keystone.param('default_publisher_id', type='string', default='', description="D
keystone.param('rpc_backend', type='string', default='keystone.openstack.common.rpc.impl_kombu', description="The messaging module to use, defaults to kombu.")
keystone.param('rpc_thread_pool_size', type='string', default='64', description="Size of RPC thread pool")
keystone.param('rpc_thread_pool_size', type='integer', default=64, description="Size of RPC thread pool")
keystone.param('rpc_conn_pool_size', type='string', default='30', description="Size of RPC connection pool")
keystone.param('rpc_conn_pool_size', type='integer', default=30, description="Size of RPC connection pool")
keystone.param('rpc_response_timeout', type='string', default='60', description="Seconds to wait for a response from call or multicall")
keystone.param('rpc_response_timeout', type='integer', default=60, description="Seconds to wait for a response from call or multicall")
keystone.param('rpc_cast_timeout', type='string', default='30', description="Seconds to wait before a cast expires (TTL). Only supported by impl_zmq.")
keystone.param('rpc_cast_timeout', type='integer', default=30, description="Seconds to wait before a cast expires (TTL). Only supported by impl_zmq.")
keystone.param('fake_rabbit', type='string', default='False', description="If True, use a fake RabbitMQ provider")
keystone.param('fake_rabbit', type='boolean', default=False, description="If True, use a fake RabbitMQ provider")
keystone.param('control_exchange', type='string', default='openstack', description="AMQP exchange to connect to if using RabbitMQ or Qpid")
@ -76,7 +76,7 @@ keystone.section('sql')
keystone.param('connection', type='string', default='sqlite:///keystone.db', description="The SQLAlchemy connection string used to connect to the database")
keystone.param('idle_timeout', type='string', default='200', description="the timeout before idle sql connections are reaped")
keystone.param('idle_timeout', type='integer', default=200, description="the timeout before idle sql connections are reaped")
keystone.section('identity')
@ -84,11 +84,11 @@ keystone.param('driver', type='string', default='keystone.identity.backends.sql.
keystone.param('default_domain_id', type='string', default='default', description="This references the domain to use for all Identity API v2 requests (which are not aware of domains). A domain with this ID will be created for you by keystone-manage db_sync in migration 008. The domain referenced by this ID cannot be deleted on the v3 API, to prevent accidentally breaking the v2 API. There is nothing special about this domain, other than the fact that it must exist to order to maintain support for your v2 clients.")
keystone.param('domain_specific_drivers_enabled', type='or all) of domains can have their own identity driver, each with their own partial configuration file in a domain configuration directory. Only', default='False', description="A subset")
keystone.param('domain_specific_drivers_enabled', type='boolean', default=False, description="A subset (or all) of domains can have their own identity driver, each with their own partial configuration file in a domain configuration directory. Only")
keystone.param('domain_config_dir', type='string', default='/etc/keystone/domains', description="")
keystone.param('max_password_length', type='string', default='4096', description="Maximum supported length for user passwords; decrease to improve performance.")
keystone.param('max_password_length', type='integer', default=4096, description="Maximum supported length for user passwords; decrease to improve performance.")
keystone.section('credential')
@ -96,11 +96,11 @@ keystone.param('driver', type='string', default='keystone.credential.backends.sq
keystone.section('trust')
keystone.param('enabled', type='string', default='True', description="delegation and impersonation features can be optionally disabled")
keystone.param('enabled', type='boolean', default=True, description="delegation and impersonation features can be optionally disabled")
keystone.section('os_inherit')
keystone.param('enabled', type='string', default='False', description="role-assignment inheritance to projects from owning domain can be optionally enabled")
keystone.param('enabled', type='boolean', default=False, description="role-assignment inheritance to projects from owning domain can be optionally enabled")
keystone.section('catalog')
@ -114,7 +114,7 @@ keystone.section('endpoint_filter')
keystone.param('driver', type='string', default='keystone.contrib.endpoint_filter.backends.sql.EndpointFilter', description="extension for creating associations between project and endpoints in order to provide a tailored catalog for project-scoped token requests.")
keystone.param('return_all_endpoints_if_no_filter', type='string', default='True', description="")
keystone.param('return_all_endpoints_if_no_filter', type='boolean', default=True, description="")
keystone.section('token')
@ -122,21 +122,21 @@ keystone.param('driver', type='string', default='keystone.token.backends.sql.Tok
keystone.param('provider', type='string', default='', description="Controls the token construction, validation, and revocation operations. Core providers are keystone.token.providers.[pki|uuid].Provider")
keystone.param('expiration', type='string', default='86400', description="Amount of time a token should remain valid (in seconds)")
keystone.param('expiration', type='integer', default=86400, description="Amount of time a token should remain valid (in seconds)")
keystone.param('bind', type='string', default='', description="External auth mechanisms that should add bind information to token. eg kerberos, x509")
keystone.param('enforce_token_bind', type='string', default='permissive', description="Enforcement policy on tokens presented to keystone with bind information. One of disabled, permissive, strict, required or a specifically required bind mode e.g. kerberos or x509 to require binding to that authentication.")
keystone.param('caching', type='string', default='True', description="Token specific caching toggle. This has no effect unless the global caching option is set to True")
keystone.param('caching', type='boolean', default=True, description="Token specific caching toggle. This has no effect unless the global caching option is set to True")
keystone.param('cache_time', type='string', default='', description="Token specific cache time-to-live (TTL) in seconds.")
keystone.param('cache_time', type='integer', default=0, description="Token specific cache time-to-live (TTL) in seconds.")
keystone.param('revocation_cache_time', type='string', default='3600', description="Revocation-List specific cache time-to-live (TTL) in seconds.")
keystone.param('revocation_cache_time', type='integer', default=3600, description="Revocation-List specific cache time-to-live (TTL) in seconds.")
keystone.section('cache')
keystone.param('enabled', type='string', default='False', description="Global cache functionality toggle.")
keystone.param('enabled', type='boolean', default=False, description="Global cache functionality toggle.")
keystone.param('config_prefix', type='string', default='cache.keystone', description="Prefix for building the configuration dictionary for the cache region. This should not need to be changed unless there is another dogpile.cache region with the same configuration name")
@ -146,9 +146,9 @@ keystone.param('backend_argument', type='string', default='', description="Argum
keystone.param('proxies', type='string', default='', description="Proxy Classes to import that will affect the way the dogpile.cache backend functions. See the dogpile.cache documentation on changing-backend-behavior. Comma delimited list e.g. my.dogpile.proxy.Class, my.dogpile.proxyClass2")
keystone.param('use_key_mangler', type='string', default='True', description="Use a key-mangling function (sha1) to ensure fixed length cache-keys. This is toggle-able for debugging purposes, it is highly recommended to always leave this set to True.")
keystone.param('use_key_mangler', type='boolean', default=True, description="Use a key-mangling function (sha1) to ensure fixed length cache-keys. This is toggle-able for debugging purposes, it is highly recommended to always leave this set to True.")
keystone.param('debug_cache_backend', type='string', default='False', description="Extra debugging from the cache backend (cache keys, get/set/delete/etc calls) This is only really useful if you need to see the specific cache-backend get/set/delete calls with the keys/values. Typically this should be left set to False.")
keystone.param('debug_cache_backend', type='boolean', default=False, description="Extra debugging from the cache backend (cache keys, get/set/delete/etc calls) This is only really useful if you need to see the specific cache-backend get/set/delete calls with the keys/values. Typically this should be left set to False.")
keystone.section('policy')
@ -162,21 +162,21 @@ keystone.section('assignment')
keystone.param('driver', type='string', default='', description="")
keystone.param('caching', type='string', default='True', description="Assignment specific caching toggle. This has no effect unless the global caching option is set to True")
keystone.param('caching', type='boolean', default=True, description="Assignment specific caching toggle. This has no effect unless the global caching option is set to True")
keystone.param('cache_time', type='string', default='', description="Assignment specific cache time-to-live (TTL) in seconds.")
keystone.param('cache_time', type='integer', default=0, description="Assignment specific cache time-to-live (TTL) in seconds.")
keystone.section('oauth1')
keystone.param('driver', type='string', default='keystone.contrib.oauth1.backends.sql.OAuth1', description="")
keystone.param('request_token_duration', type='string', default='28800', description="The Identity service may include expire attributes. If no such attribute is included, then the token lasts indefinitely. Specify how quickly the request token will expire (in seconds)")
keystone.param('request_token_duration', type='integer', default=28800, description="The Identity service may include expire attributes. If no such attribute is included, then the token lasts indefinitely. Specify how quickly the request token will expire (in seconds)")
keystone.param('access_token_duration', type='string', default='86400', description="Specify how quickly the access token will expire (in seconds)")
keystone.param('access_token_duration', type='integer', default=86400, description="Specify how quickly the access token will expire (in seconds)")
keystone.section('ssl')
keystone.param('enable', type='string', default='True', description="")
keystone.param('enable', type='boolean', default=True, description="")
keystone.param('certfile', type='string', default='/etc/keystone/pki/certs/ssl_cert.pem', description="")
@ -186,11 +186,11 @@ keystone.param('ca_certs', type='string', default='/etc/keystone/pki/certs/cacer
keystone.param('ca_key', type='string', default='/etc/keystone/pki/private/cakey.pem', description="")
keystone.param('key_size', type='string', default='1024', description="")
keystone.param('key_size', type='integer', default=1024, description="")
keystone.param('valid_days', type='string', default='3650', description="")
keystone.param('valid_days', type='integer', default=3650, description="")
keystone.param('cert_required', type='string', default='False', description="")
keystone.param('cert_required', type='boolean', default=False, description="")
keystone.param('cert_subject', type='string', default='/CUS/STUnset/LUnset/OUnset/CNlocalhost', description="")
@ -206,9 +206,9 @@ keystone.param('ca_certs', type='string', default='/etc/keystone/pki/certs/cacer
keystone.param('ca_key', type='string', default='/etc/keystone/pki/private/cakey.pem', description="")
keystone.param('key_size', type='string', default='2048', description="")
keystone.param('key_size', type='boolean', default=2048, description="")
keystone.param('valid_days', type='string', default='3650', description="")
keystone.param('valid_days', type='boolean', default=3650, description="")
keystone.param('cert_subject', type='string', default='/CUS/STUnset/LUnset/OUnset/CNwww.example.com', description="")
@ -218,17 +218,17 @@ keystone.param('url', type='string', default='ldap://localhost', description="")
keystone.param('user', type='string', default='dcManager,dcexample,dccom', description="")
keystone.param('password', type='string', default='None', description="")
keystone.param('password', type='string', default=None, description="")
keystone.param('suffix', type='string', default='cnexample,cncom', description="")
keystone.param('use_dumb_member', type='string', default='False', description="")
keystone.param('use_dumb_member', type='boolean', default=False, description="")
keystone.param('allow_subtree_delete', type='string', default='False', description="")
keystone.param('allow_subtree_delete', type='boolean', default=False, description="")
keystone.param('dumb_member', type='string', default='cndumb,dcexample,dccom', description="")
keystone.param('page_size', type='string', default='0', description="Maximum results per page; a value of zero ('0') disables paging (default)")
keystone.param('page_size', type='integer', default=0, description="Maximum results per page; a value of zero ('0') disables paging (default)")
keystone.param('alias_dereferencing', type='string', default='default', description="The LDAP dereferencing option for queries. This can be either 'never', 'searching', 'always', 'finding' or 'default'. The 'default' option falls back to using default dereferencing configured by your ldap.conf.")
@ -252,19 +252,19 @@ keystone.param('user_pass_attribute', type='string', default='userPassword', des
keystone.param('user_enabled_attribute', type='string', default='enabled', description="")
keystone.param('user_enabled_mask', type='string', default='0', description="")
keystone.param('user_enabled_mask', type='integer', default=0, description="")
keystone.param('user_enabled_default', type='string', default='True', description="")
keystone.param('user_enabled_default', type='boolean', default=True, description="")
keystone.param('user_attribute_ignore', type='string', default='tenant_id,tenants', description="")
keystone.param('user_allow_create', type='string', default='True', description="")
keystone.param('user_allow_create', type='boolean', default=True, description="")
keystone.param('user_allow_update', type='string', default='True', description="")
keystone.param('user_allow_update', type='boolean', default=True, description="")
keystone.param('user_allow_delete', type='string', default='True', description="")
keystone.param('user_allow_delete', type='boolean', default=True, description="")
keystone.param('user_enabled_emulation', type='string', default='False', description="")
keystone.param('user_enabled_emulation', type='boolean', default=False, description="")
keystone.param('user_enabled_emulation_dn', type='string', default='', description="")
@ -288,13 +288,13 @@ keystone.param('tenant_enabled_attribute', type='string', default='enabled', des
keystone.param('tenant_attribute_ignore', type='string', default='', description="")
keystone.param('tenant_allow_create', type='string', default='True', description="")
keystone.param('tenant_allow_create', type='boolean', default=True, description="")
keystone.param('tenant_allow_update', type='string', default='True', description="")
keystone.param('tenant_allow_update', type='boolean', default=True, description="")
keystone.param('tenant_allow_delete', type='string', default='True', description="")
keystone.param('tenant_allow_delete', type='boolean', default=True, description="")
keystone.param('tenant_enabled_emulation', type='string', default='False', description="")
keystone.param('tenant_enabled_emulation', type='boolean', default=False, description="")
keystone.param('tenant_enabled_emulation_dn', type='string', default='', description="")
@ -312,11 +312,11 @@ keystone.param('role_member_attribute', type='string', default='roleOccupant', d
keystone.param('role_attribute_ignore', type='string', default='', description="")
keystone.param('role_allow_create', type='string', default='True', description="")
keystone.param('role_allow_create', type='boolean', default=True, description="")
keystone.param('role_allow_update', type='string', default='True', description="")
keystone.param('role_allow_update', type='boolean', default=True, description="")
keystone.param('role_allow_delete', type='string', default='True', description="")
keystone.param('role_allow_delete', type='boolean', default=True, description="")
keystone.param('group_tree_dn', type='string', default='', description="")
@ -334,13 +334,13 @@ keystone.param('group_desc_attribute', type='string', default='desc', descriptio
keystone.param('group_attribute_ignore', type='string', default='', description="")
keystone.param('group_allow_create', type='string', default='True', description="")
keystone.param('group_allow_create', type='boolean', default=True, description="")
keystone.param('group_allow_update', type='string', default='True', description="")
keystone.param('group_allow_update', type='boolean', default=True, description="")
keystone.param('group_allow_delete', type='string', default='True', description="")
keystone.param('group_allow_delete', type='boolean', default=True, description="")
keystone.param('use_tls', type='string', default='False', description="ldap TLS options if both tls_cacertfile and tls_cacertdir are set then tls_cacertfile will be used and tls_cacertdir is ignored valid options for tls_req_cert are demand, never, and allow")
keystone.param('use_tls', type='boolean', default=False, description="ldap TLS options if both tls_cacertfile and tls_cacertdir are set then tls_cacertfile will be used and tls_cacertdir is ignored valid options for tls_req_cert are demand, never, and allow")
keystone.param('tls_cacertfile', type='string', default='', description="")
@ -376,3 +376,5 @@ keystone.section('paste_deploy')
keystone.param('config_file', type='string', default='keystone-paste.ini', description="Name of the paste configuration file that defines the available pipelines")
keystone.commit()

View File

@ -1,3 +1,3 @@
import ostack_validator.schemas.nova.v2013_1
import ostack_validator.schemas.nova.v2013_1_3

File diff suppressed because it is too large Load Diff