text:
using namespace boost::assign;
std::string eth_itf;

void RouterIdDepInit(Agent *agent) {
}

static void WalkDone(DBTableBase *base)
{
    return;
}

static void ValidateSandeshResponse(Sandesh *sandesh, vector<int> &result) {
    //TBD
    //Validate the response by the expectation
}

class RouteTest : public ::testing::Test {
public:
    static void SetTunnelType(TunnelType::Type type) {
        TunnelType::SetDefaultType(type);
        type_ = type;
    }
    static TunnelType::Type GetTunnelType() {
        return type_;
    }

protected:
    RouteTest() : vrf_name_("vrf1"), eth_name_(eth_itf) {
        default_dest_ip_ = Ip4Address::from_string("0.0.0.0");
        agent_ =Agent::GetInstance();

        if (agent_->router_id_configured()) {
            vhost_ip_ = agent_->router_id();
        } else {
            vhost_ip_ = Ip4Address::from_string("10.1.1.10");
        }
        server1_ip_ = Ip4Address::from_string("10.1.1.11");

        strcpy(local_vm_mac_str_, "00:00:01:01:01:10");
        local_vm_mac_ = MacAddress::FromString(local_vm_mac_str_);
        strcpy(local_vm_ip4_str_, "1.1.1.10");
        local_vm_ip4_ = Ip4Address::from_string(local_vm_ip4_str_);
        strcpy(local_vm_ip6_str_, "fdff::10");
        local_vm_ip6_ = Ip6Address::from_string(local_vm_ip6_str_);

        strcpy(flood_mac_str_, "ff:ff:ff:ff:ff:ff");
        flood_mac_ = MacAddress::FromString(flood_mac_str_);
        strcpy(remote_vm_mac_str_, "00:00:01:01:01:11");
        remote_vm_mac_ = MacAddress::FromString(remote_vm_mac_str_);
        strcpy(remote_vm_ip4_str_, "1.1.1.11");
        remote_vm_ip4_ = Ip4Address::from_string(remote_vm_ip4_str_);
        strcpy(remote_vm_ip6_str_, "fdff::11");
        remote_vm_ip6_ = Ip6Address::from_string(remote_vm_ip6_str_);

        strcpy(local_vm_mac_2_str_, "00:00:02:02:02:10");
        local_vm_mac_2_ = MacAddress::FromString(local_vm_mac_2_str_);
        strcpy(local_vm_ip4_2_str_, "2.2.2.10");
        local_vm_ip4_2_ = Ip4Address::from_string(local_vm_ip4_2_str_);
        strcpy(local_vm_ip6_2_str_, "fdff::20");
        local_vm_ip6_2_ = Ip6Address::from_string(local_vm_ip6_2_str_);

        strcpy(remote_vm_mac_2_str_, "00:00:02:02:02:11");
        remote_vm_mac_2_ = MacAddress::FromString(remote_vm_mac_2_str_);
        strcpy(remote_vm_ip4_2_str_, "2.2.2.11");
        remote_vm_ip4_2_ = Ip4Address::from_string(remote_vm_ip4_2_str_);
        strcpy(remote_vm_ip6_2_str_, "fdff::21");
        remote_vm_ip6_2_ = Ip6Address::from_string(remote_vm_ip6_2_str_);
    }

    ~RouteTest() {
    }

    virtual void SetUp() {
        client->Reset();
        //Create a VRF
        VrfAddReq(vrf_name_.c_str());
        PhysicalInterface::CreateReq(agent_->interface_table(),
                                eth_name_,
                                agent_->fabric_vrf_name(),
                                PhysicalInterface::FABRIC,
                                PhysicalInterface::ETHERNET, false, nil_uuid(),
                                Ip4Address(0), Interface::TRANSPORT_ETHERNET);
        AddResolveRoute(server1_ip_, 24);
        client->WaitForIdle();
    }

    virtual void TearDown() {
        VrfDelReq(vrf_name_.c_str());
        client->WaitForIdle();
        WAIT_FOR(100, 100, (VrfFind(vrf_name_.c_str()) != true));
    }

    void AddRemoteVmRoute(MacAddress &remote_vm_mac, const IpAddress &ip_addr,
                          const Ip4Address &server_ip,
                          uint32_t label, TunnelType::TypeBmap bmap) {
        //Use any other peer than localvmpeer
        BridgeTunnelRouteAdd(agent_->local_peer(), vrf_name_, bmap, server_ip,
                             label, remote_vm_mac, ip_addr, 32);
        client->WaitForIdle();
    }

    void AddResolveRoute(const Ip4Address &server_ip, uint32_t plen) {
        InetInterfaceKey vhost_key(agent_->vhost_interface()->name());
        agent_->fabric_inet4_unicast_table()->AddResolveRoute(
                agent_->local_peer(),
                agent_->fabric_vrf_name(), server_ip, plen, vhost_key,
                0, false, "", SecurityGroupList());
        client->WaitForIdle();
    }

    void DeleteBridgeRoute(const Peer *peer, const std::string &vrf_name,
                     MacAddress &remote_vm_mac, const IpAddress &ip_addr) {
        const BgpPeer *bgp_peer = dynamic_cast<const BgpPeer *>(peer);
        EvpnAgentRouteTable::DeleteReq(peer, vrf_name_, remote_vm_mac,
                                        ip_addr, 0,
                                        ((bgp_peer == NULL) ? NULL :
                                         (new ControllerVmRoute(bgp_peer))));
        client->WaitForIdle();
        //while (L2RouteFind(vrf_name, remote_vm_mac, ip_addr) == true) {
        //    client->WaitForIdle();
        //}
    }

    std::string vrf_name_;
    std::string eth_name_;
    Ip4Address  default_dest_ip_;

    char local_vm_mac_str_[100];
    MacAddress  local_vm_mac_;
    char local_vm_ip4_str_[100];
    Ip4Address  local_vm_ip4_;
    char local_vm_ip6_str_[100];
    IpAddress  local_vm_ip6_;

    char flood_mac_str_[100];
    MacAddress  flood_mac_;
    char remote_vm_mac_str_[100];
    MacAddress  remote_vm_mac_;
    char remote_vm_ip4_str_[100];
    Ip4Address  remote_vm_ip4_;
    char remote_vm_ip6_str_[100];
    IpAddress  remote_vm_ip6_;

    char local_vm_mac_2_str_[100];
    MacAddress  local_vm_mac_2_;
    char local_vm_ip4_2_str_[100];
    Ip4Address  local_vm_ip4_2_;
    char local_vm_ip6_2_str_[100];
    IpAddress  local_vm_ip6_2_;

    char remote_vm_mac_2_str_[100];
    MacAddress  remote_vm_mac_2_;
    char remote_vm_ip4_2_str_[100];
    Ip4Address  remote_vm_ip4_2_;
    char remote_vm_ip6_2_str_[100];
    IpAddress  remote_vm_ip6_2_;

    Ip4Address  vhost_ip_;
    Ip4Address  server1_ip_;
    Ip4Address  server2_ip_;

    static TunnelType::Type type_;
    Agent *agent_;
};
TunnelType::Type RouteTest::type_;

#if 0
TEST_F(RouteTest, EvpnStatusOff) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:01:01:01:10", 1, 1},
    };

    client->Reset();
    CreateVmportEnv(input, 1);
    client->WaitForIdle();

    EXPECT_TRUE(VmPortActive(input, 0));
    EXPECT_FALSE(L2RouteFind(vrf_name_, *local_vm_mac_));
    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();
    EXPECT_FALSE(VmPortFind(input, 0));
    client->WaitForIdle();
}
#endif

TEST_F(RouteTest, LocalVmRoute_1) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:01:01:01:10", 1, 1},
    };

    AddL2Vn("vn1", 1);
    AddVrf("vrf1");
    AddLink("virtual-network", "vn1", "routing-instance", "vrf1");
    client->WaitForIdle();
    client->Reset();
    CreateL2VmportEnv(input, 1);
    client->WaitForIdle();

    WAIT_FOR(1000, 100, (VmPortL2Active(input, 0) == true));
    MulticastGroupObject *obj =
        MulticastHandler::GetInstance()->FindFloodGroupObject("vrf1");
    EXPECT_TRUE(obj != NULL);
    WAIT_FOR(1000, 100,
             (L2RouteFind(vrf_name_, local_vm_mac_, local_vm_ip4_) == true));
    BridgeRouteEntry *rt = L2RouteGet(vrf_name_, local_vm_mac_, local_vm_ip4_);
    EXPECT_TRUE(rt->GetActiveNextHop() != NULL);
    const NextHop *nh = rt->GetActiveNextHop();
    EXPECT_TRUE(rt->dest_vn_name() == "vn1");
    uint32_t label = rt->GetActiveLabel();
    MplsLabelKey key(MplsLabel::MCAST_NH, label);
    MplsLabel *mpls =
        static_cast<MplsLabel *>(agent_->mpls_table()->Find(&key, true));

    EXPECT_TRUE(mpls->nexthop() == nh);
    const InterfaceNH *intf_nh = static_cast<const InterfaceNH *>(nh);
    EXPECT_TRUE(intf_nh->GetFlags() == InterfaceNHFlags::BRIDGE);

    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();

    WAIT_FOR(1000, 100,
             (L2RouteFind(vrf_name_, local_vm_mac_, local_vm_ip4_) == false));
    EXPECT_FALSE(VmPortFind(input, 0));
    client->WaitForIdle();
}

TEST_F(RouteTest, LocalVmRoute_2) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:01:01:01:10", 1, 1},
    };

    VxLanNetworkIdentifierMode(true);
    client->WaitForIdle();
    client->Reset();
    CreateVmportEnv(input, 1);
    client->WaitForIdle();

    WAIT_FOR(1000, 100, (VmPortActive(input, 0) == true));
    EXPECT_TRUE(L2RouteFind(vrf_name_, local_vm_mac_, local_vm_ip4_));
    BridgeRouteEntry *rt = L2RouteGet(vrf_name_, local_vm_mac_, local_vm_ip4_);
    EXPECT_TRUE(rt->GetActiveNextHop() != NULL);
    const NextHop *nh = rt->GetActiveNextHop();
    EXPECT_TRUE(rt->dest_vn_name() == "vn1");
    uint32_t label = rt->GetActiveLabel();
    MplsLabelKey key(MplsLabel::MCAST_NH, label);
    MplsLabel *mpls =
        static_cast<MplsLabel *>(agent_->mpls_table()->Find(&key, true));

    EXPECT_TRUE(mpls->nexthop() == nh);
    const InterfaceNH *intf_nh = static_cast<const InterfaceNH *>(nh);
    EXPECT_TRUE(intf_nh->GetFlags() == InterfaceNHFlags::BRIDGE);

    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();

    WAIT_FOR(1000, 100,
             (L2RouteFind(vrf_name_, local_vm_mac_, local_vm_ip4_) == false));
    EXPECT_FALSE(VmPortFind(input, 0));
    client->WaitForIdle();
}

TEST_F(RouteTest, Mpls_sandesh_check_with_l2route) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:01:01:01:10", 1, 1},
    };

    AddL2Vn("vn1", 1);
    AddVrf("vrf1");
    AddLink("virtual-network", "vn1", "routing-instance", "vrf1");
    client->WaitForIdle();
    client->Reset();
    CreateL2VmportEnv(input, 1);
    client->WaitForIdle();

    WAIT_FOR(1000, 100, (VmPortL2Active(input, 0) == true));
    MulticastGroupObject *obj =
        MulticastHandler::GetInstance()->FindFloodGroupObject("vrf1");
    EXPECT_TRUE(obj != NULL);
    EXPECT_TRUE(L2RouteFind(vrf_name_, local_vm_mac_, local_vm_ip4_));

    MplsReq *mpls_list_req = new MplsReq();
    std::vector<int> result = list_of(1);
    Sandesh::set_response_callback(boost::bind(ValidateSandeshResponse, _1,
                                               result));
    mpls_list_req->HandleRequest();
    client->WaitForIdle();
    mpls_list_req->Release();
    client->WaitForIdle();

    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();

    WAIT_FOR(1000, 100,
             (L2RouteFind(vrf_name_, local_vm_mac_, local_vm_ip4_) == false));
    EXPECT_FALSE(VmPortFind(input, 0));
    client->WaitForIdle();
}

