Delete a server group

@param serverGroupId ID of serverGroup
@return Collection of active Server Groups
554602
public List<ServerGroup> deleteServerGroup(int serverGroupId) {
        ArrayList<ServerGroup> groups = new ArrayList<ServerGroup>();
        try {
            JSONArray serverArray = new JSONArray(doDelete(BASE_SERVERGROUP + "/" + serverGroupId, null));
            for (int i = 0; i < serverArray.length(); i++) {
                JSONObject jsonServerGroup = serverArray.getJSONObject(i);
                ServerGroup group = getServerGroupFromJSON(jsonServerGroup);
                groups.add(group);
            }
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
        return groups;
    }
554820
public void removeServerFromCache(long serverId) {
        servers.computeIfPresent(serverId, (key, server) -> {
            ((Cleanupable) server).cleanup();
            return null;
        });
        nonReadyServers.computeIfPresent(serverId, (key, server) -> {
            ((Cleanupable) server).cleanup();
            return null;
        });
    }
1051177
public function deleteContentTypeGroup($contentTypeGroupId)
    {
        $contentTypeGroup = $this->contentTypeService->loadContentTypeGroup($contentTypeGroupId);

        $contentTypes = $this->contentTypeService->loadContentTypes($contentTypeGroup);
        if (!empty($contentTypes)) {
            throw new ForbiddenException('Only empty content type groups can be deleted');
        }

        $this->contentTypeService->deleteContentTypeGroup($contentTypeGroup);

        return new Values\NoContent();
    }
393662
public void deleteRequestGroup(String requestGroupId) {
    final Function<String, String> requestUri = (host) -> String.format(REQUEST_GROUP_FORMAT, getApiBase(host), requestGroupId);

    delete(requestUri, "request group", requestGroupId);
  }
981755
public static base_response delete(nitro_service client, snmpgroup resource) throws Exception {
		snmpgroup deleteresource = new snmpgroup();
		deleteresource.name = resource.name;
		deleteresource.securitylevel = resource.securitylevel;
		return deleteresource.delete_resource(client);
	}
791395
@RequestMapping(value = "groups/{groupId}", method = RequestMethod.DELETE)
    public Ack deleteGroup(@PathVariable ID groupId) {
        return accountService.deleteGroup(groupId);

    }
427831
public Response deleteAdminGroup(String roomName, String groupName) {
        return restClient.delete("chatrooms/" + roomName + "/admins/group/" + groupName,
                new HashMap<String, String>());
    }
879124
def remove(self, server_id):
        
        server = self._storage.pop(server_id)
        server.stop()
        server.cleanup()
1000100
public ServerFilter groups(Group... groups) {
        allItemsNotNull(groups, "Groups");

        groupFilter = groupFilter.and(Filter.or(
            map(groups, Group::asFilter)
        ));

        return this;
    }
829088
public OperationFuture<List<Server>> reset(Group... groups) {
        return serverService().reset(
            getServerSearchCriteria(groups)
        );
    }
1122301
public function deleteGroup($groupId)
    {
        if ($this->contentTypeGateway->countTypesInGroup($groupId) !== 0) {
            throw new Exception\GroupNotEmpty($groupId);
        }
        $this->contentTypeGateway->deleteGroup($groupId);
    }
4183
def group_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/groups/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
445533
public ServerGroup activateServerGroup(int serverGroupId) {
        ServerGroup serverGroup = null;
        BasicNameValuePair[] params = {
            new BasicNameValuePair("activate", String.valueOf(true)),
            new BasicNameValuePair("profileIdentifier", this._profileName)
        };
        try {
            JSONObject response = new JSONObject(doPost(BASE_SERVERGROUP + "/" + serverGroupId, params));
            serverGroup = getServerGroupFromJSON(response);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
        return serverGroup;
    }
505088
@RequestMapping(value = "ldap-mapping/{id}/delete", method = RequestMethod.DELETE)
    public Ack deleteMapping(@PathVariable ID id) {
        securityService.checkGlobalFunction(AccountGroupManagement.class);
        return accountGroupMappingService.deleteMapping(
                LDAPExtensionFeature.LDAP_GROUP_MAPPING,
                id
        );
    }
295899
public function deleteGroup($groupId)
    {
        $objectStates = $this->loadObjectStates($groupId);
        foreach ($objectStates as $objectState) {
            $this->objectStateGateway->deleteObjectStateLinks($objectState->id);
            $this->objectStateGateway->deleteObjectState($objectState->id);
        }

        $this->objectStateGateway->deleteObjectStateGroup($groupId);
    }
105325
public function deleteGroup($groupId)
    {
        $uri  = self::APPS_BASE_FEED_URI . self::APPS_GROUP_PATH . '/';
        $uri .= $this->getDomain() . '/' . $groupId;

        $this->delete($uri);
    }
308342
public Response deleteMemberGroup(String roomName, String groupName) {
        return restClient.delete("chatrooms/" + roomName + "/members/group/" + groupName,
                new HashMap<String, String>());
    }