ONOS-6987 To enable declarlation of required permissions of application in BUCK file

Change-Id: I7081769474d7a40ad527c56bf74bfba105ef6af3
diff --git a/buck-tools/onos_app.py b/buck-tools/onos_app.py
index 119d9f6..bbb053c 100755
--- a/buck-tools/onos_app.py
+++ b/buck-tools/onos_app.py
@@ -26,6 +26,10 @@
     <description>%(description)s</description>
 '''
 ARTIFACT = '    <artifact>%s</artifact>\n'
+SECURITY = '''\
+    <security>
+%s
+    </security>\n'''
 APP_FOOTER = '</app>'
 
 NON_OSGI_TAG = 'NON-OSGI'
@@ -103,6 +107,7 @@
                     description = None,
                     apps = [],
                     artifacts = [],
+                    security= None,
                     **kwargs):
     values = {
         'app_name' : app_name,
@@ -123,6 +128,9 @@
     for artifact in artifacts:
         output += ARTIFACT % mvnUrl(artifact)
 
+    if security is not None:
+        output += SECURITY % security
+
     output += APP_FOOTER
     return output
 
@@ -140,6 +148,7 @@
     parser.add_option("-t", "--title",    dest="title",        help="Title")
     parser.add_option("-r", "--repo",     dest="repo_name",    help="Repo Name")
     parser.add_option('-D', '--desc',     dest='desc',         help='Application description')
+    parser.add_option('-s', '--security', dest='security',     help='Application security')
 
     parser.add_option('-b', '--bundle',
                       action="append", dest='included_bundles',
@@ -206,4 +215,5 @@
     if options.write_app:
         print generateAppFile(artifacts=options.included_bundles,
                               apps=options.apps,
+                              security=options.security,
                               **values)
\ No newline at end of file