Tag: 上海狼族藏凤阁1314

mrxvjtbz

Live updates: 49ers lose to Falcons in last seconds at Levi’s

first_imgGAME ESSENTIALS: 49ers (11-2) vs. Falcons (4-9) at Levi’s Stadium on Sunday at 1:25 p.m. (PT).TV: FOX-TV (Ch. 2), Announcers: Chris Myers (play-by-play), Daryl Johnston (analyst), Laura Okmin (reporter). ODDS: 49ers -10. OVER/UNDER: 48.5.SERIES: 49ers lead all-time series 47-31-1. … Follow along Sunday afternoon for in-game insights and analysis when the 49ers and Falcons meet in Santa Clara.center_img Click here if you’re unable to view the photo gallery on your mobile device.last_img

CONTINUE READING
dyekoypw

Women combat lack of electricity with solar power

first_imgSolar Sister empowers women in Africa to be entrepreneurs. They earn an income through selling solar power products, bringing light to homes across the continent and ending the terrible fires caused by candles and paraffin lamps that can devastate whole communities. More than 180 000 people in Uganda, Kenya and Tanzania are relying on solar power products instead of electricity. (Images: Facebook)• One million solar lamps light up Africa • Khi Solar One: renewable energy for the ages • Nigerian student builds solar car from scrap • Africa and space: the continent looks skyward • South African scientists track the sun’s storms Melissa JavanIn a world where not having electricity is the norm, Solar Sister has stepped in help with solar-powered products instead of candles, firewood and paraffin stoves and lamps.The non-profit organisation works in countries such as Uganda, Kenya and Tanzania, where female entrepreneurs sell solar products. Their efforts are making it possible for children to study at night; they are also curbing fires, which frequently result in devastating loss and death.Solar Sister, founded by Katherine Lucey and Neha Misra, was launched in 2010 with 10 female entrepreneurs. Five years later, it has trained more than 1 300 women for the programme. Products the women have sold already are estimated to have improved the lives of more than 180 000 people so far.“It is a very collaborative organisation that relies on partnerships to support our vast network of Solar Sister entrepreneurs. Partners include funding partners, manufacturing partners, implementation partners, et cetera,” explains Caroline Mailloux, the spokeswoman.Lucey, who worked as a banker in the energy sector, left her career of 20 years to spend more time with her children, she told the American news portal, Huffington Post. But she got restless. This initiative has already trained more than 1 300 women for the programme.Energy infrastructureWhen she started looking for work again, she kept in mind what she had done before. “I was focused on the energy sector, so on deals for building power plants,” she explained. “They were about $2-billion a clip and most of my work was in developing countries. Working in these areas, I got to see at the infrastructure level that energy was fundamental to the development of nations. There hasn’t been a nation which has successfully industrialised without energy.”The idea of bringing solar-powered energy to Uganda using a micro-consignment model sounded good, prompting Lucey to join an organisation called Solar Light for Africa, of which she is now a board member.Solar Light for Africa is a non-profit Christian organisation whose mission is to transform and empower the people of Africa by providing light and energy using the natural power of the sun. Its goal is to educate the public on the advantages of renewable energy.Lucey said she realised the lack of access to clean energy was a massive hindrance. “Without clean energy, you don’t have education, you don’t have clean water. Your children can’t study effectively.”This realisation sparked the idea for Solar Sister. The organisation provides women with planning and materials to sell solar-powered lanterns to replace the paraffin lamps that are the main source of light in Uganda. “These aren’t the pretty Coleman lanterns you find at a sporting goods store,” Lucey said. “They burn incredibly toxic, smokey and expensive kerosene.”Paraffin, or kerosene as it is known in the US, is a combustible hydrocarbon liquid widely used as a fuel in industry.Women as salespeopleWomen could be the strongest asset in a household, and to Solar Sister, said Lucey. “The best way to introduce new technology into a household is by a woman hearing from her sister or cousin, ‘I use this at night and my child is doing better in school’, or ‘I know that you lost a child to a kerosene fire last year, and I have a solution that will make sure that never happens again.’ This is the most effective sales force in the world, bar none.”About business, her advice is: “I highly recommend people get involved and work outside of your own sphere. It just expands your world.”The female entrepreneurs sing the praises of Solar Sister. Rita Adongo, in Uganda, said in a YouTube video that she knew most people in her village used firewood or paraffin lamps because they did not have electricity. “That is so much risk to the people in our community. There are things that come on the market – like now we have solar products.”Stella Aloyo, a regional sales associate in Uganda, said people were excited about Solar Sisters. “They are no longer bothered by kids saying: ‘Aah, there’s no fuel, there is no kerosene today. I will not read my homework.’”Her job includes recruiting, training and supporting Solar Sisters. “We have social workers who are entrepreneurs and we have students as entrepreneurs.” When Solar Sister is near, children no longer have to complain about not having paraffin or candles to study.Fiona Okomo, an entrepreneur, said they were lucky to not have any utility bills. “Solar Sister has only one bill – the sun.”Many of the entrepreneurs also said they were now able to pay their children’s school fees. One client earned €4 (about R54) per month before being approached by Solar Sisters. She now earns up to €14 (about R190) because she can work at night using her solar-powered light. “I work very hard for myself and my children.”Solar Sister aims to scale to five countries by 2020 and have 5 000 Solar Sister entrepreneurs – with a knock effect on 250 000 lives.Watch how Solar Sister made a difference in these women’s family life:last_img read more