TEST_F(RouteTest, RemoteVmRoute_label_change) {
    client->Reset();
    VxLanNetworkIdentifierMode(false);
    client->WaitForIdle();
    AddEncapList("MPLSoGRE", "MPLSoUDP", "VXLAN");
    client->WaitForIdle();

    TunnelType::TypeBmap bmap;
    bmap = TunnelType::MplsType();
    AddRemoteVmRoute(remote_vm_mac_, remote_vm_ip4_, server1_ip_,
                     MplsTable::kStartLabel, bmap);
    WAIT_FOR(1000, 100,
             (L2RouteFind(vrf_name_, remote_vm_mac_, remote_vm_ip4_) == true));

    BridgeRouteEntry *rt = L2RouteGet(vrf_name_, remote_vm_mac_,
                                      remote_vm_ip4_);
    EXPECT_TRUE(rt->GetActiveLabel() == MplsTable::kStartLabel);

    AddRemoteVmRoute(remote_vm_mac_, remote_vm_ip4_, server1_ip_,
                     MplsTable::kStartLabel + 1, bmap);
    rt = L2RouteGet(vrf_name_, remote_vm_mac_,
                    remote_vm_ip4_);
    EXPECT_TRUE(rt->GetActiveLabel() == (MplsTable::kStartLabel + 1));

    DeleteBridgeRoute(agent_->local_peer(), vrf_name_, remote_vm_mac_,
                remote_vm_ip4_);
    client->WaitForIdle();
    DelEncapList();
    client->WaitForIdle();
}

TEST_F(RouteTest, RemoteVmRoute_1) {
    client->Reset();
    VxLanNetworkIdentifierMode(false);
    client->WaitForIdle();
    AddEncapList("MPLSoGRE", "MPLSoUDP", "VXLAN");
    client->WaitForIdle();

    TunnelType::TypeBmap bmap;
    bmap = 1 << TunnelType::MPLS_GRE;
    AddRemoteVmRoute(remote_vm_mac_, remote_vm_ip4_, server1_ip_,
                     MplsTable::kStartLabel, bmap);
    WAIT_FOR(1000, 100,
             (L2RouteFind(vrf_name_, remote_vm_mac_, remote_vm_ip4_) == true));

    BridgeRouteEntry *rt = L2RouteGet(vrf_name_, remote_vm_mac_,
                                      remote_vm_ip4_);
    EXPECT_TRUE(rt->GetActiveLabel() == MplsTable::kStartLabel);

    BridgeRouteReq *l2_req = new BridgeRouteReq();
    std::vector<int> result = list_of(1);
    Sandesh::set_response_callback(boost::bind(ValidateSandeshResponse, _1, result));
    l2_req->set_vrf_index(1);
    l2_req->HandleRequest();
    client->WaitForIdle();
    l2_req->Release();
    client->WaitForIdle();

    const NextHop *nh = rt->GetActiveNextHop();
    EXPECT_TRUE(nh->GetType() == NextHop::TUNNEL);
    const TunnelNH *tnh = ((const TunnelNH *)nh);
    EXPECT_TRUE(tnh->GetTunnelType().GetType() == TunnelType::MPLS_GRE);
    EXPECT_TRUE(tnh->GetDip()->to_string() == server1_ip_.to_string());

    DeleteBridgeRoute(agent_->local_peer(), vrf_name_, remote_vm_mac_,
                remote_vm_ip4_);
    client->WaitForIdle();
    DelEncapList();
    client->WaitForIdle();
}

TEST_F(RouteTest, RemoteVmRoute_VxLan_auto) {
    struct PortInfo input[] = {
        {"vnet2", 2, "2.2.2.10", "00:00:02:02:02:10", 2, 2},
        {"vnet1", 1, "1.1.1.10", "00:00:01:01:01:10", 1, 1},
    };

    client->Reset();
    RouteTest::SetTunnelType(TunnelType::VXLAN);
    AddEncapList("VXLAN", "MPLSoGRE", "MPLSoUDP");
    VxLanNetworkIdentifierMode(false);
    client->WaitForIdle();
    CreateVmportEnv(input, 2);
    client->WaitForIdle();

    WAIT_FOR(100, 100, (VmPortActive(input, 0) == true));
    EXPECT_TRUE(L2RouteFind(vrf_name_, local_vm_mac_, local_vm_ip4_));

    BridgeRouteEntry *vnet1_rt = L2RouteGet(vrf_name_, local_vm_mac_,
                                            local_vm_ip4_);
    const NextHop *vnet1_nh = vnet1_rt->GetActiveNextHop();
    EXPECT_TRUE(vnet1_nh->GetType() == NextHop::INTERFACE);
    EXPECT_TRUE(vnet1_rt->GetActivePath()->GetActiveLabel() == 1);
    EXPECT_TRUE(vnet1_rt->GetActivePath()->GetTunnelType() ==
                TunnelType::VXLAN);
    InetUnicastRouteEntry *inet_rt = RouteGet(vrf_name_, local_vm_ip4_, 32);
    EXPECT_TRUE(inet_rt->GetActivePath()->GetActiveLabel() !=
                MplsTable::kInvalidLabel);

    TunnelType::TypeBmap bmap;
    bmap = 1 << TunnelType::VXLAN;
    AddRemoteVmRoute(remote_vm_mac_2_, remote_vm_ip4_2_, server1_ip_, 1,
                     bmap);
    WAIT_FOR(1000, 100,
             (L2RouteFind(vrf_name_, remote_vm_mac_2_, remote_vm_ip4_2_)
              == true));

    BridgeRouteEntry *rt = L2RouteGet(vrf_name_, remote_vm_mac_2_,
                                      remote_vm_ip4_2_);
    const NextHop *nh = rt->GetActiveNextHop();
    EXPECT_TRUE(nh->GetType() == NextHop::TUNNEL);
    const TunnelNH *tnh = ((const TunnelNH *)nh);
    EXPECT_TRUE(tnh->GetTunnelType().GetType() == TunnelType::VXLAN);
    EXPECT_TRUE(rt->GetActivePath()->GetActiveLabel() == 1);
    EXPECT_TRUE(rt->GetActivePath()->GetTunnelType() ==
                TunnelType::VXLAN);
    EXPECT_TRUE(tnh->GetDip()->to_string() == server1_ip_.to_string());
    BridgeRouteReq *l2_req = new BridgeRouteReq();
    std::vector<int> result = list_of(1);
    Sandesh::set_response_callback(boost::bind(ValidateSandeshResponse, _1, result));
    l2_req->set_vrf_index(1);
    l2_req->HandleRequest();
    client->WaitForIdle();
    l2_req->Release();
    client->WaitForIdle();

    DeleteBridgeRoute(agent_->local_peer(), vrf_name_, remote_vm_mac_2_,
                remote_vm_ip4_2_);
    client->WaitForIdle();

    DeleteVmportEnv(input, 2, true);
    client->WaitForIdle();
    DelEncapList();
    client->WaitForIdle();
}

TEST_F(RouteTest, RemoteVmRoute_VxLan_config) {
    struct PortInfo input[] = {
        {"vnet2", 2, "2.2.2.10", "00:00:02:02:02:10", 2, 2},
        {"vnet1", 1, "1.1.1.10", "00:00:01:01:01:10", 1, 1},
    };

    client->Reset();
    RouteTest::SetTunnelType(TunnelType::VXLAN);
    AddEncapList("VXLAN", "MPLSoGRE", "MPLSoUDP");
    VxLanNetworkIdentifierMode(true);
    client->WaitForIdle();
    CreateVmportEnv(input, 2);
    client->WaitForIdle();

    WAIT_FOR(1000, 100, (VmPortActive(input, 0) == true));
    EXPECT_TRUE(L2RouteFind(vrf_name_, local_vm_mac_, local_vm_ip4_));

    BridgeRouteEntry *vnet1_rt = L2RouteGet(vrf_name_, local_vm_mac_,
                                            local_vm_ip4_);
    const NextHop *vnet1_nh = vnet1_rt->GetActiveNextHop();
    EXPECT_TRUE(vnet1_nh->GetType() == NextHop::INTERFACE);
    EXPECT_TRUE(vnet1_rt->GetActivePath()->GetActiveLabel() == 101);
    EXPECT_TRUE(vnet1_rt->GetActivePath()->GetTunnelType() ==
                TunnelType::VXLAN);

    TunnelType::TypeBmap bmap;
    bmap = 1 << TunnelType::VXLAN;
    AddRemoteVmRoute(remote_vm_mac_2_, remote_vm_ip4_2_, server1_ip_, 1, bmap);
    EXPECT_TRUE(L2RouteFind(vrf_name_, remote_vm_mac_2_, remote_vm_ip4_2_));
    BridgeRouteReq *l2_req = new BridgeRouteReq();
    std::vector<int> result = list_of(1);
    Sandesh::set_response_callback(boost::bind(ValidateSandeshResponse, _1, result));
    l2_req->set_vrf_index(1);
    l2_req->HandleRequest();
    client->WaitForIdle();
    l2_req->Release();
    client->WaitForIdle();

    BridgeRouteEntry *rt = L2RouteGet(vrf_name_, remote_vm_mac_2_,
                                      remote_vm_ip4_2_);
    const NextHop *nh = rt->GetActiveNextHop();
    EXPECT_TRUE(nh->GetType() == NextHop::TUNNEL);
    const TunnelNH *tnh = ((const TunnelNH *)nh);
    EXPECT_TRUE(tnh->GetTunnelType().GetType() == TunnelType::VXLAN);
    EXPECT_TRUE(rt->GetActivePath()->GetActiveLabel() == 1);
    EXPECT_TRUE(rt->GetActivePath()->GetTunnelType() ==
                TunnelType::VXLAN);
    EXPECT_TRUE(tnh->GetDip()->to_string() == server1_ip_.to_string());

    DeleteBridgeRoute(agent_->local_peer(), vrf_name_, remote_vm_mac_2_,
                remote_vm_ip4_2_);
    client->WaitForIdle();

    DeleteVmportEnv(input, 2, true);
    client->WaitForIdle();
    DelEncapList();
    client->WaitForIdle();
}

TEST_F(RouteTest, Bridge_route_key) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:01:01:01:10", 1, 1},
    };

    AddL2Vn("vn1", 1);
    AddVrf("vrf1");
    AddVrf("vrf2");
    AddLink("virtual-network", "vn1", "routing-instance", "vrf1");
    client->WaitForIdle();
    client->Reset();
    CreateL2VmportEnv(input, 1);
    client->WaitForIdle();

    EXPECT_TRUE(VmPortL2Active(input, 0));
    BridgeRouteEntry *vnet1_rt = L2RouteGet(vrf_name_, local_vm_mac_,
                                            local_vm_ip4_);
    WAIT_FOR(1000, 100, (vnet1_rt != NULL));
    BridgeRouteKey new_key(agent_->local_vm_peer(), "vrf2", local_vm_mac_,
                           0);
    vnet1_rt->SetKey(&new_key);
    EXPECT_TRUE(vnet1_rt->vrf()->GetName() == "vrf2");
    EXPECT_TRUE(MacAddress(new_key.ToString()) == local_vm_mac_);
    BridgeRouteKey restore_key(agent_->local_vm_peer(), "vrf1",
                               local_vm_mac_, 0);
    vnet1_rt->SetKey(&restore_key);
    EXPECT_TRUE(vnet1_rt->vrf()->GetName() == "vrf1");
    EXPECT_TRUE(MacAddress(restore_key.ToString()) == local_vm_mac_);

    DelVrf("vrf2");
    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();
    EXPECT_FALSE(VmPortFind(input, 0));
    client->WaitForIdle();
}

TEST_F(RouteTest, Sandesh_chaeck_with_invalid_vrf) {
    BridgeRouteReq *l2_req = new BridgeRouteReq();
    std::vector<int> result = list_of(1);
    Sandesh::set_response_callback(boost::bind(ValidateSandeshResponse, _1, result));
    l2_req->set_vrf_index(100);
    l2_req->HandleRequest();
    client->WaitForIdle();
    l2_req->Release();
    client->WaitForIdle();
}

