This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# create target folder | |
mkdir -p contexts | |
# get all contexts name | |
contexts=$(kubectl config get-contexts -o=name) | |
# cycle on each context | |
for context in $contexts; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def localstoreSettings(self): | |
db_url = os.environ['OPENSHIFT_MONGODB_DB_URL'] | |
app_name = os.environ['OPENSHIFT_APP_NAME'] | |
data = {'db_url': db_url, 'app_name': app_name} | |
return data | |
def amazonSettings(self): | |
key = os.environ['AMAZON_KEY'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def wiz_launch(self, cr, uid): | |
view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'hr_shift_wizard', 'act_window_wiz_shift_view') | |
return { | |
'name':"Display Name", | |
'view_mode': 'form', | |
'views': view_id, | |
'view_type': 'form', | |
'view_mode': 'form', | |
'res_model': 'hr.shift.wizard', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Products.CMFCore.utils import getToolByName | |
users = context['users.csv'].data.split('\n') | |
regtool = getToolByName(context, 'portal_registration') | |
index = 1 | |
imported_count = 0 | |
for user in users: | |
tokens = user.split(';') | |
if len(tokens) == 5: | |
passwd, id, last, first, email = tokens |