예제 #1
0
 def attachment_vif(self, vif_uuid, hypervisor=None):
     logger.info("Attaching VIF %s" % vif_uuid)
     self["vif_uuid"] = vif_uuid
     self["type"] = "VifAttachment"
     uri = common.genuri("lswitch", self.lswitch_uuid, "lport", self.uuid,
                         "attachment")
     return super(LSwitchPort, self)._action('PUT', uri)
예제 #2
0
 def attachment_vif(self, vif_uuid, hypervisor=None):
     logger.info("Attaching VIF %s" % vif_uuid)
     self["vif_uuid"] = vif_uuid
     self["type"] = "VifAttachment"
     uri = common.genuri("lswitch", self.lswitch_uuid, "lport", self.uuid,
                         "attachment")
     return super(LSwitchPort, self)._action('PUT', uri)
예제 #3
0
파일: core.py 프로젝트: Cerberus98/aiclib
 def _login(self, username, password):
     fields = {'username': username, 'password': password}
     r = self._conn.request_encode_body('POST', common.genuri('login'),
                                        fields=fields, timeout=self.timeout,
                                        encode_multipart=False)
     if self._iserror(r):
         logger.error("Need to handle error")
         return False
     else:
         self.authkey = r.headers['set-cookie']
         logger.info("Authorized (%s)" % (self.authkey))
     self.authenticated = True
     return True
예제 #4
0
 def _login(self, username, password, uri=None):
     fields = {'username': username, 'password': password}
     if not uri:
         uri = common.genuri('login')
     r = self._conn.request_encode_body('POST', uri,
                                        fields=fields, timeout=self.timeout,
                                        encode_multipart=False,
                                        headers=None, retries=0)
     if self._iserror(r):
         return False
     else:
         self.authkey = r.headers['set-cookie']
     self.authenticated = True
     return True
예제 #5
0
파일: core.py 프로젝트: kilogram/aiclib
 def _login(self, username, password):
     fields = {'username': username, 'password': password}
     r = self._conn.request_encode_body('POST',
                                        common.genuri('login'),
                                        fields=fields,
                                        encode_multipart=False)
     if self._iserror(r):
         logger.error("Need to handle error")
         return False
     else:
         self.authkey = r.headers['set-cookie']
         logger.info("Authorized (%s)" % (self.authkey))
     self.authenticated = True
     return True
예제 #6
0
파일: nvp.py 프로젝트: kshortwindham/aiclib
 def get_method_uris(self):
     uri = common.genuri("doc", "method")
     return super(NVPFunction, self)._action('GET', uri)
예제 #7
0
 def status(self):
     """Status (verb) will return the logical port's status"""
     uri = common.genuri('lswitch', self.lswitch_uuid, 'lport', self.uuid,
                         'status')
     return super(LSwitchPort, self)._action("GET", uri)
예제 #8
0
 def query(self):
     """Returns the query object for logical switch ports
     """
     uri = common.genuri('lswitch', self.lswitch_uuid, 'lport')
     queryobject = nvpquery.LSwitchPortQuery(self.connection, uri)
     return queryobject
예제 #9
0
 def delete(self):
     """Delete (verb) will delete the logical switch
     Requires a UUID set at the object.
     """
     uri = common.genuri('lswitch', self.uuid)
     return super(LSwitch, self)._action('DELETE', uri)
예제 #10
0
 def read(self):
     """Read (verb) will read the transport zone config"""
     uri = common.genuri('transport-zone', self.uuid)
     return super(TransportZone, self)._action('GET', uri)
예제 #11
0
 def delete(self):
     """Delete (verb) will delete the Gateway Service"""
     uri = common.genuri('gateway-service', self.uuid)
     return super(GatewayService, self)._action('DELETE', uri)
예제 #12
0
 def delete(self):
     """Delete (verb) will delete the security profile"""
     uri = common.genuri('security-profile', self.uuid)
     return super(SecurityProfile, self)._action('DELETE', uri)
예제 #13
0
 def read(self):
     """Read (verb) will read the security profile config"""
     uri = common.genuri('security-profile', self.uuid)
     return super(SecurityProfile, self)._action('GET', uri)
예제 #14
0
 def update(self):
     """Update (verb) will update the security profile"""
     uri = common.genuri('security-profile', self.uuid)
     return super(SecurityProfile, self)._action('PUT', uri)
예제 #15
0
 def query(self):
     """Returns the query object for the security profile"""
     uri = common.genuri('security-profile')
     queryobject = nvpquery.SecurityProfileQuery(self.connection, uri)
     return queryobject
예제 #16
0
 def update(self):
     """Update (verb) will update the logical switch port
     Requires a UUID set at the object.
     """
     uri = common.genuri('lswitch', self.lswitch_uuid, 'lport', self.uuid)
     return super(LSwitchPort, self)._action('PUT', uri)