TEST_F(RouteTest, Vxlan_basic) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:01:01:01:10", 1, 1},
    };

    client->Reset();
    RouteTest::SetTunnelType(TunnelType::VXLAN);
    AddEncapList("VXLAN", "MPLSoGRE", "MPLSoUDP");
    VxLanNetworkIdentifierMode(true);
    client->WaitForIdle();
    CreateVmportEnv(input, 1);
    client->WaitForIdle();

    WAIT_FOR(1000, 100, (VmPortActive(input, 0) == true));
    EXPECT_TRUE(L2RouteFind(vrf_name_, local_vm_mac_, local_vm_ip4_));

    BridgeRouteEntry *vnet1_rt = L2RouteGet(vrf_name_, local_vm_mac_,
                                            local_vm_ip4_);
    WAIT_FOR(1000, 100, (vnet1_rt != NULL));
    const NextHop *vnet1_nh = vnet1_rt->GetActiveNextHop();
    EXPECT_TRUE(vnet1_nh->GetType() == NextHop::INTERFACE);
    EXPECT_TRUE(vnet1_rt->GetActivePath()->GetActiveLabel() == 101);
    EXPECT_TRUE(vnet1_rt->GetActivePath()->GetTunnelType() ==
                TunnelType::VXLAN);
    VxLanIdKey vxlan_id_key(101);
    VxLanId *vxlan_id =
        static_cast<VxLanId *>(agent_->vxlan_table()->FindActiveEntry(&vxlan_id_key));
    VxLanIdKey new_vxlan_id_key(102);
    vxlan_id->SetKey(&new_vxlan_id_key);
    EXPECT_TRUE(vxlan_id->vxlan_id() == 102);
    vxlan_id->SetKey(&vxlan_id_key);
    EXPECT_TRUE(vxlan_id->vxlan_id() == 101);
    DBEntryBase::KeyPtr key = vxlan_id->GetDBRequestKey();
    VxLanIdKey *db_key = static_cast<VxLanIdKey *>(key.get());
    EXPECT_TRUE(vxlan_id->vxlan_id() == db_key->vxlan_id());

    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();
    DelEncapList();
    client->WaitForIdle();
}

TEST_F(RouteTest, vxlan_network_id_change_for_non_l2_interface) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:01:01:01:10", 1, 1},
    };

    client->Reset();
    CreateVmportEnv(input, 1);
    client->WaitForIdle();
    //TODO stop the walk before cancel
    VxLanNetworkIdentifierMode(true);
    VxLanNetworkIdentifierMode(false);
    client->WaitForIdle();

    EXPECT_TRUE(VmPortActive(input, 0));
    WAIT_FOR(1000, 100, (RouteGet(vrf_name_, local_vm_ip4_, 32) != NULL));
    WAIT_FOR(1000, 100,
             (L2RouteGet(vrf_name_, local_vm_mac_, local_vm_ip4_) != NULL));

    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();

    WAIT_FOR(1000, 100,
             (L2RouteGet(vrf_name_, local_vm_mac_, local_vm_ip4_) == NULL));
    EXPECT_FALSE(VmPortFind(input, 0));
    client->WaitForIdle();
}

TEST_F(RouteTest, RemoteVxlanEncapRoute_1) {
    client->Reset();
    VxLanNetworkIdentifierMode(false);
    client->WaitForIdle();
    RouteTest::SetTunnelType(TunnelType::MPLS_GRE);
    DelEncapList();
    client->WaitForIdle();

    TunnelType::TypeBmap bmap = TunnelType::VxlanType();
    AddRemoteVmRoute(remote_vm_mac_, remote_vm_ip4_, server1_ip_,
                     MplsTable::kStartLabel, bmap);
    WAIT_FOR(1000, 100,
             (L2RouteFind(vrf_name_, remote_vm_mac_, remote_vm_ip4_) == true));

    BridgeRouteEntry *rt = L2RouteGet(vrf_name_, remote_vm_mac_,
                                      remote_vm_ip4_);
    const AgentPath *path = rt->GetActivePath();
    EXPECT_TRUE(path->tunnel_type() != TunnelType::VXLAN);

    //Update VXLAN in encap prio
    AddEncapList("MPLSoGRE", "MPLSoUDP", "VXLAN");
    client->WaitForIdle();
    path = rt->GetActivePath();
    EXPECT_TRUE(path->tunnel_type() == TunnelType::VXLAN);
    const TunnelNH *nh =
        static_cast<const TunnelNH *>(path->nexthop());
    EXPECT_TRUE(nh->GetDip()->to_string() == server1_ip_.to_string());

    DeleteBridgeRoute(agent_->local_peer(), vrf_name_, remote_vm_mac_,
                remote_vm_ip4_);
    client->WaitForIdle();
    DelEncapList();
    client->WaitForIdle();
}

TEST_F(RouteTest, Enqueue_l2_route_add_on_deleted_vrf) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:00:01:01:01", 1, 1},
    };

    client->Reset();
    CreateVmportEnv(input, 1);
    client->WaitForIdle();

    VrfEntryRef vrf_ref = VrfGet(vrf_name_.c_str());
    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();
    TaskScheduler::GetInstance()->Stop();
    ComponentNHKeyList component_nh_key_list;
    EvpnAgentRouteTable::AddRemoteVmRouteReq(agent_->local_vm_peer(),
                                             vrf_name_, local_vm_mac_,
                                             local_vm_ip4_, 0, NULL);

    vrf_ref = NULL;
    TaskScheduler::GetInstance()->Start();
    client->WaitForIdle();
}

TEST_F(RouteTest, Enqueue_l2_route_del_on_deleted_vrf) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:00:01:01:01", 1, 1},
    };

    client->Reset();
    CreateVmportEnv(input, 1);
    client->WaitForIdle();

    VrfEntryRef vrf_ref = VrfGet(vrf_name_.c_str());
    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();
    TaskScheduler::GetInstance()->Stop();
    EvpnAgentRouteTable::DeleteReq(agent_->local_vm_peer(), vrf_name_,
                                     local_vm_mac_, local_vm_ip4_, 0, NULL);
    vrf_ref = NULL;
    TaskScheduler::GetInstance()->Start();
    client->WaitForIdle();
}

TEST_F(RouteTest, add_deleted_peer_to_multicast_route) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:00:01:01:01", 1, 1},
    };

    client->Reset();
    CreateVmportEnv(input, 1);
    client->WaitForIdle();

    //Add a peer and enqueue path add in multicast route.
    BgpPeer *bgp_peer_ptr = CreateBgpPeer(Ip4Address(1), "BGP Peer1");
    boost::shared_ptr<BgpPeer> bgp_peer =
        bgp_peer_ptr->GetBgpXmppPeer()->bgp_peer_id_ref();
    MulticastHandler *mc_handler = static_cast<MulticastHandler *>(agent_->
                                                                   oper_db()->multicast());
    TunnelOlist olist;
    olist.push_back(OlistTunnelEntry(nil_uuid(), 10,
                                     IpAddress::from_string("8.8.8.8").to_v4(),
                                     TunnelType::VxlanType()));
    TaskScheduler::GetInstance()->Stop();
    client->WaitForIdle();
    AgentXmppChannel::HandleAgentXmppClientChannelEvent(bgp_peer.get()->GetBgpXmppPeer(),
                                                        xmps::NOT_READY);
    TaskScheduler::GetInstance()->Start();
    client->WaitForIdle();
    mc_handler->ModifyTorMembers(bgp_peer.get(),
                                 "vrf1",
                                 olist,
                                 10,
                                 1);
    client->WaitForIdle();
    BridgeRouteEntry *rt = L2RouteGet("vrf1",
                                      MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
                                      Ip4Address(0));
    EXPECT_FALSE(rt->FindPath(bgp_peer.get()));

    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();
    DeleteBgpPeer(bgp_peer.get());
    client->WaitForIdle();
    bgp_peer.reset();
}

//Add local VM - flood route gets added
//Send explicitly EVPN path addition
//Delete local VM - removes local path
//Send explicit delete for evpn
//Result - route should get deleted
TEST_F(RouteTest, all_evpn_routes_deleted_when_local_vms_are_gone) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:00:01:01:01", 1, 1},
    };

    client->Reset();
    //Add local VM
    CreateVmportEnv(input, 1);
    client->WaitForIdle();

    BridgeRouteEntry *rt = L2RouteGet("vrf1",
                                      MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
                                      Ip4Address(0));
    EXPECT_TRUE(rt != NULL);
    //Add a peer and enqueue path add in multicast route.
    BgpPeer *bgp_peer_ptr = CreateBgpPeer(Ip4Address(1), "BGP Peer1");
    boost::shared_ptr<BgpPeer> bgp_peer =
        bgp_peer_ptr->GetBgpXmppPeer()->bgp_peer_id_ref();
    MulticastHandler *mc_handler = static_cast<MulticastHandler *>(agent_->
                                                                   oper_db()->multicast());
    TunnelOlist olist;
    olist.push_back(OlistTunnelEntry(nil_uuid(), 10,
                                     IpAddress::from_string("8.8.8.8").to_v4(),
                                     TunnelType::VxlanType()));
    //Send explicit evpn olist
    mc_handler->ModifyEvpnMembers(bgp_peer.get(),
                                 "vrf1",
                                 olist,
                                 0,
                                 1);
    client->WaitForIdle();
    rt = L2RouteGet("vrf1",
                    MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
                    Ip4Address(0));
    EXPECT_TRUE(rt != NULL);

    //Delete VM, local vm path goes off
    DeleteVmportEnv(input, 1, false);
    client->WaitForIdle();
    rt = L2RouteGet("vrf1",
                    MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
                    Ip4Address(0));
    WAIT_FOR(1000, 1000, (rt->FindPath(agent_->local_vm_peer()) == NULL));
    EXPECT_TRUE(rt != NULL);

    //Send explicit delete of evpn olist
    TunnelOlist del_olist;
    mc_handler->ModifyEvpnMembers(bgp_peer.get(),
                                 "vrf1",
                                 del_olist,
                                 0,
                                 ControllerPeerPath::kInvalidPeerIdentifier);
    client->WaitForIdle();
    rt = L2RouteGet("vrf1",
                    MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
                    Ip4Address(0));
    EXPECT_TRUE(rt->FindPath(bgp_peer_ptr) == NULL);

    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();
    DeleteBgpPeer(bgp_peer.get());
    client->WaitForIdle();
    bgp_peer.reset();
}

