コード例 #1
0
ファイル: profile.py プロジェクト: jklingin/cloudmesh
def profile():
    # bug the global var of the ditc should be used

    config = cm_config()
    configuration = config.get()
    projects = cm_projects()
    person = configuration['profile']
    keys = cm_keys()
    version = "tmp"

    if request.method == 'POST':
        print request.form
        print "p", projects
        # print "c", config
        projects.default = request.form['field-selected-project']
        configuration['security']['default'] = request.form[
            'field-selected-securityGroup']
        config.index = request.form['field-index']
        config.prefix = request.form['field-prefix']
        config.firstname = request.form['field-firstname']
        config.lastname = request.form['field-lastname']
        config.phone = request.form['field-phone']
        config.email = request.form['field-email']

        print "setting the values"
        config.default_cloud = request.form['field-default-cloud']
        # print request.form["field-cloud-activated-" + value]
        print "setting the cloud values"
        # print config
        config.write()
        print "WRITING DONE"

    time_now = datetime.now().strftime("%Y-%m-%d %H:%M")

    address = '<br>'.join(str(x) for x in person['address'])
    return render_template('profile.html',
                           updated=time_now,
                           keys=keys,
                           projects=projects,
                           person=person,
                           address=address,
                           # clouds=clouds,
                           config=config,
                           configuration=configuration,
                           version=version,
                           )
コード例 #2
0
ファイル: test_keys.py プロジェクト: jeff-ridgeway/cloudmesh
 def test00_file(self):
     HEADING()
     try:
         self.keys = cm_keys("wrong file")
     except:
         pass
コード例 #3
0
ファイル: test_keys.py プロジェクト: jeff-ridgeway/cloudmesh
 def setup(self):
     self.keys = cm_keys(self.filename)
コード例 #4
0
 def test00_file(self):
     HEADING()
     try:
         self.keys = cm_keys("wrong file")
     except:
         pass
コード例 #5
0
 def setup(self):
     self.keys = cm_keys(self.filename)