summaryrefslogtreecommitdiffstats
path: root/netman.py
Commit message (Collapse)AuthorAgeFilesLines
* Additions to network managerDave Cobbley2017-11-291-58/+122
| | | | | | | | | | | | | | | This patch adds a common method to make changes to the network manager configuration. Pushed the basic configuration up to a single method, which checks for minimum required fields, at which point, each individual configuration change can be applied on top of that. Pushed network restart functions to a central point. Set & get hostname Set & get gateway outside of existing static IP set & get Set & get gratuitous ARP. Change-Id: I74e4a9ce22a350fa05d6ce4ac7b09ef96a789b9f Signed-off-by: David Cobbley <david.j.cobbley@linux.intel.com>
* Dereference network-manager.conf from netman.pyDinesh Chinari2017-08-251-38/+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>
* networkd-config: adding new line character before DHCP sectionRatan Gupta2017-03-241-1/+1
| | | | | | | Resolves openbmc/openbmc#1386 Change-Id: I03fafc64a21bb96f21b28cb88476be8eaa511ffd Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* networkd-config: force ipv4 clientid to 'mac'Patrick Williams2017-03-091-0/+2
| | | | | | | | | | | | | | | | | | | | Traditionally the DHCP clients will send the ethernet MAC address as the 'ClientID' in the DHCP request. DHCP on IPv6 introduced a new identifier called a DUID as the primary system identifier that is sent to the DHCP server. This was also added back to IPv4 via RFC 4361 and is the default in systemd-networkd. Some legacy system installations do not support DUIDs and as a short-term fix, we will force 'mac' to be used instead of 'duid'. See openbmc/openbmc#1280 for long-term discussion. Fixes openbmc/openbmc#1272. Change-Id: Idd46c08071b51ad8d1f40f43efade98c9c030dea Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Validate the mac address during setRatan Gupta2016-11-071-4/+59
| | | | | | | | | | | | Allow the mac to be set if one of the condition is true. 1) Incoming Mac is of local admin type. or 2) Incoming mac is same as eeprom Mac. Fixes openbmc/openbmc#622 Change-Id: I4289b18b8460d56cf9956b7c3028da6468f27974 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Add support to update NTP server list in network filesVishwanatha Subbanna2016-09-151-0/+72
| | | | | | | | | | | | | | | | | | | | | | | This provides following APIs: SetNtpServer takes network device name and list of NTP server IP's or hostnames and updates the corresponding .network files with NTP= under [Network] section. Example: [Network] NTP = 1.2.3.4 time.org UpdateUseNtpField takes a string and updates all the available .network files with either UseNtp=true or UseNtp=false depending on user input. Example: [DHCP] UseNtp = false Change-Id: Iead3e6e4cdaf7e12c855c8a7d8e7d57d7037eda2 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* networking: ip address validationEdward A. James2016-08-021-25/+55
| | | | | | | | | | | - check user-provided ip address before assigning to network device to prevent invalid addresses or addresses in disallowed ranges (bad addresses will cause networking failures on the system) Resolves openbmc/openbmc#202. Change-Id: I03826a0b9c947dad5ececd5af5269d3daf6afed8 Signed-off-by: Edward A. James <eajames@us.ibm.com>
* Enabling updates to /etc/resolve.conf either manually or using DHCP supplied DNSvishwa2016-05-241-0/+36
| | | | IP
* Added DBus method GetAddressType to identify if the interface is configuredHariharasubramanian R2016-04-291-0/+26
| | | | with static IP address or configured by DHCP.
* netman and userman throws exceptions and other bugfixes.Hariharasubramanian R2016-03-071-53/+115
|
* Merging EnableDHCP method.Hariharasubramanian R2016-02-101-8/+27
|
* Add function to set MAC addressAdriana Kobylak2016-02-031-16/+22
| | | | Add function SetHwAddress to set the MAC address via the fw_setenv command
* Fix typosAdriana Kobylak2016-02-011-4/+4
| | | | Fix typos introduced in previous commit
* AddAddress4 not setting the new IPChris Austen2016-02-011-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Just a few changes to make it work... 1) Ensure the .network file is a known name. It must be deleted before the new .network file is added since the other file also had the same interface and priority level 2) I got on the systemd channel because restarting the systemd service does not change the ip address. You needed to flush the ip instead. Notes on the networkd subject from the IRC channel... From the systemd-networkd manpage... "Network configurations applied before networkd is started are not removed" I also learned from the IRC to use the 'ip addr flush <device>' to force the network cleanup. ... <causten__> danderson, so if I setup a server on one subnet, rebooted, then wanted to change the ip I couldn't do it without rebooting? <causten__> is there a workaround? I mean switching ips in a lab to a different subnet is common <danderson> either that, or manually clean up the interface configuration before restarting networkd <danderson> i.e. `ip addr del 1.2.3.4 dev eno1` or whatever <danderson> alternatively, you may want to just use a different network configuration manager (e.g. arch's netctl, or network-manager), if your use case is more complex <danderson> networkd is by design aimed at one-time configuration on startup, and minor maintenance like keeping DHCP going
* Adding org.openbmc.NetworkManager dbus interface for network configuation.Hariharasubramanian R2016-02-011-0/+147
OpenPOWER on IntegriCloud