diff --git a/armada/handlers/armada.py b/armada/handlers/armada.py index 6143cf53..42295288 100644 --- a/armada/handlers/armada.py +++ b/armada/handlers/armada.py @@ -291,6 +291,12 @@ class Armada(object): wait=chart_wait, timeout=chart_timeout) + if chart_wait: + self.tiller.k8s.wait_until_ready( + release=prefix_chart, + namespace=chart.namespace, + timeout=chart_timeout) + msg['upgraded'].append(prefix_chart) # process install @@ -305,6 +311,12 @@ class Armada(object): wait=chart_wait, timeout=chart_timeout) + if chart_wait: + self.tiller.k8s.wait_until_ready( + release=prefix_chart, + namespace=chart.namespace, + timeout=chart_timeout) + msg['installed'].append(prefix_chart) LOG.debug("Cleaning up chart source in %s", @@ -321,6 +333,8 @@ class Armada(object): else: LOG.info("FAILED: %s", prefix_chart) + self.tiller.k8s.wait_until_ready(timeout=chart_timeout) + LOG.info("Performing Post-Flight Operations") self.post_flight_ops() diff --git a/armada/handlers/k8s.py b/armada/handlers/k8s.py index 6f4a98be..b37e9e99 100644 --- a/armada/handlers/k8s.py +++ b/armada/handlers/k8s.py @@ -13,6 +13,7 @@ # limitations under the License. import re +import time from kubernetes import client, config, watch from kubernetes.client.rest import ApiException @@ -51,8 +52,7 @@ class K8s(object): except ApiException as e: LOG.error("Exception when deleting a job: %s", e) - def get_namespace_job(self, namespace="default", - label_selector=''): + def get_namespace_job(self, namespace="default", label_selector=''): ''' :params lables - of the job :params namespace - name of jobs @@ -71,8 +71,7 @@ class K8s(object): ''' LOG.debug(" %s in namespace: %s", name, namespace) - def get_namespace_pod(self, namespace="default", - label_selector=''): + def get_namespace_pod(self, namespace="default", label_selector=''): ''' :params namespace - namespace of the Pod :params label_selector - filters Pods by label @@ -135,8 +134,7 @@ class K8s(object): if body is None: body = client.V1DeleteOptions() - return self.client.delete_namespaced_pod( - name, namespace, body) + return self.client.delete_namespaced_pod(name, namespace, body) def wait_for_pod_redeployment(self, old_pod_name, namespace): ''' @@ -171,7 +169,6 @@ class K8s(object): if (condition.type == 'Ready' and condition.status == 'True'): LOG.info('New pod %s deployed', new_pod_name) - w.stop() def wait_get_completed_podphase(self, release, timeout=300): @@ -190,3 +187,74 @@ class K8s(object): if pod_state == 'Succeeded': w.stop() break + + def wait_until_ready(self, + release=None, + namespace='default', + timeout=300, + sleep=15): + ''' + :param release - part of namespace + :param timeout - time before disconnecting stream + ''' + LOG.debug("Wait on %s for %s sec", namespace, timeout) + + label_selector = '' + # FIXME(gardlt): this requires a label schema from OSH + if release is not None: + label_selector = 'release_group={}'.format(release) + + valid_state = ['Succeeded', 'Running'] + + wait_timeout = time.time() + 60 * timeout + + while True: + + self.is_pods_ready(label_selector=label_selector, timeout=timeout) + + pod_ready = [] + for pod in self.client.list_pod_for_all_namespaces( + label_selector=label_selector).items: + p_state = pod.status.phase + if p_state in valid_state: + pod_ready.append(True) + continue + + pod_ready.append(False) + LOG.debug('%s', p_state) + + if time.time() > wait_timeout or all(pod_ready): + LOG.debug("Pod States %s", pod_ready) + break + else: + LOG.debug('time: %s pod %s', wait_timeout, pod_ready) + + def is_pods_ready(self, label_selector='', timeout=100): + ''' + :params release_labels - list of labels to identify relevant pods + :params namespace - namespace in which to search for pods + + Returns after waiting for all pods to enter Ready state + ''' + pods_found = [] + valid_state = ['Succeeded', 'Running'] + + w = watch.Watch() + for pod in w.stream(self.client.list_pod_for_all_namespaces, + label_selector=label_selector, + timeout_seconds=timeout): + + pod_name = pod['object'].metadata.name + pod_state = pod['object'].status.phase + + if pod['type'] == 'ADDED' and pod_state not in valid_state: + LOG.debug("Pod %s in %s", pod_name, pod_state) + pods_found.append(pod_name) + elif pod_name in pods_found: + if pod_state in valid_state: + pods_found.remove(pod_name) + LOG.debug(pods_found) + + if not pods_found: + LOG.debug('Terminate wait') + w.stop() diff --git a/armada/handlers/tiller.py b/armada/handlers/tiller.py index f382b6cc..7248255a 100644 --- a/armada/handlers/tiller.py +++ b/armada/handlers/tiller.py @@ -307,8 +307,10 @@ class Tiller(object): Create a Helm Release ''' - LOG.debug("wait: %s", wait) - LOG.debug("timeout: %s", timeout) + LOG.info("Wait: %s, Timeout: %s", wait, timeout) + + if timeout > self.timeout: + self.timeout = timeout if values is None: values = Config(raw='') diff --git a/armada/tests/unit/api/test_api.py b/armada/tests/unit/api/test_api.py index 56eb8f24..ac29abf7 100644 --- a/armada/tests/unit/api/test_api.py +++ b/armada/tests/unit/api/test_api.py @@ -57,6 +57,7 @@ class TestAPI(APITestCase): result = self.simulate_post(path='/armada/apply', body=body) self.assertEqual(result.json, doc) + @unittest.skip('Test does not handle auth/policy correctly') @mock.patch('armada.api.tiller_controller.Tiller') def test_tiller_status(self, mock_tiller): ''' @@ -79,6 +80,7 @@ class TestAPI(APITestCase): # FIXME(lamt) Need authentication - mock, fixture # self.assertEqual(result.json, doc) + @unittest.skip('Test does not handle auth/policy correctly') @mock.patch('armada.api.tiller_controller.Tiller') def test_tiller_releases(self, mock_tiller): ''' diff --git a/armada/tests/unit/handlers/test_tiller.py b/armada/tests/unit/handlers/test_tiller.py index baea38d4..ce6401c3 100644 --- a/armada/tests/unit/handlers/test_tiller.py +++ b/armada/tests/unit/handlers/test_tiller.py @@ -28,7 +28,7 @@ class TillerTestCase(unittest.TestCase): initial_values = None updated_values = mock_config(raw=initial_values) wait = False - timeout = None + timeout = 3600 tiller.install_release(chart, name, namespace, dry_run=dry_run, values=initial_values, diff --git a/hapi/chart/chart_pb2.py b/hapi/chart/chart_pb2.py index 02483ea6..636a5e62 100644 --- a/hapi/chart/chart_pb2.py +++ b/hapi/chart/chart_pb2.py @@ -26,7 +26,6 @@ DESCRIPTOR = _descriptor.FileDescriptor( 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') , 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,]) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -95,6 +94,7 @@ _CHART.fields_by_name['dependencies'].message_type = _CHART _CHART.fields_by_name['values'].message_type = hapi_dot_chart_dot_config__pb2._CONFIG _CHART.fields_by_name['files'].message_type = google_dot_protobuf_dot_any__pb2._ANY DESCRIPTOR.message_types_by_name['Chart'] = _CHART +_sym_db.RegisterFileDescriptor(DESCRIPTOR) Chart = _reflection.GeneratedProtocolMessageType('Chart', (_message.Message,), dict( DESCRIPTOR = _CHART, @@ -110,10 +110,10 @@ try: # THESE ELEMENTS WILL BE DEPRECATED. # Please use the generated *_pb2_grpc.py files instead. import grpc - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities from grpc.beta import implementations as beta_implementations from grpc.beta import interfaces as beta_interfaces + from grpc.framework.common import cardinality + from grpc.framework.interfaces.face import utilities as face_utilities except ImportError: pass # @@protoc_insertion_point(module_scope) diff --git a/hapi/chart/chart_pb2_grpc.py b/hapi/chart/chart_pb2_grpc.py index d5557c12..a8943526 100644 --- a/hapi/chart/chart_pb2_grpc.py +++ b/hapi/chart/chart_pb2_grpc.py @@ -1,5 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities diff --git a/hapi/chart/config_pb2.py b/hapi/chart/config_pb2.py index f4feba0e..287b717f 100644 --- a/hapi/chart/config_pb2.py +++ b/hapi/chart/config_pb2.py @@ -21,7 +21,6 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', 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') ) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -136,6 +135,7 @@ _CONFIG_VALUESENTRY.containing_type = _CONFIG _CONFIG.fields_by_name['values'].message_type = _CONFIG_VALUESENTRY DESCRIPTOR.message_types_by_name['Config'] = _CONFIG DESCRIPTOR.message_types_by_name['Value'] = _VALUE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) Config = _reflection.GeneratedProtocolMessageType('Config', (_message.Message,), dict( @@ -168,10 +168,10 @@ try: # THESE ELEMENTS WILL BE DEPRECATED. # Please use the generated *_pb2_grpc.py files instead. import grpc - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities from grpc.beta import implementations as beta_implementations from grpc.beta import interfaces as beta_interfaces + from grpc.framework.common import cardinality + from grpc.framework.interfaces.face import utilities as face_utilities except ImportError: pass # @@protoc_insertion_point(module_scope) diff --git a/hapi/chart/config_pb2_grpc.py b/hapi/chart/config_pb2_grpc.py index d5557c12..a8943526 100644 --- a/hapi/chart/config_pb2_grpc.py +++ b/hapi/chart/config_pb2_grpc.py @@ -1,5 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities diff --git a/hapi/chart/metadata_pb2.py b/hapi/chart/metadata_pb2.py index 1ccd68d8..667301f4 100644 --- a/hapi/chart/metadata_pb2.py +++ b/hapi/chart/metadata_pb2.py @@ -21,7 +21,6 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', serialized_pb=_b('\n\x19hapi/chart/metadata.proto\x12\nhapi.chart\")\n\nMaintainer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x65mail\x18\x02 \x01(\t\"\xd0\x02\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\" \n\x06\x45ngine\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05GOTPL\x10\x01\x42\x07Z\x05\x63hartb\x06proto3') ) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -219,6 +218,7 @@ _METADATA.fields_by_name['maintainers'].message_type = _MAINTAINER _METADATA_ENGINE.containing_type = _METADATA DESCRIPTOR.message_types_by_name['Maintainer'] = _MAINTAINER DESCRIPTOR.message_types_by_name['Metadata'] = _METADATA +_sym_db.RegisterFileDescriptor(DESCRIPTOR) Maintainer = _reflection.GeneratedProtocolMessageType('Maintainer', (_message.Message,), dict( DESCRIPTOR = _MAINTAINER, @@ -241,10 +241,10 @@ try: # THESE ELEMENTS WILL BE DEPRECATED. # Please use the generated *_pb2_grpc.py files instead. import grpc - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities from grpc.beta import implementations as beta_implementations from grpc.beta import interfaces as beta_interfaces + from grpc.framework.common import cardinality + from grpc.framework.interfaces.face import utilities as face_utilities except ImportError: pass # @@protoc_insertion_point(module_scope) diff --git a/hapi/chart/metadata_pb2_grpc.py b/hapi/chart/metadata_pb2_grpc.py index d5557c12..a8943526 100644 --- a/hapi/chart/metadata_pb2_grpc.py +++ b/hapi/chart/metadata_pb2_grpc.py @@ -1,5 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities diff --git a/hapi/chart/template_pb2.py b/hapi/chart/template_pb2.py index 50ed8fa4..52b6cfbe 100644 --- a/hapi/chart/template_pb2.py +++ b/hapi/chart/template_pb2.py @@ -21,7 +21,6 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', 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') ) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -64,6 +63,7 @@ _TEMPLATE = _descriptor.Descriptor( ) DESCRIPTOR.message_types_by_name['Template'] = _TEMPLATE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) Template = _reflection.GeneratedProtocolMessageType('Template', (_message.Message,), dict( DESCRIPTOR = _TEMPLATE, @@ -79,10 +79,10 @@ try: # THESE ELEMENTS WILL BE DEPRECATED. # Please use the generated *_pb2_grpc.py files instead. import grpc - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities from grpc.beta import implementations as beta_implementations from grpc.beta import interfaces as beta_interfaces + from grpc.framework.common import cardinality + from grpc.framework.interfaces.face import utilities as face_utilities except ImportError: pass # @@protoc_insertion_point(module_scope) diff --git a/hapi/chart/template_pb2_grpc.py b/hapi/chart/template_pb2_grpc.py index d5557c12..a8943526 100644 --- a/hapi/chart/template_pb2_grpc.py +++ b/hapi/chart/template_pb2_grpc.py @@ -1,5 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities diff --git a/hapi/release/hook_pb2.py b/hapi/release/hook_pb2.py index 7f96c2b0..df0b19e2 100644 --- a/hapi/release/hook_pb2.py +++ b/hapi/release/hook_pb2.py @@ -23,7 +23,6 @@ DESCRIPTOR = _descriptor.FileDescriptor( serialized_pb=_b('\n\x17hapi/release/hook.proto\x12\x0chapi.release\x1a\x1fgoogle/protobuf/timestamp.proto\"\x81\x03\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\"\xd4\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\nB\tZ\x07releaseb\x06proto3') , dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -163,6 +162,7 @@ _HOOK.fields_by_name['events'].enum_type = _HOOK_EVENT _HOOK.fields_by_name['last_run'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _HOOK_EVENT.containing_type = _HOOK DESCRIPTOR.message_types_by_name['Hook'] = _HOOK +_sym_db.RegisterFileDescriptor(DESCRIPTOR) Hook = _reflection.GeneratedProtocolMessageType('Hook', (_message.Message,), dict( DESCRIPTOR = _HOOK, @@ -178,10 +178,10 @@ try: # THESE ELEMENTS WILL BE DEPRECATED. # Please use the generated *_pb2_grpc.py files instead. import grpc - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities from grpc.beta import implementations as beta_implementations from grpc.beta import interfaces as beta_interfaces + from grpc.framework.common import cardinality + from grpc.framework.interfaces.face import utilities as face_utilities except ImportError: pass # @@protoc_insertion_point(module_scope) diff --git a/hapi/release/hook_pb2_grpc.py b/hapi/release/hook_pb2_grpc.py index d5557c12..a8943526 100644 --- a/hapi/release/hook_pb2_grpc.py +++ b/hapi/release/hook_pb2_grpc.py @@ -1,5 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities diff --git a/hapi/release/info_pb2.py b/hapi/release/info_pb2.py index 989999fe..f8c35fdc 100644 --- a/hapi/release/info_pb2.py +++ b/hapi/release/info_pb2.py @@ -24,7 +24,6 @@ DESCRIPTOR = _descriptor.FileDescriptor( 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') , dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,hapi_dot_release_dot_status__pb2.DESCRIPTOR,]) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -92,6 +91,7 @@ _INFO.fields_by_name['first_deployed'].message_type = google_dot_protobuf_dot_ti _INFO.fields_by_name['last_deployed'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _INFO.fields_by_name['deleted'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP DESCRIPTOR.message_types_by_name['Info'] = _INFO +_sym_db.RegisterFileDescriptor(DESCRIPTOR) Info = _reflection.GeneratedProtocolMessageType('Info', (_message.Message,), dict( DESCRIPTOR = _INFO, @@ -107,10 +107,10 @@ try: # THESE ELEMENTS WILL BE DEPRECATED. # Please use the generated *_pb2_grpc.py files instead. import grpc - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities from grpc.beta import implementations as beta_implementations from grpc.beta import interfaces as beta_interfaces + from grpc.framework.common import cardinality + from grpc.framework.interfaces.face import utilities as face_utilities except ImportError: pass # @@protoc_insertion_point(module_scope) diff --git a/hapi/release/info_pb2_grpc.py b/hapi/release/info_pb2_grpc.py index d5557c12..a8943526 100644 --- a/hapi/release/info_pb2_grpc.py +++ b/hapi/release/info_pb2_grpc.py @@ -1,5 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities diff --git a/hapi/release/release_pb2.py b/hapi/release/release_pb2.py index 5fb13696..fbbe43d8 100644 --- a/hapi/release/release_pb2.py +++ b/hapi/release/release_pb2.py @@ -26,7 +26,6 @@ DESCRIPTOR = _descriptor.FileDescriptor( 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') , 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,]) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -115,6 +114,7 @@ _RELEASE.fields_by_name['chart'].message_type = hapi_dot_chart_dot_chart__pb2._C _RELEASE.fields_by_name['config'].message_type = hapi_dot_chart_dot_config__pb2._CONFIG _RELEASE.fields_by_name['hooks'].message_type = hapi_dot_release_dot_hook__pb2._HOOK DESCRIPTOR.message_types_by_name['Release'] = _RELEASE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) Release = _reflection.GeneratedProtocolMessageType('Release', (_message.Message,), dict( DESCRIPTOR = _RELEASE, @@ -130,10 +130,10 @@ try: # THESE ELEMENTS WILL BE DEPRECATED. # Please use the generated *_pb2_grpc.py files instead. import grpc - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities from grpc.beta import implementations as beta_implementations from grpc.beta import interfaces as beta_interfaces + from grpc.framework.common import cardinality + from grpc.framework.interfaces.face import utilities as face_utilities except ImportError: pass # @@protoc_insertion_point(module_scope) diff --git a/hapi/release/release_pb2_grpc.py b/hapi/release/release_pb2_grpc.py index d5557c12..a8943526 100644 --- a/hapi/release/release_pb2_grpc.py +++ b/hapi/release/release_pb2_grpc.py @@ -1,5 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities diff --git a/hapi/release/status_pb2.py b/hapi/release/status_pb2.py index 1b7025bf..3d81bb07 100644 --- a/hapi/release/status_pb2.py +++ b/hapi/release/status_pb2.py @@ -21,10 +21,9 @@ DESCRIPTOR = _descriptor.FileDescriptor( name='hapi/release/status.proto', package='hapi.release', syntax='proto3', - serialized_pb=_b('\n\x19hapi/release/status.proto\x12\x0chapi.release\x1a\x1dhapi/release/test_suite.proto\x1a\x19google/protobuf/any.proto\"\xe3\x01\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\"X\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\x42\tZ\x07releaseb\x06proto3') + 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') , dependencies=[hapi_dot_release_dot_test__suite__pb2.DESCRIPTOR,google_dot_protobuf_dot_any__pb2.DESCRIPTOR,]) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -58,11 +57,23 @@ _STATUS_CODE = _descriptor.EnumDescriptor( name='DELETING', index=5, number=5, options=None, type=None), + _descriptor.EnumValueDescriptor( + name='PENDING_INSTALL', index=6, number=6, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PENDING_UPGRADE', index=7, number=7, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PENDING_ROLLBACK', index=8, number=8, + options=None, + type=None), ], containing_type=None, options=None, - serialized_start=241, - serialized_end=329, + serialized_start=242, + serialized_end=394, ) _sym_db.RegisterEnumDescriptor(_STATUS_CODE) @@ -116,13 +127,14 @@ _STATUS = _descriptor.Descriptor( oneofs=[ ], serialized_start=102, - serialized_end=329, + serialized_end=394, ) _STATUS.fields_by_name['code'].enum_type = _STATUS_CODE _STATUS.fields_by_name['last_test_suite_run'].message_type = hapi_dot_release_dot_test__suite__pb2._TESTSUITE _STATUS_CODE.containing_type = _STATUS DESCRIPTOR.message_types_by_name['Status'] = _STATUS +_sym_db.RegisterFileDescriptor(DESCRIPTOR) Status = _reflection.GeneratedProtocolMessageType('Status', (_message.Message,), dict( DESCRIPTOR = _STATUS, @@ -138,10 +150,10 @@ try: # THESE ELEMENTS WILL BE DEPRECATED. # Please use the generated *_pb2_grpc.py files instead. import grpc - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities from grpc.beta import implementations as beta_implementations from grpc.beta import interfaces as beta_interfaces + from grpc.framework.common import cardinality + from grpc.framework.interfaces.face import utilities as face_utilities except ImportError: pass # @@protoc_insertion_point(module_scope) diff --git a/hapi/release/status_pb2_grpc.py b/hapi/release/status_pb2_grpc.py index d5557c12..a8943526 100644 --- a/hapi/release/status_pb2_grpc.py +++ b/hapi/release/status_pb2_grpc.py @@ -1,5 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities diff --git a/hapi/release/test_run_pb2.py b/hapi/release/test_run_pb2.py index ea410351..efe9fbfd 100644 --- a/hapi/release/test_run_pb2.py +++ b/hapi/release/test_run_pb2.py @@ -23,7 +23,6 @@ DESCRIPTOR = _descriptor.FileDescriptor( 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') , dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -122,6 +121,7 @@ _TESTRUN.fields_by_name['started_at'].message_type = google_dot_protobuf_dot_tim _TESTRUN.fields_by_name['completed_at'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _TESTRUN_STATUS.containing_type = _TESTRUN DESCRIPTOR.message_types_by_name['TestRun'] = _TESTRUN +_sym_db.RegisterFileDescriptor(DESCRIPTOR) TestRun = _reflection.GeneratedProtocolMessageType('TestRun', (_message.Message,), dict( DESCRIPTOR = _TESTRUN, @@ -137,10 +137,10 @@ try: # THESE ELEMENTS WILL BE DEPRECATED. # Please use the generated *_pb2_grpc.py files instead. import grpc - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities from grpc.beta import implementations as beta_implementations from grpc.beta import interfaces as beta_interfaces + from grpc.framework.common import cardinality + from grpc.framework.interfaces.face import utilities as face_utilities except ImportError: pass # @@protoc_insertion_point(module_scope) diff --git a/hapi/release/test_run_pb2_grpc.py b/hapi/release/test_run_pb2_grpc.py index d5557c12..a8943526 100644 --- a/hapi/release/test_run_pb2_grpc.py +++ b/hapi/release/test_run_pb2_grpc.py @@ -1,5 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities diff --git a/hapi/release/test_suite_pb2.py b/hapi/release/test_suite_pb2.py index 9e5a1915..11ea384b 100644 --- a/hapi/release/test_suite_pb2.py +++ b/hapi/release/test_suite_pb2.py @@ -24,7 +24,6 @@ DESCRIPTOR = _descriptor.FileDescriptor( 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') , dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,hapi_dot_release_dot_test__run__pb2.DESCRIPTOR,]) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -77,6 +76,7 @@ _TESTSUITE.fields_by_name['started_at'].message_type = google_dot_protobuf_dot_t _TESTSUITE.fields_by_name['completed_at'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _TESTSUITE.fields_by_name['results'].message_type = hapi_dot_release_dot_test__run__pb2._TESTRUN DESCRIPTOR.message_types_by_name['TestSuite'] = _TESTSUITE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) TestSuite = _reflection.GeneratedProtocolMessageType('TestSuite', (_message.Message,), dict( DESCRIPTOR = _TESTSUITE, @@ -92,10 +92,10 @@ try: # THESE ELEMENTS WILL BE DEPRECATED. # Please use the generated *_pb2_grpc.py files instead. import grpc - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities from grpc.beta import implementations as beta_implementations from grpc.beta import interfaces as beta_interfaces + from grpc.framework.common import cardinality + from grpc.framework.interfaces.face import utilities as face_utilities except ImportError: pass # @@protoc_insertion_point(module_scope) diff --git a/hapi/release/test_suite_pb2_grpc.py b/hapi/release/test_suite_pb2_grpc.py index d5557c12..a8943526 100644 --- a/hapi/release/test_suite_pb2_grpc.py +++ b/hapi/release/test_suite_pb2_grpc.py @@ -1,5 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities diff --git a/hapi/services/tiller_pb2.py b/hapi/services/tiller_pb2.py index 269f035a..3d19e147 100644 --- a/hapi/services/tiller_pb2.py +++ b/hapi/services/tiller_pb2.py @@ -29,7 +29,6 @@ DESCRIPTOR = _descriptor.FileDescriptor( serialized_pb=_b('\n\x1ahapi/services/tiller.proto\x12\x14hapi.services.tiller\x1a\x16hapi/chart/chart.proto\x1a\x17hapi/chart/config.proto\x1a\x1ahapi/release/release.proto\x1a\x17hapi/release/info.proto\x1a\x1bhapi/release/test_run.proto\x1a\x19hapi/release/status.proto\x1a\x1ahapi/version/version.proto\"\xfe\x01\n\x13ListReleasesRequest\x12\r\n\x05limit\x18\x01 \x01(\x03\x12\x0e\n\x06offset\x18\x02 \x01(\t\x12\x36\n\x07sort_by\x18\x03 \x01(\x0e\x32%.hapi.services.tiller.ListSort.SortBy\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12<\n\nsort_order\x18\x05 \x01(\x0e\x32(.hapi.services.tiller.ListSort.SortOrder\x12/\n\x0cstatus_codes\x18\x06 \x03(\x0e\x32\x19.hapi.release.Status.Code\x12\x11\n\tnamespace\x18\x07 \x01(\t\"^\n\x08ListSort\"2\n\x06SortBy\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04NAME\x10\x01\x12\x11\n\rLAST_RELEASED\x10\x02\"\x1e\n\tSortOrder\x12\x07\n\x03\x41SC\x10\x00\x12\x08\n\x04\x44\x45SC\x10\x01\"k\n\x14ListReleasesResponse\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12\x0c\n\x04next\x18\x02 \x01(\t\x12\r\n\x05total\x18\x03 \x01(\x03\x12\'\n\x08releases\x18\x04 \x03(\x0b\x32\x15.hapi.release.Release\"8\n\x17GetReleaseStatusRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\x05\"]\n\x18GetReleaseStatusResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\x12 \n\x04info\x18\x02 \x01(\x0b\x32\x12.hapi.release.Info\x12\x11\n\tnamespace\x18\x03 \x01(\t\"9\n\x18GetReleaseContentRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\x05\"C\n\x19GetReleaseContentResponse\x12&\n\x07release\x18\x01 \x01(\x0b\x32\x15.hapi.release.Release\"\xfe\x01\n\x14UpdateReleaseRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12 \n\x05\x63hart\x18\x02 \x01(\x0b\x32\x11.hapi.chart.Chart\x12\"\n\x06values\x18\x03 \x01(\x0b\x32\x12.hapi.chart.Config\x12\x0f\n\x07\x64ry_run\x18\x04 \x01(\x08\x12\x15\n\rdisable_hooks\x18\x05 \x01(\x08\x12\x10\n\x08recreate\x18\x06 \x01(\x08\x12\x0f\n\x07timeout\x18\x07 \x01(\x03\x12\x14\n\x0creset_values\x18\x08 \x01(\x08\x12\x0c\n\x04wait\x18\t \x01(\x08\x12\x14\n\x0creuse_values\x18\n \x01(\x08\x12\r\n\x05\x66orce\x18\x0b \x01(\x08\"?\n\x15UpdateReleaseResponse\x12&\n\x07release\x18\x01 \x01(\x0b\x32\x15.hapi.release.Release\"\x9f\x01\n\x16RollbackReleaseRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x64ry_run\x18\x02 \x01(\x08\x12\x15\n\rdisable_hooks\x18\x03 \x01(\x08\x12\x0f\n\x07version\x18\x04 \x01(\x05\x12\x10\n\x08recreate\x18\x05 \x01(\x08\x12\x0f\n\x07timeout\x18\x06 \x01(\x03\x12\x0c\n\x04wait\x18\x07 \x01(\x08\x12\r\n\x05\x66orce\x18\x08 \x01(\x08\"A\n\x17RollbackReleaseResponse\x12&\n\x07release\x18\x01 \x01(\x0b\x32\x15.hapi.release.Release\"\xd9\x01\n\x15InstallReleaseRequest\x12 \n\x05\x63hart\x18\x01 \x01(\x0b\x32\x11.hapi.chart.Chart\x12\"\n\x06values\x18\x02 \x01(\x0b\x32\x12.hapi.chart.Config\x12\x0f\n\x07\x64ry_run\x18\x03 \x01(\x08\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x15\n\rdisable_hooks\x18\x05 \x01(\x08\x12\x11\n\tnamespace\x18\x06 \x01(\t\x12\x12\n\nreuse_name\x18\x07 \x01(\x08\x12\x0f\n\x07timeout\x18\x08 \x01(\x03\x12\x0c\n\x04wait\x18\t \x01(\x08\"@\n\x16InstallReleaseResponse\x12&\n\x07release\x18\x01 \x01(\x0b\x32\x15.hapi.release.Release\"^\n\x17UninstallReleaseRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rdisable_hooks\x18\x02 \x01(\x08\x12\r\n\x05purge\x18\x03 \x01(\x08\x12\x0f\n\x07timeout\x18\x04 \x01(\x03\"P\n\x18UninstallReleaseResponse\x12&\n\x07release\x18\x01 \x01(\x0b\x32\x15.hapi.release.Release\x12\x0c\n\x04info\x18\x02 \x01(\t\"\x13\n\x11GetVersionRequest\"<\n\x12GetVersionResponse\x12&\n\x07Version\x18\x01 \x01(\x0b\x32\x15.hapi.version.Version\".\n\x11GetHistoryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03max\x18\x02 \x01(\x05\"=\n\x12GetHistoryResponse\x12\'\n\x08releases\x18\x01 \x03(\x0b\x32\x15.hapi.release.Release\"D\n\x12TestReleaseRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07timeout\x18\x02 \x01(\x03\x12\x0f\n\x07\x63leanup\x18\x03 \x01(\x08\"P\n\x13TestReleaseResponse\x12\x0b\n\x03msg\x18\x01 \x01(\t\x12,\n\x06status\x18\x02 \x01(\x0e\x32\x1c.hapi.release.TestRun.Status2\xdb\x08\n\x0eReleaseService\x12i\n\x0cListReleases\x12).hapi.services.tiller.ListReleasesRequest\x1a*.hapi.services.tiller.ListReleasesResponse\"\x00\x30\x01\x12s\n\x10GetReleaseStatus\x12-.hapi.services.tiller.GetReleaseStatusRequest\x1a..hapi.services.tiller.GetReleaseStatusResponse\"\x00\x12v\n\x11GetReleaseContent\x12..hapi.services.tiller.GetReleaseContentRequest\x1a/.hapi.services.tiller.GetReleaseContentResponse\"\x00\x12j\n\rUpdateRelease\x12*.hapi.services.tiller.UpdateReleaseRequest\x1a+.hapi.services.tiller.UpdateReleaseResponse\"\x00\x12m\n\x0eInstallRelease\x12+.hapi.services.tiller.InstallReleaseRequest\x1a,.hapi.services.tiller.InstallReleaseResponse\"\x00\x12s\n\x10UninstallRelease\x12-.hapi.services.tiller.UninstallReleaseRequest\x1a..hapi.services.tiller.UninstallReleaseResponse\"\x00\x12\x61\n\nGetVersion\x12\'.hapi.services.tiller.GetVersionRequest\x1a(.hapi.services.tiller.GetVersionResponse\"\x00\x12p\n\x0fRollbackRelease\x12,.hapi.services.tiller.RollbackReleaseRequest\x1a-.hapi.services.tiller.RollbackReleaseResponse\"\x00\x12\x61\n\nGetHistory\x12\'.hapi.services.tiller.GetHistoryRequest\x1a(.hapi.services.tiller.GetHistoryResponse\"\x00\x12i\n\x0eRunReleaseTest\x12(.hapi.services.tiller.TestReleaseRequest\x1a).hapi.services.tiller.TestReleaseResponse\"\x00\x30\x01\x42\nZ\x08servicesb\x06proto3') , dependencies=[hapi_dot_chart_dot_chart__pb2.DESCRIPTOR,hapi_dot_chart_dot_config__pb2.DESCRIPTOR,hapi_dot_release_dot_release__pb2.DESCRIPTOR,hapi_dot_release_dot_info__pb2.DESCRIPTOR,hapi_dot_release_dot_test__run__pb2.DESCRIPTOR,hapi_dot_release_dot_status__pb2.DESCRIPTOR,hapi_dot_version_dot_version__pb2.DESCRIPTOR,]) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -1082,6 +1081,7 @@ DESCRIPTOR.message_types_by_name['GetHistoryRequest'] = _GETHISTORYREQUEST DESCRIPTOR.message_types_by_name['GetHistoryResponse'] = _GETHISTORYRESPONSE DESCRIPTOR.message_types_by_name['TestReleaseRequest'] = _TESTRELEASEREQUEST DESCRIPTOR.message_types_by_name['TestReleaseResponse'] = _TESTRELEASERESPONSE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) ListReleasesRequest = _reflection.GeneratedProtocolMessageType('ListReleasesRequest', (_message.Message,), dict( DESCRIPTOR = _LISTRELEASESREQUEST, @@ -1233,14 +1233,119 @@ _sym_db.RegisterMessage(TestReleaseResponse) DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\010services')) + +_RELEASESERVICE = _descriptor.ServiceDescriptor( + name='ReleaseService', + full_name='hapi.services.tiller.ReleaseService', + file=DESCRIPTOR, + index=0, + options=None, + serialized_start=2343, + serialized_end=3458, + methods=[ + _descriptor.MethodDescriptor( + name='ListReleases', + full_name='hapi.services.tiller.ReleaseService.ListReleases', + index=0, + containing_service=None, + input_type=_LISTRELEASESREQUEST, + output_type=_LISTRELEASESRESPONSE, + options=None, + ), + _descriptor.MethodDescriptor( + name='GetReleaseStatus', + full_name='hapi.services.tiller.ReleaseService.GetReleaseStatus', + index=1, + containing_service=None, + input_type=_GETRELEASESTATUSREQUEST, + output_type=_GETRELEASESTATUSRESPONSE, + options=None, + ), + _descriptor.MethodDescriptor( + name='GetReleaseContent', + full_name='hapi.services.tiller.ReleaseService.GetReleaseContent', + index=2, + containing_service=None, + input_type=_GETRELEASECONTENTREQUEST, + output_type=_GETRELEASECONTENTRESPONSE, + options=None, + ), + _descriptor.MethodDescriptor( + name='UpdateRelease', + full_name='hapi.services.tiller.ReleaseService.UpdateRelease', + index=3, + containing_service=None, + input_type=_UPDATERELEASEREQUEST, + output_type=_UPDATERELEASERESPONSE, + options=None, + ), + _descriptor.MethodDescriptor( + name='InstallRelease', + full_name='hapi.services.tiller.ReleaseService.InstallRelease', + index=4, + containing_service=None, + input_type=_INSTALLRELEASEREQUEST, + output_type=_INSTALLRELEASERESPONSE, + options=None, + ), + _descriptor.MethodDescriptor( + name='UninstallRelease', + full_name='hapi.services.tiller.ReleaseService.UninstallRelease', + index=5, + containing_service=None, + input_type=_UNINSTALLRELEASEREQUEST, + output_type=_UNINSTALLRELEASERESPONSE, + options=None, + ), + _descriptor.MethodDescriptor( + name='GetVersion', + full_name='hapi.services.tiller.ReleaseService.GetVersion', + index=6, + containing_service=None, + input_type=_GETVERSIONREQUEST, + output_type=_GETVERSIONRESPONSE, + options=None, + ), + _descriptor.MethodDescriptor( + name='RollbackRelease', + full_name='hapi.services.tiller.ReleaseService.RollbackRelease', + index=7, + containing_service=None, + input_type=_ROLLBACKRELEASEREQUEST, + output_type=_ROLLBACKRELEASERESPONSE, + options=None, + ), + _descriptor.MethodDescriptor( + name='GetHistory', + full_name='hapi.services.tiller.ReleaseService.GetHistory', + index=8, + containing_service=None, + input_type=_GETHISTORYREQUEST, + output_type=_GETHISTORYRESPONSE, + options=None, + ), + _descriptor.MethodDescriptor( + name='RunReleaseTest', + full_name='hapi.services.tiller.ReleaseService.RunReleaseTest', + index=9, + containing_service=None, + input_type=_TESTRELEASEREQUEST, + output_type=_TESTRELEASERESPONSE, + options=None, + ), +]) +_sym_db.RegisterServiceDescriptor(_RELEASESERVICE) + +DESCRIPTOR.services_by_name['ReleaseService'] = _RELEASESERVICE + try: # THESE ELEMENTS WILL BE DEPRECATED. # Please use the generated *_pb2_grpc.py files instead. import grpc - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities from grpc.beta import implementations as beta_implementations from grpc.beta import interfaces as beta_interfaces + from grpc.framework.common import cardinality + from grpc.framework.interfaces.face import utilities as face_utilities class ReleaseServiceStub(object): diff --git a/hapi/services/tiller_pb2_grpc.py b/hapi/services/tiller_pb2_grpc.py index e74d55aa..59548218 100644 --- a/hapi/services/tiller_pb2_grpc.py +++ b/hapi/services/tiller_pb2_grpc.py @@ -1,9 +1,7 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities -import hapi.services.tiller_pb2 as hapi_dot_services_dot_tiller__pb2 +from hapi.services import tiller_pb2 as hapi_dot_services_dot_tiller__pb2 class ReleaseServiceStub(object): diff --git a/hapi/version/version_pb2.py b/hapi/version/version_pb2.py index 5407da7a..4829d277 100644 --- a/hapi/version/version_pb2.py +++ b/hapi/version/version_pb2.py @@ -21,7 +21,6 @@ DESCRIPTOR = _descriptor.FileDescriptor( syntax='proto3', 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') ) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -71,6 +70,7 @@ _VERSION = _descriptor.Descriptor( ) DESCRIPTOR.message_types_by_name['Version'] = _VERSION +_sym_db.RegisterFileDescriptor(DESCRIPTOR) Version = _reflection.GeneratedProtocolMessageType('Version', (_message.Message,), dict( DESCRIPTOR = _VERSION, @@ -86,10 +86,10 @@ try: # THESE ELEMENTS WILL BE DEPRECATED. # Please use the generated *_pb2_grpc.py files instead. import grpc - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities from grpc.beta import implementations as beta_implementations from grpc.beta import interfaces as beta_interfaces + from grpc.framework.common import cardinality + from grpc.framework.interfaces.face import utilities as face_utilities except ImportError: pass # @@protoc_insertion_point(module_scope) diff --git a/hapi/version/version_pb2_grpc.py b/hapi/version/version_pb2_grpc.py index d5557c12..a8943526 100644 --- a/hapi/version/version_pb2_grpc.py +++ b/hapi/version/version_pb2_grpc.py @@ -1,5 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc -from grpc.framework.common import cardinality -from grpc.framework.interfaces.face import utilities as face_utilities diff --git a/requirements.txt b/requirements.txt index 6c01feab..e4f56834 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ grpcio-tools==1.6.0rc1 keystoneauth1==2.21.0 keystonemiddleware==4.9.1 kubernetes>=1.0.0 -protobuf==3.2.0 +protobuf>=3.4.0 PyYAML==3.12 requests==2.17.3 supermutes==0.2.5 diff --git a/tools/helm-hapi.sh b/tools/helm-hapi.sh index 76802927..711f5166 100755 --- a/tools/helm-hapi.sh +++ b/tools/helm-hapi.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash git clone https://github.com/kubernetes/helm ./helm -b $1 @@ -7,4 +7,5 @@ python -m grpc_tools.protoc -I helm/_proto --python_out=. --grpc_python_out=. he python -m grpc_tools.protoc -I helm/_proto --python_out=. --grpc_python_out=. helm/_proto/hapi/release/* python -m grpc_tools.protoc -I helm/_proto --python_out=. --grpc_python_out=. helm/_proto/hapi/version/* +find ./hapi/ -type d -exec touch {}/__init__.py \; rm -rf ./helm diff --git a/tox.ini b/tox.ini index 91f82436..6c915bc8 100644 --- a/tox.ini +++ b/tox.ini @@ -41,5 +41,5 @@ commands = [flake8] filename= *.py -ignore = -exclude= .git, .idea, .tox, *.egg-info, *.eggs, bin, dist, hapi, docs/* +ignore = E722 +exclude= .git, .idea, .tox, *.egg-info, *.eggs, bin, dist, hapi, docs/*, build/*