Ejemplo n.º 1
0
 def delete_jobexec():
     url = "https://" + OtcConfig.DEFAULT_HOST + "/v1.1/" + OtcConfig.PROJECT_ID + "/job-executions/" + OtcConfig.JOBEXEC_ID
     ret = utils_http.delete(url)
     print(url)
     print(ret)
     sahara.otcOutputHandler().print_output(ret, mainkey="")
     return ret
Ejemplo n.º 2
0
 def delete_subnet():
     if OtcConfig.SUBNETNAME:
         ecs.convertSUBNETNameToId()
     
     url = "https://" + OtcConfig.DEFAULT_HOST+ "/v1/" + OtcConfig.PROJECT_ID + "/subnets" + OtcConfig.SUBNETID
     ret = utils_http.delete(url)
     return ret
Ejemplo n.º 3
0
 def delete_job():
     url = "https://" + OtcConfig.DEFAULT_HOST + "/v1.1/"+ OtcConfig.PROJECT_ID +"/job-executions/" + OtcConfig.JOB_EXEC_ID        
     ret = utils_http.delete(url)
     print (url)
     print (ret)        
     mrs.otcOutputHandler().print_output(ret, mainkey = "") 
     return ret
Ejemplo n.º 4
0
 def delete_namespace():
     if OtcConfig.CLUSTER:
         cce.convertClusterNameToId()
     url = "https://" + OtcConfig.DEFAULT_HOST + "/api/v1/namespaces/" + OtcConfig.NAMESPACE
     ret = utils_http.delete(url)
     ecs.otcOutputHandler().print_output(ret, mainkey="")
     return ret
Ejemplo n.º 5
0
 def delete_auto_scaling_group():
     if not (OtcConfig.SCALINGGROUP_NAME is None):
         autoscaling.convertASNameToId()
     url = "https://" + OtcConfig.DEFAULT_HOST + "/autoscaling-api/v1/" + OtcConfig.PROJECT_ID + "/scaling_group/" + OtcConfig.SCALINGGROUP_ID
     ret = utils_http.delete(url)
     print(ret)
     return ret
Ejemplo n.º 6
0
 def delete_cluster():
     url = "https://" + OtcConfig.DEFAULT_HOST + "/v1.1/"+ OtcConfig.PROJECT_ID +"/clusters/" + OtcConfig.CLUSTER_ID        
     ret = utils_http.delete(url)
     print (url)
     print (ret)        
     mrs.otcOutputHandler().print_output(ret, mainkey = "") 
     return ret
Ejemplo n.º 7
0
 def delete_namespace():
     if OtcConfig.CLUSTER:
         cce.convertClusterNameToId()
     url = "https://" + OtcConfig.DEFAULT_HOST + "/api/v1/namespaces/" + OtcConfig.NAMESPACE
     ret = utils_http.delete(url)
     cce.otcOutputHandler().print_output(ret,mainkey="")        
     return ret
Ejemplo n.º 8
0
 def delete_auto_scaling_configuration():
     if not (OtcConfig.SCALING_CONFIGURATION_NAME is None):
         autoscaling.convertASConfigurationNameToId()
     url = "https://" + OtcConfig.DEFAULT_HOST + "/autoscaling-api/v1/" + OtcConfig.PROJECT_ID + "/scaling_configuration/"+ OtcConfig.SCALING_CONFIGURATION_ID
     ret = utils_http.delete(url)
     print(ret)
     return ret
Ejemplo n.º 9
0
 def delete_volume():
     if not OtcConfig.VOLUME_NAME is None:
         ecs.convertVOLUMENameToId() 
     url = "https://" + OtcConfig.DEFAULT_HOST+ "/v2/" + OtcConfig.PROJECT_ID + "/cloudvolumes" + "/" + OtcConfig.VOLUME_ID    
     ret = utils_http.delete(url)
     print(ret)
     return ret
