Browse Source

Implement tiller gRPC channel clean up

We have seen issues with dangling threads in Armada. This is likely due to
a bug [0] in the version of gRPC that we were pinned to.

This patchset:

- moves us to the latest versions of the gRPC python libraries which add
  a new `channel.close()` method to cleanup channels.
- implements the python context manager api in the tiller handler
- uses the context manager api to explicitly scope tiller channel creation
  and cleanup to each Armada API and CLI call.

This also fixes a couples issues with error handling introduced in [1].

[0]: https://github.com/grpc/grpc/issues/14338
[1]: https://review.openstack.org/#/c/610384

Change-Id: I2577a20fc76c397aa33157dc12a0e1d36f49733e
Sean Eagan 5 months ago
parent
commit
7af22df7dc

+ 15
- 0
armada/api/__init__.py View File

@@ -23,6 +23,8 @@ import falcon
23 23
 from oslo_config import cfg
24 24
 from oslo_log import log as logging
25 25
 
26
+from armada.handlers.tiller import Tiller
27
+
26 28
 CONF = cfg.CONF
27 29
 
28 30
 
@@ -107,6 +109,19 @@ class BaseResource(object):
107 109
     def error(self, ctx, msg):
108 110
         self.log_error(ctx, log.ERROR, msg)
109 111
 
112
+    def get_tiller(self, req, resp):
113
+        dry_run = req.get_param_as_bool('dry_run')
114
+        tiller_port = req.get_param_as_int('tiller_port') or CONF.tiller_port
115
+        tiller_namespace = req.get_param(
116
+            'tiller_namespace',
117
+            default=CONF.tiller_namespace) or CONF.tiller_namespace
118
+
119
+        return Tiller(
120
+            tiller_host=req.get_param('tiller_host'),
121
+            tiller_port=tiller_port,
122
+            tiller_namespace=tiller_namespace,
123
+            dry_run=dry_run)
124
+
110 125
 
111 126
 class ArmadaRequestContext(object):
112 127
 

+ 21
- 25
armada/api/controller/armada.py View File

@@ -16,7 +16,6 @@ import json
16 16
 import yaml
17 17
 
18 18
 import falcon
19
-from oslo_config import cfg
20 19
 
21 20
 from armada import api
22 21
 from armada.common import policy
@@ -25,8 +24,6 @@ from armada.handlers.armada import Armada
25 24
 from armada.handlers.document import ReferenceResolver
26 25
 from armada.handlers.override import Override
27 26
 
28
-CONF = cfg.CONF
29
-
30 27
 
31 28
 class Apply(api.BaseResource):
