Revision 9429b033 src/vnm/VirtualNetwork.cc

View differences:

src/vnm/VirtualNetwork.cc
571 571
{
572 572
    int rc;
573 573

  
574
    string  model;
575 574
    string  ip;
576 575
    string  mac;
577 576

  
578 577
    ostringstream  vnid;
579 578

  
580
    map<string,string> new_nic;
581

  
582
    model   = nic->vector_value("MODEL");
583 579
    ip      = nic->vector_value("IP");
584 580
    vnid   << oid;
585 581

  
......
605 601
    //                       NEW NIC ATTRIBUTES
606 602
    //--------------------------------------------------------------------------
607 603

  
608
    new_nic.insert(make_pair("NETWORK"   ,name));
609
    new_nic.insert(make_pair("MAC"       ,mac));
610
    new_nic.insert(make_pair("BRIDGE"    ,bridge));
611
    new_nic.insert(make_pair("NETWORK_ID",vnid.str()));
612
    new_nic.insert(make_pair("IP"        ,ip));
613

  
614
    if (!model.empty())
615
    {
616
        new_nic.insert(make_pair("MODEL",model));
617
    }
618

  
619
    nic->replace(new_nic);
604
    nic->replace("NETWORK"   ,name);
605
    nic->replace("NETWORK_ID",vnid.str());
606
    nic->replace("BRIDGE"    ,bridge);
607
    nic->replace("MAC"       ,mac);
608
    nic->replace("IP"        ,ip);
620 609

  
621 610
    return 0;
622 611
}

Also available in: Unified diff