コード例 #1
0
ファイル: test_switch.py プロジェクト: BruceZu/compass-core
 def test_del_switch_machine(self):
     switch.add_switch_machine(
         1,
         mac='28:6e:d4:46:c4:25',
         port='1',
         user=self.user_object,
     )
     switch.del_switch_machine(
         1,
         1,
         user=self.user_object,
     )
     del_switch_machine = switch.list_switch_machines(
         1,
         user=self.user_object,
     )
     self.assertEqual([], del_switch_machine)
コード例 #2
0
 def test_del_switch_machine(self):
     switch.add_switch_machine(
         1,
         mac='28:6e:d4:46:c4:25',
         port='1',
         user=self.user_object,
     )
     switch.del_switch_machine(
         1,
         1,
         user=self.user_object,
     )
     del_switch_machine = switch.list_switch_machines(
         1,
         user=self.user_object,
     )
     self.assertEqual([], del_switch_machine)
コード例 #3
0
ファイル: api.py プロジェクト: kidchang/compassv2-api
def delete_switch_machine(switch_id, machine_id):
    """Delete switch machine."""
    data = _get_request_data()
    return utils.make_json_response(
        200,
        switch_api.del_switch_machine(
            current_user, switch_id, machine_id, **data
        )
    )