Ejemplo n.º 10
0
 def delete_volume():
     if not OtcConfig.VOLUME_NAME is None:
         ecs.convertVOLUMENameToId() 
     url = ecs.baseurl+ "/v2/" + OtcConfig.PROJECT_ID + "/cloudvolumes" + "/" + OtcConfig.VOLUME_ID    
     ret = utils_http.delete(url)
     print(ret)
     return ret
Ejemplo n.º 11
0
 def delete_cluster():
     url = "https://" + OtcConfig.DEFAULT_HOST + "/v1.1/" + OtcConfig.PROJECT_ID + "/clusters/" + OtcConfig.CLUSTER_ID
     ret = utils_http.delete(url)
     print(url)
     print(ret)
     sahara.otcOutputHandler().print_output(ret, mainkey="")
     return ret
Ejemplo n.º 12
0
 def delete_auto_scaling_instance_from_group():
     if not OtcConfig.INSTANCE_NAME is None:
         getplugin("ecs").convertINSTANCENameToId()
     url = "https://" + OtcConfig.DEFAULT_HOST + "/autoscaling-api/v1/" + OtcConfig.PROJECT_ID + "/scaling_group_instance/" + OtcConfig.INSTANCE_ID
     ret = utils_http.delete(url)
     print(ret)
     return ret
Ejemplo n.º 13
0
 def delete_policies():
     if not (OtcConfig.SCALING_POLICY_NAME is None):
         autoscaling.convertASPolicyNameToId()
     url = "https://" + OtcConfig.DEFAULT_HOST + "/autoscaling-api/v1/" + OtcConfig.PROJECT_ID + "/scaling_policy/" + OtcConfig.SCALING_POLICY_ID
     ret = utils_http.delete(url)
     print(ret)
     return ret
Ejemplo n.º 14
0
    def delete_rc():
        if OtcConfig.CLUSTER:
            cce.convertClusterNameToId()
        url = "https://" + OtcConfig.DEFAULT_HOST + "/api/v1/namespaces/" + OtcConfig.NAMESPACE + "/replicationcontrollers/" + OtcConfig.RC_NAME

        ret = utils_http.delete(url)
        cce.otcOutputHandler().print_output(ret, mainkey="")
        return ret
Ejemplo n.º 15
0
    def delete_load_balancers():
        if not (OtcConfig.LOADBALANCER_NAME is None):
            elb.convertELBNameToId()
        url = "https://" + OtcConfig.DEFAULT_HOST + "/v1.0/" + OtcConfig.PROJECT_ID + "/elbaas/loadbalancers" + "/" + OtcConfig.LOADBALANCER_ID

        ret = utils_http.delete(url)
        print(ret)
        return ret
Ejemplo n.º 16
0
 def delete_launch_configuration():
     raise RuntimeError("NOT IMPLEMENTED!")
     if not (OtcConfig.PUBLICIP is None):
         autoscaling.convertPublicIpNameToId()
     url = autoscaling.baseurl+ "/v1/" + OtcConfig.PROJECT_ID + "/publicips" + \
     "/" + OtcConfig.PUBLICIPID
     ret = utils_http.delete(url)
     print(ret)
Ejemplo n.º 17
0
 def delete_launch_configuration():
     raise RuntimeError("NOT IMPLEMENTED!")
     if not (OtcConfig.PUBLICIP is None):
         autoscaling.convertPublicIpNameToId()            
     url = autoscaling.baseurl+ "/v1/" + OtcConfig.PROJECT_ID + "/publicips" + \
     "/" + OtcConfig.PUBLICIPID
     ret = utils_http.delete(url)
     print(ret)
Ejemplo n.º 18
0
    def delete_jobbinary():
        if not (OtcConfig.JOBBINARY is None):
            getplugin("sahara").convertJOBBINARYNameToId()

        url = "https://" + OtcConfig.DEFAULT_HOST + "/v1.1/" + OtcConfig.PROJECT_ID + "/job-binaries/" + OtcConfig.JOBBINARY_ID
        ret = utils_http.delete(url)
        sahara.otcOutputHandler().print_output(ret, mainkey="")
        return ret