CONTINUE READING
kqbdosxj

Statement on air strike twisted by media, says Sharad Pawar

first_imgNationalist Congress Party (NCP) president Sharad Pawar on Monday claimed that his statement on destruction of terror camps in Pak Occupied Kashmir using air strike was misconstrued by the media. He also denied having said this.“I did not advise in the all-party meeting, instead all party leaders, including me, had supported the Centre’s position on this issue,” Mr. Pawar said in a statement issued on Monday. As per reports in several Marathi newspapers, Mr. Pawar had said that it was his advise to conduct air strike in Pakistan after Pulwama terror attacks. He said this, according to the reports, while addressing an election campaign rally in Chakan on Sunday. “The central government had called an all-party meeting after the Pulwama terror attack. The meeting unanimously passed a resolution supporting Indian armed forces. I was a part of it,” Mr. Pawar said. The NCP chief added that the entire world knows the strength of Indian armed forces. “Our power was visible for all to see in Indo-Pak wars of 1965 and 1971 and later in the Kargil war. Therefore I am not in favor of discussing how many terrorists were killed in the air strike on terror camps in Pakistan Occupied Kashmir,” he said, adding that he feels politics should not be played over defence-related issues.“Neither the Prime Minister nor the Defence Minister was present at the meeting. We got to know that the PM was in Maharashtra and campaigning for his party’s candidates,” Mr. Pawar said in Chakan.He said, “On the one hand, Mr. Modi boasts he is the chowkidar (guardian), the country’s security is safe in his hands, and that he has a 56-inch chest. Then, what was he doing in Yavatmal, issuing these statements in the aftermath of the terror strike?”last_img read more

CONTINUE READING
fctlhund

Fortune Cutting Frequency

first_imgThere are no plans to alter rate base, currently at 830,000, the executive said. There are plans, however, to build out the identity of Fortune’s Web site, but it will not break out of its subdomain within the CNNMoney portal.Like most other magazines in the business and finance category, Fortune suffered under the recession and accompanying ad drop. The magazine’s ad pages dropped 35 percent in the first three quarters compared to same period last year, per PIB numbers. Starting next year, Time Inc.’s Fortune will publish 18 times, down from a 25-time frequency. The move coincides with a redesign of the magazine that will emphasize long-form journalism, more utility and a shift to conceptual cover designs.Focus groups were conducted earlier this year to solicit feedback on editorial positioning and design, a spokesperson told FOLIO: sister title Audience Development.The new design, led by John Korpics, who was brought on board as creative director late summer, will have a less cluttered layout and feature upgraded paper and cover stock. Edit will focus on “long-form, deep dive” journalism, and the magazine will also add new sections in the front to accommodate reader requests for more actionable, career-focused content. The magazine will expand by 8 to 12 pages per issue.last_img read more

