Exemplo n.º 1
0
 def _datasources_in_mgmt(cls, provider, server=None):
     datasources = []
     rows = provider.mgmt.inventory.list_server_datasource()
     for datasource in rows:
         _server = MiddlewareServer(name=get_server_name(datasource.path),
                                    feed=datasource.path.feed_id,
                                    provider=provider)
         _include = False
         if server:
             if server.name == _server.name:
                 _include = True if not server.feed else server.feed == _server.feed
         else:
             _include = True
         if _include:
             datasources.append(MiddlewareDatasource(nativeid=datasource.id,
                                                     name=datasource.name,
                                                     server=_server,
                                                     provider=provider))
     return datasources
Exemplo n.º 2
0
 def _datasources_in_mgmt(cls, provider, server=None):
     datasources = []
     rows = provider.mgmt.inventory.list_server_datasource()
     for datasource in rows:
         _server = MiddlewareServer(name=get_server_name(datasource.path),
                                    feed=datasource.path.feed_id,
                                    provider=provider)
         _include = False
         if server:
             if server.name == _server.name:
                 _include = True if not server.feed else server.feed == _server.feed
         else:
             _include = True
         if _include:
             datasources.append(MiddlewareDatasource(nativeid=datasource.id,
                                                     name=datasource.name,
                                                     server=_server,
                                                     provider=provider))
     return datasources
Exemplo n.º 3
0
 def _messagings_in_mgmt(cls, provider, server=None):
     messagings = []
     rows = provider.mgmt.inventory.list_messaging()
     for messaging in rows:
         _server = MiddlewareServer(name=get_server_name(messaging.path),
                                    feed=messaging.path.feed_id,
                                    provider=provider)
         _include = False
         if server:
             if server.name == _server.name:
                 _include = True if not server.feed else server.feed == _server.feed
         else:
             _include = True
         if _include:
             messagings.append(MiddlewareMessaging(nativeid=messaging.id,
                 name=messaging.name,
                 server=_server,
                 provider=provider,
                 messaging_type=re.sub(' \\[.*\\]', '', messaging.name)))
     return messagings
Exemplo n.º 4
0
 def _messagings_in_mgmt(cls, provider, server=None):
     messagings = []
     rows = provider.mgmt.inventory.list_messaging()
     for messaging in rows:
         _server = MiddlewareServer(name=get_server_name(messaging.path),
                                    feed=messaging.path.feed_id,
                                    provider=provider)
         _include = False
         if server:
             if server.name == _server.name:
                 _include = True if not server.feed else server.feed == _server.feed
         else:
             _include = True
         if _include:
             messagings.append(MiddlewareMessaging(nativeid=messaging.id,
                 name=messaging.name,
                 server=_server,
                 provider=provider,
                 messaging_type=re.sub(' \\[.*\\]', '', messaging.name)))
     return messagings
Exemplo n.º 5
0
 def _deployments_in_mgmt(cls, provider, server=None):
     deployments = []
     rows = provider.mgmt.inventory.list_server_deployment()
     for deployment in rows:
         _server = MiddlewareServer(
             name=get_server_name(deployment.path),
             feed=deployment.path.feed_id,
             provider=provider)
         _include = False
         if server:
             if server.name == _server.name:
                 _include = True if not server.feed else server.feed == _server.feed
         else:
             _include = True
         if _include:
             deployments.append(MiddlewareDeployment(
                 provider=provider,
                 server=_server,
                 nativeid=deployment.id,
                 name=re.sub('((Sub)|Deployment \\[)|(\\])', '', deployment.name)))
     return deployments
Exemplo n.º 6
0
 def _deployments_in_mgmt(cls, provider, server=None):
     deployments = []
     rows = provider.mgmt.inventory.list_server_deployment()
     for deployment in rows:
         _server = MiddlewareServer(
             name=get_server_name(deployment.path),
             feed=deployment.path.feed_id,
             provider=provider)
         _include = False
         if server:
             if server.name == _server.name:
                 _include = True if not server.feed else server.feed == _server.feed
         else:
             _include = True
         if _include:
             deployments.append(MiddlewareDeployment(
                 provider=provider,
                 server=_server,
                 nativeid=deployment.id,
                 name=re.sub('((Sub)|Deployment \\[)|(\\])', '', deployment.name)))
     return deployments