You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by oc...@apache.org on 2022/10/13 18:46:24 UTC
[trafficcontrol-trafficops-types] 18/38: Add missing request server type
This is an automated email from the ASF dual-hosted git repository.
ocket8888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol-trafficops-types.git
commit fda79f8ac38b690f281587f4e95de725d46946cf
Author: ocket8888 <oc...@apache.org>
AuthorDate: Fri Jun 17 09:50:41 2022 -0600
Add missing request server type
---
package-lock.json | 4 +--
package.json | 2 +-
src/server.ts | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 93 insertions(+), 3 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index a745cd2..bcb61d3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "trafficops-types",
- "version": "3.1.0-beta-7",
+ "version": "3.1.0-beta-8",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "trafficops-types",
- "version": "3.1.0-beta-7",
+ "version": "3.1.0-beta-8",
"license": "GPL-3.0-or-later",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.0.0",
diff --git a/package.json b/package.json
index 68ee235..8cec499 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "trafficops-types",
- "version": "3.1.0-beta-7",
+ "version": "3.1.0-beta-8",
"description": "A library for dealing with Apache Traffic Control objects",
"main": "dist/index.js",
"scripts": {
diff --git a/src/server.ts b/src/server.ts
index b0292e3..48c1e95 100644
--- a/src/server.ts
+++ b/src/server.ts
@@ -262,6 +262,96 @@ export interface ResponseServer {
xmppPasswd?: string | null;
}
+export interface RequestServer {
+ /**
+ * The integral, unique identifier of the Cache Group to which the server
+ * belongs.
+ */
+ cachegroupId: number;
+ /**
+ * The integral, unique identifier of the CDN to which the server belongs.
+ */
+ cdnId: number;
+ /**
+ * The servers FQDN without its hostname - e.g. 'apache.org' from
+ * 'trafficcontrol.apache.org'.
+ */
+ domainName: string;
+ /**
+ * Legacy field with no purpose.
+ *
+ * @deprecated This field has no purpose and is subject to removal in the
+ * future.
+ */
+ guid?: number | null;
+ /**
+ * The server's hostname, e.g. 'trafficcontrol' from
+ * 'trafficcontrol.apache.org'.
+ */
+ hostName: string;
+ /** The port used to serve HTTPS responses, if any. */
+ httpsPort?: number | null;
+ /** The IP address of the Server's ILO interface. */
+ iloIpAddress?: string | null;
+ /** The IP address of the gateway to the Server's ILO interface. */
+ iloIpGateway?: string | null;
+ /**
+ * A netmask that describes the subnet allocated to the Server's ILO
+ * interface.
+ */
+ iloIpNetmask?: string | null;
+ /** The Server's ILO interface's password. */
+ iloPassword?: string | null;
+ /** The Server's ILO interface's root user's name. */
+ iloUsername?: string | null;
+ /** The Server's network interfaces. */
+ interfaces: [Interface, ...Interface[]];
+ /** The IP address of the server's management interface. */
+ mgmtIpAddress?: string | null;
+ /** The IP address of the gateway to the Server's management interface. */
+ mgmtIpGateway?: string | null;
+ /**
+ * The netmask that describes the subnet allocated to the Server's
+ * management interface.
+ */
+ mgmtIpNetmask?: string | null;
+ /** The reason the Server has been taken out of service. */
+ offlineReason?: string | null;
+ /**
+ * An integral, unique identifier for the physical location in which the
+ * Server resides.
+ */
+ physLocationId: number;
+ /**
+ * An integral, unique identifier for the Profile used by the Server.
+ *
+ * @deprecated In the latest API version, a server's Profile is identified
+ * only by name, not unique, integral identifier.
+ */
+ profileId: number;
+ /**
+ * Legacy field with no purpose.
+ *
+ * @deprecated This field has no purpose and is subject to removal in the
+ * future.
+ */
+ rack?: string | null;
+ /** The hostname of the router that routes to this Server. */
+ routerHostName?: string | null;
+ /** The... name... of the port... used by the Server's router?? */
+ routerPortName?: string | null;
+ /** An integral, unique, identifier for the Server's Status. */
+ statusId: number;
+ /** An integral, unique identifier for the Type of this Server. */
+ typeId: number;
+}
+
+/**
+ * Generically represents a Server in the context of either a request or a
+ * response.
+ */
+export type Server = RequestServer | ResponseServer;
+
/**
* Servercheck models the data returned by the /servercheck API endpoint.
*/