Пример #1
0
 def restart_service(self):
     log.info('Start to restart openstack service for nova/neutron/cinder.')
     cps_service = CPSServiceBusiness()
     for proxy in self.proxy_match_region.keys():
         cps_service.stop_all(proxy)
         cps_service.start_all(proxy)
     log.info(
         'Finish to restart openstack service for nova/neutron/cinder.')
Пример #2
0
    def check_service_status(self):
        print('****Start to check service status...')

        cps_service = CPSServiceBusiness()
        for proxy in self.proxies:
            cps_service.check_all_service_template_status(proxy)

        print('****End to check service status.')
Пример #3
0
def get_all_hosts():
    cps_business = CPSServiceBusiness()
    openstack_az_hosts = cps_business.get_openstack_hosts()
    aws_az_hosts = cps_business.get_aws_node_hosts()
    vcloud_az_hosts = cps_business.get_vcloud_node_hosts()
    all_proxy_host = cps_business.get_all_proxy_nodes(
        proxy_match_region=CONF.DEFAULT.proxy_match_region)
    return openstack_az_hosts + aws_az_hosts + vcloud_az_hosts + all_proxy_host
Пример #4
0
def get_all_cascaded_hosts():
    cps_business = CPSServiceBusiness()
    openstack_az_hosts = cps_business.get_openstack_hosts()
    aws_az_hosts = cps_business.get_aws_node_hosts()
    vcloud_az_hosts = cps_business.get_vcloud_node_hosts()

    # shaixun
    proxy_match_host = CONF.DEFAULT.proxy_match_host

    return openstack_az_hosts + aws_az_hosts + vcloud_az_hosts
Пример #5
0
 def __init__(self, proxy_match_region):
     # self.filter_for_dispatch = ['.py', '.sh', '.ini', '.pem', '.txt', '.vmx', '.json']
     self.filter_for_dispatch = []
     self.cps_service_business = CPSServiceBusiness()
     self.aws_cascaded_node_hosts = self.cps_service_business.get_aws_node_hosts()
     self.vcloud_cascaded_node_hosts = self.cps_service_business.get_vcloud_node_hosts()
     self.openstack_cascaded_node_hosts = self.cps_service_business.get_openstack_hosts()
     self.proxy_match_region = proxy_match_region
     log.info('proxy_match_region: %s' % self.proxy_match_region)
     self.proxy_hosts = self.cps_service_business.get_all_proxy_nodes(self.proxy_match_region)
     log.info('proxy_hosts: %s' % self.proxy_hosts)
Пример #6
0
    def restart_services(self):
        print('****Start to restart services...')

        cps_service = CPSServiceBusiness()
        for proxy in self.proxies:
            cps_service.stop_all(proxy)

        for proxy in self.proxies:
            cps_service.start_all(proxy)

        print('****Finish to restart services.')
Пример #7
0
 def verify_services_status(self):
     cps_service = CPSServiceBusiness()
     for proxy in self.proxy_match_region.keys():
         cps_service.check_all_service_template_status(proxy)
Пример #8
0
 def patch_for_cascaded_nodes(self):
     cps = CPSServiceBusiness()
Пример #9
0
def get_os_region_name():
    cps_business = CPSServiceBusiness()
    return cps_business.get_os_region_name()
Пример #10
0
def get_all_proxy_hosts():
    cps_business = CPSServiceBusiness()
    all_proxy_hosts = cps_business.get_all_proxy_nodes(
        proxy_match_region=CONF.DEFAULT.proxy_match_region)
    return all_proxy_hosts
Пример #11
0
def get_all_cascaded_hosts():
    cps_business = CPSServiceBusiness()
    openstack_az_hosts = cps_business.get_openstack_hosts()
    aws_az_hosts = cps_business.get_aws_node_hosts()
    vcloud_az_hosts = cps_business.get_vcloud_node_hosts()
    return openstack_az_hosts + aws_az_hosts + vcloud_az_hosts