예제 #17
0
 def update(self):
     """Update (verb) will update the Gateway Service"""
     uri = common.genuri('gateway-service', self.uuid)
     return super(GatewayService, self)._action('PUT', uri)
예제 #18
0
 def status(self):
     """Will get the status of the transport node"""
     uri = common.genuri('transport-node', self.uuid, 'status')
     return super(TransportNode, self)._action('GET', uri)
예제 #19
0
 def query(self):
     """Returns the query object for the transport zone"""
     uri = common.genuri('transport-zone')
     queryobject = nvpquery.TransportZoneQuery(self.connection, uri)
     return queryobject
예제 #20
0
 def create(self):
     """Create (verb) will create the Gateway Service"""
     uri = common.genuri('gateway-service')
     return super(GatewayService, self)._action('POST', uri)
예제 #21
0
 def query(self):
     """Returns the query object for logical switches
     """
     queryobject = nvpquery.LSwitchQuery(self.connection,
                                         common.genuri('lswitch'))
     return queryobject
예제 #22
0
 def query(self):
     """Returns the query object for the Gateway Service"""
     uri = common.genuri('gateway-service')
     queryobject = nvpquery.GatewayServiceQuery(self.connection, uri)
     return queryobject
예제 #23
0
 def read(self):
     """Read (verb) will return the configuration of the logical switch
     Requires a UUID set at the object.
     """
     uri = common.genuri('lswitch', self.uuid)
     return super(LSwitch, self)._action('GET', uri)
예제 #24
0
 def update(self):
     """Update (verb) will update the Gateway Service"""
     uri = common.genuri('gateway-service', self.uuid)
     return super(GatewayService, self)._action('PUT', uri)
예제 #25
0
 def statistics(self):
     """statistics (verb) will return the port's stats"""
     uri = common.genuri('lswitch', self.lswitch_uuid, 'lport', self.uuid,
                         'statistic')
     return super(LSwitchPort, self)._action("GET", uri)
예제 #26
0
 def read(self):
     """Read (verb) will read the Gateway Service config"""
     uri = common.genuri('gateway-service', self.uuid)
     return super(GatewayService, self)._action('GET', uri)
예제 #27
0
 def update(self):
     """Update (verb) will update the logical switch port
     Requires a UUID set at the object.
     """
     uri = common.genuri('lswitch', self.lswitch_uuid, 'lport', self.uuid)
     return super(LSwitchPort, self)._action('PUT', uri)
예제 #28
0
 def delete(self):
     """Delete (verb) will delete the Gateway Service"""
     uri = common.genuri('gateway-service', self.uuid)
     return super(GatewayService, self)._action('DELETE', uri)
예제 #29
0
파일: nvp.py 프로젝트: kshortwindham/aiclib
 def get_schemas(self):
     uri = common.genuri("schema")
     return super(NVPFunction, self)._action('GET', uri)
예제 #30
0
 def create(self):
     """Create (verb) will create the transport zone"""
     uri = common.genuri('transport-zone')
     return super(TransportZone, self)._action('POST', uri)
예제 #31
0
 def delete(self):
     """Delete (verb) will delete the logical port.
     Requires a UUID set at the object"""
     uri = common.genuri('lswitch', self.lswitch_uuid, 'lport', self.uuid)
     return super(LSwitchPort, self)._action("DELETE", uri)
예제 #32
0
 def query(self):
     """Returns the query object for the transport zone"""
     uri = common.genuri('transport-zone')
     queryobject = nvpquery.TransportZoneQuery(self.connection, uri)
     return queryobject
예제 #33
0
 def query(self):
     """Returns the query object for the Gateway Service"""
     uri = common.genuri('gateway-service')
     queryobject = nvpquery.GatewayServiceQuery(self.connection, uri)
     return queryobject
예제 #34
0
 def update(self):
     """Update (verb) will update the transport zone"""
     uri = common.genuri('transport-zone', self.uuid)
     return super(TransportZone, self)._action('PUT', uri)
예제 #35
0
 def read(self):
     """Read (verb) will read the Gateway Service config"""
     uri = common.genuri('gateway-service', self.uuid)
     return super(GatewayService, self)._action('GET', uri)
예제 #36
0
 def read(self):
     """Read (verb) will read the transport zone config"""
     uri = common.genuri('transport-zone', self.uuid)
     return super(TransportZone, self)._action('GET', uri)
예제 #37
0
 def create(self):
     """Create (verb) will create the transport zone"""
     uri = common.genuri('transport-zone')
     return super(TransportZone, self)._action('POST', uri)
예제 #38
0
 def delete(self):
     """Delete (verb) will delete the transport zone"""
     uri = common.genuri('transport-zone', self.uuid)
     return super(TransportZone, self)._action('DELETE', uri)
예제 #39
0
 def update(self):
     """Update (verb) will update the transport zone"""
     uri = common.genuri('transport-zone', self.uuid)
     return super(TransportZone, self)._action('PUT', uri)
