1
# Copyright 2012, 2013 Canonical Ltd. This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
4
# -*- coding: utf-8 -*-
6
Load qa questions into the collection for populating the scoring parts of
7
the quality assessment form.
12
def iter_categories():
13
"""Complete this function with work to be done for the migration/update.
15
db is the pymongo db instance for our datastore. Charms are in db.charms
24
(u'Check for integrity from upstream source', 1, u''),
25
(u'Fail gracefully if upstream source goes missing', 1, u''),
26
(u'Contain a suite of tests with the charm that pass', 1, u''),
27
(u'Passes tests from Jenkins on jujucharms.com', 1, u''),
35
(u'Contain a well tested AppArmor profile', 1, ''),
36
(u'Conform to security policies of the charm store', 1,
37
'Tight access control'),
38
(u"Doesn't run as root", 1, ''),
39
(u'Per instance or service access control', 1, ''),
48
u'Contain opinionated tuning options', 1,
49
u'Examples (depends on the service): "safe", "default",'
50
' "fast", "real fast, not so safe". Don\'t expose every'
51
' configuration, pick those that reflect real world usage.'
52
' Make it so I don\'t have to read the book.'
54
(u'Use existing interfaces with other charms', 1,
63
(u'Integrate data storage best practices', 1,
64
u'Backups based on service usage'),
65
(u"Handle the service's user data", 1, u'Version control'),
66
(u"Handle the service's user data", 1,
67
u'Automated snapshots and backup.'),
75
(u"Responds to add-unit based on the service's needs", 1,
76
u'Configuration should not require additional steps to scale'
78
(u'Be tested with a real workload, not just a synthetic'
80
(u'From upstream and existing devops practices for that'
82
(u'Community peer reviewed', 1, ''),
83
(u'Have a configure option for most performant configuration'
84
' if not the default', 1, ''),
92
(u'README with examples of use for a typical workload', 1, ''),
93
(u'README with examples of use for workloads at scale', 1, ''),
94
(u'README with examples of use recommend best-practice'
95
' relationships', 1, ''),
96
(u'Allow installation from pure upstream source', 1, ''),
97
(u'Allow installation from your local source', 1, ''),
98
(u'Allow installation from PPA (if available)', 1, ''),
99
(u'Allow installation from the Ubuntu repository', 1, ''),
105
u'Responsive to DevOps Needs',
107
(u'Allow for easy upgrade via juju upgrade-charm', 1, ''),
108
(u'Allow upgrading the service itself.', 1, ''),
109
(u'Responsive to user bug reports and concerns', 1, ''),
110
(u'Maintainable, easy to read and modify', 1, ''),
116
u'Upstream Friendly',
118
(u'Follow upstream best practices', 1,
119
u'Provide an option for a barebones "pure upstream"'
121
(u'Should go lock-step with deployment recommendations', 1,
122
u'Provide tip-of-trunk testing if feasible'),
123
(u'Fresh charm on release day!', 1, ''),
125
u"Endeavour to be upstream's recommended way to deploy"
126
' that service in the cloud (website mention or'
133
"""Add the sample data into the db."""
137
'description': cat[1],
139
'id': '{0}_{1}'.format(cat[0].lower(), i),
142
'extended_description': q[2]
143
} for i, q in enumerate(cat[2])]