diff --git a/arista/tag.v1/services.gen.proto b/arista/tag.v1/services.gen.proto deleted file mode 100644 index aff624e9..00000000 --- a/arista/tag.v1/services.gen.proto +++ /dev/null @@ -1,597 +0,0 @@ -// Copyright (c) 2020 Arista Networks, Inc. All rights reserved. -// Use of this source code is governed by the Apache License 2.0 -// that can be found in the COPYING file. - -// -// Code generated by boomtown. DO NOT EDIT. -// - -syntax = "proto3"; - -package arista.tag.v1; -option go_package = "arista/resources/arista/tag.v1;tag"; - -import "arista/tag.v1/tag.proto"; -import "arista/time/time.proto"; -import "arista/subscriptions/subscriptions.proto"; -import "fmp/deletes.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -message DeviceTagRequest { - // Key uniquely identifies a DeviceTag instance to retrieve. - // This value must be populated. - TagKey key = 1; - - // Time indicates the time for which you are interested in the data. - // If no time is given, the server will use the time at which it makes the request. - google.protobuf.Timestamp time = 2; -}; - -message DeviceTagResponse { - // Value is the value requested. - // This structure will be fully-populated as it exists in the datastore. If - // optional fields were not given at creation, these fields will be empty or - // set to default values. - DeviceTag value = 1; - - // Time carries the (UTC) timestamp of the last-modification of the - // DeviceTag instance in this response. - google.protobuf.Timestamp time = 2; -}; - -message DeviceTagStreamRequest { - // PartialEqFilter provides a way to server-side filter a GetAll/Subscribe. - // This requires all provided fields to be equal to the response. - // - // While transparent to users, this field also allows services to optimize internal - // subscriptions if filter(s) are sufficiently specific. - repeated DeviceTag partial_eq_filter = 1; - - // TimeRange allows limiting response data to within a specified time window. - // If this field is populated, at least one of the two time fields are required. - // - // This field is not allowed in the Subscribe RPC. - arista.time.TimeBounds time = 3; -}; - -message DeviceTagStreamResponse { - // Value is a value deemed relevant to the initiating request. - // This structure will always have its key-field populated. Which other fields are - // populated, and why, depends on the value of Operation and what triggered this notification. - DeviceTag value = 1; - - // Time holds the timestamp of this DeviceTag's last modification. - google.protobuf.Timestamp time = 2; - - // Operation indicates how the DeviceTag value in this response should be considered. - // Under non-subscribe requests, this value should always be INITIAL. In a subscription, - // once all initial data is streamed and the client begins to receive modification updates, - // you should not see INITIAL again. - arista.subscriptions.Operation type = 3; -}; - -service DeviceTagService { - rpc GetOne (DeviceTagRequest) returns (DeviceTagResponse); - rpc GetAll (DeviceTagStreamRequest) returns (stream DeviceTagStreamResponse); - rpc Subscribe (DeviceTagStreamRequest) returns (stream DeviceTagStreamResponse); -} - -message DeviceTagAssignmentConfigRequest { - // Key uniquely identifies a DeviceTagAssignmentConfig instance to retrieve. - // This value must be populated. - DeviceTagAssignmentKey key = 1; - - // Time indicates the time for which you are interested in the data. - // If no time is given, the server will use the time at which it makes the request. - google.protobuf.Timestamp time = 2; -}; - -message DeviceTagAssignmentConfigResponse { - // Value is the value requested. - // This structure will be fully-populated as it exists in the datastore. If - // optional fields were not given at creation, these fields will be empty or - // set to default values. - DeviceTagAssignmentConfig value = 1; - - // Time carries the (UTC) timestamp of the last-modification of the - // DeviceTagAssignmentConfig instance in this response. - google.protobuf.Timestamp time = 2; -}; - -message DeviceTagAssignmentConfigStreamRequest { - // PartialEqFilter provides a way to server-side filter a GetAll/Subscribe. - // This requires all provided fields to be equal to the response. - // - // While transparent to users, this field also allows services to optimize internal - // subscriptions if filter(s) are sufficiently specific. - repeated DeviceTagAssignmentConfig partial_eq_filter = 1; - - // TimeRange allows limiting response data to within a specified time window. - // If this field is populated, at least one of the two time fields are required. - // - // This field is not allowed in the Subscribe RPC. - arista.time.TimeBounds time = 3; -}; - -message DeviceTagAssignmentConfigStreamResponse { - // Value is a value deemed relevant to the initiating request. - // This structure will always have its key-field populated. Which other fields are - // populated, and why, depends on the value of Operation and what triggered this notification. - DeviceTagAssignmentConfig value = 1; - - // Time holds the timestamp of this DeviceTagAssignmentConfig's last modification. - google.protobuf.Timestamp time = 2; - - // Operation indicates how the DeviceTagAssignmentConfig value in this response should be considered. - // Under non-subscribe requests, this value should always be INITIAL. In a subscription, - // once all initial data is streamed and the client begins to receive modification updates, - // you should not see INITIAL again. - arista.subscriptions.Operation type = 3; -}; - -message DeviceTagAssignmentConfigSetRequest { - // DeviceTagAssignmentConfig carries the value to set into the datastore. - // See the documentation on the DeviceTagAssignmentConfig struct for which fields are required. - DeviceTagAssignmentConfig value = 1; -}; - -message DeviceTagAssignmentConfigSetResponse { - // Value carries all the values given in the DeviceTagAssignmentConfigSetRequest as well - // as any server-generated values. - DeviceTagAssignmentConfig value = 1; - - // Time indicates the (UTC) timestamp at which the system recognizes the - // creation. The only guarantees made about this timestamp are: - // - // - it is after the time the request was received - // - a time-ranged query with StartTime==CreatedAt will include this instance. - // - google.protobuf.Timestamp time = 2; -}; - -message DeviceTagAssignmentConfigDeleteRequest { - // Key indicates which DeviceTagAssignmentConfig instance to remove. - // This field must always be set. - DeviceTagAssignmentKey key = 1; -}; - -message DeviceTagAssignmentConfigDeleteResponse { - // Key echoes back the key of the deleted DeviceTagAssignmentConfig instance. - DeviceTagAssignmentKey key = 1; - - // Time indicates the (UTC) timestamp at which the system recognizes the - // deletion. The only guarantees made about this timestamp are: - // - // - it is after the time the request was received - // - a time-ranged query with StartTime==DeletedAt will not include this instance. - // - google.protobuf.Timestamp time = 2; -}; - -message DeviceTagAssignmentConfigDeleteAllRequest { -}; - -message DeviceTagAssignmentConfigDeleteAllResponse { - // This describes the class of delete error. - fmp.DeleteError type = 1; - // This indicates the error message from the delete failure. - google.protobuf.StringValue error = 2; - // This is the key of the DeviceTagAssignmentConfig instance that failed to be deleted. - DeviceTagAssignmentKey key = 3; - // Time indicates the (UTC) timestamp when the key was being deleted. - google.protobuf.Timestamp time = 4; -}; - -service DeviceTagAssignmentConfigService { - rpc GetOne (DeviceTagAssignmentConfigRequest) returns (DeviceTagAssignmentConfigResponse); - rpc GetAll (DeviceTagAssignmentConfigStreamRequest) returns (stream DeviceTagAssignmentConfigStreamResponse); - rpc Subscribe (DeviceTagAssignmentConfigStreamRequest) returns (stream DeviceTagAssignmentConfigStreamResponse); - rpc Set (DeviceTagAssignmentConfigSetRequest) returns (DeviceTagAssignmentConfigSetResponse); - rpc Delete (DeviceTagAssignmentConfigDeleteRequest) returns (DeviceTagAssignmentConfigDeleteResponse); - rpc DeleteAll (DeviceTagAssignmentConfigDeleteAllRequest) returns (stream DeviceTagAssignmentConfigDeleteAllResponse); -} - -message DeviceTagConfigRequest { - // Key uniquely identifies a DeviceTagConfig instance to retrieve. - // This value must be populated. - TagKey key = 1; - - // Time indicates the time for which you are interested in the data. - // If no time is given, the server will use the time at which it makes the request. - google.protobuf.Timestamp time = 2; -}; - -message DeviceTagConfigResponse { - // Value is the value requested. - // This structure will be fully-populated as it exists in the datastore. If - // optional fields were not given at creation, these fields will be empty or - // set to default values. - DeviceTagConfig value = 1; - - // Time carries the (UTC) timestamp of the last-modification of the - // DeviceTagConfig instance in this response. - google.protobuf.Timestamp time = 2; -}; - -message DeviceTagConfigStreamRequest { - // PartialEqFilter provides a way to server-side filter a GetAll/Subscribe. - // This requires all provided fields to be equal to the response. - // - // While transparent to users, this field also allows services to optimize internal - // subscriptions if filter(s) are sufficiently specific. - repeated DeviceTagConfig partial_eq_filter = 1; - - // TimeRange allows limiting response data to within a specified time window. - // If this field is populated, at least one of the two time fields are required. - // - // This field is not allowed in the Subscribe RPC. - arista.time.TimeBounds time = 3; -}; - -message DeviceTagConfigStreamResponse { - // Value is a value deemed relevant to the initiating request. - // This structure will always have its key-field populated. Which other fields are - // populated, and why, depends on the value of Operation and what triggered this notification. - DeviceTagConfig value = 1; - - // Time holds the timestamp of this DeviceTagConfig's last modification. - google.protobuf.Timestamp time = 2; - - // Operation indicates how the DeviceTagConfig value in this response should be considered. - // Under non-subscribe requests, this value should always be INITIAL. In a subscription, - // once all initial data is streamed and the client begins to receive modification updates, - // you should not see INITIAL again. - arista.subscriptions.Operation type = 3; -}; - -message DeviceTagConfigSetRequest { - // DeviceTagConfig carries the value to set into the datastore. - // See the documentation on the DeviceTagConfig struct for which fields are required. - DeviceTagConfig value = 1; -}; - -message DeviceTagConfigSetResponse { - // Value carries all the values given in the DeviceTagConfigSetRequest as well - // as any server-generated values. - DeviceTagConfig value = 1; - - // Time indicates the (UTC) timestamp at which the system recognizes the - // creation. The only guarantees made about this timestamp are: - // - // - it is after the time the request was received - // - a time-ranged query with StartTime==CreatedAt will include this instance. - // - google.protobuf.Timestamp time = 2; -}; - -message DeviceTagConfigDeleteRequest { - // Key indicates which DeviceTagConfig instance to remove. - // This field must always be set. - TagKey key = 1; -}; - -message DeviceTagConfigDeleteResponse { - // Key echoes back the key of the deleted DeviceTagConfig instance. - TagKey key = 1; - - // Time indicates the (UTC) timestamp at which the system recognizes the - // deletion. The only guarantees made about this timestamp are: - // - // - it is after the time the request was received - // - a time-ranged query with StartTime==DeletedAt will not include this instance. - // - google.protobuf.Timestamp time = 2; -}; - -message DeviceTagConfigDeleteAllRequest { -}; - -message DeviceTagConfigDeleteAllResponse { - // This describes the class of delete error. - fmp.DeleteError type = 1; - // This indicates the error message from the delete failure. - google.protobuf.StringValue error = 2; - // This is the key of the DeviceTagConfig instance that failed to be deleted. - TagKey key = 3; - // Time indicates the (UTC) timestamp when the key was being deleted. - google.protobuf.Timestamp time = 4; -}; - -service DeviceTagConfigService { - rpc GetOne (DeviceTagConfigRequest) returns (DeviceTagConfigResponse); - rpc GetAll (DeviceTagConfigStreamRequest) returns (stream DeviceTagConfigStreamResponse); - rpc Subscribe (DeviceTagConfigStreamRequest) returns (stream DeviceTagConfigStreamResponse); - rpc Set (DeviceTagConfigSetRequest) returns (DeviceTagConfigSetResponse); - rpc Delete (DeviceTagConfigDeleteRequest) returns (DeviceTagConfigDeleteResponse); - rpc DeleteAll (DeviceTagConfigDeleteAllRequest) returns (stream DeviceTagConfigDeleteAllResponse); -} - -message InterfaceTagRequest { - // Key uniquely identifies a InterfaceTag instance to retrieve. - // This value must be populated. - TagKey key = 1; - - // Time indicates the time for which you are interested in the data. - // If no time is given, the server will use the time at which it makes the request. - google.protobuf.Timestamp time = 2; -}; - -message InterfaceTagResponse { - // Value is the value requested. - // This structure will be fully-populated as it exists in the datastore. If - // optional fields were not given at creation, these fields will be empty or - // set to default values. - InterfaceTag value = 1; - - // Time carries the (UTC) timestamp of the last-modification of the - // InterfaceTag instance in this response. - google.protobuf.Timestamp time = 2; -}; - -message InterfaceTagStreamRequest { - // PartialEqFilter provides a way to server-side filter a GetAll/Subscribe. - // This requires all provided fields to be equal to the response. - // - // While transparent to users, this field also allows services to optimize internal - // subscriptions if filter(s) are sufficiently specific. - repeated InterfaceTag partial_eq_filter = 1; - - // TimeRange allows limiting response data to within a specified time window. - // If this field is populated, at least one of the two time fields are required. - // - // This field is not allowed in the Subscribe RPC. - arista.time.TimeBounds time = 3; -}; - -message InterfaceTagStreamResponse { - // Value is a value deemed relevant to the initiating request. - // This structure will always have its key-field populated. Which other fields are - // populated, and why, depends on the value of Operation and what triggered this notification. - InterfaceTag value = 1; - - // Time holds the timestamp of this InterfaceTag's last modification. - google.protobuf.Timestamp time = 2; - - // Operation indicates how the InterfaceTag value in this response should be considered. - // Under non-subscribe requests, this value should always be INITIAL. In a subscription, - // once all initial data is streamed and the client begins to receive modification updates, - // you should not see INITIAL again. - arista.subscriptions.Operation type = 3; -}; - -service InterfaceTagService { - rpc GetOne (InterfaceTagRequest) returns (InterfaceTagResponse); - rpc GetAll (InterfaceTagStreamRequest) returns (stream InterfaceTagStreamResponse); - rpc Subscribe (InterfaceTagStreamRequest) returns (stream InterfaceTagStreamResponse); -} - -message InterfaceTagAssignmentConfigRequest { - // Key uniquely identifies a InterfaceTagAssignmentConfig instance to retrieve. - // This value must be populated. - InterfaceTagAssignmentKey key = 1; - - // Time indicates the time for which you are interested in the data. - // If no time is given, the server will use the time at which it makes the request. - google.protobuf.Timestamp time = 2; -}; - -message InterfaceTagAssignmentConfigResponse { - // Value is the value requested. - // This structure will be fully-populated as it exists in the datastore. If - // optional fields were not given at creation, these fields will be empty or - // set to default values. - InterfaceTagAssignmentConfig value = 1; - - // Time carries the (UTC) timestamp of the last-modification of the - // InterfaceTagAssignmentConfig instance in this response. - google.protobuf.Timestamp time = 2; -}; - -message InterfaceTagAssignmentConfigStreamRequest { - // PartialEqFilter provides a way to server-side filter a GetAll/Subscribe. - // This requires all provided fields to be equal to the response. - // - // While transparent to users, this field also allows services to optimize internal - // subscriptions if filter(s) are sufficiently specific. - repeated InterfaceTagAssignmentConfig partial_eq_filter = 1; - - // TimeRange allows limiting response data to within a specified time window. - // If this field is populated, at least one of the two time fields are required. - // - // This field is not allowed in the Subscribe RPC. - arista.time.TimeBounds time = 3; -}; - -message InterfaceTagAssignmentConfigStreamResponse { - // Value is a value deemed relevant to the initiating request. - // This structure will always have its key-field populated. Which other fields are - // populated, and why, depends on the value of Operation and what triggered this notification. - InterfaceTagAssignmentConfig value = 1; - - // Time holds the timestamp of this InterfaceTagAssignmentConfig's last modification. - google.protobuf.Timestamp time = 2; - - // Operation indicates how the InterfaceTagAssignmentConfig value in this response should be considered. - // Under non-subscribe requests, this value should always be INITIAL. In a subscription, - // once all initial data is streamed and the client begins to receive modification updates, - // you should not see INITIAL again. - arista.subscriptions.Operation type = 3; -}; - -message InterfaceTagAssignmentConfigSetRequest { - // InterfaceTagAssignmentConfig carries the value to set into the datastore. - // See the documentation on the InterfaceTagAssignmentConfig struct for which fields are required. - InterfaceTagAssignmentConfig value = 1; -}; - -message InterfaceTagAssignmentConfigSetResponse { - // Value carries all the values given in the InterfaceTagAssignmentConfigSetRequest as well - // as any server-generated values. - InterfaceTagAssignmentConfig value = 1; - - // Time indicates the (UTC) timestamp at which the system recognizes the - // creation. The only guarantees made about this timestamp are: - // - // - it is after the time the request was received - // - a time-ranged query with StartTime==CreatedAt will include this instance. - // - google.protobuf.Timestamp time = 2; -}; - -message InterfaceTagAssignmentConfigDeleteRequest { - // Key indicates which InterfaceTagAssignmentConfig instance to remove. - // This field must always be set. - InterfaceTagAssignmentKey key = 1; -}; - -message InterfaceTagAssignmentConfigDeleteResponse { - // Key echoes back the key of the deleted InterfaceTagAssignmentConfig instance. - InterfaceTagAssignmentKey key = 1; - - // Time indicates the (UTC) timestamp at which the system recognizes the - // deletion. The only guarantees made about this timestamp are: - // - // - it is after the time the request was received - // - a time-ranged query with StartTime==DeletedAt will not include this instance. - // - google.protobuf.Timestamp time = 2; -}; - -message InterfaceTagAssignmentConfigDeleteAllRequest { -}; - -message InterfaceTagAssignmentConfigDeleteAllResponse { - // This describes the class of delete error. - fmp.DeleteError type = 1; - // This indicates the error message from the delete failure. - google.protobuf.StringValue error = 2; - // This is the key of the InterfaceTagAssignmentConfig instance that failed to be deleted. - InterfaceTagAssignmentKey key = 3; - // Time indicates the (UTC) timestamp when the key was being deleted. - google.protobuf.Timestamp time = 4; -}; - -service InterfaceTagAssignmentConfigService { - rpc GetOne (InterfaceTagAssignmentConfigRequest) returns (InterfaceTagAssignmentConfigResponse); - rpc GetAll (InterfaceTagAssignmentConfigStreamRequest) returns (stream InterfaceTagAssignmentConfigStreamResponse); - rpc Subscribe (InterfaceTagAssignmentConfigStreamRequest) returns (stream InterfaceTagAssignmentConfigStreamResponse); - rpc Set (InterfaceTagAssignmentConfigSetRequest) returns (InterfaceTagAssignmentConfigSetResponse); - rpc Delete (InterfaceTagAssignmentConfigDeleteRequest) returns (InterfaceTagAssignmentConfigDeleteResponse); - rpc DeleteAll (InterfaceTagAssignmentConfigDeleteAllRequest) returns (stream InterfaceTagAssignmentConfigDeleteAllResponse); -} - -message InterfaceTagConfigRequest { - // Key uniquely identifies a InterfaceTagConfig instance to retrieve. - // This value must be populated. - TagKey key = 1; - - // Time indicates the time for which you are interested in the data. - // If no time is given, the server will use the time at which it makes the request. - google.protobuf.Timestamp time = 2; -}; - -message InterfaceTagConfigResponse { - // Value is the value requested. - // This structure will be fully-populated as it exists in the datastore. If - // optional fields were not given at creation, these fields will be empty or - // set to default values. - InterfaceTagConfig value = 1; - - // Time carries the (UTC) timestamp of the last-modification of the - // InterfaceTagConfig instance in this response. - google.protobuf.Timestamp time = 2; -}; - -message InterfaceTagConfigStreamRequest { - // PartialEqFilter provides a way to server-side filter a GetAll/Subscribe. - // This requires all provided fields to be equal to the response. - // - // While transparent to users, this field also allows services to optimize internal - // subscriptions if filter(s) are sufficiently specific. - repeated InterfaceTagConfig partial_eq_filter = 1; - - // TimeRange allows limiting response data to within a specified time window. - // If this field is populated, at least one of the two time fields are required. - // - // This field is not allowed in the Subscribe RPC. - arista.time.TimeBounds time = 3; -}; - -message InterfaceTagConfigStreamResponse { - // Value is a value deemed relevant to the initiating request. - // This structure will always have its key-field populated. Which other fields are - // populated, and why, depends on the value of Operation and what triggered this notification. - InterfaceTagConfig value = 1; - - // Time holds the timestamp of this InterfaceTagConfig's last modification. - google.protobuf.Timestamp time = 2; - - // Operation indicates how the InterfaceTagConfig value in this response should be considered. - // Under non-subscribe requests, this value should always be INITIAL. In a subscription, - // once all initial data is streamed and the client begins to receive modification updates, - // you should not see INITIAL again. - arista.subscriptions.Operation type = 3; -}; - -message InterfaceTagConfigSetRequest { - // InterfaceTagConfig carries the value to set into the datastore. - // See the documentation on the InterfaceTagConfig struct for which fields are required. - InterfaceTagConfig value = 1; -}; - -message InterfaceTagConfigSetResponse { - // Value carries all the values given in the InterfaceTagConfigSetRequest as well - // as any server-generated values. - InterfaceTagConfig value = 1; - - // Time indicates the (UTC) timestamp at which the system recognizes the - // creation. The only guarantees made about this timestamp are: - // - // - it is after the time the request was received - // - a time-ranged query with StartTime==CreatedAt will include this instance. - // - google.protobuf.Timestamp time = 2; -}; - -message InterfaceTagConfigDeleteRequest { - // Key indicates which InterfaceTagConfig instance to remove. - // This field must always be set. - TagKey key = 1; -}; - -message InterfaceTagConfigDeleteResponse { - // Key echoes back the key of the deleted InterfaceTagConfig instance. - TagKey key = 1; - - // Time indicates the (UTC) timestamp at which the system recognizes the - // deletion. The only guarantees made about this timestamp are: - // - // - it is after the time the request was received - // - a time-ranged query with StartTime==DeletedAt will not include this instance. - // - google.protobuf.Timestamp time = 2; -}; - -message InterfaceTagConfigDeleteAllRequest { -}; - -message InterfaceTagConfigDeleteAllResponse { - // This describes the class of delete error. - fmp.DeleteError type = 1; - // This indicates the error message from the delete failure. - google.protobuf.StringValue error = 2; - // This is the key of the InterfaceTagConfig instance that failed to be deleted. - TagKey key = 3; - // Time indicates the (UTC) timestamp when the key was being deleted. - google.protobuf.Timestamp time = 4; -}; - -service InterfaceTagConfigService { - rpc GetOne (InterfaceTagConfigRequest) returns (InterfaceTagConfigResponse); - rpc GetAll (InterfaceTagConfigStreamRequest) returns (stream InterfaceTagConfigStreamResponse); - rpc Subscribe (InterfaceTagConfigStreamRequest) returns (stream InterfaceTagConfigStreamResponse); - rpc Set (InterfaceTagConfigSetRequest) returns (InterfaceTagConfigSetResponse); - rpc Delete (InterfaceTagConfigDeleteRequest) returns (InterfaceTagConfigDeleteResponse); - rpc DeleteAll (InterfaceTagConfigDeleteAllRequest) returns (stream InterfaceTagConfigDeleteAllResponse); -} diff --git a/arista/tag.v1/services.gen.swagger.json b/arista/tag.v1/services.gen.swagger.json deleted file mode 100644 index 116cbfc1..00000000 --- a/arista/tag.v1/services.gen.swagger.json +++ /dev/null @@ -1,2500 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "arista.tag.v1 Resources", - "version": "CV_RESOURCE_VER_DEV", - "license": { - "name": "Apache License 2.0", - "url": "https://github.com/aristanetworks/cloudvision-apis/blob/trunk/COPYING" - } - }, - "tags": [ - { - "name": "DeviceTagService" - }, - { - "name": "DeviceTagAssignmentConfigService" - }, - { - "name": "DeviceTagConfigService" - }, - { - "name": "InterfaceTagService" - }, - { - "name": "InterfaceTagAssignmentConfigService" - }, - { - "name": "InterfaceTagConfigService" - } - ], - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/api/resources/tag/v1/DeviceTag": { - "get": { - "operationId": "DeviceTagService_GetOne", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "key.label", - "description": "Label is the label of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "key.value", - "description": "Value is the value of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "time", - "description": "Time indicates the time for which you are interested in the data.\nIf no time is given, the server will use the time at which it makes the request.", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "DeviceTagService" - ] - } - }, - "/api/resources/tag/v1/DeviceTag/all": { - "get": { - "operationId": "DeviceTagService_GetAll", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.DeviceTagStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "time.start", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "time.end", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "DeviceTagService" - ] - }, - "post": { - "operationId": "DeviceTagService_GetAll2", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.DeviceTagStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagStreamRequest" - } - } - ], - "tags": [ - "DeviceTagService" - ] - } - }, - "/api/resources/tag/v1/DeviceTag/watch": { - "get": { - "operationId": "DeviceTagService_Subscribe", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.DeviceTagStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "time.start", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "time.end", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "DeviceTagService" - ] - }, - "post": { - "operationId": "DeviceTagService_Subscribe2", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.DeviceTagStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagStreamRequest" - } - } - ], - "tags": [ - "DeviceTagService" - ] - } - }, - "/api/resources/tag/v1/DeviceTagAssignmentConfig": { - "get": { - "operationId": "DeviceTagAssignmentConfigService_GetOne", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentConfigResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "key.label", - "description": "Label is the label of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "key.value", - "description": "Value is the value of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "key.deviceId", - "description": "DeviceId is the ID of the device.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "time", - "description": "Time indicates the time for which you are interested in the data.\nIf no time is given, the server will use the time at which it makes the request.", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "DeviceTagAssignmentConfigService" - ] - }, - "delete": { - "operationId": "DeviceTagAssignmentConfigService_Delete", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentConfigDeleteResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "key.label", - "description": "Label is the label of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "key.value", - "description": "Value is the value of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "key.deviceId", - "description": "DeviceId is the ID of the device.", - "in": "query", - "required": true, - "type": "string" - } - ], - "tags": [ - "DeviceTagAssignmentConfigService" - ] - }, - "post": { - "operationId": "DeviceTagAssignmentConfigService_Set", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentConfigSetResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "value", - "description": "DeviceTagAssignmentConfig carries the value to set into the datastore.\nSee the documentation on the DeviceTagAssignmentConfig struct for which fields are required.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentConfig" - } - } - ], - "tags": [ - "DeviceTagAssignmentConfigService" - ] - } - }, - "/api/resources/tag/v1/DeviceTagAssignmentConfig/all": { - "get": { - "operationId": "DeviceTagAssignmentConfigService_GetAll", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentConfigStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.DeviceTagAssignmentConfigStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "time.start", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "time.end", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "DeviceTagAssignmentConfigService" - ] - }, - "delete": { - "operationId": "DeviceTagAssignmentConfigService_DeleteAll", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentConfigDeleteAllResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.DeviceTagAssignmentConfigDeleteAllResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "tags": [ - "DeviceTagAssignmentConfigService" - ] - }, - "post": { - "operationId": "DeviceTagAssignmentConfigService_GetAll2", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentConfigStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.DeviceTagAssignmentConfigStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentConfigStreamRequest" - } - } - ], - "tags": [ - "DeviceTagAssignmentConfigService" - ] - } - }, - "/api/resources/tag/v1/DeviceTagAssignmentConfig/watch": { - "get": { - "operationId": "DeviceTagAssignmentConfigService_Subscribe", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentConfigStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.DeviceTagAssignmentConfigStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "time.start", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "time.end", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "DeviceTagAssignmentConfigService" - ] - }, - "post": { - "operationId": "DeviceTagAssignmentConfigService_Subscribe2", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentConfigStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.DeviceTagAssignmentConfigStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentConfigStreamRequest" - } - } - ], - "tags": [ - "DeviceTagAssignmentConfigService" - ] - } - }, - "/api/resources/tag/v1/DeviceTagConfig": { - "get": { - "operationId": "DeviceTagConfigService_GetOne", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagConfigResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "key.label", - "description": "Label is the label of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "key.value", - "description": "Value is the value of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "time", - "description": "Time indicates the time for which you are interested in the data.\nIf no time is given, the server will use the time at which it makes the request.", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "DeviceTagConfigService" - ] - }, - "delete": { - "operationId": "DeviceTagConfigService_Delete", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagConfigDeleteResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "key.label", - "description": "Label is the label of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "key.value", - "description": "Value is the value of the tag.", - "in": "query", - "required": true, - "type": "string" - } - ], - "tags": [ - "DeviceTagConfigService" - ] - }, - "post": { - "operationId": "DeviceTagConfigService_Set", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagConfigSetResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "value", - "description": "DeviceTagConfig carries the value to set into the datastore.\nSee the documentation on the DeviceTagConfig struct for which fields are required.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagConfig" - } - } - ], - "tags": [ - "DeviceTagConfigService" - ] - } - }, - "/api/resources/tag/v1/DeviceTagConfig/all": { - "get": { - "operationId": "DeviceTagConfigService_GetAll", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagConfigStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.DeviceTagConfigStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "time.start", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "time.end", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "DeviceTagConfigService" - ] - }, - "delete": { - "operationId": "DeviceTagConfigService_DeleteAll", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagConfigDeleteAllResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.DeviceTagConfigDeleteAllResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "tags": [ - "DeviceTagConfigService" - ] - }, - "post": { - "operationId": "DeviceTagConfigService_GetAll2", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagConfigStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.DeviceTagConfigStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagConfigStreamRequest" - } - } - ], - "tags": [ - "DeviceTagConfigService" - ] - } - }, - "/api/resources/tag/v1/DeviceTagConfig/watch": { - "get": { - "operationId": "DeviceTagConfigService_Subscribe", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagConfigStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.DeviceTagConfigStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "time.start", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "time.end", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "DeviceTagConfigService" - ] - }, - "post": { - "operationId": "DeviceTagConfigService_Subscribe2", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagConfigStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.DeviceTagConfigStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagConfigStreamRequest" - } - } - ], - "tags": [ - "DeviceTagConfigService" - ] - } - }, - "/api/resources/tag/v1/InterfaceTag": { - "get": { - "operationId": "InterfaceTagService_GetOne", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "key.label", - "description": "Label is the label of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "key.value", - "description": "Value is the value of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "time", - "description": "Time indicates the time for which you are interested in the data.\nIf no time is given, the server will use the time at which it makes the request.", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "InterfaceTagService" - ] - } - }, - "/api/resources/tag/v1/InterfaceTag/all": { - "get": { - "operationId": "InterfaceTagService_GetAll", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.InterfaceTagStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "time.start", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "time.end", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "InterfaceTagService" - ] - }, - "post": { - "operationId": "InterfaceTagService_GetAll2", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.InterfaceTagStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagStreamRequest" - } - } - ], - "tags": [ - "InterfaceTagService" - ] - } - }, - "/api/resources/tag/v1/InterfaceTag/watch": { - "get": { - "operationId": "InterfaceTagService_Subscribe", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.InterfaceTagStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "time.start", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "time.end", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "InterfaceTagService" - ] - }, - "post": { - "operationId": "InterfaceTagService_Subscribe2", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.InterfaceTagStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagStreamRequest" - } - } - ], - "tags": [ - "InterfaceTagService" - ] - } - }, - "/api/resources/tag/v1/InterfaceTagAssignmentConfig": { - "get": { - "operationId": "InterfaceTagAssignmentConfigService_GetOne", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentConfigResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "key.label", - "description": "Label is the label of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "key.value", - "description": "Value is the value of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "key.deviceId", - "description": "DeviceId is the ID of the interface's device.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "key.interfaceId", - "description": "InterfaceId is the ID of the interface.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "time", - "description": "Time indicates the time for which you are interested in the data.\nIf no time is given, the server will use the time at which it makes the request.", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "InterfaceTagAssignmentConfigService" - ] - }, - "delete": { - "operationId": "InterfaceTagAssignmentConfigService_Delete", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentConfigDeleteResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "key.label", - "description": "Label is the label of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "key.value", - "description": "Value is the value of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "key.deviceId", - "description": "DeviceId is the ID of the interface's device.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "key.interfaceId", - "description": "InterfaceId is the ID of the interface.", - "in": "query", - "required": true, - "type": "string" - } - ], - "tags": [ - "InterfaceTagAssignmentConfigService" - ] - }, - "post": { - "operationId": "InterfaceTagAssignmentConfigService_Set", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentConfigSetResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "value", - "description": "InterfaceTagAssignmentConfig carries the value to set into the datastore.\nSee the documentation on the InterfaceTagAssignmentConfig struct for which fields are required.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentConfig" - } - } - ], - "tags": [ - "InterfaceTagAssignmentConfigService" - ] - } - }, - "/api/resources/tag/v1/InterfaceTagAssignmentConfig/all": { - "get": { - "operationId": "InterfaceTagAssignmentConfigService_GetAll", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentConfigStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.InterfaceTagAssignmentConfigStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "time.start", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "time.end", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "InterfaceTagAssignmentConfigService" - ] - }, - "delete": { - "operationId": "InterfaceTagAssignmentConfigService_DeleteAll", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentConfigDeleteAllResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.InterfaceTagAssignmentConfigDeleteAllResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "tags": [ - "InterfaceTagAssignmentConfigService" - ] - }, - "post": { - "operationId": "InterfaceTagAssignmentConfigService_GetAll2", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentConfigStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.InterfaceTagAssignmentConfigStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentConfigStreamRequest" - } - } - ], - "tags": [ - "InterfaceTagAssignmentConfigService" - ] - } - }, - "/api/resources/tag/v1/InterfaceTagAssignmentConfig/watch": { - "get": { - "operationId": "InterfaceTagAssignmentConfigService_Subscribe", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentConfigStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.InterfaceTagAssignmentConfigStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "time.start", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "time.end", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "InterfaceTagAssignmentConfigService" - ] - }, - "post": { - "operationId": "InterfaceTagAssignmentConfigService_Subscribe2", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentConfigStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.InterfaceTagAssignmentConfigStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentConfigStreamRequest" - } - } - ], - "tags": [ - "InterfaceTagAssignmentConfigService" - ] - } - }, - "/api/resources/tag/v1/InterfaceTagConfig": { - "get": { - "operationId": "InterfaceTagConfigService_GetOne", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagConfigResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "key.label", - "description": "Label is the label of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "key.value", - "description": "Value is the value of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "time", - "description": "Time indicates the time for which you are interested in the data.\nIf no time is given, the server will use the time at which it makes the request.", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "InterfaceTagConfigService" - ] - }, - "delete": { - "operationId": "InterfaceTagConfigService_Delete", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagConfigDeleteResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "key.label", - "description": "Label is the label of the tag.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "key.value", - "description": "Value is the value of the tag.", - "in": "query", - "required": true, - "type": "string" - } - ], - "tags": [ - "InterfaceTagConfigService" - ] - }, - "post": { - "operationId": "InterfaceTagConfigService_Set", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagConfigSetResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "value", - "description": "InterfaceTagConfig carries the value to set into the datastore.\nSee the documentation on the InterfaceTagConfig struct for which fields are required.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagConfig" - } - } - ], - "tags": [ - "InterfaceTagConfigService" - ] - } - }, - "/api/resources/tag/v1/InterfaceTagConfig/all": { - "get": { - "operationId": "InterfaceTagConfigService_GetAll", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagConfigStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.InterfaceTagConfigStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "time.start", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "time.end", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "InterfaceTagConfigService" - ] - }, - "delete": { - "operationId": "InterfaceTagConfigService_DeleteAll", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagConfigDeleteAllResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.InterfaceTagConfigDeleteAllResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "tags": [ - "InterfaceTagConfigService" - ] - }, - "post": { - "operationId": "InterfaceTagConfigService_GetAll2", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagConfigStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.InterfaceTagConfigStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagConfigStreamRequest" - } - } - ], - "tags": [ - "InterfaceTagConfigService" - ] - } - }, - "/api/resources/tag/v1/InterfaceTagConfig/watch": { - "get": { - "operationId": "InterfaceTagConfigService_Subscribe", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagConfigStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.InterfaceTagConfigStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "time.start", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "time.end", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "InterfaceTagConfigService" - ] - }, - "post": { - "operationId": "InterfaceTagConfigService_Subscribe2", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagConfigStreamResponse" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of arista.tag.v1.InterfaceTagConfigStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagConfigStreamRequest" - } - } - ], - "tags": [ - "InterfaceTagConfigService" - ] - } - } - }, - "definitions": { - "arista.subscriptions.Operation": { - "type": "string", - "enum": [ - "UNSPECIFIED", - "INITIAL", - "INITIAL_SYNC_COMPLETE", - "UPDATED", - "DELETED" - ], - "default": "UNSPECIFIED", - "description": " - INITIAL: INITIAL indicates the associated notification is that of the\ncurrent state and a fully-specified Resource is provided.\n - INITIAL_SYNC_COMPLETE: INITIAL_SYNC_COMPLETE indicates all existing-state has been\nstreamed to the client. This status will be sent in an\notherwise-empty message and no subsequent INITIAL messages\nshould be expected.\n - UPDATED: UPDATED indicates the associated notification carries\nmodification to the last-streamed state. This indicates\nthe contained Resource may be a partial diff, though, it\nmay contain a fully-specified Resource.\n - DELETED: DETLETED indicates the associated notification carries\na deletion. The Resource's key will always be set in this case,\nbut no other fields should be expected." - }, - "arista.tag.v1.CreatorType": { - "type": "string", - "enum": [ - "CREATOR_TYPE_UNSPECIFIED", - "CREATOR_TYPE_SYSTEM", - "CREATOR_TYPE_USER" - ], - "default": "CREATOR_TYPE_UNSPECIFIED", - "description": "CreatorType specifies an entity that creates something.\n\n - CREATOR_TYPE_SYSTEM: CREATOR_TYPE_SYSTEM is the type for something created by the system.\n - CREATOR_TYPE_USER: CREATOR_TYPE_USER is the type for something created by a user." - }, - "arista.tag.v1.DeviceTag": { - "type": "object", - "properties": { - "key": { - "$ref": "#/definitions/arista.tag.v1.TagKey", - "description": "Key uniquely identifies the device tag." - }, - "creatorType": { - "$ref": "#/definitions/arista.tag.v1.CreatorType", - "description": "CreatorType is the creator type of the tag." - } - }, - "description": "DeviceTag is a label-value pair that may or may not\nbe assigned to a device." - }, - "arista.tag.v1.DeviceTagAssignmentConfig": { - "type": "object", - "properties": { - "key": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentKey", - "description": "Key uniquely identifies the device tag assignment." - } - }, - "description": "DeviceTagAssignmentConfig is the assignment of a device tag to a\nspecific device." - }, - "arista.tag.v1.DeviceTagAssignmentConfigDeleteAllResponse": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/fmp.DeleteError", - "description": "This describes the class of delete error." - }, - "error": { - "type": "string", - "description": "This indicates the error message from the delete failure." - }, - "key": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentKey", - "description": "This is the key of the DeviceTagAssignmentConfig instance that failed to be deleted." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "Time indicates the (UTC) timestamp when the key was being deleted." - } - } - }, - "arista.tag.v1.DeviceTagAssignmentConfigDeleteResponse": { - "type": "object", - "properties": { - "key": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentKey", - "description": "Key echoes back the key of the deleted DeviceTagAssignmentConfig instance." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "- it is after the time the request was received\n - a time-ranged query with StartTime==DeletedAt will not include this instance.", - "title": "Time indicates the (UTC) timestamp at which the system recognizes the\ndeletion. The only guarantees made about this timestamp are:" - } - } - }, - "arista.tag.v1.DeviceTagAssignmentConfigResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentConfig", - "description": "Value is the value requested.\nThis structure will be fully-populated as it exists in the datastore. If\noptional fields were not given at creation, these fields will be empty or\nset to default values." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "Time carries the (UTC) timestamp of the last-modification of the\nDeviceTagAssignmentConfig instance in this response." - } - } - }, - "arista.tag.v1.DeviceTagAssignmentConfigSetResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentConfig", - "description": "Value carries all the values given in the DeviceTagAssignmentConfigSetRequest as well\nas any server-generated values." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "- it is after the time the request was received\n - a time-ranged query with StartTime==CreatedAt will include this instance.", - "title": "Time indicates the (UTC) timestamp at which the system recognizes the\ncreation. The only guarantees made about this timestamp are:" - } - } - }, - "arista.tag.v1.DeviceTagAssignmentConfigStreamRequest": { - "type": "object", - "properties": { - "partialEqFilter": { - "type": "array", - "items": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentConfig" - }, - "description": "PartialEqFilter provides a way to server-side filter a GetAll/Subscribe.\nThis requires all provided fields to be equal to the response.\n\nWhile transparent to users, this field also allows services to optimize internal\nsubscriptions if filter(s) are sufficiently specific." - }, - "time": { - "$ref": "#/definitions/arista.time.TimeBounds", - "description": "TimeRange allows limiting response data to within a specified time window.\nIf this field is populated, at least one of the two time fields are required.\n\nThis field is not allowed in the Subscribe RPC." - } - } - }, - "arista.tag.v1.DeviceTagAssignmentConfigStreamResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagAssignmentConfig", - "description": "Value is a value deemed relevant to the initiating request.\nThis structure will always have its key-field populated. Which other fields are\npopulated, and why, depends on the value of Operation and what triggered this notification." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "Time holds the timestamp of this DeviceTagAssignmentConfig's last modification." - }, - "type": { - "$ref": "#/definitions/arista.subscriptions.Operation", - "description": "Operation indicates how the DeviceTagAssignmentConfig value in this response should be considered.\nUnder non-subscribe requests, this value should always be INITIAL. In a subscription,\nonce all initial data is streamed and the client begins to receive modification updates,\nyou should not see INITIAL again." - } - } - }, - "arista.tag.v1.DeviceTagAssignmentKey": { - "type": "object", - "properties": { - "label": { - "type": "string", - "description": "Label is the label of the tag." - }, - "value": { - "type": "string", - "description": "Value is the value of the tag." - }, - "deviceId": { - "type": "string", - "description": "DeviceId is the ID of the device." - } - }, - "description": "DeviceTagAssignmentKey uniquely identifies a device tag\nassignment.", - "required": [ - "label", - "value", - "deviceId" - ] - }, - "arista.tag.v1.DeviceTagConfig": { - "type": "object", - "properties": { - "key": { - "$ref": "#/definitions/arista.tag.v1.TagKey", - "description": "Key uniquely identifies the device tag." - } - }, - "description": "DeviceTagConfig is a label-value pair that may or may not\nbe assigned to a device." - }, - "arista.tag.v1.DeviceTagConfigDeleteAllResponse": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/fmp.DeleteError", - "description": "This describes the class of delete error." - }, - "error": { - "type": "string", - "description": "This indicates the error message from the delete failure." - }, - "key": { - "$ref": "#/definitions/arista.tag.v1.TagKey", - "description": "This is the key of the DeviceTagConfig instance that failed to be deleted." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "Time indicates the (UTC) timestamp when the key was being deleted." - } - } - }, - "arista.tag.v1.DeviceTagConfigDeleteResponse": { - "type": "object", - "properties": { - "key": { - "$ref": "#/definitions/arista.tag.v1.TagKey", - "description": "Key echoes back the key of the deleted DeviceTagConfig instance." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "- it is after the time the request was received\n - a time-ranged query with StartTime==DeletedAt will not include this instance.", - "title": "Time indicates the (UTC) timestamp at which the system recognizes the\ndeletion. The only guarantees made about this timestamp are:" - } - } - }, - "arista.tag.v1.DeviceTagConfigResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagConfig", - "description": "Value is the value requested.\nThis structure will be fully-populated as it exists in the datastore. If\noptional fields were not given at creation, these fields will be empty or\nset to default values." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "Time carries the (UTC) timestamp of the last-modification of the\nDeviceTagConfig instance in this response." - } - } - }, - "arista.tag.v1.DeviceTagConfigSetResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagConfig", - "description": "Value carries all the values given in the DeviceTagConfigSetRequest as well\nas any server-generated values." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "- it is after the time the request was received\n - a time-ranged query with StartTime==CreatedAt will include this instance.", - "title": "Time indicates the (UTC) timestamp at which the system recognizes the\ncreation. The only guarantees made about this timestamp are:" - } - } - }, - "arista.tag.v1.DeviceTagConfigStreamRequest": { - "type": "object", - "properties": { - "partialEqFilter": { - "type": "array", - "items": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagConfig" - }, - "description": "PartialEqFilter provides a way to server-side filter a GetAll/Subscribe.\nThis requires all provided fields to be equal to the response.\n\nWhile transparent to users, this field also allows services to optimize internal\nsubscriptions if filter(s) are sufficiently specific." - }, - "time": { - "$ref": "#/definitions/arista.time.TimeBounds", - "description": "TimeRange allows limiting response data to within a specified time window.\nIf this field is populated, at least one of the two time fields are required.\n\nThis field is not allowed in the Subscribe RPC." - } - } - }, - "arista.tag.v1.DeviceTagConfigStreamResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/arista.tag.v1.DeviceTagConfig", - "description": "Value is a value deemed relevant to the initiating request.\nThis structure will always have its key-field populated. Which other fields are\npopulated, and why, depends on the value of Operation and what triggered this notification." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "Time holds the timestamp of this DeviceTagConfig's last modification." - }, - "type": { - "$ref": "#/definitions/arista.subscriptions.Operation", - "description": "Operation indicates how the DeviceTagConfig value in this response should be considered.\nUnder non-subscribe requests, this value should always be INITIAL. In a subscription,\nonce all initial data is streamed and the client begins to receive modification updates,\nyou should not see INITIAL again." - } - } - }, - "arista.tag.v1.DeviceTagResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/arista.tag.v1.DeviceTag", - "description": "Value is the value requested.\nThis structure will be fully-populated as it exists in the datastore. If\noptional fields were not given at creation, these fields will be empty or\nset to default values." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "Time carries the (UTC) timestamp of the last-modification of the\nDeviceTag instance in this response." - } - } - }, - "arista.tag.v1.DeviceTagStreamRequest": { - "type": "object", - "properties": { - "partialEqFilter": { - "type": "array", - "items": { - "$ref": "#/definitions/arista.tag.v1.DeviceTag" - }, - "description": "PartialEqFilter provides a way to server-side filter a GetAll/Subscribe.\nThis requires all provided fields to be equal to the response.\n\nWhile transparent to users, this field also allows services to optimize internal\nsubscriptions if filter(s) are sufficiently specific." - }, - "time": { - "$ref": "#/definitions/arista.time.TimeBounds", - "description": "TimeRange allows limiting response data to within a specified time window.\nIf this field is populated, at least one of the two time fields are required.\n\nThis field is not allowed in the Subscribe RPC." - } - } - }, - "arista.tag.v1.DeviceTagStreamResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/arista.tag.v1.DeviceTag", - "description": "Value is a value deemed relevant to the initiating request.\nThis structure will always have its key-field populated. Which other fields are\npopulated, and why, depends on the value of Operation and what triggered this notification." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "Time holds the timestamp of this DeviceTag's last modification." - }, - "type": { - "$ref": "#/definitions/arista.subscriptions.Operation", - "description": "Operation indicates how the DeviceTag value in this response should be considered.\nUnder non-subscribe requests, this value should always be INITIAL. In a subscription,\nonce all initial data is streamed and the client begins to receive modification updates,\nyou should not see INITIAL again." - } - } - }, - "arista.tag.v1.InterfaceTag": { - "type": "object", - "properties": { - "key": { - "$ref": "#/definitions/arista.tag.v1.TagKey", - "description": "Key uniquely identifies the interface tag." - }, - "creatorType": { - "$ref": "#/definitions/arista.tag.v1.CreatorType", - "description": "CreatorType is the creator type of the tag." - } - }, - "description": "InterfaceTag is a label-value pair that may or may\nnot be assigned to an interface." - }, - "arista.tag.v1.InterfaceTagAssignmentConfig": { - "type": "object", - "properties": { - "key": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentKey", - "description": "Key uniquely identifies the interface tag assignment." - } - }, - "description": "InterfaceTagAssignmentConfig is the assignment of an interface tag\nto a specific interface." - }, - "arista.tag.v1.InterfaceTagAssignmentConfigDeleteAllResponse": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/fmp.DeleteError", - "description": "This describes the class of delete error." - }, - "error": { - "type": "string", - "description": "This indicates the error message from the delete failure." - }, - "key": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentKey", - "description": "This is the key of the InterfaceTagAssignmentConfig instance that failed to be deleted." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "Time indicates the (UTC) timestamp when the key was being deleted." - } - } - }, - "arista.tag.v1.InterfaceTagAssignmentConfigDeleteResponse": { - "type": "object", - "properties": { - "key": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentKey", - "description": "Key echoes back the key of the deleted InterfaceTagAssignmentConfig instance." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "- it is after the time the request was received\n - a time-ranged query with StartTime==DeletedAt will not include this instance.", - "title": "Time indicates the (UTC) timestamp at which the system recognizes the\ndeletion. The only guarantees made about this timestamp are:" - } - } - }, - "arista.tag.v1.InterfaceTagAssignmentConfigResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentConfig", - "description": "Value is the value requested.\nThis structure will be fully-populated as it exists in the datastore. If\noptional fields were not given at creation, these fields will be empty or\nset to default values." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "Time carries the (UTC) timestamp of the last-modification of the\nInterfaceTagAssignmentConfig instance in this response." - } - } - }, - "arista.tag.v1.InterfaceTagAssignmentConfigSetResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentConfig", - "description": "Value carries all the values given in the InterfaceTagAssignmentConfigSetRequest as well\nas any server-generated values." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "- it is after the time the request was received\n - a time-ranged query with StartTime==CreatedAt will include this instance.", - "title": "Time indicates the (UTC) timestamp at which the system recognizes the\ncreation. The only guarantees made about this timestamp are:" - } - } - }, - "arista.tag.v1.InterfaceTagAssignmentConfigStreamRequest": { - "type": "object", - "properties": { - "partialEqFilter": { - "type": "array", - "items": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentConfig" - }, - "description": "PartialEqFilter provides a way to server-side filter a GetAll/Subscribe.\nThis requires all provided fields to be equal to the response.\n\nWhile transparent to users, this field also allows services to optimize internal\nsubscriptions if filter(s) are sufficiently specific." - }, - "time": { - "$ref": "#/definitions/arista.time.TimeBounds", - "description": "TimeRange allows limiting response data to within a specified time window.\nIf this field is populated, at least one of the two time fields are required.\n\nThis field is not allowed in the Subscribe RPC." - } - } - }, - "arista.tag.v1.InterfaceTagAssignmentConfigStreamResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagAssignmentConfig", - "description": "Value is a value deemed relevant to the initiating request.\nThis structure will always have its key-field populated. Which other fields are\npopulated, and why, depends on the value of Operation and what triggered this notification." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "Time holds the timestamp of this InterfaceTagAssignmentConfig's last modification." - }, - "type": { - "$ref": "#/definitions/arista.subscriptions.Operation", - "description": "Operation indicates how the InterfaceTagAssignmentConfig value in this response should be considered.\nUnder non-subscribe requests, this value should always be INITIAL. In a subscription,\nonce all initial data is streamed and the client begins to receive modification updates,\nyou should not see INITIAL again." - } - } - }, - "arista.tag.v1.InterfaceTagAssignmentKey": { - "type": "object", - "properties": { - "label": { - "type": "string", - "description": "Label is the label of the tag." - }, - "value": { - "type": "string", - "description": "Value is the value of the tag." - }, - "deviceId": { - "type": "string", - "description": "DeviceId is the ID of the interface's device." - }, - "interfaceId": { - "type": "string", - "description": "InterfaceId is the ID of the interface." - } - }, - "description": "InterfaceTagAssignmentKey uniquely identifies an interface\ntag assignment.", - "required": [ - "label", - "value", - "deviceId", - "interfaceId" - ] - }, - "arista.tag.v1.InterfaceTagConfig": { - "type": "object", - "properties": { - "key": { - "$ref": "#/definitions/arista.tag.v1.TagKey", - "description": "Key uniquely identifies the interface tag." - } - }, - "description": "InterfaceTagConfig is a label-value pair that may or may\nnot be assigned to an interface." - }, - "arista.tag.v1.InterfaceTagConfigDeleteAllResponse": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/fmp.DeleteError", - "description": "This describes the class of delete error." - }, - "error": { - "type": "string", - "description": "This indicates the error message from the delete failure." - }, - "key": { - "$ref": "#/definitions/arista.tag.v1.TagKey", - "description": "This is the key of the InterfaceTagConfig instance that failed to be deleted." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "Time indicates the (UTC) timestamp when the key was being deleted." - } - } - }, - "arista.tag.v1.InterfaceTagConfigDeleteResponse": { - "type": "object", - "properties": { - "key": { - "$ref": "#/definitions/arista.tag.v1.TagKey", - "description": "Key echoes back the key of the deleted InterfaceTagConfig instance." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "- it is after the time the request was received\n - a time-ranged query with StartTime==DeletedAt will not include this instance.", - "title": "Time indicates the (UTC) timestamp at which the system recognizes the\ndeletion. The only guarantees made about this timestamp are:" - } - } - }, - "arista.tag.v1.InterfaceTagConfigResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagConfig", - "description": "Value is the value requested.\nThis structure will be fully-populated as it exists in the datastore. If\noptional fields were not given at creation, these fields will be empty or\nset to default values." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "Time carries the (UTC) timestamp of the last-modification of the\nInterfaceTagConfig instance in this response." - } - } - }, - "arista.tag.v1.InterfaceTagConfigSetResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagConfig", - "description": "Value carries all the values given in the InterfaceTagConfigSetRequest as well\nas any server-generated values." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "- it is after the time the request was received\n - a time-ranged query with StartTime==CreatedAt will include this instance.", - "title": "Time indicates the (UTC) timestamp at which the system recognizes the\ncreation. The only guarantees made about this timestamp are:" - } - } - }, - "arista.tag.v1.InterfaceTagConfigStreamRequest": { - "type": "object", - "properties": { - "partialEqFilter": { - "type": "array", - "items": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagConfig" - }, - "description": "PartialEqFilter provides a way to server-side filter a GetAll/Subscribe.\nThis requires all provided fields to be equal to the response.\n\nWhile transparent to users, this field also allows services to optimize internal\nsubscriptions if filter(s) are sufficiently specific." - }, - "time": { - "$ref": "#/definitions/arista.time.TimeBounds", - "description": "TimeRange allows limiting response data to within a specified time window.\nIf this field is populated, at least one of the two time fields are required.\n\nThis field is not allowed in the Subscribe RPC." - } - } - }, - "arista.tag.v1.InterfaceTagConfigStreamResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTagConfig", - "description": "Value is a value deemed relevant to the initiating request.\nThis structure will always have its key-field populated. Which other fields are\npopulated, and why, depends on the value of Operation and what triggered this notification." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "Time holds the timestamp of this InterfaceTagConfig's last modification." - }, - "type": { - "$ref": "#/definitions/arista.subscriptions.Operation", - "description": "Operation indicates how the InterfaceTagConfig value in this response should be considered.\nUnder non-subscribe requests, this value should always be INITIAL. In a subscription,\nonce all initial data is streamed and the client begins to receive modification updates,\nyou should not see INITIAL again." - } - } - }, - "arista.tag.v1.InterfaceTagResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTag", - "description": "Value is the value requested.\nThis structure will be fully-populated as it exists in the datastore. If\noptional fields were not given at creation, these fields will be empty or\nset to default values." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "Time carries the (UTC) timestamp of the last-modification of the\nInterfaceTag instance in this response." - } - } - }, - "arista.tag.v1.InterfaceTagStreamRequest": { - "type": "object", - "properties": { - "partialEqFilter": { - "type": "array", - "items": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTag" - }, - "description": "PartialEqFilter provides a way to server-side filter a GetAll/Subscribe.\nThis requires all provided fields to be equal to the response.\n\nWhile transparent to users, this field also allows services to optimize internal\nsubscriptions if filter(s) are sufficiently specific." - }, - "time": { - "$ref": "#/definitions/arista.time.TimeBounds", - "description": "TimeRange allows limiting response data to within a specified time window.\nIf this field is populated, at least one of the two time fields are required.\n\nThis field is not allowed in the Subscribe RPC." - } - } - }, - "arista.tag.v1.InterfaceTagStreamResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/arista.tag.v1.InterfaceTag", - "description": "Value is a value deemed relevant to the initiating request.\nThis structure will always have its key-field populated. Which other fields are\npopulated, and why, depends on the value of Operation and what triggered this notification." - }, - "time": { - "type": "string", - "format": "date-time", - "description": "Time holds the timestamp of this InterfaceTag's last modification." - }, - "type": { - "$ref": "#/definitions/arista.subscriptions.Operation", - "description": "Operation indicates how the InterfaceTag value in this response should be considered.\nUnder non-subscribe requests, this value should always be INITIAL. In a subscription,\nonce all initial data is streamed and the client begins to receive modification updates,\nyou should not see INITIAL again." - } - } - }, - "arista.tag.v1.TagKey": { - "type": "object", - "properties": { - "label": { - "type": "string", - "description": "Label is the label of the tag." - }, - "value": { - "type": "string", - "description": "Value is the value of the tag." - } - }, - "description": "TagKey uniquely identifies a tag for a network element.", - "required": [ - "label", - "value" - ] - }, - "arista.time.TimeBounds": { - "type": "object", - "properties": { - "start": { - "type": "string", - "format": "date-time" - }, - "end": { - "type": "string", - "format": "date-time" - } - } - }, - "fmp.DeleteError": { - "type": "string", - "enum": [ - "DELETE_ERROR_UNSPECIFIED", - "DELETE_ERROR_UNAUTHORIZED", - "DELETE_ERROR_INTERNAL", - "DELETE_ERROR_UNDELETABLE_KEY" - ], - "default": "DELETE_ERROR_UNSPECIFIED", - "description": "DeleteError defines the set of delete error types.\n\n - DELETE_ERROR_UNSPECIFIED: DELETE_ERROR_UNSPECIFIED indicates that the delete error\nis not specified.\n - DELETE_ERROR_UNAUTHORIZED: DELETE_ERROR_UNAUTHORIZED indicates that the user is not authorized\nto perform the specified delete.\n - DELETE_ERROR_INTERNAL: DELETE_ERROR_INTERNAL indicates that the server encountered an\nunrecoverable error on the specified delete.\n - DELETE_ERROR_UNDELETABLE_KEY: DELETE_ERROR_UNDELETABLE_KEY indicates that the specified error is\nnot allowed by the service." - }, - "google.protobuf.Any": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "google.rpc.Status": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/google.protobuf.Any" - } - } - } - } - }, - "securityDefinitions": { - "apiToken": { - "type": "apiKey", - "name": "access_token", - "in": "header" - } - }, - "security": [ - { - "apiToken": [] - } - ], - "externalDocs": { - "description": "More on CloudVision Resource APIs", - "url": "https://aristanetworks.github.io/cloudvision-apis" - } -} diff --git a/arista/tag.v1/tag-changelog.yaml b/arista/tag.v1/tag-changelog.yaml deleted file mode 100644 index 799b6fac..00000000 --- a/arista/tag.v1/tag-changelog.yaml +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) 2020 Arista Networks, Inc. All rights reserved. -# Arista Networks, Inc. Confidential and Proprietary. -# Subject to Arista Networks, Inc.'s EULA. -# FOR INTERNAL USE ONLY. NOT FOR DISTRIBUTION. - -# Add a short description of each model change here. -# New entries go on top. - -Changes: - - date: 2023-02-10 - description: remove unreleased assigned status field - version: 1.0.11 - cvaas: true - onprem: true - - - date: 2023-02-09 - description: deprecate all services - version: 1.0.10 - - - date: 2022-12-21 - description: removed unreleased workspace models - version: 1.0.9 - - - date: 2021-01-07 - description: shortened workspace tag and tag assignment model names - version: 1.0.8 - - - date: 2020-11-11 - description: removed change context ID from tag and assignment keys - version: 1.0.7 - - - date: 2020-11-06 - description: added workspace tag and tag assignment models - version: 1.0.6 - - - date: 2020-09-21 - description: added change context ID to tag and assignment keys - version: 1.0.5 - - - date: 2020-08-19 - description: added assigned status to device and interface tag - version: 1.0.4 - - - date: 2020-06-05 - description: Change service suffix from Resource to Service - version: 1.0.3 - - - date: 2020-05-13 - description: added comments about required fields - version: 1.0.2 - - - date: 2020-04-10 - description: changed Go package name to a versionless one - version: 1.0.1 - - - date: 2020-04-10 - description: Initial revision - version: 1.0.0 diff --git a/arista/tag.v1/tag.proto b/arista/tag.v1/tag.proto deleted file mode 100644 index e5a1e3c9..00000000 --- a/arista/tag.v1/tag.proto +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) 2020 Arista Networks, Inc. All rights reserved. -// Use of this source code is governed by the Apache License 2.0 -// that can be found in the COPYING file. - -syntax = "proto3"; - -option deprecated = true; - -package arista.tag.v1; - -option go_package = "arista/resources/arista/tag.v1;tag"; - -import "google/protobuf/wrappers.proto"; - -import "fmp/extensions.proto"; - -// TagKey uniquely identifies a tag for a network element. -message TagKey { - option (fmp.model_key) = true; - - // Label is the label of the tag. - google.protobuf.StringValue label = 1; - // Value is the value of the tag. - google.protobuf.StringValue value = 2; -} - -// CreatorType specifies an entity that creates something. -enum CreatorType { - CREATOR_TYPE_UNSPECIFIED = 0; - // CREATOR_TYPE_SYSTEM is the type for something created by the system. - CREATOR_TYPE_SYSTEM = 1; - // CREATOR_TYPE_USER is the type for something created by a user. - CREATOR_TYPE_USER = 2; -} - -// InterfaceTagConfig is a label-value pair that may or may -// not be assigned to an interface. -message InterfaceTagConfig { - option (fmp.model) = "rw"; - - // Key uniquely identifies the interface tag. - TagKey key = 1; -} - -// InterfaceTag is a label-value pair that may or may -// not be assigned to an interface. -message InterfaceTag { - option (fmp.model) = "ro"; - - // Key uniquely identifies the interface tag. - TagKey key = 1; - // CreatorType is the creator type of the tag. - CreatorType creator_type = 2; -} - -// InterfaceTagAssignmentKey uniquely identifies an interface -// tag assignment. -message InterfaceTagAssignmentKey { - option (fmp.model_key) = true; - - // Label is the label of the tag. - google.protobuf.StringValue label = 1; - // Value is the value of the tag. - google.protobuf.StringValue value = 2; - // DeviceId is the ID of the interface's device. - google.protobuf.StringValue device_id = 3; - // InterfaceId is the ID of the interface. - google.protobuf.StringValue interface_id = 4; -} - -// InterfaceTagAssignmentConfig is the assignment of an interface tag -// to a specific interface. -message InterfaceTagAssignmentConfig { - option (fmp.model) = "rw"; - - // Key uniquely identifies the interface tag assignment. - InterfaceTagAssignmentKey key = 1; -} - -// DeviceTagConfig is a label-value pair that may or may not -// be assigned to a device. -message DeviceTagConfig { - option (fmp.model) = "rw"; - - // Key uniquely identifies the device tag. - TagKey key = 1; -} - -// DeviceTag is a label-value pair that may or may not -// be assigned to a device. -message DeviceTag { - option (fmp.model) = "ro"; - - // Key uniquely identifies the device tag. - TagKey key = 1; - // CreatorType is the creator type of the tag. - CreatorType creator_type = 2; -} - -// DeviceTagAssignmentKey uniquely identifies a device tag -// assignment. -message DeviceTagAssignmentKey { - option (fmp.model_key) = true; - - // Label is the label of the tag. - google.protobuf.StringValue label = 1; - // Value is the value of the tag. - google.protobuf.StringValue value = 2; - // DeviceId is the ID of the device. - google.protobuf.StringValue device_id = 3; -} - -// DeviceTagAssignmentConfig is the assignment of a device tag to a -// specific device. -message DeviceTagAssignmentConfig { - option (fmp.model) = "rw"; - - // Key uniquely identifies the device tag assignment. - DeviceTagAssignmentKey key = 1; -} diff --git a/buf.yaml b/buf.yaml index eb441204..b73ce2e6 100644 --- a/buf.yaml +++ b/buf.yaml @@ -27,7 +27,6 @@ breaking: - FILE ignore: - buf.yaml - - arista/tag.v1 - arista/alert.v1 - arista/bugexposure.v1 - arista/changecontrol.v1 diff --git a/docs/content/examples/REST/_index.files/examples_cvprac.py b/docs/content/examples/REST/_index.files/examples_cvprac.py index e63d58fa..914d6528 100644 --- a/docs/content/examples/REST/_index.files/examples_cvprac.py +++ b/docs/content/examples/REST/_index.files/examples_cvprac.py @@ -66,53 +66,6 @@ def get_active_devices(client): continue return devices -def get_all_device_tags(client): - tag_url = '/api/resources/tag/v1/DeviceTag/all' - tag_data = client.get(tag_url) - tags = [] - for tag in tag_data['data']: - tags.append({tag['result']['value']['key']['label']:tag['result']['value']['key']['value']}) - return tags - -def get_all_interface_tags(client): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' - tags = client.get(tag_url) - return tags['data'] - -def filter_interface_tag(client, dId=None, ifId=None, label=None, value=None): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' - payload = { - "partialEqFilter": [ - {"key": {"deviceId": dId, "interfaceId": ifId, "label": label, "value": value}} - ] - } - response = client.post(tag_url, data=payload) - return response - -def create_itag(client, label, value): - tag_url = '/api/resources/tag/v1/InterfaceTagConfig' - payload = {"key":{"label":label,"value":value}} - response = client.post(tag_url, data=payload) - return response - -def assign_itag(client, dId, ifId, label, value): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig' - payload = {"key":{"label":label, "value":value, "deviceId": dId, "interfaceId": ifId}} - response = client.post(tag_url, data=payload) - return response - -def create_dtag(client, label, value): - tag_url = '/api/resources/tag/v1/DeviceTagConfig' - payload = {"key":{"label":label,"value":value}} - response = client.post(tag_url, data=payload) - return response - -def assign_dtag(client, dId, label, value): - tag_url = '/api/resources/tag/v1/DeviceTagAssignmentConfig' - payload = {"key":{"label":label, "value":value, "deviceId": dId}} - response = client.post(tag_url, data=payload) - return response - ### Uncomment the below functions/print statement to test # ### Get all active events @@ -156,35 +109,3 @@ def assign_dtag(client, dId, label, value): # ### Get the inventory # print ('=== Inventory ===') # print(get_active_devices(clnt)) - -# ### Get all devie tags -# print('=== Device Tags ===' ) -# for tag in get_all_device_tags(clnt): -# print (tag) - -# ### Get all interface tag assignments -# print(get_all_interface_tags(clnt)) - -# ### Get all interfaces that have a tag with a specific value on a device -# print(filter_interface_tag(clnt, dId="JPE14070534", value="speed40Gbps")) - -# ### Get all tags for an interface of a device -# print(filter_interface_tag(clnt, dId="JPE14070534", ifId="Ethernet1")) - -# ### Get all interfaces that have a specific tag assigned -# print(filter_interface_tag(clnt, dId="JPE14070534", label="lldp_hostname")) - -# ### Create an interface tag -# create_itag(clnt, "lldp_chassis", "50:08:00:0d:00:48") - -# ### Assign an interface tag -# assign_itag(clnt, "JPE14070534", "Ethernet4", "lldp_chassis", "50:08:00:0d:00:38") - -# ### Create a device tag -# create_dtag(clnt, "topology_hint_pod", "ire-pod11") - -# ### Assign an interface tag -# assign_dtag(clnt, "JPE14070534", "topology_hint_pod", "ire-pod11" ) - - - diff --git a/docs/content/examples/REST/_index.files/examples_python_rest.py b/docs/content/examples/REST/_index.files/examples_python_rest.py index 6c4dd8ed..2cc6bfe6 100644 --- a/docs/content/examples/REST/_index.files/examples_python_rest.py +++ b/docs/content/examples/REST/_index.files/examples_python_rest.py @@ -80,69 +80,6 @@ def get_active_devices(): continue return devices -def get_all_device_tags(): - tag_url = '/api/resources/tag/v1/DeviceTag/all' - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.get(url, headers=head, verify=False) - tag_data = json_decoder(response.text) - tags = [] - for tag in tag_data: - tags.append({tag['result']['value']['key']['label']:tag['result']['value']['key']['value']}) - return tags - -def get_all_interface_tags(): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.get(url, headers=head, verify=False) - tags = json_decoder(response.text) - return tags - -def filter_interface_tag(dId=None, ifId=None, label=None, value=None): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' - payload = { - "partialEqFilter": [ - {"key": {"deviceId": dId, "interfaceId": ifId, "label": label, "value": value}} - ] - } - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.post(url, headers=head, data=json.dumps(payload), verify=False) - return response.text - -def create_itag(label, value): - tag_url = '/api/resources/tag/v1/InterfaceTagConfig' - payload = {"key":{"label":label, "value":value}} - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.post(url, headers=head, data=json.dumps(payload), verify=False) - return response - -def assign_itag(dId, ifId, label, value): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig' - payload = {"key":{"label":label, "value":value, "deviceId": dId, "interfaceId": ifId}} - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.post(url, headers=head, data=json.dumps(payload), verify=False) - return response - -def create_dtag(label, value): - tag_url = '/api/resources/tag/v1/DeviceTagConfig' - payload = {"key":{"label":label, "value":value}} - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.post(url, headers=head, data=json.dumps(payload), verify=False) - return response - -def assign_dtag(dId, label, value): - tag_url = '/api/resources/tag/v1/DeviceTagAssignmentConfig' - payload = {"key":{"label":label, "value":value, "deviceId": dId}} - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.post(url, headers=head, data=json.dumps(payload), verify=False) - return response - ### Uncomment the below functions/print statement to test # ### Get all active events @@ -163,30 +100,3 @@ def assign_dtag(dId, label, value): # ### Get all Low Disk Space events # get_events_by_type("LOW_DEVICE_DISK_SPACE") # print(get_active_devices()) - -# ### Get all device tags -# pp(get_all_device_tags()) - -# ### Get all interface tags -# pp(get_all_interface_tags()) - -# ### Get all interfaces that have a tag with a specific value on a device -# print(filter_interface_tag(dId="JPE14070534", value="speed40Gbps")) - -# ### Get all tags for an interface of a device -# print(filter_interface_tag(dId="JPE14070534", ifId="Ethernet1")) - -# ### Get all interfaces that have a specific tag assigned -# print(filter_interface_tag(dId="JPE14070534", label="lldp_hostname")) - -# ### Create an interface tag -# create_itag("lldp_chassis", "50:08:00:0d:00:48") - -# ### Assign an interface tag -# assign_itag("JPE14070534", "Ethernet3", "lldp_chassis", "50:08:00:0d:00:48") - -# ### Create a device tag -# create_dtag("topology_hint_pod", "ire-pod11") - -# ### Assign an interface tag -# assign_dtag("JPE14070534", "topology_hint_pod", "ire-pod11") \ No newline at end of file diff --git a/docs/content/examples/REST/resource_cvprac.py b/docs/content/examples/REST/resource_cvprac.py index 6df911cf..e06bd165 100644 --- a/docs/content/examples/REST/resource_cvprac.py +++ b/docs/content/examples/REST/resource_cvprac.py @@ -66,53 +66,6 @@ def get_active_devices(client): continue return devices -def get_all_device_tags(client): - tag_url = '/api/resources/tag/v1/DeviceTag/all' - tag_data = client.get(tag_url) - tags = [] - for tag in tag_data['data']: - tags.append({tag['result']['value']['key']['label']:tag['result']['value']['key']['value']}) - return tags - -def get_all_interface_tags(client): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' - tags = client.get(tag_url) - return tags['data'] - -def filter_interface_tag(client, dId=None, ifId=None, label=None, value=None): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' - payload = { - "partialEqFilter": [ - {"key": {"deviceId": dId, "interfaceId": ifId, "label": label, "value": value}} - ] - } - response = client.post(tag_url, data=payload) - return response - -def create_itag(client, label, value): - tag_url = '/api/resources/tag/v1/InterfaceTagConfig' - payload = {"key":{"label":label,"value":value}} - response = client.post(tag_url, data=payload) - return response - -def assign_itag(client, dId, ifId, label, value): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig' - payload = {"key":{"label":label, "value":value, "deviceId": dId, "interfaceId": ifId}} - response = client.post(tag_url, data=payload) - return response - -def create_dtag(client, label, value): - tag_url = '/api/resources/tag/v1/DeviceTagConfig' - payload = {"key":{"label":label,"value":value}} - response = client.post(tag_url, data=payload) - return response - -def assign_dtag(client, dId, label, value): - tag_url = '/api/resources/tag/v1/DeviceTagAssignmentConfig' - payload = {"key":{"label":label, "value":value, "deviceId": dId}} - response = client.post(tag_url, data=payload) - return response - ### Uncomment the below functions/print statement to test # ### Get all active events @@ -156,35 +109,3 @@ def assign_dtag(client, dId, label, value): # ### Get the inventory # print ('=== Inventory ===') # print(get_active_devices(clnt)) - -# ### Get all devie tags -# print('=== Device Tags ===' ) -# for tag in get_all_device_tags(clnt): -# print (tag) - -# ### Get all interface tag assignments -# print(get_all_interface_tags(clnt)) - -# ### Get all interfaces that have a tag with a specific value on a device -# print(filter_interface_tag(clnt, dId="JPE14070534", value="speed40Gbps")) - -# ### Get all tags for an interface of a device -# print(filter_interface_tag(clnt, dId="JPE14070534", ifId="Ethernet1")) - -# ### Get all interfaces that have a specific tag assigned -# print(filter_interface_tag(clnt, dId="JPE14070534", label="lldp_hostname")) - -# ### Create an interface tag -# create_itag(clnt, "lldp_chassis", "50:08:00:0d:00:48") - -# ### Assign an interface tag -# assign_itag(clnt, "JPE14070534", "Ethernet4", "lldp_chassis", "50:08:00:0d:00:38") - -# ### Create a device tag -# create_dtag(clnt, "topology_hint_pod", "ire-pod11") - -# ### Assign an interface tag -# assign_dtag(clnt, "JPE14070534", "topology_hint_pod", "ire-pod11" ) - - - diff --git a/docs/content/examples/REST/resource_native.py b/docs/content/examples/REST/resource_native.py index 70e46e91..f1e520fe 100644 --- a/docs/content/examples/REST/resource_native.py +++ b/docs/content/examples/REST/resource_native.py @@ -80,69 +80,6 @@ def get_active_devices(): continue return devices -def get_all_device_tags(): - tag_url = '/api/resources/tag/v1/DeviceTag/all' - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.get(url, headers=head, verify=False) - tag_data = json_decoder(response.text) - tags = [] - for tag in tag_data: - tags.append({tag['result']['value']['key']['label']:tag['result']['value']['key']['value']}) - return tags - -def get_all_interface_tags(): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.get(url, headers=head, verify=False) - tags = json_decoder(response.text) - return tags - -def filter_interface_tag(dId=None, ifId=None, label=None, value=None): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' - payload = { - "partialEqFilter": [ - {"key": {"deviceId": dId, "interfaceId": ifId, "label": label, "value": value}} - ] - } - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.post(url, headers=head, data=json.dumps(payload), verify=False) - return response.text - -def create_itag(label, value): - tag_url = '/api/resources/tag/v1/InterfaceTagConfig' - payload = {"key":{"label":label, "value":value}} - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.post(url, headers=head, data=json.dumps(payload), verify=False) - return response - -def assign_itag(dId, ifId, label, value): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig' - payload = {"key":{"label":label, "value":value, "deviceId": dId, "interfaceId": ifId}} - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.post(url, headers=head, data=json.dumps(payload), verify=False) - return response - -def create_dtag(label, value): - tag_url = '/api/resources/tag/v1/DeviceTagConfig' - payload = {"key":{"label":label, "value":value}} - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.post(url, headers=head, data=json.dumps(payload), verify=False) - return response - -def assign_dtag(dId, label, value): - tag_url = '/api/resources/tag/v1/DeviceTagAssignmentConfig' - payload = {"key":{"label":label, "value":value, "deviceId": dId}} - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.post(url, headers=head, data=json.dumps(payload), verify=False) - return response - ### Uncomment the below functions/print statement to test # ### Get all active events @@ -163,30 +100,3 @@ def assign_dtag(dId, label, value): # ### Get all Low Disk Space events # get_events_by_type("LOW_DEVICE_DISK_SPACE") # print(get_active_devices()) - -# ### Get all device tags -# pp(get_all_device_tags()) - -# ### Get all interface tags -# pp(get_all_interface_tags()) - -# ### Get all interfaces that have a tag with a specific value on a device -# print(filter_interface_tag(dId="JPE14070534", value="speed40Gbps")) - -# ### Get all tags for an interface of a device -# print(filter_interface_tag(dId="JPE14070534", ifId="Ethernet1")) - -# ### Get all interfaces that have a specific tag assigned -# print(filter_interface_tag(dId="JPE14070534", label="lldp_hostname")) - -# ### Create an interface tag -# create_itag("lldp_chassis", "50:08:00:0d:00:48") - -# ### Assign an interface tag -# assign_itag("JPE14070534", "Ethernet3", "lldp_chassis", "50:08:00:0d:00:48") - -# ### Create a device tag -# create_dtag("topology_hint_pod", "ire-pod11") - -# ### Assign an interface tag -# assign_dtag("JPE14070534", "topology_hint_pod", "ire-pod11") \ No newline at end of file diff --git a/docs/content/examples/REST/tag/_index.md b/docs/content/examples/REST/tag/_index.md index 90ea84d0..e5d39356 100644 --- a/docs/content/examples/REST/tag/_index.md +++ b/docs/content/examples/REST/tag/_index.md @@ -16,545 +16,6 @@ To generate a service account token please refer to the [authentication](../../. # Tags -## Tag.v1 - -### Get all device tags - -#### curl - -```bash -curl -sS -kX GET --header 'Accept: application/json' -b access_token=`cat token.tok` 'https://192.0.2.100/api/resources/tag/v1/DeviceTag/all' | jq '.result.value.key | .label + " " + .value' -``` - -Result: - -```bash - -topology_datacenter Shannon" -"topology_datacenter vDC1R" -"topology_hint_pod Vantage" -"topology_hint_pod vPod1R" -"topology_hint_pod vPod3R" -"topology_hint_pod tac-ire-pod1" -"topology_hint_pod tac-ire-pod3" -"topology_hint_pod tac-ire-pod2" -"topology_hint_rack Rack17" -"topology_hint_rack Rack15" -"topology_hint_rack Rack27" -"topology_hint_rack vRack2R" -"topology_hint_rack vRack1R" -"topology_hint_rack vRack4R" -"topology_hint_rack vRack3R" -"topology_hint_type edge" -"topology_hint_type leaf" -"topology_hint_type spine" -"topology_hint_type server" -"topology_hint_type endpoint" -"topology_hint_type management" -"topology_hint_datacenter vDC1R" -"topology_hint_datacenter Shannon" - -``` - -#### cvprac - -```python -def get_all_device_tags(client): - tag_url = '/api/resources/tag/v1/DeviceTag/all' - tag_data = client.get(tag_url) - tags = [] - for tag in tag_data['data']: - tags.append({tag['result']['value']['key']['label']:tag['result']['value']['key']['value']}) - return tags - -for tag in get_all_device_tags(clnt): - print (tag) -``` - -#### python requests - -```python -def get_all_device_tags(): - tag_url = '/api/resources/tag/v1/DeviceTag/all' - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.get(url, headers=head, verify=False) - tag_data = json_decoder(response.text) - tags = [] - for tag in tag_data: - tags.append({tag['result']['value']['key']['label']:tag['result']['value']['key']['value']}) - return tags - -pp(get_all_device_tags()) -``` - -### Get all assigned interface tags - -#### curl - -```bash - curl -sS -kX GET --header 'Accept: application/json' -b access_token=`cat token.tok` 'https://192.0.2.100/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' - ``` - -#### cvprac - -```python -def get_all_interface_tags(client): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' - tags = client.get(tag_url) - return tags['data'] - -print(get_all_interface_tags(clnt)) -``` - -#### python requests - -```python -def get_all_interface_tags(): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.get(url, headers=head, verify=False) - tags = json_decoder(response.text) - return tags - -pp(get_all_interface_tags()) -``` - -### Get all tags for a device - -#### curl - -```bash -curl -sS -kX POST --header 'Accept: application/json' -b access_token=`cat token.tok` -d '{"partialEqFilter": [{"key":{"deviceId": "JPE14070534"}}]}' 'https://192.0.2.100/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' - ``` - -Result: - -```python -{ - "result":{ - "value":{ - "key":{ - "label":"speed", - "value":"speed1Gbps", - "deviceId":"JPE14070534", - "interfaceId":"Ethernet1" - } - }, - "time":"2021-03-30T18:33:18.639842067Z", - "type":"INITIAL" - } -} -{ - "result":{ - "value":{ - "key":{ - "label":"name", - "value":"Ethernet1", - "deviceId":"JPE14070534", - "interfaceId":"Ethernet1" - } - }, - "time":"2021-03-27T00:38:41.945746826Z", - "type":"INITIAL" - } -} -{ - "result":{ - "value":{ - "key":{ - "label":"speed", - "value":"speed10Gbps", - "deviceId":"JPE14070534", - "interfaceId":"Ethernet2" - } - }, - "time":"2021-03-27T00:38:41.906241108Z", - "type":"INITIAL" - } -} -{ - "result":{ - "value":{ - "key":{ - "label":"name", - "value":"Ethernet2", - "deviceId":"JPE14070534", - "interfaceId":"Ethernet2" - } - }, - "time":"2021-03-27T00:38:41.906241108Z", - "type":"INITIAL" - } -} -``` - -Using `jq` to only print the list of 40Gbps interfaces: - -```bash -curl -sS -kX POST --header 'Accept: application/json' -b access_token=`cat token.tok` -d '{"partialEqFilter": [{"key":{"deviceId": "JPE14070534", "value":"speed40Gbps" }}]}' 'https://192.0.2.100/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' | jq '.result.value.key.interfaceId' -"Ethernet97" -"Ethernet98" -"Ethernet99" -"Ethernet100" -"Ethernet101" -"Ethernet102" -"Ethernet103" -"Ethernet104" -``` - -#### cvprac - -```python -def filter_interface_tag(client, dId=None, ifId=None, label=None, value=None): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' - payload = { - "partialEqFilter": [ - {"key": {"deviceId": dId, "interfaceId": ifId, "label": label, "value": value}} - ] - } - response = client.post(tag_url, data=payload) - return response - -print(filter_interface_tag(clnt, dId="JPE14070534", value="speed40Gbps")) -``` - -#### python requests - -```python -def filter_interface_tag(dId=None, ifId=None, label=None, value=None): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' - payload = { - "partialEqFilter": [ - {"key": {"deviceId": dId, "interfaceId": ifId, "label": label, "value": value}} - ] - } - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.post(url, headers=head, data=json.dumps(payload), verify=False) - return response.text - -print(filter_interface_tag(dId="JPE14070534", value="speed40Gbps")) -``` - -### Get all tags for an interface of a device - -#### curl - -```bash -curl -sS -kX POST --header 'Accept: application/json' -b access_token=`cat token.tok` -d '{"partialEqFilter": [{"key":{"deviceId": "JPE14070534", "interfaceId": "Ethernet1"}}]}' 'https://192.0.2.100/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' -``` - -Result: - -```python -{ - "result": { - "value": { - "key": { - "label": "name", - "value": "Ethernet1", - "deviceId": "JPE14070534", - "interfaceId": "Ethernet1" - } - }, - "time": "2021-03-27T00:38:41.945746826Z", - "type": "INITIAL" - } -} -{ - "result": { - "value": { - "key": { - "label": "speed", - "value": "speed1Gbps", - "deviceId": "JPE14070534", - "interfaceId": "Ethernet1" - } - }, - "time": "2021-03-30T18:33:18.639842067Z", - "type": "INITIAL" - } -} -``` - -#### cvprac - -```python -print(filter_interface_tag(clnt, dId="JPE14070534", ifId="Ethernet1")) -``` - -#### python requests - -```python -print(filter_interface_tag(dId="JPE14070534", ifId="Ethernet1")) -``` - -### Get all interfaces that have a specific tag assigned - -#### curl - -```bash -curl -sS -kX POST --header 'Accept: application/json' -b access_token=`cat token.tok` -d '{"partialEqFilter": [{"key":{"deviceId": "JPE14070534", "label":"lldp_hostname" }}]}' 'https://192.0.2.100/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' | jq '.result.value.key.interfaceId' - -"Ethernet2" -``` - -#### cvprac - -```python -print(filter_interface_tag(clnt, dId="JPE14070534", label="lldp_hostname")) -``` - -#### python requests - -```python -print(filter_interface_tag(dId="JPE14070534", label="lldp_hostname")) -``` - -### Get all interfaces that have a tag with a specific value on a device - -#### curl - -```bash -curl -sS -kX POST --header 'Accept: application/json' -b access_token=`cat token.tok` -d '{"partialEqFilter": [{"key":{"deviceId": "JPE14070534", "value":"speed40Gbps" }}]}' 'https://192.0.2.100/api/resources/tag/v1/InterfaceTagAssignmentConfig/all' -``` - -Result: - -```python - "time":"2021-03-27T00:38:41.886763089Z", - "type":"INITIAL" - } -}{ - "result":{ - "value":{ - "key":{ - "label":"speed", - "value":"speed40Gbps", - "deviceId":"JPE14070534", - "interfaceId":"Ethernet101" - } - }, - "time":"2021-03-27T00:38:41.901936362Z", - "type":"INITIAL" - } -}{ - "result":{ - "value":{ - "key":{ - "label":"speed", - "value":"speed40Gbps", - "deviceId":"JPE14070534", - "interfaceId":"Ethernet102" - } - }, - "time":"2021-03-27T00:38:41.935420476Z", - "type":"INITIAL" - } -}{ - "result":{ - "value":{ - "key":{ - "label":"speed", - "value":"speed40Gbps", - "deviceId":"JPE14070534", - "interfaceId":"Ethernet103" - } - }, - "time":"2021-03-27T00:38:41.970652360Z", - "type":"INITIAL" - } -}{ - "result":{ - "value":{ - "key":{ - "label":"speed", - "value":"speed40Gbps", - "deviceId":"JPE14070534", - "interfaceId":"Ethernet104" - } - }, - "time":"2021-03-27T00:38:41.968041519Z", - "type":"INITIAL" - } -} -``` - -#### cvprac - -```python -print(filter_interface_tag(clnt, dId="JPE14070534", value="speed40Gbps")) -``` - -#### python requests - -```python -print(filter_interface_tag(dId="JPE14070534", value="speed40Gbps")) -``` - -### Create interface tag - -#### curl - -```bash -curl -sS -kX POST --header 'Accept: application/json' -b access_token=`cat token.tok` 'https://192.0.2.100/api/resources/tag/v1/InterfaceTagConfig' -d '{"key":{"label":"lldp_chassis","value":"50:08:00:0d:00:08"}}' -``` - -Result: - -```python -{"value":{"key":{"label":"lldp_chassis", "value":"50:08:00:0d:00:08"}}, "time":"2021-04-02T21:58:29.100209908Z"}% -``` - - -#### cvprac - -```python -def create_itag(client, label, value): - tag_url = '/api/resources/tag/v1/InterfaceTagConfig' - payload = {"key":{"label":label,"value":value}} - response = client.post(tag_url, data=payload) - return response - -create_itag(clnt, "lldp_chassis", "50:08:00:0d:00:38") -``` - -#### python requests - -```python -def create_itag(label, value): - tag_url = '/api/resources/tag/v1/InterfaceTagConfig' - payload = {"key":{"label":label,"value":value}} - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.post(url, headers=head, data=json.dumps(payload), verify=False) - return response - -create_itag("lldp_chassis", "50:08:00:0d:00:18") -``` - -### Assign interface tag - -#### curl - -```bash -curl -sS -kX POST --header 'Accept: application/json' -b access_token=`cat token.tok` 'https://192.0.2.100/api/resources/tag/v1/InterfaceTagAssignmentConfig' -d '{"key":{"label":"lldp_chassis", "value":"50:08:00:0d:00:08", "deviceId":"JPE14070534", "interfaceId": "Ethernet2"}}' -``` - -Result: - -```python -{"value":{"key":{"label":"lldp_chassis", "value":"50:08:00:0d:00:08", "deviceId":"JPE14070534", "interfaceId":"Ethernet2"}}, "time":"2021-04-02T22:00:29.492449919Z"}% -``` - -#### cvprac - -```python -def assign_itag(client, dId, ifId, label, value): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig' - payload = {"key":{"label":label, "value":value, "deviceId": dId, "interfaceId": ifId}} - response = client.post(tag_url, data=payload) - return response - -assign_itag(clnt, "JPE14070534", "Ethernet4", "lldp_chassis", "50:08:00:0d:00:38") -``` - -#### python requests - -```python -def assign_itag(dId, ifId, label, value): - tag_url = '/api/resources/tag/v1/InterfaceTagAssignmentConfig' - payload = {"key":{"label":label, "value":value, "deviceId": dId, "interfaceId": ifId}} - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.post(url, headers=head, data=json.dumps(payload), verify=False) - return response - -assign_itag("JPE14070534", "Ethernet3", "lldp_chassis", "50:08:00:0d:00:48") -``` - -### Create device tag - -#### curl - -```bash -curl -sS -kX POST --header 'Accept: application/json' -b access_token=`cat token.tok` 'https://192.0.2.100/api/resources/tag/v1/DeviceTagConfig' -d '{"key":{"label":"topology_hint_pod", "value":"ire-pod10"}}' -``` - -Result: - -```python -{"value":{"key":{"label":"topology_hint_pod", "value":"ire-pod10"}}, "time":"2021-04-02T21:55:03.147265316Z"}% -``` - -#### cvprac - -```python -def create_dtag(client, label, value): - tag_url = '/api/resources/tag/v1/DeviceTagConfig' - payload = {"key":{"label":label,"value":value}} - response = client.post(tag_url, data=payload) - return response - -create_dtag(clnt, "topology_hint_pod", "ire-pod11") -``` - -#### python requests - -```python -def create_dtag(label, value): - tag_url = '/api/resources/tag/v1/DeviceTagConfig' - payload = {"key":{"label":label, "value":value}} - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.post(url, headers=head, data=json.dumps(payload), verify=False) - return response - -create_dtag("topology_hint_pod", "ire-pod11") -``` - -### Assign device tag - -#### curl - -```bash -curl -sS -kX POST --header 'Accept: application/json' -b access_token=`cat token.tok` 'https://192.0.2.100/api/resources/tag/v1/DeviceTagAssignmentConfig' -d '{"key":{"label":"topology_hint_pod", "value":"ire-pod10","deviceId":"JPE14070534"}}' -``` - -Result: - -```python -{"value":{"key":{"label":"topology_hint_pod", "value":"ire-pod10", "deviceId":"JPE14070534"}}, "time":"2021-04-02T21:56:24.575813791Z"}% -``` - -#### cvprac - -```python -def assign_dtag(client, dId, label, value): - tag_url = '/api/resources/tag/v1/DeviceTagAssignmentConfig' - payload = {"key":{"label":label, "value":value, "deviceId": dId}} - response = client.post(tag_url, data=payload) - return response - -assign_dtag(clnt, "JPE14070534", "topology_hint_pod", "ire-pod11" ) -``` - -#### python requests - -```python -def assign_dtag(dId, label, value): - tag_url = '/api/resources/tag/v1/DeviceTagAssignmentConfig' - payload = {"key":{"label":label, "value":value, "deviceId": dId}} - url = cvp_url + tag_url - head = {'Authorization': 'Bearer {}'.format(token)} - response = requests.post(url, headers=head, data=json.dumps(payload), verify=False) - return response - -assign_dtag("JPE14070534", "topology_hint_pod", "ire-pod11") -``` - ## Tag.v2 The Tag.v2 API is a workspace-aware resource APIs, meaning all changes must be done within a workspace.