def main(): installer.installer() email = input( "\n\n\n\n\nEnter the email for which you want the requested data. Press enter for default value \n" ) or '*****@*****.**' password = input( "Enter the password of the account for which you want the requested data. Press enter for default value \n" ) or 'Stupid123' app_token = input( "Enter the app-token for which you want the requested data. Press enter for default value \n" ) or 'n2DwvM7Yzq6lqhQ-Xthdys7LEBNj40ZidSUPOpnnLD8' d_date = input( "Enter the date for which you want the requested data. Default value is yesterday date\n" ) or datetime.strftime(datetime.now() - timedelta(1), '%Y-%m-%d') home_url = constants.home_url activity_url = constants.activity_url org_url = constants.org_url user_url = constants.user_url projects_url = constants.projects_url projects = constants.projects organizations = constants.organizations members_url = constants.members_url d_date = datetime.strptime(d_date, '%Y-%m-%d').date() sess = requests.Session() post_data = {'email': email, 'password': password} headers = {'App-Token': app_token} res = sess.post(home_url, data=post_data, headers=headers, timeout=50) res.raise_for_status() data = res.json() auth_token = data['user']['auth_token'] user_id = data['user']['id'] headers = {'App-Token': app_token, 'Auth-Token': auth_token} res = sess.get(user_url + str(user_id) + organizations, headers=headers, timeout=50) res.raise_for_status() data = res.json() organization = data['organizations'][0] if not data['organizations']: raise Exception("No organization found for user.") try: asyncio.run( get_server_data(app_token, auth_token, projects, org_url, organization, members_url, d_date, activity_url)) except Exception as e: logging.error(e)
def save_model (self , request , obj , fro , change): # save the model and file will uploaded obj.save () # getting the file address package_address = settings.MEDIA_ROOT + "/" + str (obj.File) # delete the uploaded file and installer database entry ins = installer.installer (package_address) app = ins.install () app.save () obj.delete ()
def button_update_terminatooor(self, cr, uid, ids, context=None): inst = installer() inst.update_terminatoor(self.read(cr, uid, ids, ['kettle_dir'])[0]['kettle_dir'].replace('data-integration', '')) return True
def button_update_terminatooor(self, cr, uid, ids, context=None): inst = installer() inst.update_terminatoor( self.read(cr, uid, ids, ['kettle_dir'])[0]['kettle_dir'].replace( 'data-integration', '')) return True
████╗ ████║██╔══██╗██║████╗ ██║ ████╗ ████║██╔════╝████╗ ██║██║ ██║ ██╔████╔██║███████║██║██╔██╗ ██║ ██╔████╔██║█████╗ ██╔██╗ ██║██║ ██║ ██║╚██╔╝██║██╔══██║██║██║╚██╗██║ ██║╚██╔╝██║██╔══╝ ██║╚██╗██║██║ ██║ ██║ ╚═╝ ██║██║ ██║██║██║ ╚████║ ██║ ╚═╝ ██║███████╗██║ ╚████║╚██████╔╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═════╝ {lvm_main.end_color} 1).To install Software 2).For Hadoop 3).Create Partition 4).For LVM 5).Exit""") ch = input("Enter your choice: ") if ch == '1': installer.installer() elif ch == '2': hadoop_main.hadoop_main() elif ch == '3': fdisk_main.parcreate() elif ch == '4': lvm_main.lvm_main() elif ch == '5': exit() else: print("Wrong Choice")