Ejemplo n.º 19
0
 def release_private_address():
     if not (OtcConfig.PUBLICIP is None):
         ecs.convertPublicIpNameToId()            
     url = ecs.baseurl+ "/v1/" + OtcConfig.PROJECT_ID + "/publicips" + \
     "/" + OtcConfig.PUBLICIPID
     ret = utils_http.delete(url)
     print(ret)
     return ret
Ejemplo n.º 20
0
    def delete_load_balancers():
        if not (OtcConfig.LOADBALANCER_NAME is None):
            elb.convertELBNameToId()
        url = "https://" + OtcConfig.DEFAULT_HOST+ "/v1.0/" + OtcConfig.PROJECT_ID + "/elbaas/loadbalancers" + "/" + OtcConfig.LOADBALANCER_ID

        ret = utils_http.delete(url)
        print(ret)
        return ret
Ejemplo n.º 21
0
 def release_private_address():
     if not (OtcConfig.PUBLICIP is None):
         ecs.convertPublicIpNameToId()            
     url = "https://" + OtcConfig.DEFAULT_HOST+ "/v1/" + OtcConfig.PROJECT_ID + "/publicips" + \
     "/" + OtcConfig.PUBLICIPID
     ret = utils_http.delete(url)
     print(ret)
     return ret
Ejemplo n.º 22
0
    def delete_vpc():
        if not (OtcConfig.VPCNAME is None):
            ecs.convertVPCNameToId()

        url = "https://" + OtcConfig.DEFAULT_HOST+ "/v1/" + OtcConfig.PROJECT_ID + "/vpcs" + OtcConfig.VPCID    
        ret = utils_http.delete(url)
        print(ret)
        return ret
Ejemplo n.º 23
0
    def delete_cluster():
        if OtcConfig.CLUSTER:
            cce.convertClusterNameToId()

        url = "https://cce.eu-de.otc.t-systems.com" + "/api/v1/clusters/" + OtcConfig.CLUSTER_ID
        ret = utils_http.delete(url)
        cce.otcOutputHandler().print_output(ret, mainkey="")
        return ret
Ejemplo n.º 24
0
    def delete_jobbinary():
        if not (OtcConfig.JOBBINARY is None):
            getplugin("sahara").convertJOBBINARYNameToId()

        url = "https://" + OtcConfig.DEFAULT_HOST + "/v1.1/"+ OtcConfig.PROJECT_ID +"/job-binaries/" + OtcConfig.JOBBINARY_ID
        ret = utils_http.delete(url)
        sahara.otcOutputHandler().print_output(ret, mainkey = "") 
        return ret
Ejemplo n.º 25
0
 def delete_cluster():
     if OtcConfig.CLUSTER:
         cce.convertClusterNameToId()
              
     url = "https://cce.eu-de.otc.t-systems.com" + "/api/v1/clusters/" + OtcConfig.CLUSTER_ID
     ret = utils_http.delete(url)
     cce.otcOutputHandler().print_output(ret,mainkey="")     
     return ret
Ejemplo n.º 26
0
    def delete_instance():
        url = "https://" + OtcConfig.DEFAULT_HOST + "/v1.0/" + OtcConfig.PROJECT_ID +  "/instances"
        url = url.replace('iam', 'dcs')
        ret = utils_http.delete(url + '/' + OtcConfig.INSTANCE_ID )
        #print (url)
        #print (ret)
        dcs.otcOutputHandler().print_output(ret, mainkey = "")

        return ret