CONTINUE READING
lupjxwmt

BtoB Ad Network Breaks 1000 Websites

first_imgBBN has been consistently growing since its 2008 launch. BBN says it reaches 50 million b-to-b buyers. Members include Cygnus Business Media, McGraw-Hill, Stamats Business Media and Summit Business Media. Reisfield says that the company grew more than 25 percent in 2011, and expects even more growth in 2012. He attributes this growth to the company’s non-endemic approach to being “brand focused,” that is to say there is no company too small or too large for BBN’s vertical and horizontal solutions. BBN claims they provide solutions that are “beyond the banner” through a suite of services including creating, managing, and delivering advertising to business audiences.Acccording to Reisfield, BBN’s “concept has been validated.” Not only is the company’s holdings portfolio growing, but also is their geographic scope.  Nearly one-third of the company’s websites now operate in Europe, and BBN plans to further bolster this figure.  In September of 2010 Folio: reported that BBN, a privately held Washington D.C. based company, opened an additional office in London. The BBN Networks recently added six new media companies to its b-to-b ad network.  The American Psychological Association, BNP Media, CQ Roll Call, Dennis Media, Mitochon Systems and Springwise have all been added to BBN’s portfolio. The addition of these firms increases BBN’s b-to-b network reach to over 1,000 websites.  Chairman Derek Reisfield describes the addition of BBN’s new partnerships as a “milestone,” and that the success of the company’s growth is proof that it is meeting its clients’ demand for finding a “qualified audience” in b-to-b advertising.  Reisfield indicates that BBN is performance-focused, beginning with a broad network approach, and then working with the client to target specific market needs. Reisfield states this approach ensures that “everyone has an opportunity” to reach their target audience.last_img read more

CONTINUE READING
pjhhgrso

Get early access to Elder Scrolls Blades on iOS and Android

first_imgBethesda describes The Elder Scrolls: Blades as a “classic dungeon crawler reimagined.” Your customized character is a Blade, one of the Empire’s top agents, who’s forced into exile. While you’re fleeing, your hometown is destroyed. The company said it plans to add new features to the game after the launch. It’s letting early-access players into the game in waves, but there’s still time to sign up here. Bethesda also provided a full list of supported devices. Early access supports English, French, Italian, German, Spanish and Russian. Earlier this week, to kick off its celebration, Bethesda offered a free PC copy of Elder Scrolls III: Morrowind. 3:18 Tags Now playing: Watch this: Elder Scrolls: Blades hits the new iPhone Bethesda is offering early access to The Elder Scrolls: Blades. Bethesda Gaming studio Bethesda said on Twitter Wednesday that The Elder Scrolls: Blades is getting a limited early-access program on iOS and Android. The early access is part of the 25th anniversary celebration for the Elder Scrolls game series. “Ready to play? We’re inviting players in waves, so make sure to keep an eye on your email for the invite,” Bethesda said. As part of our #TES25 celebration, we’re excited to announce that The Elder Scrolls: #Blades is officially in Early Access!Ready to play? We’re inviting players in waves, so make sure to keep an eye on your email for the invite.Here’s the updated FAQ: https://t.co/TZsYW4pnJy pic.twitter.com/2reothr8Zs— The Elder Scrolls (@ElderScrolls) March 27, 2019center_img Comments Share your voice 2 Gaming Mobile iOS 12last_img read more

CONTINUE READING
kgqczfoh

DragonFly BSD 541 released with new system compiler in GCC 8 and

