# You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # -*- coding: utf-8 -*- """Collection of all agents related calls """ from deploy_board.webapp.helpers.deployclient import DeployClient deployclient = DeployClient() def get_agents(request, env_name, stage_name): return deployclient.get("/envs/%s/%s/agents" % (env_name, stage_name), request.teletraan_user_id.token) def reset_failed_agents(request, env_name, stage_name, deploy_id): return deployclient.put( "/envs/%s/%s/agents/reset_failed_agents/%s" % (env_name, stage_name, deploy_id), request.teletraan_user_id.token) def get_agent_error(request, env_name, stage_name, host_name): return deployclient.get(
# You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # -*- coding: utf-8 -*- """Collection of build related calls """ from deploy_board.webapp.helpers.deployclient import DeployClient deploy_client = DeployClient() def get_build(request, id): return deploy_client.get("/builds/%s" % id, request.teletraan_user_id.token) def get_branches(request, name): return deploy_client.get("/builds/names/%s/branches" % name, request.teletraan_user_id.token) def get_builds(request, **kwargs): params = deploy_client.gen_params(kwargs) return deploy_client.get("/builds/",