summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Update Journal Variable NamesGunnar Mills2017-10-261-1/+1
| | | | | | | | Journal entry variable names should be uppercase. https://www.freedesktop.org/software/systemd/man/sd_journal_print.html Change-Id: Id07900aab1a8f5f6fd13bc4ec5ea5602e8780a8d Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Network factory reset: don't recreate VLAN interfacesMichael Tritz2017-10-251-0/+7
| | | | | | | | | | | | | This commit fixes a defect with the network factory reset. When VLANs are created on a particular interface and that interface is reset, the VLANs should disappear. They weren't disappearing; they were being deleted and recreated during the reset process. This commit stops the VLAN interfaces from being recreated. Resolves openbmc/openbmc#2478 Change-Id: I46dd0183185cc57f3dd8680cf1ac8404c9fd316a Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* Remove existing netman_watch_dnsVishwanatha Subbanna2017-10-242-404/+1
| | | | | | | | | | | | This daemon catered to watching for DNS entries supplied by DHCP and updating resolv.conf. Now that this functionality has been merged into network manager daemon, this daemon needs to be deleted. Fixes openbmc/openbmc#2107 Change-Id: I6c10d0fb2d3701a5e7027f8164cd830f34be63bc Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Integrate inotify watcher into network daemonVishwanatha Subbanna2017-10-248-33/+52
| | | | | | | | | This commit integrates watching for DNS entries and updating /etc/resolv.conf functionality into network manager daemon as opposed to having another daemon doing just that. Change-Id: Id858815675ed4a23ee8c6a31ba3ae6e5ee0054fd Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Add inotify watch supportVishwanatha Subbanna2017-10-245-3/+354
| | | | | | | | Added code to register for inotify events on the needed path and the user callback on events Change-Id: I90529f8e96fcbecfe0a1b943c3c435dab79222c3 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Add gitignore fileVishwanatha Subbanna2017-10-241-0/+57
| | | | | Change-Id: I01b705d155c70f20dd6dc06db4dafc9e548beccc Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Add function to write DNS entriesVishwanatha Subbanna2017-10-245-15/+207
| | | | | | | | Added function to write DNS entries to specified file Also, added test case Change-Id: I64250c7ee3cf7db3e7f8b5cf1669c7b4a7738637 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Enable zeroconf while writing configuration fileNagaraju Goruganti2017-10-122-1/+2
| | | | | | | Resolves openbmc/openbmc#2265 Change-Id: Idf8200fa92d82ee8de4f23e27a2816efae356ea0 Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* IP Address use case validationNagaraju Goruganti2017-10-115-13/+120
| | | | | | | | | | | -validates IPAddress/gateway using inet_pton api. -validates prefix length for ipv4/ipv6. -if dhcp is enabled, it won't allow to set ip/gateway. Resolves openbmc/openbmc#1671 Change-Id: I76c1d9d11dfb59002eb1310d87e94ee622714a4a Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* Test: Add test cases for NTPRatan Gupta2017-10-111-1/+13
| | | | | | | Resolves openbmc/openbmc#2106 Change-Id: I93bbbb1178dc47fa94f98719185630020e00edda Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement configuration of NTP server supportRatan Gupta2017-10-114-4/+53
| | | | | Change-Id: I8d471dbc6ea7ec62cbcc157565a7b39cd5031caa Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Reduce the number of restarts of systemd-networkdRatan Gupta2017-10-116-27/+61
| | | | | | | | | | | | | Start the timer once we get the dbus request and wait for timeout if we get the dbus request in meanwhile, reset the timer and wait for timeout. Listen for ipv6 rtnetlink address also. Resolves openbmc/openbmc#2227 Change-Id: I3f448e84107826defafb9ada523c1ab08ec1b971 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement delete all interface.Ratan Gupta2017-10-112-16/+43
| | | | | | | | | deletes all the ipaddress object on the interface. Resolves openbmc/openbmc#2141 Change-Id: I6f045758ff29080cb4a4dec9e8b0d23d932c55b6 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Create the default network file during startup of network managerRatan Gupta2017-10-033-37/+76
| | | | | | | | | | if network file is not on the system then create the default network file with dhcp enabled. Resolves openbmc/openbmc#2332 Change-Id: I9e523c76f684dcb2951a0a730f94b11f326b5489 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Restart the systemd-networkd after setting the MAC addressRatan Gupta2017-10-031-0/+7
| | | | | | | | | | | | In the case of DHCP enabled box,DHCP negotiation should be initiated after change of MAC address. Shouldn't wait for auto-renegotiation,as if different machine gets the old mac address then we can have duplicate IP problem. Change-Id: Ifde1a09762c9b9a717ffe7b258d5046f92b9bf1a Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Restart the network through networkManagerRatan Gupta2017-10-038-16/+50
| | | | | | | | | | | | | | | Extend the refresh timer once we get the Dbus request which requires network restart. Detaching the network restart from the writeConfiguration func. Write the configuration file for the vlan interface in writeConfiguration func. During creation of vlan,vlan interface should come up with dhcp as false. Change-Id: Iadc7b44554aca412d211d13e9569cc601ad04074 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement getInterfaces in utilRatan Gupta2017-09-294-14/+52
| | | | | | | | | | | | getInterfaceAddrs returns the map of interface and associated address,if there is no address associated with the interface,then we don't get that interface. This API gets all the available interfaces on the system. Change-Id: I86f07d6e9950a15547cb74356939ca40368bddcc Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Grammar fixes for util.cppGunnar Mills2017-09-261-1/+1
| | | | | Change-Id: If9b52187610651afc9d800bf6f5f3b81b1f1df19 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Network factory reset: Log InternalFailure in case of failureMichael Tritz2017-09-251-2/+2
| | | | | | | | | This commit creates an InternalFailure error in the event of a factory reset failure. This error was added to the factory reset interface as a part of openbmc/openbmc#1721. Change-Id: Ia13df96823c3566da71a10cc945db15c205a2932 Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* Don't create the IP objects explicitlyRatan Gupta2017-09-131-6/+1
| | | | | | | | | | | IP objects would be created automatically once network manager detects the address change event. Resolves openbmc/openbmc#2171 Resolves openbmc/openbmc#2258 Change-Id: I2ac26992ac992f25154f0e1bf34c1faf185c4377 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Recreate the network objects once the timer expiresRatan Gupta2017-09-132-7/+32
| | | | | | | | | | As we get multiple network change events once systemd- networkd starts,This commit starts the timer once it gets the network change event and refresh the network objects once the timer expires. Change-Id: I86d1547763d03f527a8bdb04e2b2780f6cd6fdc2 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Add the timer classRatan Gupta2017-09-133-2/+230
| | | | | | | | | Usage would be instantiate the timer with the call back and start the timer with the time. callback will be called once the timer expires. Change-Id: I09394264ba18bd90a1c101fc77bc45f7268c5db0 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement network monitorRatan Gupta2017-09-136-13/+278
| | | | | | | | | This commit listens for the ipaddress add event and prints the message once it gets the NEWADDR signal. Change-Id: I5cdebc023dc8848fc736eca8d785c33387d401df Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Disable zeroconf in factory reset modeRatan Gupta2017-09-091-1/+1
| | | | | | | | Will enable it later,Need to enhance the code of IPMI in the case of ZeroConfigIP. Change-Id: Ic997c26525c7f4f8be9d5a48f1dbbd9e35bc96f5 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement Set function for MAC addressRatan Gupta2017-09-096-10/+302
| | | | | Change-Id: I16992dda259246a66512792f06cbbb874e56a15d Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* DHCP value was not getting updated correctlyRatan Gupta2017-08-312-16/+17
| | | | | | | | | | | | | This commit fixes =>Disable zeroconf. =>Correct the network conf file path in factory reset. =>Updating the DHCP value correctly. Resolves openbmc/openbmc#2230 Resolves openbmc/openbmc#2215 Change-Id: I8f87c2afb53cc952755165d34bfb62b8aba80fe5 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Dereference network-manager.conf from netman.pyDinesh Chinari2017-08-252-43/+33
| | | | | | | | Removed conf/network-manager.conf use from netman.py. Instead using mapper call to retrieve network inventory path. Change-Id: Ifaa5d356c7ba59791303401df6bb2cbcecf70729 Signed-off-by: Dinesh Chinari <chinari@us.ibm.com>
* Change the dhcp configuration parameters default value to trueRatan Gupta2017-08-243-4/+15
| | | | | | | | set the link local addressing to yes so that the interface gets the zeroconfig ip, if unable to get the ip from DHCP server. Change-Id: I7e5351662c45863e3d15d49151bfdfb8d9096e11 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* vlan:Remove the multiple implementation of sdbusplus objectRatan Gupta2017-08-223-6/+7
| | | | | | | | | | | | | | | This commit removes the multiple implementation of sdbus server object from vlan_interface class,Due to this mapper doesn't recieve the interface remove signal which leads to showing the dbus object which is not there. This commit also fixes the order of claiming the bus name. Resolves openbmc/openbmc#2150 Resolves openbmc/openbmc#2152 Resolves openbmc/openbmc#2185 Change-Id: I00b0e9d70abbe1073d20fb0d0e2d8a9ef0300c31 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* EthernetInterface: Simplify the code to fetch the mac addressRatan Gupta2017-08-132-37/+16
| | | | | Change-Id: I7db6b2379e1794019a8676048ee7dcf3de262a6d Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Add test cases for VlanInterfaceRatan Gupta2017-08-132-4/+202
| | | | | Change-Id: Ifd2507b12f39c44857af8bcf6ea57f7d1daa7ac3 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* vlan:Minor FixesRatan Gupta2017-08-133-4/+11
| | | | | | | | | =>Get the dhcp value from the conf File for the vlan interface. =>Assign the mac address of the parnt interface to vlan interface. =>Create the ipv6 child ip objects once create the vlan interface. Change-Id: I1d73fb18f9d300cbdcf94c73f06df2ea4a1d019b Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Move getDHCPValue function to utilRatan Gupta2017-08-134-34/+38
| | | | | Change-Id: Id90e60aec666e5098358f1890fbdead6744e2675 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Remove vlan device files during factory resetRatan Gupta2017-08-131-16/+7
| | | | | Change-Id: I7ef2adcb7c29bcc22c53b8cb7ba73d5c8cc90602 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* vlan: implement delete interfaceRatan Gupta2017-08-137-14/+143
| | | | | | | | | Delete the in-memory vlan object,Also deletes the associated device file and the network file. Change-Id: I613e31aaa4fa9172c6226765ac044481ffbd88ec Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Load the VLAN interfaces from the systemRatan Gupta2017-08-133-8/+58
| | | | | | | | | At start up Network Manager creates all the interfaces by reading it from the system.This commit creates the vlan interface after reading it from the system. Change-Id: I38e6f3b776f834e33d17e4e88f700b4f52af4048 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Move the implementation for writing conf to interface classRatan Gupta2017-08-135-119/+161
| | | | | | | | implementation of writing interface conf to the ethernet interface class. Change-Id: I279afff45a82ca92c4e50810664f7a7c69a66a61 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Create the VLAN Interface ObjectRatan Gupta2017-08-136-5/+68
| | | | | Change-Id: I118fc4bbcad2a478a8aad976e0619537780c1227 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Pass the network conf dir to network manager constructorRatan Gupta2017-08-135-8/+67
| | | | | | | | | when the network manager comes up,it should have its conf dir path which caller wants,instead of calling one more function to set the desired conf dir. Change-Id: I282c1d5e1c6edb2b6e77d16518d2204a6ac41a45 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Changed the type of vlan id from 16 bit to 32 bitRatan Gupta2017-08-133-3/+3
| | | | | | | | | Vlan interface is having vlanid as 32 bit but the create interface was having 16 bit so this commit changes the type of vlanid property in the create interface to 32 bit. Change-Id: I423fdcee86c2d78653fc11d426a241e7d979e16b Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement the Vlan InterfaceRatan Gupta2017-08-136-6/+155
| | | | | Change-Id: I6085868ba4e30bb9e1c6f6d9895a40ebff82804f Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Convert the .cpp to .o in test makefile ldaddRatan Gupta2017-08-131-9/+9
| | | | | | | | | As compiler was not able to pick the override function definition. Make works fine but make check was having problem. Change-Id: I030b89065c2929019e36f8d30f6103289cd07344 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Avoid copying of objectRatan Gupta2017-08-131-1/+1
| | | | | Change-Id: I1e89863344bf6d93b98793c085ea6755f046749f Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Change the pointer type of ip address objectRatan Gupta2017-08-131-14/+13
| | | | | | | | | | | Make the ip address pointer shared as it was declared as shared, but during creation of object it was being created as unique. It is required to be shared as the ip addresses is being exposed through API to network manager. Change-Id: Id520e89b1105dddb7178be638ce708eeeefa5be3 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Don't commit the error during getting of DHCP valueRatan Gupta2017-08-102-8/+12
| | | | | | | | | | | When network manager comes up, it parses the file to get the dhcp value from the config file,if DHCP key is not there then don't commit the error. Resolves openbmc/openbmc#2011 Change-Id: Ic86454a3502096cae2edbb9afe917f5567aa84a6 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Write DHCP configuration parametersRatan Gupta2017-07-252-4/+28
| | | | | | | | | | Write the configuration parameters to the systemd-networkd conf file. Resolves openbmc/openbmc#1770 Change-Id: I6c9427034827d612ad7f75961461c2f33688fbf9 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Create DHCP configuration DBUS objectRatan Gupta2017-07-252-2/+9
| | | | | | | | Network Manager creates the DHCP configuration object. Change-Id: I0119aa4a4b688adec7f7160ff1706aa87cc2bd1f Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement the DHCP configuration interfaceRatan Gupta2017-07-254-2/+162
| | | | | | | | | | This commit implements the below dhcp options 1) DNS 2) NTP 3) HostName Change-Id: Ifb66fbc86ce38abc79454ecbbf6fb3c65f892c19 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement generic restart systemd unit functionRatan Gupta2017-07-194-21/+23
| | | | | Change-Id: Ibd0ec4e7c3b9c395898673839ccf4de85616b201 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement the MAC address interfaceRatan Gupta2017-07-141-0/+2
| | | | | | | | MAC address has been separarated from EthernetInterface to its own interface. Change-Id: I6c1c806003a7d6d3de6ebee7d107177fc17652e0 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
OpenPOWER on IntegriCloud