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>
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 @@
                   });
           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({
diff --git a/app/common/styles/elements/index.scss b/app/common/styles/elements/index.scss
index d431ef8..9a6fe55 100644
--- a/app/common/styles/elements/index.scss
+++ b/app/common/styles/elements/index.scss
@@ -12,3 +12,4 @@
 @import "modals";
 @import "quicklinks";
 @import "errors";
+@import "success";
diff --git a/app/common/styles/elements/success.scss b/app/common/styles/elements/success.scss
new file mode 100644
index 0000000..defdb16
--- /dev/null
+++ b/app/common/styles/elements/success.scss
@@ -0,0 +1,7 @@
+.success-msg  {
+  color: $primebtn__bg;
+  padding: 1em;
+  font-size: 1em;
+  font-family: "Courier New", Helvetica, Arial, sans-serif;
+  font-weight: 500;
+}