TEST_F(RouteTest, evpn_mcast_label_deleted) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:00:01:01:01", 1, 1},
    };

    client->Reset();
    //Add VM
    CreateVmportEnv(input, 1);
    client->WaitForIdle();

    BridgeRouteEntry *rt = L2RouteGet("vrf1",
                                      MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
                                      Ip4Address(0));
    EXPECT_TRUE(rt != NULL);
    uint32_t evpn_mpls_label = rt->GetActivePath()->label();
    //Add a peer and enqueue path add in multicast route.
    BgpPeer *bgp_peer_ptr = CreateBgpPeer(Ip4Address(1), "BGP Peer1");
    boost::shared_ptr<BgpPeer> bgp_peer =
        bgp_peer_ptr->GetBgpXmppPeer()->bgp_peer_id_ref();
    MulticastHandler *mc_handler = static_cast<MulticastHandler *>(agent_->
                                                                   oper_db()->multicast());
    TunnelOlist olist;
    olist.push_back(OlistTunnelEntry(nil_uuid(), 10,
                                     IpAddress::from_string("8.8.8.8").to_v4(),
                                     TunnelType::VxlanType()));
    //Add EVPN olist
    mc_handler->ModifyEvpnMembers(bgp_peer.get(),
                                 "vrf1",
                                 olist,
                                 0,
                                 1);
    client->WaitForIdle();
    rt = L2RouteGet("vrf1",
                    MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
                    Ip4Address(0));
    EXPECT_TRUE(rt != NULL);
    //Label is retained
    EXPECT_TRUE(rt->GetActivePath()->label() == evpn_mpls_label);

    //Delete VM
    DeleteVmportEnv(input, 1, false);
    client->WaitForIdle();
    //Because VN is pending.
    EXPECT_TRUE(agent_->mpls_table()->FindActiveEntry(new MplsLabelKey(evpn_mpls_label)) != NULL);
    rt = L2RouteGet("vrf1",
                    MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
                    Ip4Address(0));
    WAIT_FOR(1000, 1000, (rt->FindPath(agent_->local_vm_peer()) == NULL));
    EXPECT_TRUE(rt != NULL);
    //Label is retained as evpn still present
    EXPECT_TRUE(rt->GetActivePath()->label() == 0);
    EXPECT_TRUE(rt->FindPath(agent_->local_peer())->label() == evpn_mpls_label);
    EXPECT_TRUE(FindMplsLabel(MplsLabel::MCAST_NH, evpn_mpls_label));
    MplsLabel *mpls_entry = GetActiveLabel(MplsLabel::MCAST_NH,
                                           evpn_mpls_label);
    EXPECT_TRUE(mpls_entry->nexthop() ==
                rt->GetActiveNextHop());

    //Delete EVPN
    TunnelOlist del_olist;
    mc_handler->ModifyEvpnMembers(bgp_peer.get(),
                                 "vrf1",
                                 del_olist,
                                 0,
                                 ControllerPeerPath::kInvalidPeerIdentifier);
    client->WaitForIdle();
    rt = L2RouteGet("vrf1",
                    MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
                    Ip4Address(0));
    //route should get deleted
    EXPECT_TRUE(rt->FindPath(bgp_peer_ptr) == NULL);

    //Label should have been released
    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();
    EXPECT_TRUE(agent_->mpls_table()->FindActiveEntry(new MplsLabelKey(evpn_mpls_label)) == NULL);

    CreateVmportEnv(input, 1);
    client->WaitForIdle();
    rt = L2RouteGet("vrf1",
                    MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
                    Ip4Address(0));
    EXPECT_TRUE(rt != NULL);
    WAIT_FOR(1000, 1000, (rt->FindPath(agent_->local_vm_peer()) != NULL));
    //New label taken, should re-use old one
    EXPECT_TRUE(rt->GetActivePath()->label() == evpn_mpls_label);

    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();
    DeleteBgpPeer(bgp_peer.get());
    client->WaitForIdle();
    bgp_peer.reset();
}

//Let VRF be unsubscribed from Bgp Peer and then add
//route in same. This route should not be sent to BGP
//peer.
TEST_F(RouteTest, DISABLED_send_route_add_in_not_subscribed_vrf) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:01:01:01:10", 1, 1},
    };

    client->Reset();
    //Add a peer and enqueue path add in multicast route.
    BgpPeer *bgp_peer_ptr = CreateBgpPeer(Ip4Address(1), "BGP Peer1");
    boost::shared_ptr<BgpPeer> bgp_peer =
        bgp_peer_ptr->GetBgpXmppPeer()->bgp_peer_id_ref();
    CreateVmportEnv(input, 1);
    client->WaitForIdle();

    WAIT_FOR(1000, 1000,
             (L2RouteGet(vrf_name_, local_vm_mac_, local_vm_ip4_) != NULL));
    EvpnRouteEntry *rt = EvpnRouteGet("vrf1", local_vm_mac_, local_vm_ip4_, 0);
    RouteExport::State *route_state = static_cast<RouteExport::State *>
        (bgp_peer_ptr->GetRouteExportState(rt->get_table_partition(),
                                        rt));
    EXPECT_TRUE(route_state->exported_ == true);

    VrfEntry *vrf = VrfGet(vrf_name_.c_str());
    RouteExport *rt_export_tmp[Agent::ROUTE_TABLE_MAX];
    VrfExport::State *vrf_state = static_cast<VrfExport::State *>
        (bgp_peer_ptr->GetVrfExportState(vrf->get_table_partition(), vrf));
    for (uint8_t table_type = (Agent::INVALID + 1);
         table_type < Agent::ROUTE_TABLE_MAX; table_type++) {
        rt_export_tmp[table_type] = vrf_state->rt_export_[table_type];
    }

    //Stop BGP peer
    vrf->ClearState(vrf->get_table_partition()->parent(),
                    bgp_peer_ptr->GetVrfExportListenerId());
    //Mark Old route as not exported.
    route_state->exported_ = false;
    rt = EvpnRouteGet("vrf1", local_vm_mac_, local_vm_ip4_, 0);
    rt->get_table_partition()->Notify(rt);
    client->WaitForIdle();
    EXPECT_TRUE(route_state->exported_ == false);
    route_state->exported_ = true;

    for (uint8_t table_type = (Agent::INVALID + 1);
         table_type < Agent::ROUTE_TABLE_MAX; table_type++) {
        if (rt_export_tmp[table_type])
            (rt_export_tmp[table_type])->Unregister();
    }
    //Delete route
    //delete vrf_state;
    DeleteBridgeRoute(agent_->local_vm_peer(), vrf_name_, remote_vm_mac_,
                remote_vm_ip4_);
    client->WaitForIdle();

    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();
    DeleteBgpPeer(bgp_peer.get());
    client->WaitForIdle();
    bgp_peer.reset();
}

TEST_F(RouteTest, notify_on_vrf_with_deleted_state_for_peer) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:01:01:01:10", 1, 1},
    };

    client->Reset();
    //Add a peer and enqueue path add in multicast route.
    BgpPeer *bgp_peer_ptr = CreateBgpPeer(Ip4Address(1), "BGP Peer1");
    boost::shared_ptr<BgpPeer> bgp_peer =
        bgp_peer_ptr->GetBgpXmppPeer()->bgp_peer_id_ref();
    CreateVmportEnv(input, 1);
    client->WaitForIdle();

    WAIT_FOR(1000, 1000,
             (L2RouteGet(vrf_name_, local_vm_mac_, local_vm_ip4_) != NULL));
    EvpnRouteEntry *rt = EvpnRouteGet("vrf1", local_vm_mac_, local_vm_ip4_, 0);
    RouteExport::State *route_state = static_cast<RouteExport::State *>
        (bgp_peer_ptr->GetRouteExportState(rt->get_table_partition(),
                                        rt));
    EXPECT_TRUE(route_state->exported_ == true);

    VrfEntry *vrf = VrfGet(vrf_name_.c_str());
    RouteExport *rt_export_tmp[Agent::ROUTE_TABLE_MAX];
    VrfExport::State *vrf_state = static_cast<VrfExport::State *>
        (bgp_peer_ptr->GetVrfExportState(vrf->get_table_partition(), vrf));
    for (uint8_t table_type = (Agent::INVALID + 1);
         table_type < Agent::ROUTE_TABLE_MAX; table_type++) {
        rt_export_tmp[table_type] = vrf_state->rt_export_[table_type];
        rt->ClearState(rt->get_table(), rt_export_tmp[table_type]->GetListenerId());
    }

    //Stop BGP peer
    bgp_peer_ptr->GetBgpXmppPeer()->DeCommissionBgpPeer();
    //create another bgp peer
    bgp_peer_ptr->GetBgpXmppPeer()->CreateBgpPeer();
    //Mark Old route as not exported.
    rt = EvpnRouteGet("vrf1", local_vm_mac_, local_vm_ip4_, 0);
    rt->get_table_partition()->Notify(rt);
    client->WaitForIdle();
    route_state = static_cast<RouteExport::State *>
        (bgp_peer_ptr->GetRouteExportState(rt->get_table_partition(),
                                        rt));
    EXPECT_TRUE(route_state == NULL);
    AgentXmppChannel::HandleAgentXmppClientChannelEvent(bgp_peer.get()->GetBgpXmppPeer(),
                                                        xmps::NOT_READY);
    client->WaitForIdle();
    bgp_peer_ptr->DelPeerRoutes(
        boost::bind(&VNController::ControllerPeerHeadlessAgentDelDoneEnqueue,
                    agent_->controller(), bgp_peer_ptr));
    client->WaitForIdle();

    //Delete route
    DeleteBridgeRoute(agent_->local_vm_peer(), vrf_name_, remote_vm_mac_,
                remote_vm_ip4_);
    client->WaitForIdle();

    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();
    DeleteBgpPeer(bgp_peer.get());
    client->WaitForIdle();
    bgp_peer.reset();
}

TEST_F(RouteTest, delete_notify_on_multicast_rt_with_no_state) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:01:01:01:10", 1, 1},
    };

    client->Reset();
    //Add a peer and enqueue path add in multicast route.
    BgpPeer *bgp_peer_ptr = CreateBgpPeer(Ip4Address(1), "BGP Peer1");
    boost::shared_ptr<BgpPeer> bgp_peer =
        bgp_peer_ptr->GetBgpXmppPeer()->bgp_peer_id_ref();
    CreateVmportEnv(input, 1);
    client->WaitForIdle();

    WAIT_FOR(1000, 1000,
             (L2RouteGet(vrf_name_, local_vm_mac_, local_vm_ip4_) != NULL));
    //Delete route local_vm_peer
    DeleteVmportEnv(input, 1, false);
    client->WaitForIdle();
    //Delete state
    BridgeRouteEntry *rt = L2RouteGet("vrf1",
                                      MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
                                      Ip4Address(0));
    RouteExport::State *route_state = static_cast<RouteExport::State *>
        (bgp_peer_ptr->GetRouteExportState(rt->get_table_partition(),
                                        rt));
    EXPECT_TRUE(route_state != NULL);
    VrfExport::State *vs = static_cast<VrfExport::State *>
        (bgp_peer_ptr->GetVrfExportState(agent_->vrf_table()->GetTablePartition(rt->vrf()),
                           rt->vrf()));
    rt->ClearState(rt->get_table(),
                   vs->rt_export_[Agent::BRIDGE]->GetListenerId());
    delete route_state;
    //Now delete local peer from route
    BridgeAgentRouteTable::DeleteBroadcastReq(agent_->local_peer(),
                                              "vrf1", 1,
                                              Composite::L2COMP);
    client->WaitForIdle();
    DeleteBgpPeer(bgp_peer.get());
    bgp_peer.reset();
    client->WaitForIdle();
}

// Reset agentxmppchannel in active xmpp channel of agent.
// This results in ignoring any notification as channel is not active.
// Now delete VRF, but take a reference to hold it.
// Start a delpeer walk for Bgp peer of channel.
// Verify if state is deleted in VRF.
// Objective:
// Analogous to channel coming down however VRF delete notification coming later
// and delpeer walk running after that.
TEST_F(RouteTest, delpeer_walk_on_deleted_vrf) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:00:01:01:01", 1, 1},
    };

    client->Reset();
    CreateVmportEnv(input, 1);
    client->WaitForIdle();

    //Add a peer and enqueue path add in multicast route.
    BgpPeer *bgp_peer_ptr = CreateBgpPeer(Ip4Address(1), "BGP Peer1");
    boost::shared_ptr<BgpPeer> bgp_peer =
        bgp_peer_ptr->GetBgpXmppPeer()->bgp_peer_id_ref();

    //Reset agent xmpp channel and back up the original channel.
    AgentXmppChannel *channel1 = agent_->controller_xmpp_channel(1);
    agent_->reset_controller_xmpp_channel(1);
    //Take VRF reference and delete VRF.
    VrfEntryRef vrf_ref = VrfGet("vrf1");
    DelVrf("vrf1");
    client->WaitForIdle();
    //Restore agent xmpp channel
    agent_->set_controller_xmpp_channel(channel1, 1);

    //Now bring channel down
    AgentXmppChannel::HandleAgentXmppClientChannelEvent(bgp_peer.get()->GetBgpXmppPeer(),
                                                        xmps::NOT_READY);
    client->WaitForIdle();
    //Release VRF reference
    vrf_ref.reset();
    client->WaitForIdle();

    DeleteVmportEnv(input, 1, true);
    DeleteBgpPeer(bgp_peer_ptr);
    client->WaitForIdle();
    bgp_peer.reset();
    client->WaitForIdle();
}