32 29
     """Controller for installing and updating charts defined in an Armada
@@ -71,31 +68,30 @@ class Apply(api.BaseResource):
71 68
                 message="Request must be in application/x-yaml"
72 69
                 "or application/json")
73 70
         try:
74
-            armada = Armada(
75
-                documents,
76
-                disable_update_pre=req.get_param_as_bool('disable_update_pre'),
77
-                disable_update_post=req.get_param_as_bool(
78
-                    'disable_update_post'),
79
-                enable_chart_cleanup=req.get_param_as_bool(
80
-                    'enable_chart_cleanup'),
81
-                dry_run=req.get_param_as_bool('dry_run'),
82
-                force_wait=req.get_param_as_bool('wait'),
83
-                timeout=req.get_param_as_int('timeout'),
84
-                tiller_host=req.get_param('tiller_host'),
85
-                tiller_port=req.get_param_as_int('tiller_port') or
86
-                CONF.tiller_port,
87
-                tiller_namespace=req.get_param(
88
-                    'tiller_namespace', default=CONF.tiller_namespace),
89
-                target_manifest=req.get_param('target_manifest'))
71
+            with self.get_tiller(req, resp) as tiller:
72
+
73
+                armada = Armada(
74
+                    documents,
75
+                    disable_update_pre=req.get_param_as_bool(
76
+                        'disable_update_pre'),
77
+                    disable_update_post=req.get_param_as_bool(
78
+                        'disable_update_post'),
79
+                    enable_chart_cleanup=req.get_param_as_bool(
80
+                        'enable_chart_cleanup'),
81
+                    dry_run=req.get_param_as_bool('dry_run'),
82
+                    force_wait=req.get_param_as_bool('wait'),
83
+                    timeout=req.get_param_as_int('timeout'),
84
+                    tiller=tiller,
85
+                    target_manifest=req.get_param('target_manifest'))
90 86
 
91
-            msg = armada.sync()
87
+                msg = armada.sync()
92 88
 
93
-            resp.body = json.dumps({
94
-                'message': msg,
95
-            })
89
+                resp.body = json.dumps({
90
+                    'message': msg,
91
+                })
96 92
 
97
-            resp.content_type = 'application/json'
98
-            resp.status = falcon.HTTP_200
93
+                resp.content_type = 'application/json'
94
+                resp.status = falcon.HTTP_200
99 95
         except exceptions.ManifestException as e:
100 96
             self.return_error(resp, falcon.HTTP_400, message=str(e))
101 97
         except Exception as e:

+ 14
- 21
armada/api/controller/rollback.py View File

@@ -19,7 +19,6 @@ from oslo_config import cfg
19 19
 
20 20
 from armada import api
21 21
 from armada.common import policy
22
-from armada.handlers.tiller import Tiller
23 22
 
24 23
 CONF = cfg.CONF
25 24
 
@@ -33,26 +32,20 @@ class Rollback(api.BaseResource):
33 32
         try:
34 33
             dry_run = req.get_param_as_bool('dry_run')
35 34
 
36
-            tiller = Tiller(
37
-                tiller_host=req.get_param('tiller_host'),
38
-                tiller_port=req.get_param_as_int('tiller_port') or
39
-                CONF.tiller_port,
40
-                tiller_namespace=req.get_param(
41
-                    'tiller_namespace', default=CONF.tiller_namespace),
42
-                dry_run=dry_run)
43
-
44
-            tiller.rollback_release(
45
-                release,
46
-                req.get_param_as_int('version') or 0,
47
-                wait=req.get_param_as_bool('wait'),
48
-                timeout=req.get_param_as_int('timeout') or 0,
49
-                force=req.get_param_as_bool('force'),
50
-                recreate_pods=req.get_param_as_bool('recreate_pods'))
51
-
52
-            resp.body = json.dumps({
53
-                'message': ('(dry run) ' if dry_run else '') +
54
-                'Rollback of {} complete.'.format(release),
55
-            })
35
+            with self.get_tiller(req, resp) as tiller:
36
+
37
+                tiller.rollback_release(
38
+                    release,
39
+                    req.get_param_as_int('version') or 0,
40
+                    wait=req.get_param_as_bool('wait'),
41
+                    timeout=req.get_param_as_int('timeout') or 0,
42
+                    force=req.get_param_as_bool('force'),
43
+                    recreate_pods=req.get_param_as_bool('recreate_pods'))
44
+
45
+                resp.body = json.dumps({
46
+                    'message': ('(dry run) ' if dry_run else '') +
47
+                    'Rollback of {} complete.'.format(release),
48
+                })
56 49
 
57 50
             resp.content_type = 'application/json'
58 51
             resp.status = falcon.HTTP_200

+ 7
- 31
armada/api/controller/test.py View File

@@ -22,7 +22,6 @@ from armada import api
22 22
 from armada.common import policy
23 23
 from armada import const
24 24
 from armada.handlers.test import test_release_for_success
25
-from armada.handlers.tiller import Tiller
26 25
 from armada.handlers.manifest import Manifest
27 26
 from armada.utils.release import release_prefixer
28 27
 from armada.utils import validate
@@ -38,24 +37,13 @@ class TestReleasesReleaseNameController(api.BaseResource):
38 37
     @policy.enforce('armada:test_release')
39 38
     def on_get(self, req, resp, release):
40 39
         self.logger.info('RUNNING: %s', release)
41
-        try:
42
-            tiller = Tiller(
43
-                tiller_host=req.get_param('tiller_host'),
44
-                tiller_port=req.get_param_as_int('tiller_port') or
45
-                CONF.tiller_port,
46
-                tiller_namespace=req.get_param(
47
-                    'tiller_namespace', default=CONF.tiller_namespace))
40
+        with self.get_tiller(req, resp) as tiller:
41
+
48 42
             cleanup = req.get_param_as_bool('cleanup')
49 43
             if cleanup is None:
50 44
                 cleanup = False
51 45
             success = test_release_for_success(
52 46
                 tiller, release, cleanup=cleanup)
53
-        # TODO(fmontei): Provide more sensible exception(s) here.
54
-        except Exception as e:
55
-            err_message = 'Failed to test {}: {}'.format(release, e)
56
-            self.error(req.context, err_message)
57
-            return self.return_error(
58
-                resp, falcon.HTTP_500, message=err_message)
59 47
 
60 48
         if success:
61 49
             msg = {
@@ -119,23 +107,10 @@ class TestReleasesManifestController(api.BaseResource):
119 107
     @policy.enforce('armada:test_manifest')
120 108
     def on_post(self, req, resp):
121 109
         # TODO(fmontei): Validation Content-Type is application/x-yaml.
110
+        with self.get_tiller(req, resp) as tiller:
111
+            return self.handle(req, resp, tiller)
122 112
 
123
-        target_manifest = req.get_param('target_manifest', None)
124
-
125
-        try:
126
-            tiller = Tiller(
127
-                tiller_host=req.get_param('tiller_host'),
128
-                tiller_port=req.get_param_as_int('tiller_port') or
129
-                CONF.tiller_port,
130
-                tiller_namespace=req.get_param(
131
-                    'tiller_namespace', default=CONF.tiller_namespace))
132
-        # TODO(fmontei): Provide more sensible exception(s) here.
133
-        except Exception:
134
-            err_message = 'Failed to initialize Tiller handler.'
135
-            self.error(req.context, err_message)
136
-            return self.return_error(
137
-                resp, falcon.HTTP_500, message=err_message)
138
-
113
+    def handle(self, req, resp, tiller):
139 114
         try:
140 115
             documents = self.req_yaml(req, default=[])
141 116
         except yaml.YAMLError:
@@ -143,9 +118,10 @@ class TestReleasesManifestController(api.BaseResource):
143 118
             return self.return_error(
144 119
                 resp, falcon.HTTP_400, message=err_message)
145 120
 
121
+        target_manifest = req.get_param('target_manifest', None)
146 122
         is_valid = self._validate_documents(req, resp, documents)
147 123
         if not is_valid:
148
-            return resp
124
+            return
149 125
 
150 126
         armada_obj = Manifest(
151 127
             documents, target_manifest=target_manifest).get_manifest()

+ 30
- 40
armada/api/controller/tiller.py View File

@@ -20,7 +20,6 @@ from oslo_log import log as logging
20 20
 
21 21
 from armada import api
22 22
 from armada.common import policy
23
-from armada.handlers.tiller import Tiller
24 23
 
25 24
 CONF = cfg.CONF
26 25
 LOG = logging.getLogger(__name__)
@@ -34,27 +33,23 @@ class Status(api.BaseResource):
34 33
         get tiller status
35 34
         '''
36 35
         try:
37
-            tiller = Tiller(
38
-                tiller_host=req.get_param('tiller_host'),
39
-                tiller_port=req.get_param_as_int('tiller_port') or
40
-                CONF.tiller_port,
41
-                tiller_namespace=req.get_param(
42
-                    'tiller_namespace', default=CONF.tiller_namespace))
43
-
44
-            LOG.debug('Tiller (Status) at: %s:%s, namespace=%s, '
45
-                      'timeout=%s', tiller.tiller_host, tiller.tiller_port,
46
-                      tiller.tiller_namespace, tiller.timeout)
47
-
48
-            message = {
49
-                'tiller': {
50
-                    'state': tiller.tiller_status(),
51
-                    'version': tiller.tiller_version()
36
+            with self.get_tiller(req, resp) as tiller:
37
+
38
+                LOG.debug(
39
+                    'Tiller (Status) at: %s:%s, namespace=%s, '
40
+                    'timeout=%s', tiller.tiller_host, tiller.tiller_port,
41
+                    tiller.tiller_namespace, tiller.timeout)
42
+
43
+                message = {
44
+                    'tiller': {
45
+                        'state': tiller.tiller_status(),
46
+                        'version': tiller.tiller_version()
47
+                    }
52 48
                 }
53
-            }
54 49
 
55
-            resp.status = falcon.HTTP_200
56
-            resp.body = json.dumps(message)
57
-            resp.content_type = 'application/json'
50
+                resp.status = falcon.HTTP_200
51
+                resp.body = json.dumps(message)
52
+                resp.content_type = 'application/json'
58 53
 
59 54
         except Exception as e:
60 55
             err_message = 'Failed to get Tiller Status: {}'.format(e)
@@ -69,26 +64,21 @@ class Release(api.BaseResource):
69 64
         '''Controller for listing Tiller releases.
70 65
         '''
71 66
         try:
72
-            tiller = Tiller(
73
-                tiller_host=req.get_param('tiller_host'),
74
-                tiller_port=req.get_param_as_int('tiller_port') or
75
-                CONF.tiller_port,
76
-                tiller_namespace=req.get_param(
77
-                    'tiller_namespace', default=CONF.tiller_namespace))
78
-
79
-            LOG.debug(
80
-                'Tiller (Release) at: %s:%s, namespace=%s, '
81
-                'timeout=%s', tiller.tiller_host, tiller.tiller_port,
82
-                tiller.tiller_namespace, tiller.timeout)
83
-
84
-            releases = {}
85
-            for release in tiller.list_releases():
86
-                releases.setdefault(release.namespace, [])
87
-                releases[release.namespace].append(release.name)
88
-
89
-            resp.body = json.dumps({'releases': releases})
90
-            resp.content_type = 'application/json'
91
-            resp.status = falcon.HTTP_200
67
+            with self.get_tiller(req, resp) as tiller:
68
+
69
+                LOG.debug(
70
+                    'Tiller (Release) at: %s:%s, namespace=%s, '
71
+                    'timeout=%s', tiller.tiller_host, tiller.tiller_port,
72
+                    tiller.tiller_namespace, tiller.timeout)
73
+
74
+                releases = {}
75
+                for release in tiller.list_releases():
76
+                    releases.setdefault(release.namespace, [])
77
+                    releases[release.namespace].append(release.name)
78
+
79
+                resp.body = json.dumps({'releases': releases})
80
+                resp.content_type = 'application/json'
81
+                resp.status = falcon.HTTP_200
92 82
 
93 83
         except Exception as e:
94 84
             err_message = 'Unable to find Tiller Releases: {}'.format(e)

+ 1
- 2
armada/api/server.py View File

@@ -78,8 +78,7 @@ def create(enable_middleware=CONF.middleware):
78 78
     policy.Enforcer(CONF)
79 79
 
80 80
     # Error handlers (FILO handling)
81
-    api.add_error_handler(exceptions.ArmadaBaseException,
82
-                          exceptions.default_exception_handler)
81
+    api.add_error_handler(Exception, exceptions.default_exception_handler)
83 82
     api.add_error_handler(exceptions.ArmadaAPIException,
84 83
                           exceptions.ArmadaAPIException.handle)
85 84
 

+ 21
- 17
armada/cli/apply.py View File

@@ -21,6 +21,7 @@ from armada.cli import CliAction
21 21
 from armada.exceptions.source_exceptions import InvalidPathException
22 22
 from armada.handlers.armada import Armada
23 23
 from armada.handlers.document import ReferenceResolver
24
+from armada.handlers.tiller import Tiller
24 25
 
25 26
 CONF = cfg.CONF
26 27
 
@@ -198,23 +199,26 @@ class ApplyManifest(CliAction):
198 199
             return
199 200
 
200 201
         if not self.ctx.obj.get('api', False):
201
-            armada = Armada(
202
-                documents,
203
-                disable_update_pre=self.disable_update_pre,
204
-                disable_update_post=self.disable_update_post,
205
-                enable_chart_cleanup=self.enable_chart_cleanup,
206
-                dry_run=self.dry_run,
207
-                set_ovr=self.set,
208
-                force_wait=self.wait,
209
-                timeout=self.timeout,
210
-                tiller_host=self.tiller_host,
211
-                tiller_port=self.tiller_port,
212
-                tiller_namespace=self.tiller_namespace,
213
-                values=self.values,
214
-                target_manifest=self.target_manifest)
215
-
216
-            resp = armada.sync()
217
-            self.output(resp)
202
+            with Tiller(
203
+                    tiller_host=self.tiller_host,
204
+                    tiller_port=self.tiller_port,
205
+                    tiller_namespace=self.tiller_namespace,
206
+                    dry_run=self.dry_run) as tiller:
207
+                armada = Armada(
208
+                    documents,
209
+                    disable_update_pre=self.disable_update_pre,
210
+                    disable_update_post=self.disable_update_post,
211
+                    enable_chart_cleanup=self.enable_chart_cleanup,
212
+                    dry_run=self.dry_run,
213
+                    set_ovr=self.set,
214
+                    force_wait=self.wait,
215
+                    timeout=self.timeout,
216
+                    tiller=tiller,
217
+                    values=self.values,
218
+                    target_manifest=self.target_manifest)
219
+
220
+                resp = armada.sync()
221
+                self.output(resp)
218 222
         else:
219 223
             if len(self.values) > 0:
220 224
                 self.logger.error(

+ 6
- 2
armada/cli/delete.py View File

@@ -88,8 +88,12 @@ class DeleteChartManifest(CliAction):
88 88
         self.tiller_port = tiller_port
89 89
 
90 90
     def invoke(self):
91
-        tiller = Tiller(
92
-            tiller_host=self.tiller_host, tiller_port=self.tiller_port)
91
+        with Tiller(
92
+                tiller_host=self.tiller_host,
93
+                tiller_port=self.tiller_port) as tiller:
94
+            self.handle(tiller)
95
+
96
+    def handle(self, tiller):
93 97
         known_release_names = [release[0] for release in tiller.list_charts()]
94 98
 
95 99
         if self.releases:

+ 15
- 15
armada/cli/rollback.py View File

@@ -110,21 +110,21 @@ class Rollback(CliAction):
110 110
         self.recreate_pods = recreate_pods
111 111
 
112 112
     def invoke(self):
113
-        tiller = Tiller(
114
-            tiller_host=self.tiller_host,
115
-            tiller_port=self.tiller_port,
116
-            tiller_namespace=self.tiller_namespace,
117
-            dry_run=self.dry_run)
118
-
119
-        response = tiller.rollback_release(
120
-            self.release,
121
-            self.version,
122
-            wait=self.wait,
123
-            timeout=self.timeout,
124
-            force=self.force,
125
-            recreate_pods=self.recreate_pods)
126
-
127
-        self.output(response)
113
+        with Tiller(
114
+                tiller_host=self.tiller_host,
115
+                tiller_port=self.tiller_port,
116
+                tiller_namespace=self.tiller_namespace,
117
+                dry_run=self.dry_run) as tiller:
118
+
119
+            response = tiller.rollback_release(
120
+                self.release,
121
+                self.version,
122
+                wait=self.wait,
123
+                timeout=self.timeout,
124
+                force=self.force,
125
+                recreate_pods=self.recreate_pods)
126
+
127
+            self.output(response)
128 128
 
129 129
     def output(self, response):
130 130
         self.logger.info(('(dry run) ' if self.dry_run else '') +

+ 8
- 4
armada/cli/test.py View File

@@ -105,10 +105,14 @@ class TestChartManifest(CliAction):
105 105
         self.cleanup = cleanup
106 106
 
107 107
     def invoke(self):
108
-        tiller = Tiller(
109
-            tiller_host=self.tiller_host,
110
-            tiller_port=self.tiller_port,
111
-            tiller_namespace=self.tiller_namespace)
108
+        with Tiller(
109
+                tiller_host=self.tiller_host,
110
+                tiller_port=self.tiller_port,
111
+                tiller_namespace=self.tiller_namespace) as tiller:
112
+
113
+            self.handle(tiller)
114
+
115
+    def handle(self, tiller):
112 116
         known_release_names = [release[0] for release in tiller.list_charts()]
113 117
 
114 118
         if self.release:

+ 7
- 4
armada/cli/tiller.py View File

@@ -84,11 +84,14 @@ class TillerServices(CliAction):
84 84
 
85 85
     def invoke(self):
86 86
 
87
-        tiller = Tiller(
88
-            tiller_host=self.tiller_host,
89
-            tiller_port=self.tiller_port,
90
-            tiller_namespace=self.tiller_namespace)
87
+        with Tiller(
88
+                tiller_host=self.tiller_host,
89
+                tiller_port=self.tiller_port,
90
+                tiller_namespace=self.tiller_namespace) as tiller:
91 91
 
92
+            self.handle(tiller)
93
+
94
+    def handle(self, tiller):
92 95
         if self.status:
93 96
             if not self.ctx.obj.get('api', False):
94 97
                 self.logger.info('Tiller Service: %s', tiller.tiller_status())

+ 1
- 1
armada/exceptions/base_exception.py View File

@@ -165,7 +165,7 @@ def default_exception_handler(ex, req, resp, params):
165 165
     else:
166 166
         # take care of the uncaught stuff
167 167
         exc_string = traceback.format_exc()
168
-        logging.error('Unhanded Exception being handled: \n%s', exc_string)
168
+        LOG.error('Unhanded Exception being handled: \n%s', exc_string)
169 169
         format_error_resp(
170 170
             req,
171 171
             resp,

+ 3
- 18
armada/handlers/armada.py View File

@@ -26,7 +26,6 @@ from armada.exceptions import validate_exceptions
26 26
 from armada.handlers.chart_deploy import ChartDeploy
27 27
 from armada.handlers.manifest import Manifest
28 28
 from armada.handlers.override import Override
29
-from armada.handlers.tiller import Tiller
30 29
 from armada.utils.release import release_prefixer
31 30
 from armada.utils import source
32 31
 
@@ -42,6 +41,7 @@ class Armada(object):
42 41
 
43 42
     def __init__(self,
44 43
                  documents,
44
+                 tiller,
45 45
                  disable_update_pre=False,
46 46
                  disable_update_post=False,
47 47
                  enable_chart_cleanup=False,
@@ -49,9 +49,6 @@ class Armada(object):
49 49
                  set_ovr=None,
50 50
                  force_wait=False,
51 51
                  timeout=None,
52
-                 tiller_host=None,
53
-                 tiller_port=None,
54
-                 tiller_namespace=None,
55 52
                  values=None,
56 53
                  target_manifest=None,
57 54
                  k8s_wait_attempts=1,
@@ -60,6 +57,7 @@ class Armada(object):
60 57
         Initialize the Armada engine and establish a connection to Tiller.
61 58
 
62 59
         :param List[dict] documents: Armada documents.
60
+        :param tiller: Tiller instance to use.
63 61
         :param bool disable_update_pre: Disable pre-update Tiller operations.
64 62
         :param bool disable_update_post: Disable post-update Tiller
65 63
             operations.
@@ -69,11 +67,6 @@ class Armada(object):
69 67
             deployed, rather than using each chart's specified wait policy.
70 68
         :param int timeout: Specifies overall time in seconds that Tiller
71 69
             should wait for charts until timing out.
72
-        :param str tiller_host: Tiller host IP. Default is None.
73
-        :param int tiller_port: Tiller host port. Default is
74
-            ``CONF.tiller_port``.
75
-        :param str tiller_namespace: Tiller host namespace. Default is
76
-            ``CONF.tiller_namespace``.
77 70
         :param str target_manifest: The target manifest to run. Useful for
78 71
             specifying which manifest to run when multiple are available.
79 72
         :param int k8s_wait_attempts: The number of times to attempt waiting
@@ -81,19 +74,11 @@ class Armada(object):
81 74
         :param int k8s_wait_attempt_sleep: The time in seconds to sleep
82 75
             between attempts.
83 76
         '''
84
-        tiller_port = tiller_port or CONF.tiller_port
85
-        tiller_namespace = tiller_namespace or CONF.tiller_namespace
86 77
 
87 78
         self.enable_chart_cleanup = enable_chart_cleanup
88 79
         self.dry_run = dry_run
89 80
         self.force_wait = force_wait
90
-        # TODO: Use dependency injection i.e. pass in a Tiller instead of
91
-        #       creating it here.
92
-        self.tiller = Tiller(
93
-            tiller_host=tiller_host,
94
-            tiller_port=tiller_port,
95
-            tiller_namespace=tiller_namespace,
96
-            dry_run=dry_run)
81
+        self.tiller = tiller
97 82
         try:
98 83
             self.documents = Override(
99 84
                 documents, overrides=set_ovr,

+ 13
- 3
armada/handlers/tiller.py View File

@@ -80,12 +80,11 @@ class Tiller(object):
80 80
                  tiller_host=None,
81 81
                  tiller_port=None,
82 82
                  tiller_namespace=None,
83
-                 dry_run=False):
83
+                 dry_run=None):
84 84
         self.tiller_host = tiller_host
85 85
         self.tiller_port = tiller_port or CONF.tiller_port
86 86
         self.tiller_namespace = tiller_namespace or CONF.tiller_namespace
87
-
88
-        self.dry_run = dry_run
87
+        self.dry_run = dry_run or False
89 88
 
90 89
         # init k8s connectivity
91 90
         self.k8s = K8s()
@@ -818,3 +817,14 @@ class Tiller(object):
818 817
                     'using default %ss.', self.timeout)
819 818
             timeout = self.timeout
820 819
         return timeout
820
+
821
+    def close(self):
822
+        # Ensure channel was actually initialized before closing
823
+        if getattr(self, 'channel', None):
824
+            self.channel.close()
825
+
826
+    def __enter__(self):
827
+        return self
828
+
829
+    def __exit__(self, exc_type, exc_value, traceback):
830
+        self.close()

+ 15
- 4
armada/tests/unit/api/test_armada_controller.py View File

@@ -17,6 +17,7 @@ import mock
17 17
 
18 18
 from oslo_config import cfg
19 19
 
20
+from armada import api
20 21
 from armada.api.controller import armada as armada_api
21 22
 from armada.common.policies import base as policy_base
22 23
 from armada.tests import test_utils
@@ -27,9 +28,11 @@ CONF = cfg.CONF
27 28
 
28 29
 class ArmadaControllerTest(base.BaseControllerTest):
29 30
 
31
+    @mock.patch.object(api, 'Tiller')
30 32
     @mock.patch.object(armada_api, 'Armada')
31 33
     @mock.patch.object(armada_api, 'ReferenceResolver')
32
-    def test_armada_apply_resource(self, mock_resolver, mock_armada):
34
+    def test_armada_apply_resource(self, mock_resolver, mock_armada,
35
+                                   mock_tiller):
33 36
         """Tests the POST /api/v1.0/apply endpoint."""
34 37
         rules = {'armada:create_endpoints': '@'}
35 38
         self.policy.set_rules(rules)
@@ -45,6 +48,9 @@ class ArmadaControllerTest(base.BaseControllerTest):
45 48
             'timeout': '100'
46 49
         }
47 50
 
51
+        m_tiller = mock_tiller.return_value
52
+        m_tiller.__enter__.return_value = m_tiller
53
+
48 54
         expected_armada_options = {
49 55
             'disable_update_pre': False,
50 56
             'disable_update_post': False,
@@ -52,9 +58,7 @@ class ArmadaControllerTest(base.BaseControllerTest):
52 58
             'dry_run': False,
53 59
             'force_wait': False,
54 60
             'timeout': 100,
55
-            'tiller_host': None,
56
-            'tiller_port': 44134,
57
-            'tiller_namespace': 'kube-system',
61
+            'tiller': m_tiller,
58 62
             'target_manifest': None
59 63
         }
60 64
 
@@ -83,6 +87,13 @@ class ArmadaControllerTest(base.BaseControllerTest):
83 87
         }], **expected_armada_options)
84 88
         mock_armada.return_value.sync.assert_called()
85 89
 
90
+        mock_tiller.assert_called_with(
91
+            tiller_host=None,
92
+            tiller_port=44134,
93
+            tiller_namespace='kube-system',
94
+            dry_run=False)
95
+        m_tiller.__exit__.assert_called()
96
+
86 97
     def test_armada_apply_no_href(self):
87 98
         """Tests /api/v1.0/apply returns 400 when hrefs list is empty."""
88 99
         rules = {'armada:create_endpoints': '@'}

+ 7
- 4
armada/tests/unit/api/test_rollback_controller.py View File

@@ -16,7 +16,7 @@ import json
16 16
 
17 17
 import mock
18 18
 
19
-from armada.api.controller import rollback
19
+from armada import api
20 20
 from armada.common.policies import base as policy_base
21 21
 from armada.tests import test_utils
22 22
 from armada.tests.unit.api import base
@@ -24,12 +24,14 @@ from armada.tests.unit.api import base
24 24
 
25 25
 class RollbackReleaseControllerTest(base.BaseControllerTest):
26 26
 
27
-    @mock.patch.object(rollback, 'Tiller')
27
+    @mock.patch.object(api, 'Tiller')
28 28
     def test_rollback_controller_pass(self, mock_tiller):
29 29
         rules = {'armada:rollback_release': '@'}
30 30
         self.policy.set_rules(rules)
31 31
 
32
-        rollback_release = mock_tiller.return_value.rollback_release
32
+        m_tiller = mock_tiller.return_value
33
+        m_tiller.__enter__.return_value = m_tiller
34
+        rollback_release = m_tiller.rollback_release
33 35
         rollback_release.return_value = None
34 36
 
35 37
         tiller_host = 'host'
@@ -69,12 +71,13 @@ class RollbackReleaseControllerTest(base.BaseControllerTest):
69 71
         self.assertEqual(200, resp.status_code)
70 72
         self.assertEqual('Rollback of test-release complete.',
71 73
                          json.loads(resp.text)['message'])
74
+        m_tiller.__exit__.assert_called()
72 75
 
73 76
 
74 77
 @test_utils.attr(type=['negative'])
75 78
 class RollbackReleaseControllerNegativeTest(base.BaseControllerTest):
76 79
 
77
-    @mock.patch.object(rollback, 'Tiller')
80
+    @mock.patch.object(api, 'Tiller')
78 81
     def test_rollback_controller_tiller_exc_return_500(self, mock_tiller):
79 82
         rules = {'armada:rollback_release': '@'}
80 83
         self.policy.set_rules(rules)

+ 38
- 12
armada/tests/unit/api/test_test_controller.py View File

@@ -18,6 +18,7 @@ import yaml
18 18
 
19 19
 import mock
20 20
 
21
+from armada import api
21 22
 from armada.api.controller import test
22 23
 from armada.common.policies import base as policy_base
23 24
 from armada.exceptions import manifest_exceptions
@@ -28,7 +29,7 @@ from armada.tests.unit.api import base
28 29
 class TestReleasesManifestControllerTest(base.BaseControllerTest):
29 30
 
30 31
     @mock.patch.object(test, 'Manifest')
31
-    @mock.patch.object(test, 'Tiller')
32
+    @mock.patch.object(api, 'Tiller')
32 33
     def test_test_controller_with_manifest(self, mock_tiller, mock_manifest):
33 34
         rules = {'armada:test_manifest': '@'}
34 35
         self.policy.set_rules(rules)
@@ -41,6 +42,9 @@ class TestReleasesManifestControllerTest(base.BaseControllerTest):
41 42
             payload = f.read()
42 43
         documents = list(yaml.safe_load_all(payload))
43 44
 
45
+        m_tiller = mock_tiller.return_value
46
+        m_tiller.__enter__.return_value = m_tiller
47
+
44 48
         resp = self.app.simulate_post('/api/v1.0/tests', body=payload)
45 49
         self.assertEqual(200, resp.status_code)
46 50
 
@@ -49,13 +53,14 @@ class TestReleasesManifestControllerTest(base.BaseControllerTest):
49 53
         self.assertEqual(expected, result)
50 54
 
51 55
         mock_manifest.assert_called_once_with(documents, target_manifest=None)
52
-        self.assertTrue(mock_tiller.called)
56
+        mock_tiller.assert_called()
57
+        m_tiller.__exit__.assert_called()
53 58
 
54 59
 
55 60
 class TestReleasesReleaseNameControllerTest(base.BaseControllerTest):
56 61
 
57 62
     @mock.patch.object(test, 'test_release_for_success')
58
-    @mock.patch.object(test, 'Tiller')
63
+    @mock.patch.object(api, 'Tiller')
59 64
     def test_test_controller_test_pass(self, mock_tiller,
60 65
                                        mock_test_release_for_success):
61 66
         rules = {'armada:test_release': '@'}
@@ -63,6 +68,9 @@ class TestReleasesReleaseNameControllerTest(base.BaseControllerTest):
63 68
 
64 69
         mock_test_release_for_success.return_value = True
65 70
 
71
+        m_tiller = mock_tiller.return_value
72
+        m_tiller.__enter__.return_value = m_tiller
73
+
66 74
         release = 'fake-release'
67 75
         resp = self.app.simulate_get('/api/v1.0/test/{}'.format(release))
68 76
         mock_test_release_for_success.assert_has_calls(
@@ -70,44 +78,53 @@ class TestReleasesReleaseNameControllerTest(base.BaseControllerTest):
70 78
         self.assertEqual(200, resp.status_code)
71 79
         self.assertEqual('MESSAGE: Test Pass',
72 80
                          json.loads(resp.text)['message'])
81
+        m_tiller.__exit__.assert_called()
73 82
 
74 83
     @mock.patch.object(test, 'test_release_for_success')
75
-    @mock.patch.object(test, 'Tiller')
84
+    @mock.patch.object(api, 'Tiller')
76 85
     def test_test_controller_test_fail(self, mock_tiller,
77 86
                                        mock_test_release_for_success):
78 87
         rules = {'armada:test_release': '@'}
79 88
         self.policy.set_rules(rules)
80 89
 
90
+        m_tiller = mock_tiller.return_value
91
+        m_tiller.__enter__.return_value = m_tiller
92
+
81 93
         mock_test_release_for_success.return_value = False
82 94
         release = 'fake-release'
83 95
         resp = self.app.simulate_get('/api/v1.0/test/{}'.format(release))
84 96
         self.assertEqual(200, resp.status_code)
85 97
         self.assertEqual('MESSAGE: Test Fail',
86 98
                          json.loads(resp.text)['message'])
99
+        m_tiller.__exit__.assert_called()
87 100
 
88 101
     @mock.patch.object(test, 'test_release_for_success')
89
-    @mock.patch.object(test, 'Tiller')
102
+    @mock.patch.object(api, 'Tiller')
90 103
     def test_test_controller_cleanup(self, mock_tiller,
91 104
                                      mock_test_release_for_success):
92 105
         rules = {'armada:test_release': '@'}
93 106
         self.policy.set_rules(rules)
94 107
 
108
+        m_tiller = mock_tiller.return_value
109
+        m_tiller.__enter__.return_value = m_tiller
110
+
95 111
         mock_test_release_for_success.return_value = True
96 112
         release = 'fake-release'
97 113
         resp = self.app.simulate_get(
98 114
             '/api/v1.0/test/{}'.format(release), query_string='cleanup=true')
99 115
         mock_test_release_for_success.assert_has_calls(
100
-            [mock.call(mock_tiller.return_value, release, cleanup=True)])
116
+            [mock.call(m_tiller, release, cleanup=True)])
101 117
         self.assertEqual(200, resp.status_code)
102 118
         self.assertEqual('MESSAGE: Test Pass',
103 119
                          json.loads(resp.text)['message'])
120
+        m_tiller.__exit__.assert_called()
104 121
 
105 122
 
106 123
 @test_utils.attr(type=['negative'])
107 124
 class TestReleasesManifestControllerNegativeTest(base.BaseControllerTest):
108 125
 
109 126
     @mock.patch.object(test, 'Manifest')
110
-    @mock.patch.object(test, 'Tiller')
127
+    @mock.patch.object(api, 'Tiller')
111 128
     @mock.patch.object(test, 'test_release_for_success')
112 129
     def test_test_controller_tiller_exc_returns_500(
113 130
             self, mock_test_release_for_success, mock_tiller, _):
@@ -121,8 +138,9 @@ class TestReleasesManifestControllerNegativeTest(base.BaseControllerTest):
121 138
         self.assertEqual(500, resp.status_code)
122 139
 
123 140
     @mock.patch.object(test, 'Manifest')
124
-    @mock.patch.object(test, 'Tiller')
125
-    def test_test_controller_validation_failure_returns_400(self, *_):
141
+    @mock.patch.object(api, 'Tiller')
142
+    def test_test_controller_validation_failure_returns_400(
143
+            self, mock_tiller, mock_manifest):
126 144
         rules = {'armada:test_manifest': '@'}
127 145
         self.policy.set_rules(rules)
128 146
 
@@ -138,6 +156,9 @@ class TestReleasesManifestControllerNegativeTest(base.BaseControllerTest):
138 156
         resp = self.app.simulate_post('/api/v1.0/tests', body=invalid_payload)
139 157
         self.assertEqual(400, resp.status_code)
140 158
 
159
+        m_tiller = mock_tiller.return_value
160
+        m_tiller.__enter__.return_value = m_tiller
161
+
141 162
         resp_body = json.loads(resp.text)
142 163
         self.assertEqual(400, resp_body['code'])
143 164
         self.assertEqual(1, resp_body['details']['errorCount'])
@@ -158,11 +179,12 @@ class TestReleasesManifestControllerNegativeTest(base.BaseControllerTest):
158 179
         }, resp_body['details']['messageList'])
159 180
         self.assertEqual(('Failed to validate documents or generate Armada '
160 181
                           'Manifest from documents.'), resp_body['message'])
182
+        m_tiller.__exit__.assert_called()
161 183
 
162 184
     @mock.patch('armada.utils.validate.Manifest')
163
-    @mock.patch.object(test, 'Tiller')
185
+    @mock.patch.object(api, 'Tiller')
164 186
     def test_test_controller_manifest_failure_returns_400(
165
-            self, _, mock_manifest):
187
+            self, mock_tiller, mock_manifest):
166 188
         rules = {'armada:test_manifest': '@'}
167 189
         self.policy.set_rules(rules)
168 190
 
@@ -177,6 +199,9 @@ class TestReleasesManifestControllerNegativeTest(base.BaseControllerTest):
177 199
         resp = self.app.simulate_post('/api/v1.0/tests', body=payload)
178 200
         self.assertEqual(400, resp.status_code)
179 201
 
202
+        m_tiller = mock_tiller.return_value
203
+        m_tiller.__enter__.return_value = m_tiller
204
+
180 205
         resp_body = json.loads(resp.text)
181 206
         self.assertEqual(400, resp_body['code'])
182 207
         self.assertEqual(1, resp_body['details']['errorCount'])
@@ -195,12 +220,13 @@ class TestReleasesManifestControllerNegativeTest(base.BaseControllerTest):
195 220
         }], resp_body['details']['messageList'])
196 221
         self.assertEqual(('Failed to validate documents or generate Armada '
197 222
                           'Manifest from documents.'), resp_body['message'])
223
+        m_tiller.__exit__.assert_called()
198 224
 
199 225
 
200 226
 @test_utils.attr(type=['negative'])
201 227
 class TestReleasesReleaseNameControllerNegativeTest(base.BaseControllerTest):
202 228
 
203
-    @mock.patch.object(test, 'Tiller')
229
+    @mock.patch.object(api, 'Tiller')
204 230
     @mock.patch.object(test, 'test_release_for_success')
205 231
     def test_test_controller_tiller_exc_returns_500(
206 232
             self, mock_test_release_for_success, mock_tiller):

+ 33
- 17
armada/tests/unit/api/test_tiller_controller.py View File

@@ -16,7 +16,7 @@ import mock
16 16
 
17 17
 from oslo_config import cfg
18 18
 
19
-from armada.api.controller import tiller as tiller_controller
19
+from armada import api
20 20
 from armada.common.policies import base as policy_base
21 21
 from armada.tests import test_utils
22 22
 from armada.tests.unit.api import base
@@ -26,14 +26,16 @@ CONF = cfg.CONF
26 26
 
27 27
 class TillerControllerTest(base.BaseControllerTest):
28 28
 
29
-    @mock.patch.object(tiller_controller, 'Tiller')
29
+    @mock.patch.object(api, 'Tiller')
30 30
     def test_get_tiller_status(self, mock_tiller):
31 31
         """Tests GET /api/v1.0/status endpoint."""
32 32
         rules = {'tiller:get_status': '@'}
33 33
         self.policy.set_rules(rules)
34 34
 
35
-        mock_tiller.return_value.tiller_status.return_value = 'fake_status'
36
-        mock_tiller.return_value.tiller_version.return_value = 'fake_version'
35
+        m_tiller = mock_tiller.return_value
36
+        m_tiller.__enter__.return_value = m_tiller
37
+        m_tiller.tiller_status.return_value = 'fake_status'
38
+        m_tiller.tiller_version.return_value = 'fake_version'
37 39
 
38 40
         result = self.app.simulate_get('/api/v1.0/status')
39 41
         expected = {
@@ -48,16 +50,20 @@ class TillerControllerTest(base.BaseControllerTest):
48 50
         mock_tiller.assert_called_once_with(
49 51
             tiller_host=None,
50 52
             tiller_port=44134,
51
-            tiller_namespace='kube-system')
53
+            tiller_namespace='kube-system',
54
+            dry_run=None)
55
+        m_tiller.__exit__.assert_called()
52 56
 
53
-    @mock.patch.object(tiller_controller, 'Tiller')
57
+    @mock.patch.object(api, 'Tiller')
54 58
     def test_get_tiller_status_with_params(self, mock_tiller):
55 59
         """Tests GET /api/v1.0/status endpoint with query parameters."""
56 60
         rules = {'tiller:get_status': '@'}
57 61
         self.policy.set_rules(rules)
58 62
 
59
-        mock_tiller.return_value.tiller_status.return_value = 'fake_status'
60
-        mock_tiller.return_value.tiller_version.return_value = 'fake_version'
63
+        m_tiller = mock_tiller.return_value
64
+        m_tiller.__enter__.return_value = m_tiller
65
+        m_tiller.tiller_status.return_value = 'fake_status'
66
+        m_tiller.tiller_version.return_value = 'fake_version'
61 67
 
62 68
         result = self.app.simulate_get(
63 69
             '/api/v1.0/status',
@@ -79,9 +85,11 @@ class TillerControllerTest(base.BaseControllerTest):
79 85
         mock_tiller.assert_called_once_with(
80 86
             tiller_host='fake_host',
81 87
             tiller_port=98765,
82
-            tiller_namespace='fake_ns')
88
+            tiller_namespace='fake_ns',
89
+            dry_run=None)
90
+        m_tiller.__exit__.assert_called()
83 91
 
84
-    @mock.patch.object(tiller_controller, 'Tiller')
92
+    @mock.patch.object(api, 'Tiller')
85 93
     def test_tiller_releases(self, mock_tiller):
86 94
         """Tests GET /api/v1.0/releases endpoint."""
87 95
         rules = {'tiller:get_release': '@'}
@@ -92,7 +100,9 @@ class TillerControllerTest(base.BaseControllerTest):
92 100
             fake_release.configure_mock(name=name)
93 101
             return fake_release
94 102
 
95
-        mock_tiller.return_value.list_releases.return_value = [
103
+        m_tiller = mock_tiller.return_value
104
+        m_tiller.__enter__.return_value = m_tiller
105
+        m_tiller.list_releases.return_value = [
96 106
             _get_fake_release('foo', 'bar'),
97 107
             _get_fake_release('baz', 'qux')
98 108
         ]
@@ -109,10 +119,12 @@ class TillerControllerTest(base.BaseControllerTest):
109 119
         mock_tiller.assert_called_once_with(
110 120
             tiller_host=None,
111 121
             tiller_port=44134,
112
-            tiller_namespace='kube-system')
113
-        mock_tiller.return_value.list_releases.assert_called_once_with()
122
+            tiller_namespace='kube-system',
123
+            dry_run=None)
124
+        m_tiller.list_releases.assert_called_once_with()
125
+        m_tiller.__exit__.assert_called()
114 126
 
115
-    @mock.patch.object(tiller_controller, 'Tiller')
127
+    @mock.patch.object(api, 'Tiller')
116 128
     def test_tiller_releases_with_params(self, mock_tiller):
117 129
         """Tests GET /api/v1.0/releases endpoint with query parameters."""
118 130
         rules = {'tiller:get_release': '@'}
@@ -123,7 +135,9 @@ class TillerControllerTest(base.BaseControllerTest):
123 135
             fake_release.configure_mock(name=name)
124 136
             return fake_release
125 137
 
126
-        mock_tiller.return_value.list_releases.return_value = [
138
+        m_tiller = mock_tiller.return_value
139
+        m_tiller.__enter__.return_value = m_tiller
140
+        m_tiller.list_releases.return_value = [
127 141
             _get_fake_release('foo', 'bar'),
128 142
             _get_fake_release('baz', 'qux')
129 143
         ]
@@ -147,8 +161,10 @@ class TillerControllerTest(base.BaseControllerTest):
147 161
         mock_tiller.assert_called_once_with(
148 162
             tiller_host='fake_host',
149 163
             tiller_port=98765,
150
-            tiller_namespace='fake_ns')
151
-        mock_tiller.return_value.list_releases.assert_called_once_with()
164
+            tiller_namespace='fake_ns',
165
+            dry_run=None)
166
+        m_tiller.list_releases.assert_called_once_with()
167
+        m_tiller.__exit__.assert_called()
152 168
 
153 169
 
154 170
 class TillerControllerNegativeRbacTest(base.BaseControllerTest):

+ 21
- 31
armada/tests/unit/handlers/test_armada.py View File

@@ -281,24 +281,18 @@ class ArmadaHandlerTestCase(base.ArmadaTestCase):
281 281
         self.assertEqual(expected_config, armada_obj.manifest)
282 282
 
283 283
     @mock.patch.object(armada, 'source')
284
-    @mock.patch('armada.handlers.armada.Tiller')
285
-    def test_pre_flight_ops(self, mock_tiller, mock_source):
284
+    def test_pre_flight_ops(self, mock_source):
286 285
         """Test pre-flight checks and operations."""
287 286
         yaml_documents = list(yaml.safe_load_all(TEST_YAML))
288
-        armada_obj = armada.Armada(yaml_documents)
287
+        m_tiller = mock.Mock()
288
+        m_tiller.tiller_status.return_value = True
289
+        armada_obj = armada.Armada(yaml_documents, m_tiller)
289 290
 
290 291
         # Mock methods called by `pre_flight_ops()`.
291
-        m_tiller = mock_tiller.return_value
292
-        m_tiller.tiller_status.return_value = True
293 292
         mock_source.git_clone.return_value = CHART_SOURCES[0][0]
294 293
 
295 294
         self._test_pre_flight_ops(armada_obj)
296 295
 
297
-        mock_tiller.assert_called_once_with(
298
-            tiller_host=None,
299
-            tiller_namespace='kube-system',
300
-            tiller_port=44134,
301
-            dry_run=False)
302 296
         mock_source.git_clone.assert_called_once_with(
303 297
             'git://github.com/dummy/armada',
304 298
             'master',
@@ -306,17 +300,17 @@ class ArmadaHandlerTestCase(base.ArmadaTestCase):
306 300
             proxy_server=None)
307 301
 
308 302
     @mock.patch.object(armada, 'source')
309
-    @mock.patch('armada.handlers.armada.Tiller')
310
-    def test_post_flight_ops(self, mock_tiller, mock_source):
303
+    def test_post_flight_ops(self, mock_source):
311 304
         """Test post-flight operations."""
312 305
         yaml_documents = list(yaml.safe_load_all(TEST_YAML))
313
-        armada_obj = armada.Armada(yaml_documents)
314 306
 
315 307
         # Mock methods called by `pre_flight_ops()`.
316
-        m_tiller = mock_tiller.return_value
308
+        m_tiller = mock.Mock()
317 309
         m_tiller.tiller_status.return_value = True
318 310
         mock_source.git_clone.return_value = CHART_SOURCES[0][0]
319 311
 
312
+        armada_obj = armada.Armada(yaml_documents, m_tiller)
313
+
320 314
         self._test_pre_flight_ops(armada_obj)
321 315
 
322 316
         armada_obj.post_flight_ops()
@@ -343,22 +337,22 @@ class ArmadaHandlerTestCase(base.ArmadaTestCase):
343 337
         @mock.patch.object(armada.Armada, 'post_flight_ops')
344 338
         @mock.patch.object(armada.Armada, 'pre_flight_ops')
345 339
         @mock.patch('armada.handlers.chart_deploy.ChartBuilder')
346
-        @mock.patch('armada.handlers.armada.Tiller')
347 340
         @mock.patch.object(chart_deploy, 'test_release_for_success')
348
-        def _do_test(mock_test_release_for_success, mock_tiller,
349
-                     mock_chartbuilder, mock_pre_flight, mock_post_flight):
341
+        def _do_test(mock_test_release_for_success, mock_chartbuilder,
342
+                     mock_pre_flight, mock_post_flight):
350 343
             # Instantiate Armada object.
351 344
             yaml_documents = list(yaml.safe_load_all(TEST_YAML))
352
-            armada_obj = armada.Armada(yaml_documents)
345
+
346
+            m_tiller = mock.MagicMock()
347
+            m_tiller.list_releases.return_value = known_releases
348
+
349
+            armada_obj = armada.Armada(yaml_documents, m_tiller)
353 350
             armada_obj.chart_deploy.get_diff = mock.Mock()
354 351
 
355 352
             chart_group = armada_obj.manifest['armada']['chart_groups'][0]
356 353
             charts = chart_group['chart_group']
357 354
             cg_test_all_charts = chart_group.get('test_charts', True)
358 355
 
359
-            m_tiller = mock_tiller.return_value
360
-            m_tiller.list_releases.return_value = known_releases
361
-
362 356
             if test_failure_to_run:
363 357
 
364 358
                 def fail(tiller, release, timeout=None, cleanup=False):
@@ -663,30 +657,26 @@ class ArmadaHandlerTestCase(base.ArmadaTestCase):
663 657
 class ArmadaNegativeHandlerTestCase(base.ArmadaTestCase):
664 658
 
665 659
     @mock.patch.object(armada, 'source')
666
-    @mock.patch('armada.handlers.armada.Tiller')
667
-    def test_armada_get_manifest_exception(self, mock_tiller, mock_source):
660
+    def test_armada_get_manifest_exception(self, mock_source):
668 661
         """Test armada handling with invalid manifest."""
669 662
         yaml_documents = list(yaml.safe_load_all(TEST_YAML))
670 663
         error_re = ('Documents must be a list of documents with at least one '
671 664
                     'of each of the following schemas: .*')
672 665
         self.assertRaisesRegexp(ManifestException, error_re, armada.Armada,
673
-                                yaml_documents[:1])
666
+                                yaml_documents[:1], mock.MagicMock())
674 667
 
675 668
     @mock.patch.object(armada, 'source')
676
-    @mock.patch('armada.handlers.armada.Tiller')
677
-    def test_armada_override_exception(self, mock_tiller, mock_source):
669
+    def test_armada_override_exception(self, mock_source):
678 670
         """Test Armada checks with invalid chart override."""
679 671
         yaml_documents = list(yaml.safe_load_all(TEST_YAML))
680 672
         override = ('chart:example-chart-2:name=' 'overridden', )
681 673
 
682 674
         error_re = ('is not a valid override statement')
683 675
         with self.assertRaisesRegexp(InvalidOverrideValueException, error_re):
684
-            armada.Armada(yaml_documents, set_ovr=override)
676
+            armada.Armada(yaml_documents, mock.MagicMock(), set_ovr=override)
685 677
 
686 678
     @mock.patch.object(armada, 'source')
687
-    @mock.patch('armada.handlers.armada.Tiller')
688
-    def test_armada_manifest_exception_override_none(self, mock_tiller,
689
-                                                     mock_source):
679
+    def test_armada_manifest_exception_override_none(self, mock_source):
690 680
         """Test Armada checks with invalid manifest."""
691 681
         yaml_documents = list(yaml.safe_load_all(TEST_YAML))
692 682
         example_document = [
@@ -697,4 +687,4 @@ class ArmadaNegativeHandlerTestCase(base.ArmadaTestCase):
697 687
 
698 688
         error_re = ('Invalid document .*')
699 689
         with self.assertRaisesRegexp(InvalidManifestException, error_re):
700
-            armada.Armada(yaml_documents, set_ovr=None)
690
+            armada.Armada(yaml_documents, mock.MagicMock(), set_ovr=None)

+ 5
- 3
armada/tests/unit/handlers/test_tiller.py View File

@@ -33,7 +33,7 @@ class TillerTestCase(base.ArmadaTestCase):
33 33
     def test_install_release(self, mock_stub, mock_install_request,
34 34
                              mock_config, mock_grpc, mock_k8s, mock_ip):
35 35
         # instantiate Tiller object
36
-        mock_grpc.insecure_channel.return_value = None
36
+        mock_grpc.insecure_channel.return_value = mock.Mock()
37 37
         mock_ip.return_value = '0.0.0.0'
38 38
         tiller_obj = tiller.Tiller()
39 39
         assert tiller_obj._get_tiller_ip() == '0.0.0.0'
@@ -74,12 +74,14 @@ class TillerTestCase(base.ArmadaTestCase):
74 74
         mock_port.return_value = mock.sentinel.port
75 75
         mock_ip.return_value = mock.sentinel.ip
76 76
 
77
+        mock_channel = mock.Mock()
78
+
77 79
         # instantiate Tiller object
78
-        mock_grpc.insecure_channel.return_value = 'connected'
80
+        mock_grpc.insecure_channel.return_value = mock_channel
79 81
         tiller_obj = tiller.Tiller()
80 82
 
81 83
         self.assertIsNotNone(tiller_obj.channel)
82
-        self.assertEqual('connected', tiller_obj.channel)
84
+        self.assertEqual(mock_channel, tiller_obj.channel)
83 85
 
84 86
         mock_grpc.insecure_channel.assert_called_once_with(
85 87
             '%s:%s' % (str(mock.sentinel.ip), str(mock.sentinel.port)),

+ 8
- 9
hapi/chart/chart_pb2.py View File

@@ -7,7 +7,6 @@ from google.protobuf import descriptor as _descriptor
7 7
 from google.protobuf import message as _message
8 8
 from google.protobuf import reflection as _reflection
9 9
 from google.protobuf import symbol_database as _symbol_database
10
-from google.protobuf import descriptor_pb2
11 10
 # @@protoc_insertion_point(imports)
12 11
 
13 12
 _sym_db = _symbol_database.Default()
@@ -23,6 +22,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
23 22
   name='hapi/chart/chart.proto',
24 23
   package='hapi.chart',
25 24
   syntax='proto3',
25
+  serialized_options=_b('Z\005chart'),
26 26
   serialized_pb=_b('\n\x16hapi/chart/chart.proto\x12\nhapi.chart\x1a\x17hapi/chart/config.proto\x1a\x19hapi/chart/metadata.proto\x1a\x19hapi/chart/template.proto\x1a\x19google/protobuf/any.proto\"\xca\x01\n\x05\x43hart\x12&\n\x08metadata\x18\x01 \x01(\x0b\x32\x14.hapi.chart.Metadata\x12\'\n\ttemplates\x18\x02 \x03(\x0b\x32\x14.hapi.chart.Template\x12\'\n\x0c\x64\x65pendencies\x18\x03 \x03(\x0b\x32\x11.hapi.chart.Chart\x12\"\n\x06values\x18\x04 \x01(\x0b\x32\x12.hapi.chart.Config\x12#\n\x05\x66iles\x18\x05 \x03(\x0b\x32\x14.google.protobuf.AnyB\x07Z\x05\x63hartb\x06proto3')
27 27
   ,
28 28
   dependencies=[hapi_dot_chart_dot_config__pb2.DESCRIPTOR,hapi_dot_chart_dot_metadata__pb2.DESCRIPTOR,hapi_dot_chart_dot_template__pb2.DESCRIPTOR,google_dot_protobuf_dot_any__pb2.DESCRIPTOR,])
@@ -43,42 +43,42 @@ _CHART = _descriptor.Descriptor(
43 43
       has_default_value=False, default_value=None,
44 44
       message_type=None, enum_type=None, containing_type=None,
45 45
       is_extension=False, extension_scope=None,
46
-      options=None, file=DESCRIPTOR),
46
+      serialized_options=None, file=DESCRIPTOR),
47 47
     _descriptor.FieldDescriptor(
48 48
       name='templates', full_name='hapi.chart.Chart.templates', index=1,
49 49
       number=2, type=11, cpp_type=10, label=3,
50 50
       has_default_value=False, default_value=[],
51 51
       message_type=None, enum_type=None, containing_type=None,
52 52
       is_extension=False, extension_scope=None,
53
-      options=None, file=DESCRIPTOR),
53
+      serialized_options=None, file=DESCRIPTOR),
54 54
     _descriptor.FieldDescriptor(
55 55
       name='dependencies', full_name='hapi.chart.Chart.dependencies', index=2,
56 56
       number=3, type=11, cpp_type=10, label=3,
57 57
       has_default_value=False, default_value=[],
58 58
       message_type=None, enum_type=None, containing_type=None,
59 59
       is_extension=False, extension_scope=None,
60
-      options=None, file=DESCRIPTOR),
60
+      serialized_options=None, file=DESCRIPTOR),
61 61
     _descriptor.FieldDescriptor(
62 62
       name='values', full_name='hapi.chart.Chart.values', index=3,
63 63
       number=4, type=11, cpp_type=10, label=1,
64 64
       has_default_value=False, default_value=None,
65 65
       message_type=None, enum_type=None, containing_type=None,
66 66
       is_extension=False, extension_scope=None,
67
-      options=None, file=DESCRIPTOR),
67
+      serialized_options=None, file=DESCRIPTOR),
68 68
     _descriptor.FieldDescriptor(
69 69
       name='files', full_name='hapi.chart.Chart.files', index=4,
70 70
       number=5, type=11, cpp_type=10, label=3,
71 71
       has_default_value=False, default_value=[],
72 72
       message_type=None, enum_type=None, containing_type=None,
73 73
       is_extension=False, extension_scope=None,
74
-      options=None, file=DESCRIPTOR),
74
+      serialized_options=None, file=DESCRIPTOR),
75 75
   ],
76 76
   extensions=[
77 77
   ],
78 78
   nested_types=[],
79 79
   enum_types=[
80 80
   ],
81
-  options=None,
81
+  serialized_options=None,
82 82
   is_extendable=False,
83 83
   syntax='proto3',
84 84
   extension_ranges=[],
@@ -104,6 +104,5 @@ Chart = _reflection.GeneratedProtocolMessageType('Chart', (_message.Message,), d
104 104
 _sym_db.RegisterMessage(Chart)
105 105
 
106 106
 
107
-DESCRIPTOR.has_options = True
108
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\005chart'))
107
+DESCRIPTOR._options = None
109 108
 # @@protoc_insertion_point(module_scope)

+ 11
- 13
hapi/chart/config_pb2.py View File

@@ -7,7 +7,6 @@ from google.protobuf import descriptor as _descriptor
7 7
 from google.protobuf import message as _message
8 8
 from google.protobuf import reflection as _reflection
9 9
 from google.protobuf import symbol_database as _symbol_database
10
-from google.protobuf import descriptor_pb2
11 10
 # @@protoc_insertion_point(imports)
12 11
 
13 12
 _sym_db = _symbol_database.Default()
@@ -19,6 +18,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
19 18
   name='hapi/chart/config.proto',
20 19
   package='hapi.chart',
21 20
   syntax='proto3',
21
+  serialized_options=_b('Z\005chart'),
22 22
   serialized_pb=_b('\n\x17hapi/chart/config.proto\x12\nhapi.chart\"\x87\x01\n\x06\x43onfig\x12\x0b\n\x03raw\x18\x01 \x01(\t\x12.\n\x06values\x18\x02 \x03(\x0b\x32\x1e.hapi.chart.Config.ValuesEntry\x1a@\n\x0bValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.hapi.chart.Value:\x02\x38\x01\"\x16\n\x05Value\x12\r\n\x05value\x18\x01 \x01(\tB\x07Z\x05\x63hartb\x06proto3')
23 23
 )
24 24
 
@@ -38,21 +38,21 @@ _CONFIG_VALUESENTRY = _descriptor.Descriptor(
38 38
       has_default_value=False, default_value=_b("").decode('utf-8'),
39 39
       message_type=None, enum_type=None, containing_type=None,
40 40
       is_extension=False, extension_scope=None,
41
-      options=None, file=DESCRIPTOR),
41
+      serialized_options=None, file=DESCRIPTOR),
42 42
     _descriptor.FieldDescriptor(
43 43
       name='value', full_name='hapi.chart.Config.ValuesEntry.value', index=1,
44 44
       number=2, type=11, cpp_type=10, label=1,
45 45
       has_default_value=False, default_value=None,
46 46
       message_type=None, enum_type=None, containing_type=None,
47 47
       is_extension=False, extension_scope=None,
48
-      options=None, file=DESCRIPTOR),
48
+      serialized_options=None, file=DESCRIPTOR),
49 49
   ],
50 50
   extensions=[
51 51
   ],
52 52
   nested_types=[],
53 53
   enum_types=[
54 54
   ],
55
-  options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')),
55
+  serialized_options=_b('8\001'),
56 56
   is_extendable=False,
57 57
   syntax='proto3',
58 58
   extension_ranges=[],
@@ -75,21 +75,21 @@ _CONFIG = _descriptor.Descriptor(
75 75
       has_default_value=False, default_value=_b("").decode('utf-8'),
76 76
       message_type=None, enum_type=None, containing_type=None,
77 77
       is_extension=False, extension_scope=None,
78
-      options=None, file=DESCRIPTOR),
78
+      serialized_options=None, file=DESCRIPTOR),
79 79
     _descriptor.FieldDescriptor(
80 80
       name='values', full_name='hapi.chart.Config.values', index=1,
81 81
       number=2, type=11, cpp_type=10, label=3,
82 82
       has_default_value=False, default_value=[],
83 83
       message_type=None, enum_type=None, containing_type=None,
84 84
       is_extension=False, extension_scope=None,
85
-      options=None, file=DESCRIPTOR),
85
+      serialized_options=None, file=DESCRIPTOR),
86 86
   ],
87 87
   extensions=[
88 88
   ],
89 89
   nested_types=[_CONFIG_VALUESENTRY, ],
90 90
   enum_types=[
91 91
   ],
92
-  options=None,
92
+  serialized_options=None,
93 93
   is_extendable=False,
94 94
   syntax='proto3',
95 95
   extension_ranges=[],
@@ -113,14 +113,14 @@ _VALUE = _descriptor.Descriptor(
113 113
       has_default_value=False, default_value=_b("").decode('utf-8'),
114 114
       message_type=None, enum_type=None, containing_type=None,
115 115
       is_extension=False, extension_scope=None,
116
-      options=None, file=DESCRIPTOR),
116
+      serialized_options=None, file=DESCRIPTOR),
117 117
   ],
118 118
   extensions=[
119 119
   ],
120 120
   nested_types=[],
121 121
   enum_types=[
122 122
   ],
123
-  options=None,
123
+  serialized_options=None,
124 124
   is_extendable=False,
125 125
   syntax='proto3',
126 126
   extension_ranges=[],
@@ -160,8 +160,6 @@ Value = _reflection.GeneratedProtocolMessageType('Value', (_message.Message,), d
160 160
 _sym_db.RegisterMessage(Value)
161 161
 
162 162
 
163
-DESCRIPTOR.has_options = True
164
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\005chart'))
165
-_CONFIG_VALUESENTRY.has_options = True
166
-_CONFIG_VALUESENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001'))
163
+DESCRIPTOR._options = None
164
+_CONFIG_VALUESENTRY._options = None
167 165
 # @@protoc_insertion_point(module_scope)

+ 31
- 33
hapi/chart/metadata_pb2.py View File

@@ -7,7 +7,6 @@ from google.protobuf import descriptor as _descriptor
7 7
 from google.protobuf import message as _message
8 8
 from google.protobuf import reflection as _reflection
9 9
 from google.protobuf import symbol_database as _symbol_database
10
-from google.protobuf import descriptor_pb2
11 10
 # @@protoc_insertion_point(imports)
12 11
 
13 12
 _sym_db = _symbol_database.Default()
@@ -19,6 +18,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
19 18
   name='hapi/chart/metadata.proto',
20 19
   package='hapi.chart',
21 20
   syntax='proto3',
21
+  serialized_options=_b('Z\005chart'),
22 22
   serialized_pb=_b('\n\x19hapi/chart/metadata.proto\x12\nhapi.chart\"6\n\nMaintainer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x65mail\x18\x02 \x01(\t\x12\x0b\n\x03url\x18\x03 \x01(\t\"\xd5\x03\n\x08Metadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04home\x18\x02 \x01(\t\x12\x0f\n\x07sources\x18\x03 \x03(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x10\n\x08keywords\x18\x06 \x03(\t\x12+\n\x0bmaintainers\x18\x07 \x03(\x0b\x32\x16.hapi.chart.Maintainer\x12\x0e\n\x06\x65ngine\x18\x08 \x01(\t\x12\x0c\n\x04icon\x18\t \x01(\t\x12\x12\n\napiVersion\x18\n \x01(\t\x12\x11\n\tcondition\x18\x0b \x01(\t\x12\x0c\n\x04tags\x18\x0c \x01(\t\x12\x12\n\nappVersion\x18\r \x01(\t\x12\x12\n\ndeprecated\x18\x0e \x01(\x08\x12\x15\n\rtillerVersion\x18\x0f \x01(\t\x12:\n\x0b\x61nnotations\x18\x10 \x03(\x0b\x32%.hapi.chart.Metadata.AnnotationsEntry\x12\x13\n\x0bkubeVersion\x18\x11 \x01(\t\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\" \n\x06\x45ngine\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05GOTPL\x10\x01\x42\x07Z\x05\x63hartb\x06proto3')
23 23
 )
24 24
 
@@ -32,15 +32,15 @@ _METADATA_ENGINE = _descriptor.EnumDescriptor(
32 32
   values=[
33 33
     _descriptor.EnumValueDescriptor(
34 34
       name='UNKNOWN', index=0, number=0,
35
-      options=None,
35
+      serialized_options=None,
36 36
       type=None),
37 37
     _descriptor.EnumValueDescriptor(
38 38
       name='GOTPL', index=1, number=1,
39
-      options=None,
39
+      serialized_options=None,
40 40
       type=None),
41 41
   ],
42 42
   containing_type=None,
43
-  options=None,
43
+  serialized_options=None,
44 44
   serialized_start=535,
45 45
   serialized_end=567,
46 46
 )
@@ -60,28 +60,28 @@ _MAINTAINER = _descriptor.Descriptor(
60 60
       has_default_value=False, default_value=_b("").decode('utf-8'),
61 61
       message_type=None, enum_type=None, containing_type=None,
62 62
       is_extension=False, extension_scope=None,
63
-      options=None, file=DESCRIPTOR),
63
+      serialized_options=None, file=DESCRIPTOR),
64 64
     _descriptor.FieldDescriptor(
65 65
       name='email', full_name='hapi.chart.Maintainer.email', index=1,
66 66
       number=2, type=9, cpp_type=9, label=1,
67 67
       has_default_value=False, default_value=_b("").decode('utf-8'),
68 68
       message_type=None, enum_type=None, containing_type=None,
69 69
       is_extension=False, extension_scope=None,
70
-      options=None, file=DESCRIPTOR),
70
+      serialized_options=None, file=DESCRIPTOR),
71 71
     _descriptor.FieldDescriptor(
72 72
       name='url', full_name='hapi.chart.Maintainer.url', index=2,
73 73
       number=3, type=9, cpp_type=9, label=1,
74 74
       has_default_value=False, default_value=_b("").decode('utf-8'),
75 75
       message_type=None, enum_type=None, containing_type=None,
76 76
       is_extension=False, extension_scope=None,
77
-      options=None, file=DESCRIPTOR),
77
+      serialized_options=None, file=DESCRIPTOR),
78 78
   ],
79 79
   extensions=[
80 80
   ],
81 81
   nested_types=[],
82 82
   enum_types=[
83 83
   ],
84
-  options=None,
84
+  serialized_options=None,
85 85
   is_extendable=False,
86 86
   syntax='proto3',
87 87
   extension_ranges=[],
@@ -105,21 +105,21 @@ _METADATA_ANNOTATIONSENTRY = _descriptor.Descriptor(
105 105
       has_default_value=False, default_value=_b("").decode('utf-8'),
106 106
       message_type=None, enum_type=None, containing_type=None,
107 107
       is_extension=False, extension_scope=None,
108
-      options=None, file=DESCRIPTOR),
108
+      serialized_options=None, file=DESCRIPTOR),
109 109
     _descriptor.FieldDescriptor(
110 110
       name='value', full_name='hapi.chart.Metadata.AnnotationsEntry.value', index=1,
111 111
       number=2, type=9, cpp_type=9, label=1,
112 112
       has_default_value=False, default_value=_b("").decode('utf-8'),
113 113
       message_type=None, enum_type=None, containing_type=None,
114 114
       is_extension=False, extension_scope=None,
115
-      options=None, file=DESCRIPTOR),
115
+      serialized_options=None, file=DESCRIPTOR),
116 116
   ],
117 117
   extensions=[
118 118
   ],
119 119
   nested_types=[],
120 120
   enum_types=[
121 121
   ],
122
-  options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')),
122
+  serialized_options=_b('8\001'),
123 123
   is_extendable=False,
124 124
   syntax='proto3',
125 125
   extension_ranges=[],
@@ -142,119 +142,119 @@ _METADATA = _descriptor.Descriptor(
142 142
       has_default_value=False, default_value=_b("").decode('utf-8'),
143 143
       message_type=None, enum_type=None, containing_type=None,
144 144
       is_extension=False, extension_scope=None,
145
-      options=None, file=DESCRIPTOR),
145
+      serialized_options=None, file=DESCRIPTOR),
146 146
     _descriptor.FieldDescriptor(
147 147
       name='home', full_name='hapi.chart.Metadata.home', index=1,
148 148
       number=2, type=9, cpp_type=9, label=1,
149 149
       has_default_value=False, default_value=_b("").decode('utf-8'),
150 150
       message_type=None, enum_type=None, containing_type=None,
151 151
       is_extension=False, extension_scope=None,
152
-      options=None, file=DESCRIPTOR),
152
+      serialized_options=None, file=DESCRIPTOR),
153 153
     _descriptor.FieldDescriptor(
154 154
       name='sources', full_name='hapi.chart.Metadata.sources', index=2,
155 155
       number=3, type=9, cpp_type=9, label=3,
156 156
       has_default_value=False, default_value=[],
157 157
       message_type=None, enum_type=None, containing_type=None,
158 158
       is_extension=False, extension_scope=None,
159
-      options=None, file=DESCRIPTOR),
159
+      serialized_options=None, file=DESCRIPTOR),
160 160
     _descriptor.FieldDescriptor(
161 161
       name='version', full_name='hapi.chart.Metadata.version', index=3,
162 162
       number=4, type=9, cpp_type=9, label=1,
163 163
       has_default_value=False, default_value=_b("").decode('utf-8'),
164 164
       message_type=None, enum_type=None, containing_type=None,
165 165
       is_extension=False, extension_scope=None,
166
-      options=None, file=DESCRIPTOR),
166
+      serialized_options=None, file=DESCRIPTOR),
167 167
     _descriptor.FieldDescriptor(
168 168
       name='description', full_name='hapi.chart.Metadata.description', index=4,
169 169
       number=5, type=9, cpp_type=9, label=1,
170 170
       has_default_value=False, default_value=_b("").decode('utf-8'),
171 171
       message_type=None, enum_type=None, containing_type=None,
172 172
       is_extension=False, extension_scope=None,
173
-      options=None, file=DESCRIPTOR),
173
+      serialized_options=None, file=DESCRIPTOR),
174 174
     _descriptor.FieldDescriptor(
175 175
       name='keywords', full_name='hapi.chart.Metadata.keywords', index=5,
176 176
       number=6, type=9, cpp_type=9, label=3,
177 177
       has_default_value=False, default_value=[],
178 178
       message_type=None, enum_type=None, containing_type=None,
179 179
       is_extension=False, extension_scope=None,
180
-      options=None, file=DESCRIPTOR),
180
+      serialized_options=None, file=DESCRIPTOR),
181 181
     _descriptor.FieldDescriptor(
182 182
       name='maintainers', full_name='hapi.chart.Metadata.maintainers', index=6,
183 183
       number=7, type=11, cpp_type=10, label=3,
184 184
       has_default_value=False, default_value=[],
185 185
       message_type=None, enum_type=None, containing_type=None,
186 186
       is_extension=False, extension_scope=None,
187
-      options=None, file=DESCRIPTOR),
187
+      serialized_options=None, file=DESCRIPTOR),
188 188
     _descriptor.FieldDescriptor(
189 189
       name='engine', full_name='hapi.chart.Metadata.engine', index=7,
190 190
       number=8, type=9, cpp_type=9, label=1,
191 191
       has_default_value=False, default_value=_b("").decode('utf-8'),
192 192
       message_type=None, enum_type=None, containing_type=None,
193 193
       is_extension=False, extension_scope=None,
194
-      options=None, file=DESCRIPTOR),
194
+      serialized_options=None, file=DESCRIPTOR),
195 195
     _descriptor.FieldDescriptor(
196 196
       name='icon', full_name='hapi.chart.Metadata.icon', index=8,
197 197
       number=9, type=9, cpp_type=9, label=1,
198 198
       has_default_value=False, default_value=_b("").decode('utf-8'),
199 199
       message_type=None, enum_type=None, containing_type=None,
200 200
       is_extension=False, extension_scope=None,
201
-      options=None, file=DESCRIPTOR),
201
+      serialized_options=None, file=DESCRIPTOR),
202 202
     _descriptor.FieldDescriptor(
203 203
       name='apiVersion', full_name='hapi.chart.Metadata.apiVersion', index=9,
204 204
       number=10, type=9, cpp_type=9, label=1,
205 205
       has_default_value=False, default_value=_b("").decode('utf-8'),
206 206
       message_type=None, enum_type=None, containing_type=None,
207 207
       is_extension=False, extension_scope=None,
208
-      options=None, file=DESCRIPTOR),
208
+      serialized_options=None, file=DESCRIPTOR),
209 209
     _descriptor.FieldDescriptor(
210 210
       name='condition', full_name='hapi.chart.Metadata.condition', index=10,
211 211
       number=11, type=9, cpp_type=9, label=1,
212 212
       has_default_value=False, default_value=_b("").decode('utf-8'),
213 213
       message_type=None, enum_type=None, containing_type=None,
214 214
       is_extension=False, extension_scope=None,
215
-      options=None, file=DESCRIPTOR),
215
+      serialized_options=None, file=DESCRIPTOR),
216 216
     _descriptor.FieldDescriptor(
217 217
       name='tags', full_name='hapi.chart.Metadata.tags', index=11,
218 218
       number=12, type=9, cpp_type=9, label=1,
219 219
       has_default_value=False, default_value=_b("").decode('utf-8'),
220 220
       message_type=None, enum_type=None, containing_type=None,
221 221
       is_extension=False, extension_scope=None,
222
-      options=None, file=DESCRIPTOR),
222
+      serialized_options=None, file=DESCRIPTOR),
223 223
     _descriptor.FieldDescriptor(
224 224
       name='appVersion', full_name='hapi.chart.Metadata.appVersion', index=12,
225 225
       number=13, type=9, cpp_type=9, label=1,
226 226
       has_default_value=False, default_value=_b("").decode('utf-8'),
227 227
       message_type=None, enum_type=None, containing_type=None,
228 228
       is_extension=False, extension_scope=None,
229
-      options=None, file=DESCRIPTOR),
229
+      serialized_options=None, file=DESCRIPTOR),
230 230
     _descriptor.FieldDescriptor(
231 231
       name='deprecated', full_name='hapi.chart.Metadata.deprecated', index=13,
232 232
       number=14, type=8, cpp_type=7, label=1,
233 233
       has_default_value=False, default_value=False,
234 234
       message_type=None, enum_type=None, containing_type=None,
235 235
       is_extension=False, extension_scope=None,
236
-      options=None, file=DESCRIPTOR),
236
+      serialized_options=None, file=DESCRIPTOR),
237 237
     _descriptor.FieldDescriptor(
238 238
       name='tillerVersion', full_name='hapi.chart.Metadata.tillerVersion', index=14,
239 239
       number=15, type=9, cpp_type=9, label=1,
240 240
       has_default_value=False, default_value=_b("").decode('utf-8'),
241 241
       message_type=None, enum_type=None, containing_type=None,
242 242
       is_extension=False, extension_scope=None,
243
-      options=None, file=DESCRIPTOR),
243
+      serialized_options=None, file=DESCRIPTOR),
244 244
     _descriptor.FieldDescriptor(
245 245
       name='annotations', full_name='hapi.chart.Metadata.annotations', index=15,
246 246
       number=16, type=11, cpp_type=10, label=3,
247 247
       has_default_value=False, default_value=[],
248 248
       message_type=None, enum_type=None, containing_type=None,
249 249
       is_extension=False, extension_scope=None,
250
-      options=None, file=DESCRIPTOR),
250
+      serialized_options=None, file=DESCRIPTOR),
251 251
     _descriptor.FieldDescriptor(
252 252
       name='kubeVersion', full_name='hapi.chart.Metadata.kubeVersion', index=16,
253 253
       number=17, type=9, cpp_type=9, label=1,
254 254
       has_default_value=False, default_value=_b("").decode('utf-8'),
255 255
       message_type=None, enum_type=None, containing_type=None,
256 256
       is_extension=False, extension_scope=None,
257
-      options=None, file=DESCRIPTOR),
257
+      serialized_options=None, file=DESCRIPTOR),
258 258
   ],
259 259
   extensions=[
260 260
   ],
@@ -262,7 +262,7 @@ _METADATA = _descriptor.Descriptor(
262 262
   enum_types=[
263 263
     _METADATA_ENGINE,
264 264
   ],
265
-  options=None,
265
+  serialized_options=None,
266 266
   is_extendable=False,
267 267
   syntax='proto3',
268 268
   extension_ranges=[],
@@ -303,8 +303,6 @@ _sym_db.RegisterMessage(Metadata)
303 303
 _sym_db.RegisterMessage(Metadata.AnnotationsEntry)
304 304
 
305 305
 
306
-DESCRIPTOR.has_options = True
307
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\005chart'))
308
-_METADATA_ANNOTATIONSENTRY.has_options = True
309
-_METADATA_ANNOTATIONSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001'))
306
+DESCRIPTOR._options = None
307
+_METADATA_ANNOTATIONSENTRY._options = None
310 308
 # @@protoc_insertion_point(module_scope)

+ 5
- 6
hapi/chart/template_pb2.py View File

@@ -7,7 +7,6 @@ from google.protobuf import descriptor as _descriptor
7 7
 from google.protobuf import message as _message
8 8
 from google.protobuf import reflection as _reflection
9 9
 from google.protobuf import symbol_database as _symbol_database
10
-from google.protobuf import descriptor_pb2
11 10
 # @@protoc_insertion_point(imports)
12 11
 
13 12
 _sym_db = _symbol_database.Default()
@@ -19,6 +18,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
19 18
   name='hapi/chart/template.proto',
20 19
   package='hapi.chart',
21 20
   syntax='proto3',
21
+  serialized_options=_b('Z\005chart'),
22 22
   serialized_pb=_b('\n\x19hapi/chart/template.proto\x12\nhapi.chart\"&\n\x08Template\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x42\x07Z\x05\x63hartb\x06proto3')
23 23
 )
24 24
 
@@ -38,21 +38,21 @@ _TEMPLATE = _descriptor.Descriptor(
38 38
       has_default_value=False, default_value=_b("").decode('utf-8'),
39 39
       message_type=None, enum_type=None, containing_type=None,
40 40
       is_extension=False, extension_scope=None,
41
-      options=None, file=DESCRIPTOR),
41
+      serialized_options=None, file=DESCRIPTOR),
42 42
     _descriptor.FieldDescriptor(
43 43
       name='data', full_name='hapi.chart.Template.data', index=1,
44 44
       number=2, type=12, cpp_type=9, label=1,
45 45
       has_default_value=False, default_value=_b(""),
46 46
       message_type=None, enum_type=None, containing_type=None,
47 47
       is_extension=False, extension_scope=None,
48
-      options=None, file=DESCRIPTOR),
48
+      serialized_options=None, file=DESCRIPTOR),
49 49
   ],
50 50
   extensions=[
51 51
   ],
52 52
   nested_types=[],
53 53
   enum_types=[
54 54
   ],
55
-  options=None,
55
+  serialized_options=None,
56 56
   is_extendable=False,
57 57
   syntax='proto3',
58 58
   extension_ranges=[],
@@ -73,6 +73,5 @@ Template = _reflection.GeneratedProtocolMessageType('Template', (_message.Messag
73 73
 _sym_db.RegisterMessage(Template)
74 74
 
75 75
 
76
-DESCRIPTOR.has_options = True
77
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\005chart'))
76
+DESCRIPTOR._options = None
78 77
 # @@protoc_insertion_point(module_scope)

+ 28
- 29
hapi/release/hook_pb2.py View File

@@ -7,7 +7,6 @@ from google.protobuf import descriptor as _descriptor
7 7
 from google.protobuf import message as _message
8 8
 from google.protobuf import reflection as _reflection
9 9
 from google.protobuf import symbol_database as _symbol_database
10
-from google.protobuf import descriptor_pb2
11 10
 # @@protoc_insertion_point(imports)
12 11
 
13 12
 _sym_db = _symbol_database.Default()
@@ -20,6 +19,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
20 19
   name='hapi/release/hook.proto',
21 20
   package='hapi.release',
22 21
   syntax='proto3',
22
+  serialized_options=_b('Z\007release'),
23 23
   serialized_pb=_b('\n\x17hapi/release/hook.proto\x12\x0chapi.release\x1a\x1fgoogle/protobuf/timestamp.proto\"\x91\x04\n\x04Hook\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\x12\x0c\n\x04path\x18\x03 \x01(\t\x12\x10\n\x08manifest\x18\x04 \x01(\t\x12(\n\x06\x65vents\x18\x05 \x03(\x0e\x32\x18.hapi.release.Hook.Event\x12,\n\x08last_run\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06weight\x18\x07 \x01(\x05\x12\x38\n\x0f\x64\x65lete_policies\x18\x08 \x03(\x0e\x32\x1f.hapi.release.Hook.DeletePolicy\"\xe5\x01\n\x05\x45vent\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0f\n\x0bPRE_INSTALL\x10\x01\x12\x10\n\x0cPOST_INSTALL\x10\x02\x12\x0e\n\nPRE_DELETE\x10\x03\x12\x0f\n\x0bPOST_DELETE\x10\x04\x12\x0f\n\x0bPRE_UPGRADE\x10\x05\x12\x10\n\x0cPOST_UPGRADE\x10\x06\x12\x10\n\x0cPRE_ROLLBACK\x10\x07\x12\x11\n\rPOST_ROLLBACK\x10\x08\x12\x18\n\x14RELEASE_TEST_SUCCESS\x10\t\x12\x18\n\x14RELEASE_TEST_FAILURE\x10\n\x12\x0f\n\x0b\x43RD_INSTALL\x10\x0b\"C\n\x0c\x44\x65letePolicy\x12\r\n\tSUCCEEDED\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x12\x18\n\x14\x42\x45\x46ORE_HOOK_CREATION\x10\x02\x42\tZ\x07releaseb\x06proto3')
24 24
   ,
25 25
   dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,])
@@ -34,55 +34,55 @@ _HOOK_EVENT = _descriptor.EnumDescriptor(
34 34
   values=[
35 35
     _descriptor.EnumValueDescriptor(
36 36
       name='UNKNOWN', index=0, number=0,
37
-      options=None,
37
+      serialized_options=None,
38 38
       type=None),
39 39
     _descriptor.EnumValueDescriptor(
40 40
       name='PRE_INSTALL', index=1, number=1,
41
-      options=None,
41
+      serialized_options=None,
42 42
       type=None),
43 43
     _descriptor.EnumValueDescriptor(
44 44
       name='POST_INSTALL', index=2, number=2,
45
-      options=None,
45
+      serialized_options=None,
46 46
       type=None),
47 47
     _descriptor.EnumValueDescriptor(
48 48
       name='PRE_DELETE', index=3, number=3,
49
-      options=None,
49
+      serialized_options=None,
50 50
       type=None),
51 51
     _descriptor.EnumValueDescriptor(
52 52
       name='POST_DELETE', index=4, number=4,
53
-      options=None,
53
+      serialized_options=None,
54 54
       type=None),
55 55
     _descriptor.EnumValueDescriptor(
56 56
       name='PRE_UPGRADE', index=5, number=5,
57
-      options=None,
57
+      serialized_options=None,
58 58
       type=None),
59 59
     _descriptor.EnumValueDescriptor(
60 60
       name='POST_UPGRADE', index=6, number=6,
61
-      options=None,
61
+      serialized_options=None,
62 62
       type=None),
63 63
     _descriptor.EnumValueDescriptor(
64 64
       name='PRE_ROLLBACK', index=7, number=7,
65
-      options=None,
65
+      serialized_options=None,
66 66
       type=None),
67 67
     _descriptor.EnumValueDescriptor(
68 68
       name='POST_ROLLBACK', index=8, number=8,
69
-      options=None,
69
+      serialized_options=None,
70 70
       type=None),
71 71
     _descriptor.EnumValueDescriptor(
72 72
       name='RELEASE_TEST_SUCCESS', index=9, number=9,
73
-      options=None,
73
+      serialized_options=None,
74 74
       type=None),
75 75
     _descriptor.EnumValueDescriptor(
76 76
       name='RELEASE_TEST_FAILURE', index=10, number=10,
77
-      options=None,
77
+      serialized_options=None,
78 78
       type=None),
79 79
     _descriptor.EnumValueDescriptor(
80 80
       name='CRD_INSTALL', index=11, number=11,
81
-      options=None,
81
+      serialized_options=None,
82 82
       type=None),
83 83
   ],
84 84
   containing_type=None,
85
-  options=None,
85
+  serialized_options=None,
86 86
   serialized_start=306,
87 87
   serialized_end=535,
88 88
 )
@@ -96,19 +96,19 @@ _HOOK_DELETEPOLICY = _descriptor.EnumDescriptor(
96 96
   values=[
97 97
     _descriptor.EnumValueDescriptor(
98 98
       name='SUCCEEDED', index=0, number=0,
99
-      options=None,
99
+      serialized_options=None,
100 100
       type=None),
101 101
     _descriptor.EnumValueDescriptor(
102 102
       name='FAILED', index=1, number=1,
103
-      options=None,
103
+      serialized_options=None,
104 104
       type=None),
105 105
     _descriptor.EnumValueDescriptor(
106 106
       name='BEFORE_HOOK_CREATION', index=2, number=2,
107
-      options=None,
107
+      serialized_options=None,
108 108
       type=None),
109 109
   ],
110 110
   containing_type=None,
111
-  options=None,
111
+  serialized_options=None,
112 112
   serialized_start=537,
113 113
   serialized_end=604,
114 114
 )
@@ -128,56 +128,56 @@ _HOOK = _descriptor.Descriptor(
128 128
       has_default_value=False, default_value=_b("").decode('utf-8'),
129 129
       message_type=None, enum_type=None, containing_type=None,
130 130
       is_extension=False, extension_scope=None,
131
-      options=None, file=DESCRIPTOR),
131
+      serialized_options=None, file=DESCRIPTOR),
132 132
     _descriptor.FieldDescriptor(
133 133
       name='kind', full_name='hapi.release.Hook.kind', index=1,
134 134
       number=2, type=9, cpp_type=9, label=1,
135 135
       has_default_value=False, default_value=_b("").decode('utf-8'),
136 136
       message_type=None, enum_type=None, containing_type=None,
137 137
       is_extension=False, extension_scope=None,
138
-      options=None, file=DESCRIPTOR),
138
+      serialized_options=None, file=DESCRIPTOR),
139 139
     _descriptor.FieldDescriptor(
140 140
       name='path', full_name='hapi.release.Hook.path', index=2,
141 141
       number=3, type=9, cpp_type=9, label=1,
142 142
       has_default_value=False, default_value=_b("").decode('utf-8'),
143 143
       message_type=None, enum_type=None, containing_type=None,
144 144
       is_extension=False, extension_scope=None,
145
-      options=None, file=DESCRIPTOR),
145
+      serialized_options=None, file=DESCRIPTOR),
146 146
     _descriptor.FieldDescriptor(
147 147
       name='manifest', full_name='hapi.release.Hook.manifest', index=3,
148 148
       number=4, type=9, cpp_type=9, label=1,
149 149
       has_default_value=False, default_value=_b("").decode('utf-8'),
150 150
       message_type=None, enum_type=None, containing_type=None,
151 151
       is_extension=False, extension_scope=None,
152
-      options=None, file=DESCRIPTOR),
152
+      serialized_options=None, file=DESCRIPTOR),
153 153
     _descriptor.FieldDescriptor(
154 154
       name='events', full_name='hapi.release.Hook.events', index=4,
155 155
       number=5, type=14, cpp_type=8, label=3,
156 156
       has_default_value=False, default_value=[],
157 157
       message_type=None, enum_type=None, containing_type=None,
158 158
       is_extension=False, extension_scope=None,
159
-      options=None, file=DESCRIPTOR),
159
+      serialized_options=None, file=DESCRIPTOR),
160 160
     _descriptor.FieldDescriptor(
161 161
       name='last_run', full_name='hapi.release.Hook.last_run', index=5,
162 162
       number=6, type=11, cpp_type=10, label=1,
163 163
       has_default_value=False, default_value=None,
164 164
       message_type=None, enum_type=None, containing_type=None,
165 165
       is_extension=False, extension_scope=None,
166
-      options=None, file=DESCRIPTOR),
166
+      serialized_options=None, file=DESCRIPTOR),
167 167
     _descriptor.FieldDescriptor(
168 168
       name='weight', full_name='hapi.release.Hook.weight', index=6,
169 169
       number=7, type=5, cpp_type=1, label=1,
170 170
       has_default_value=False, default_value=0,
171 171
       message_type=None, enum_type=None, containing_type=None,
172 172
       is_extension=False, extension_scope=None,
173
-      options=None, file=DESCRIPTOR),
173
+      serialized_options=None, file=DESCRIPTOR),
174 174
     _descriptor.FieldDescriptor(
175 175
       name='delete_policies', full_name='hapi.release.Hook.delete_policies', index=7,
176 176
       number=8, type=14, cpp_type=8, label=3,
177 177
       has_default_value=False, default_value=[],
178 178
       message_type=None, enum_type=None, containing_type=None,
179 179
       is_extension=False, extension_scope=None,
180
-      options=None, file=DESCRIPTOR),
180
+      serialized_options=None, file=DESCRIPTOR),
181 181
   ],
182 182
   extensions=[
183 183
   ],
@@ -186,7 +186,7 @@ _HOOK = _descriptor.Descriptor(
186 186
     _HOOK_EVENT,
187 187
     _HOOK_DELETEPOLICY,
188 188
   ],
189
-  options=None,
189
+  serialized_options=None,
190 190
   is_extendable=False,
191 191
   syntax='proto3',
192 192
   extension_ranges=[],
@@ -212,6 +212,5 @@ Hook = _reflection.GeneratedProtocolMessageType('Hook', (_message.Message,), dic
212 212
 _sym_db.RegisterMessage(Hook)
213 213
 
214 214
 
215
-DESCRIPTOR.has_options = True
216
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\007release'))
215
+DESCRIPTOR._options = None
217 216
 # @@protoc_insertion_point(module_scope)

+ 8
- 9
hapi/release/info_pb2.py View File

@@ -7,7 +7,6 @@ from google.protobuf import descriptor as _descriptor
7 7
 from google.protobuf import message as _message
8 8
 from google.protobuf import reflection as _reflection
9 9
 from google.protobuf import symbol_database as _symbol_database
10
-from google.protobuf import descriptor_pb2
11 10
 # @@protoc_insertion_point(imports)
12 11
 
13 12
 _sym_db = _symbol_database.Default()
@@ -21,6 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
21 20
   name='hapi/release/info.proto',
22 21
   package='hapi.release',
23 22
   syntax='proto3',
23
+  serialized_options=_b('Z\007release'),
24 24
   serialized_pb=_b('\n\x17hapi/release/info.proto\x12\x0chapi.release\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x19hapi/release/status.proto\"\xd5\x01\n\x04Info\x12$\n\x06status\x18\x01 \x01(\x0b\x32\x14.hapi.release.Status\x12\x32\n\x0e\x66irst_deployed\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rlast_deployed\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x07\x64\x65leted\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x44\x65scription\x18\x05 \x01(\tB\tZ\x07releaseb\x06proto3')
25 25
   ,
26 26
   dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,hapi_dot_release_dot_status__pb2.DESCRIPTOR,])
@@ -41,42 +41,42 @@ _INFO = _descriptor.Descriptor(
41 41
       has_default_value=False, default_value=None,
42 42
       message_type=None, enum_type=None, containing_type=None,
43 43
       is_extension=False, extension_scope=None,
44
-      options=None, file=DESCRIPTOR),
44
+      serialized_options=None, file=DESCRIPTOR),
45 45
     _descriptor.FieldDescriptor(
46 46
       name='first_deployed', full_name='hapi.release.Info.first_deployed', index=1,
47 47
       number=2, type=11, cpp_type=10, label=1,
48 48
       has_default_value=False, default_value=None,
49 49
       message_type=None, enum_type=None, containing_type=None,
50 50
       is_extension=False, extension_scope=None,
51
-      options=None, file=DESCRIPTOR),
51
+      serialized_options=None, file=DESCRIPTOR),
52 52
     _descriptor.FieldDescriptor(
53 53
       name='last_deployed', full_name='hapi.release.Info.last_deployed', index=2,
54 54
       number=3, type=11, cpp_type=10, label=1,
55 55
       has_default_value=False, default_value=None,
56 56
       message_type=None, enum_type=None, containing_type=None,
57 57
       is_extension=False, extension_scope=None,
58
-      options=None, file=DESCRIPTOR),
58
+      serialized_options=None, file=DESCRIPTOR),
59 59
     _descriptor.FieldDescriptor(
60 60
       name='deleted', full_name='hapi.release.Info.deleted', index=3,
61 61
       number=4, type=11, cpp_type=10, label=1,
62 62
       has_default_value=False, default_value=None,
63 63
       message_type=None, enum_type=None, containing_type=None,
64 64
       is_extension=False, extension_scope=None,
65
-      options=None, file=DESCRIPTOR),
65
+      serialized_options=None, file=DESCRIPTOR),
66 66
     _descriptor.FieldDescriptor(
67 67
       name='Description', full_name='hapi.release.Info.Description', index=4,
68 68
       number=5, type=9, cpp_type=9, label=1,
69 69
       has_default_value=False, default_value=_b("").decode('utf-8'),
70 70
       message_type=None, enum_type=None, containing_type=None,
71 71
       is_extension=False, extension_scope=None,
72
-      options=None, file=DESCRIPTOR),
72
+      serialized_options=None, file=DESCRIPTOR),
73 73
   ],
74 74
   extensions=[
75 75
   ],
76 76
   nested_types=[],
77 77
   enum_types=[
78 78
   ],
79
-  options=None,
79
+  serialized_options=None,
80 80
   is_extendable=False,
81 81
   syntax='proto3',
82 82
   extension_ranges=[],
@@ -101,6 +101,5 @@ Info = _reflection.GeneratedProtocolMessageType('Info', (_message.Message,), dic
101 101
 _sym_db.RegisterMessage(Info)
102 102
 
103 103
 
104
-DESCRIPTOR.has_options = True
105
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\007release'))
104
+DESCRIPTOR._options = None
106 105
 # @@protoc_insertion_point(module_scope)

+ 11
- 12
hapi/release/release_pb2.py View File

@@ -7,7 +7,6 @@ from google.protobuf import descriptor as _descriptor
7 7
 from google.protobuf import message as _message
8 8
 from google.protobuf import reflection as _reflection
9 9
 from google.protobuf import symbol_database as _symbol_database
10
-from google.protobuf import descriptor_pb2
11 10
 # @@protoc_insertion_point(imports)
12 11
 
13 12
 _sym_db = _symbol_database.Default()
@@ -23,6 +22,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
23 22
   name='hapi/release/release.proto',
24 23
   package='hapi.release',
25 24
   syntax='proto3',
25
+  serialized_options=_b('Z\007release'),
26 26
   serialized_pb=_b('\n\x1ahapi/release/release.proto\x12\x0chapi.release\x1a\x17hapi/release/hook.proto\x1a\x17hapi/release/info.proto\x1a\x17hapi/chart/config.proto\x1a\x16hapi/chart/chart.proto\"\xd8\x01\n\x07Release\x12\x0c\n\x04name\x18\x01 \x01(\t\x12 \n\x04info\x18\x02 \x01(\x0b\x32\x12.hapi.release.Info\x12 \n\x05\x63hart\x18\x03 \x01(\x0b\x32\x11.hapi.chart.Chart\x12\"\n\x06\x63onfig\x18\x04 \x01(\x0b\x32\x12.hapi.chart.Config\x12\x10\n\x08manifest\x18\x05 \x01(\t\x12!\n\x05hooks\x18\x06 \x03(\x0b\x32\x12.hapi.release.Hook\x12\x0f\n\x07version\x18\x07 \x01(\x05\x12\x11\n\tnamespace\x18\x08 \x01(\tB\tZ\x07releaseb\x06proto3')
27 27
   ,
28 28
   dependencies=[hapi_dot_release_dot_hook__pb2.DESCRIPTOR,hapi_dot_release_dot_info__pb2.DESCRIPTOR,hapi_dot_chart_dot_config__pb2.DESCRIPTOR,hapi_dot_chart_dot_chart__pb2.DESCRIPTOR,])
@@ -43,63 +43,63 @@ _RELEASE = _descriptor.Descriptor(
43 43
       has_default_value=False, default_value=_b("").decode('utf-8'),
44 44
       message_type=None, enum_type=None, containing_type=None,
45 45
       is_extension=False, extension_scope=None,
46
-      options=None, file=DESCRIPTOR),
46
+      serialized_options=None, file=DESCRIPTOR),
47 47
     _descriptor.FieldDescriptor(
48 48
       name='info', full_name='hapi.release.Release.info', index=1,
49 49
       number=2, type=11, cpp_type=10, label=1,
50 50
       has_default_value=False, default_value=None,
51 51
       message_type=None, enum_type=None, containing_type=None,
52 52
       is_extension=False, extension_scope=None,
53
-      options=None, file=DESCRIPTOR),
53
+      serialized_options=None, file=DESCRIPTOR),
54 54
     _descriptor.FieldDescriptor(
55 55
       name='chart', full_name='hapi.release.Release.chart', index=2,
56 56
       number=3, type=11, cpp_type=10, label=1,
57 57
       has_default_value=False, default_value=None,
58 58
       message_type=None, enum_type=None, containing_type=None,
59 59
       is_extension=False, extension_scope=None,
60
-      options=None, file=DESCRIPTOR),
60
+      serialized_options=None, file=DESCRIPTOR),
61 61
     _descriptor.FieldDescriptor(
62 62
       name='config', full_name='hapi.release.Release.config', index=3,
63 63
       number=4, type=11, cpp_type=10, label=1,
64 64
       has_default_value=False, default_value=None,
65 65
       message_type=None, enum_type=None, containing_type=None,
66 66
       is_extension=False, extension_scope=None,
67
-      options=None, file=DESCRIPTOR),
67
+      serialized_options=None, file=DESCRIPTOR),
68 68
     _descriptor.FieldDescriptor(
69 69
       name='manifest', full_name='hapi.release.Release.manifest', index=4,
70 70
       number=5, type=9, cpp_type=9, label=1,
71 71
       has_default_value=False, default_value=_b("").decode('utf-8'),
72 72
       message_type=None, enum_type=None, containing_type=None,
73 73
       is_extension=False, extension_scope=None,
74
-      options=None, file=DESCRIPTOR),
74
+      serialized_options=None, file=DESCRIPTOR),
75 75
     _descriptor.FieldDescriptor(
76 76
       name='hooks', full_name='hapi.release.Release.hooks', index=5,
77 77
       number=6, type=11, cpp_type=10, label=3,
78 78
       has_default_value=False, default_value=[],
79 79
       message_type=None, enum_type=None, containing_type=None,
80 80
       is_extension=False, extension_scope=None,
81
-      options=None, file=DESCRIPTOR),
81
+      serialized_options=None, file=DESCRIPTOR),
82 82
     _descriptor.FieldDescriptor(
83 83
       name='version', full_name='hapi.release.Release.version', index=6,
84 84
       number=7, type=5, cpp_type=1, label=1,
85 85
       has_default_value=False, default_value=0,
86 86
       message_type=None, enum_type=None, containing_type=None,
87 87
       is_extension=False, extension_scope=None,
88
-      options=None, file=DESCRIPTOR),
88
+      serialized_options=None, file=DESCRIPTOR),
89 89
     _descriptor.FieldDescriptor(
90 90
       name='namespace', full_name='hapi.release.Release.namespace', index=7,
91 91
       number=8, type=9, cpp_type=9, label=1,
92 92
       has_default_value=False, default_value=_b("").decode('utf-8'),
93 93
       message_type=None, enum_type=None, containing_type=None,
94 94
       is_extension=False, extension_scope=None,
95
-      options=None, file=DESCRIPTOR),
95
+      serialized_options=None, file=DESCRIPTOR),
96 96
   ],
97 97
   extensions=[
98 98
   ],
99 99
   nested_types=[],
100 100
   enum_types=[
101 101
   ],
102
-  options=None,
102
+  serialized_options=None,
103 103
   is_extendable=False,
104 104
   syntax='proto3',
105 105
   extension_ranges=[],
@@ -124,6 +124,5 @@ Release = _reflection.GeneratedProtocolMessageType('Release', (_message.Message,
124 124
 _sym_db.RegisterMessage(Release)
125 125
 
126 126
 
127
-DESCRIPTOR.has_options = True
128
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\007release'))
127
+DESCRIPTOR._options = None
129 128
 # @@protoc_insertion_point(module_scope)

+ 17
- 18
hapi/release/status_pb2.py View File

@@ -7,7 +7,6 @@ from google.protobuf import descriptor as _descriptor
7 7
 from google.protobuf import message as _message
8 8
 from google.protobuf import reflection as _reflection
9 9
 from google.protobuf import symbol_database as _symbol_database
10
-from google.protobuf import descriptor_pb2
11 10
 # @@protoc_insertion_point(imports)
12 11
 
13 12
 _sym_db = _symbol_database.Default()
@@ -21,6 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
21 20
   name='hapi/release/status.proto',
22 21
   package='hapi.release',
23 22
   syntax='proto3',
23
+  serialized_options=_b('Z\007release'),
24 24
   serialized_pb=_b('\n\x19hapi/release/status.proto\x12\x0chapi.release\x1a\x1dhapi/release/test_suite.proto\x1a\x19google/protobuf/any.proto\"\xa4\x02\n\x06Status\x12\'\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x19.hapi.release.Status.Code\x12\x11\n\tresources\x18\x03 \x01(\t\x12\r\n\x05notes\x18\x04 \x01(\t\x12\x34\n\x13last_test_suite_run\x18\x05 \x01(\x0b\x32\x17.hapi.release.TestSuite\"\x98\x01\n\x04\x43ode\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0c\n\x08\x44\x45PLOYED\x10\x01\x12\x0b\n\x07\x44\x45LETED\x10\x02\x12\x0e\n\nSUPERSEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\x12\x13\n\x0fPENDING_INSTALL\x10\x06\x12\x13\n\x0fPENDING_UPGRADE\x10\x07\x12\x14\n\x10PENDING_ROLLBACK\x10\x08\x42\tZ\x07releaseb\x06proto3')
25 25
   ,
26 26
   dependencies=[hapi_dot_release_dot_test__suite__pb2.DESCRIPTOR,google_dot_protobuf_dot_any__pb2.DESCRIPTOR,])
@@ -35,43 +35,43 @@ _STATUS_CODE = _descriptor.EnumDescriptor(
35 35
   values=[
36 36
     _descriptor.EnumValueDescriptor(
37 37
       name='UNKNOWN', index=0, number=0,
38
-      options=None,
38
+      serialized_options=None,
39 39
       type=None),
40 40
     _descriptor.EnumValueDescriptor(
41 41
       name='DEPLOYED', index=1, number=1,
42
-      options=None,
42
+      serialized_options=None,
43 43
       type=None),
44 44
     _descriptor.EnumValueDescriptor(
45 45
       name='DELETED', index=2, number=2,
46
-      options=None,
46
+      serialized_options=None,
47 47
       type=None),
48 48
     _descriptor.EnumValueDescriptor(
49 49
       name='SUPERSEDED', index=3, number=3,
50
-      options=None,
50
+      serialized_options=None,
51 51
       type=None),
52 52
     _descriptor.EnumValueDescriptor(
53 53
       name='FAILED', index=4, number=4,
54
-      options=None,
54
+      serialized_options=None,
55 55
       type=None),
56 56
     _descriptor.EnumValueDescriptor(
57 57
       name='DELETING', index=5, number=5,
58
-      options=None,
58
+      serialized_options=None,
59 59
       type=None),
60 60
     _descriptor.EnumValueDescriptor(
61 61
       name='PENDING_INSTALL', index=6, number=6,
62
-      options=None,
62
+      serialized_options=None,
63 63
       type=None),
64 64
     _descriptor.EnumValueDescriptor(
65 65
       name='PENDING_UPGRADE', index=7, number=7,
66
-      options=None,
66
+      serialized_options=None,
67 67
       type=None),
68 68
     _descriptor.EnumValueDescriptor(
69 69
       name='PENDING_ROLLBACK', index=8, number=8,
70
-      options=None,
70
+      serialized_options=None,
71 71
       type=None),
72 72
   ],
73 73
   containing_type=None,
74
-  options=None,
74
+  serialized_options=None,
75 75
   serialized_start=242,
76 76
   serialized_end=394,
77 77
 )
@@ -91,28 +91,28 @@ _STATUS = _descriptor.Descriptor(
91 91
       has_default_value=False, default_value=0,
92 92
       message_type=None, enum_type=None, containing_type=None,
93 93
       is_extension=False, extension_scope=None,
94
-      options=None, file=DESCRIPTOR),
94
+      serialized_options=None, file=DESCRIPTOR),
95 95
     _descriptor.FieldDescriptor(
96 96
       name='resources', full_name='hapi.release.Status.resources', index=1,
97 97
       number=3, type=9, cpp_type=9, label=1,
98 98
       has_default_value=False, default_value=_b("").decode('utf-8'),
99 99
       message_type=None, enum_type=None, containing_type=None,
100 100
       is_extension=False, extension_scope=None,
101
-      options=None, file=DESCRIPTOR),
101
+      serialized_options=None, file=DESCRIPTOR),
102 102
     _descriptor.FieldDescriptor(
103 103
       name='notes', full_name='hapi.release.Status.notes', index=2,
104 104
       number=4, type=9, cpp_type=9, label=1,
105 105
       has_default_value=False, default_value=_b("").decode('utf-8'),
106 106
       message_type=None, enum_type=None, containing_type=None,
107 107
       is_extension=False, extension_scope=None,
108
-      options=None, file=DESCRIPTOR),
108
+      serialized_options=None, file=DESCRIPTOR),
109 109
     _descriptor.FieldDescriptor(
110 110
       name='last_test_suite_run', full_name='hapi.release.Status.last_test_suite_run', index=3,
111 111
       number=5, type=11, cpp_type=10, label=1,
112 112
       has_default_value=False, default_value=None,
113 113
       message_type=None, enum_type=None, containing_type=None,
114 114
       is_extension=False, extension_scope=None,
115
-      options=None, file=DESCRIPTOR),
115
+      serialized_options=None, file=DESCRIPTOR),
116 116
   ],
117 117
   extensions=[
118 118
   ],
@@ -120,7 +120,7 @@ _STATUS = _descriptor.Descriptor(
120 120
   enum_types=[
121 121
     _STATUS_CODE,
122 122
   ],
123
-  options=None,
123
+  serialized_options=None,
124 124
   is_extendable=False,
125 125
   syntax='proto3',
126 126
   extension_ranges=[],
@@ -144,6 +144,5 @@ Status = _reflection.GeneratedProtocolMessageType('Status', (_message.Message,),
144 144
 _sym_db.RegisterMessage(Status)
145 145
 
146 146
 
147
-DESCRIPTOR.has_options = True
148
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\007release'))
147
+DESCRIPTOR._options = None
149 148
 # @@protoc_insertion_point(module_scope)

+ 13
- 14
hapi/release/test_run_pb2.py View File

@@ -7,7 +7,6 @@ from google.protobuf import descriptor as _descriptor
7 7
 from google.protobuf import message as _message
8 8
 from google.protobuf import reflection as _reflection
9 9
 from google.protobuf import symbol_database as _symbol_database
10
-from google.protobuf import descriptor_pb2
11 10
 # @@protoc_insertion_point(imports)
12 11
 
13 12
 _sym_db = _symbol_database.Default()
@@ -20,6 +19,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
20 19
   name='hapi/release/test_run.proto',
21 20
   package='hapi.release',
22 21
   syntax='proto3',
22
+  serialized_options=_b('Z\007release'),
23 23
   serialized_pb=_b('\n\x1bhapi/release/test_run.proto\x12\x0chapi.release\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf3\x01\n\x07TestRun\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\x06status\x18\x02 \x01(\x0e\x32\x1c.hapi.release.TestRun.Status\x12\x0c\n\x04info\x18\x03 \x01(\t\x12.\n\nstarted_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0c\x63ompleted_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"<\n\x06Status\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\x0b\n\x07\x46\x41ILURE\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x42\tZ\x07releaseb\x06proto3')
24 24
   ,
25 25
   dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,])
@@ -34,23 +34,23 @@ _TESTRUN_STATUS = _descriptor.EnumDescriptor(
34 34
   values=[
35 35
     _descriptor.EnumValueDescriptor(
36 36
       name='UNKNOWN', index=0, number=0,
37
-      options=None,
37
+      serialized_options=None,
38 38
       type=None),
39 39
     _descriptor.EnumValueDescriptor(
40 40
       name='SUCCESS', index=1, number=1,
41
-      options=None,
41
+      serialized_options=None,
42 42
       type=None),
43 43
     _descriptor.EnumValueDescriptor(
44 44
       name='FAILURE', index=2, number=2,
45
-      options=None,
45
+      serialized_options=None,
46 46
       type=None),
47 47
     _descriptor.EnumValueDescriptor(
48 48
       name='RUNNING', index=3, number=3,
49
-      options=None,
49
+      serialized_options=None,
50 50
       type=None),
51 51
   ],
52 52
   containing_type=None,
53
-  options=None,
53
+  serialized_options=None,
54 54
   serialized_start=262,
55 55
   serialized_end=322,
56 56
 )
@@ -70,35 +70,35 @@ _TESTRUN = _descriptor.Descriptor(
70 70
       has_default_value=False, default_value=_b("").decode('utf-8'),
71 71
       message_type=None, enum_type=None, containing_type=None,
72 72
       is_extension=False, extension_scope=None,
73
-      options=None, file=DESCRIPTOR),
73
+      serialized_options=None, file=DESCRIPTOR),
74 74
     _descriptor.FieldDescriptor(
75 75
       name='status', full_name='hapi.release.TestRun.status', index=1,
76 76
       number=2, type=14, cpp_type=8, label=1,
77 77
       has_default_value=False, default_value=0,
78 78
       message_type=None, enum_type=None, containing_type=None,
79 79
       is_extension=False, extension_scope=None,
80
-      options=None, file=DESCRIPTOR),
80
+      serialized_options=None, file=DESCRIPTOR),
81 81
     _descriptor.FieldDescriptor(
82 82
       name='info', full_name='hapi.release.TestRun.info', index=2,
83 83
       number=3, type=9, cpp_type=9, label=1,
84 84
       has_default_value=False, default_value=_b("").decode('utf-8'),
85 85
       message_type=None, enum_type=None, containing_type=None,
86 86
       is_extension=False, extension_scope=None,
87
-      options=None, file=DESCRIPTOR),
87
+      serialized_options=None, file=DESCRIPTOR),
88 88
     _descriptor.FieldDescriptor(
89 89
       name='started_at', full_name='hapi.release.TestRun.started_at', index=3,
90 90
       number=4, type=11, cpp_type=10, label=1,
91 91
       has_default_value=False, default_value=None,
92 92
       message_type=None, enum_type=None, containing_type=None,
93 93
       is_extension=False, extension_scope=None,
94
-      options=None, file=DESCRIPTOR),
94
+      serialized_options=None, file=DESCRIPTOR),
95 95
     _descriptor.FieldDescriptor(
96 96
       name='completed_at', full_name='hapi.release.TestRun.completed_at', index=4,
97 97
       number=5, type=11, cpp_type=10, label=1,
98 98
       has_default_value=False, default_value=None,
99 99
       message_type=None, enum_type=None, containing_type=None,
100 100
       is_extension=False, extension_scope=None,
101
-      options=None, file=DESCRIPTOR),
101
+      serialized_options=None, file=DESCRIPTOR),
102 102
   ],
103 103
   extensions=[
104 104
   ],
@@ -106,7 +106,7 @@ _TESTRUN = _descriptor.Descriptor(
106 106
   enum_types=[
107 107
     _TESTRUN_STATUS,
108 108
   ],
109
-  options=None,
109
+  serialized_options=None,
110 110
   is_extendable=False,
111 111
   syntax='proto3',
112 112
   extension_ranges=[],
@@ -131,6 +131,5 @@ TestRun = _reflection.GeneratedProtocolMessageType('TestRun', (_message.Message,
131 131
 _sym_db.RegisterMessage(TestRun)
132 132
 
133 133
 
134
-DESCRIPTOR.has_options = True
135
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\007release'))
134
+DESCRIPTOR._options = None
136 135
 # @@protoc_insertion_point(module_scope)

+ 6
- 7
hapi/release/test_suite_pb2.py View File

@@ -7,7 +7,6 @@ from google.protobuf import descriptor as _descriptor
7 7
 from google.protobuf import message as _message
8 8
 from google.protobuf import reflection as _reflection
9 9
 from google.protobuf import symbol_database as _symbol_database
10
-from google.protobuf import descriptor_pb2
11 10
 # @@protoc_insertion_point(imports)
12 11
 
13 12
 _sym_db = _symbol_database.Default()
@@ -21,6 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
21 20
   name='hapi/release/test_suite.proto',
22 21
   package='hapi.release',
23 22
   syntax='proto3',
23
+  serialized_options=_b('Z\007release'),
24 24
   serialized_pb=_b('\n\x1dhapi/release/test_suite.proto\x12\x0chapi.release\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bhapi/release/test_run.proto\"\x95\x01\n\tTestSuite\x12.\n\nstarted_at\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0c\x63ompleted_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12&\n\x07results\x18\x03 \x03(\x0b\x32\x15.hapi.release.TestRunB\tZ\x07releaseb\x06proto3')
25 25
   ,
26 26
   dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,hapi_dot_release_dot_test__run__pb2.DESCRIPTOR,])
@@ -41,28 +41,28 @@ _TESTSUITE = _descriptor.Descriptor(
41 41
       has_default_value=False, default_value=None,
42 42
       message_type=None, enum_type=None, containing_type=None,
43 43
       is_extension=False, extension_scope=None,
44
-      options=None, file=DESCRIPTOR),
44
+      serialized_options=None, file=DESCRIPTOR),
45 45
     _descriptor.FieldDescriptor(
46 46
       name='completed_at', full_name='hapi.release.TestSuite.completed_at', index=1,
47 47
       number=2, type=11, cpp_type=10, label=1,
48 48
       has_default_value=False, default_value=None,
49 49
       message_type=None, enum_type=None, containing_type=None,
50 50
       is_extension=False, extension_scope=None,
51
-      options=None, file=DESCRIPTOR),
51
+      serialized_options=None, file=DESCRIPTOR),
52 52
     _descriptor.FieldDescriptor(
53 53
       name='results', full_name='hapi.release.TestSuite.results', index=2,
54 54
       number=3, type=11, cpp_type=10, label=3,
55 55
       has_default_value=False, default_value=[],
56 56
       message_type=None, enum_type=None, containing_type=None,
57 57
       is_extension=False, extension_scope=None,
58
-      options=None, file=DESCRIPTOR),
58
+      serialized_options=None, file=DESCRIPTOR),
59 59
   ],
60 60
   extensions=[
61 61
   ],
62 62
   nested_types=[],
63 63
   enum_types=[
64 64
   ],
65
-  options=None,
65
+  serialized_options=None,
66 66
   is_extendable=False,
67 67
   syntax='proto3',
68 68
   extension_ranges=[],
@@ -86,6 +86,5 @@ TestSuite = _reflection.GeneratedProtocolMessageType('TestSuite', (_message.Mess
86 86
 _sym_db.RegisterMessage(TestSuite)
87 87
 
88 88
 
89
-DESCRIPTOR.has_options = True
90
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\007release'))
89
+DESCRIPTOR._options = None
91 90
 # @@protoc_insertion_point(module_scope)

+ 111
- 112
hapi/services/tiller_pb2.py
File diff suppressed because it is too large
View File


+ 6
- 7
hapi/version/version_pb2.py View File

@@ -7,7 +7,6 @@ from google.protobuf import descriptor as _descriptor
7 7
 from google.protobuf import message as _message
8 8
 from google.protobuf import reflection as _reflection
9 9
 from google.protobuf import symbol_database as _symbol_database
10
-from google.protobuf import descriptor_pb2
11 10
 # @@protoc_insertion_point(imports)
12 11
 
13 12
 _sym_db = _symbol_database.Default()
@@ -19,6 +18,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
19 18
   name='hapi/version/version.proto',
20 19
   package='hapi.version',
21 20
   syntax='proto3',
21
+  serialized_options=_b('Z\007version'),
22 22
   serialized_pb=_b('\n\x1ahapi/version/version.proto\x12\x0chapi.version\"F\n\x07Version\x12\x0f\n\x07sem_ver\x18\x01 \x01(\t\x12\x12\n\ngit_commit\x18\x02 \x01(\t\x12\x16\n\x0egit_tree_state\x18\x03 \x01(\tB\tZ\x07versionb\x06proto3')
23 23
 )
24 24
 
@@ -38,28 +38,28 @@ _VERSION = _descriptor.Descriptor(
38 38
       has_default_value=False, default_value=_b("").decode('utf-8'),
39 39
       message_type=None, enum_type=None, containing_type=None,
40 40
       is_extension=False, extension_scope=None,
41
-      options=None, file=DESCRIPTOR),
41
+      serialized_options=None, file=DESCRIPTOR),
42 42
     _descriptor.FieldDescriptor(
43 43
       name='git_commit', full_name='hapi.version.Version.git_commit', index=1,
44 44
       number=2, type=9, cpp_type=9, label=1,
45 45
       has_default_value=False, default_value=_b("").decode('utf-8'),
46 46
       message_type=None, enum_type=None, containing_type=None,
47 47
       is_extension=False, extension_scope=None,
48
-      options=None, file=DESCRIPTOR),
48
+      serialized_options=None, file=DESCRIPTOR),
49 49
     _descriptor.FieldDescriptor(
50 50
       name='git_tree_state', full_name='hapi.version.Version.git_tree_state', index=2,
51 51
       number=3, type=9, cpp_type=9, label=1,
52 52
       has_default_value=False, default_value=_b("").decode('utf-8'),
53 53
       message_type=None, enum_type=None, containing_type=None,
54 54
       is_extension=False, extension_scope=None,
55
-      options=None, file=DESCRIPTOR),
55
+      serialized_options=None, file=DESCRIPTOR),
56 56
   ],
57 57
   extensions=[
58 58
   ],
59 59
   nested_types=[],
60 60
   enum_types=[
61 61
   ],
62
-  options=None,
62
+  serialized_options=None,
63 63
   is_extendable=False,
64 64
   syntax='proto3',
65 65
   extension_ranges=[],
@@ -80,6 +80,5 @@ Version = _reflection.GeneratedProtocolMessageType('Version', (_message.Message,
80 80
 _sym_db.RegisterMessage(Version)
81 81
 
82 82
 
83
-DESCRIPTOR.has_options = True
84
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\007version'))
83
+DESCRIPTOR._options = None
85 84
 # @@protoc_insertion_point(module_scope)

+ 2
- 2
requirements.txt View File

@@ -1,7 +1,7 @@
1 1
 deepdiff==3.3.0
2 2
 gitpython
3
-grpcio==1.10.0
4
-grpcio-tools==1.10.0
3
+grpcio==1.16.0
4
+grpcio-tools==1.16.0
5 5
 jsonschema>=2.6.0
6 6
 keystoneauth1==2.21.0
7 7
 keystonemiddleware==4.9.1

Loading…
Cancel
Save