projects
/
osm
/
RO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 2316: Fix for Unable to do vertical scaling when VM is in Shutdown state
[osm/RO.git]
/
RO-SDN-juniper_contrail
/
osm_rosdn_juniper_contrail
/
sdn_api.py
diff --git
a/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_api.py
b/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_api.py
index
0494393
..
7e344f4
100644
(file)
--- a/
RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_api.py
+++ b/
RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_api.py
@@
-14,8
+14,8
@@
# License for the specific language governing permissions and limitations
# under the License.
# License for the specific language governing permissions and limitations
# under the License.
-import logging
import json
import json
+import logging
from osm_ro_plugin.sdnconn import SdnConnectorError
from osm_rosdn_juniper_contrail.rest_lib import ContrailHttp
from osm_ro_plugin.sdnconn import SdnConnectorError
from osm_rosdn_juniper_contrail.rest_lib import ContrailHttp
@@
-26,7
+26,7
@@
from osm_rosdn_juniper_contrail.rest_lib import NotFound
class UnderlayApi:
class UnderlayApi:
- """
Class with CRUD operations for the underlay API
"""
+ """
Class with CRUD operations for the underlay API
"""
def __init__(self, url, config=None, user=None, password=None, logger=None):
self.logger = logger or logging.getLogger("ro.sdn.junipercontrail.sdnapi")
def __init__(self, url, config=None, user=None, password=None, logger=None):
self.logger = logger or logging.getLogger("ro.sdn.junipercontrail.sdnapi")
@@
-54,6
+54,7
@@
class UnderlayApi:
self.domain = config.get("domain")
self.asn = config.get("asn")
self.fabric = config.get("fabric")
self.domain = config.get("domain")
self.asn = config.get("asn")
self.fabric = config.get("fabric")
+ self.verify = config.get("verify")
# Init http headers for all requests
self.http_header = {"Content-Type": "application/json"}
# Init http headers for all requests
self.http_header = {"Content-Type": "application/json"}
@@
-90,7
+91,7
@@
class UnderlayApi:
# Init http lib
auth_info = {"auth_url": self.auth_url, "auth_dict": auth_dict}
# Init http lib
auth_info = {"auth_url": self.auth_url, "auth_dict": auth_dict}
- self.http = ContrailHttp(auth_info, self.logger)
+ self.http = ContrailHttp(auth_info, self.logger
, self.verify
)
def check_auth(self):
response = self.http.get_cmd(url=self.auth_url, headers=self.http_header)
def check_auth(self):
response = self.http.get_cmd(url=self.auth_url, headers=self.http_header)
@@
-196,9
+197,6
@@
class UnderlayApi:
"virtual-network"
)
"virtual-network"
)
- def get_virtual_networks(self):
- return self.get_all_by_type("virtual-networks")
-
def get_virtual_network(self, network_id):
return self.get_by_uuid("virtual-network", network_id)
def get_virtual_network(self, network_id):
return self.get_by_uuid("virtual-network", network_id)
@@
-235,12
+233,6
@@
class UnderlayApi:
"virtual-port-group"
)
"virtual-port-group"
)
- def get_vpgs(self):
- return self.get_all_by_type(self.controller_url, "virtual-port-groups")
-
- def get_vpg(self, vpg_id):
- return self.get_by_uuid(self.controller_url, "virtual-port-group", vpg_id)
-
def get_vpg_by_name(self, vpg_name):
fq_name = ["default-global-system-config", self.fabric, vpg_name]
def get_vpg_by_name(self, vpg_name):
fq_name = ["default-global-system-config", self.fabric, vpg_name]
@@
-305,11
+297,6
@@
class UnderlayApi:
"virtual-machine-interface"
)
"virtual-machine-interface"
)
- def get_vmi(self, vmi_uuid):
- return self.get_by_uuid(
- self.controller_url, "virtual-machine-interface", vmi_uuid
- )
-
def delete_vmi(self, uuid):
self.logger.debug("delete vmi uuid: {}".format(uuid))
self.delete_by_uuid(self.controller_url, "virtual-machine-interface", uuid)
def delete_vmi(self, uuid):
self.logger.debug("delete vmi uuid: {}".format(uuid))
self.delete_by_uuid(self.controller_url, "virtual-machine-interface", uuid)