Bug 823490

Summary: Wrong instructions about os.environ: BookMarks quick start
Product: OKD Reporter: Attila Nagy <anagy>
Component: TemplatesAssignee: Dan McPherson <dmcphers>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: mshao, rmillner
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-08 17:59:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Attila Nagy 2012-05-21 11:35:20 UTC
Description of problem: BookMarks quick start app's instruction contains a misleading entry about os.environ variables

It says:

import os.environ           # import if you are using OPENSHIFT_* vars
'ENGINE': 'mysqlite3',
'NAME' = 'bookmarks'        # change it according to your database name, or use os.environ['OPENSHIFT_APP_NAME'].
'USER' = 'admin'            # change it according to your Root Username, or use os.environ['OPENSHIFT_DB_USERNAME'].
'PASSWORD' = 'xxxxxxxxxx'   # change it according to your Root Password, or use os.environ['OPENSHIFT_DB_PASSWORD'].
'HOST' = 'xx.xx.xx.xx'      # change it according to your Connection URL, or use os.environ['OPENSHIFT_DB_HOST'].
'PORT': '3306',             # change it according to your Connection URL, or use os.environ['OPENSHIFT_DB_PORT'].

However the import statement shouldn't work like that. It must be

1) from os import environ - then I can access environment variables as environ['variable_name']

2) import os - then I can access environment variables as os.environ['variable_name']

Comment 1 Attila Nagy 2012-05-21 12:28:40 UTC
One additional mistake:

Master Git URL is also wrong.

It is: git://github.com/lulinqing/openshift-bookmarks.git
It must be: git://github.com/lulinqing/openshift-bookmarks.git

Comment 2 Attila Nagy 2012-05-24 08:03:22 UTC
Sorry... My last comment was wrong.

It must be: git://github.com/openshift/BookMarks-openshift-quickstart.git

Comment 3 Attila Nagy 2012-05-24 08:08:01 UTC
Fixed by commit 7c2e60e8beef314a42572738ee52dfe911e63a80