pyixapi 0.2.5__tar.gz → 0.2.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyixapi
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: Python API client library for IX-API
5
5
  License: Apache-2.0
6
6
  Author: Guillaume Mazoyer
@@ -29,7 +29,7 @@ from pyixapi.models import (
29
29
  RoleAssignment,
30
30
  )
31
31
 
32
- __version__ = "0.2.5"
32
+ __version__ = "0.2.6"
33
33
 
34
34
 
35
35
  class API(object):
@@ -67,17 +67,27 @@ class API(object):
67
67
  self.facilities = Endpoint(self, "facilities", model=Facility)
68
68
  self.ips = Endpoint(self, "ips", model=IP)
69
69
  self.macs = Endpoint(self, "macs", model=MAC)
70
- self.network_feature_configs = Endpoint(self, "network-feature-configs", model=NetworkFeatureConfig)
70
+ self.network_feature_configs = Endpoint(
71
+ self, "network-feature-configs", model=NetworkFeatureConfig
72
+ )
71
73
  self.network_features = Endpoint(self, "network-features", model=NetworkFeature)
72
- self.network_service_configs = Endpoint(self, "network-service-configs", model=NetworkServiceConfig)
74
+ self.network_service_configs = Endpoint(
75
+ self, "network-service-configs", model=NetworkServiceConfig
76
+ )
73
77
  self.network_services = Endpoint(self, "network-services", model=NetworkService)
74
78
  self.pops = Endpoint(self, "pops", model=PoP)
75
79
  # Version 2+
76
- self.member_joining_rules = Endpoint(self, "member-joining-rules", model=MemberJoiningRule)
80
+ self.member_joining_rules = Endpoint(
81
+ self, "member-joining-rules", model=MemberJoiningRule
82
+ )
77
83
  self.metro_areas = Endpoint(self, "metro-areas", model=MetroArea)
78
- self.metro_area_networks = Endpoint(self, "metro-area-networks", model=MetroAreaNetwork)
84
+ self.metro_area_networks = Endpoint(
85
+ self, "metro-area-networks", model=MetroAreaNetwork
86
+ )
79
87
  self.ports = Endpoint(self, "ports", model=Port)
80
- self.port_reservations = Endpoint(self, "port-reservations", model=PortReservation)
88
+ self.port_reservations = Endpoint(
89
+ self, "port-reservations", model=PortReservation
90
+ )
81
91
  self.roles = Endpoint(self, "roles", model=Role)
82
92
  self.role_assignments = Endpoint(self, "role-assignments", model=RoleAssignment)
83
93
 
@@ -96,7 +106,9 @@ class API(object):
96
106
 
97
107
  @property
98
108
  def accounts(self):
99
- return Endpoint(self, "customers" if self.version == 1 else "accounts", model=Account)
109
+ return Endpoint(
110
+ self, "customers" if self.version == 1 else "accounts", model=Account
111
+ )
100
112
 
101
113
  @property
102
114
  def product_offerings(self):
@@ -127,6 +127,9 @@ class Request(object):
127
127
  if self.token:
128
128
  headers["Authorization"] = f"Bearer {self.token}"
129
129
 
130
+ if self.user_agent:
131
+ headers["User-Agent"] = self.user_agent
132
+
130
133
  params = {}
131
134
  if not url_override:
132
135
  if self.filters:
@@ -139,7 +142,6 @@ class Request(object):
139
142
  headers=headers,
140
143
  params=params,
141
144
  json=data,
142
- user_agent=self.user_agent,
143
145
  proxies=self.proxies,
144
146
  )
145
147
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pyixapi"
3
- version = "0.2.5"
3
+ version = "0.2.6"
4
4
  description = "Python API client library for IX-API"
5
5
  authors = [{ name = "Guillaume Mazoyer", email = "oss@mazoyer.eu" }]
6
6
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes