Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(104)  |  Call(74)  |  Derive(0)  |  Import(30)

src/s/a/sahara-dashboard-2014.1/saharadashboard/clusters/workflows/create.py   sahara-dashboard(Download)
    def populate_image_choices(self, request, context):
        sahara = saharaclient.client(request)
        all_images = sahara.images.list()
 
        plugin, hadoop_version = whelpers.\
    def populate_cluster_template_choices(self, request, context):
        sahara = saharaclient.client(request)
        templates = sahara.cluster_templates.list()
 
        plugin, hadoop_version = whelpers.\
    def handle(self, request, context):
        try:
            sahara = saharaclient.client(request)
            #TODO(nkonovalov) Implement AJAX Node Groups
            node_groups = None

src/s/a/sahara-dashboard-2014.1/saharadashboard/nodegroup_templates/workflows/create.py   sahara-dashboard(Download)
    def __init__(self, request, *args, **kwargs):
        super(GeneralConfigAction, self).__init__(request, *args, **kwargs)
 
        sahara = saharaclient.client(request)
        hlps = helpers.Helpers(sahara)
    def __init__(self, request, context_seed, entry_point, *args, **kwargs):
        sahara = saharaclient.client(request)
        hlps = helpers.Helpers(sahara)
 
        plugin, hadoop_version = whelpers.\
    def handle(self, request, context):
        try:
            sahara = saharaclient.client(request)
 
            processes = []
    def __init__(self, request, *args, **kwargs):
        super(SelectPluginAction, self).__init__(request, *args, **kwargs)
 
        sahara = saharaclient.client(request)
        self._generate_plugin_version_fields(sahara)

src/s/a/sahara-dashboard-2014.1/saharadashboard/jobs/workflows/launch.py   sahara-dashboard(Download)
from horizon import workflows
 