Ejemplo n.º 27
0
    def delete_instance():
        url = "https://" + OtcConfig.DEFAULT_HOST + "/v1.0/" + OtcConfig.PROJECT_ID + "/instances"
        url = url.replace('iam', 'dcs')
        ret = utils_http.delete(url + '/' + OtcConfig.INSTANCE_ID)
        #print (url)
        #print (ret)
        dcs.otcOutputHandler().print_output(ret, mainkey="")

        return ret
Ejemplo n.º 28
0
    def delete_listener():
        if not (OtcConfig.LISTENER_NAME is None):
            elb.convertLISTENERNameToId()

        url = "https://" + OtcConfig.DEFAULT_HOST + "/v1.0/" + OtcConfig.PROJECT_ID + "/elbaas/listeners/" + OtcConfig.LISTENER_ID
        ret = utils_http.delete(url)

        print(ret)
        return ret
Ejemplo n.º 29
0
    def delete_listener():
        if not (OtcConfig.LISTENER_NAME is None):
            elb.convertLISTENERNameToId()

        url = "https://" + OtcConfig.DEFAULT_HOST+ "/v1.0/" + OtcConfig.PROJECT_ID + "/elbaas/listeners/" + OtcConfig.LISTENER_ID
        ret = utils_http.delete(url)

        print(ret)
        return ret
Ejemplo n.º 30
0
    def delete_jobobject():
        if not (OtcConfig.JOB is None):
            getplugin("sahara").convertJOBNameToId()

        url = "https://" + OtcConfig.DEFAULT_HOST + "/v1.1/" + OtcConfig.PROJECT_ID + "/jobs/" + OtcConfig.JOB_ID
        ret = utils_http.delete(url)
        print(url)
        print(ret)
        sahara.otcOutputHandler().print_output(ret, mainkey="")
        return ret
Ejemplo n.º 31
0
    def delete_security_group():
        if not (OtcConfig.VPCNAME is None):
            ecs.convertVPCNameToId()

        if not (OtcConfig.SECUGROUPNAME is None):
            ecs.convertSECUGROUPNameToId()
        
        url = ecs.baseurl+ "/v2.0/" + "/security-groups" + "/"+ OtcConfig.SECUGROUP
        ret = utils_http.delete(url)
        return ret
Ejemplo n.º 32
0
    def delete_pod_templates():
        if OtcConfig.CLUSTER:
            cce.convertClusterNameToId()

        if OtcConfig.POD:
            url = "https://" + OtcConfig.DEFAULT_HOST + "/api/v1/namespaces/" + OtcConfig.NAMESPACE + "/podtemplates/" + OtcConfig.POD

        ret = utils_http.delete(url)
        cce.otcOutputHandler().print_output(ret, mainkey="")
        return ret
Ejemplo n.º 33
0
    def delete_security_group():
        if not (OtcConfig.VPCNAME is None):
            ecs.convertVPCNameToId()

        if not (OtcConfig.SECUGROUPNAME is None):
            ecs.convertSECUGROUPNameToId()
        
        url = "https://" + OtcConfig.DEFAULT_HOST+ "/v2.0/" + "/security-groups" + "/"+ OtcConfig.SECUGROUP
        ret = utils_http.delete(url)
        return ret
Ejemplo n.º 34
0
 def delete_jobobject():
     if not (OtcConfig.JOB is None):
         getplugin("sahara").convertJOBNameToId()
     
     url = "https://" + OtcConfig.DEFAULT_HOST + "/v1.1/"+ OtcConfig.PROJECT_ID +"/jobs/" + OtcConfig.JOB_ID        
     ret = utils_http.delete(url)
     print (url)
     print (ret)        
     sahara.otcOutputHandler().print_output(ret, mainkey = "") 
     return ret
Ejemplo n.º 35
0
    def delete_datasource():
        if not (OtcConfig.DATASOURCE is None):
            getplugin("sahara").convertDATASOURCENameToId()

        if OtcConfig.DATASOURCE_ID is None:
            raise RuntimeError("Not found!")

        url = "https://" + OtcConfig.DEFAULT_HOST + "/v1.1/" + OtcConfig.PROJECT_ID + "/data-sources/" + OtcConfig.DATASOURCE_ID
        ret = utils_http.delete(url)
        sahara.otcOutputHandler().print_output(ret, mainkey="")
        return ret
