Creates the list of dashboards. If any of the dashboards already exist
  this whole command will fail and no dashboards will be created.
  @since: API v6
  @return: The list of dashboards created.
178652
def create_dashboards(resource_root, dashboard_list):
  
  return call(resource_root.post, DASHBOARDS_PATH, ApiDashboard, \
      ret_is_list=True, data=dashboard_list)
1064356
public function listBucketsCommand()
    {
        try {
            $s3Client = new S3Client($this->s3DefaultProfile);
            $result = $s3Client->listBuckets();
        } catch (\Exception $e) {
            $this->outputLine($e->getMessage());
            $this->quit(1);
            exit;
        }

        if (count($result['Buckets']) === 0) {
            $this->outputLine('The account currently does not have any buckets.');
        }

        $tableRows = array();
        $headerRow = array('Bucket Name', 'Creation Date');

        foreach ($result['Buckets'] as $bucket) {
            $tableRows[] = array($bucket['Name'], $bucket['CreationDate']);
        }

        $this->output->outputTable($tableRows, $headerRow);
    }
193819
def create_cloud(self):
        
        instances = []
        for i in range(self.settings['NUMBER_NODES']):
            new_instance = Instance.new(settings=self.settings, cluster=self)
            instances.append(new_instance)

        create_nodes = [instance.create(suffix=i) for i, instance in enumerate(instances)]
        fetch_nodes = [instance.node for instance in instances]
        self.driver.wait_until_running(fetch_nodes)

        node_ids = [node.id for node in fetch_nodes]
        all_nodes = self.driver.list_nodes()
        new_nodes = [node for node in all_nodes if node.id in node_ids]
        for instance, node in zip(instances, new_nodes):
            instance.node = node

        self.instances = instances
1063161
public static List<CreateTableResult> initAllTables() {
        final List<CreateTableResult> ret = new ArrayList<>();
        final List<RepositoryDefinition> repositoryDefs = getRepositoryDefinitions();
        boolean isSuccess = false;
        for (final RepositoryDefinition repositoryDef : repositoryDefs) {
            try {
                isSuccess = JdbcFactory.getInstance().createTable(repositoryDef);
            } catch (final SQLException e) {
                LOGGER.log(Level.ERROR, "Creates table [" + repositoryDef.getName() + "] error", e);
            }

            ret.add(new CreateTableResult(repositoryDef.getName(), isSuccess));
        }

        return ret;
    }
511835
private function createCommandList()
    {
        $list = [];

        // read all core commands
        $this->listCommands($list, __DIR__ . '/../Commands', 'Core\Commands');

        // merge all plugin commands (plugin overrides the core)
        if (file_exists($this->pluginManifestOfCommands)) {
            /** @noinspection PhpIncludeInspection */
            $list = array_merge($list, include $this->pluginManifestOfCommands);
        }

        // merge all commands defined by application (application overrides all other)
        $this->listCommands($list, app_path('Commands'), 'App\Commands');

        // save the new command list
        ksort($list);

        return $list;
    }
748324
public static ModelNode createListDeploymentsOperation() {
        final ModelNode op = createOperation(READ_CHILDREN_NAMES);
        op.get(CHILD_TYPE).set(DEPLOYMENT);
        return op;
    }
1182222
def tasks(self):
        
        if self._tasks is None:
            self._tasks = TaskList(self._version, workspace_sid=self._solution['sid'], )
        return self._tasks
627676
public java.util.List<DashboardEntry> getDashboardEntries() {
        if (dashboardEntries == null) {
            dashboardEntries = new com.amazonaws.internal.SdkInternalList<DashboardEntry>();
        }
        return dashboardEntries;
    }
805613
private List<PipelineStage> findUnmappedStages(Dashboard dashboard,List<PipelineStage> pipelineStageList){
        List<PipelineStage> unmappedStages = new ArrayList<>();

        Map<PipelineStage, String> stageToEnvironmentNameMap = PipelineUtils.getStageToEnvironmentNameMap(dashboard);

        for (PipelineStage systemStage : pipelineStageList) {
            if (PipelineStageType.DEPLOY.equals(systemStage.getType())) {
                String mappedName = stageToEnvironmentNameMap.get(systemStage);
                if (mappedName == null || mappedName.isEmpty()) {
                    unmappedStages.add(systemStage);
                }
            }
        }

        return unmappedStages;
    }
279280
public function createMetricAction()
    {
        $metricData = Binput::get('metric');

        try {
            execute(new CreateMetricCommand(
                $metricData['name'],
                $metricData['suffix'],
                $metricData['description'],
                $metricData['default_value'],
                $metricData['calc_type'],
                $metricData['display_chart'],
                $metricData['places'],
                $metricData['default_view'],
                $metricData['threshold'],
                0, // Default order
                $metricData['visible']
            ));
        } catch (ValidationException $e) {
            return cachet_redirect('dashboard.metrics.create')
                ->withInput(Binput::all())
                ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.metrics.add.failure')))
                ->withErrors($e->getMessageBag());
        }

        return cachet_redirect('dashboard.metrics')
            ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.metrics.add.success')));
    }
42286
def builds(self):
        
        if self._builds is None:
            self._builds = BuildList(self._version, service_sid=self._solution['sid'], )
        return self._builds
