class TLSSecurityPolicy(resource2.Resource): resource_key = "tls_security_policy" resources_key = "tls_security_policies" service = mvna_service.MVNAService("v1.0") base_path = '/' + service.version + '/tls_security_policies' _query_mapping = base.MVNAQueryParameters( "id", "name", "description", "default", ) # Capabilities allow_list = True allow_get = True allow_create = False allow_update = False allow_delete = False patch_update = False # Properties #: It identifies connection resource uniquely id = resource2.Body('id') #: Name of tls security policy name = resource2.Body('name') #: Description of tls security policy description = resource2.Body('description') #: Default of tls security policy default = resource2.Body('default') #: TLS protocols of tls security policy tls_protocols = resource2.Body('tls_protocols') #: Cipher suites of tls security policy cipher_suites = resource2.Body('cipher_suites')
class Rule(base.MVNABaseResource): resource_key = "rule" resources_key = "rules" service = mvna_service.MVNAService("v1.0") base_path = '/' + service.version + '/rules' _query_mapping = base.MVNAQueryParameters( "id", "name", "description", "configuration_status", "operation_status", "priority", "target_group_id", "policy_id", "load_balancer_id", "tenant_id" ) # Capabilities allow_list = True allow_get = True allow_create = True allow_update = True allow_delete = True patch_update = True # Properties #: It identifies connection resource uniquely id = resource2.Body('id') #: Name of rule name = resource2.Body('name') #: Description of rule description = resource2.Body('description') #: Tags of rule tags = resource2.Body('tags') #: Configuration status of rule configuration_status = resource2.Body('configuration_status') #: Operation status of rule operation_status = resource2.Body('operation_status') #: Priority of rule priority = resource2.Body('priority') #: Target group ID of rule target_group_id = resource2.Body('target_group_id') #: Policy ID of rule policy_id = resource2.Body('policy_id') #: Load balancer ID of rule load_balancer_id = resource2.Body('load_balancer_id') #: Tenant ID of rule tenant_id = resource2.Body('tenant_id') #: Conditions of rule conditions = resource2.Body('conditions') #: Current configuration of rule current = resource2.Body('current') #: Staged configuration of rule staged = resource2.Body('staged')
class Listener(base.MVNABaseResource): resource_key = "listener" resources_key = "listeners" service = mvna_service.MVNAService("v1.0") base_path = '/' + service.version + '/listeners' _query_mapping = base.MVNAQueryParameters( "id", "name", "description", "configuration_status", "operation_status", "ip_address", "port", "protocol", "load_balancer_id", "tenant_id" ) # Capabilities allow_list = True allow_get = True allow_create = True allow_update = True allow_delete = True patch_update = True # Properties #: It identifies connection resource uniquely id = resource2.Body('id') #: Name of listener name = resource2.Body('name') #: Description of listener description = resource2.Body('description') #: Tags of listener tags = resource2.Body('tags') #: Configuration status of listener configuration_status = resource2.Body('configuration_status') #: Operation status of listener operation_status = resource2.Body('operation_status') #: IP Address of listener ip_address = resource2.Body('ip_address') #: Port of listener port = resource2.Body('port') #: Protocol of listener protocol = resource2.Body('protocol') #: Load balancer ID of listener load_balancer_id = resource2.Body('load_balancer_id') #: Tenant ID of listener tenant_id = resource2.Body('tenant_id') #: Current configuration of listener current = resource2.Body('current') #: Staged configuration of listener staged = resource2.Body('staged')
def __init__(self, plugins=None): """User preference for each service. :param list plugins: List of entry point namespaces to load. Create a new :class:`~ecl.profile.Profile` object with no preferences defined, but knowledge of the services. Services are identified by their service type, e.g.: 'identity', 'compute', etc. """ self._services = {} self._add_service(compute_service.ComputeService(version="v2")) self._add_service( connectivity_service.ConnectivityService(version="v1")) self._add_service(identity_service.IdentityService(version="v3")) self._add_service(image_service.ImageService(version="v2")) self._add_service(network_service.NetworkService(version="v2")) self._add_service(sss_service.SssService(version="v1")) self._add_service( orchestration_service.OrchestrationService(version="v1")) self._add_service( provider_connectivity_service.ProviderConnectivityService( version="v2")) self._add_service(telemetry_service.TelemetryService(version="v2")) self._add_service(block_store_service.BlockStoreService(version="v2")) self._add_service(storage_service.StorageService(version="v1")) self._add_service( security_order_service.SecurityOrderService(version="v2")) self._add_service( security_portal_service.SecurityPortalService(version="v2")) ## This section will be deleted if MSS v1 API is not available self._add_service( security_order_service_v1.SecurityOrderService(version="v1")) self._add_service( security_portal_service_v1.SecurityPortalService(version="v1")) ## end of the section self._add_service(rca_service.RcaService(version="v1")) self._add_service(baremetal_service.BaremetalService(version="v2")) self._add_service( dedicated_hypervisor_service.DedicatedHypervisorService( version="v1")) self._add_service(dns_service.DnsService(version="v2")) self._add_service( virtual_network_appliance_service.VirtualNetworkApplianceService( version="v1")) self._add_service(mvna_service.MVNAService(version="v1")) # NOTE: The Metric service is not added here as it currently # only retrieves the /capabilities API. if plugins: for plugin in plugins: self._load_plugin(plugin) self.service_keys = sorted(self._services.keys())
class Route(base.MVNABaseResource): resource_key = "route" resources_key = "routes" service = mvna_service.MVNAService("v1.0") base_path = '/' + service.version + '/routes' _query_mapping = base.MVNAQueryParameters( "id", "name", "description", "configuration_status", "operation_status", "destination_cidr", "next_hop_ip_address", "load_balancer_id", "tenant_id" ) # Capabilities allow_list = True allow_get = True allow_create = True allow_update = True allow_delete = True patch_update = True # Properties #: It identifies connection resource uniquely id = resource2.Body('id') #: Name of route name = resource2.Body('name') #: Description of route description = resource2.Body('description') #: Tags of route tags = resource2.Body('tags') #: Configuration status of route configuration_status = resource2.Body('configuration_status') #: Operation status of route operation_status = resource2.Body('operation_status') #: Destination cidr of route destination_cidr = resource2.Body('destination_cidr') #: Next hop ip address of route next_hop_ip_address = resource2.Body('next_hop_ip_address') #: Load balancer ID of route load_balancer_id = resource2.Body('load_balancer_id') #: Tenant ID of route tenant_id = resource2.Body('tenant_id') #: Current configuration of route current = resource2.Body('current') #: Staged configuration of route staged = resource2.Body('staged')
class TargetGroup(base.MVNABaseResource): resource_key = "target_group" resources_key = "target_groups" service = mvna_service.MVNAService("v1.0") base_path = '/' + service.version + '/target_groups' _query_mapping = base.MVNAQueryParameters( "id", "name", "description", "configuration_status", "operation_status", "load_balancer_id", "tenant_id" ) # Capabilities allow_list = True allow_get = True allow_create = True allow_update = True allow_delete = True patch_update = True # Properties #: It identifies connection resource uniquely id = resource2.Body('id') #: Name of target group name = resource2.Body('name') #: Description of target group description = resource2.Body('description') #: Tags of target group tags = resource2.Body('tags') #: Configuration status of target group configuration_status = resource2.Body('configuration_status') #: Operation status of target group operation_status = resource2.Body('operation_status') #: Load balancer ID of target group load_balancer_id = resource2.Body('load_balancer_id') #: Tenant ID of target group tenant_id = resource2.Body('tenant_id') #: Members of target group members = resource2.Body('members') #: Current of target group current = resource2.Body('current') #: Staged of target group staged = resource2.Body('staged')
class Certificate(resource2.Resource): resource_key = "certificate" resources_key = "certificates" service = mvna_service.MVNAService("v1.0") base_path = '/' + service.version + '/certificates' _query_mapping = base.MVNAQueryParameters("id", "name", "description", "tenant_id", "ca_cert_status", "ssl_key_status", "ssl_cert_status") # Capabilities allow_list = True allow_get = True allow_create = True allow_update = True allow_delete = True patch_update = True # Properties #: It identifies connection resource uniquely id = resource2.Body('id') #: Name of certificate name = resource2.Body('name') #: Description of certificate description = resource2.Body('description') #: Tags of certificate tags = resource2.Body('tags') #: Tenant ID tenant_id = resource2.Body('tenant_id') #: SSL Key ssl_key = resource2.Body('ssl_key') #: SSL Cert ssl_cert = resource2.Body('ssl_cert') #: Ca Cert ca_cert = resource2.Body('ca_cert') def upload(self, session, resource_id, **body): uri = self.base_path + '/%s/files' % resource_id resp = session.post(uri, endpoint_filter=self.service, json=body) self._translate_response(resp, has_body=False) return self
class Operation(resource2.Resource): resource_key = "operation" resources_key = "operations" service = mvna_service.MVNAService("v1.0") base_path = '/' + service.version + '/operations' _query_mapping = base.MVNAQueryParameters("id", "resource_id", "resource_type", "request_id", "request_type", "status", "tenant_id", "no_deleted", "latest") # Capabilities allow_list = True allow_get = True # Properties #: ID of network appliance's operation id = resource2.Body('id') #: Target load balancer id of operation. resource_id = resource2.Body('resource_id') #: resource type of operation. resource_type = resource2.Body('resource_type') #: Request ID of operation. request_id = resource2.Body('request_id') #: A string representation of the request type. request_types = resource2.Body('request_types') #: Request body(JSON String) of operation. request_body = resource2.Body('request_body') #: Status of operation. status = resource2.Body('status') #: Reception datetime of operation. reception_datetime = resource2.Body('reception_datetime') #: Commit datetime of operation. commit_datetime = resource2.Body('commit_datetime') #: Warning of operation. warning = resource2.Body('warning') #: Error of operation. error = resource2.Body('error') #: Tenant ID of operation. tenant_id = resource2.Body('tenant_id')
class Maintenance(resource2.Resource): resource_key = "maintenance" resources_key = "maintenances" service = mvna_service.MVNAService("v1.0") base_path = '/' + service.version + '/maintenances' _query_mapping = base.MVNAQueryParameters("id", "name", "description", "href", "current_revision", "next_revision", "applicable", "latest") # Capabilities allow_list = True allow_get = True allow_create = False allow_update = False allow_delete = False patch_update = False # Properties #: It identifies connection resource uniquely id = resource2.Body('id') #: Name of maintenance name = resource2.Body('name') #: Description of maintenance description = resource2.Body('description') #: href of maintenance href = resource2.Body('href') #: Publish datetime of maintenance publish_datetime = resource2.Body('publish_datetime') #: Limit datetime of maintenance limit_datetime = resource2.Body('limit_datetime') #: Current revision of maintenance current_revision = resource2.Body('current_revision') #: Next revision of maintenance next_revision = resource2.Body('next_revision') #: Applicable of maintenance applicable = resource2.Body('applicable')
class Plan(resource2.Resource): resource_key = "plan" resources_key = "plans" service = mvna_service.MVNAService("v1.0") base_path = '/' + service.version + '/plans' # NOTE(NaoShark): :param max_number_of_rules: and :param certificate_id: # and :param max_number_of_conditions: will be available from Day 2. _query_mapping = base.MVNAQueryParameters( "id", "name", "description", "bandwidth", "redundancy", "max_number_of_interfaces", "max_number_of_health_monitors", "max_number_of_listeners", "max_number_of_policies", "max_number_of_routes", "max_number_of_target_groups", # "max_number_of_rules", # "max_number_of_conditions", "max_number_of_members", "enabled") # Capabilities allow_list = True allow_get = True allow_create = False allow_update = False allow_delete = False patch_update = False # Properties #: It identifies connection resource uniquely id = resource2.Body('id') #: Name of plan name = resource2.Body('name') #: Description of plan description = resource2.Body('description') #: Bandwidth of plan bandwidth = resource2.Body('bandwidth') #: Redundancy of plan redundancy = resource2.Body('redundancy') #: Max number of interfaces max_number_of_interfaces = resource2.Body('max_number_of_interfaces') #: Max number of health monitors max_number_of_health_monitors = \ resource2.Body('max_number_of_health_monitors') #: Max number of listeners max_number_of_listeners = resource2.Body('max_number_of_listeners') #: Max number of policies max_number_of_policies = resource2.Body('max_number_of_policies') #: Max numbers of routes max_number_of_routes = resource2.Body('max_number_of_routes') #: Max number of target groups max_number_of_target_groups = resource2.Body('max_number_of_target_groups') # NOTE(NaoShark): :param max_number_of_rules: and :param certificate_id: # and :param max_number_of_conditions: will be available from Day 2. #: Max number of rules # max_number_of_rules = resource2.Body('max_number_of_rules') #: Max number of conditions # max_number_of_conditions = resource2.Body('max_number_of_conditions') #: Max number of members max_number_of_members = resource2.Body('max_number_of_members') #: Enabled or disabled enabled = resource2.Body('enabled')
class HealthMonitor(base.MVNABaseResource): resource_key = "health_monitor" resources_key = "health_monitors" service = mvna_service.MVNAService("v1.0") base_path = '/' + service.version + '/health_monitors' # NOTE(NaoShark): :param path: and :param http_status_code: will be # available from Day 2. _query_mapping = base.MVNAQueryParameters( "id", "name", "description", "configuration_status", "operation_status", "port", "protocol", "interval", "retry", "timeout", # "path", # "http_status_code", "load_balancer_id", "tenant_id") # Capabilities allow_list = True allow_get = True allow_create = True allow_update = True allow_delete = True patch_update = True # Properties #: It identifies connection resource uniquely id = resource2.Body('id') #: Name of health monitor name = resource2.Body('name') #: Description of health monitor description = resource2.Body('description') #: Tags of health monitor tags = resource2.Body('tags') #: Configuration status of health monitor configuration_status = resource2.Body('configuration_status') #: Operation status of health monitor operation_status = resource2.Body('operation_status') #: Port of health monitor port = resource2.Body('port') #: Protocol of health monitor protocol = resource2.Body('protocol') #: Interval of health monitor interval = resource2.Body('interval') #: Retry count of health monitor retry = resource2.Body('retry') #: Timeout of health monitor timeout = resource2.Body('timeout') # NOTE(NaoShark): :param path: and :param http_status_code: will be # available from Day 2. #: Path of health monitor # path = resource2.Body('path') #: HTTP status code of health monitor # http_status_code = resource2.Body('http_status_code') #: Load balancer ID load_balancer_id = resource2.Body('load_balancer_id') #: Tenant ID of health monitor tenant_id = resource2.Body('tenant_id') #: Current configuration of health monitor current = resource2.Body('current') #: Staged configuration of health monitor staged = resource2.Body('staged')
class LoadBalancer(base.MVNABaseResource): resource_key = "load_balancer" resources_key = "load_balancers" service = mvna_service.MVNAService("v1.0") base_path = '/' + service.version + '/load_balancers' _query_mapping = base.MVNAQueryParameters( "id", "name", "description", "configuration_status", "monitoring_status", "operation_status", "primary_availability_zone", "secondary_availability_zone", "active_availability_zone", "revision", "plan_id", "tenant_id") # Capabilities allow_list = True allow_get = True allow_create = True allow_update = True allow_delete = True patch_update = True # Properties #: It identifies connection resource uniquely id = resource2.Body('id') #: Name of load balancer name = resource2.Body('name') #: Description of load balancer description = resource2.Body('description') #: Tags of load balancer tags = resource2.Body('tags') #: Configuration status of load balancer configuration_status = resource2.Body('configuration_status') #: Monitoring status of load balancer monitoring_status = resource2.Body('monitoring_status') #: Operation status of load balancer operation_status = resource2.Body('operation_status') #: Primary availability zone of load balancer primary_availability_zone = resource2.Body('primary_availability_zone') #: Secondary availability zone of load balancer secondary_availability_zone = resource2.Body('secondary_availability_zone') #: Active availability zone of load balancer active_availability_zone = resource2.Body('active_availability_zone') #: Revision of load balancer revision = resource2.Body('revision') #: Plan ID of load balancer plan_id = resource2.Body('plan_id') #: Plan name of load balancer plan_name = resource2.Body('plan_name') #: Tenant ID of load balancer tenant_id = resource2.Body('tenant_id') # NOTE(NaoShark): :param syslog_servers: will be available from Day 2. #: Syslog servers of load balancer # syslog_servers = resource2.Body('syslog_servers') #: Interfaces of load balancer interfaces = resource2.Body('interfaces') #: Current configuration of load balancer current = resource2.Body('current') #: Staged configuration of load balancer staged = resource2.Body('staged') def delete_resource(self, session, resource_id, x_mvna_request_id=None, ignore_missing=False): uri = self.base_path + '/%s' % resource_id try: if x_mvna_request_id: resp = session.delete( uri, endpoint_filter=self.service, headers={"X-MVNA-Request-Id": x_mvna_request_id}) else: resp = session.delete(uri, endpoint_filter=self.service) except exceptions.NotFoundException: if ignore_missing: return None raise exceptions.ResourceNotFound( message="No %s found for %s" % (self.__class__.__name__, resource_id)) self._translate_response(resp, has_body=False) return self def action(self, session, resource_id, x_mvna_request_id=None, **body): uri = self.base_path + '/%s/action' % resource_id if x_mvna_request_id: resp = session.post( uri, endpoint_filter=self.service, headers={"X-MVNA-Request-Id": x_mvna_request_id}, json=body) else: resp = session.post(uri, endpoint_filter=self.service, json=body) self._translate_response(resp, has_body=False) return self
class Policy(base.MVNABaseResource): resource_key = "policy" resources_key = "policies" service = mvna_service.MVNAService("v1.0") base_path = '/' + service.version + '/policies' # NOTE(NaoShark): :param sorry_page_url: and :param certificate_id: and # :param tls_security_policy_id: will be available from Day 2. _query_mapping = base.MVNAQueryParameters( "id", "name", "description", "configuration_status", "operation_status", "algorithm", "persistence", # "sorry_page_url", # "certificate_id", "health_monitor_id", "listener_id", "default_target_group_id", # "tls_security_policy_id", "load_balancer_id", "tenant_id") # Capabilities allow_list = True allow_get = True allow_create = True allow_update = True allow_delete = True patch_update = True # Properties #: It identifies connection resource uniquely id = resource2.Body('id') #: Name of policy name = resource2.Body('name') #: Description of policy description = resource2.Body('description') #: Tags of policy tags = resource2.Body('tags') #: Configuration status of policy configuration_status = resource2.Body('configuration_status') #: Operation status of policy operation_status = resource2.Body('operation_status') #: Algorithm of policy algorithm = resource2.Body('algorithm') #: persistence of policy persistence = resource2.Body('persistence') # NOTE(NaoShark): :param sorry_page_url: and :param certificate_id: and # :param tls_security_policy_id: will be available from Day 2. #: Sorry page URL of policy # sorry_page_url = resource2.Body('sorry_page_url') #: Certificate ID of policy # certificate_id = resource2.Body('certificate_id') #: TLS security policy ID of policy # tls_security_policy_id = resource2.Body('tls_security_policy_id') #: Health monitor ID of policy health_monitor_id = resource2.Body('health_monitor_id') #: Listener ID of policy listener_id = resource2.Body('listener_id') #: Default target group ID of policy default_target_group_id = resource2.Body('default_target_group_id') #: Load balancer ID of policy load_balancer_id = resource2.Body('load_balancer_id') #: Tenant ID of policy tenant_id = resource2.Body('tenant_id') #: Current configuration of policy current = resource2.Body('current') #: Staged configuration of policy staged = resource2.Body('staged')