def GetRuntimeParameters(self, empty, context): print 'V3 ', 'GetRuntimeParameters', 'called' result = provider_pb2.RuntimeParameterList() params = [] db_host = provider_pb2.RuntimeParameter() db_host.name = 'db_host' db_host.type = userattr_pb2.DATA_TYPE_STRING db_host.desc = 'Database Host' db_host.default_value = '171.64.122.134' db_host.required = True params.append(db_host) db_port = provider_pb2.RuntimeParameter() db_port.name = 'db_port' db_port.type = userattr_pb2.DATA_TYPE_INT db_port.desc = 'Database Port' db_port.default_value = '7701' db_port.required = True params.append(db_port) db_user = provider_pb2.RuntimeParameter() db_user.name = 'db_user' db_user.type = userattr_pb2.DATA_TYPE_STRING db_user.desc = 'Database User' db_user.default_value = 'minds' db_user.required = True params.append(db_user) db_pwd = provider_pb2.RuntimeParameter() db_pwd.name = 'db_pwd' db_pwd.type = userattr_pb2.DATA_TYPE_AUTH db_pwd.desc = 'Database Password' db_pwd.default_value = 'minds67~' db_pwd.required = True params.append(db_pwd) db_database = provider_pb2.RuntimeParameter() db_database.name = 'db_database' db_database.type = userattr_pb2.DATA_TYPE_STRING db_database.desc = 'Database Database name' db_database.default_value = 'ascar' db_database.required = True params.append(db_database) result.params.extend(params) return result
def GetProviderParameter(self, empty, context): # self.da_logger.write("get_provider_parameter called") params = list() result = provider_pb2.RuntimeParameterList() remote = provider_pb2.RuntimeParameter() remote.name = "remote" remote.type = userattr_pb2.DATA_TYPE_STRING remote.desc = "remote" remote.default_value = "" remote.required = True params.append(remote) result.params.extend(params) return result
def GetRuntimeParameters(self, empty, context): print 'GetRuntimeParameters', 'called' params = [] result = provider_pb2.RuntimeParameterList() print result sds_path = provider_pb2.RuntimeParameter() sds_path.name = 'sds_path' sds_path.type = userattr_pb2.DATA_TYPE_STRING sds_path.desc = 'DM Path' sds_path.default_value = 'grammar' sds_path.required = True params.append(sds_path) result.params.extend(params) return result