488511
@Override
    public List<Dashboard> getDashboards() {
        
       
            JAXBContext context;
            try {
                context = JAXBContext.newInstance(Dashboard.class.getPackage().getName());
            } catch (JAXBException e) {
                throw new IllegalArgumentException("Could not create JAXBContext", e);
            }
            List<Dashboard> dashboards = new ArrayList<Dashboard>();
            try {
                Configuration config = (Configuration) context.createUnmarshaller().unmarshal(sourceXml.getInputStream());
                dashboards.addAll(config.getDashboard());
            } catch (Exception e) {
                throw new IllegalStateException("Could not load dashboards configuration from " + sourceXml.toString(), e);
            }
            /*
            if(additionalSourceXml != null) {
                if (additionalSourceXml.isReadable()) {
            
                    try {
                        Configuration config = (Configuration) context.createUnmarshaller().unmarshal(additionalSourceXml.getInputStream());
                        dashboards.addAll(config.getDashboard());
                    } catch (Exception e) {
                    throw new IllegalStateException("Could not load dashboards configuration from " + additionalSourceXml.toString(), e);
                    }
                } else {
                    throw new IllegalStateException("Could not read configuration from " + additionalSourceXml.toString());
                }
            }
            */
            Collections.sort(dashboards);
            return dashboards;
      
       
    }
563287
List<List<RepositoryResource>> createInstallLists() {
        List<List<RepositoryResource>> installLists = new ArrayList<>();

        // Create install list for each sample
        for (SampleResource sample : samplesToInstall) {
            installLists.add(createInstallList(sample));
        }

        // Create install list for each requested feature
        for (String featureName : requestedFeatureNames) {
            List<RepositoryResource> installList = createInstallList(featureName);
            // May get an empty list if the requested feature is already installed
            if (!installList.isEmpty()) {
                installLists.add(installList);
            }
        }

        // Create install list for each autofeature which wasn't explicitly requested (otherwise we'd have covered it above) and isn't already installed
        for (ProvisioningFeatureDefinition feature : resolvedFeatures.values()) {
            if (feature.isAutoFeature() && !requestedFeatureNames.contains(feature.getSymbolicName()) && feature instanceof KernelResolverEsa) {
                installLists.add(createInstallList(feature.getSymbolicName()));
            }
        }

        return installLists;
    }
1178770
private void ensure_dashboards() {
        HttpURLConnection urlConnection = null;
        OutputStreamWriter wr = null;
        URL myurl = null;

        try {
           myurl = new URL(url_str + "/dashboards.json");
           urlConnection = (HttpURLConnection) myurl.openConnection();
           urlConnection.setRequestMethod("GET");
           urlConnection.setDoInput(true);
           urlConnection.setDoOutput(true);
           urlConnection.setReadTimeout(coppereggApiTimeoutInMillis);
           urlConnection.setRequestProperty("content-type", "application/json; charset=utf-8");
           urlConnection.setRequestProperty("Authorization", "Basic " + basicAuthentication);

           int responseCode = urlConnection.getResponseCode();
           if (responseCode != 200) {
               logger.warn("Bad responsecode " + String.valueOf(responseCode)+ " from Dahsboards Index: " +  myurl);
           }
        } catch (Exception e) {
            exceptionCounter.incrementAndGet();
            logger.warn("Exception on dashboards index request "+ myurl + "  "+ e);
        } finally {
            if (urlConnection != null) {
                try {
                    InputStream in = urlConnection.getInputStream();
                    String theString = convertStreamToString(in);
                    for (Map.Entry<String, String> entry : dashMap.entrySet()) {
                        String checkName =  entry.getKey();
                        try {
                            String Rslt = groupFind(checkName, theString, 1);
                            if(Rslt != null){
                                // Update it
                                Rslt = Send_Commmand("/dashboards/" + Rslt + ".json", "PUT", entry.getValue(),1);
                            } else {
                                // create it
                                Rslt = Send_Commmand("/dashboards.json", "POST", entry.getValue(),1);
                            }
                        } catch (Exception e) {
                            exceptionCounter.incrementAndGet();
                            logger.warn("Exception in dashboard update or create: "+ myurl + "  "+ e);   
                        }
                    }
                } catch (IOException e) {
                    exceptionCounter.incrementAndGet();
                    logger.warn("Exception flushing http connection"+ e);
                }
            }
        }
    }
1179854
def list_commands(self, **kwargs):
        
        commands = self._commands

        command_id = kwargs.get('CommandId', None)
        if command_id:
            commands = [self.get_command_by_id(command_id)]
        instance_id = kwargs.get('InstanceId', None)
        if instance_id:
            commands = self.get_commands_by_instance_id(instance_id)

        return {
            'Commands': [command.response_object() for command in commands]
        }
1352708
public function dashboard()
    {
        //if the dev has chosen to use a dashboard
        if (config('administrator.use_dashboard')) {
            //set the layout dashboard
            $this->layout->dashboard = true;

            //set the layout content
            $this->layout->content = view(config('administrator.dashboard_view'));

            return $this->layout;
        }
        //else we should redirect to the menu item
        else {
            $configFactory = app('admin_config_factory');
            $home          = config('administrator.home_page');

            //first try to find it if it's a model config item
            $config = $configFactory->make($home);

            if (!$config) {
                throw new \InvalidArgumentException('Administrator: '.trans('administrator::administrator.valid_home_page'));
            } elseif ($config->getType() === 'model') {
                return redirect()->route('admin_index', array($config->getOption('name')));
            } elseif ($config->getType() === 'settings') {
                return redirect()->route('admin_settings', array($config->getOption('name')));
            }
        }
    }
1314112
public List<Bucket> getBuckets() {
        List<Bucket> result = Lists.newArrayList();
        for (File file : getBaseDir().listFiles()) {
            if (file.isDirectory()) {
                result.add(new Bucket(file));
            }
        }

        return result;
    }