TEST_F(RouteTest, notify_walk_on_deleted_vrf_with_no_state_but_listener_id) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:01:01:01:10", 1, 1},
    };

    client->Reset();
    CreateVmportEnv(input, 1);
    client->WaitForIdle();

    //Add a peer and keep a reference of same.
    BgpPeer *bgp_peer_ptr = CreateBgpPeer(Ip4Address(1), "BGP Peer1");
    DBTableBase::ListenerId bgp_peer_id =
        bgp_peer_ptr->GetVrfExportListenerId();
    boost::shared_ptr<BgpPeer> bgp_peer =
        bgp_peer_ptr->GetBgpXmppPeer()->bgp_peer_id_ref();

    //Take VRF reference and delete VRF.
    VrfEntryRef vrf_ref = VrfGet("vrf1");
    BridgeRouteEntry *rt = L2RouteGet(vrf_name_, local_vm_mac_, local_vm_ip4_);
    EXPECT_TRUE(rt != NULL);
    DBState *state = new DBState();
    rt->SetState(rt->get_table(), DBEntryBase::ListenerId(100), state);

    bgp_peer_ptr->PeerNotifyRoutes();
    client->WaitForIdle();
    bgp_peer_ptr->SetVrfListenerId(100);
    bgp_peer_ptr->route_walker()->RouteWalkNotify(rt->get_table_partition(),
                                                  rt);
    client->WaitForIdle();
    bgp_peer_ptr->SetVrfListenerId(bgp_peer_id);

    rt->ClearState(rt->get_table(), DBEntryBase::ListenerId(100));
    DeleteBgpPeer(bgp_peer.get());
    client->WaitForIdle();
    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();
    DelVrf("vrf1");
    client->WaitForIdle();
    //Release VRF reference
    vrf_ref.reset();
    bgp_peer.reset();
    client->WaitForIdle();
}

TEST_F(RouteTest, add_route_in_vrf_with_delayed_vn_vrf_link_add) {
    client->Reset();
    AddVrf("vrf1", 1);
    AddVn("vn1", 1, true);
    client->WaitForIdle();
    BgpPeer *bgp_peer_ptr = CreateBgpPeer(Ip4Address(1), "BGP Peer1");
    boost::shared_ptr<BgpPeer> bgp_peer =
        bgp_peer_ptr->GetBgpXmppPeer()->bgp_peer_id_ref();

    //Delete VN
    VrfEntry *vrf = VrfGet("vrf1");
    //Add remote evpn route
    BridgeTunnelRouteAdd(bgp_peer_ptr, "vrf1", TunnelType::AllType(),
                         server1_ip_, MplsTable::kStartLabel,
                         remote_vm_mac_, remote_vm_ip4_, 32);
    WAIT_FOR(1000, 100,
             (L2RouteFind("vrf1", remote_vm_mac_, remote_vm_ip4_) == true));
    //Now add remote l3 route for IP.
    Inet4TunnelRouteAdd(bgp_peer_ptr, "vrf1", remote_vm_ip4_, 32, server1_ip_,
                        TunnelType::AllType(), MplsTable::kStartLabel, "vrf1",
                        SecurityGroupList(), PathPreference());
    client->WaitForIdle();
    InetUnicastRouteEntry *inet_rt = RouteGet("vrf1", remote_vm_ip4_, 32);
    VrfKSyncObject *vrf_obj = agent_->ksync()->vrf_ksync_obj();;
    DBTableBase::ListenerId vrf_listener_id = vrf_obj->vrf_listener_id();
    InetUnicastAgentRouteTable *vrf_uc_table =
        static_cast<InetUnicastAgentRouteTable *>
        (vrf->GetInet4UnicastRouteTable());
    VrfKSyncObject::VrfState *l3_state =
        static_cast<VrfKSyncObject::VrfState *>
        (vrf->GetState(vrf_uc_table, vrf_listener_id));
    RouteKSyncObject *vrf_rt_obj = l3_state->inet4_uc_route_table_;
    RouteKSyncEntry key(vrf_rt_obj, inet_rt);
    RouteKSyncEntry *ksync_route =
        static_cast<RouteKSyncEntry *>(vrf_rt_obj->GetReference(&key));
    EXPECT_FALSE(vrf_obj->RouteNeedsMacBinding(inet_rt));
    EXPECT_TRUE(ksync_route->mac() == MacAddress::ZeroMac());

    //Add VN
    AddLink("virtual-network", "vn1", "routing-instance", "vrf1");
    client->WaitForIdle();
    EXPECT_TRUE(vrf->vn() != NULL);
    WAIT_FOR(1000, 1000, (ksync_route->mac() != MacAddress::ZeroMac()));
    EXPECT_TRUE(vrf_obj->RouteNeedsMacBinding(inet_rt));

    //Delete
    DeleteBridgeRoute(bgp_peer_ptr, vrf_name_, remote_vm_mac_,
                remote_vm_ip4_);
    WAIT_FOR(1000, 100,
             (L2RouteFind("vrf1", remote_vm_mac_, remote_vm_ip4_) == false));
    DeleteRoute("vrf1", remote_vm_ip4_str_, 32, bgp_peer_ptr);
    client->WaitForIdle();
    DeleteBgpPeer(bgp_peer.get());
    client->WaitForIdle();
    DelLink("virtual-network", "vn1", "routing-instance", "vrf1");
    DelVrf("vrf1");
    DelVn("vn1");
    client->WaitForIdle();
    bgp_peer.reset();
}

TEST_F(RouteTest, deleted_peer_walk_on_deleted_vrf) {
    client->Reset();
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:01:01:01:10", 1, 1},
    };

    CreateVmportEnv(input, 1);
    client->WaitForIdle();

    VrfEntry *vrf1 = VrfGet("vrf1");
    //Add a peer and keep a reference of same.
    BgpPeer *bgp_peer_ptr = CreateBgpPeer(Ip4Address(1), "BGP Peer1");
    boost::shared_ptr<BgpPeer> bgp_peer =
        bgp_peer_ptr->GetBgpXmppPeer()->bgp_peer_id_ref();

    //Take VRF reference and delete VRF.
    VrfEntry *vrf2 = new VrfEntry("vrf2", 0, agent_);
    vrf2->MarkDelete();
    vrf2->set_table_partition(vrf1->get_table_partition());

    bgp_peer_ptr->route_walker()->set_type(ControllerRouteWalker::DELPEER);
    bgp_peer_ptr->route_walker()->VrfWalkNotify(vrf1->get_table_partition(), vrf2);
    DeleteBgpPeer(bgp_peer.get());
    client->WaitForIdle();
    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();
    bgp_peer.reset();
    delete vrf2;
}

// Bug# 1508894
TEST_F(RouteTest, add_stale_non_stale_path_in_l2_mcast_and_delete_non_stale) {
    client->Reset();
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:01:01:01:10", 1, 1},
    };

    CreateVmportEnv(input, 1);
    client->WaitForIdle();

    //Add a peer and keep a reference of same.
    BgpPeer *bgp_peer_ptr = CreateBgpPeer(Ip4Address(1), "BGP Peer1");
    BgpPeer *bgp_peer_ptr_2 = CreateBgpPeer(Ip4Address(2), "BGP Peer2");
    boost::shared_ptr<BgpPeer> bgp_peer =
        bgp_peer_ptr->GetBgpXmppPeer()->bgp_peer_id_ref();
    boost::shared_ptr<BgpPeer> bgp_peer_2 =
        bgp_peer_ptr_2->GetBgpXmppPeer()->bgp_peer_id_ref();

    BridgeRouteEntry *rt = L2RouteGet("vrf1",
                                      MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
                                      Ip4Address(0));
    TunnelOlist olist;
    olist.push_back(OlistTunnelEntry(nil_uuid(), 10,
                                     IpAddress::from_string("8.8.8.8").to_v4(),
                                     TunnelType::VxlanType()));
    //Send explicit evpn olist
    MulticastHandler *mc_handler = static_cast<MulticastHandler *>(agent_->
                                                                   oper_db()->multicast());
    mc_handler->ModifyEvpnMembers(bgp_peer_ptr,
                                 "vrf1",
                                 olist,
                                 0,
                                 1);
    client->WaitForIdle();
    mc_handler->ModifyEvpnMembers(bgp_peer_ptr_2,
                                 "vrf1",
                                 olist,
                                 0,
                                 1);
    client->WaitForIdle();
    rt = L2RouteGet("vrf1",
                    MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
                    Ip4Address(0));
    EXPECT_TRUE(rt != NULL);

    AgentPath *path = rt->FindPath(bgp_peer_ptr_2);
    path->set_is_stale(true);

    Route::PathList::iterator it = rt->GetPathList().begin();
    while (it != rt->GetPathList().end()) {
        AgentPath *it_path = static_cast<AgentPath *>(it.operator->());
        EXPECT_TRUE(it_path != NULL);
        it++;
    }
    //Delete Evpn path
    mc_handler->ModifyEvpnMembers(bgp_peer_ptr,
                                 "vrf1",
                                 olist,
                                 0,
                                 ControllerPeerPath::kInvalidPeerIdentifier);
    client->WaitForIdle();
    //Delete all
    DeleteBgpPeer(bgp_peer.get());
    DeleteBgpPeer(bgp_peer_2.get());
    client->WaitForIdle();
    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();
    bgp_peer.reset();
    bgp_peer_2.reset();
}

TEST_F(RouteTest, multiple_peer_evpn_label_check) {
    client->Reset();
    AddVrf("vrf1");
    AddVn("vn1", 1);
    AddLink("virtual-network", "vn1", "routing-instance", "vrf1");
    client->WaitForIdle();
    //Add a peer and enqueue path add in multicast route.
    BgpPeer *bgp_peer_ptr = CreateBgpPeer(Ip4Address(1), "BGP Peer1");
    agent_->mpls_table()->ReserveMulticastLabel(4000, 5000, 0);
    MulticastHandler *mc_handler = static_cast<MulticastHandler *>(agent_->
                                                                   oper_db()->multicast());
    TunnelOlist olist;
    olist.push_back(OlistTunnelEntry(nil_uuid(), 10,
                                     IpAddress::from_string("8.8.8.8").to_v4(),
                                     TunnelType::MplsType()));
    mc_handler->ModifyTorMembers(bgp_peer_ptr,
                                 "vrf1",
                                 olist,
                                 10,
                                 1);
    client->WaitForIdle();

    mc_handler->ModifyFabricMembers(Agent::GetInstance()->
                                    multicast_tree_builder_peer(),
                                    "vrf1",
                                    IpAddress::from_string("255.255.255.255").to_v4(),
                                    IpAddress::from_string("0.0.0.0").to_v4(),
                                    4100, olist, 1);
    client->WaitForIdle();
    //MulticastGroupObject *obj =
    //    mc_handler->FindFloodGroupObject("vrf1");
    //uint32_t evpn_label = obj->evpn_mpls_label();
    //EXPECT_FALSE(FindMplsLabel(MplsLabel::MCAST_NH, evpn_label));

    //Delete remote paths
    mc_handler->ModifyFabricMembers(Agent::GetInstance()->
                                    multicast_tree_builder_peer(),
                                    "vrf1",
                                    IpAddress::from_string("255.255.255.255").to_v4(),
                                    IpAddress::from_string("0.0.0.0").to_v4(),
                                    4100, olist,
                                    ControllerPeerPath::kInvalidPeerIdentifier);
    client->WaitForIdle();
    TunnelOlist del_olist;
    mc_handler->ModifyTorMembers(bgp_peer_ptr,
                                 "vrf1",
                                 del_olist,
                                 10,
                                 ControllerPeerPath::kInvalidPeerIdentifier);
    client->WaitForIdle();
    mc_handler->ModifyTorMembers(bgp_peer_ptr,
                                 "vrf1",
                                 olist,
                                 10,
                                 1);
    client->WaitForIdle();
    mc_handler->ModifyTorMembers(bgp_peer_ptr,
                                 "vrf1",
                                 del_olist,
                                 10,
                                 ControllerPeerPath::kInvalidPeerIdentifier);
    client->WaitForIdle();

    DeleteBgpPeer(bgp_peer_ptr);
    client->WaitForIdle();
}

