diff options
| author | Gunnar Mills <gmills@us.ibm.com> | 2018-04-12 16:12:03 -0500 |
|---|---|---|
| committer | Gunnar Mills <gmills@us.ibm.com> | 2018-05-25 09:50:55 -0500 |
| commit | 7ddc7274a98f518772efa96b93e9b331d7a61117 (patch) | |
| tree | 8b0fc1a66c82fa0e3ab08883200b086f77997e4b /app/common/services | |
| parent | 7d6e62998fac2d905d17c1dbececb403a9ab8bdb (diff) | |
| download | phosphor-webui-7ddc7274a98f518772efa96b93e9b331d7a61117.tar.gz phosphor-webui-7ddc7274a98f518772efa96b93e9b331d7a61117.zip | |
Set MAC address on "Save Settings"
Make a REST call to set the MAC address when the
"Save Settings" button is pressed.
Tested: Verified the MAC Address is set.
Change-Id: I39f6d4688842b3453fd219795d07f819ba4ba481
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'app/common/services')
| -rw-r--r-- | app/common/services/api-utils.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/common/services/api-utils.js b/app/common/services/api-utils.js index fec8572..5e0cd3c 100644 --- a/app/common/services/api-utils.js +++ b/app/common/services/api-utils.js @@ -183,6 +183,23 @@ window.angular && (function(angular) { }); return deferred.promise; }, + setMACAddress: function(interface_name, mac_address) { + return $http({ + method: 'PUT', + url: DataService.getHost() + + '/xyz/openbmc_project/network/' + interface_name + + '/attr/MACAddress', + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json' + }, + withCredentials: true, + data: JSON.stringify({'data': mac_address}) + }) + .then(function(response) { + return response.data; + }); + }, getLEDState: function() { var deferred = $q.defer(); $http({ |