first_imgThis Christmas eve, team DragonFly released the 54th version, DragonFly BSD 5.4.1, a free and open-source Unix-like operating system. This version comes with a new system compiler in GCC 8, improved NUMA support, a large number of network and virtual machine driver updates. This release also has significant HAMMER2 improvements and better WLAN interface handling. What’s new in DragonFly BSD 5.4.1 Big-ticket items This release comes with much better support for asymmetric NUMA (Non-Uniform Memory Access) configurations. Both the memory subsystem and the scheduler now understand the functionality of Threadripper 2990WX’s architecture. The team at DragonFly has been working on improving fairness for shared-vs-exclusive lock clashes, reducing cache ping-ponging due to non-contending SMP locks. This release comes with major updates to dports. Concurrency across multiple ttys and ptys have been improved. GCC 8 DragonFly 5.4.1 comes with GCC 8.0, and runs as the default compiler. It is also used for building dports. HAMMER2 This release comes with HAMMER2 which is the default root filesystem in non-clustered mode. It increases bulkfree cache to reduce the number of iterations required. It also fixed numerous bugs. This release comes with improved support on low-memory machines. This release comes with significant pre-work on the XOP API to help support future networked operations. Major changes Security Issues The machdep.spectre_supportsysctl can be now used to probe the spectre support, and machdep.spectre_mitigation sysctl to enable/disable support. The default /root perms has been changed from 755 to 700 in the build template. Delayed FP state has been removed to avoid the known side-channel attack. This release comes with clean FP state on switch to avoid known side-channel attack. There zero user registers on entry into kernel (syscall, interrupt, or exception) to avoid speculative side-channel attacks. Kernel This release comes with updated drm to match Linux kernel 4.7.10 in a number of locations. The radeon driver has been updated; currently matches Linux 3.18. CVE-2018-8897 has been mitigated. This release comes with an added timer support x2apic A private_data field thas been added to struct file for improving application support. SPINLOCK and acpi_timer performance has been improved. A dirty vnode management facility has been added Bottlenecks from the rlimit handling code has been removed. The size of the vm_object hash table has been increased by 4x to reduce collisions. Concurrent tmpfs and allocvnode() has been improved. The namecache performance has been improved. The syscall path has been optimized to improve performance. Driver updates With this release, serial-output-only installs are now possible. This version of DragonFly comes with  virtio_balloon memory driver. With this release, /dev/sndstat can now be opened multiple times by the same device. MosChip PCIe serial communications are now supported. Missing descriptions for usb4bsd C610/X99 controllers have been added. This release comes with an added support for PCIe serial com and console support. Old PCI and ISA serial drivers have been removed. Userland This release comes with an added rc support for ipfw3. Vis(3) and unvis(3) have been updated. With this release, pciconf database has been updated. tcsetsid() has been added to libc. The buildworld concurrency has been improved. Networking With this release, the network tunnel driver, tun(4), has been cleaned up and updated. It’s now clonable for anyone building VPN links. The arp issue in the bridge code has now been fixed. Interface groups are now supported in the kernel and pf(4). The ENA(Elastic Network Adapter) network driver has been added to DragonFly 5.4.1. Package updates With this release, there are a number of options for running a web browser on DragonFly which includes, Chromium, Firefox, Opera, Midori, Palemoon, etc. Users are appreciating the efforts taken for this project and especially, the hammer storage is being appreciated. Though few users are complaining about the speed of the process which is very slow. The HAMMER2 used in this release is BSD licensed so it might have better potential as a Linux kernel module. Read more about this release on DragonFly BSD. Read Next Google employees join hands with Amnesty International urging Google to drop Project Dragonfly Key Takeaways from Sundar Pichai’s Congress hearing over user data, political bias, and Project Dragonfly As Pichai defends Google’s “integrity” ahead of today’s Congress hearing, over 60 NGOs ask him to defend human rights by dropping DragonFlylast_img read more

CONTINUE READING
poelcsdo

Creating a chatbot to assist in network operations Tutorial