// Bug# 1529665
TEST_F(RouteTest, evpn_mcast_label_check_with_no_vm) {
    client->Reset();
    AddEncapList("VXLAN", "MPLSoUDP", "MPLSoGRE");
    client->WaitForIdle();
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:01:01:01:10", 1, 1},
    };
    AddVrf("vrf1", 1);
    AddVn("vn1", 1, true);
    AddLink("virtual-network", "vn1", "routing-instance", "vrf1");
    client->WaitForIdle();
    BgpPeer *bgp_peer_ptr = CreateBgpPeer(Ip4Address(1), "BGP Peer1");
    boost::shared_ptr<BgpPeer> bgp_peer =
        bgp_peer_ptr->GetBgpXmppPeer()->bgp_peer_id_ref();
    client->WaitForIdle();

    BridgeRouteEntry *rt = L2RouteGet("vrf1",
                                      MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
                                      Ip4Address(0));
    EXPECT_TRUE(rt != NULL);
    RouteExport::State *route_state = static_cast<RouteExport::State *>
        (bgp_peer_ptr->GetRouteExportState(rt->get_table_partition(),
                                        rt));
    //EXPECT_TRUE(route_state->label_ != 0);

    autogen::EnetItemType item;
    stringstream ss_node;
    AgentXmppChannel *channel1 = agent_->controller_xmpp_channel(1);
    SecurityGroupList sg;
    CommunityList communities;
    channel1->BuildEvpnMulticastMessage(item,
                                        ss_node,
                                        rt,
                                        agent_->router_ip_ptr(),
                                        "vn1",
                                        &sg,
                                        &communities,
                                        route_state->label_,
                                        TunnelType::AllType(),
                                        true,
                                        rt->FindPath(agent_->multicast_peer()),
                                        false);
    autogen::EnetNextHopType nh = item.entry.next_hops.next_hop.back();
    EXPECT_TRUE(nh.label != 0);
    EXPECT_TRUE(item.entry.nlri.ethernet_tag != 0);
    EXPECT_TRUE(item.entry.nlri.ethernet_tag == nh.label);
    //Add VM
    CreateVmportEnv(input, 1);
    client->WaitForIdle();
    route_state = static_cast<RouteExport::State *>
        (bgp_peer_ptr->GetRouteExportState(rt->get_table_partition(),
                                        rt));
    EXPECT_TRUE(route_state->label_ != 0);

    //Delete all
    DelLink("virtual-network", "vn1", "routing-instance", "vrf1");
    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();
    DeleteBgpPeer(bgp_peer.get());
    client->WaitForIdle();
    bgp_peer.reset();
}

TEST_F(RouteTest, add_local_peer_and_then_vm) {
    struct PortInfo input[] = {
        {"vnet1", 1, "1.1.1.10", "00:00:00:01:01:01", 1, 1},
    };

    client->Reset();
    CreateVmportEnv(input, 1);
    client->WaitForIdle();

    //Add a peer and enqueue path add in multicast route.
    BgpPeer *bgp_peer_ptr = CreateBgpPeer(Ip4Address(1), "BGP Peer1");
    boost::shared_ptr<BgpPeer> bgp_peer =
        bgp_peer_ptr->GetBgpXmppPeer()->bgp_peer_id_ref();
    client->WaitForIdle();
    BridgeRouteEntry *rt = L2RouteGet("vrf1",
                                      MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
                                      Ip4Address(0));
    EXPECT_TRUE(rt->FindPath(agent_->multicast_peer()));

    MulticastGroupObject *obj =
        MulticastHandler::GetInstance()->FindFloodGroupObject("vrf1");
    EXPECT_TRUE(obj->vn() != NULL);
    DeleteVmportEnv(input, 1, false);
    client->WaitForIdle();
    rt = L2RouteGet("vrf1",
                    MacAddress::FromString("ff:ff:ff:ff:ff:ff"),
                    Ip4Address(0));
    obj =
        MulticastHandler::GetInstance()->FindFloodGroupObject("vrf1");
    EXPECT_TRUE(obj != NULL);

    DeleteVmportEnv(input, 1, true);
    client->WaitForIdle();
    DeleteBgpPeer(bgp_peer.get());
    client->WaitForIdle();
    bgp_peer.reset();
}

int main(int argc, char *argv[]) {
    ::testing::InitGoogleTest(&argc, argv);
    GETUSERARGS();
    client = TestInit(init_file, ksync_init, true, false);
    eth_itf = Agent::GetInstance()->fabric_interface_name();

    RouteTest::SetTunnelType(TunnelType::MPLS_GRE);
    int ret = RUN_ALL_TESTS();
    RouteTest::SetTunnelType(TunnelType::MPLS_UDP);
    ret += RUN_ALL_TESTS();
    client->WaitForIdle();
    TestShutdown();
    delete client;
    return ret;
}


Decorate for Easter brunch with these stylish hand-punched terra cotta eggs. Available in an array of sizes, create a colorful pastel display on a tabletop, mantel, or patio. An opening on the underside of the egg allows for the addition of a flameless candle for a warm glow.
Show off your decorated and dyed Easter eggs with this hand-crafted galvanized wire egg carrier. You can also take a cue from Terrain's styling and add spring flowers and grasses to transform this carrier into a festive tabletop sculpture.
Here is an Easter decoration that will be a hit among the kiddos. These fun felted wool bunnies are available sitting, lying on their backs, or holding a basket. We suggest going with the whole array for a most darling look.
It's no secret that the art of decorating is in the details. This darling rabbit tieback, available in oxford and silver, is just the sort of small accent that will freshen up a room for Easter.
Is it just us, or does the appearance of a hydrangea on the mantel or dining table signal that warmer weather and longer days are just ahead? Pre-planted in a woven grass pot, this snowy white hydrangea is the essence of Easter cheer and is the prefect addition to your springtime tabletop.
As much a serving platter as it is an art piece, this one-of-a-kind, hand-painted dish is the perfect centerpiece on your Easter table.
We're fond of decorated doors year-round, which makes this Easter wreath a must in our book. Handmade with straw and green sedum, the wreath is adorned with faux lemon leaves and a robin's egg-filled nest.
Made of paper mache and hand-painted with intricate details, this one-of-a-kind bunny wall mount is an ideal Easter accent that will add whimsy to your home décor.
Handmade in India and painted with traditional floral designs, this set of 12 paper mache eggs will bring the colors and joy of spring into your home.
Display all your sweet Easter treats on this beautiful and festive spring-inspired platter. Each tier is painted with a vintage-style bunny and a classic floral damask backdrop.


text:
Forum: Start | Profile | Search | Website: Start | The List | Community |
www.worldheritagesite.org Forum / Top 50 Missing /
World Heritage in California
Page 2 of 3: « Previous 1 2 3 Next »
winterkjm
Partaker #16 | Posted: 8 May 2014 10:52 | Edited by: winterkjm
meltwaterfalls:
In terms of heritage assets its strongest cards are selected 20th century residential buildings
Does anyone think the Village Green (Wiki Link) Housing might have a niche alongside a WHS like the Berlin Modernism Housing Estates. Or is that too far of a stretch? It was inspired and envisioned in the "garden city" style. The Village was built in 1942 and is listed as a National Historic Landmark. I've visited the site, the design and green space within the complex are quite special. But I often have no bearing when it comes to judging modern architecture and world heritage potential.
meltwaterfalls
Partaker #17 | Posted: 8 May 2014 11:11
winterkjm:
Does anyone think the Village Green (Wiki Link) Housing might have a niche alongside a WHS like the Berlin Modernism Housing Estates. Or is that too far of a stretch?
I guess it could shuffle into an underwhelming spot below the not exactly earth shattering Berlin Sites. They could play the planing around cars as its unique selling point in the same way that Natural Landscapes of dubious merit find some hitherto unrepresented tree/ fungus species to sneak them onto the list. There are other sites that have had more impact in regards to planning around the use of cars, but if they get there quick enough I guess they could nab that spot.
Throw enough time, money and effort at anything and you could probably get it on the list. But in missing this site on my visit last year I don't feel I missed anything of Outstanding Universal Value.
not exactly earth shattering Berlin Sites
Is the Berlin Housing Estates that underwhelming?
Potential tentative list for Los Angeles (highly speculative!)
1) Frank Lloyd Wright Buildings - Hollyhock House (Ennis House/Millard House?)
2) Greene & Greene Homes - Pasadena
3) Hollywood Golden Age - Movie Palaces & Historic Studios
Middle Tier
4) Watts Towers
5) Art Deco Monuments - Downtown Los Angeles & Wilshire
6) Village Green - Baldwin Hills
7) Case Study Houses (18 components)
8) NASA serial nomination (JPA - Jet Propulsion Laboratory)
Low Tier
9) Neutra Buildings - Silver Lake
10) Great Wall of Los Angeles
11) Missions of California (serial nomination)
12) Huntington Library and Gardens
As Meltwaterfalls and Solivagant have indicated, there are perhaps 2-3 nominations in Los Angeles that could really add something to the world heritage list. Some of the other examples illustrated here, are perhaps at best able to moderately meet the criteria of world heritage and would struggle to demonstrate OUV. Perfectly summed up by this spectacular statement!
In the same way that Natural Landscapes of dubious merit find some hitherto unrepresented tree/ fungus species to sneak them onto the list
It is more that they are fairly ubiquitous, which I would actually regard as part of its triumph. I've lived in/ been to so many places that are like them that visiting doesn't really feel that special. They are after all just everyday housing estates and it is pretty tough to get really excited about them, even if you go with a keen eye for architectural details and social history.
Solivagant
Partaker #20 | Posted: 8 May 2014 14:03 | Edited by: Solivagant
It occurs to me that another way of looking at the contribution of LA to "World Heritage" is to accept that tangible and immovable heritage is not the most appropriate area to look for it.
The very nature of LA has been fast changing and related to the production of intangibles. These are about novelty, experimentation, ideas, new cultural syntheses etc etc (and of course "MONEY"!!) but rarely do these produce buildings and landscapes of lasting value. So we should not expect to shoe-horn the City into a scheme designed primarily to help preserve such tangible creations.
I note that UNESCO's "Memory of the World Register" contains the "Wizard of Oz". Where is the best "place" to look for the contribution of MGM to world culture - in some ersatz "Studio" Park or in the output of the original studios?
Solivagant:
So we should not expect to shoe-horn the City into a scheme designed primarily to help preserve such tangible creations.
Where is the best "place" to look for the contribution of MGM to world culture - in some ersatz "Studio" Park or in the output of the original studios?
Very good point, there are other frameworks to pursue preservation or recognition.
Partaker #22 | Posted: 5 Sep 2016 14:38 | Edited by: winterkjm
All 3 nominations have been rumored as potential additions to the 2016 tentative list.
California Current Conservation Complex
Anza-Borrego Desert State Park
Camino Real de las Californias
Partaker #23 | Posted: 5 Sep 2016 22:28
Those look promising -- particularly the California Triple C. I'm hoping for some good natural or mixed sites from across the US to make the updated tentative list later this year.
Colvin:
While I would like to see Sequoia/Kings Canyon, Coso Rock Art District, Carrizo Plain, Greene & Greene: Gamble House, and Bodie Historic District; realistically they are all long shots based on interest, management, and in some cases OUV. California really should have more than 2 WHS, so if at least 1 or 2 of the above mentioned sites make it on the Tentative List I will be pleased.
vantcj1
Partaker #25 | Posted: 6 Sep 2016 11:49 | Edited by: vantcj1
California really should have more than 2 WHS
I agree with that list and with the sites which could be included this year on the USA's T List. Or the Death Valley NP, or San Simeon, or the Golden Gate Bridge & Park with Alcatraz and Angel islands, or Joshua Tree NP or so many others. I think California has been blessed with so many different natural features, so many different climates and so many historical periods and influences, that it could easily have more than 10 WHS.
Partaker #26 | Posted: 11 Sep 2016 14:02 | Edited by: winterkjm
vantcj1:
it could easily have more than 10 WHS.
After reading your comment, I started thinking about what 10 (or more) WHS would best represent CA and could potentially demonstrate OUV. When I write (potential for extension), Anza-Borrego could easily be part of a larger Mojave and Colorado Desert nomination including Joshua Tree and Death Valley.
Current WHS (2)
Yosemite National Park N
Redwoods National Park N
Current TWHS (1)
Key Works of Modern Architecture by Frank Lloyd Wright C
Potential Additions to the 2016 Tentative List (3)
California Current Conservation Complex N
Anza-Borrego Desert State Park (potential for extension) M
Camino Real de las Californias (potential for extension) C
My Additional Choices for WHS Candidates (4)
Sequioa & Kings Canyon National Park N
Bodie Historic District C
Coso Rock Art District CL
Carrizo Plain National Monument M
Honorable Mentions in LA (Potential, but difficult to argue OUV)
Bradbury Building C
Greene & Greene: The Gamble House C
Watts Tower C
Partaker #27 | Posted: 11 Sep 2016 21:33 | Edited by: tsunami
I have not finished reading this forum thread, but some notes so far:
Having lived in California for 35 years (and in LA for 30 years) and worked in Hollywood for 20 years, I have been to all the places mentioned in the post #26 and actually every single corner of the state. :) (Indeed after being unable to find where else to go in California and the USA, I moved to Europe 2 years ago.)
I was very impressed with Point Lobos State Natural Reserve when I first visited there in 1983. But I believe it is not part of California Current Conservation Complex. And I'm not sure if this Complex is something comparable to the other WHSs of Papahānaumokuākea off Hawaii or the Gulf of California or Archipiélago de Revillagigedo in Mexico.
As to Carrizo Plain, I have even lived in Taft for 2 years in the 1980s. I used to go to Soda Lake to get some free natural salt. Some people in Taft have been doing so for decades, but probably not after it became a National Monument in 2001. Yes, oil is blood of Taft, as seen in the movie "There Will Be Blood."
But my point is:
What seems to be missing from the list in #26 is the Ancient Bristlecone Pine Forest in the White Mountains District of the Inyo National Forest. This is the location of the world's oldest trees: Ancient Bristlecone Pine. They say this is where Radiocarbon Dating was developed by measuring these trees by a UC Professor who later received a Nobel Prize for it. This may give it even more OUV.
Well, actually, there is probably no other places in California where they want less visitors than here, so they would hate me for mentioning it here. :) They know where the Methuselah Tree (the single oldest of the oldest trees back when I visited, but now the 2nd oldest) is but never tell the public where it is.
And how about Manzanar National Historic Site?
tsunami:
What seems to be missing from the list in #26 is the Ancient Bristlecone Pine Forest at the White Mountain District of the Inyo National Forest (I'm not sure if this is mentioned elsewhere on this thread). This is the location of the world's oldest trees: Ancient Bristlecone Pine. Well, actually, there is probably no other places in California where they want less visitors than here, so they would hate me for mentioning it here. :) They know where the Methuselah Tree (the (2nd) oldest of the oldest trees) is but never tell the public where it is.
I love the Eastern Sierra region in general, so I am inclined to agree to your proposals! Ancient Bristlecone would be great. Manzanar is tough for OUV since much of the remains are gone. It would be a complicated nomination, since preferably you would include several other Internment Camps across the country. Lastly, the US has shown a tendency to steer away from such nominations, for the so-called negative connection regarding the World Heritage movement. I think the NPS prefers the story told within the context of the American story. The US UNESCO delegation felt the same way about the Hiroshima Dome and other sites connected with crimes against humanity or genocide.
I was very impressed with Point Lobos State Natural Reserve when I first visited there in 1983. But I believe it is not part of California Current Conservation Complex.
Yes, I am not sure about this either. Its a bit South of Monterey Bay, but it would be a shame if it was not included!
nfmungard
Partaker #29 | Posted: 12 Sep 2016 05:25
It is more that they are fairly ubiquitous
Victims of their own success ... I have to say, though, that the original buildings have an artistic quality sorely lacking from what was built later.
Re sites to add for California. Obviously, primary reason is the US (un)willingness to submit sites in the first place.
Taking a top down approach, I would see the following themes for California:
* Natural. Plenty. Sequoia is great. John Muir is great. Plenty of deserts ...
* Pre Columbian. No idea, but some native sites must remain in California, too.
* Spanish: Missions? Anything else? Obviously, this has to be aligned with what you find in Mexico.
* 20th Century Architecture: Art Deco, Modern, ...
* Themes: Movies
Last but not least: Most popular theme ever, Wine in Napa :)
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.
What are they doing all day in Paris anyway? WHC Sessions WHS Top 200 Top 50 Missing General discussions about WHS WHS in the media Other ways of collecting WHS Third party initiatives Does this one count? How do I get to visit Aldabra? Countries About this website Connections