예제 #40
0
 def query(self):
     """Returns the query object for logical switches
     """
     queryobject = nvpquery.LSwitchQuery(self.connection,
                                         common.genuri('lswitch'))
     return queryobject
예제 #41
0
 def delete(self):
     """Delete (verb) will delete the transport zone"""
     uri = common.genuri('transport-zone', self.uuid)
     return super(TransportZone, self)._action('DELETE', uri)
예제 #42
0
 def create(self):
     """Create (verb) will create the logical switch
     """
     return super(LSwitch, self)._action('POST', common.genuri('lswitch'))
예제 #43
0
 def create(self):
     """Create (verb) will create the logical switch
     """
     return super(LSwitch, self)._action('POST', common.genuri('lswitch'))
예제 #44
0
 def delete(self):
     """Delete (verb) will delete the logical switch
     Requires a UUID set at the object.
     """
     uri = common.genuri('lswitch', self.uuid)
     return super(LSwitch, self)._action('DELETE', uri)
예제 #45
0
 def status(self):
     """Status (verb) will return the network status of the logical switch
     Requires a UUID set at the object.
     """
     uri = common.genuri('lswitch', self.uuid, 'status')
     return super(LSwitch, self)._action('GET', uri)
예제 #46
0
 def status(self):
     """Status (verb) will return the network status of the logical switch
     Requires a UUID set at the object.
     """
     uri = common.genuri('lswitch', self.uuid, 'status')
     return super(LSwitch, self)._action('GET', uri)
예제 #47
0
 def create(self):
     """Create (verb) will create the logical port on the switch"""
     uri = common.genuri('lswitch', self.lswitch_uuid, 'lport')
     return super(LSwitchPort, self)._action("POST", uri)
예제 #48
0
 def read(self):
     """Read (verb) will return the configuration of the logical switch
     Requires a UUID set at the object.
     """
     uri = common.genuri('lswitch', self.uuid)
     return super(LSwitch, self)._action('GET', uri)
예제 #49
0
 def read(self):
     """Read (verb) will read the logical port's configuration"""
     uri = common.genuri('lswitch', self.lswitch_uuid, 'lport', self.uuid)
     return super(LSwitchPort, self)._action("GET", uri)
예제 #50
0
 def create(self):
     """Create (verb) will create the logical port on the switch"""
     uri = common.genuri('lswitch', self.lswitch_uuid, 'lport')
     return super(LSwitchPort, self)._action("POST", uri)
예제 #51
0
 def clear_statistics(self):
     """clear_statistics (verb) will clear the port's stats"""
     uri = common.genuri('lswitch', self.lswitch_uuid, 'lport', self.uuid,
                         'statistic')
     return super(LSwitchPort, self)._action("DELETE", uri)
예제 #52
0
 def query(self):
     """Returns the query object for logical switch ports
     """
     uri = common.genuri('lswitch', self.lswitch_uuid, 'lport')
     queryobject = nvpquery.LSwitchPortQuery(self.connection, uri)
     return queryobject
예제 #53
0
 def delete(self):
     """Delete (verb) will delete the logical port.
     Requires a UUID set at the object"""
     uri = common.genuri('lswitch', self.lswitch_uuid, 'lport', self.uuid)
     return super(LSwitchPort, self)._action("DELETE", uri)
예제 #54
0
 def read(self):
     """Read (verb) will read the logical port's configuration"""
     uri = common.genuri('lswitch', self.lswitch_uuid, 'lport', self.uuid)
     return super(LSwitchPort, self)._action("GET", uri)
예제 #55
0
파일: nvp.py 프로젝트: kshortwindham/aiclib
 def logout(self):
     uri = common.genuri("logout")
     return super(NVPFunction, self)._action('GET', uri)
예제 #56
0
 def statistics(self):
     """statistics (verb) will return the port's stats"""
     uri = common.genuri('lswitch', self.lswitch_uuid, 'lport', self.uuid,
                         'statistic')
     return super(LSwitchPort, self)._action("GET", uri)
예제 #57
0
파일: nvp.py 프로젝트: kshortwindham/aiclib
 def read_method(self, method_name):
     uri = common.genuri("doc", "method", method_name)
     return super(NVPFunction, self)._action('GET', uri)
예제 #58
0
 def clear_statistics(self):
     """clear_statistics (verb) will clear the port's stats"""
     uri = common.genuri('lswitch', self.lswitch_uuid, 'lport', self.uuid,
                         'statistic')
     return super(LSwitchPort, self)._action("DELETE", uri)
예제 #59
0
파일: nvp.py 프로젝트: kshortwindham/aiclib
 def read_schema(self, schema_name):
     uri = common.genuri("schema", schema_name)
     return super(NVPFunction, self)._action('GET', uri)
예제 #60
0
 def status(self):
     """Status (verb) will return the logical port's status"""
     uri = common.genuri('lswitch', self.lswitch_uuid, 'lport', self.uuid,
                         'status')
     return super(LSwitchPort, self)._action("GET", uri)