Ejemplo n.º 36
0
 def delete_datasource():
     if not (OtcConfig.DATASOURCE is None):
         getplugin("sahara").convertDATASOURCENameToId()
     
     if OtcConfig.DATASOURCE_ID is  None:
         raise RuntimeError("Not found!")                      
     
     url = "https://" + OtcConfig.DEFAULT_HOST + "/v1.1/"+ OtcConfig.PROJECT_ID +"/data-sources/" + OtcConfig.DATASOURCE_ID
     ret = utils_http.delete(url)
     sahara.otcOutputHandler().print_output(ret, mainkey = "") 
     return ret
Ejemplo n.º 37
0
    def delete_health_check():
        if not (OtcConfig.LOADBALANCER_NAME is None):
            elb.convertELBNameToId()
        if not (OtcConfig.HEALTHCHECK_ID is None):
            elb.convertLISTENERIdToHealthCheckId()

        url = "https://" + OtcConfig.DEFAULT_HOST+ "/v1.0/" + OtcConfig.PROJECT_ID + "/elbaas/healthcheck/" + OtcConfig.HEALTHCHECK_ID
        ret = utils_http.delete(url)

        print(ret)
        return ret
Ejemplo n.º 38
0
    def delete_health_check():
        if not (OtcConfig.LOADBALANCER_NAME is None):
            elb.convertELBNameToId()
        if not (OtcConfig.HEALTHCHECK_ID is None):
            elb.convertLISTENERIdToHealthCheckId()

        url = "https://" + OtcConfig.DEFAULT_HOST + "/v1.0/" + OtcConfig.PROJECT_ID + "/elbaas/healthcheck/" + OtcConfig.HEALTHCHECK_ID
        ret = utils_http.delete(url)

        print(ret)
        return ret
Ejemplo n.º 39
0
 def delete_key_pair():
     """ generated source for method KEYPAIRDelete """
     url = ecs.baseurl+ "/v2/" + OtcConfig.PROJECT_ID + "/os-keypairs"+ "/" + OtcConfig.KEYNAME
     ret = utils_http.delete(url )        
     return ret
Ejemplo n.º 40
0
 def detach_volume():
     """ generated source for method DetachVolume """
     url = ecs.baseurl+ "/v1/" + OtcConfig.PROJECT_ID + "/cloudservers/" + OtcConfig.INSTANCE_ID + "/detachvolume/" + OtcConfig.VOLUME_ID
     ret = utils_http.delete(url)
     print(ret)
     return ret
Ejemplo n.º 41
0
 def detach_volume():
     """ generated source for method DetachVolume """
     url = "https://" + OtcConfig.DEFAULT_HOST+ "/v1/" + OtcConfig.PROJECT_ID + "/cloudservers/" + OtcConfig.INSTANCE_ID + "/detachvolume/" + OtcConfig.VOLUME_ID
     ret = utils_http.delete(url)
     print(ret)
     return ret
Ejemplo n.º 42
0
 def delete_key_pair():
     """ generated source for method KEYPAIRDelete """
     url = "https://" + OtcConfig.DEFAULT_HOST+ "/v2/" + OtcConfig.PROJECT_ID + "/os-keypairs"+ "/" + OtcConfig.KEYNAME
     ret = utils_http.delete(url )        
     return ret
Ejemplo n.º 43
0
 def release_private_address():
     url = "https://" + OtcConfig.DEFAULT_HOST+ "/v1/" + OtcConfig.PROJECT_ID + "/privateips" + OtcConfig.PRIVATEIPID
     ret = utils_http.delete(url)
     print(ret)
     return ret