redpajama_set_name: RedPajamaCommonCrawl


All products must be returned with reasonable care having been taken (such as must not show wear or damage, and must be in a condition that permits us to resell them). All returns and exchanges must be accompanied by the original documentation, instruction manuals, registration, parts and components and the original manufacturer packaging. Failure to include such items may prevent or delay your refund or exchange. 'Pooja Law House' reserves the right to deny any return if it fails to meet the return criteria and conditions.


Awesome Mind Secrets! - Awesome Mind Secrets!Awesome Mind Secrets! | Awesome Mind Secrets!
Jesus said to always turn the other cheek, when someone did you wrong. In other words, it means to forgive, because humans are subjected to error. Whether they do it on purpose or without having sufficient knowledge, doing it involuntarily, people make mistakes, often hurting others. But this is more than just spiritual advice, also having effects on our mental state and overall well-being. Does holding a grudge against someone make your life better? Does it make you happier? The answer is no, because this feeling is charged with negativity, making you feel irritable, unhappy, disappointed, sad, and even depressive in some cases. Forgiveness helps us bring closure to an event that hurt us.
When we say the word forgiveness, we often think about people that did something that hurt us or disappointed us. But, it should also include our own person. It is wise to know how to forgive ourselves, and live in peace and harmony with who we are. We all make mistakes and it is part of life to learn from them. It doesn't matter that you failed at an exam or chose the wrong partner for your romantic relationship, because both of these things and others as well, can be remediated, once we learn the lesson that needs to be learned. If you failed at an exam, it means that you will need to study more and be better prepared, so you will succeed next time. If you realise that the person you are dating is the wrong one for you, you can end the relationship and move on. We do our best to make the right decisions, although time will prove that these choices are not always the best option. So we need to be able to accept our mistakes and forgive ourselves, so we can move on and be happy. The absence of self-forgiveness can lead to destructive behaviours like suicide attempts, alcohol abuse, drug abuse, or eating disorders.
But how about forgiving others? When someone hurts us, the immediate feelings that seem to overwhelm our mind and body are disappointment, anger, sadness, resentment, and even revenge. We also have the tendency to avoid that person, refusing to see or talk to him or her. But is this the smart way to react? As time passes by and our wounds heal, we will start to realise that what we thought happened was mostly made-up in our imagination. Many marriages, friendships or family relationships have been destroyed this way, because one person could not even entertain forgiveness. It can be very hard to remake a connection that was broken abruptly, as the more time passes by, the harder it gets to establish contact with that person. So we come to realise that we lost a friend or someone dear because we were not able to forgive, losing years that could have been very nurturing and meaningful.
It is impossible not to get hurt at some point, because people will say or do something wrong that will lead to you getting hurt, without them even knowing what they are doing. For example, your mother criticised your cooking skills, or your colleague left you to team up with someone else for a project. There are many similar common examples of situations that occur, making us feel resentment, hate, and bitterness with the people involved. So, the question is, can we really live happily this way? Can we hold on to so much hate and bitterness for all the people that hurt us, in one way or another? If you have been hurt already, you probably know just how hard it is to live engulfed in negative feelings. That is why we need to practice forgiveness, because without it, our lives can become sunken in sorrow.
So what are the benefits of forgiveness? First of all, it will help you let go of the bitterness and anger you feel, allowing you to welcome in peace and happiness. It will enable you to maintain healthy relationships with the people around you, while also promoting greater psychological well-being. You will feel much better after forgiving someone, releasing the tension from inside yourself, and your overall health will benefit from lowered blood pressure and a boosted immune system.
For people that are not familiar with the term, NLP means Neuro-Linguistic Programming. It is a methodology used worldwide by life coaches, with the purpose of improving the quality of life for the ones they train. People often have the sensation that it is impossible for them to do something, or reach a particular goal. But that does not mean that they are physically or mentally unable to do it, it is usually because they have set limits in their minds, which keeps them from doing particular things. These boundaries are set by ourselves, in a conscious or unconscious manner, and overcoming them can help us become a better person, a successful individual, who believes anything is possible and has a more positive outlook on life.
So, as you can see, NLP Coaching is more of a psychological approach, meant to help people improve their lives, interpersonal skills, communication, behaviour, and sustain a happier, more fulfilling life. Most people cannot achieve a particular goal due to a type of blockage they have in their mind. This blockage may be caused by something they consider to be a problem, something they cannot overcome or handle. So, a question used by NLP coaches can be, "How do you manage to… (a problem or challenge)?". Since most people do not realise or admit they have a problem, the first step to releasing this blockage is to make them notice what the problem is. Then, the next step, after realising, is to help them find a way to solve it.
"If there was a miracle tonight, how would you know?" it is another question used in NLP coaching. It is a question with powerful meaning, meant to help people discover what they want in their lives. There are many out there that are confused and don't really know what they are after, leading a dull life. The question is also very useful for helping a person find a solution to a very challenging problem, which usually inhibits them from achieving their biggest goals. Another question might be, "What stops you?", as it is a very clear and straightforward way of putting things. Sometimes, it is best just to face the issue in a direct manner because many people are not aware of the blockage they have created inside their mind, which stops them from being happy. It's a good question to ask when people say, "I can't", placing an invisible barrier in front of their possibilities and choices.
The entire purpose of NLP coaching is to make a person recognise his or her values, skills, capabilities and potential. The environment, personal habits and many other factors may influence someone to create limits, like "I can't" or "It is impossible for me to…". But who set those limits? Only you, because even if the people around you says it is impossible, it doesn't really mean it is. By limiting ourselves, we do not give ourselves the chance to get what we want from life and live the way we really want. And NLP is here to help us overcome our boundaries and limits.
Never satisfied with the way you look? Feel like you are not good enough in comparison with the people around you? First of all, you should never despise yourself. If you don't think you worth much, why should others think any different? Also, why do you have bad thoughts about yourself? It is not pleasant to hear them coming from another person, so then why do you do these things to your own person? Here are some ideas an tips to improve your image and your opinion about yourself.
Stop looking at others and wishing to look just like them. That is insane, not to mention that it's impossible either. Each human being is unique and it's good to acknowledge that. The person next to you may be unique due to his or her curly hair. You may have other advantages, like beautiful eyes, silky hair, tall legs and many other characteristics. Look in the mirror and focus only on the advantages you see.
Don't go to the salon only when the holiday's are approaching. Make it a more regular habit, since feeling pampered will definitely get you feeling better about yourself. Don't go out of the house without minimum care, like combed hair, a bit of gloss, mascara, or a clean shirt and being shaved, in the case of men. The respect you're giving to yourself will be reflected in the respect others will manifest towards you. So it is important to let others see that you appreciate yourself enough.
It is wrong to think that clothes and small accessories cannot improve the way we look. Of course, we should not transform clothes shopping into an obsession, but buying baggy and unattractive clothes are not a solution either. You can afford from time to time a scarf, a lovely blouse, some beautiful shoes, or a pair of earrings. Whatever makes you feel more beautiful and manages to brighten your day. Just a small item, such as a hat, can make you feel happier and even more stylish.
You will definitely not be able to feel good if the house you are living in does not emanate positive vibes. Pick your favourite colour and change your curtains, buy some nice pillows and some small decorative items. Make sure everything is properly cleaned and aired. You can even buy some scented candles to make the place warmer and smell better. Perhaps even get a few green plants. You will see just how valuable the space you're living in is when it comes to your mood and opinion about yourself.
We all have a dream that is bigger than everything else in our life, a dream that we all hope will come true one day. But you cannot aim right from the start to achieving that dream. You have to build a strategy consisting of a series of personal goals, which will create the stairs you need to climb to reach your biggest wish. How do you think successful people become successful? By just sitting around and waiting for things to happen? Not at all, because these people have a strict set of personal goals to achieve, and they will work hard and do everything that is necessary to fulfil them.
Setting goals will motivate you to become better at what you do, and every reached goal will give you the confidence and strength you need to move forwards. If you've ever heard about the visualisation method, where you clearly picture your biggest wish inside your mind, so that you will eventually enjoy it for real, you should know that is realised by setting smaller goals. So this is why it is important to set personal goals, even if they are smaller, because they will help you reach the big picture goal you desire. Here are some tips on how you can set those goals.
You need to take some time with yourself, in a quiet environment and think about what you wish to do with your life. What are the most important things you want to achieve? Think about what you wish to do in the present, near future and distance future. And think well, as some decisions might influence your life. Also be true to yourself, and write down only the things that make you happy.
You will also have to have a clear picture in your head about making these goals happen. Compose a plan for each of the goals, stating when you are going to start, what needs to be done, location, costs, any details that will make the goal look and feel achievable. Without a plan, you are less likely to succeed.
Keep the paper with the goals and plans somewhere close to you, so you can look at it all the time. Also, you could even let a couple of friends or the family know what you intend to achieve. Because once the word is out, you will work hard to do everything in your power not to fail, now that everybody knows. So it is an excellent way to remain motivated.
Don't postpone the start of a plan designed to reach a goal. Respect it and stick to it, if you wish to enjoy the results. But also be prepared to face some changes that you cannot foresee that might change your plans a little. Don't panic, just make the necessary adjustments to the plan and keep the primary objective. Plans can change and can be modified if that helps you achieve a goal. So you can be as flexible as you want, as long as the goal stands up, and you are on the way to grab it.
Remember that piece of paper where you wrote down all the goals you wish to achieve. Well, you will have to assess systematically all of those objectives. Why? As life shifts, people can change too, so you need to make sure you want to go for those goals and that they are suitable for you. If something does not look right, or you're not so keen on achieving a particular goal, just modify the list. Write a new goal, better for your current position, and craft a plan to achieve it, just like you did with the rest of them.
Believe it or not, the way you breathe can have a great impact on your emotional state. If you notice that your breathing is fast and shallow it is time to relax. Take a few moments and breathe as profound and calm as you can, several times. You can even accompany the breathing with yawning and stretching, as these are known to be good for blood circulation. Ready to feel more relaxed?
Constantly working and not allowing yourself brief moments in which you can relax, will increase the stress levels and make you more vulnerable to negative emotions. Try to stop for a few minutes, after every hour worked, and unwind a little. You will feel much better for it throughout the day.
Yes, daydreaming is great for relaxing your brain and improving your mood, especially if your mind thinks about great things and places. So it is an excellent way to forget about daily stress and lower blood pressure. Just be careful where you choose to do it, and stop it when necessary. A meeting, for instance, would not be such a great place for this exercise.
Don't allow your negative thoughts to take over you and your situation. Always be careful about what you're thinking, especially when it comes to those negative thoughts that ruin your mood. If you notice you start having negative thoughts, just stop, erase them and immediately try focusing on something else, more positive. Thoughts influence your behaviour and what is happening around you, so allow only positive thoughts.
Laughter is the best therapy when it comes to chasing away stress and getting the mood right. Always make some time to do those things that can get you to put a broad smile on your face. Play even, as games are a great way to do some fun activities and have a laugh. You need these to start looking on life's brighter side and not consider emotions like a personal attack.
It is true that perhaps you are not entirely satisfied with some aspects of your life. But feeling sorry or miserable about them won't help at all. Instead, be grateful for everything you have. Take a few moments, especially in the morning when you savour your coffee and be thankful for what life gave you until now. There are many that don't have even a quarter of what you're enjoying. Keep a positive attitude and be grateful, and everything that's missing will come to you.
Meditation is great for regulating mood and emotions, so don't hesitate to give a few moments per day to do this. It only takes a few minutes. You can use some meditation music, or just listen to the wind and birds, concentrate on breathing and allow positive thoughts. You will feel rejuvenated.
It's a fascinating part of the human experience; we can feel and behave really resourceful in some situations but feel shut-down in others. This could be due to behavioural conditioning or just bad habit. But the fact is as a human being you can re-learn or re-program your responses to situations. It's just a matter of accessing the appropriate resourceful states of being within yourself and transferring them into the contexts where you need them.
1. Think about a situation where you would like to feel more resourceful and have increased behavioural flexibility. e.g.) communicating with a co-worker, interacting with a family member, being on a date etc.
2. What resourceful states of being would help you in this situation? Playfulness, Calmness, Curiosity, Awareness?
3. Now embody this state of being by allowing your hands to express this feeling; simply go ahead and let your hands express this state in whatever way feels best for you. Practice this movement a few times so that you can re-access the resourceful state easily with those hand movements.
4. Now think about the situation you choose in Step 1: What is the first thing you will see or hear just before it would be really beneficial to access the desired resourceful state of mind?
6. Do this a few times from Step 4 to anchor in the resourceful state into your subconscious mind.
7. Break State: Think about something totally different; like what did you eat for breakfast or where are you going on holiday?
8. Now think about the situation you choose in Step 1 and notice how you feel about it now.
Bringing more resourcefulness and behavioural flexibility into the different areas of your life will lead to more satisfaction and happiness. Rather than thinking about, "Why am I not able to be resourceful in this situation?", ask yourself, "How can I be more resourceful in this situation?" and then go one step further by practicing an exercise like the one above because it will help you re-program your automatic responses at the subconscious level.
Known both as competing or forcing, it means to hold firmly onto your own opinions and concerns, regardless of the level of resistance you receive from your opponent. It is a technique used when you meet hostility and aggression because it can come with a quick solving of a conflict, especially when other methods failed. But this method may be energy consuming, so if you choose it you should be prepared for a long battle.
As the name suggests it, this involves a more diplomatic approach to the problem. You should try to work with the opponent and try to find a middle ground solution for solving the issue so that you are both content in the end. This method is more beneficial because it gives both parties the opportunity to collaborate together, creating a solution that is much better compared to the previous method. It increases both the satisfaction of solving the conflict and of being able to create a better solution.
You already know that by accepting a compromise, both parties agree to a solution that only partially satisfies both of them. It is one of the fastest ways to solve a conflict, and may be best when there is little time to resolve the conflict. It may also be adopted as a temporary solution, while still searching for a way to satisfy both parties, because it can lower stress levels, allowing you and your opponent to concentrate better on finding a middle ground.
When using this method, it means that you will let go of any of your concerns and opinions, avoiding the conflict by all means. It may be a solution when you are facing aggression, as it will give you time to focus on more important aspects or will allow the creation of a better mind-set to express your point of view.
Also known as smoothing, it means to put another's concerns in front of your concerns. It may help to find what are the best interests, leaving aside the ones that are not that important. Also, it gives you the opportunity to look at the issue using different perspectives. Although, be cautious, as there is the risk of being abused or for the opponent to take advantage of you. There is a certain balance and skill from your side, to avoid these things from happening.
You may think that this name is just a coincidence, but it's actually not, and it does represent a form of magic. Sigil comes from the Latin word "sigillum", which means seal. In Hebrew, for instance, "segula" comes with the meaning of action or talisman. Now you may wonder whose seal it is. Or how can one use such a seal? It is actually a symbolic representation of the intentions of a magician or of one that practices magick. It is not a recent discovery since sigil magic was used centuries ago as well. Many books found, which belong to medieval times, contain these magical symbols; so it looks like people did seek the help of these seals throughout history.
In the occult manifestations of the medieval times, the sigil was represented by symbols of angels or demons, which could be summoned by the magician. Also, think about the Germanic runes, or symbols encrypted on stones, dating back to the Neolithic era. So this may look like an ancient form of magic, meant to put to use the Universe's forces. A controversial list, containing such sigils, is "The Lesser Key of Solomon", which is said to contain 72 sigils, belonging to princes of Hell. Considered to be the symbol that represented the real name of the entities, it is said that the magician who had the list could have controlled and summoned the beings.
Today, this method is used in the so-called Chaos Magick, and it is said to work this way: A magician thinks about an intention and writes down that statement of intent. Next, he cuts all the vowels out. After cutting the vowels out, he must check to see if the remaining letter have duplicates. If there are duplicates, he must cut down all the duplicates so that every letter has a single representative. Then, with the remaining letter, he can craft his own sigil. It can be of any shape or design, chosen by the magician. To actually work, the sigil must be charged with his energy. Either he turns to a meditative state, uses his sexual energy or blood, through an energetic outburst or just by declaring his intention. The sigil is then used as a discreet symbol written on a piece of paper, in a crystal, on a piece of wood, whatever works for the person using this type of magic.
These sigils are summoned or utilised by the will of the one that holds it, mostly in the attempt to obtain something or to create a favourable environment. A sigil is something private and will be kept well hidden, so you will never come across a magician willing to share his sigil. The point is that this old form of magic survived the passing of time and ended up being used in the modern times as well. Is it actually working? Or have people just been trying to figure it out for centuries now?
Stop and take a look around. We live a stressful life that unrolls so fast, in a modern society that puts importance on speed and superficial things. We all have one life to live, and we might miss all the simple beauties found on this planet after we depart. So we need to slow the pace down, relax, stop our continuous chase after things that don't matter and find happiness in the simple things. The world we live in is a fascinating place, but you must dedicate some time to notice the small miracles around you.
Whether you take a stroll in the park, or you enjoy an outing in the suburbs or a more natural environment, enjoy the beautiful chirping of the birds. You will be amazed how many sounds these feathery little creatures can create. Sounds that cannot break through the crazy noise of a busy city. Their pleasing sounds will sooth your inner being and will make you feel more alive.
Being near a water course, whether it is small or big, a waterfall or a mountain spring, the sound of moving water is beautiful music for your soul. Probably the best water flows are the sparkling mountain springs. Just look at the crystal clear water as it plays under the sun rays. Or just closing your eyes and hearung the sounds as it passes over rocks and follows its way to a distant point, can put you in balance with the beauty of the world.
Each plant, regardless of its shape, is a beautiful creation of nature. They have been on this planet for a long time, before we even evolved into what we are today. These simple live forms managed to adapt to any environment condition and to take their existence in complete silence. Again, take the time and look at their bright green, vivid colours of their flowers and delicate scent. Even the smell of grass can make you feel free and careless. A day out in an untouched green wilderness will get you to see life with different eyes.
Trees are silent witnesses that carry with them the shadows for the past years. They live longer than us, so they carry an energetic charge than can be rather impressive. Feel the texture and smell of the bark, look at the intricate branches and fresh green of the leaves. Go up to the mountain and breathe the resin of the coniferous trees. Your blood pressure will soften; you will feel calm immediately and in touch with these lovely giants.
Take a journey outside of the city. Somewhere at night where there aren't so many surrounding lights. A cottage up in the mountains can be the best retreat to look at stars, as you need complete darkness to see their beautiful flickering light. Seeing the multitude of stars, you will realise that there are so many galaxies out there, all formed by the same laws of physics. We are so small in comparison with the vast Universe, and we should enjoy them and connect with this great entity as much as we can.
To get in connection with the beauty of the world, you need to be surrounded by it. To refill your batteries and feel refreshed and complete, take a short vacation somewhere far from any trace of civilisation and live simple, just by enjoying the wonders of nature. Respect the environment and don't try to harm its beauty with modern means of living; it would be a shame, not to feel a part of it, for at least a short while.
Having a pet, if you can take up the responsibility, is a nice form of therapy and a way to connect to the pure and beautiful side of life. These unreasoning creatures have an amazing way to connect with us, so we should find a way to connect with them as well. If you cannot keep animals on your property, try setting up bird houses, or a squirrel feeding ground if you have any of them where you live. Having life and animals around your house is just another way to enjoy the beauty of nature's creations and feel more connected with it.
Stare at yourself in the mirror and begin talking gibberish to that person in front of you. "Blah de blah blah blaaaah!" Why not pull funny faces to? How long can you grin your biggest grin before cracking up laughing?
Think about a situation that causes you stress. Picture it in your minds eye; SEE YOURSELF in the situation, and notice the other people and the surroundings.
Now imagine placing a gallery frame around that picture; is it a thick golden frame? Is it oval or rectangular or another more interesting shape. Play with this and notice how it changes your emotional response.
Do you have one of those special friends that are really good at helping you laugh at your sorrows and woes in life? Think about their special laughter. Hear it nice and loud in your mind. And now think about one of the situations in your life that is stressing you out. Now hear your friends laughter nice and clearly. Repeat this process a few times; that should lighten your emotional response to the situation you choose.
Now just remember, in future, you can pull your Angel of Clowning out of your pocket anytime you need to lighten up.
The exercises above are simple and fun to do. If you practice them regularly it could surprise you how much you lighten up in your everyday life. Doing something to reduce the effects of stress and anxiety is essential these days for our overall health and well-being. So why not share these exercises with friends and double the fun!