Skip to content

Commit

Permalink
arista: remove tag.v1
Browse files Browse the repository at this point in the history
XXX_SKIP_CHECK_BREAKING

Change-Id: I474c5c102ffcbecd77f6c451fd61d64076e1cf10
  • Loading branch information
thesalmontapes committed Jun 13, 2024
1 parent 56ae005 commit 6401794
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 4,153 deletions.
597 changes: 0 additions & 597 deletions arista/tag.v1/services.gen.proto

This file was deleted.

2,500 changes: 0 additions & 2,500 deletions arista/tag.v1/services.gen.swagger.json

This file was deleted.

58 changes: 0 additions & 58 deletions arista/tag.v1/tag-changelog.yaml

This file was deleted.

120 changes: 0 additions & 120 deletions arista/tag.v1/tag.proto

This file was deleted.

1 change: 0 additions & 1 deletion buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ breaking:
- FILE
ignore:
- buf.yaml
- arista/tag.v1
- arista/alert.v1
- arista/bugexposure.v1
- arista/changecontrol.v1
Expand Down
79 changes: 0 additions & 79 deletions docs/content/examples/REST/_index.files/examples_cvprac.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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" )



90 changes: 0 additions & 90 deletions docs/content/examples/REST/_index.files/examples_python_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
Loading

0 comments on commit 6401794

Please sign in to comment.