first_imgIn this tutorial, we will understand how to leverage chatbots to assist in network operations. As we move toward intelligent operations, another area to focus on is mobility. It’s good to have a script to perform configurations, remediations, or even troubleshooting, but it still requires a presence to monitor, initiate, or even execute those programs or scripts. Nokia’s MIKA is a good example of a chatbot that operations personnel can use for network troubleshooting and repair. According to Nokia’s blog,  MIKA responds with an alarm prioritization information based on the realities for this individual network and also compare’s the current situation to a whole service history of past events from this network and others, in order to identify the best solution for the current problem. Let’s create a chatbot to assist in network operations. For this use case, we will use a widely-used chat application, Slack. Referring to the intelligent data analysis capabilities of Splunk, we would see some user chat interaction with the chatbot, to get some insight into the environment. This tutorial is an excerpt from a book written by Abhishek Ratan titled Practical Network Automation – Second Edition. This book will acquaint you with the fundamental concepts of network automation and help you improve your data center’s robustness and security. The code for this tutorial can be found on GitHub. As we have our web framework deployed, we’ll leverage the same framework to interact with the Slack chatbot, which in turn will interact with Splunk. It can also interact directly with network devices so we can initiate some complex chats, such as rebooting a router from Slack if need be. This eventually gives mobility to an engineer who can work on tasks from anywhere (even from a cellphone) without being tied to a certain location or office. To create a chatbot, here are the basic steps: Create a workspace (or account) on Slack: Create an application in your workspace (in our case, we have created an app called mybot): Here is the basic information about the application (App ID and Client ID can be used along with other information that uniquely identifies this application): Add a bot capability to this application: Add the event subscriptions and mapping to the external API that the messages will be posted to. An event subscription is when someone types the reference to the chatbot on the chat, then which API will be called with the data that is being typed in the chat with this chatbot: Here, a crucial step is once we type in the URL that accepts chat messages, that particular URL needs to be verified from Slack. A verification involves the API endpoint sending the same response back as a string or JSON that is being sent to that endpoint from Slack. If we receive the same response, Slack confirms that the endpoint is authentic and marks it as verified. This is a one-time process and any changes in the API URL will result in repeating this step. Here is the Python code in the Ops API framework that responds to this specific query: import falconimport jsondef on_get(self,req,resp): # Handles GET request resp.status=falcon.HTTP_200 # Default status resp.body=json.dumps({“Server is Up!”})def on_post(self,req,resp): # Handles POST Request print(“In post”) data=req.bounded_stream.read() try: # Authenticating end point to Slack data=json.loads(data)[“challenge”] # Default status resp.status=falcon.HTTP_200 # Send challenge string back as response resp.body=data except: # URL already verified resp.status=falcon.HTTP_200 resp.body=”” This would validate, and if a challenge is sent from Slack, it would respond back with the same challenge value that confirms it to be the right endpoint for the Slack channel to send chat data to. Install this application (or chatbot) into any channels (this is similar to adding a user in a group chat): The core API framework code that responds to specific chat messages, performs the following actions: Acknowledges any post sent to Slack with a response of 200 in three seconds. If this is not done, Slack reports back: endpoint not reachable. Ensures any message sent from chatbot (not from any real user) is again not sent back as a reply. This can create a loop, since a message sent from a chatbot, would be treated as a new message in Slack chat and it would be sent again to URL. This would eventually make the chat unusable, causing repetitive messages on the chat. Authenticates the response with a token that would be sent back to Slack to ensure the response coming to Slack is from an authenticated source. The code is as follows: import falconimport jsonimport requestsimport base64from splunkquery import runfrom splunk_alexa import alexafrom channel import channel_connect,set_dataclass Bot_BECJ82A3V(): def on_get(self,req,resp): # Handles GET request resp.status=falcon.HTTP_200 # Default status resp.body=json.dumps({“Server is Up!”}) def on_post(self,req,resp): # Handles POST Request print(“In post”) data=req.bounded_stream.read() try: bot_id=json.loads(data)[“event”][“bot_id”] if bot_id==”BECJ82A3V”: print(“Ignore message from same bot”) resp.status=falcon.HTTP_200 resp.body=”” return except: print(“Life goes on. . .”) try: # Authenticating end point to Slack data=json.loads(data)[“challenge”] # Default status resp.status=falcon.HTTP_200 # Send challenge string back as response resp.body=data except: # URL already verified resp.status=falcon.HTTP_200 resp.body=”” print(data) data=json.loads(data) #Get the channel and data information channel=data[“event”][“channel”] text=data[“event”][“text”] # Authenticate Agent to access Slack endpoint token=”xoxp-xxxxxx” # Set parameters print(type(data)) print(text) set_data(channel,token,resp) # Process request and connect to slack channel channel_connect(text) return# falcon.API instance , callable from gunicornapp= falcon.API()# instantiate helloWorld classBot3V=Bot_BECJ82A3V()# map URL to helloWorld classapp.add_route(“/slack”,Bot3V) Performing a channel interaction response: This code takes care of interpreting specific chats that are performed with chat-bot, in the chat channel. Additionally, this would respond with the reply, to the specific user or channel ID and with authentication token to the Slack API https://slack.com/api/chat.postMessage. This ensures the message or reply back to the Slack chat is shown on the specific channel, from where it originated. As a sample, we would use the chat to encrypt or decrypt a specific value. For example, if we write encrypt username[:]password, it would return an encrypted string with a base64 value. Similarly, if we write decrypt , the chatbot would return a after decrypting the encoded string. The code is as follows: import jsonimport requestsimport base64from splunk_alexa import alexachannl=””token=””resp=””def set_data(Channel,Token,Response): global channl,token,resp channl=Channel token=Token resp=Responsedef send_data(text):global channl,token,resprint(channl)resp = requests.post(“https://slack.com/api/chat.postMessage”,data='{“channel”:”‘+channl+'”,”text”:”‘+text+'”}’,headers={“Content-type”: “application/json”,”Authorization”: “Bearer “+token},verify=False)def channel_connect(text):global channl,token,resptry: print(text)arg=text.split(‘ ‘)print(str(arg))path=arg[0].lower()print(path in [“decode”,”encode”])if path in [“decode”,”encode”]:print(“deecode api”)else:result=alexa(arg,resp)text=””try:for i in result:print(i)print(str(i.values()))for j in i.values():print(j)text=text+’ ‘+j#print(j)if text==”” or text==None:text=”None”send_data(text)returnexcept:text=”None”send_data(text)returndecode=arg[1]except:print(“Please enter a string to decode”)text=” argument cannot be empty”send_data(text)returndeencode(arg,text)def deencode(arg,text):global channl,token,respdecode=arg[1]if arg[1]==’–help’:#print(“Sinput”)text=”encode/decode “send_data(text)returnif arg[0].lower()==”encode”:encoded=base64.b64encode(str.encode(decode))if ‘[:]’ in decode:text=”Encoded string: “+encoded.decode(‘utf-8’)send_data(text)returnelse:text=”sample string format username[:]password”send_data(text)returntry:creds=base64.b64decode(decode)creds=creds.decode(“utf-8”)except:print(“problem while decoding String”)text=”Error decoding the string. Check your encoded string.”send_data(text)returnif ‘[:]’ in str(creds):print(“[:] substring exists in the decoded base64 credentials”)# split based on the first match of “[:]”credentials = str(creds).split(‘[:]’,1)username = str(credentials[0])password = str(credentials[1])status = ‘success’else:text=”encoded string is not in standard format, use username[:]password”send_data(text)print(“the encoded base64 is not in standard format username[:]password”)username = “Invalid”password = “Invalid”status = ‘failed’temp_dict = {}temp_dict[‘output’] = {‘username’:username,’password’:password}temp_dict[‘status’] = statustemp_dict[‘identifier’] = “”temp_dict[‘type’] = “”#result.append(temp_dict)print(temp_dict)text=” “+username+” “+passwordsend_data(text)print(resp.text)print(resp.status_code)return This code queries the Splunk instance for a particular chat with the chatbot. The chat would ask for any management interface (Loopback45) that is currently down. Additionally, in the chat, a user can ask for all routers on which the management interface is up. This English response is converted into a Splunk query and, based upon the response from Splunk, it returns the status to the Slack chat. Let us see the code that performs the action to respond the result, to Slack chat: from splunkquery import rundef alexa(data,resp): try: string=data.split(‘ ‘) except: string=data search=’ ‘.join(string[0:-1]) param=string[-1] print(“param”+param) match_dict={0:”routers management interface”,1:”routers management loopback”} for no in range(2): print(match_dict[no].split(‘ ‘)) print(search.split(‘ ‘)) test=list(map(lambda x:x in search.split(‘ ‘),match_dict[no].split(‘ ‘))) print(test) print(no) if False in test: pass else: if no in [0,1]: if param.lower()==”up”: query=”search%20index%3D%22main%22%20earliest%3D0%20%7C%20dedup%20interface_name%2Crouter_name%20%7C%20where%20interface_name%3D%22Loopback45%22%20%20and%20interface_status%3D%22up%22%20%7C%20table%20router_name” elif param.lower()==”down”: query=”search%20index%3D%22main%22%20earliest%3D0%20%7C%20dedup%20interface_name%2Crouter_name%20%7C%20where%20interface_name%3D%22Loopback45%22%20%20and%20interface_status%21%3D%22up%22%20%7C%20table%20router_name” else: return “None” result=run(query,resp) return result The following Splunk query fetches the status: For UP interface: The query would be as follows: index=”main” earliest=0 | dedup interface_name,router_name | where interface_name=”Loopback45″ and interface_status=”up” | table router_name For DOWN interface (any status except ): The query would be as follows: index=”main” earliest=0 | dedup interface_name,router_name | where interface_name=”Loopback45″ and interface_status!=”up” | table router_name Let’s see the end result of chatting with the chatbot and the responses being sent back based on the chats. The encoding/decoding example is as follows: As we can see here, we sent a chat with the encode abhishek[:]password123 message. This chat was sent as a POST request to the API, which in turn encrypted it to base64 and responded back with the added words as Encoded string: . In the next chat, we passed the same string with the decode option. This responds back with decoding the information from API function, and responds back to Slack chat, with username abhishek and password password123. Let’s see the example of the Splunk query chat: In this query, we have shut down the Loopback45 interface on rtr1. During our scheduled discovery of those interfaces through the Python script, the data is now in Splunk. When queried on which management interface (Loopback45) is down, it would respond back with rtr1. The slack chat, On which routers the management interface is down, would pass this to the API, which, upon receiving this payload, will run the Splunk query to get the stats. The return value (which, in this case, is rtr1) will be given back as a response in the chat. Similarly, a reverse query of, On which routers the management interface is up, will query Splunk and eventually share back the response as rtr2, rtr3, and rtr4 (as interfaces on all these routers are UP). This chat use case can be extended to ensure that full end-to-end troubleshooting can occur using a simple chat. Extensive cases can be built using various backend functions, starting from a basic identification of problems to complex tasks, such as remediation based upon identified situations. Summary In this tutorial, we implemented some real-life use cases and looked at techniques to perform troubleshooting using chatbot. The use cases gave us insight into performing intelligent remediation as well as performing audits at scale, which are key challenges in the current environment. To learn how to automate your own network without any hassle while leveraging the power of Python, check out our book Practical Network Automation – Second Edition. Read Next Preparing and automating a task in Python [Tutorial] PyPy 7.0 released for Python 2.7, 3.5, and 3.6 alpha 5 blog posts that could make you a better Python programmerlast_img read more

CONTINUE READING