from saharadashboard.api.client import client as saharaclient
import saharadashboard.cluster_templates.workflows.create as t_flows
import saharadashboard.clusters.workflows.create as c_flow
    def get_data_source_choices(self, request, context):
        sahara = saharaclient(request)
        data_sources = sahara.data_sources.list()
 
        choices = [(data_source.id, data_source.name)
    def populate_job_choices(self, request):
        sahara = saharaclient(request)
        jobs = sahara.jobs.list()
 
        choices = [(job.id, job.name)
    def populate_cluster_choices(self, request, context):
        sahara = saharaclient(request)
        clusters = sahara.clusters.list()
 
        choices = [(cluster.id, cluster.name)
    def __init__(self, request, *args, **kwargs):
        super(JobConfigAction, self).__init__(request, *args, **kwargs)
        job_ex_id = request.REQUEST.get("job_execution_id")
        if job_ex_id is not None:
            client = saharaclient(request)

src/s/a/sahara-dashboard-2014.1/saharadashboard/image_registry/views.py   sahara-dashboard(Download)
from horizon import tables
 
from saharadashboard.api.client import client as saharaclient
from saharadashboard.image_registry.forms import EditTagsForm
from saharadashboard.image_registry.forms import RegisterImageForm
    def get_data(self):
        sahara = saharaclient(self.request)
 
        return sahara.images.list()
 
 
def update_context_with_plugin_tags(request, context):
        sahara = saharaclient(request)
    def get_object(self):
        sahara = saharaclient(self.request)
        return sahara.images.get(self.kwargs["image_id"])
 
    def get_initial(self):

src/s/a/sahara-dashboard-2014.1/saharadashboard/nodegroup_templates/tabs.py   sahara-dashboard(Download)
from horizon import tabs
 
from saharadashboard.api.client import client as saharaclient
from saharadashboard.utils import importutils
 
    def get_context_data(self, request):
        template_id = self.tab_group.kwargs['template_id']
        sahara = saharaclient(request)
        template = sahara.node_group_templates.get(template_id)
        flavor = nova.flavor_get(request, template.flavor_id)
    def get_context_data(self, request):
        template_id = self.tab_group.kwargs['template_id']
        sahara = saharaclient(request)
        template = sahara.node_group_templates.get(template_id)
        return {"template": template}

src/s/a/sahara-dashboard-2014.1/saharadashboard/cluster_templates/tabs.py   sahara-dashboard(Download)
from horizon import tabs
 
from saharadashboard.api.client import client as saharaclient
from saharadashboard.utils import importutils
from saharadashboard.utils import workflow_helpers as helpers
    def get_context_data(self, request):
        template_id = self.tab_group.kwargs['template_id']
        sahara = saharaclient(request)
        template = sahara.cluster_templates.get(template_id)
        return {"template": template}
    def get_context_data(self, request):
        template_id = self.tab_group.kwargs['template_id']
        sahara = saharaclient(request)
        template = sahara.cluster_templates.get(template_id)
        for ng in template.node_groups:

src/s/a/sahara-dashboard-2014.1/saharadashboard/jobs/workflows/create.py   sahara-dashboard(Download)
from horizon import workflows
 
from saharadashboard.api.client import client as saharaclient
 
 
    def populate_lib_binaries_choices(self, request, context):
        sahara = saharaclient(request)
        job_binaries = sahara.job_binaries.list()
 
        choices = [(job_binary.id, job_binary.name)
    def populate_main_binary_choices(self, request, context):
        sahara = saharaclient(request)
        job_binaries = sahara.job_binaries.list()
 
        choices = [(job_binary.id, job_binary.name)
    def handle(self, request, context):
        sahara = saharaclient(request)
        main_locations = []
        lib_locations = []
 

src/s/a/sahara-dashboard-2014.1/saharadashboard/job_binaries/forms.py   sahara-dashboard(Download)
    def populate_job_binary_internal_choices(self, request):
        sahara = saharaclient.client(request)
        job_binaries = sahara.job_binary_internals.list()
 
        choices = [(job_binary.id, job_binary.name)
    def handle(self, request, context):
        try:
            sahara = saharaclient.client(request)
            extra = {}
            bin_url = "%s://%s" % (context["job_binary_type"],
    def handle_internal(self, request, context):
        result = ""
        sahara = saharaclient.client(request)
 
        bin_id = context["job_binary_internal"]
    def get_unique_binary_name(self, request, base_name):
        sahara = saharaclient.client(request)
        internals = sahara.job_binary_internals.list()
        names = [internal.name for internal in internals]
        if base_name in names:

src/s/a/sahara-dashboard-2014.1/saharadashboard/clusters/tabs.py   sahara-dashboard(Download)
 
 
from saharadashboard.api.client import client as saharaclient
 
LOG = logging.getLogger(__name__)
    def get_context_data(self, request):
        cluster_id = self.tab_group.kwargs['cluster_id']
        sahara = saharaclient(request)
        cluster = sahara.clusters.get(cluster_id)
 
    def get_context_data(self, request):
        cluster_id = self.tab_group.kwargs['cluster_id']
        sahara = saharaclient(request)
        cluster = sahara.clusters.get(cluster_id)
        for ng in cluster.node_groups:
    def get_cluster_instances_data(self):
        cluster_id = self.tab_group.kwargs['cluster_id']
        sahara = saharaclient(self.request)
        cluster = sahara.clusters.get(cluster_id)
 

src/s/a/sahara-dashboard-2014.1/saharadashboard/nodegroup_templates/views.py   sahara-dashboard(Download)
from horizon import workflows
 
from saharadashboard.api.client import client as saharaclient
 
import saharadashboard.nodegroup_templates.tables as _tables
    def get_data(self):
        sahara = saharaclient(self.request)
        nodegroup_templates = sahara.node_group_templates.list()
        return nodegroup_templates
 
    def get_object(self, *args, **kwargs):
        if not hasattr(self, "_object"):
            template_id = self.kwargs['template_id']
            sahara = saharaclient(self.request)
            template = sahara.node_group_templates.get(template_id)

  1 | 2 | 3 | 4  Next