def swift_storage_relation_departed():
    ports = [config('object-server-port'),
             config('container-server-port'),
             config('account-server-port')]
    removed_client = ingress_address()
    if removed_client:
        for port in ports:
            revoke_access(removed_client, port)
Ejemplo n.º 2
0
 def test_revoke_access(self):
     addr = '10.1.1.1'
     port = '80'
     self.ufw.revoke_access = MagicMock()
     swift_utils.revoke_access(addr, port)
     self.ufw.revoke_access.assert_called_with(addr, port=port, proto='tcp')
 def test_revoke_access(self):
     addr = '10.1.1.1'
     port = '80'
     self.ufw.revoke_access = MagicMock()
     swift_utils.revoke_access(addr, port)
     self.ufw.revoke_access.assert_called_with(addr, port=port, proto='tcp')