Пример #1
0
 def create_curl_data(self, uri):
     data_contract = CurlDataContract()
     data_storage = self.model.data_storage
     data_contract.url = data_storage.adminserver_url + uri
     data_contract.certs = data_storage.curl_certs
     data_contract.user_pwd = data_storage.user_pwd
     data_contract.cookie_file = data_storage.cookie_path
     data_contract.cookie_jar = data_storage.cookie_path
     data_contract.netrc = data_storage.netrc
     data_contract.ssl_verifypeer = True if not data_storage.test else False
     return data_contract
Пример #2
0
 def create_curl_data(self, uri):
     data_contract = CurlDataContract()
     data_storage = self.model.data_storage
     data_contract.url = data_storage.adminserver_url + uri
     data_contract.certs = data_storage.curl_certs
     data_contract.user_pwd = data_storage.user_pwd
     data_contract.cookie_file = data_storage.cookie_path
     data_contract.cookie_jar = data_storage.cookie_path
     data_contract.netrc = data_storage.netrc
     data_contract.ssl_verifypeer = True if not data_storage.test else False
     return data_contract
Пример #3
0
    def create_curl_data(self):
        data_contract = CurlDataContract()
        data_contract.url = self.data_storage.adminserver_url + \
             "/management/wls/latest"
        data_contract.certs = self.data_storage.curl_certs
        data_contract.user_pwd = self.data_storage.user_pwd
        data_contract.cookie_file = self.data_storage.cookie_path
        data_contract.cookie_jar = self.data_storage.cookie_path
        data_contract.netrc = self.data_storage.netrc
        data_contract.ssl_verifypeer = True if not self.data_storage.test else False

        return data_contract
Пример #4
0
 def create_curl_data(self):
     data_contract = CurlDataContract()
     data_contract.url = self.data_storage.adminserver_url + \
          "/management/wls/latest"
     data_contract.certs = self.data_storage.curl_certs
     data_contract.user_pwd = self.data_storage.user_pwd
     data_contract.cookie_file = self.data_storage.cookie_path
     data_contract.cookie_jar = self.data_storage.cookie_path
     data_contract.netrc = self.data_storage.netrc
     data_contract.ssl_verifypeer = True if not self.data_storage.test else False
     
     return data_contract
Пример #5
0
 def create_curl_data(self, uri, operation):
     data_contract = CurlDataContract()
     data_storage = self.model.data_storage
     data_contract.url = data_storage.adminserver_url + uri
     data_contract.certs = data_storage.curl_certs
     data_contract.user_pwd = data_storage.user_pwd
     data_contract.cookie_file = data_storage.cookie_path
     data_contract.cookie_jar = data_storage.cookie_path
     data_contract.netrc = data_storage.netrc
     data_contract.ssl_verifypeer = True if not data_storage.test else False
     if operation != Operation.App.STATUS:
         data_contract.set_empty_postfield()    
     
     return data_contract
Пример #6
0
    def create_curl_data(self, uri, operation):
        data_contract = CurlDataContract()
        data_storage = self.model.data_storage
        data_contract.url = data_storage.adminserver_url + uri
        data_contract.certs = data_storage.curl_certs
        data_contract.user_pwd = data_storage.user_pwd
        data_contract.cookie_file = data_storage.cookie_path
        data_contract.cookie_jar = data_storage.cookie_path
        data_contract.netrc = data_storage.netrc
        data_contract.ssl_verifypeer = True if not data_storage.test else False
        if operation != Operation.App.STATUS:
            data_contract.set_empty_postfield()

        return data_contract
Пример #7
0
    def create_curl_data(self, uri, operation):
        data_storage = self.model.data_storage

        data_contract = CurlDataContract()
        data_contract.url = data_storage.adminserver_url + uri
        data_contract.certs = data_storage.curl_certs
        data_contract.user_pwd = data_storage.user_pwd
        data_contract.cookie_file = data_storage.cookie_path
        data_contract.cookie_jar = data_storage.cookie_path
        data_contract.netrc = data_storage.netrc
        data_contract.ssl_verifypeer = True if not data_storage.test else False

        # POST Accepting "application/json"
        if (
            operation == Operation.Deployment.DEPLOY_UPLOADED_APP
            or operation == Operation.Deployment.DEPLOY_UPLOADED_LIB
        ):
            data_contract.set_postfield(data_storage.deployment_name, data_storage.source, data_storage.target)

        # POST Accepting "multipart/form-data"
        elif operation == Operation.Deployment.DEPLOY_LOCAL_APP or operation == Operation.Deployment.DEPLOY_LOCAL_LIB:
            data_contract.set_form_file(
                data_storage.deployment_name, self.model.data_storage.source, data_storage.target
            )

        # POST Accepting "multipart/form-data"
        elif (
            operation == Operation.Deployment.REDEPLOY_LOCAL_APP or operation == Operation.Deployment.REDEPLOY_LOCAL_LIB
        ):
            data_contract.set_form_file(None, self.model.data_storage.source, None)

        # POST Accepting "application/json"
        elif (
            operation == Operation.Deployment.REDEPLOY_UPLOADED_APP
            or operation == Operation.Deployment.REDEPLOY_UPLOADED_LIB
        ):
            data_contract.set_empty_postfield()

        # DELETE
        elif operation == Operation.Deployment.UNDEPLOY_APP or operation == Operation.Deployment.UNDEPLOY_LIB:
            data_contract.set_delete()

        return data_contract
Пример #8
0
 def create_curl_data(self, uri, operation):
     data_storage = self.model.data_storage
     
     data_contract = CurlDataContract()
     data_contract.url = data_storage.adminserver_url + uri
     data_contract.certs = data_storage.curl_certs
     data_contract.user_pwd = data_storage.user_pwd
     data_contract.cookie_file = data_storage.cookie_path
     data_contract.cookie_jar = data_storage.cookie_path
     data_contract.netrc = data_storage.netrc
     data_contract.ssl_verifypeer = True if not data_storage.test else False
     
     # POST Accepting "application/json"
     if operation == Operation.Deployment.DEPLOY_UPLOADED_APP or \
         operation == Operation.Deployment.DEPLOY_UPLOADED_LIB:
         data_contract.set_postfield(data_storage.deployment_name, \
                                     data_storage.source, data_storage.target)
                              
     # POST Accepting "multipart/form-data"
     elif operation == Operation.Deployment.DEPLOY_LOCAL_APP or \
         operation == Operation.Deployment.DEPLOY_LOCAL_LIB:
         data_contract.set_form_file(data_storage.deployment_name, \
             self.model.data_storage.source, data_storage.target)
         
     # POST Accepting "multipart/form-data"
     elif operation == Operation.Deployment.REDEPLOY_LOCAL_APP or \
         operation == Operation.Deployment.REDEPLOY_LOCAL_LIB:
         data_contract.set_form_file(None, \
             self.model.data_storage.source, None)
     
     # POST Accepting "application/json"
     elif operation == Operation.Deployment.REDEPLOY_UPLOADED_APP or \
         operation == Operation.Deployment.REDEPLOY_UPLOADED_LIB:
         data_contract.set_empty_postfield()
         
     # DELETE
     elif operation == Operation.Deployment.UNDEPLOY_APP or \
         operation == Operation.Deployment.UNDEPLOY_LIB:
         data_contract.set_delete()
     
     return data_contract