Unverified Commit a6971513 authored by efikalti's avatar efikalti Committed by Avraam Tsantekidis

LAM-41 file containing the definition of the errors used in provisioner

parent dd070279
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division,
print_function, unicode_literals)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This module contains the definitions of returned errors.
"""
import os
# Definitions of return value errors
error_syntax_clustersize = -1
error_syntax_cpu_master = -2
error_syntax_ram_master = -3
error_syntax_disk_master = -4
error_syntax_cpu_slave = -5
error_syntax_ram_slave = -6
error_syntax_disk_slave = -7
error_syntax_logging_level = -8
error_syntax_disk_template = -9
error_quotas_cyclades_disk = -10
error_quotas_cpu = -11
error_quotas_ram = -12
error_quotas_cluster_size = -13
error_quotas_network = -14
error_flavor_id = -15
error_image_id = -16
error_syntax_token = -17
error_ready_reroute = -18
error_no_arguments = -19
error_fatal = -20
error_user_quota = -22
error_flavor_list = -23
error_get_list_servers = -24
error_get_list_projects = -25
error_get_network_quota = -28
error_create_network = -29
error_get_ip = -30
error_create_server = -31
error_syntax_auth_token = -32
error_ansible_playbook = -34
error_ssh_client = -35
error_cluster_not_exist = -69
error_cluster_corrupt = -70
error_proj_id = -71
error_multiple_entries = -72
error_project_quota = -73
error_authentication = -99
......@@ -5,6 +5,7 @@ from __future__ import (absolute_import, division,
print_function, unicode_literals)
import logging
import argparse
from cluster_error_constants import *
from kamaki.clients import astakos, cyclades
from kamaki.clients import ClientError
from kamaki.clients.utils import https
......@@ -361,7 +362,7 @@ if __name__ == "__main__":
default="lambda.grnet.gr")
parser.add_argument('--name', type=str, dest='name', default="to mikro debian sto livadi")
parser.add_argument('--cluster_size', type=int, dest='cluster_size', default=3)
parser.add_argument('--cluster_size', type=int, dest='cluster_size', default=100)
parser.add_argument('--cpu_request', type=int, dest='cpu_request', default=3)
parser.add_argument('--ram_request', type=int, dest='ram_request', default=4000) # in MB
parser.add_argument('--disk_request', type=int, dest='disk_request', default=400) # in GB
......@@ -370,7 +371,7 @@ if __name__ == "__main__":
args = parser.parse_args()
# run provisioner methods
# Run Provisioner methods
provisioner = Provisioner(cloud_name=args.cloud)
print(provisioner.check_all_resources(cluster_size=args.cluster_size,
cpu_request=args.cpu_request,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment